feat(suggested-fix): add applied_pending status for deferred verification #156

Merged
chihlasm merged 4 commits from feat/fix-pending-verification into main 2026-05-01 03:42:10 +00:00
Owner

Summary

Adds a fourth, non-terminal outcome to the suggested-fix banner: Awaiting verification. 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.

What ships

Backend

  • New non-terminal status applied_pending parallel to applied_partial. Pending = "applied fully, verification deferred"; partial = "applied some of it." Distinct semantics, distinct prose.
  • New pending_reason column (nullable Text) — required when outcome=applied_pending. Stores the "what are you waiting on?" reason.
  • Outcome endpoint allows pending in/out transitions; pending stamps applied_at but NOT verified_at.
  • Resolution-note generator frames pending as provisional resolution (no closure language).
  • Escalation-package generator surfaces pending verification as the leading hypothesis with a reference to what's being waited on, and instructs the next engineer to confirm the fix held.
  • Migration: add column + extend status CHECK constraint.

Frontend

  • New BannerMode = 'pending' + PendingBanner component (info-tone, mirrors PartialBanner) with worked / didn't / update-reason / dismiss actions.
  • VerifyingBanner overflow menu adds "Waiting to verify…".
  • NudgeBanner "Still checking" button now records applied_pending with a reason instead of just silencing for the session — closes the loop semantically.
  • AssistantChatPage banner-mode derivation maps applied_pending → 'pending'.

Out of scope (intentionally)

  • Cross-session "Follow-ups" dashboard rollup. The chat-anchored PendingBanner is the per-session reminder. Add the dashboard surface only if engineers report losing track across multiple pending sessions.
  • Optional follow-up timer ("remind me in 30m"). Nice but not the wedge.

Test plan

  • 21/21 backend tests pass (backend/tests/test_fix_outcome_endpoint.py), including 4 new tests covering: applied_pending requires notes, pending stores reason + applied_at but not verified_at, pending→success transition allowed, pending_reason updates on re-PATCH.
  • tsc --noEmit clean for the app config.
  • Alembic migration applies cleanly (alembic upgrade heads).
  • Browser QA: verify "Waiting to verify…" overflow option, PendingBanner rendering with pending_reason, and the nudge "Still checking" → pending flow in the dev environment.

🤖 Generated with Claude Code

## Summary Adds a fourth, non-terminal outcome to the suggested-fix banner: **Awaiting verification**. 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. ## What ships **Backend** - New non-terminal status `applied_pending` parallel to `applied_partial`. Pending = "applied fully, verification deferred"; partial = "applied some of it." Distinct semantics, distinct prose. - New `pending_reason` column (nullable Text) — required when outcome=applied_pending. Stores the "what are you waiting on?" reason. - Outcome endpoint allows pending in/out transitions; pending stamps `applied_at` but NOT `verified_at`. - Resolution-note generator frames pending as provisional resolution (no closure language). - Escalation-package generator surfaces pending verification as the leading hypothesis with a reference to what's being waited on, and instructs the next engineer to confirm the fix held. - Migration: add column + extend status CHECK constraint. **Frontend** - New `BannerMode = 'pending'` + `PendingBanner` component (info-tone, mirrors `PartialBanner`) with worked / didn't / update-reason / dismiss actions. - `VerifyingBanner` overflow menu adds **"Waiting to verify…"**. - `NudgeBanner` "Still checking" button now records `applied_pending` with a reason instead of just silencing for the session — closes the loop semantically. - `AssistantChatPage` banner-mode derivation maps `applied_pending → 'pending'`. ## Out of scope (intentionally) - Cross-session "Follow-ups" dashboard rollup. The chat-anchored `PendingBanner` is the per-session reminder. Add the dashboard surface only if engineers report losing track across multiple pending sessions. - Optional follow-up timer ("remind me in 30m"). Nice but not the wedge. ## Test plan - [x] 21/21 backend tests pass (`backend/tests/test_fix_outcome_endpoint.py`), including 4 new tests covering: `applied_pending` requires notes, pending stores reason + applied_at but not verified_at, pending→success transition allowed, pending_reason updates on re-PATCH. - [x] `tsc --noEmit` clean for the app config. - [x] Alembic migration applies cleanly (`alembic upgrade heads`). - [ ] Browser QA: verify "Waiting to verify…" overflow option, `PendingBanner` rendering with `pending_reason`, and the nudge "Still checking" → pending flow in the dev environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chihlasm added 1 commit 2026-04-30 21:33:07 +00:00
feat(suggested-fix): add applied_pending status for deferred verification
Some checks failed
Mirror to GitHub / mirror (push) Has been cancelled
CI / backend (pull_request) Successful in 10m43s
CI / frontend (pull_request) Successful in 5m42s
CI / e2e (pull_request) Successful in 11m13s
00663a4734
Engineer applies a fix but can't verify yet (waiting on client power-cycle,
AD replication, async sync). Today the verifying banner forces a synchronous
verdict (worked / didn't / partial) — anything else means leaving the banner
stale or guessing wrong. This adds a fourth outcome that parks the fix in a
non-terminal "Awaiting verification" state with a reason ("waiting on what?")
and exposes it on the chat-anchored banner so the engineer doesn't lose track.

Backend
- New non-terminal status `applied_pending` parallel to `applied_partial`.
- New `pending_reason` column (nullable Text) — the "what are you waiting on?"
  prose, mirrors `partial_notes`. Required when outcome=applied_pending.
- Outcome endpoint allows pending in/out transitions; pending stamps
  applied_at but NOT verified_at (it's parked, not verified).
- Resolution-note + escalation-package 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.
- Migration: add column + extend status CHECK constraint.

Frontend
- New `BannerMode = 'pending'` + `PendingBanner` component (info-tone,
  parallel to PartialBanner) with worked / didn't / update-reason actions.
- VerifyingBanner overflow menu adds "Waiting to verify…".
- Nudge banner's "Still checking" button now actually records pending with
  a reason, instead of just silencing for the session.
- AssistantChatPage banner-mode derivation maps applied_pending → 'pending'.

Tests: 4 new integration tests covering pending notes requirement, reason
storage + applied_at/verified_at semantics, pending→success transition,
and pending_reason update on re-PATCH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chihlasm added 1 commit 2026-04-30 21:37:14 +00:00
docs(ai): refresh handoff for PR #156 — pending-verification feature
All checks were successful
Mirror to GitHub / mirror (push) Successful in 3s
CI / frontend (pull_request) Successful in 5m9s
CI / backend (pull_request) Successful in 9m51s
CI / e2e (pull_request) Successful in 9m22s
7cee7228dc
Closes out Escalation Mode (PR #155 merged) and pivots active task to
the new applied_pending suggested-fix outcome on PR #156.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chihlasm added 2 commits 2026-05-01 03:29:41 +00:00
- 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>
docs(ai): document docker-exec pattern for hosts without native toolchains
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
CI / frontend (pull_request) Successful in 4m57s
CI / e2e (pull_request) Successful in 10m10s
CI / backend (pull_request) Successful in 10m42s
15042af6e2
The code-server LXC has bun and docker but no python/node/npm on PATH,
which left Codex unable to reproduce build/test commands. Adds a 6-line
block to PROJECT_CONTEXT.md showing the docker exec resolutionflow_{backend,frontend}
form, and updates the AGENTS.md "Tooling you do NOT have" line to point
Codex at it instead of suggesting toolchain installs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chihlasm merged commit 3ba4532675 into main 2026-05-01 03:42:10 +00:00
Sign in to join this conversation.