Repository navigation
Description
Finding
Source promotion review on rejected historical J EffortlessMetrics/ripr#1543 found a real mismatch between RIPR's advisory shell renderer and its canonical-route recovery parser.
loop_commands::shell_arg correctly documents bash single-quote semantics: \\ is literal inside single quotes. agent::command_specs::shell_words, however, handles \\ before quote-specific logic and therefore consumes a backslash even while parsing a single-quoted token.
The mechanism is present unchanged in W7 (83217e97…) and current swarm main.
Impact ruling after producer/executor audit
This parser is not dead code, but the supported W7 executable route does not expose the reviewed Windows-path shape:
- The producer-owned
agent_verify_command_spec/agent_receipt_command_specbuild machine-facingargs[]directly from semantic inputs. They do not recover argv fromdisplay. EvidenceRecordstill usesagent_command_spec_from_display, but only to recover the canonical verify route from the fixed producer constantripr agent verify --root . --before target/ripr/pilot/repo-exposure.json --after target/ripr/pilot/after.repo-exposure.json --json; those tokens contain no backslashes.- Gap-record and agent-packet projection now preserve the producer's existing typed
command_specs; they no longer reconstruct typed routes from arbitrary display text. - The explicit verification executor uses the recovery parser as a consistency check over packet display strings, then separately validates the before/after artifacts' provenance and recomputes the executable route with
agent_verify_command_spec(".", declared_before, declared_after, None). It never executes the display string or invokes a shell. - The architecture contract in slice(#1617 PR C): project typed CommandSpec routes into CLI, packets, and standard editor actions #1906 is already stricter: legacy strings are compatibility display and consumers must not treat display parsing as argv authority.
So the parser bug can reject/corrupt a future or direct legacy canonical-display shape containing single-quoted backslashes, but no supported W7 producer/executor route has been found that supplies such a shape. The original release-check weight was too strong.
Required correction
Make the bounded recovery parser agree with the renderer: inside single quotes, backslash is literal; outside single quotes retain the intended escape/rejection behavior. Keep this helper restricted to canonical compatibility recovery—do not turn it into a general shell parser or re-establish display text as machine authority.
Also add a drift test pinning the more important architecture law: producer-owned typed routes preserve their semantic Windows-like argv without going through shell_words.
Acceptance
- A focused test demonstrates the current/fixed single-quoted-backslash behavior through
agent_command_spec_from_display. - A single-quoted Windows-like token round-trips byte-for-byte in the bounded recovery helper.
-
agent_verify_command_specandagent_receipt_command_specpreserve the same semantic token directly inargs[]without display parsing. - Backslash behavior outside single quotes retains the intended escape semantics.
- Existing compound-command/metacharacter rejection remains fail closed.
- Embedded single-quote rendering/recovery remains correct.
- Verification execution continues to derive authority from validated artifacts + producer-owned
CommandSpec, never from shell execution of display text. - Focused command-spec/execution tests and the ordinary required gate pass.
0.11.0 disposition
Rolling compatibility-parser correctness, non-blocking for qualified W7. The audited W7 machine route uses direct typed argv and the only production recovery feed is canonical/repo-relative. Do not repin W7 for this parser defect. Re-escalate only if a supported public W7 producer is shown to emit an affected display shape into an authoritative route.
Activity
test(classify): build drive-prefixed fixture tokens at runtime (#3235 …
analysis(classify): fail closed on unscopable absolute related-test p…
fix(ux): harden host-aware quoting from review of #8152
fix(ux): clear four Windows path and quoting frictions (#8152)