You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/review/fix-handoff-render.ts and its integration into src/review/unified-comment-bridge.ts are the exact blueprint, verified directly:
The render layer is explicit that it must never re-derive safety — it trusts that gated emission already happened upstream (fix-handoff-render.ts:9-13), and produces a public-safe markdown block carrying its own HTML marker (FIX_HANDOFF_MARKER, fix-handoff-render.ts:34).
The bridge integration is a three-part splice, verified at the exact lines:
fixHandoffBlocks?: FixHandoffBlock[] | undefined on the args interface (unified-comment-bridge.ts:377)
the actual splice into the collapsible chain (unified-comment-bridge.ts:794-803) — every subsequent withX link must re-base off the new variable (withFixHandoff) or that section silently disappears from the final comment.
Requirements
New file src/review/e2e-test-gen-render.ts with a pure buildE2eTestGenBlock(s) function turning feat(review): LLM core to turn a PR diff into Playwright E2E test source #4191's generated test source into a public-safe markdown code block (fenced ```typescript, Playwright source only — never raw model chatter) with its own HTML marker, mirroring FIX_HANDOFF_MARKER's shape.
Splice into the collapsible chain immediately after the fix-handoff splice (unified-comment-bridge.ts:794-803), re-basing every subsequent withX link (e.g. withVisualFindings) off the new variable — get this wrong and the section silently vanishes with no error, so a rendering test that asserts the block actually appears in the final comment body is mandatory, not optional.
Unit + snapshot tests: block renders correctly when present, is fully absent (not an empty collapsible) when there's nothing to show, and every downstream section in the comment still renders after the splice.
Deliverables
src/review/e2e-test-gen-render.ts.
unified-comment-bridge.ts updated at all three touch points (args interface, collapsible builder, chain splice).
Tests proving the splice doesn't silently drop any existing section.
Expected outcome
A generated E2E test, once produced by #4191 and gated by #4192, renders as a collapsible, public-safe markdown block inside the same unified PR comment every other converged feature already posts into — no new comment, no new posting path.
Part of #4189. Depends on #4191, #4192.
Context
src/review/fix-handoff-render.tsand its integration intosrc/review/unified-comment-bridge.tsare the exact blueprint, verified directly:fix-handoff-render.ts:9-13), and produces a public-safe markdown block carrying its own HTML marker (FIX_HANDOFF_MARKER,fix-handoff-render.ts:34).fixHandoffBlocks?: FixHandoffBlock[] | undefinedon the args interface (unified-comment-bridge.ts:377)buildFixHandoffCollapsible(blocks)(unified-comment-bridge.ts:657)unified-comment-bridge.ts:794-803) — every subsequentwithXlink must re-base off the new variable (withFixHandoff) or that section silently disappears from the final comment.Requirements
src/review/e2e-test-gen-render.tswith a purebuildE2eTestGenBlock(s)function turning feat(review): LLM core to turn a PR diff into Playwright E2E test source #4191's generated test source into a public-safe markdown code block (fenced ```typescript, Playwright source only — never raw model chatter) with its own HTML marker, mirroringFIX_HANDOFF_MARKER's shape.e2eTestGenBlocks?: E2eTestGenBlock[] | undefinedtoUnifiedCommentBridgeArgsnext tofixHandoffBlocks(unified-comment-bridge.ts:377).buildE2eTestGenCollapsible(blocks)mirroringbuildFixHandoffCollapsible(unified-comment-bridge.ts:657).unified-comment-bridge.ts:794-803), re-basing every subsequentwithXlink (e.g.withVisualFindings) off the new variable — get this wrong and the section silently vanishes with no error, so a rendering test that asserts the block actually appears in the final comment body is mandatory, not optional.Deliverables
src/review/e2e-test-gen-render.ts.unified-comment-bridge.tsupdated at all three touch points (args interface, collapsible builder, chain splice).Expected outcome
A generated E2E test, once produced by #4191 and gated by #4192, renders as a collapsible, public-safe markdown block inside the same unified PR comment every other converged feature already posts into — no new comment, no new posting path.
Resources / examples
src/review/fix-handoff-render.ts(full file)src/review/unified-comment-bridge.ts:372-377, 657-660, 789-807Effort
M — mostly mechanical mirroring, but the splice-ordering test is easy to get subtly wrong.