Skip to content

Publish versioned audit-completion contract vectors for external adapters #580

Description

@cdcavell

Summary

Publish versioned, machine-readable contract vectors for NCAT's audit-completion handoff so external adapters can verify that they still agree with NCAT's real receipt, message, idempotency, and canonical manifest behavior.

NCAT and AsiBackbone intentionally do not depend on one another at compile time. AsiBackbone's samples/NcatAuditCompletionAdapter therefore models the neutral handoff independently. That boundary is healthy, but no automated contract currently proves that the independently modeled fields and hashes still match NCAT after changes such as the recent audit-value canonicalization update in #575.

Proposed contract artifacts

Commit deterministic fixtures produced by NCAT code, not handwritten examples. Include at least:

  • a representative ApplicationMutationAuditReceipt;
  • the corresponding ApplicationAuditCompletionMessage;
  • canonical manifest bytes or JSON;
  • manifest schema version, algorithm, and expected digest;
  • idempotency key and destination;
  • committed, failed, rolled-back, and no-mutation outcomes as applicable;
  • nullable operation, attempt, decision, correlation, and trace identifiers;
  • a contract/fixture schema version and generation metadata.

The fixtures must remain privacy-safe and contain only synthetic values.

Acceptance criteria

  • Add deterministic NCAT-owned contract fixtures under a clearly versioned path.
  • Generate or validate them through production NCAT builders/mappers rather than duplicating the production algorithm in the fixture test.
  • Include a golden manifest/hash vector that detects canonicalization drift.
  • Cover all supported persistence outcomes and invalid field combinations that an adapter must reject.
  • Add a test that fails when production behavior changes without an intentional fixture/schema update.
  • Document the compatibility policy for additive fields, breaking field changes, schema versions, and canonical hash changes.
  • Make the fixtures consumable by external repositories without requiring NCAT as a compile-time dependency.
  • Link the fixture path and pinned revision/tag from the audit-accountability integration documentation.

Companion work

A companion AsiBackbone issue should consume these vectors in samples/NcatAuditCompletionAdapter tests. Neither repository should add the other product to its core dependency graph.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or requestpriority: mediumP2: important scheduled work after P0/P1 items

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions