Skip to content

scripts/validate-repository-naming.py, render-cli-reference.py, bump-leg.py and family.py: six functions' cognitive complexity dropped to Sonar's limit of 15 - #145

Merged
brettheap merged 7 commits into
mainfrom
refactor/scripts-cognitive-complexity
Sep 12, 2026
Merged

brettheap merged 7 commits into
mainfrom
refactor/scripts-cognitive-complexity

Conversation

@brettheap

@brettheap brettheap commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openreposhape-2 (openRepoShape-2)

Claim: #136 (comment)

Closes #136.

What was wrong

SonarCloud's python:S3776 (cognitive complexity, limit 15) had six open
issues against four standard-side scripts, none of them started before this
branch:

file function line on main (d682127) Sonar cc
scripts/validate-repository-naming.py _describe 116 35
scripts/validate-repository-naming.py _targets_from_project 224 18
scripts/validate-repository-naming.py main 271 39
scripts/render-cli-reference.py render 492 16
scripts/bump-leg.py cmd_bump 438 28
scripts/family.py cmd_init 435 51

Each one folded several distinct decisions into a single body: _describe's
--explain row was a four-way claim/admission ladder run per family;
_targets_from_project folded per-leg classification and the manifest's
topic check into one loop; main did argument handling, three target
sources and the classify-and-print loop in one function; render composed
every tool's whole documentation section in one body; cmd_bump and
cmd_init (both already carrying flake8's own # noqa: C901 for the same
shape) each held their tool's entire refusal ladder, git plumbing and commit
in one body.

What landed

One commit per function, each an extraction only — no message text, exit
code, output order, file written or exception type changes anywhere:

function cc before (Sonar) cc after (complexipy) how it was split
_describe 35 2 one helper per --explain note (_no_family_lines, _referent_claim_note, _declared_only_note, _unambiguous_note, _admission_note/_admission_row), _family_claim_and_role_note (which note a family gets), _family_row (one family's line), _referent_lines (the CHAIN/WARNING/OVERLAP trailer)
_targets_from_project 18 6 _leg_target (one leg's Target and findings) and _topic_finding (the manifest-level check), called from the same loop shape
main 39 12 _link_sources_from_args, _targets_from_stdin, _print_classification, _classify_targets (the loop), _emit_reports (the WARNING/FINDING trailer and exit code)
render 16 6 _active_tools (replacing a comprehension nested inside a comprehension), _tool_section, _subcommand_sections, _refuse_host_paths
cmd_bump 28 5 five refusal helpers in the same order the checks always ran (_checked_target_commit, _ensure_root_clean, _branch_to_bump_from, _initialized_submodule, _recorded_leg_commit, _leg_pin_path), _print_workflow_plan, and _apply_rewrite (the whole checkout/rewrite/stage/validate-or-roll-back try/except, moved as one unit since splitting the try from its except would split a rollback from the write it undoes)
cmd_init 51 2 one helper per phase, called in the same order the phases always ran: _checked_family_identity, _creator_name, _holder_remote, _shape_snapshot, _template_values, _checked_landing, _print_init_plan, _prepare_landing_dir, _checked_reuse (restructured to a guard clause: if empty is None: return False, same result as the same body nested one level deeper), _create_holder_remote, _create_holder_worktree (returns None on success or the exit code cmd_init should return right now — a push failure is still reported with its own message and exit code, not main's generic one), _finish_holder_remote, _print_next_steps

complexipy --max-complexity-allowed 15 against all four files now reports
every function passing, highest at 12 (main) — complexipy's own numbers
sit at or above Sonar's throughout this cluster (e.g. _describe 38 vs
Sonar's 35, cmd_bump 29 vs 28), so the margin below 15 is real headroom, not
an artifact of the two tools disagreeing in the lenient direction.

Digest-pinned file touched: scripts/validate-repository-naming.py
(ships into every scaffolded project; still Python 3.9-safe — no match, no
runtime X | Y, and it already carries from __future__ import annotations
so the deferred-evaluation type hints on the new helpers cost nothing at
import time). This shows as upstream-changed in every project's
update-shape.py check until an estate re-pin, which is not this PR's to do.

No follow-up bugs were noticed or left. Every change was pure code
motion — a helper extracted with the exact lines, exact conditions, and
exact order its parent already had.

How it was proven

Local, after every commit, from this worktree:

  • python3 -m pytest tests/test_naming_policy.py -q — 162 passed, after each
    of the three validate-repository-naming.py commits.
  • python3 -m pytest tests/test_cli_reference.py -q — 13 passed, both as a
    sanity check on the validate-repository-naming.py commits (no --help
    text lives there) and after the render-cli-reference.py commit itself;
    python3 scripts/render-cli-reference.py --check says
    [ok] docs/cli.md is what the generator produces — no regeneration was
    needed, confirming the rendered document is byte-identical.
  • python3 -m pytest tests/test_bump_leg.py -q — 16 passed, after the
    bump-leg.py commit.
  • python3 -m pytest tests/test_family.py -q — 74 passed, after the
    family.py commit.
  • python3 -m pytest tests/test_repo_hygiene.py -q — 48 passed, after the
    bump-leg.py and family.py commits.

Full suite, in two bounded chunks from a neutral cwd on this worktree at
head 73e7201:

python3 -m pytest tests/test_[a-m]*.py -q   -> 366 passed, 1 skipped (38.72s)
python3 -m pytest tests/test_[n-z]*.py -q   -> 770 passed            (169.45s)

1136 passed, 1 skipped in total — the same count the brief for this
cluster names as today's baseline on main. The one skip is the
pre-existing, location-dependent naming-policy test unaffected by this
branch.

complexipy --max-complexity-allowed 15 against all four touched files: see
the table above — every function passes, none newly introduced above the
line.

🤖 Generated with Claude Code

Summary by Sourcery

Reduce cognitive complexity in six repository tooling functions without changing their behavior.

Enhancements:

  • Refactor six high-complexity functions across repository validation, CLI reference rendering, leg bumping, and family initialization scripts into focused helpers while preserving their existing behavior and outputs.

Tests:

  • Verify that all touched functions meet the cognitive-complexity limit of 15 and that the existing test suite continues to pass.

brettheap and others added 6 commits September 11, 2026 23:42
…ission ladder answers one question per helper, cognitive complexity 35 -> 2

Sonar's python:S3776 scored `_describe` at 35 against the 15 the rule
allows (#136): the `--explain` row loop built each family's MATCH mark,
role note and claim string inline, with a four-way if/elif ladder — a
referent CLAIM, a DECLARED-ONLY note, an ADMITS note (itself a nested
three-way ladder over what is or is not declared), and an UNAMBIGUOUS
note — plus the CHAIN/WARNING/OVERLAP trailer, all in one body.

Split into one helper per decision, in the file's own leading-underscore
convention, each carrying a WHY docstring saying what it decides and that
it was split from its parent for #136: `_no_family_lines` (the NO FAMILY
early return), `_referent_claim_note`, `_declared_only_note`,
`_unambiguous_note` and `_admission_row` (the four claim answers),
`_family_claim_and_role_note` (which of the four answers this family
gets), `_family_row` (one family's full line) and `_referent_lines` (the
CHAIN/WARNING/OVERLAP trailer). `_describe` itself now only decides which
lines to assemble, not how each one reads.

Behaviour is byte-identical: every line, in the same order, from the same
conditions — this is code motion, not a fix. `complexipy --max-complexity-
allowed 15` now passes every function in the file this touches (`_describe`
2, its highest helper `_family_claim_and_role_note` 9); `python3 -m pytest
tests/test_naming_policy.py -q` still passes all 162 tests, including the
`--explain` assertions this function answers.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…g_target what one leg is worth, cognitive complexity 18 -> 6

Sonar's python:S3776 scored `_targets_from_project` at 18 against the 15
the rule allows (#136): the loop that walks a `project.yaml`'s legs built
each leg's `Target`, classified it, and appended its own findings in
place, then fell through to the manifest-level `topic:` check after the
loop — three questions folded into one body.

`_leg_target` now answers the first one alone: one leg's `Target` (or
`None`, with the "a leg has no `repository:`" finding, for a leg that
cannot be classified at all) and the findings that leg's own name and
chain earn. `_topic_finding` answers the second: whether the manifest's
`topic:` agrees with its `id:`. `_targets_from_project` is left as the
loop that collects both, plus the one topic finding after it — the same
shape it always had, with the two questions it was answering asked
elsewhere.

Behaviour is byte-identical: the `targets` list and the `findings` list
come back with the same elements in the same order for every case, since
each leg still contributes to both lists in the same per-leg iteration
this always ran. `complexipy --max-complexity-allowed 15` now passes
`_targets_from_project` (6) and `_leg_target` (7); `python3 -m pytest
tests/test_naming_policy.py -q` still passes all 162 tests, including the
`--project` manifest cases this function answers.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…g, target gathering and the classify loop to helpers, cognitive complexity 39 -> 12

Sonar's python:S3776 scored `main` at 39 against the 15 the rule allows
(#136): parsing `--link-source`, reading targets from three sources (the
command line, `--project`, stdin), the classify-and-print loop over every
target, and the final WARNING/FINDING/exit-code trailer were all one body.

Split into `_link_sources_from_args` (the `--link-source` parsing loop),
`_targets_from_stdin` (the stdin fallback), `_print_classification` (one
plain-listing line), `_classify_targets` (the loop that classifies every
target and returns `(unclassified, warnings)`) and `_emit_reports` (the
WARNING/FINDING lines and the exit code). `main` is left as the sequence
these already were — parse, load the policy, gather targets from every
source in the same order, classify, report — with each step's own
decisions asked elsewhere. The `--project` `Refusal` handling stays
inline in `main`, unchanged, because it is `main` that must print and
`return 2` on it, exactly as the policy-load `Refusal` beside it already
does.

Behaviour is byte-identical: the same argument definitions, the same
target-gathering order (CLI names, then `--project`, then stdin only if
still empty), the same lines and the same exit codes. The one structural
change is folding two always-mutually-exclusive `if found: ... / if not
found: ...` statements in the classify loop into one `if/else`, which
decides nothing differently. `complexipy --max-complexity-allowed 15` now
passes every function in this file (`main` 12, its busiest helper
`_classify_targets` 10); `python3 -m pytest tests/test_naming_policy.py -q`
still passes all 162 tests, and
`python3 -m pytest tests/test_cli_reference.py -q` (13 passed) confirms no
`--help` text moved.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ion instead of every tool's in one body, cognitive complexity 16 -> 6

Sonar's python:S3776 scored `render` at 16 against the 15 the rule allows
(#136): one function built the active tool groups (a comprehension nested
inside a comprehension), the table of contents, and then, for every group
and every tool in it, the heading, the installed-as note, the tool's own
note, its captured `--help`, and every subcommand section it lists — four
questions folded into two nested loops.

`_active_tools` answers which of a group's tools this rendering keeps,
once, instead of as a comprehension nested inside the one that walks
`GROUPS`. `_tool_section` answers what one tool's whole section says;
`_subcommand_sections`, the part of that answer that lists a dispatcher's
own subcommands. `_refuse_host_paths` is Rule 1's check, split out so it
reads as its own question on the finished document rather than the last
few lines of assembling it. `render` itself is now the outline: which
groups, which sections, in which order.

Behaviour is byte-identical: `python3 scripts/render-cli-reference.py
--check` still says `[ok] docs/cli.md is what the generator produces`, so
the committed file needed no regeneration. `complexipy
--max-complexity-allowed 15` now passes every function in the file
(`render` 6); `python3 -m pytest tests/test_cli_reference.py -q` still
passes all 13 tests.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e-or-roll-back to named helpers, cognitive complexity 28 -> 5

Sonar's python:S3776 scored `cmd_bump` at 28 against the 15 the rule
allows (#136), also carrying flake8's own `# noqa: C901` for the same
shape: one function validated `--to`, the root's cleanliness, the branch,
the submodule and the recorded gitlink (five refusal checks), reported
what it found, then rewrote the pin and every workflow file inside a
try/except that rolls every byte back on failure — the whole leg-advance
procedure in one body.

Each refusal is now a named question, in the SAME ORDER the checks always
ran: `_checked_target_commit` (`--to` is 40 hex), `_ensure_root_clean`
(tracked changes), `_branch_to_bump_from` (detached, or the tracking
branch), `_initialized_submodule`, `_recorded_leg_commit`, and, once
`fetch_leg` and the digest are already computed, exactly where the
original checked it, `_leg_pin_path`. `_print_workflow_plan` is the
workflow-count report. `_apply_rewrite` is the checkout, the pin and
workflow rewrite, the staging, the validators, and the rollback on a
caught `Refusal` or `CommandFailed` — moved whole, because splitting the
try from its except would be splitting a rollback from the write it
undoes. `cmd_bump` is now the sequence: gather the facts, refuse on the
first one that is wrong, report, and either stop (nothing to do,
`--dry-run`) or hand the rewrite to `_apply_rewrite` and make the commit.

Behaviour is byte-identical: every refusal keeps its id and its exact
remediation text, every git command this runs and its order are unchanged
(checkout detached, write, stage, validate; on failure restore bytes,
restore the leg's placement, reset the index — never reordered), and
`main`'s two `except` clauses still catch whatever this raises, whichever
helper raised it. `complexipy --max-complexity-allowed 15` now passes
every function in the file (`cmd_bump` 5, its largest helper
`_apply_rewrite` 11); `python3 -m pytest tests/test_bump_leg.py -q` still
passes all 16 tests, and `tests/test_repo_hygiene.py` still passes all 48.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…a named helper, cognitive complexity 51 -> 2

Sonar's python:S3776 scored `cmd_init` at 51 against the 15 the rule
allows (#136), the highest of the six functions in this cluster, also
carrying flake8's own `# noqa: C901` for the same shape: one function
validated every flag, computed who is creating the family and where its
remote and its holder land, printed the plan, refused on a non-empty
target or a live remote, created the remote (bare or `gh repo create`),
materialized and committed the holder, pushed it, set its topic, and
printed the NEXT STEPS block — the whole `init` procedure, start to
finish, in one body.

Split into one helper per phase, called in the SAME ORDER the phases
always ran: `_checked_family_identity` (the name and id checks, still
mutating `args.org`/`args.tracking_branch` as it always did),
`_creator_name`, `_holder_remote`, `_shape_snapshot`, `_template_values`,
`_checked_landing` (the `--into`/`--work-dir` refusal plus `_landing`),
`_print_init_plan` (what `--dry-run` shows and what a real run shows
first), `_prepare_landing_dir` (the target-exists refusal),
`_checked_reuse` (the remote-exists refusal, restructured as a guard
clause: `if empty is None: return False` in place of the same body nested
inside `if empty is not None`), `_create_holder_remote`,
`_create_holder_worktree` (materialize, commit, push — returning `None` on
success or the int `cmd_init` should return right now, since a push
failure is handled here with its own message and exit code rather than
left for `main`'s generic one), `_finish_holder_remote` and
`_print_next_steps`. `cmd_init` is now the outline: gather the facts,
print the plan, stop early (`--dry-run`, a push failure), or finish.

Behaviour is byte-identical: every refusal keeps its id and its exact
remediation text, every printed line and its exact wording (`values`'s own
`FAMILY_ID`/`VISIBILITY` entries are read where the removed local variables
used to be, since the dict already carried the same values), and every git
and `gh` command and its order are unchanged. `--trailer` on `bump` (#112)
and the `GITMODULES` handling in `add`/`remove` (#125) are untouched — this
commit is `cmd_init` only. `complexipy --max-complexity-allowed 15` now
passes every function in the file (`cmd_init` 2, its largest helper
`_checked_reuse` 7); `python3 -m pytest tests/test_family.py -q` still
passes all 74 tests, and `tests/test_repo_hygiene.py` still passes all 48.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 12, 2026 14:48
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 13 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Refactors six high-cognitive-complexity functions across four scripts into focused helpers, reducing all measured complexity to Sonar's limit while intentionally preserving behavior, output, ordering, error handling, and generated documentation.

Sequence diagram for the refactored leg bump workflow

sequenceDiagram
    participant C as cmd_bump
    participant V as Validation helpers
    participant G as Git and leg operations
    participant R as Rewrite and rollback
    C->>V: _checked_target_commit
    C->>V: _ensure_root_clean
    C->>V: _branch_to_bump_from
    C->>V: _initialized_submodule
    C->>V: _recorded_leg_commit
    C->>G: fetch_leg
    C->>G: tree_digest
    C->>V: _leg_pin_path
    C->>G: plan_workflows
    C->>V: _print_workflow_plan
    alt dry run or nothing to do
        C-->>C: return status
    else rewrite requested
        C->>R: _apply_rewrite
        R->>G: checkout, rewrite, stage, validate
        alt validation or command failure
            R->>R: rollback and re-raise
        else success
            R-->>C: complete rewrite
        end
    end
Loading

Flow diagram for the extracted repository naming validation pipeline

flowchart TD
    A["main"] --> B["_link_sources_from_args"]
    A --> C["_targets_from_project"]
    A --> D["_targets_from_stdin"]
    C --> E["_leg_target"]
    C --> F["_topic_finding"]
    A --> G["_classify_targets"]
    G --> H["_describe"]
    H --> I["_family_row"]
    H --> J["_referent_lines"]
    A --> K["_emit_reports"]
Loading

Flow diagram for the refactored family initialization phases

flowchart TD
    A["cmd_init"] --> B["_checked_family_identity"]
    B --> C["_creator_name"]
    C --> D["_holder_remote"]
    D --> E["_shape_snapshot"]
    E --> F["_template_values"]
    F --> G["_checked_landing"]
    G --> H["_print_init_plan"]
    H --> I{"--dry-run?"}
    I -- yes --> J["return 0"]
    I -- no --> K["_prepare_landing_dir"]
    K --> L["_checked_reuse"]
    L --> M["_create_holder_remote"]
    M --> N["_create_holder_worktree"]
    N --> O["_finish_holder_remote"]
    O --> P["_print_next_steps"]
Loading

Flow diagram for the extracted CLI reference rendering stages

flowchart TD
    A["render"] --> B["_active_tools"]
    B --> C["_tool_section"]
    C --> D["capture_help"]
    C --> E["_subcommand_sections"]
    E --> D
    A --> F["_refuse_host_paths"]
    F --> G["Rendered CLI document"]
Loading

File-Level Changes

Change Details Files
Decomposed naming validation into focused helpers while preserving classification, explanation, findings, warnings, and exit behavior.
  • Split explanation rendering into no-family, per-family, admission/claim, and referent-trailer helpers.
  • Separated project-leg classification and manifest topic validation.
  • Moved link-source parsing, stdin target creation, classification output, and final report emission out of the CLI entry point.
scripts/validate-repository-naming.py
Extracted CLI reference rendering stages without changing generated documentation.
  • Added helpers for active tools, individual tool sections, subcommand sections, and host-path validation.
  • Kept rendering order, help capture, filtering, and refusal behavior unchanged.
scripts/render-cli-reference.py
Split leg bump validation and rewrite/rollback orchestration into dedicated helpers.
  • Extracted target commit, repository state, branch, submodule, gitlink, and pin-path checks in their original order.
  • Isolated workflow-plan output and the transactional rewrite, staging, validation, and rollback sequence.
scripts/bump-leg.py
Split family initialization into phase-oriented helpers while retaining the original workflow and failure semantics.
  • Separated identity, creator, remote, shape snapshot, template, landing, reuse, creation, finishing, and next-step phases.
  • Preserved dry-run behavior, output, push-specific errors, exit codes, and operation order.
scripts/family.py

Assessment against linked issues

Issue Objective Addressed Explanation
#136 Refactor the six identified functions in the four scripts so that each is at or below Sonar's cognitive-complexity limit of 15, using behavior-preserving helper extraction and control-flow simplification. ✅
#136 Preserve existing behavior exactly, including messages, exit codes, output order, generated documentation, file changes, git command ordering, rollback behavior, exception types, and Python 3.9 compatibility. ✅
#136 Keep generated and digest-pinned artifacts consistent and validate the refactoring with the relevant test suites and complexity checks. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Only minor documentation nits remain; no blocking issues were identified.

Pull request overview

Refactors six high-complexity functions across four scripts into focused helpers while preserving behavior, output, and exit codes.

Changes:

  • Decomposes naming validation and reporting logic.
  • Extracts CLI rendering, leg bumping, and family initialization phases.
  • Retains existing validation and generated documentation behavior.
File summaries
File Summary Review comments
scripts/validate-repository-naming.py Extracted classification and reporting helpers. Nit (2 votes): fix the grammatical typo in the role_note docstring.
scripts/render-cli-reference.py Extracted tool and subcommand rendering helpers. None.
scripts/family.py Extracted family initialization phases. Nit (1 vote): clarify the materialize_family_root docstring wording.
scripts/bump-leg.py Extracted validation, planning, and rollback helpers. Nit (1 vote): clarify the “commits on” wording.
Review details

Suppressed comments (2)

scripts/bump-leg.py:483

  • The helper description uses the nonstandard “commits on” construction; phrase it as “the branch on which the bump commits” so the refusal behavior is described clearly.
    """The branch the bump commits on, refused if there is none or it is
    the project's own tracking branch.

scripts/family.py:515

  • This docstring is missing a relative pronoun and reads as if materialize_family_root were the values: describe these as the values that the function substitutes into the template.
    """The substitution values `materialize_family_root` fills the
    holder's template with.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/validate-repository-naming.py Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 73e7201aa9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

scripts/validate-repository-naming.py: `_admission_row`'s docstring had a
stray "in" — "`role_note` in is the plain note" — read as broken English;
fixed to "`role_note` is the plain note".

scripts/bump-leg.py: `_branch_to_bump_from`'s docstring read "The branch
the bump commits on"; reworded to "The branch on which the bump commits"
per the review's suggestion, so the sentence does not lean on a trailing
preposition right before its comma.

scripts/family.py: `_template_values`'s docstring read "The substitution
values `materialize_family_root` fills the holder's template with", which
reads as though `materialize_family_root` were the values; reworded to
"The values `materialize_family_root` substitutes into the holder's
template".

Docstrings only — no code, no behaviour, no test changes.

Lane: openreposhape-2 (openRepoShape-2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 12, 2026 15:04
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues were identified, and behavior is covered by passing tests.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 57ddeac into main Sep 12, 2026
6 checks passed
@brettheap
brettheap deleted the refactor/scripts-cognitive-complexity branch September 12, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants