Skip to content

fix: land quoted-text fallback fix on main (PR #20 follow-up) - #21

Merged
jkrandom-sudo merged 2 commits into
mainfrom
fix/issue-18-run-mode-fallback
Jul 30, 2026
Merged

fix: land quoted-text fallback fix on main (PR #20 follow-up)#21
jkrandom-sudo merged 2 commits into
mainfrom
fix/issue-18-run-mode-fallback

Conversation

@jkrandom-sudo

Copy link
Copy Markdown
Owner

PR #20 was merged into fix/issue-18-run-mode-fallback after that branch had already merged to main via #19, so the quote-stripping fix never reached main. This PR lands it.

jkrandom-sudo and others added 2 commits July 30, 2026 15:13
Review follow-up for #19: `opencode run "/loop 5m"` stores the user
message with literal outer quotes (argv elements containing spaces are
re-quoted), so the fallback regex /^\/loop.../ never matched real
run-mode text and every deterministic guard was still bypassed
end-to-end — the unit tests only simulated unquoted parts.

- reuse stripOuterQuotes (now exported) before matching, mirroring
  handleUserCommand
- scan remaining text parts instead of bailing on the first non-match
- regression tests for double- and single-quoted command text and for
  /loop appearing in a later text part (12/12 run-mode tests, 176/176
  overall, tsc clean)
- verified end-to-end against a real `opencode run` with the built
  plugin: quoted cron input is now rejected deterministically and no
  task is created; a quoted valid interval creates the fixed task

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: strip opencode-run argv quotes before /loop fallback matching
@jkrandom-sudo
jkrandom-sudo merged commit 3433e5c into main Jul 30, 2026
@jkrandom-sudo
jkrandom-sudo deleted the fix/issue-18-run-mode-fallback branch July 30, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant