Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions docs/qa/bugs/BUG-20260713-automation-delete-no-confirmation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# BUG-20260713-automation-delete-no-confirmation: Dynamic automations delete immediately without confirmation

- **Status:** verified
- **Impact (user-side):** Trust-Damage
- **Severity:** High · **Priority:** P1
- **Persona Affected:** Bruno
- **Journey Step:** J-24 delete one dynamic Job or Trigger
- **Scenarios:** TA-automation-crud-loop-target
- **Found:** 2026-07-13 · **Report:** docs/qa/reports/2026-07-13-automation-features.md

## Summary

The Job detail Delete action is an immediate destructive mutation. One click removed `software-delivery-qa`, including its schedule and run-history access point, without a confirmation dialog, named target context, explicit destructive confirmation, or undo. Trigger detail uses the same direct-delete interaction.

## Reproduction

1. Create and run a workspace-scoped dynamic Job.
2. Open its detail page and choose Delete once.
3. Observe that the Job disappears immediately and the catalog reports zero Jobs.

**Expected:** A destructive confirmation modal identifies the selected automation, Cancel preserves it, and an explicit Delete confirmation removes only that dynamic definition.
**Actual:** The first click performs the irreversible deletion with no confirmation state.

## Evidence

- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/ch-automation-job-delete-no-confirmation-before.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/ch-automation-job-delete-no-confirmation-after.dom.txt`
- The before DOM contains one enabled `Delete` button; the immediately following DOM contains `0 jobs found` and no dialog.

## Fix

- **Root cause:** The dynamic automation detail action invokes the delete mutation directly instead of owning a confirmation lifecycle.
- **Fix commit:** pending final whole-diff commit.
- **Regression test:** The canonical Job and Trigger detail suites own workspace-only visibility, typed-name gating, Cancel, one-shot confirmation, success navigation/cache invalidation, and failure preservation.

## Verification

- Same-persona browser replay passed for both object types. Job Delete opened a named dialog; Cancel and an incorrect name preserved `software-delivery-qa`; exact-name confirmation removed it once and a fresh catalog showed zero Jobs. Trigger Delete repeated the same safety lifecycle after its exactly-once delegated run, and a fresh catalog showed zero Triggers.
53 changes: 53 additions & 0 deletions docs/qa/bugs/BUG-20260713-background-session-indicator-title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# BUG-20260713-background-session-indicator-title: Live sessions lose identity and visibility across workspace switches

- **Status:** verified
- **Impact (user-side):** Friction
- **Severity:** High · **Priority:** P1
- **Persona Affected:** Théo
- **Journey Step:** J-11 return to a running session, steps 2–4
- **Scenarios:** RT-workspace-active-session-badge; RT-session-auto-title
- **Found:** 2026-07-13 · **Report:** docs/qa/reports/2026-07-13-automation-features.md
- **Origin:** Linear AGH-84

## Summary

Théo left a live Cursor/Grok turn running in the launch workspace and switched to `bench-ops`. The turn continued and its transcript was intact on return, but the workspace switcher showed no active count or running signal for the owning workspace after the one-time redirect toast disappeared. After two substantive real-provider turns and multiple workspace navigations, the session was still named `general` / `sess-b1c980b...` instead of receiving a useful automatic title.

## Reproduction

- **Charter:** CH-background-session-switch · **Tour:** Interrupt Tour
- **Environment:** desktop / wifi-fast / en-US; two isolated local workspaces; live Cursor/Grok 4.5 session.

1. Start a real task in `agh-automation-features-...-lab` and wait for the session to show `running`.
2. Switch to the registered `bench-ops` workspace while the turn is in flight.
3. Wait for the redirect toast to expire and inspect both workspace buttons and the scoped Agents count.
4. Return to the owning workspace, reopen the session, and inspect the transcript and title after completion.

**Expected:** The non-active workspace button shows the exact live-session count/state, provides a durable return affordance, and the first meaningful task generates one concise title used consistently in topbar and lists.
**Actual:** Background execution survived and the owning workspace later showed `Agents 1/4`, but the neighboring workspace exposed no persistent signal after the toast expired. The title remained the generic agent name/raw session id after two completed turns.

## Evidence

- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/ch-background-session-no-workspace-indicator.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/ch-background-session-no-persistent-indicator.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/ch-new-session-grok-transcript.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-final-replay-20260713-20260713-194432-535561-lab/qa-artifacts/qa/screenshots/rt-agh84-onboarding-session-counted-as-user.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-post-onboarding-fix-20260713-20260713-203513-816377-lab/qa-artifacts/qa/screenshots/rt-agh84-onboarding-system-badge-one-fixed.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-post-onboarding-fix-20260713-20260713-203513-816377-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-fixed.dom.txt`
- Session `sess-b1c980b86709053d` completed the background turn in 9 seconds and retained the full transcript.

## Fix

