Repository navigation
Carry a Newly Declared Verbatim Section in carry.py Instead of Refusing - #3683
Conversation
plan_unit refused a resync when a declared verbatim section was absent from the target. It now plans the section as missing and apply-sections inserts it, placed after the target's copy of the nearest preceding hub section, else before the nearest following one, else appended. A carried file absent from the target is still refused as a standup question. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… Insertion Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eck Insertion Exactly Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
Approval is blocked by an active moderate defect in duplicate detection, with two additional consistency and unreachable-guard issues still requiring changes.
3 open issues
What changed in this PR
This pull request updates carry.py to insert newly declared verbatim sections during resync while preserving canonical hub order, local content, line endings, and unchanged regions.
Changes:
- Plans absent declared sections as missing and inserts them at the appropriate hub-relative position.
- Adds post-insertion validation, missing-section reporting, and duplicate-content refusal.
- Expands tests for insertion order, CRLF files, rename-shaped conflicts, and apply behavior.
- Documents the updated resync and
check-sectionsbehavior.
| File | Summary | Review findings |
|---|---|---|
tests/test_carry.py |
Adds coverage for missing sections, insertion ordering, line endings, duplicate text, and apply behavior. | None recorded. |
scripts/README.md |
Documents carry behavior and refusal conditions. | P2 nit, 1 vote: Remove incidental assertion counts and numeric ordinal references from the documentation paragraph. |
scripts/carry.py |
Implements missing-section planning, ordered insertion, validation, and reporting. | P1 moderate, 4 votes: Restrict duplicate detection to complete section bodies rather than the entire target document. P2 nit, 4 votes: Route all section-name normalization through fold. P2 nit, 3 votes: Remove or relocate the unreachable insertion guard. |
RESYNC.md |
Documents insertion behavior during instruction-set resync. | None recorded. |
Review effort: Lite
…Through fold Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3683 +/- ##
===========================================
+ Coverage 81.74% 81.85% +0.11%
===========================================
Files 27 27
Lines 9139 9195 +56
===========================================
+ Hits 7471 7527 +56
Misses 1668 1668
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… Rename Check Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ction Bodies Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
…de, Read Compose and Renamed Paths, and Exempt a Delete-Only Push (#3693) Promotes the changes merged into `develop` since promotion #3681 to `main`, the first round of a backlog burndown. - [#3683](#3683) Carries a newly declared verbatim section in `carry.py` instead of refusing. The missing section is inserted in hub order: after the nearest preceding held section, else before the nearest following one, else at the end of the file. A rename is refused only for an unchanged body under a target H2 the hub does not carry, and the plans apply in two phases. - [#3689](#3689) Reads a null GraphQL node in `pr_review.py` as unread, re-reading and then exiting 1 naming the path. Names a closed pull request's state in the digest, and ends `wait` on a pull request that is no longer open the way `status` does. `merge-and-release` step 2 stops on `state=MERGED`. - [#3685](#3685) Skips the container side of a compose volume entry in the prose gate's home-path rule. Pins `--find-renames` in the gate's diff, and reads a renamed file whole only when it came from a generated tree or an excluded path. - [#3691](#3691) Exempts a delete-only push from the write guard's primary-checkout rule: a named remote, every refspec a delete of a branch other than `main`, `master` or `develop`, and only the delete, dry-run, quiet and verbose options. The branch's live protection rules still apply. Adds regression cases for #1628. Deferred review findings: #3694 (a YAML block scalar in a Compose file's volume scan) and #3690 (the `scripts/README.md` apply-time refusal sentence). #3695 records a pre-existing write-guard question raised while verifying them. Fixes #3614 Fixes #3392 Fixes #3677 Fixes #3220 Fixes #1586 Fixes #1642 Fixes #1628 🤖 Generated with [Claude Code](https://claude.com/claude-code)


scripts/carry.pyplan_unitrefused a resync when a declared verbatim section was absent from the target.plan_unitnow plans such a section as missing, andapply-sectionsinserts it.Insertion point (the issue left it open): the hub's own canonical order. The section goes after the target's copy of the nearest preceding hub section the target holds, else before the nearest following one, else at the end of the file. A repository's local sections between two hub sections stay where they are. The target's line ending is kept, the heading sequence is re-asserted afterwards, and an exact post-insert check proves nothing outside the new region changed apart from the separator an end-of-file insertion needs. A carried file absent from the target is still refused as a standup question.
Added beyond the issue: a missing section whose unchanged text the target already holds under a heading the hub does not carry is refused as a likely rename, since inserting would duplicate it. An edited rename, or text under a heading the hub keeps as intent, is not caught.
check-sectionsreports a missing section instale(exit 1) and in a newmissingkey. Tests use constructed documents and live intests/test_carry.py, the existing carry test file.Files: scripts/carry.py, tests/test_carry.py, RESYNC.md, scripts/README.md.
Pre-existing findings, filed:
spec/fidelity_text.py,scripts/build_dist.py,spec/audit.pyandscripts/carry.py(class: pre-existing): Move the Section-Name Lookup Key Into spec/fidelity_text.py #3686Deferred to #3690 (introduced, edit budget spent):
Closes on promotion: #3614
🤖 Generated with Claude Code