Harden goal plugin verification and compatibility#3
Merged
Conversation
willytop8
added a commit
that referenced
this pull request
Jun 9, 2026
…and new helper tests main (PR #3) already implemented noProgressTurnsBeforePause, maxRecentMessages, the grace window, CI matrix, and extensive new tests. This merge keeps main's version for all those areas and contributes two remaining additions: - escapeGoalText: broadened to escape all XML closing tags (replaceAll "</" → "<\/") so user-supplied goal text cannot break any structural tag in buildContinueMessage; main's version still only escaped </goal_objective> - tests: 7 new unit tests for outputTokensForMessage, budgetWrapupNeeded, getSessionID, stopReason, normalizeOptions boundary inputs (zero/negative/NaN/null, budgetWrapupRatio at 0 and 1), and escapeGoalText covering all structural tags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
What changed
[object Object]npm run smokeviascripts/smoke-command-hook.mjs.nvmrcVerification
npm testnpm run smokenpm run checknpm run test:coveragenpm run pack:check1.15.10withopencode-go / qwen3.7-plus/goal statusreturned no-active-goal as expected/goal inspect this temp directory and end with [goal:blocked]produced a blocked response with[goal:blocked]Notes
src/goal-plugin.js:97.55%lines /80.90%branches /96.43%funcs98.83%lines /84.56%branches /87.44%funcs/goalcommand/plugin context across--continueruns, so the live host verification is strongest for fresh-session command execution rather than multi-run history continuity.