Skip to content

Make carry.py's check-sections Report the Insertion Refusals apply-sections Raises #3690

Closed

Description

@ptr727

Follow-ups from the strict-review receipt on #3683, all in the section modes of scripts/carry.py and the docs describing them.

  1. scripts/README.md (line 405) still says every refusal is raised while planning, before the first file is written. Insertion and overlap refusals now raise in apply_plans phase 1, so check-sections can report a file as cleanly plannable that apply-sections then refuses, for example a target ending inside an unclosed code fence. Either make check-sections run the same in-memory insertion, or correct the sentence.
  2. With a target whose last section holds an unclosed code fence, outside_sections raises "section 'B' is absent" before the post-insert check runs. The operator is told an inserted section is absent and the real cause (the unclosed fence) is never named. The test for this asserts only CarryError, so it would not notice.
  3. RESYNC.md step 1 says a missing section whose unchanged text the repository already carries is refused, but the scan is per file. A section moved unchanged from AGENTS.md to GOVERNANCE.md is inserted as a second copy. Either say "in the same file" in the docs, or scan every carried file.

Class: all introduced by #3683, deferred by its edit budget.

Activity

  1. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    One more instance for this issue's fix, raised by the review of promotion #3693: scripts/README.md:405 says "Every refusal is raised while planning". An insertion refusal is raised in apply_plans' first pass instead, still before any file is written, so check-sections cannot surface it. Constructed case: a hub GUIDE.md holding ## Alpha and ## Beta, a target holding ## Alpha followed by an unclosed code fence. plan_unit reports {"missing": ["Beta"], "stale": ["Alpha", "Beta"]}, and apply_plans then refuses with "section 'Beta' is absent, so the untouched text cannot be compared", leaving the target unchanged. The README sentence should change with whatever makes check-sections run the insertion dry-run.

  2. ptr727 commented on Nov 2, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-02): PR #3835 merged to develop and its branch is deleted, so this claim holds no files. The issue closes on promotion.

    Backlog burndown claim (away run 2026-11-02, round 4, group R4G3). Branch: burndown/3690-check-sections. Issues: #3690.

    Predicted file set:

    • scripts/carry.py
    • tests/test_carry.py
    • scripts/README.md
    • RESYNC.md
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions