Add deterministic bundle export and content-aware diff #127

Closed
opened 2026-07-29 04:39:47 +00:00 by coilyco-ops · 1 comment
Member

Outcome

Export verified bundles reproducibly and make logical content changes visible
through the normal diff command.

Parent: #114
Run contract: #115

Deterministic export

agent-compose bundle export <bundle-dir> --out <file>.tar.gz:

  • verifies the bundle before writing
  • writes sorted safe relative paths
  • normalizes timestamps and archive metadata
  • includes the verified manifest
  • rejects traversal, symlink escape, and files outside the bundle root
  • produces byte-identical output for identical verified input

Content-aware diff

agent-compose diff reports both resolver-decision changes and logical content
changes by stable source id and digest.

Role skill, invariant, evaluation asset, copy contract, personality definition,
and compact identity metadata changes appear by default. The user does not need
a separate prose flag.

Dependencies

  • #110 supplies authored asset digests.
  • #111 supplies logical provenance.
  • #121 supplies role-skill and identity-card content.

Acceptance

  • Cross-platform fixtures prove reproducible export and safe archive names.
  • Verification failure prevents archive creation.
  • Tests cover traversal, symlinks, outside-root files, prose-only changes, and
    identity-metadata-only changes.
  • Documentation specifies archive and diff semantics.
  • ward exec test and ward exec smoke pass.
  • The implementation lands on canonical main and closes this issue.
## Outcome Export verified bundles reproducibly and make logical content changes visible through the normal diff command. Parent: #114 Run contract: #115 ## Deterministic export `agent-compose bundle export <bundle-dir> --out <file>.tar.gz`: * verifies the bundle before writing * writes sorted safe relative paths * normalizes timestamps and archive metadata * includes the verified manifest * rejects traversal, symlink escape, and files outside the bundle root * produces byte-identical output for identical verified input ## Content-aware diff `agent-compose diff` reports both resolver-decision changes and logical content changes by stable source id and digest. Role skill, invariant, evaluation asset, copy contract, personality definition, and compact identity metadata changes appear by default. The user does not need a separate prose flag. ## Dependencies * #110 supplies authored asset digests. * #111 supplies logical provenance. * #121 supplies role-skill and identity-card content. ## Acceptance * Cross-platform fixtures prove reproducible export and safe archive names. * Verification failure prevents archive creation. * Tests cover traversal, symlinks, outside-root files, prose-only changes, and identity-metadata-only changes. * Documentation specifies archive and diff semantics. * `ward exec test` and `ward exec smoke` pass. * The implementation lands on canonical `main` and closes this issue.
Author
Member

Landed on canonical main in daa9996. Bundle export verifies before opening output, writes sorted portable paths with normalized gzip and tar metadata, includes the manifest, rejects invalid and symlinked trees, and produces byte-identical archives. Bundle manifests now record effective logical content IDs and SHA-256 digests for role skill, invariant, personalities, evaluation assets, copy contract, and compact identity. diff reports those changes plus artifact changes by default. Reproducibility, failure-without-output, symlink, prose-only, and identity-only tests pass. ward exec test and ward exec smoke passed.

Landed on canonical main in daa9996. Bundle export verifies before opening output, writes sorted portable paths with normalized gzip and tar metadata, includes the manifest, rejects invalid and symlinked trees, and produces byte-identical archives. Bundle manifests now record effective logical content IDs and SHA-256 digests for role skill, invariant, personalities, evaluation assets, copy contract, and compact identity. diff reports those changes plus artifact changes by default. Reproducibility, failure-without-output, symlink, prose-only, and identity-only tests pass. ward exec test and ward exec smoke passed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agent-compose#127
No description provided.