Skip to content

Session Handoff [auto-2112]: Strip Every Heredoc Body a Line Opens in the Guard per #2112 #2123

Closed

Description

@ptr727

Next steps, in priority order

  1. Fix A Line Opening Two Heredocs Strips Only the First Body #2112 in host-setup/agent-safety/claude/gh-write-guard.py. The heredoc strip takes only the first << on a line and strips only its body, while bash reads every heredoc a line opens as data, in order, before the next command. Make a line that opens several heredocs strip each body in sequence, each closed by its own tag, on the ordinary path and on the forks taken for a line holding ((, which today cover both bodies only by accident. Done looks like: the constructed command in A Line Opening Two Heredocs Strips Only the First Body #2112 is denied, a --selftest row pins it, the (( shapes the issue names (: $((0)) <<EOF <<EOF, and : $((0)) <<A <<B with a line B inside A's body) each get a row too, a revert of the fix fails the new rows, and the whole self-test and unittest discover -s tests still pass.
  2. Drive the pull request into develop with Closes on promotion: #2112 in its body, scope develop.

External blockers

None known.

Internal dependencies

None. #2111 (a << inside a quote an earlier line opened) and #2113 (backslash-newline folding) are sibling guard defects in the same area, and #2113 may overlap #2064. Keep this fix to multiple openers on one line so it does not pre-empt either.

State

No branch or worktree yet. Base the work on develop, per repo-worktree. Open PR #2117 (lane auto-1634, handoff labelled blocked) also edits gh-write-guard.py, so expect a merge conflict whichever lands second, and re-derive open pull requests touching that file before starting. #2112 was filed as a pre-existing follow-up by PR #2114, which is merged and promoted without fixing it.

The parked decision queue

None for this lane.

What the last round did

Nothing yet. The unattended picker created this lane from the open backlog.

What not to repeat

Nothing recorded yet.

New learnings

None yet.

Activity

  1. added
    handoff
    on Sep 30, 2026
  2. ptr727 commented on Sep 30, 2026

    @ptr727
    OwnerAuthor

    Parked: waiting on decision #2126

    Done. Branch feature/auto-2112 is pushed at 3c5fc4c (three signed commits on develop 1a23b37). No pull request is open. The worktree ProjectTemplate-auto-2112 under the fleet worktrees directory is left standing, clean.

    • host-setup/agent-safety/claude/gh-write-guard.py: a line opening several heredocs is read as opening its first alone (the old reading) and, where the bodies close, as opening each in order through the last data body, keeping a fed-to-a-shell body before it whole. A line holding (( or $[ is read as opening nothing, plus each << alone and each with every later one whose body closes. New --selftest rows pin the A Line Opening Two Heredocs Strips Only the First Body #2112 command, both (( shapes it names, a fed body before a data body, a heredoc inside $( and a backquote, a $[ shift, a quoted << after a real heredoc, and five empty bodies on a (( line. The deny rows fail on develop.
    • host-setup/agent-safety/README.md: the rule's paragraph restated to match.
    • Verified: --selftest passes, unittest discover -s tests passes (1856 tests), and ruff, mypy, prose_lint, the eol gate, and spec/validate.py are all clean.

    Review history. Three local strict review passes were run and recorded against develop. Pass 1 found 4, pass 2 found 5, and pass 3 found 4. Two rounds of edits fixed the first two passes' introduced findings. Pass 3 still raises three introduced findings, listed in #2126: quadratic hook time on a crafted shift line, 2^n readings over lines opening two data heredocs, and a closure claim in the prose. Under the two-round budget, editing stopped there. Two older defects found along the way are filed as #2124 and #2125.

    What remains. Act on the answer in #2126:

    No lesson was filed.

  3. added
    blocked
    on Sep 30, 2026
  4. ptr727 commented on Sep 30, 2026

    @ptr727
    OwnerAuthor

    Unblocked on 2026-09-30: decision #2126 is answered, option 1: open the pull request as the branch stands, and file the three findings as follow-ups first. The blocked label is removed so the lane can resume.

  5. removed
    blocked
    on Sep 30, 2026
  6. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Closed out: merged to develop

    Resumed under decision #2126's answer, option 1.

    #2112 stays open until develop is promoted to main. No lesson was filed.

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

    handoff

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions