You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authorize a Third Round on the #1635 Token-Fallback Fix, or Drop It #1844
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_tokens in host-setup/agent-safety/claude/gh-write-guard.py handles 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_comment finds 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 checks is 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-owner gh issue comment write. 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_opener tokenizes one line at a time.
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_opener on 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.
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_opener on base behavior. Then run another local review pass and drive the feature/auto-1635 pull request to develop.
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.