Skip to content

validate-manifest.py and validate-family.py: PROJECT_ID_RE, DATE_RE and QUALIFIED_RE end in $, so an id:, a date or a repository: that ends in a line break passes as well formed (#1126 follow-up) #1139

Closed

Description

@brettheap

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 happens

All of these were measured on main 4ed7c7bf by rv1126.

  • PROJECT_ID_RE:
    • validate-family.py with id: "inkrouter\n" gives family ok, exit 0.
    • validate-manifest.py with id: "atlas\n" gives only FINDING manifest-topic (expected 'xf-project-atlas\n'), exit 1. That is a finding about the topic, not the id.
    • The scaffold and family.py init refuse it later, through checked_value.
    • Not measured end to end: adopt-project.py's --id and the plan's id:.
  • DATE_RE:
    • validate-manifest.py with elected_on: "2026-09-02\n" gives manifest ok, exit 0.
    • validate-family.py with created_on: "2026-09-04\n" gives family ok, exit 0.
    • shape_materialize.py --elected-on and shape_advisory.py refuse it later, through date.fromisoformat (election-date-malformed).
  • QUALIFIED_RE:
    • validate-manifest.py with a leg's repository: "testorg/Atlas\n" gives manifest ok, exit 0.
    • validate-family.py with a member's repository: "InkRouter/IRRS\n" gives FINDING 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 as unsafe-value.
    • That message names --upstream even when the value came from the shape pin's source_repository:.
  • Not affected:
    • PIN_ARG_RE: --pin is stripped first, and adopt-project.py builds repository@commit from a commit COMMIT_RE has already checked.
    • NAME_RE, REF_RE and PATH_RE in setup-project.py: they read argv only, and CONTROL_RE and fullmatch refuse the line feed first.

Direction

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, update AGENTS.md's table, and tests/test_agents_md_codes.py must pass.
  • tests/test_pinned_copy_text.py passes: the validators are pinned copies under templates/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)

Activity

  1. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-22T12:10:17Z, for #1139

    Logged in lanes/log/openRepoShape-5.md at 317e9bf918de09f9cf3571fe43cb96bb9d2ff285. 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):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1139:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1139"`, kept where the row or its body names `#1139`:
    1126	repo_shape.py and bootstrap.py: `COMMIT_RE`, `SHA256_RE` and `COMMIT_40` end in `\Z`, not `$`, so a pin's `commit:` or `tree_sha256:` that ends in a line break is refused as not 40 or 64 hex by every validator and `adopt-project.py` (#1017)	fix/1017-repo-shape-match-end	OPEN
       (#1126 names #1139 only as the follow-up for the patterns it leaves; it does not close it)
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1139` as a whole token:
       none
    
  2. added this to the v1.2.1 milestone on Oct 23, 2026
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