- **Root cause:** Confirmed at three independent owners. The session manager never persisted a meaningful `Name` for an unnamed user session after its first authored task, so topbar/catalog fallbacks exposed the agent name or raw ID. Separately, the shell queried only the selected workspace and had no workspace-scoped session-catalog lifecycle wake, so it could not reconcile exact inactive-workspace user-session counts. Public catalogs originally lacked an exact session-type filter; the final replay then proved that filtering is insufficient while the onboarding wizard creates its internal implementation session as `type=user`.
- **Fix commit:** pending final whole-diff commit.
- **Regression test:** Manager ownership covers one persisted automatic title after the first meaningful user task. `internal/session/query_test.go` now proves at the authoritative creation boundary that the managed onboarding agent is persisted as `system`, a normal agent remains `user`, `type=user` returns exactly the normal session, and the all-type operational page retains both. HTTP/UDS/CLI/native-tool catalog suites cover exact `type=user`, workspace-scoped wakes, durable removal, and reconnect snapshots. Web route/layout/cache/stream suites cover per-workspace isolation, exact totals, return links, title fallbacks, and internal-session exclusion. The new correction passed its directed red/green, the complete `internal/session` race suite, and the canonical four-test Web onboarding hook suite; final live replay remains pending.

## Verification

- Same-persona live replay passed in a fresh post-fix lab with real Cursor/Grok 4.5. Onboarding session `sess-8101d12c9aaa4db0` was persisted as `system`; the all-type active catalog retained it while `type=user` returned only the one authored session and the inactive `agh3` rail displayed exact count `1`. Two user sessions then received durable automatic titles and reciprocal Return links across `agh3` and `bench-ops`; both direct session-to-session returns converged to the correct URL, selected workspace, banner, and transcript without a Loading loop. Stopping the bench session removed its badge immediately, deleting it through the confirmation modal reset Sessions to `0`, direct read returned 404, and the user-only active catalog returned to total `1`. System onboarding exclusion is therefore verified from creation through UI aggregation; task-role and Goal-judge exclusions remain owned by their dedicated scenarios.

## Re-found (2026-07-13)

In the fresh final-replay lab, onboarding created internal Cursor session `sess-cdd8a43c9902d4be` but persisted it as `type=user`. After Théo created one real user session and switched to `bench-ops`, the inactive `agh3` rail reported `2 active sessions` instead of `1`. A fresh public session-catalog read independently returned the same two `type=user` rows. The internal-session-exclusion branch is therefore reopened at the creation/classification boundary; the title and durable return-link branches remain accepted.

The serialized GPT-5.6-SOL/high correction now reconciles the final session type after authoritative agent resolution and before lineage, metadata, and catalog persistence. `onboarding` is the only managed internal agent name and now becomes the existing `system` class; ordinary user agents preserve their requested normalized type. The fresh onboarding replay proved the visible count and public catalog boundary, so this re-found branch is verified.
52 changes: 52 additions & 0 deletions docs/qa/bugs/BUG-20260713-cross-workspace-session-return-hangs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# BUG-20260713-cross-workspace-session-return-hangs: Returning to a second workspace can retain stale identity and hang the session route

- **Status:** verified
- **Impact (user-side):** Blocks-Completion
- **Severity:** Critical · **Priority:** P0
- **Persona Affected:** Théo
- **Journey Step:** J-11 return to a running session, steps 3–4
- **Scenarios:** RT-workspace-active-session-badge; RT-session-auto-title
- **Found:** 2026-07-13 · **Report:** docs/qa/reports/2026-07-13-automation-features.md
- **Origin:** AGH-84 residual found during controller acceptance

## Summary

Two live Cursor/Grok 4.5 user sessions were running simultaneously in the launch workspace and `bench-ops`. The first cross-workspace return link correctly selected the launch workspace and opened its exact latest session. Clicking the reciprocal return link for `bench-ops` changed the URL and active workspace, but the banner retained the launch-workspace session identity and the route stayed in `Loading` indefinitely. Reloading the same permalink and opening clean tabs subsequently blocked browser navigation and DOM access.

## Reproduction

- **Charter:** CH-background-session-switch · **Tour:** Interrupt Tour
- **Environment:** desktop / wifi-fast / en-US; isolated local daemon PID `57617`; live Cursor/Grok 4.5 (`Grok 4.5 (High, Fast)`) sessions.

1. In workspace `agh-automation-features-...-lab`, start session `sess-5ec18f5f2a13fe16` and send a meaningful prompt. Confirm the automatic title and exact inactive-workspace badge.
2. Switch to `bench-ops`, start session `sess-40e90687024bfb24`, and send another meaningful prompt.
3. Use the launch-workspace return link. Confirm its exact session ID, title, and reciprocal `bench-ops` badge.
4. Click the `bench-ops` return link.

