Skip to content

Session Handoff [auto-2207]: Ignore a Quoted Separator When the Guard Finds a Loop's done per #2207 #2209

Closed

Description

@ptr727

Next steps, in priority order

  1. Fix The Guard's Wait-Loop Rule Closes a Loop at a Quoted Separator Before done #2207 in host-setup/agent-safety/claude/gh-write-guard.py: _loop_parts finds a loop's do and done by command position alone and never reads the quote mask, so a quoted ";" before a done word closes the loop early, and while true; do echo ";" done; sleep 1; done is allowed. Done looks like: _loop_parts takes the quote mask where it is known and ignores a quoted separator when it looks for do and done, the command above is denied, and a self-test row pins it, failing when the fix is reverted.
  2. Run local-strict-review before every push, then open the pull request to develop carrying Closes on promotion: #2207 and drive it per drive-pr, scope develop.
  3. Close this lane out with a comment naming what merged, which issues it fixed, and anything filed along the way.

External blockers

None.

Internal dependencies

Step 2 follows step 1, and step 3 follows the develop merge. Two other lanes edit the same file: feature/auto-2080 (parked under #2137, waiting on decision #2208, no pull request) and pull request #2117 (feature/auto-1634). Keep this change to _loop_parts and its callers so a later merge of either stays small, and do not fold in their work or the sibling wait-loop issues #2204, #2205, and #2206.

State

Nothing started. No branch, worktree, or pull request exists for this lane. Re-derive develop's head and the state of #2117 and feature/auto-2080 before starting.

The parked decision queue

Count 0 for this lane.

What the last round did

An unattended picker created this lane from the open backlog. It changed no code.

What not to repeat

Nothing yet.

New learnings

None.

Activity

  1. added
    handoff
    on Oct 1, 2026
  2. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Parked: waiting on decision #2210

    Done: nothing. The worker resumed this handoff, created feature/auto-2207 from develop at 658034f7, and tried to edit host-setup/agent-safety/claude/gh-write-guard.py. The session's auto-mode permission classifier refused the edit as self-modification of the agent's safety hook, and the worker did not route around it.

    Branch and pull request: none. The branch held no commits, so the worker removed it and its worktree. Nothing is left standing.

    What remains: all of next step 1, then steps 2 and 3, unchanged. The fix is still the one in next step 1. Give _loop_parts(toks, i, quoted=None) the mask _unbounded_wait_loop already computes. A do or done counts only when _opens_command holds and neither that token nor the one before it is quoted. Add a deny row for while true; do echo ";" done; sleep 1; done beside the existing quoted-; rows, and confirm it fails with the fix reverted. Re-derive develop's head and the state of #2117 and feature/auto-2080 first, as the State section says.

    Decision this lane waits on: #2210, which asks whether guard edits go to an attended session, get a permission rule, or are skipped by the unattended picker. No lesson issue was filed.

  3. added
    blocked
    on Oct 1, 2026
  4. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Decision #2210 is answered: this lane is worked in an attended session only, where the maintainer approves the edit to the guard. blocked stays on so the unattended loop does not pick it up. The picker exclusion is #2248.

  5. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Lane closed out

    Worked in an attended session, per decision #2210.

    Merged: #2249 into develop as 7424d944. _loop_parts now takes the quote mask and counts a do or done only when neither it nor the word before it is quoted, so while true; do echo ";" done; sleep 1; done is denied. Two self-test rows pin the two halves, and each was confirmed failing with only its own clause removed.

    Fixes: #2207, which closes when promotion PR #2250 merges into main. That PR is open and green with no findings, but Copilot's file table names 11 of its 32 files, so the merge is the maintainer's call.

    Filed along the way: nothing. The local strict review raised no finding. It noted that a backslash-newline continuation directly before do or done would now be read as a quoted word. The hook never sees that shape, since classify folds continuations before the wait-loop check runs.

    Branch and worktree: both removed, and the remote branch was deleted after its tip was confirmed to match the merged head.

  6. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Promotion PR #2250 merged into main as 0378c789 on the maintainer's go-ahead, with Copilot's file table covering 11 of 32 files. Release 2.0.792 published, and #2207 closed on promotion. The parked decision queue holds 0 issues.

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

    blockedhandoff

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions