Summary
The suppression scanners do not preserve command position after the shell time prefix. A following case command is not recognized, so its pattern closer can be mistaken for the command-substitution closer and a genuine adjacent suppression comment is missed.
Review evidence: #1650 (comment).
Reproduction steps
Run this source in zsh, then feed full contents and a changed-line patch for line2 into tracker scanPatch. Supply valid tracking metadata on the marker when checking record output.
v=$(time case x in
x)#nolint
printf hi;; esac)
printf %s "$v"
Expected behavior
The shell prints hi. The case-pattern comment on line2 requires metadata and a record from all three scanners.
Actual behavior
The tracker returns0records. Finishing time clears commandStart, so case remains ordinary command text and its pattern closer incorrectly ends the expansion. The review identifies the same state transition in the local and workflow AWK scanners; verify all-three parity during the fix.
Logs and output
zsh parse exit: 0
zsh execution exit: 0
zsh stdout: hi
tracker expected records: 1
tracker actual records: 0
Proposed scope and acceptance criteria
Targetv1.9.0, medium dialect grammar work. The preceding PR1650 compound-prefix design explicitly excluded time from its nine-token contract. Adding the bare token alone would leave option, command-position and dialect questions unresolved.
Version / commit
Reviewed3650a227b39e13eb76f3fd3051d2e7829fb077c7; reproduced5971cbacb5818e9163c355e81175b14bf2149721.
Environment
macOS with bundled Bash/sh and zsh, Node.js. The exact snippets below parse and print hi in zsh; bundled older Bash/sh reject these unparenthesized case-in-substitution forms. Do not generalize this evidence to all shell versions. Tracker scanPatch uses a read-only mocked full-file API with a changed-line patch; no external issue writes occur in the reproduction.
Summary
The suppression scanners do not preserve command position after the shell
timeprefix. A following case command is not recognized, so its pattern closer can be mistaken for the command-substitution closer and a genuine adjacent suppression comment is missed.Review evidence: #1650 (comment).
Reproduction steps
Run this source in zsh, then feed full contents and a changed-line patch for line2 into tracker scanPatch. Supply valid tracking metadata on the marker when checking record output.
Expected behavior
The shell prints
hi. The case-pattern comment on line2 requires metadata and a record from all three scanners.Actual behavior
The tracker returns0records. Finishing
timeclears commandStart, socaseremains ordinary command text and its pattern closer incorrectly ends the expansion. The review identifies the same state transition in the local and workflow AWK scanners; verify all-three parity during the fix.Logs and output
Proposed scope and acceptance criteria
Targetv1.9.0, medium dialect grammar work. The preceding PR1650 compound-prefix design explicitly excluded time from its nine-token contract. Adding the bare token alone would leave option, command-position and dialect questions unresolved.
-pand dialect-specific options are accepted.Version / commit
Reviewed3650a227b39e13eb76f3fd3051d2e7829fb077c7; reproduced5971cbacb5818e9163c355e81175b14bf2149721.
Environment
macOS with bundled Bash/sh and zsh, Node.js. The exact snippets below parse and print
hiin zsh; bundled older Bash/sh reject these unparenthesized case-in-substitution forms. Do not generalize this evidence to all shell versions. Tracker scanPatch uses a read-only mocked full-file API with a changed-line patch; no external issue writes occur in the reproduction.