fix: land quoted-text fallback fix on main (PR #20 follow-up) - #21
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #20 was merged into
fix/issue-18-run-mode-fallbackafter that branch had already merged to main via #19, so the quote-stripping fix never reached main. This PR lands it.