Goal
Implement the first owner-approved half of the F14.6 provenance split: an immutable, versioned GitSourceSnapshot that represents only canonical Git state observed by a source adapter.
Parent: #46. Decision: #46 (comment)
This child does not complete F14.6 or E14.
Required contract
- Bind one validated workspace and one stable affected resource to exactly one canonical source identity and repository.
- Record one configured non-symbolic base ref, its exact resolved commit object ID, one bounded repository-relative path, the exact observed blob object ID, and exact bounded current UTF-8 bytes without normalization.
- Bind an observed-at time, a short valid-until time, and a unique bounded set of stable evidence references.
- Keep all validated snapshot fields private after construction and defensively copy mutable resource references and slices.
- Provide a pure trusted-time freshness check that distinguishes future, stale, and currently valid observations.
- Preserve deterministic evidence ordering.
Separation and authority boundary
DesiredChange is a later, separately reviewed transformer and renderer contract. It will bind a snapshot version, evidence, and output, but it is not part of this child.
The snapshot contains no desired bytes, PR title/body, commit message, handler contract, actor, role, server intent ID, policy decision, approval, credential, endpoint, token, signature, persistence, dispatch, mutation, or execution state. It performs no I/O.
R2 and R4 remain advisory-only. This child does not consume a Brain verdict or remediation candidate and does not change the existing resolver or runtime behavior.
Adversarial acceptance criteria
- Reject zero or multiple sources, cross-repository source identity, invalid workspace or subject identity, and missing or duplicate evidence.
- Reject symbolic, full, option-shaped, and object-ID-shaped refs; malformed commits and blobs; unsafe or noncanonical paths; invalid UTF-8, NUL-containing, or oversized content.
- Reject zero, reversed, or overlong validity intervals.
- Classify future and stale snapshots only against a supplied trusted clock and fail closed on a zero clock.
- Prove caller-input and result mutation cannot alter a constructed snapshot.
- Lock the exact public and private field shapes and keep the remediation package free of I/O, policy, persistence, authorizing, and runtime imports.
- Add focused race tests and keep full CI, isolation, release reproducibility, and real two-cluster gates green.
Explicit exclusions
No DesiredChange, Brain resolver wiring, endpoint, database migration, PEP proposal, approval, credential, token, remote Git read/write, HTTP request, PR creation, connector execution, KMS, signature, dispatch, shell, filesystem access, cluster mutation, or production behavior.
Security and cost
The contract is pure and offline. It introduces no credential, cloud resource, API call, egress, storage, telemetry cardinality, or recurring cost. A later live adapter separately owns least-privilege contents-read credentials, API rate limits, egress, and remote-state freshness.
Primary sources
Goal
Implement the first owner-approved half of the F14.6 provenance split: an immutable, versioned
GitSourceSnapshotthat represents only canonical Git state observed by a source adapter.Parent: #46. Decision: #46 (comment)
This child does not complete F14.6 or E14.
Required contract
Separation and authority boundary
DesiredChangeis a later, separately reviewed transformer and renderer contract. It will bind a snapshot version, evidence, and output, but it is not part of this child.The snapshot contains no desired bytes, PR title/body, commit message, handler contract, actor, role, server intent ID, policy decision, approval, credential, endpoint, token, signature, persistence, dispatch, mutation, or execution state. It performs no I/O.
R2 and R4 remain advisory-only. This child does not consume a Brain verdict or remediation candidate and does not change the existing resolver or runtime behavior.
Adversarial acceptance criteria
Explicit exclusions
No
DesiredChange, Brain resolver wiring, endpoint, database migration, PEP proposal, approval, credential, token, remote Git read/write, HTTP request, PR creation, connector execution, KMS, signature, dispatch, shell, filesystem access, cluster mutation, or production behavior.Security and cost
The contract is pure and offline. It introduces no credential, cloud resource, API call, egress, storage, telemetry cardinality, or recurring cost. A later live adapter separately owns least-privilege contents-read credentials, API rate limits, egress, and remote-state freshness.
Primary sources