Skip to content

feat(trace-adapters): reconcile GapDisclosure/1.0 without trusted fixture assertions - #422

Open
drk-ram wants to merge 2 commits into
agentrust-io:mainfrom
drk-ram:feat/gap-disclosure-reconciler-416
Open

drk-ram wants to merge 2 commits into
agentrust-io:mainfrom
drk-ram:feat/gap-disclosure-reconciler-416

Conversation

@drk-ram

@drk-ram drk-ram commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Library extraction for the GapDisclosure/1.0 verifier, scoped to the contract review on #416. reconcile_chain and verify_disclosure live in agentrust-trace-adapters. Splice facts are derived from authenticated chain elements. Fixture booleans are not API inputs.

This does not change ca2a_verify or cMCP emission. Retry stays unauthorized. effect_status stays unknown.

Closes #416

Contract review

  1. Case A (no disclosure) is receipt_missing_required. Case B is receipt_gap_disclosed only with a verified Ed25519 issuer, stream binding, and a two-sided splice. A tail disclosure is gap_disclosure_unverified: not coverage, and not invalid.
  2. A disclosure proves a chain position, not which credential ran. Coverage is judged against expected_credential_ids. chain[:2] does not infer a third hop. A disclosure covers an inventory entry only when its signed credential_id binds that entry.
  3. cause and receipts_lost_estimate are validated and echoed. A lease_id in cause, or an emitter-asserted cas_fence_epoch, does not select an outcome or authorize retry. A second hop for the same credential is receipt_invalid.
  4. The public API does not accept predecessor_present, successor_present, permitted_ancestor_key_ids, or claimed_absent_but_present. Those facts are derived. Ancestor entitlement requires a KeyHierarchy/1.0 element signed by the ancestor key. Untrusted JSON is size-bounded and rejects duplicate keys, non-finite numbers, and non-integral numbers. The twenty section 3.3.4 vectors and the live-tail contrast are preserved, with consumer cases for A/B/tail, truncated inventory, contradiction, unauthorized signers, and descriptive-field invariance.

KeyHierarchy/1.0 is this library's ancestor carrier. It is not a TRACE record type and not a ca2a wire change.

Test plan

  • python -m pytest packages/agentrust-trace-adapters/tests -q — 197 passed
  • ruff check on the new module, package init, and tests (E4,E7,E9,F, --target-version py39) — passed
  • python scripts/validate_integrations.py — 51 integrations, 0 failures
  • python -m pytest tests/test_validate_integrations.py tests/test_composite_action_paths.py tests/test_workflow_oidc_permissions.py tests/test_integration_schema.py -q — 48 passed
  • python scripts/validate_compatibility.py — 0 failures
  • python -m pytest tests/test_validate_compatibility.py tests/test_generate_marketplace_catalog.py tests/test_generate_agt_marketplace_catalog.py -q — 12 passed
  • python scripts/generate_integration_index.py --check — passed
  • python scripts/generate_marketplace_catalog.py --check — catalog current
  • python -m unittest discover -s tests in integrations/agentrust-confidential-workflow-harness — 28 in-repo tests passed; 10 modules did not import locally because ca2a_runtime, cmcp_runtime, and trace_tests are not installed. Unrelated to this change.

No .github/pull_request_template.md is present in this repository.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Contributor Check: HIGH

Check Result
Profile HIGH
Credential LOW
Overall HIGH

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:HIGH Contributor check flagged HIGH risk label Nov 13, 2026

@dinakarjs dinakarjs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed dca38a8. The 197 committed trace-adapter tests pass locally on Linux/Python 3.12.14, but an independent synthetic negative control establishes a verification-boundary failure outside the committed suite. Please hold acceptance pending private triage and an exact-head regression review.

I am withholding the input and reproduction from this public thread under SECURITY.md. The private report and executable reproducer are prepared, but not yet submitted: the available GitHub connector does not support advisory creation and the browser requires sign-in. This review does not claim that maintainers have received the private details. No published-release impact has been established; the finding is reproduced in this proposed library slice. Prepared with OpenAI Codex.

Copy link
Copy Markdown
Contributor

Status correction to my earlier review: the private report was successfully submitted on 14 November and I have now verified that it is in maintainer triage. The statement that it was not yet submitted is historical. The reviewed public head remains dca38a8; my changes request remains in place pending private disposition and review of the correction. No private reproduction details are disclosed here, and no released-version impact or resolution is claimed. Prepared with OpenAI Codex.

…ture assertions

Extract the section 3.3.4 verifier into agentrust-trace-adapters. Missing
evidence stays receipt_missing_required, a two-sided splice is
receipt_gap_disclosed, and a tail disclosure stays gap_disclosure_unverified.
Credential coverage uses an explicit inventory. cause and fencing epochs do
not authorize retry.

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
…redential conflicts

- Require the sealing successor (and the terminal hop receipt after a
  consecutive disclosure run) to carry a valid signature in session_id
  under the chain key / authenticated ancestor with strictly increasing
  sequence before treating a GapDisclosure/1.0 as sealed.
- Require hops in reconcile_chain to form a contiguous hash-linked,
  monotonically sequenced chain under the chain key / authorized
  ancestor; unlinked or foreign-key hops fail closed as receipt_invalid.
- Reject disclosures that claim a credential_id also present as a hop
  receipt (or duplicated across disclosures) as disclosure_contradicted.

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram

drk-ram commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

@dinakarjs Rebased onto current main and hardened the verification boundary in 0478f1c (0478f1c3a8e5994b0dfe3102b7d2b9eeab2889df):

  1. Authenticated successor & consecutive-run terminal seal (_seal_holds): A successor element (and the terminal hop receipt closing a consecutive disclosure run) must verify in session_id under the chain key or an authenticated KeyHierarchy/1.0 ancestor with strictly increasing sequence; tampered, foreign-key, or cross-session successors fail closed with disclosure_not_sealed_by_successor.
  2. Contiguous hop hash-linkage & sequence monotonicity (_valid_chain_hop_digests): reconcile_chain verifies that all hop receipts form a contiguous previous_receipt_hash chain from the root hop with strictly increasing sequence under the chain's authorized key set; unlinked or foreign-key hops fail closed as receipt_invalid.
  3. Same-credential_id hop/disclosure contradiction (_contradicting & _cover_credentials): A disclosure binding a credential_id that is also present as a hop receipt (or bound by another disclosure) is rejected with disclosure_contradicted (receipt_invalid).
  4. Validation: pytest packages/agentrust-trace-adapters/tests — 199 passed; ruff check — 0 warnings.

@drk-ram
drk-ram force-pushed the feat/gap-disclosure-reconciler-416 branch from dca38a8 to 0478f1c Compare November 16, 2026 00:43

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the rebased revision and ran four public fixture and positive-path checks, including the two-sided disclosure case. Those pass. The existing private review requires a disposition on this revision. Please have the reviewer with access record whether the correction addresses the original finding and link the resulting review here when ready. The merge should wait for that confirmation.

This branch has not been deployed

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

Labels

needs-review:HIGH Contributor check flagged HIGH risk

Projects

None yet

3 participants