**Expected:** The workspace selection, session permalink, banner identity, transcript, and loading lifecycle reconcile to `sess-40e90687024bfb24`; the page remains responsive.
**Actual:** The URL and selected workspace become `bench-ops` / `sess-40e90687024bfb24`, while the banner keeps the launch-workspace title from `sess-5ec18f5f2a13fe16`; `main` remains `Loading` for more than 12 seconds and subsequent reload/navigation commands hang.

## Evidence

- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/rt-agh84-two-workspace-badge-title.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-hang.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-residual.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-second-fix-failed.dom.txt`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-20260713-20260713-044543-173594-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-second-fix-state.json`
- `/Users/pedronauck/dev/qa-labs/agh-automation-features-post-onboarding-fix-20260713-20260713-203513-816377-lab/qa-artifacts/qa/screenshots/rt-agh84-cross-workspace-return-fixed.dom.txt`
- Source session: `sess-5ec18f5f2a13fe16`; destination session: `sess-40e90687024bfb24`; both created through the UI with real Cursor/Grok 4.5.

## Fix

- **Root cause:** Confirmed two-stage navigation race across the Return `Link`, Zustand workspace store, TanStack Router, and the session route guard. The original Return mutated the destination workspace before TanStack created pending navigation, so the source guard redirected. The typed-history correction removed that race, but incorrectly accepted the intent only for route `enter`. TanStack Router reuses the same file-route ID when only `$id` changes and therefore classifies the destination as `cause: "stay"`; the exact intent reached `history.state` but was discarded before loader selection. The globally unique `byId` lookup, workspace-scoped detail/transcript keys, and catalog/live-tail SSE lifecycles were audited and were not the cause.
- **Fix commit:** pending final whole-diff commit.
- **Regression test:** A canonical real-Router suite now exercises actual `Link` → history → `beforeLoad` → loader → Query → Zustand ordering. Its red state observed `cause: "stay"`, correct typed history, a primary loader result, and a still-bench store. Return now consumes the exact current history intent for committed `enter` or `stay` navigation, never preload, only after resolved ownership and live-workspace validation agree. A second assertion proves that a following navigation without state inherits no authority. Post-deslop evidence: 2 files / 37 focused tests, 7 files / 147 adjacent tests, full Web (396 files / 3,406 tests), Web typecheck, exact oxfmt, zero-warning oxlint, and diff-check all passed.

## Verification

- **Rejected first fix:** after the Browser surface was reopened, the exact primary → `bench-ops` reciprocal return still reproduced the defect. The destination URL and `bench-ops` workspace committed, but the primary title remained in the banner and `main` was still `Loading` after five seconds. That first pending-route-only fix is rejected by live evidence.
- **Current source:** the third correction is source-frozen with the real-Router red/green proof and full Web evidence above. A new exact primary ↔ `bench-ops` Browser replay remains mandatory before this bug can become `verified`.
- **Rejected second fix:** a clean Browser run opened `sess-40e90687024bfb24` directly and rendered its bench title/transcript correctly. Clicking the exact primary-workspace Return link then committed the primary permalink, but the selected workspace and banner remained on `bench-ops` and `main` stayed `Loading` beyond five seconds. The live Vite process was serving the current source tree, so the history-intent implementation is rejected by authoritative end-user evidence and requires another root-cause pass.
- **Second-fix state evidence:** the committed history entry contains the correct typed intent (`sess-5ec18f5f2a13fe16` / `ws_06366aad69887872`), while persisted `agh:active-workspace` still contains the bench workspace (`ws_74a58ac2bf973937`). This narrows the residual to intent consumption/route lifecycle rather than Link-state transport.
- **Browser handoff:** Vite was restarted with the same proxy to remove the contaminated renderer, and the new Web PID is registered in the QA envelope. A later health check found the previous daemon had independently exited; it was restored with the exact same `AGH_HOME`, port, database, and binary, and `/api/status` is healthy again. Crash recovery classified both formerly active test sessions as stopped/`agent_crashed`, while retaining their titles and transcripts, so the active-badge replay will reattach them or create fresh real Cursor/Grok sessions. The controlled tab became Browser Use's native `data:` connection-refused interstitial during the restart. Browser security policy blocks controlling or navigating from it and forbids alternate-surface workarounds, so the user must close/reload that interstitial and reopen localhost before the controller can perform the clean replay.
- **Accepted third fix:** a fresh post-fix lab created real Cursor/Grok 4.5 user sessions `sess-84c5282a292e7f0f` in `agh3` and `sess-0c73989a7e97390b` in `bench-ops`. Direct `bench-ops → agh3` and reciprocal `agh3 → bench-ops` Return clicks both converged to the exact target permalink, selected workspace, persisted automatic title, and original transcript in under five seconds, with no stale banner or Loading loop. One earlier click fell back to the destination agent overview without hanging, but immediate direct repetitions in both directions reached the exact sessions; the original blocking behavior is not reproducible. Stop/delete then removed the bench badge and session durably.
Loading
Loading