Skip to content

fix(repository): recognize the docket branch by its shape in the everyday repository commands - #440

Merged
danielhanold merged 5 commits into
mainfrom
fix/stop-repository-prepare-re-walking-all-of-main-s-history-to
Oct 20, 2026
Merged

danielhanold merged 5 commits into
mainfrom
fix/stop-repository-prepare-re-walking-all-of-main-s-history-to

Conversation

@danielhanold

@danielhanold danielhanold commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0574 — Recognize the docket branch by its shape in the everyday repository commands

Summary

repository prepare, check, repair, configure-tests, and configure-harnesses now decide metadata-branch ownership with two structural checks:

  • the branch has exactly one parentless root (verifyMetadataShape);
  • it shares no history with the integration branch.

They no longer walk all of main's history looking for a legacy seed snapshot. repository init and repository migrate keep the full content proof (verifyMetadataOwnership), unchanged. migrateRoute now takes the ownership check as a parameter: migrate passes the full verifier and repair passes the quick one. The metadata-root-foreign finding is reworded in plain words, defined once and shared by prepare and check. ADR-0157 records the decision.

On this repository: prepare went from 68.7s to 3.1s, check takes 4.0s, and the repair preview takes 3.7s. All three report healthy.

Tests

  • New shape-check table tests, plus everyday-command tests on a receiptless nonempty root: prepare, check, configure-tests, and repair accept it, and migrate still refuses it.
  • New structural-foreign tests (two roots, shared history) for prepare, check, and repair.
  • A migrate-preview leg in the Bash-upgrade ownership test keeps the real Bash-made fixtures on the full proof.
  • Every structural check and every wiring choice was mutation-tested.

Review (deep tier)

Finding Severity Disposition
Real Bash-made fixtures no longer exercised the full content proof once prepare and check stopped running it minor fixed (7d83a4d)

… saved Bash-made docket branch

repository prepare and check now decide ownership with the quick structural
check, so the Bash upgrade ownership test no longer exercised the full proof
(seed receipts and content equivalence) against the real Bash-made shapes.
Add a leg that runs the unauthorized repository migrate preview, which routes
through the full proof, and require its no-op on each saved case. The doc
comment now says which check each command runs.
@danielhanold
danielhanold merged commit 3f197de into main Oct 20, 2026
1 check passed
@danielhanold
danielhanold deleted the fix/stop-repository-prepare-re-walking-all-of-main-s-history-to branch October 20, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant