feat(manifest): export digest-bound contribution evidence - #118
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Contribution preparation could export evidence and readiness separately, but it had no stable artifact tying those claims to the exact candidate workspace. A validation at the same Git HEAD could remain apparently current after staged, unstaged, untracked, ignored, or submodule state changed.
This adds an in-toto Statement v1 envelope around a product-owned contribution evidence predicate. The manifest binds repository and opportunity identity, a bounded managed-workspace snapshot, selected validation execution contracts, evidence freshness, readiness, exact stored pull-request facets, and prepared-draft references. Missing, stale, unparseable, truncated, or incompatible inputs remain explicit gaps instead of becoming passing claims.
Workspace snapshots cover HEAD, staged and unstaged binary patches, bounded untracked content, submodules, changed files, and commit summaries. Ignored or otherwise unbound content makes the snapshot incomplete. Candidate validation runs save pre/post snapshot digests; manifest completeness uses the newest run per definition and run kind while retaining older runs as history.
Manifest generation is local-only. It reads SQLite, may run non-mutating Git commands for a selected managed workspace, persists the digest-validated statement, and never refreshes GitHub. CLI and MCP callers must explicitly sync exact PR facets first when current checks or reviews matter. Drafts store an optional manifest ID as structured metadata without copying its claims into public prose.
Closes #113.
Suggested review order
internal/workspace/snapshot.goand validation binding ininternal/app/evidence.go.internal/manifest/models.go, the migration, and corpus persistence.internal/app/manifest.gofor completeness, freshness, and identity rules.The branch is split into four semantic commits: snapshot binding, manifest core/persistence, transport/documentation wiring, and adapter extraction.
Testing
make verifymake test-raceCompatibility and scope
Existing corpora require the explicit backed-up migration flow. No GitHub mutation or hidden network access is added.