fix(suggested-fix-pending): apply PR #156 review fixes
- Page-level Resolve patches applied_pending → applied_success before opening the resolution flow, so resolved sessions don't carry a provisional pending fix. - Page-level Escalate intercept now catches applied_pending in addition to verifying/partial; intercept copy generalized from "Verifying state" to "still needs an outcome." - PendingBanner gains a Dismiss action, matching the PR body and the backend's allowed pending → dismissed transition. - resolution_note_generator and escalation_package_generator system prompts no longer include real-looking pending examples (anti-parrot guardrail compliance). Verified via Docker: prompt anti-parrot 2/2, suggested-fix outcome suite 21/21, frontend tsc -b clean, npm run build clean. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
**Task:** Add a fourth, non-terminal outcome to the suggested-fix banner — **Awaiting verification** (`applied_pending`). Today the verifying banner forces a synchronous verdict (worked / didn't / partial), but a lot of real fixes are async — engineer ran the script but is waiting on the client to power-cycle, AD replication, an O365 license sync. Without a fourth state the banner sits stale or the engineer guesses wrong.
|
||||
|
||||
**Status:** ✅ **Engineering complete; PR #156 open.** Backend tests + tsc clean, Alembic migration applies. Pending browser QA.
|
||||
**Status:** ✅ **Engineering complete; PR #156 open.** Backend tests, prompt guardrail, frontend tsc/build clean; Alembic migration applies. Pending browser QA.
|
||||
|
||||
**Branch:** `feat/fix-pending-verification` (off `main` after the Escalation Mode merge).
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
| Schema | New `FixStatus="applied_pending"` + new `pending_reason` Text column on `session_suggested_fixes`. |
|
||||
| Migration | `c0f3a4b7e91d` — adds `pending_reason`, extends status CHECK constraint. |
|
||||
| API | `PATCH /suggested-fixes/{id}/outcome` accepts `applied_pending`, requires `notes`, stamps `applied_at` only (NOT `verified_at`). Pending in/out transitions allowed (parked, like partial). |
|
||||
| Generators | `resolution_note_generator` and `escalation_package_generator` system prompts handle the new status: resolution note frames the fix as provisional; escalation package surfaces pending verification as the leading hypothesis with reference to what's being waited on. |
|
||||
| Frontend | New `BannerMode='pending'` + `PendingBanner` component (info-tone, mirrors `PartialBanner`); "Waiting to verify…" overflow option in `VerifyingBanner`; nudge "Still checking" now records pending with a reason instead of just silencing; `AssistantChatPage` banner-mode derivation maps `applied_pending → 'pending'`. |
|
||||
| Tests | 4 new integration tests in `test_fix_outcome_endpoint.py`: pending-requires-notes, pending stores reason + applied_at-not-verified_at, pending→success transition, pending_reason update on re-PATCH. 21/21 pass. |
|
||||
| Generators | `resolution_note_generator` and `escalation_package_generator` system prompts handle the new status without real-looking examples; resolution note frames the fix as provisional; escalation package surfaces pending verification as the leading hypothesis with reference to what's being waited on. |
|
||||
| Frontend | New `BannerMode='pending'` + `PendingBanner` component (info-tone, mirrors `PartialBanner`) with worked / didn't / update reason / dismiss actions; "Waiting to verify…" overflow option in `VerifyingBanner`; nudge "Still checking" now records pending with a reason instead of just silencing; `AssistantChatPage` banner-mode derivation maps `applied_pending → 'pending'`; page-level Resolve/Escalate now handle pending honestly. |
|
||||
| Tests | 4 new integration tests in `test_fix_outcome_endpoint.py`: pending-requires-notes, pending stores reason + applied_at-not-verified_at, pending→success transition, pending_reason update on re-PATCH. 21/21 pass. Prompt anti-parrot guardrail passes. Frontend `tsc -b` and Vite build pass via Docker. |
|
||||
|
||||
## Out of scope (intentionally)
|
||||
|
||||
@@ -30,9 +30,12 @@
|
||||
1. Trigger a suggested fix, click Apply, then open the verifying banner overflow → "Waiting to verify…" → enter a reason → confirm `PendingBanner` renders with the reason.
|
||||
2. From `PendingBanner`, click "It worked" → confirm transition to terminal success and banner dismissal.
|
||||
3. From `PendingBanner`, click "Update reason" → confirm reason updates server-side.
|
||||
4. Trigger the nudge state (3+ post-apply messages) → click "Still checking" → enter a reason → confirm pending state takes over.
|
||||
4. From `PendingBanner`, click "Dismiss" → confirm banner dismissal and no terminal timestamps.
|
||||
5. Trigger the nudge state (3+ post-apply messages) → click "Still checking" → enter a reason → confirm pending state takes over.
|
||||
6. From a pending fix, use page-level Resolve → confirm the fix is patched to `applied_success` before the resolution note.
|
||||
7. From a pending fix, use page-level Escalate → confirm the outcome intercept appears before the conclude modal.
|
||||
|
||||
After QA passes, merge PR #156.
|
||||
After QA passes, commit/push the local review fixes and merge PR #156.
|
||||
|
||||
## Just-shipped (2026-04-30)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user