Repository navigation
Closed
Description
The fix for #1635 on branch feature/auto-1635 (handoff #1835) used up its two-round local-review budget. An introduced finding is still open, so editing stopped, per local-strict-review "Disposing of Findings". No pull request exists yet. The branch is pushed.
Where it stands
_operator_tokensinhost-setup/agent-safety/claude/gh-write-guard.pyhandles a line that fails to parse. It retries the line without the trailing comment bash sees, then falls back to plain splitting as the develop base does._strip_trailing_commentfinds that comment and tracks only plain'and".- It fixes An Apostrophe in a
#Comment Defeats Requirement 7 Entirely #1635:while ! gh pr checks 5 --watch; do sleep 30; done # the PR's checksis now denied. The round-1 regressions are fixed too. A differential against the develop base shows no deny-to-allow change over the self-test corpus. - Still open (introduced): the comment scan runs one line at a time, and each line starts outside any quote. Bash can start a line inside a quote an earlier line opened. In that case a
#inside the quote gets cut as a comment, and the command after the quote closes is dropped. Constructed reproductions that develop denies and the branch allows:- A three-line command. Line 1 opens a double quote (
echo "start). Line 2 closes it after a#and then runs a cross-ownergh issue commentwrite. Line 3 ends in a comment with an apostrophe. - A four-line command,
echo "a/<<EOF # "/while true; do sleep 5; done/EOF. No apostrophe is needed, because_heredoc_openertokenizes one line at a time.
- A three-line command. Line 1 opens a double quote (
Options
- Recommended: authorize a third round with the root-cause fix. Carry the quote state across lines: strip comments over the whole command before the whole-command parse, not per line. Keep
_heredoc_openeron base behaviour, with no comment stripping. Why: the defect is structural, the fix is narrow and known, and the reviewer found the single-line scan sound. What happens to the parked work: the branch continues, another review pass runs, and the pull request is driven to develop. - Drop comment stripping and fall back to base. Why: it removes the regression with certainty. The cost is that An Apostrophe in a
#Comment Defeats Requirement 7 Entirely #1635 is not fixed. What happens to the parked work: the branch is discarded, and An Apostrophe in a#Comment Defeats Requirement 7 Entirely #1635 goes back to the backlog for a redesign, for example a tokenizer that follows bash's quoting across lines.
Blocks: the feature/auto-1635 branch, which has no pull request yet. Handoff: #1835.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Sep 26, 2026
Answered by the maintainer on 2026-09-26: authorize a third round (option 1). Strip comments over the whole command with the quote state carried across lines, before the whole-command parse, and keep
_heredoc_openeron base behavior. Then run another local review pass and drive thefeature/auto-1635pull request to develop.