Skip to content

fix(triaging-feedback): dp#8 ultrareview — fence the raw feedback quote (6 of 7 findings overtaken by the ticket-only redesign) - #58

Merged
SSFSKIM merged 3 commits into
mainfrom
fix/triage-ultrareview-findings
Aug 11, 2026
Merged

SSFSKIM merged 3 commits into
mainfrom
fix/triage-ultrareview-findings

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

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, and route.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

# Finding Disposition
1 Markdown injection via feedback body FIXED here — see below
2 Empty-diff fix passes the gate, then git commit crashes Moot — enforceGate, diffLines, changedFiles and openFixPr are all deleted. gate.ts is now routeTicket, which never sees a diff.
3 rootCauseCited regex /\S+:\d+/ too weak (TODO:99 passes) Already fixed by the redesign — gate.extractFileCitations strips the :line tail and keeps only path-shaped tokens (slash or extension). Covered by gate.test.ts ("rejects token:number that is not a file path (unknown:12)", and the R2 demotion test).
4 Ticket paths key off row.category instead of verdict.resolved_category Already fixed — the gate-fail ticket site is gone; registerTicket maps resolved_category === 'bug' ? 'bug' : 'enhancement', and descriptiveLabels already reads v.resolved_category. The review's requested test (a row reclassified other → question still gets type:question) was the one genuinely uncovered branch, so it is added here as a regression pin — it passed green on first run.
5 Post-build changes bypass the gate Moot — there is no build and no second git add -A; the worktree is detached, read-only, and never built.
6 Push-succeeded / PR-create-failed retry deadlock Moot — sideEffects.ts contains no push and no gh pr create. The artifacts are issues and issue comments.
7 SKILL.md misdescribes preRoute ordering Already resolved — preRoute/route.ts no longer exist and the sentence went with them. SKILL.md's source table now describes routeTicket. Verified by grep: no preRoute anywhere in the skill.

The one real fix (finding 1)

composeTicketBody quoted the raw feedback with > per line. GitHub parses markdown inside blockquotes, so untrusted feedback text still reaches out of its own quote: an @mention notifies that account the instant the ticket is registered, and a #N opens a cross-reference on an unrelated issue. (Closes #N is 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, since registerTicket and the dup-merge commentOnIssue compose 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:

  • multi-line body with Closes #999 / @maintainer / #12 → payload sits inside the fence, and none of those tokens appear outside it
  • body containing its own triple-backtick fence → wrapped in a longer fence, no escape
  • dup-merge comment body gets the same treatment

Two 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 --noEmit clean, tests/implementing/test-protocol-content.sh passes, scripts/lint-shell.sh reports no shell files touched.

🤖 Generated with Claude Code

https://claude.ai/code/session_0128mSWa83uivFbDre31YNTf

…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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +158 to +161
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@SSFSKIM
SSFSKIM merged commit 0bd011d into main Aug 11, 2026
@SSFSKIM
SSFSKIM deleted the fix/triage-ultrareview-findings branch August 11, 2026 10:07
SSFSKIM added a commit that referenced this pull request Sep 14, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant