Skip to content

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

Closed

Description

@brettheap

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. plan records it and execute writes it under revision_kind: commit, though the pin file says "A COMMIT, NEVER A TAG"; validate-pins.py passes it because ls-tree peels the tag. Where: declared_pin_values and COMMIT_RE (scripts/shape_materialize.py, scripts/repo_shape.py). On 396c0ff, read: no type check in declared_pin_values. Read again on 7ba64f0: unchanged. The line measured it on d158a21 and main f6eaab7; the scaffold's --pin was not run. (source)

Rides along (backlog; tick it here if the same change covers it)

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. plan records it and execute writes it under revision_kind: commit, though the file says "A COMMIT, NEVER A TAG"; validate-pins.py passes it because ls-tree peels the tag, as bump-leg.py has since #534/#561. Measured on d158a21 and main f6eaab7 (repro kept by lane 1); the scaffold's --pin was not run. (Found in #589's review.)

— #457, comment

[L1-04] git config --local in 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.)

— #457, comment

[L1-05] Optional nits on #589 at 006caf4: _a_partial_clone writes "config" beside the GIT_CONFIG constant (adopt-project.py:574); the comment at :541 says every sentence naming a relative clone says where it is read, which check's write contracts/<product>-pin.yaml line does not; no test covers "read from this directory". (Found in #589's review.)

— #457, comment

[L1-06] A hand-edited pins: entry whose file is the shape's pin (product: Shape, already plan-pin-collides), with contracts/shape-pin.yaml kept, makes check print plan-root-holds-pin twice for one kept file; _pin_files could dedupe. Main does the same for two colliding declared pins. Measured on 17dd55c (repro kept by lane 1). (Found in #581's review.)

— #457, comment

[L1-07] Keeping both contracts/shape-pin.yaml and shape/contracts/shape-pin.yaml gives two findings for one cause (#262's plan-root-blocks-shape-copy, which main gives alone, plus plan-root-holds-pin), because SHAPE_PIN is one of assembly_root_paths(). Measured on 17dd55c. (Found in #581's review.)

— #457, comment

[L1-63] The docstring of test_a_path_kept_at_the_shapes_pin_is_found_and_refused_before_any_leg says "place finds it there", which is not true of the case-twin row on Linux. A nit. At 17dd55c. (Found in #581's review.)

— #457, comment

Activity

  1. added this to the v1.1.0 milestone on Oct 16, 2026
  2. brettheap commented on Oct 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-16T11:38:18Z, for #651

    Logged in lanes/log/openRepoShape-1.md at 2ae5fe60e5c552bf503c49e9c27b36ea24925819.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#651:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#651"`, kept where the row or its body names `#651`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `651` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions