Skip to content

feat: export ledgers in the IETF Agent Audit Trail draft -11 format - #5

Merged
bhyi4 merged 2 commits into
mainfrom
claude/project-thread-i7xdnp
Nov 23, 2026
Merged

bhyi4 merged 2 commits into
mainfrom
claude/project-thread-i7xdnp

Conversation

@bhyi4

@bhyi4 bhyi4 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Requested by 범후연이 · project thread

What

  • New actmirror/aat.py and CLI commands am export-aat / am verify-aat (API: to_aat, export_aat, verify_aat).
  • Target: draft-sharif-agent-audit-trail-11 (2026-11-21), an individual Internet-Draft, not an IETF standard. Only -11 is targeted; the revision is written into every record (action_detail.export_profile.draft).
  • §3.1 REQUIRED fields, §6.1 chain prev_hash = hex(SHA-256(JCS(prev record minus "batch"))), null on genesis, JSON Lines output (§10.1). Includes an RFC 8785 canonicaliser (ECMAScript number formatting, UTF-16 key order).
  • The native entry (with seal, prev_seal, sig) is preserved under action_detail.action_mirror for cross-checking.
  • Refuses to export a ledger whose native chain fails verify_chain — re-chaining would hide tampering.

Limits (also in README / README_KO)

  • No new evidence: the export is derived from the native ledger.
  • Fields the ledger lacks are filled with documented defaults: principal (agent itself, self-asserted), agent_version 0.0.0, trust_level L0, record_phase post_execution, outcome from payload.exit if an int, else success (= recorded, not verified).
  • record_id / session_id are UUIDv4-formatted but derived from seals (reproducible), not random.
  • Actions → tool_call; peer_witness → decision. The Ed25519 sig is not emitted as an AAT signature.
  • verify-aat checks fields, enums, chain, linkage, session, timestamps; not signatures, trust-level rules or §8 records; it can't detect removal of the last record.
  • JCS tested against RFC 8785 number/key-order cases, not an external conformance suite.

Also

  • README tables: provenance-mirror row now says "What origin hints are present? (not authenticated)" to match the org profile.
  • Removed the stale "21 tests" count from both READMEs.

Testing

pytest -q: 86 passed (58 existing + 28 new in tests/test_aat.py), Linux / Python 3.11 only — the Windows and 3.10/3.12 jobs will run in CI. examples/demo_family.py still runs.


Generated by Claude Code

Adds am export-aat / am verify-aat and to_aat/export_aat/verify_aat.
Targets draft-sharif-agent-audit-trail-11 (2026-11-21), an individual
Internet-Draft, and records that revision in every exported record.
Includes an RFC 8785 canonicaliser for the section 6.1 prev_hash chain.
Refuses ledgers whose native chain fails verification. Fields the
native ledger lacks are filled with documented defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq8kkjQte1m3idCZFj8t8E
The table said provenance-mirror proves origin; the org profile and its own
verdicts say byte markers are unauthenticated hints (PROVENANCE-UNVERIFIED).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq8kkjQte1m3idCZFj8t8E
@bhyi4 bhyi4 self-assigned this Nov 23, 2026
@bhyi4
bhyi4 merged commit dd9dafa into main Nov 23, 2026
7 checks passed
@bhyi4 bhyi4 mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants