Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ptr727/ProjectTemplate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.581
Choose a base ref
...
head repository: ptr727/ProjectTemplate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0.583
Choose a head ref
  • 3 commits
  • 7 files changed
  • 2 contributors

Commits on Sep 7, 2026

  1. Give the Verbatim Section Re-Vendor a Tested Tool (#1423)

    Closes #1401.
    
    `scripts/carry.py` owns whole trees and `spec/audit.py` names a stale
    section without writing
    anything. Between them sits the verbatim section re-vendor, the one
    apply step in `RESYNC.md` with
    no tested tool behind it, hand-rolled on every resync, and the step the
    AGENTS.md-overwrite
    incident happened on.
    
    ## What lands
    
    `check-sections` and `apply-sections` on `carry.py`. They read
    `spec/files.json` for the sections a
    repository carries at `verbatim` fidelity inside an otherwise
    `intent`-fidelity file, replace only
    those `## heading` regions, and then re-read the file to assert three
    things: the level-two heading
    sequence is unchanged, every line outside the replaced regions is
    byte-identical to what was there
    before, and each declared section now matches the hub's canonical.
    
    The second assertion is the one that earns its keep. The 2.0.577 pilot's
    throwaway replacer dropped
    one blank line between the preamble and the first heading. That is
    invisible in a diff review, it
    breaks no renderer, and no gate in this repository flags it, so it would
    have shipped and the next
    audit would have reported drift nobody could see. The issue's argument
    is that a hand-rolled step
    gets that assertion only when whoever wrote it happened to write one.
    
    Region boundaries come from `spec/audit.py`'s own fence reading rather
    than a second reading of
    CommonMark, so a heading shown inside a code sample cannot end a region
    for this tool and not for
    the check that judges the result. The replacement carries the terminator
    the section's own heading
    line carried, so a CRLF repository keeps its endings.
    
    ## Verification
    
    **Twenty guards, each mutation-tested**: the guard is removed, a named
    test must fail, and the file
    is restored from a byte copy rather than from git. All twenty caught.
    
    **End to end against real repositories.** Read-only across three fleet
    repositories at their fetched
    `origin/develop`: 63 sections compared, zero disagreements with
    `spec/audit.py`'s own extractor, and
    the verdicts reproduce the known state, `Utilities` and `PlexCleaner`
    clean after their resyncs and
    `HomeAutomation-Config` ten sections behind on its frozen hub pin. Then
    a real re-vendor of those
    ten in a scratch copy: all ten cleared, zero disagreements across the 21
    declared sections, and the
    heading sequence and every line outside the declared regions
    byte-identical.
    
    Full local gate set green: `ruff format --check`, `ruff check`, `mypy`,
    1142 unit tests,
    `spec/validate.py`, `prose_lint.py`, `repo_gate.py`, `build_dist.py
    --check`, `shellcheck`, `shfmt`,
    and for `menu.ps1` the PowerShell parser and PSScriptAnalyzer.
    
    ## Two review rounds, and what the second one overturned
    
    The first local pass raised ten findings, all answered in the second
    commit. The second pass
    disproved one of those answers, which is why the third commit exists.
    
    That answer had added a refusal for a section ending the file in one
    copy and not the other,
    claiming that padding the region with the blank line a following heading
    needs would leave bytes the
    fidelity comparison reports as drift forever. It does not.
    `spec/audit.py`'s `extract_section`
    splits the document on LF and joins the region back with LF, so a
    file-final newline and a blank
    line before the next heading both render as one trailing empty element,
    and the two forms compare
    equal. The refusal and its premise are gone. The comparison now uses a
    form that reproduces
    `extract_section` exactly, and the write reconciles the boundary to what
    the target document needs.
    
    The same pass also caught that `RESYNC.md` step 3 was the wrong home for
    these modes twice over: it
    put the instruction set after the deletions and the tree carry, which
    step 1 exists to prevent, and
    it put a clean-worktree requirement after the step that dirties the
    worktree, so the command could
    not have run.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    
    <!-- This is an auto-generated comment: release notes by coderabbit.ai
    -->
    
    ## Summary by CodeRabbit
    
    - **New Features**
    - Added section-level synchronization for verbatim Markdown rule
    sections within mixed-ownership files.
    - Added commands to check for drift or apply updates while preserving
    unrelated content and line endings.
    - Added downstream menu options for checking and pulling these sections,
    including dry-run support.
    - Updates validate section boundaries, encoding, and final content
    before completing.
    
    - **Documentation**
    - Expanded setup and command-line documentation with workflows,
    requirements, fidelity behavior, and usage examples.
    
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->
    
    ---------
    
    Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
    ptr727 and claude authored Sep 7, 2026
    Configuration menu
    Copy the full SHA
    6d7a267 View commit details
    Browse the repository at this point in the history
  2. Name the Hub From Its Constant Everywhere, and Say Which Checkout the…

    … Menu Filters For (#1427)
    
    Answers three findings raised on promotion PR #1426, whose head is
    `develop`, so they land here
    first.
    
    ## The hub's name, in five places rather than one
    
    The finding was that `carry.py`'s tree-carry guard tests `name ==
    HUB_NAME` and then names the hub
    as a literal in the message it raises. Fixing that line alone would have
    left the worse instance
    standing: `verify_hub` resolved the registry entry by literal too, so
    renaming the hub would have
    failed there, in every mode, before ever reaching the guard the finding
    was about. The
    origin-mismatch message beside it had the same shape.
    
    Both menus hard-coded the slug in a section header while holding it in
    `HUB_REPO` two lines above,
    so any fork would render two different hub names on one screen. Verified
    by rendering the menu
    rather than by reading it:
    
    ```
    Hub:        ptr727/ProjectTemplate (/home/pieter/repos/worktrees/ProjectTemplate-menu-grammar)
    ...
    Hub, ptr727/ProjectTemplate:
    ```
    
    ## A guard with no test
    
    The guard whose message this change edits had none, because it sits
    behind `verify_hub` and a unit
    test would have needed a real hub checkout to reach it. It is now
    `refuse_hub_tree_target`,
    exercised directly, and the test fails when the guard is removed. Its
    sibling in `run_sections`
    already had one, so this was the untested half of a matched pair.
    
    ## The usage sentence, rewritten once more
    
    "Each is shown the tasks that apply to it" leaves "each" pointing at
    nothing the preceding sentence
    named, which is what the reviewer read as a missing subject. It now
    names the referent: "Only the
    tasks that apply to that checkout are shown." The local review pass was
    asked specifically whether
    this wording is correct and unambiguous rather than for another variant,
    since the sentence has now
    been rewritten twice, and it confirmed the referent binds and that the
    claim matches what the
    menus actually do.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    ---------
    
    Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
    ptr727 and claude authored Sep 7, 2026
    Configuration menu
    Copy the full SHA
    f86b149 View commit details
    Browse the repository at this point in the history
  3. Promote develop to main: give the verbatim section re-vendor a tested…

    … tool (#1426)
    
    Promote `develop` to `main`. One commit, #1423, which settles #1401.
    
    `scripts/carry.py` owned whole trees and `spec/audit.py` named a stale
    section without writing
    anything. Between them sat the verbatim section re-vendor, the one apply
    step in `RESYNC.md` with no
    tested tool behind it, hand-rolled on every resync, and the step the
    AGENTS.md-overwrite incident
    happened on.
    
    `check-sections` and `apply-sections` close it. They read
    `spec/files.json` for the sections a
    repository carries at `verbatim` fidelity inside an otherwise
    `intent`-fidelity file, replace only
    those heading regions, and re-read the file to assert that the level-two
    heading sequence is
    unchanged, that every line outside the replaced regions is
    byte-identical to what was there before,
    and that each declared section now matches the hub's canonical.
    `RESYNC.md` step 1 names the
    commands, and both menus expose them.
    
    Twenty-one guards, each mutation-tested. Verified end to end against
    `HomeAutomation-Config`'s real
    ten stale sections in a scratch copy: all ten cleared, zero
    disagreements with `spec/audit.py`'s own
    extractor across the 21 declared sections, and everything outside those
    sections untouched.
    
    Copilot reviewed every head with full coverage. Three of its findings
    arrived as suppressed comments
    carrying no thread, and all three were real: a banned semicolon in an
    error message, a mixed
    line-ending defect on a CRLF file whose declared heading is its
    unterminated last line, and a
    per-line re-import costing 28.8 ms against 1.1 ms on this repository's
    own `GOVERNANCE.md`. Each is
    answered in #1423's conversation with its evidence. CodeRabbit was rate
    limited throughout and is
    advisory here.
    
    Closes #1401
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    ptr727 authored Sep 7, 2026
    Configuration menu
    Copy the full SHA
    1d52152 View commit details
    Browse the repository at this point in the history
Loading