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
When every sentence of a review's narrative trips the public-safety sanitizer (routine for PRs touching this project's own scoring/gate code — an honest sentence says "score"/"ranking"), the published panel has no real summary. #9806 fixed the misattribution (it no longer claims a provider failure, and withheld-blockers vs clean-result get distinct honest sentences), but the reader still gets a fixed placeholder rather than a genuine summary.
Maintainer requirement: a real review summary every time — including clean, merge-ready PRs, where the summary is the merge-readiness indicator. Measured volume: 35 PRs held ai_review_inconclusive in 14 days; the withheld-narrative subset of those is the target.
Design
When composeAdvisoryNotes reaches the withheld-narrative branch (parse succeeded, nothing survived sanitization), make one additional small LLM call: rewrite the already-produced narrative for a public audience with a prompt that names the forbidden vocabulary classes, then run the rewrite through the same toPublicSafeBySentence sanitizer. Publish it only if it survives; otherwise keep #9806's honest fixed sentence as the floor.
Properties:
Never-echo preserved: the regenerated text passes the identical sanitizer gate before publication; the fixed sentence remains the fail-safe.
Bounded cost: fires only on the withheld branch (~2-3/day observed), one small completion each.
No new config: pure behavior improvement; self-hosters get it with the image.
Scope
regeneratePublicSafeSummary(review, sanitizer) in src/services/ai-review.ts — prompt, single attempt, sanitize, fall back.
Telemetry: ai_review_summary_regenerated (success/fallback) so the regeneration rate is observable.
Tests: regeneration survives the sanitizer → published; regeneration itself trips the sanitizer → fixed sentence; blockers-withheld case never reads clean.
Problem
When every sentence of a review's narrative trips the public-safety sanitizer (routine for PRs touching this project's own scoring/gate code — an honest sentence says "score"/"ranking"), the published panel has no real summary. #9806 fixed the misattribution (it no longer claims a provider failure, and withheld-blockers vs clean-result get distinct honest sentences), but the reader still gets a fixed placeholder rather than a genuine summary.
Maintainer requirement: a real review summary every time — including clean, merge-ready PRs, where the summary is the merge-readiness indicator. Measured volume: 35 PRs held
ai_review_inconclusivein 14 days; the withheld-narrative subset of those is the target.Design
When
composeAdvisoryNotesreaches the withheld-narrative branch (parse succeeded, nothing survived sanitization), make one additional small LLM call: rewrite the already-produced narrative for a public audience with a prompt that names the forbidden vocabulary classes, then run the rewrite through the sametoPublicSafeBySentencesanitizer. Publish it only if it survives; otherwise keep #9806's honest fixed sentence as the floor.Properties:
Scope
regeneratePublicSafeSummary(review, sanitizer)insrc/services/ai-review.ts— prompt, single attempt, sanitize, fall back.ai_review_summary_regenerated(success/fallback) so the regeneration rate is observable.