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
Execute PRP-41 — the fourth and FINAL slice of the /showcase upgrade epic (PRP-38..41).
What ships
Two new pipeline phases on scenario="showcase_rich":
agents phase → agent_hitl_flow step: drives the experiment agent through save_scenario (already in agent_require_approval), exercising the HITL approval round-trip end-to-end via the existing POST /agents/sessions, /chat, /approve, DELETE /agents/sessions/{id} endpoints.
ops phase → ops_snapshot step: snapshots /ops/summary + /ops/retraining-candidates + /ops/model-health into a small KPI grid in its step card.
Plus cross-cutting /showcase UI polish:
Top KPI strip + Inspect-Artifacts post-run panel + localStorage-backed run history strip (capped at 5, keyed forecastlab.showcase.runs.v1).
Backend contracts are read-only. Zero new endpoints, zero new schemas. Every new payload key rides inside StepEvent.data: dict[str, Any].
Vertical-slice rule.app/features/demo/ MUST NOT import from app/features/{agents,ops,registry,scenarios,rag}/. Both new steps drive their slices over httpx.ASGITransport.
Phase table uses RELATIVE ANCHORS — swap agent → agent_hitl_flow at the same position (after verify, before cleanup); insert ops_snapshot immediately after agents, before cleanup. Never "at row index N".
No new tables, no Alembic migrations.
Skip gracefully on missing LLM key — step_agent_hitl_flow calls _llm_key_present() first and emits skip when False.
Contract probe (PRPs/ai_docs/prp-41-contract-probe-report.md) MUST verify every cited backend field-for-field. Several keys in INITIAL-41 drifted on dev:
Approval body field is action_id (NOT tool_call_id)
Chat response surfaces approval via pending_approval: bool + pending_action: PendingAction (NOT an approval_required event — that event fires only on the WS streaming /agents/stream path)
STOP and patch the PRP if any cite drifts.
Out of scope
Listed explicitly in PRP-41 § "Out of Scope" (lines 273-299). No new backend endpoints, no new tables, no migrations, no scope creep into PRP-42.
Execute PRP-41 — the fourth and FINAL slice of the
/showcaseupgrade epic (PRP-38..41).What ships
Two new pipeline phases on
scenario="showcase_rich":agentsphase →agent_hitl_flowstep: drives the experiment agent throughsave_scenario(already inagent_require_approval), exercising the HITL approval round-trip end-to-end via the existingPOST /agents/sessions,/chat,/approve,DELETE /agents/sessions/{id}endpoints.opsphase →ops_snapshotstep: snapshots/ops/summary+/ops/retraining-candidates+/ops/model-healthinto a small KPI grid in its step card.Plus cross-cutting
/showcaseUI polish:forecastlab.showcase.runs.v1).DemoPhasePanelonValueChangefix → closes issue fix(ui): unlock showcase phase accordion after completion #311.Hard invariants (load-bearing)
StepEvent.data: dict[str, Any].app/features/demo/MUST NOT import fromapp/features/{agents,ops,registry,scenarios,rag}/. Both new steps drive their slices overhttpx.ASGITransport.agent → agent_hitl_flowat the same position (afterverify, beforecleanup); insertops_snapshotimmediately afteragents, beforecleanup. Never "at row index N".step_agent_hitl_flowcalls_llm_key_present()first and emitsskipwhen False.Prerequisites (ALL on
dev)POST /seeder/phase2-enrichment)Task 1 is the gate
Contract probe (
PRPs/ai_docs/prp-41-contract-probe-report.md) MUST verify every cited backend field-for-field. Several keys in INITIAL-41 drifted ondev:ModelHealthEntry.drift_direction(NOTdrift_verdict)action_id(NOTtool_call_id)pending_approval: bool+pending_action: PendingAction(NOT anapproval_requiredevent — that event fires only on the WS streaming/agents/streampath)STOP and patch the PRP if any cite drifts.
Out of scope
Listed explicitly in PRP-41 § "Out of Scope" (lines 273-299). No new backend endpoints, no new tables, no migrations, no scope creep into PRP-42.
References
PRPs/PRP-41-showcase-agent-ops-polish.mdonValueChangebug)