Brief UX and MCP progress notifications #7
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.40) × (1 − Review Confidence (0.31)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 279 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 18% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.337
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #7"
general
weight: 0.35
cursor[bot]
Generating a brief takes 10–30 s. This PR makes that wait visible, and makes every failure clear and recoverable.
MCP
_meta.progressTokenonbrief_for_joborbrief_from_job_postand accepttext/event-stream.- There's one notification per real phase (looking up the role, fetching the page, writing the brief), plus a heartbeat every 5 s with elapsed time, then the JSON-RPC response.
- Every other request is unchanged JSON.
- Requests the protocol gates would reject (bad Host, bad version, oversized body) keep their normal HTTP status.
- Not every client sends a progress token; the README says so.
Web
codewith every error, and the page reacts to it:- Link can't be fetched: the field clears, switches to "Paste the full job description here", and gets focus.
- Rate limited: the message links to the ready-made briefs.
- Brief already being written by another request: picked up automatically.
/api/briefchecked the rate limit before validating input, so junk requests used up a real caller's allowance. It now validates first, with a regression test. Both brief routes also refuse oversized bodies before reading them.budget_unavailable) instead of claiming it's used up.Verification
- the SSE stream returns
text/event-streamwith the phase notifications and the response- a call without a token stays JSON
- in a browser: the paste fallback clears, switches and focuses the field; a double-click sends 1 request; the job page shows progress and the budget message
🤖 Generated with Claude Code