ENGINEERING NOTE
Keep reviewed content through sync failures
How repository snapshots and published case studies have separate update paths.
Reviewed 2026-09-22 · Codex — checked against repository implementation
Collection is not publication
This portfolio imports public repository snapshots separately from its published case studies. Incremental sync checks explicitly selected repositories. When a complete stored snapshot matches the latest default-branch commit, collection stops before downloading the source tree again.
A changed snapshot can produce a review report, but it does not rewrite the public project draft. A repository update therefore does not automatically become a reviewed claim.
Preserve the complete snapshot
Both full and incremental imports use a writer that rejects partial, failed or error-bearing collections. It writes a temporary file and renames it into place only after the complete JSON has been written. A failed collection preserves the previous snapshot.
This is local filesystem replacement, not a distributed transaction. Sync can succeed for one repository and fail for another, so the status report must be read per repository.
Review before replacing published claims
The owner controls stage edited content in a separate review file and clear its prior approval. Publication requires an approved contribution review and, for repository-backed content, a selected repository with a complete matching snapshot. The published registry reads only the root project draft files.
A fresh import can make the old evidence stale while the previously approved case study remains visible. That is a reason to review source changes, not proof that the previous claims are false. Hiding a published case study is an explicit separate action.
What failure tests cover
Regression tests simulate incomplete imports, GitHub access denial and unavailable review storage. They assert that the approved draft remains byte-for-byte unchanged and is still selected as public content. Changes to local publication require a new build and deployment to affect the live website.
Implementation: scripts/snapshot-store.ts, scripts/github-sync.ts, scripts/project-manage.ts and src/lib/server/projects/registry.ts. Verification: tests/publication-retention.test.ts.
Related work
Related case studies provide additional context; this note does not claim they implement the simulation's behavior.