Skip to content

feat(capsule-emit): lift bundle+disclosure block, per-item bundle disclosure - #56

Open
StevenMih wants to merge 2 commits into
mainfrom
capsule-emit-lift-bundle-disclosure-block
Open

feat(capsule-emit): lift bundle+disclosure block, per-item bundle disclosure#56
StevenMih wants to merge 2 commits into
mainfrom
capsule-emit-lift-bundle-disclosure-block

Conversation

@StevenMih

Copy link
Copy Markdown
Contributor

Summary

  • scitt-cose#30 (merged + deployed) fixes the verify-surface viewer's array-fragment bundle path to unwrap a Disclosure Envelope before checking capsule_id/chain, so the vacuous-Integrity-pass bug that motivated capsule_emit/permalink.py's producer-side PermalinkError refusal (bundle=True + disclosures=) no longer exists. That block is lifted.
  • build_url() now accepts bundle=True + disclosures={capsule_id: {field: payload}} for per-item bundle disclosure; single-capsule disclosures={field: payload} is unchanged.
  • CLI --reveal accepts SELECTOR:FIELD=payload.json for bundles (SELECTOR = 1-based record number or an >=8-char capsule_id prefix); the old unqualified FIELD=payload.json form still works for a genuine single capsule and is refused (not silently misapplied) when more than one capsule is in scope.
  • Per-item digest mismatch refuses the whole URL — same fail-closed rule as the single-capsule case.
  • Added a fragment-size warning (stderr, not a refusal) past ~16KB.
  • Same frozen goose demo run (leaves 267/268/269) — no re-anchor. Built the fully disclosed bundle permalink via the real CLI and browser-confirmed it against the deployed viewer: Integrity ✓/Sequence ✓ on every record (real, not vacuous), Chain Navigation columns populate through the envelope, Privilege Log REVEALED · ✓ match, Regulatory context panel detects human-oversight-record on an enveloped bundle item.

Test plan

  • python3 -m pytest -q --ignore=tests/test_agentgateway.py — 461 passed (test_agentgateway.py's collection failure is a pre-existing local protobuf version mismatch, unrelated to this change)
  • ruff check — clean
  • Browser-confirmed the fully disclosed bundle permalink against the deployed verify.agentactioncapsule.org viewer
  • examples/goose-capsule/evidence/run-transcript.md and README.md updated with the fully disclosed bundle permalink and browser-confirmation details

🤖 Generated with Claude Code

…closure

scitt-cose#30 (merged + deployed) fixes the viewer's array-fragment bundle
path to unwrap a Disclosure Envelope before checking capsule_id/chain, so
the vacuous-Integrity-pass bug that motivated the producer-side
PermalinkError refusal no longer exists. build_url() now accepts
bundle=True + disclosures={capsule_id: {field: payload}} for per-item
disclosure; the CLI's --reveal takes SELECTOR:FIELD=payload.json for
bundles (1-based record number or capsule_id prefix). Per-item digest
mismatch still refuses the whole URL. Added a fragment-size warning at
~16KB.

Same frozen goose demo run (leaves 267/268/269), no re-anchor — built and
browser-confirmed the fully disclosed bundle permalink against the
deployed viewer.

Signed-off-by: stevenmih <stevenmih88-3@gmail.com>
@StevenMih
StevenMih force-pushed the capsule-emit-lift-bundle-disclosure-block branch from 85be7b9 to b0b4cd1 Compare August 11, 2026 05:50
capsule_ids are hex, so an all-digit >=8-char prefix is legal (~2.3% of
capsules). selector.isdigit() alone misread such a prefix as a record
index -- either an out-of-range error on a valid prefix, or silently
resolving the wrong record when the prefix happened to also look like
a valid index. Only treat the selector as an index when it's short
enough that the two spaces can't overlap: len(selector) < 8.

Signed-off-by: stevenmih <stevenmih88-3@gmail.com>
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.

1 participant