Repository navigation
fix(triaging-feedback): dp#8 ultrareview — fence the raw feedback quote (6 of 7 findings overtaken by the ticket-only redesign) - #58
Conversation
…till fires @mention/#N The dispatcher's provenance block quoted the raw feedback body with `> ` per line. GitHub parses markdown inside blockquotes, so an `@mention` in feedback text notifies that account the moment the ticket is registered and a `#N` opens a cross-reference on an unrelated issue — the least-trusted input in the system reaching out of its own quote. Inside a code fence nothing is parsed. fenceRaw() sizes the fence one backtick longer than the longest run in the body, so feedback carrying its own ``` cannot close the fence and escape. Applies to both artifact paths (registerTicket body, dup-merge comment) since each composes through composeTicketBody. From the dp#8 ultrareview. Six of that review's seven findings no longer have a subject: the 2026-07-11 ticket-only redesign (82b51c7) deleted the workspace-write fix turn, openFixPr, diffStat/buildAndTest and route.ts, and rewrote the citation regex and the category mapping the review flagged. Only the raw-body embedding survived, in mutated form. Added the reclassification label pin (other -> question) the review asked for; it was already green.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00dea1ae2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| provenance block — the raw feedback inside a code fence, explicitly marked as | ||
| data — so a downstream implement worker always sees the trust boundary inside | ||
| the ticket and no `@mention` or `#N` in the original ever fires as live | ||
| markdown on the artifact. |
There was a problem hiding this comment.
Fence the Worker-mode provenance too
When feedback is handled by the active event-driven cloud routine, it follows Worker mode rather than dispatchRow (docs/doperpowers/2026-07-12-routine-triage-fast-path.md:3-20), but that contract still directs the worker to place the verbatim original in a “quoted block” (SKILL.md:79-86) and never requires the variable-length code fence added here. Consequently, user-supplied @mention and #N text can remain live on the routine-created issue even though these changed lines promise otherwise; update the Worker-mode registration contract and add a cloud-worker behavior eval, not only dispatchRow unit tests.
AGENTS.md reference: AGENTS.md:L1-L1
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in 1e27ebc4. The finding is correct: dispatch.ts is not the only dispatcher, and the one that's actually live on ida-solution feedback is the cloud routine running Worker mode, where the registration contract is prose rather than code. Fencing the TypeScript path while leaving that contract saying "verbatim original in a quoted block" meant routine-created issues kept firing exactly the @mention and #N this PR claims to neutralize.
Worker-mode contract (SKILL.md, the board-register.sh body step). Now directs the code fence, states why a blockquote is not sufficient (GitHub parses markdown inside > quotes), and specifies the variable fence length — one backtick longer than the longest run in the body — so a worker can comply without reading src/dispatch.ts. Same semantics as fenceRaw(), expressed as something followable.
docs/doperpowers/2026-07-12-routine-triage-fast-path.md: no edit needed. Checked it. It's a design record of the wiring (Supabase trigger → net.http_post → routine fire) and the routine/poller division of labor. It routes to Worker mode ("runs the triaging-feedback skill's Worker mode") rather than restating the registration contract — grep for provenance|quoted block|verbatim returns nothing in it. Editing it would have duplicated the contract into a second place that can drift.
On the eval ask — I did not build a tmux behavior eval, and I don't think one is warranted here. Reasoning, so you can overrule it: what changed is a directive's wording, and the failure mode is a future edit quietly reverting it to "quoted block", not a worker misreading an unambiguous instruction. A content pin catches that regression deterministically, in milliseconds, on every run. A behavior eval would spend a real cloud session to confirm a model can follow an explicit instruction it has in context — high cost, and it answers a question I'm not actually uncertain about.
The case where I would want a real eval is different: if we had evidence that workers drop provenance formatting under load, or if the fence had to be derived rather than stated. Neither holds. If you disagree, the honest place to spend that budget is a broader Worker-mode compliance eval covering the whole gate (idempotency, demotion, park notes) — the fence is not the weakest link in that contract, and testing it alone would be an odd place to start.
So: pinned in tests/implementing/test-protocol-content.sh next to the existing triage doctrine asserts, with three assertions — the fence directive with its untrusted-data framing, the explicit blockquote rejection, and the variable fence length. Proved red first by reverting SKILL.md with the test in place (3 failures), then green.
Tests: 109 passed (109) in the skill's vitest suite, tsc --noEmit clean, test-protocol-content.sh all passing, lint-shell.sh clean on the one shell file touched.
dispatch.ts is not the only dispatcher. The live event-driven path — the cloud routine on ida-solution feedback INSERT (docs/doperpowers/ 2026-07-12-routine-triage-fast-path.md) — runs Worker mode, where the registration contract is prose, not code. That contract still said "verbatim original in a quoted block", so every routine-created issue kept firing the exact `@mention` and `#N` the TypeScript path had just been taught to neutralize. The Worker-mode step now directs the fence, why a blockquote is not enough (GitHub parses markdown inside `>` quotes), and the variable fence length, so a worker can follow it without reading src/dispatch.ts. Pinned in tests/implementing/test-protocol-content.sh, alongside the other triage doctrine asserts — prose is behavior on this path, and a silent revert to "quoted block" is a live security regression, not a wording change. The fast-path doc is a design record that routes to Worker mode rather than restating the contract, so it needed no edit.
The marketplace updates by version number alone, so a feature merged under a number the cache already holds never installs. 7.87.0 was claimed by main's 7.88.0/7.89.0 run (and by the in-flight #58 branch); this clears both.
What this actually is
Source: the ultrareview on dp#8 (the triaging-feedback re-landing PR, merged 2026-07-09), which raised seven findings against the skill's fix-PR design.
Two days after that review, commit
82b51c78(2026-07-11, "redesign(triaging-feedback): ticket-only") deleted the subsystem most of the findings live in — the workspace-write fix turn,renderFixPrompt, the G3–G6 diff gate,diffStat/buildAndTest,openFixPr,TRIAGE_FIX_ENABLED, androute.ts. The worker now diagnoses read-only and authors a ticket; the board pipeline does the fixing.So this PR carries one code change, not seven. The rest are documented below with the evidence that they no longer have a subject. The requested PR title (gate lower-bound / post-build re-gate / lease push) was not used, because none of those three changes are in this diff.
Finding dispositions
git commitcrashesenforceGate,diffLines,changedFilesandopenFixPrare all deleted.gate.tsis nowrouteTicket, which never sees a diff.rootCauseCitedregex/\S+:\d+/too weak (TODO:99passes)gate.extractFileCitationsstrips the:linetail and keeps only path-shaped tokens (slash or extension). Covered bygate.test.ts("rejects token:number that is not a file path (unknown:12)", and the R2 demotion test).row.categoryinstead ofverdict.resolved_categoryregisterTicketmapsresolved_category === 'bug' ? 'bug' : 'enhancement', anddescriptiveLabelsalready readsv.resolved_category. The review's requested test (a row reclassifiedother→questionstill getstype:question) was the one genuinely uncovered branch, so it is added here as a regression pin — it passed green on first run.git add -A; the worktree is detached, read-only, and never built.sideEffects.tscontains no push and nogh pr create. The artifacts are issues and issue comments.preRouteorderingpreRoute/route.tsno longer exist and the sentence went with them. SKILL.md's source table now describesrouteTicket. Verified by grep: nopreRouteanywhere in the skill.The one real fix (finding 1)
composeTicketBodyquoted the raw feedback with>per line. GitHub parses markdown inside blockquotes, so untrusted feedback text still reaches out of its own quote: an@mentionnotifies that account the instant the ticket is registered, and a#Nopens a cross-reference on an unrelated issue. (Closes #Nis inert now that the artifact is an issue rather than a PR body — closing keywords only fire from PR bodies and commits — but it costs nothing to neutralize.)Inside a code fence, GitHub parses nothing.
fenceRaw()sizes the fence one backtick longer than the longest backtick run in the body, so feedback carrying its own triple-backtick fence cannot close the fence and escape. Both artifact paths are covered, sinceregisterTicketand the dup-mergecommentOnIssuecompose through the same function.Note this is a mutated form of the reviewed bug: the reviewed code blockquoted only the first line (
> ${row.body}), which the redesign already changed to per-line quoting. The per-line version closes the "raw markdown below the quote" hole but not the "markdown inside the quote" one.Tests
RED first, on the three fencing tests:
Closes #999/@maintainer/#12→ payload sits inside the fence, and none of those tokens appear outside itTwo pre-existing assertions that pinned the blockquote rendering (
'> 줄1\n> 줄2','> 버튼이 안 눌려요') were updated to assert the fenced form, preserving their original intent (provenance present; dev code not leaked).109 passed (109),tsc --noEmitclean,tests/implementing/test-protocol-content.shpasses,scripts/lint-shell.shreports no shell files touched.🤖 Generated with Claude Code
https://claude.ai/code/session_0128mSWa83uivFbDre31YNTf