Skip to content

shape-doctor.py: a checkout of the standard whose own contracts/repository-naming.yaml does not load makes a compliant project INVALID (naming), exit 1, "the naming policy is not satisfied (exit 2)", so a person is failed for the checkout's fault, and the module's EXIT CODES list leaves out an unfinished merge #678

Closed

Description

@brettheap

Goal: a checkout of the standard that cannot read its own naming policy says CANNOT ANSWER about a project, never INVALID, and the doctor's EXIT CODES list names every kind of exit-1 finding it prints.

Filed by lane openRepoShape-3 on Brett Heap's word of 2026-10-16T12:24:41Z ("give #460 to lane 3").

Size: S. Lands after: nothing; no open pull request touches shape-doctor.py.

What happens (measured on main d4a7fab: a project scaffolded into local bare remotes, with a gh that exits 97):

Where it is (d4a7fab):

  • shape-doctor.py:279-289: the EXIT CODES list. :120-130: the merge paragraph.
  • shape-doctor.py:2050-2092: check_naming, with its reason at :2090-2092.
  • shape-doctor.py:2095-2124: naming_crashed_row.
  • shape-doctor.py:7742-7788: check_not_a_root_naming.
  • scripts/repo_shape.py:1806-1817: NamingPolicy.load. The doctor's own repo_shape import already carries it.

The change:

  • Before running the naming script, ask whether this checkout's contracts/repository-naming.yaml loads, with repo_shape.NamingPolicy.load, the reader the script itself uses. Where it does not load, or where the script's REFUSED names that file:
    • mark the row detail.environment and quote the refusal;
    • say, in naming_crashed_row's words, that the file is this checkout's and not the project's, so nothing here is a statement about the project;
    • a project root is then CANNOT ANSWER, exit 3, and a directory that is not a root stays NOT A SHAPE ROOT.
  • Word any other exit 2 as "refuses (exit 2)", and an exit 1 as the finding it is.
  • In the docstring's EXIT CODES list, add the unfinished merge (INVALID (merge)) to the exit-1 line, and this checkout's own naming policy to the exit-3 line.

Tests (tests/test_doctor_validator_verdicts.py, beside test_a_crashed_naming_script_cannot_answer_for_a_compliant_project, using standard_under):

  • A copy of the standard whose policy has a tab line, over a compliant project: the row is a FINDING with detail.environment, the verdict is CANNOT ANSWER (naming: ...), exit 3, and the reason names the file as this checkout's.
  • The same copy over a directory that is not a root: NOT A SHAPE ROOT, exit 2, and the row says the same.
  • Control: a project whose leg name does not classify is still INVALID (naming), exit 1.

From #460, #460 (L3) and #460 (comment) (L9).

🤖 Generated with Claude Code

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-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-16T13:01:36Z, for #678

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

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

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