feat(corpus): separate lifecycle ownership and recovery#86
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Separates binary installation, corpus migration, derived projections, and corpus content scope into explicit lifecycles.
The original failure looked like setup initialization, but it was an existing 226 MiB corpus running historical migrations and a size-independent integrity check. This change removes those hidden ownership transfers:
corpus inspect,backup,migrate,restore,list,inventory,prune-code,remove-repository, andprojectionsexpose explicit storage operations;doctorreports a diagnostic timeout as inconclusive rather than corruption.This is a hard cutover for the unreleased storage design. Migrations 001-028 are replaced by one canonical
001_initial.sqlbaseline that directly creates the current schema. Pre-cutover development corpora are intentionally unsupported and must be recreated. Future schema changes append migrations from this baseline. This also removes the expensive migration-024 backfill path rather than preserving or optimizing an unused compatibility route.Closes #76
Closes #77
Closes #78
Closes #79
Closes #80
Closes #81
Closes #82
Closes #83
Closes #84
Closes #85
Protected invariants
Suggested review order
internal/corpus/lifecycle.go,lock.go, andschema_inspect.gofor authority, backup/restore, and WAL safety.internal/corpus/migrations/001_initial.sqlfor the canonical baseline andprojections.gofor derived-state ownership.internal/app/upgrade.go,runtime_contract.go, andcmd/gitcontribute/main.gofor pre-activation validation.internal/app/corpus_lifecycle.goand the CLI adapters for public behavior.Testing Done
go test -buildvcs=false ./...CGO_ENABLED=0 go test -buildvcs=false ./...go vet ./...GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -buildvcs=false ./...go test -race -buildvcs=false ./internal/corpus ./internal/appFresh baseline schema objects, columns, indexes, triggers, and projection seed rows were compared with a fresh database produced by the former migration chain.
go test ./...passesgolangci-lint run ./...passesgo test -race ./internal/app ./internal/corpuspassesChecklist
gofmtapplied to changed Go files