Skip to content

scaffold-project.py and adopt-project.py: the two tools spell a neutral_product_pins: entry differently, so 0x1F, 1_000, 1e3, 3dGlass and -x are bare from the scaffold and double-quoted from adopt #924

Closed

Description

@brettheap

Goal: one spelling for a neutral_product_pins: entry, made by one function in scripts/shape_materialize.py that both tools call, so the same --pin writes the same line whichever tool made the root.

Filed by lane openRepoShape-3, from its triage of #459 at the v1.1.1 release commit 5017830. It is #459's line U034 (L2-15, which pairs with L2-14 on #457), one pull request's worth.

Two spellings of one entry (U034)

State. scaffold-project.py:1806-1826 (_neutral_pin_entry) writes the product bare wherever the project's own reader reads that line back as the product, and double-quotes it otherwise. adopt-project.py:13393-13405 (_neutral_pin_entry) writes y's plain-scalar spelling, and double-quotes where the reader does not read that back. PR #570 (#540) left this out: "Not covered here: L2-15 ... stays on #459".

What happens. A project that pins a product whose name begins with a digit or - gets a bare entry from the scaffold and a quoted one from adopt. Measured at 5017830 by loading both functions:

product   scaffold   adopt
0x1F      0x1F       "0x1F"
1_000     1_000      "1_000"
1e3       1e3        "1e3"
3dGlass   3dGlass    "3dGlass"
-x        -x         "-x"

openGlass, 007 and yes come out the same from both. The project's own reader reads every one back, and no gate fails. A standard YAML reader (PyYAML safe_load) misreads the scaffold's 0x1F as 31 and 1_000 as 1000; lane 2 counted 7,381 of the scaffold's spellings misread that way against 967 of adopt's, out of 377,891 admitted names.

Evidence. The lines and the probe above; #459's L2-15; PR #570's body.

Direction. Move adopt's rule (y's spelling, kept only where the reader reads it back) into scripts/shape_materialize.py, and call it from both tools. shape_materialize.py is not a pinned copy, so no project re-pins. Add a test that renders one list through both tools and compares the lines. This would also close L2-14 on #457.

Size: M.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. added this to the v1.2.0 milestone on Oct 18, 2026
  2. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T19:55:52Z, for #924

    Logged in lanes/log/openRepoShape-3.md at b698dca2dc61f4934b193766460136145dc9d14e.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#924:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#924"`, kept where the row or its body names `#924`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `924` 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