Skip to content

update-shape.py rewrite_shape_pin and rewrite_manifest find files: and shape: only as the whole line, so a trailing comment on either, which the reader and both validators accept, is refused as update-pin-unrecognised ("0 files line(s)") or update-manifest-no-shape ("has no shape: block", "add it") after check has sent the person to apply #437

Closed

Description

@brettheap

Lane: openreposhape-3 (openRepoShape-3)

What happens. #380 made the commit: and tree_sha256: rewrites keep each line's indentation and trailing comment. The block headers are still matched as line.rstrip() == "files:" and line.rstrip() == "shape:".

Measured on main 45e01f4. Each case changes one line in a freshly scaffolded project and commits it. The upstream then moves scripts/validate-manifest.py (B).

contracts/shape-pin.yaml:  `files:`  ->  `files:  # one row per copied file`
validate-pins.py   exit 0 (pins ok)      validate-manifest.py   exit 0
check --at <B>     exit 1   upstream-changed scripts/validate-manifest.py   NEXT ... apply ... --branch shape/update-<B>
apply --at <B> --yes --branch shape/b                                          exit 2
    copied   scripts/validate-manifest.py
  REFUSED update-pin-unrecognised: contracts/shape-pin.yaml has 0 `files` line(s) where exactly one was expected, so this tool will not rewrite it
      restored  scripts/validate-manifest.py
  Remediation: the pin was hand-edited into a shape this tool does not recognise. Fix it by hand this once, or re-scaffold.

project.yaml:  `shape:`  ->  `shape:  # mirrors contracts/shape-pin.yaml`
validate-pins.py   exit 0                validate-manifest.py   exit 0 (manifest ok: Atlas (atlas), 3 legs)
check --at <B>     exit 1   (the same NEXT)
apply --at <B> --yes --branch shape/b                                          exit 2
  REFUSED update-manifest-no-shape: project.yaml has no `shape:` block, so there is nothing to mirror the pin into
      restored  scripts/validate-manifest.py
      restored  contracts/shape-pin.yaml
  Remediation: `validate-manifest.py` requires one; add it, or re-scaffold.

Control: the scaffold's own layout gives apply exit 0 with a commit. Both refusals roll back, so the tree is clean afterwards.

Where. update-shape.py on 45e01f4:

  • rewrite_shape_pin (:943), which matches files: exactly at :979, with the count refusal at :990;
  • _shape_block_bounds (:1088), which matches shape: exactly at :1103, with the refusal at :1108.

A family holder's family.yaml shape: block goes through the same function (not measured).

Why it matters. check sends the person to an apply that refuses a file its own reader accepts. The manifest refusal is also false: the manifest does have a shape: block. Its remedy, "add it", would give the manifest a second shape: key. The pin's remedy sends the person to hand-edit the pin, although nothing in it is wrong.

Direction: find each header the way #380 finds a scalar line's comment (_strip_comment), keep the header's comment, and let the existing read-back (rewrite_fault) judge the result.

Keep:

Source.

Related: #323 (closed by #380), #208 (closed), and #48 (closed; the same refusal's validator name on a family root).

Activity

  1. brettheap commented on Oct 12, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session 43f4ac63-0116-41de-977d-afc23cdf7fdf@Eagle, 2026-10-12T17:57:32Z, for #437

    Logged in lanes/log/openRepoShape-3.md at 6c54f68106a0c4b66edff948b10a1a0958c3c228.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#437:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#437"`, kept where the row or its body names `#437`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `437` as a whole token:
       none
    
  2. brettheap commented on Oct 12, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoShape-3, session 43f4ac63-0116-41de-977d-afc23cdf7fdf@Eagle, 2026-10-12T19:30:42Z, for #437

  3. added this to the v1.1.0 milestone on Oct 14, 2026
  4. brettheap commented on Oct 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-14T16:50:12Z, for #437

    Logged in lanes/log/openRepoShape-4.md at 2c1f8cbdcff4f43fe16523ed90934b97368743d0.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#437:
    6:CLAIMED — lane openRepoShape-3, session 43f4ac63-0116-41de-977d-afc23cdf7fdf@Eagle, 2026-10-12T17:57:32Z, for opensoft/openRepoShape#437
    13:1. existing `CLAIMED —` comments on opensoft/openRepoShape#437:
    26:RELEASED — lane openRepoShape-3, session 43f4ac63-0116-41de-977d-afc23cdf7fdf@Eagle, 2026-10-12T19:30:42Z, for opensoft/openRepoShape#437
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#437"`, kept where the row or its body names `#437`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `437` 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