Repository navigation
adopt-project.py and scaffold-project.py: a --pin naming an annotated tag's object id is written as the pin's commit:, under the pin file's "A COMMIT, NEVER A TAG" #651
Description
Lane: openreposhape-1 (openRepoShape-1)
plan and the scaffold should refuse an annotated tag's own object id as a pin's commit, or peel it to the commit it names, as bump-leg.py has since #534/#561. A committed pin then keeps its own file's promise, "A COMMIT, NEVER A TAG". The riders in the same pin block ride with it.
From lane 1's triage of 2026-10-15, D1, approved by Brett Heap at 2026-10-16T11:21:17Z ("Approve all (Recommended)"). One pull request covers the lines below.
Parent: #457. Milestone: v1.1.0.
Lands after: nothing. No open PR edits adopt-project.py's pin block (lines 250-860 on 396c0ff).
Effort: M. Platform: all.
Lane openRepoShape-1 claims it at filing; see its CLAIMED comment.
Why this is P2. git rev-parse v1.2 prints an annotated tag's own id, so the mistake is plausible, and nothing asks about it. declared_pin_values, in scripts/shape_materialize.py and shared by both tools, reads the digest through ls-tree, which peels the tag. COMMIT_RE takes any 40 hex. The committed pin then breaks its own file's promise, and only bump-leg.py peels such an id (#534/#561).
The fix. Ask cat-file -t in the --pin-source clone, and peel the id or refuse it. On the gh path, ask the forge. #589's recheck in check asks the same of the recorded clone.
Lines
- L1-01 (P2): a pin's
commit:can be an annotated tag's own object id.planrecords it andexecutewrites it underrevision_kind: commit, though the pin file says "A COMMIT, NEVER A TAG";validate-pins.pypasses it becausels-treepeels the tag. Where:declared_pin_valuesandCOMMIT_RE(scripts/shape_materialize.py, scripts/repo_shape.py). On 396c0ff, read: no type check indeclared_pin_values. Read again on 7ba64f0: unchanged. The line measured it on d158a21 and main f6eaab7; the scaffold's--pinwas not run. (source)
Rides along (backlog; tick it here if the same change covers it)
- L1-04:
git config --localin a non-repository directory inside a partial-clone repository reads the parent's config, so a non-clone there gets the partial-clone NOTE, not the unreadable finding (the safe side). Where:_a_partial_clone(adopt-project.py). Fix: ask whether the path is the clone's top level before reading its config. On 396c0ff, read:git config --localin the path. Read again on 7ba64f0: unchanged. (source) - L1-05: optional nits on adopt-project.py:
checkrecomputes each pin's digest at the plan's commit in the cloneplanread it from, where that clone is still on the machine and is no partial clone, so a commit or a digest edited into the plan no longer checks ok and reaches the root asadoption verifiedover a redvalidate-pins.py(#449) #589 at 006caf4._a_partial_clonewrites the literal"config"beside theGIT_CONFIGconstant. One comment says every sentence naming a relative clone says where it is read, whichcheck'swrite contracts/<product>-pin.yamlline does not. No test covers "read from this directory". On 396c0ff, read: the literal"config"at :682. Read again on 7ba64f0: the literal is still there. (source) - L1-06: a hand-edited
pins:entry whose file is the shape's pin (product: Shape, alreadyplan-pin-collides), withcontracts/shape-pin.yamlkept, makescheckprintplan-root-holds-pintwice for one kept file. Where:_pin_files. Fix: dedupe by path. On 396c0ff, read:_pin_filesdedupes by product. Read again on 7ba64f0: unchanged. The line measured it on 17dd55c. (source) - L1-07: keeping both
contracts/shape-pin.yamlandshape/contracts/shape-pin.yamlgives two findings for one cause (adopt-project.pycheckpasses a plan that keeps the source's ownshape/in the root, andplace()then writes the shape's collision copy onto it after both legs are pushed: a realshape/README.mdis overwritten whileexecuteprints "nothing was overwritten" and endsadopt-lost, and ashape/Makefile/directory or a file namedshapeis a traceback #262'splan-root-blocks-shape-copy, which main gives alone, plusplan-root-holds-pin), becauseSHAPE_PINis one ofassembly_root_paths(). Fix: one finding for one cause. Not re-checked since the line measured it on 17dd55c. (source) - L1-63: the docstring of
test_a_path_kept_at_the_shapes_pin_is_found_and_refused_before_any_legsays "placefinds it there", which is not true of the case-twin row on Linux. A nit, at 17dd55c. On 396c0ff, read: test file :123. (source)
Each line above is a line of #457's checklist comment (issuecomment-6200110061). Tick it there too when this closes.
The lines as written on the tracking issue
[L1-01] A pin's
commit:can be an annotated tag's own object id.planrecords it andexecutewrites it underrevision_kind: commit, though the file says "A COMMIT, NEVER A TAG";validate-pins.pypasses it becausels-treepeels the tag, asbump-leg.pyhas since #534/#561. Measured on d158a21 and main f6eaab7 (repro kept by lane 1); the scaffold's--pinwas not run. (Found in #589's review.)
[L1-04]
git config --localin a non-repository directory inside a partial-clone repository reads the parent's config, so a non-clone there gets the partial-clone NOTE, not the unreadable finding (safe side). Seen on 006caf4. (Found in #589's review.)
[L1-05] Optional nits on #589 at 006caf4:
_a_partial_clonewrites"config"beside theGIT_CONFIGconstant (adopt-project.py:574); the comment at :541 says every sentence naming a relative clone says where it is read, whichcheck'swrite contracts/<product>-pin.yamlline does not; no test covers "read from this directory". (Found in #589's review.)
[L1-06] A hand-edited
pins:entry whose file is the shape's pin (product: Shape, alreadyplan-pin-collides), withcontracts/shape-pin.yamlkept, makescheckprintplan-root-holds-pintwice for one kept file;_pin_filescould dedupe. Main does the same for two colliding declared pins. Measured on 17dd55c (repro kept by lane 1). (Found in #581's review.)
[L1-07] Keeping both
contracts/shape-pin.yamlandshape/contracts/shape-pin.yamlgives two findings for one cause (#262'splan-root-blocks-shape-copy, which main gives alone, plusplan-root-holds-pin), becauseSHAPE_PINis one ofassembly_root_paths(). Measured on 17dd55c. (Found in #581's review.)
[L1-63] The docstring of
test_a_path_kept_at_the_shapes_pin_is_found_and_refused_before_any_legsays "placefinds it there", which is not true of the case-twin row on Linux. A nit. At 17dd55c. (Found in #581's review.)
Activity
brettheap commentedon Oct 16, 2026
CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-16T11:38:18Z, for #651
Logged in
lanes/log/openRepoShape-1.mdat2ae5fe60e5c552bf503c49e9c27b36ea24925819.The three reads (lane-collision-protocol Rule 1):
tests/test_scaffold_leg_path_collisions.py, test_scaffold_pin_collisi…
scripts/shape_materialize.py and adopt-project.py: a `--pin-source` t…
shape_materialize.py, adopt-project.py and bump-leg.py: a tag a clone…