feat: add durable git snapshot history#98
Conversation
|
Codex review: needs changes before merge. Reviewed June 19, 2026, 8:00 AM ET / 12:00 UTC. Summary Reproducibility: yes. by source inspection: Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Land the feature after fixing historical manifest enrichment for Do we have a high-confidence way to reproduce the issue? Yes by source inspection: Is this the best way to solve the issue? No; the implementation is close, but historical imports should enrich from the original repo and resolved commit, or store an already-enriched manifest state. The release-owned changelog entries should also move to PR metadata unless a release owner explicitly wants them landed. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 5857f2736f21. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28261ac667
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| historicalOpts.RepoPath = tempDir | ||
| historicalOpts.Remote = "" | ||
| historicalOpts.Tag = "" | ||
| return Import(ctx, s, historicalOpts) |
There was a problem hiding this comment.
Preserve git fingerprints for historical imports
When --ref targets a legacy snapshot that lacks file_manifests, this passes a temporary directory that is not a Git repo into Import. Import then calls enrichManifestFromGit against that temp dir, so it cannot add the git: blob fingerprints before MarkImported stores the manifest; the next normal update sees missing fingerprints and replaces every snapshot table instead of using the changed-tail incremental plan, defeating the documented Git-object fallback for large legacy archives. Enrich from the original repo/commit before importing or store the enriched manifest state.
Useful? React with 👍 / 👎.
28261ac to
16414d0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16414d0d8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err := mirror.Fetch(ctx, mirrorOptions(opts)); err != nil { | ||
| return Manifest{}, err |
There was a problem hiding this comment.
Try local historical refs before fetching
When update --ref names a tag or commit that is already present in the local share repo, this unconditional fetch makes the restore depend on origin/network availability before ReadFileAt can read the local object. In an offline or temporarily unreachable-origin environment, restoring a previously fetched durable snapshot tag fails even though the required Git objects are local and the checkout does not need to move. Consider resolving/reading the local ref first, or tolerating fetch failure when the requested ref exists locally.
Useful? React with 👍 / 👎.
|
Landed in Proof: full Go tests, race tests, vet, staticcheck, deadcode, gofumpt, gosec, and autoreview passed locally. GitHub test, lint, deps, Docker, release-check, CodeQL, and secret scans all passed before merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26a9eb17cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| createdTag, err := share.CreateImmutableTag(r.ctx, opts) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
Preflight tag collisions before committing
When publish --tag reuses a local or fetched remote tag that points to a different commit, this is the first check that rejects the collision, but Export and Commit have already created a new snapshot commit. The command then fails while leaving an untagged local archive commit behind, which a later publish/push can send to the branch without the requested immutable tag; check the existing tag target before mutating or committing the snapshot.
Useful? React with 👍 / 👎.
Summary
publish --tagsnapshots and non-mutatingupdate --refhistorical restoresProof
go test ./...go test -race ./...go vet ./...