fix(orchestrate): shell-quote drill queries + sanitize the idea's inline-code span#13
Merged
Conversation
…ine-code span Review findings from the family round (both P2): - analyze's drill() embedded brief free-text into a copy-paste / subagent- executed shell line with only "->' sanitization — backticks and $() in a brief field survived into `--q "<query>"` (and orchestrate amplifies these lines into research.workflow.mjs prompts). Queries are now single-quoted (the only shell-inert quoting), an embedded ' is escaped as '"'"' and newlines flatten to a space. - the researcher contract interpolated the brief idea into a Markdown inline-code span verbatim — an interior backtick closed the span early. Backticks are stripped to apostrophes and newlines flattened before the span is built. - Family stale-id rule added to the worklist-driven fan-out contracts: claim-reviewer (if a PAIRS key is no longer in the worklist, skip it and say so in your note) and builder (same for a TASK id, in the summary). Golden snapshot updated only for the deliberate changes: single-quoted drill commands in the research workflow BATCHES and the stale-id sentence in claim-reviewer.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 9, 2026
## [1.11.1](v1.11.0...v1.11.1) (2026-07-09) ### Bug Fixes * **orchestrate:** shell-quote drill queries + sanitize the idea's inline-code span ([#13](#13)) ([087805a](087805a))
|
🎉 This PR is included in version 1.11.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Review findings fixed (family orchestrate round)
P2 — drill commands embedded brief free-text with only
"→'sanitization (src/analyze.tsdrill()). Backticks and$()in a brief field survived into the emitted--q "<query>"shell line — whichanalyzeprints for copy-paste andorchestrateamplifies intoresearch.workflow.mjssubagent prompts. Queries are now single-quoted (the only shell-inert quoting — backticks and$()never expand inside single quotes), an embedded'is escaped as'"'"', and newlines flatten to a space. Output is otherwise unchanged.P2 — a brief
ideawith backticks broke the researcher contract's inline-code span (src/orchestrate-templates.ts). An interior backtick closed the span early (and read as executable in copy-paste contexts). The interpolated idea now has backticks stripped to apostrophes and newlines flattened before the span is built.Family stale-id rule added to the worklist-driven fan-out contracts:
Tests (TDD — all 4 new/updated tests failed RED before the fix)
tests/analyze.test.ts: a hostile competitor name (pwn `whoami` $(id) and it's\nmultiline) must emit an inert, single-quoted drill command byte-for-byte; the existing gap test's expectation deliberately updated to--q 'Zzyzx'.tests/orchestrate.test.ts: a brief idea carrying backticks + a newline must render as ONE intact inline-code span inresearcher.md; both worklist-driven contracts must carry the stale-id sentence.BATCHES, stale-id sentence inclaim-reviewer.md).Suite: 465 tests green · typecheck · lint ·
check:build(bundle reproducibility) all pass.🤖 Generated with Claude Code