fix(backlog): review-gate PipelineEngine coverage + pipeline-mode empty-state hint - #178
Merged
Merged
Conversation
… and surface an empty-pipeline-modes hint Closes the two remaining wiring gaps from docs/tasks/backlog-feature-improvement.md's 2026-07-19 audit (bucket [3], Recommended Next Actions #2/#3): - ReviewGateRunner.Run built its prompt via BuildReviewPrompt directly, bypassing PipelineEngine entirely — so a custom PipelineMode's ReviewPromptTemplate had zero effect on the automatic work->review transition most items actually go through (TriagePromptFor/InitialPromptFor/ReviewPromptFor were already wired; this was the one documented, acknowledged gap). Adds PipelineEngine.InteractiveReviewPromptFor, a tool-call-style ("submit_review_verdict") counterpart to the existing JSON-output ReviewPromptFor used by headless callers, and threads pipelineEngine through ReviewGateRunner/NewReviewGateRunner the same way triage/build already route through s.pipelineEngine, with the same nil-safe fallback to BuildReviewPrompt. - BacklogItemForm's pipeline-mode picker and the Settings nav link to /settings/pipeline-modes (commit 54a34cc) were already wired to the real ListPipelineModes RPC, but the fetch-succeeded-with-zero-modes state rendered identically to a broken/unfetched picker — a single "Default" button with nothing to compare it against, exactly the "clicking it does nothing" symptom the audit described from a live deployment with no modes yet authored. Adds a hint + link to Settings when zero enabled modes exist, so the empty state points at the fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BxNAMeGteuzNyN46Q4zAn1
Contributor
✅ Registry ValidationTest Coverage: 13/174 features have
|
Contributor
UX Analysis
|
Contributor
Go Benchmarks (Tier 1) |
Contributor
E2E RPC Latency |
Contributor
Frontend Terminal Throughput |
Contributor
🎬 E2E Feature Demos2 shard(s) recorded feature flows for this PR. recordings shard 1 Demo preview opens directly in browser (single-file HTML). Raw WebM recordings in ZIP. Expires after 30 days. |
Contributor
📊 Feature E2E CoverageFeature coverage report unavailable
|
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.
Summary
Two small, related wiring fixes closing the last gaps flagged in
docs/tasks/backlog-feature-improvement.md's 2026-07-19 audit (bucket [3],Recommended Next Actions #2/#3) for the already-shipped
PipelineMode/PipelineEnginefeature.
Automatic review gate now routes through
PipelineEngine.TriagePromptFor,InitialPromptFor, andReviewPromptFor(headless re-review) were already wiredthrough
s.pipelineEngine, but the automatic work→review transition — the pathmost items actually go through — built its prompt via
BuildReviewPromptdirectly(
session/review_gate.go), a documented, acknowledged gap (old comment atreview_gate.go:259-268). AddsPipelineEngine.InteractiveReviewPromptFor, atool-call-style (
submit_review_verdict) counterpart to the existing JSON-outputReviewPromptForused by headless callers, and threadspipelineEnginethroughReviewGateRunner/NewReviewGateRunnerthe same way triage/build already do, withthe same nil-safe fallback to
BuildReviewPrompt. A resolved custom mode'sReviewPromptTemplatenow actually drives the real review gate; mode authors mustinclude
submit_review_verdictcall instructions in that template themselves.Pipeline-mode picker: empty-state hint. Investigation found the picker
(
BacklogItemForm.tsx) and the Settings nav link to/settings/pipeline-modeswere already wired to the real
ListPipelineModesRPC (commit54a34cc4) — butwhen zero enabled modes exist, the fetch-succeeded-with-empty-list state rendered
identically to a broken/never-fetched picker: a single "Default" button with
nothing to compare it against. That's the exact "single greyed button, clicking it
does nothing" symptom the live audit described. Adds a hint + link to Settings
when zero modes exist, so the empty state actually points at the fix instead of
looking broken.
Changes
Backend
session/pipeline_engine.go— newInteractiveReviewPromptFormethod on thePipelineEngineinterface +CachingPipelineEngineimplementation. SharesReviewPromptTemplatewithReviewPromptFor(one logical "review prompt" field,not two).
session/review_gate.go—ReviewGateRunnergains apipelineEnginefield +constructor param, a nil-safe
reviewPromptForhelper mirroringBacklogService.reviewPromptFor's pattern, andRunnow calls it instead ofBuildReviewPromptdirectly.session/backlog_lifecycle.go:359—newListenerBasenow passes itspipelineEngineintoNewReviewGateRunner.Frontend
web-app/src/components/backlog/BacklogItemForm.tsx— adds ahasNoAvailableModesderived state and renders a "No custom pipeline modes existyet. Create one in Settings →" hint (linking to
/settings/pipeline-modes) whenthe fetch succeeds but returns zero enabled modes.
web-app/src/components/backlog/BacklogItemForm.css.ts— two new styles for thehint.
Tests
session/pipeline_engine_test.go— default/unresolved-fallback andresolved-custom-mode-render coverage for
InteractiveReviewPromptFor.session/review_gate_test.go— new regression test(
TestReviewGateRunner_RoutesPromptThroughPipelineEngine_When_ItemHasCustomPipelineMode)proving the real review session prompt is the custom mode's rendered template, not
the hardcoded
BuildReviewPromptcontent.web-app/src/components/backlog/BacklogItemForm.test.tsx— two new tests for theempty-modes hint (shown when zero modes / hidden when modes exist).
Registry
docs/registry/features/frontend/backlog-pipeline-mode-selector.json— markedtested: truewith the actual Jest test IDs (was previouslytested: falsewithno
testIdsdespite existing coverage).Test plan
go test ./session/... ./server/services/...— all pass exceptTestStreamTerminal_SendsRawOutput(confirmed pre-existing/flaky: passes 3/3 inisolation, unrelated file).
make build— Go binary + Next.js web UI both build cleanly, including the new/settings/pipeline-modesroute.make lint— clean except pre-existingsession/unfinished/gogitstore/*_test.gofindings (untouched by this change, directory is a known WIP prototype).
cd web-app && npx jest --no-coverage— all pass except 2 pre-existing unrelatedfailures (
SessionDetail.embedded.test.tsx,BacklogEmptyState.test.tsx) infiles this PR does not touch.
BacklogItemForm— picker selection, empty-state hint, error/loading statesReviewGateRunner— custom-mode prompt routing, nil-pipelineEngine fallback🤖 Generated with Claude Code
https://claude.ai/code/session_01BxNAMeGteuzNyN46Q4zAn1