Repository navigation
Closed
Milestone
Description
Goal: every ^...$ pattern that reads a value from a file with .match refuses a value that ends in a line feed, as #1126 (#1017) makes COMMIT_RE, SHA256_RE and COMMIT_40 do.
State
- What repo_shape.py and bootstrap.py:
COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126 does and does not cover. repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126 changes onlyCOMMIT_REandSHA256_RE(scripts/repo_shape.py) andCOMMIT_40(templates/assembly-root/scripts/bootstrap.py) to end in\Z.- Its body's "Not changed" list names the other patterns with the same
$property. - rv1126, lane 5's independent reviewer, measured each of them on main
4ed7c7bf(repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126 issuecomment-6321042701).
- Its body's "Not changed" list names the other patterns with the same
- Why a line feed passes. In Python,
$also matches just before a trailing line feed, so.matchtakes"<value>\n". A YAML double-quoted"...\n"or a block scalar reads as the value plus a line feed. - When it lands. Under Brett Heap's ruling of 2026-10-21T10:32:04Z ("leave the follow-ups out of v1.2.0"), this lands after the v1.2.0 tag.
What happens
All of these were measured on main 4ed7c7bf by rv1126.
PROJECT_ID_RE:validate-family.pywithid: "inkrouter\n"givesfamily ok, exit 0.validate-manifest.pywithid: "atlas\n"gives onlyFINDING manifest-topic(expected 'xf-project-atlas\n'), exit 1. That is a finding about the topic, not the id.- The scaffold and
family.py initrefuse it later, throughchecked_value. - Not measured end to end:
adopt-project.py's--idand the plan'sid:.
DATE_RE:validate-manifest.pywithelected_on: "2026-09-02\n"givesmanifest ok, exit 0.validate-family.pywithcreated_on: "2026-09-04\n"givesfamily ok, exit 0.shape_materialize.py --elected-onandshape_advisory.pyrefuse it later, throughdate.fromisoformat(election-date-malformed).
QUALIFIED_RE:validate-manifest.pywith a leg'srepository: "testorg/Atlas\n"givesmanifest ok, exit 0.validate-family.pywith a member'srepository: "InkRouter/IRRS\n"givesFINDING member-repository-name("whose name is 'IRRS\n'"), exit 1.
REPOSITORY_RE(update-shape.py):- It takes the line feed.
- The next line,
checked_value("--upstream", ...), refuses the value asunsafe-value. - That message names
--upstreameven when the value came from the shape pin'ssource_repository:.
- Not affected:
PIN_ARG_RE:--pinis stripped first, andadopt-project.pybuildsrepository@commitfrom a commitCOMMIT_REhas already checked.NAME_RE,REF_REandPATH_REinsetup-project.py: they read argv only, andCONTROL_REandfullmatchrefuse the line feed first.
Direction
- End
PROJECT_ID_RE,DATE_REandQUALIFIED_REin\Z, or read them withfullmatch, wherever the validators define or copy them, as repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126 does for its three. - For
REPOSITORY_RE, refuse a pin'ssource_repository:that ends in a line feed with words that name the pin, not--upstream. - Add one row for each pattern and tool, each failing on main.
Verify
- Each value that ends in a line feed is refused, by name. Values without one are unchanged.
- No refusal code changes. If the pin's
source_repository:needs a new code, updateAGENTS.md's table, andtests/test_agents_md_codes.pymust pass. tests/test_pinned_copy_text.pypasses: the validators are pinned copies undertemplates/assembly-root/scripts/.
Found by lane 5's independent review of #1126 (#1017), rv1126 (#1126 issuecomment-6321042701).
Milestone: none; it lands after the v1.2.0 tag (Brett Heap's 10:32:04Z ruling).
Lane: openreposhape-5 (openRepoShape-5)
Metadata
Metadata
Assignees
Labels
No labels
Activity
brettheap commentedon Oct 22, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-22T12:10:17Z, for #1139
Logged in
lanes/log/openRepoShape-5.mdat317e9bf918de09f9cf3571fe43cb96bb9d2ff285. The register push raced, so this comment is posted by hand at 2026-10-22T12:19:11Z, after the line was read back from origin.The three reads (lane-collision-protocol Rule 1):
repo_shape.py and bootstrap.py: `COMMIT_RE`, `SHA256_RE` and `COMMIT_…
tests/test_value_pattern_line_break.py: `ID_READERS` gives `adopt-pro…
validate-family.py: a member row's `id:` that is no project id is `me…
scripts/repo_shape.py: `NamingPolicy` reads a name with `fullmatch` a…
family.py: the dry runs' `member-duplicate-id` remedies and `init`'s …