Skip to content

fix(qa): stop treating deleted messages and failed streams as successful replies - #119660

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-visible-transport-evidence-20260805
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-visible-transport-evidence-20260805

Conversation

@steipete

@steipete steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where QA channel checks could pass using a deleted reply tombstone or accept a normal-looking streaming final even though the same account emitted an actionable failure.

Why This Change Was Made

Exclude deleted messages at the canonical bus message waiter and check canonical owned-account failure replies before applying streaming conversation/thread filters, while preserving outbound/account/cursor isolation.

User Impact

Channel verdicts now require a genuinely visible successful reply and fail immediately with the actual provider error instead of producing a false green.

Evidence

Authentic RED showed deleted tombstones resolving as visible messages and failure-before/failure-after streams passing. All 33 bus/transport tests now pass, including replacement delivery and stale/foreign/inbound controls. Actual mock-provider ephemeral Gateways passed channel-message-flows (preview -> final) and reaction-edit-delete, with four total Gateway scenarios passing. Full changed gate/build passed.

Integrated trusted-Testbox proof: 609 tests passed, including five real Chromium extension E2E cases; complete production/test typechecks, lint, plugin-boundary/generated-contract checks, private production build, and four actual ephemeral-Gateway scenarios all passed.

Owner/risk review: Private QA transport owner only; no plugin SDK, auth, config, public protocol, or persistence changes. Production net +6 lines justified by visible-message and account-owned failure invariants.

@steipete
steipete marked this pull request as ready for review August 5, 2026 15:00
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 5, 2026, 12:20 PM ET / 16:20 UTC.

ClawSweeper review

What this changes

The PR makes QA transport checks ignore deleted reply tombstones and reject actionable failures from the awaited account before accepting a streamed final reply.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open: its account-first failure check fixes the reported false-green path, but it still treats a failure reply that was later deleted as active and can produce a false failure.

Priority: P2
Reviewed head: 1aca8bfbacc1deebc8d2a496ef330ea484c2b7fd

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has strong focused intent and coverage, but the deleted-failure lifecycle case is a concrete correctness blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored QA PR is not subject to the external-contributor proof gate; the body nevertheless reports ephemeral-Gateway scenario runs and exact-head CI evidence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored QA PR is not subject to the external-contributor proof gate; the body nevertheless reports ephemeral-Gateway scenario runs and exact-head CI evidence.
Evidence reviewed 5 items Patch owner boundary: The PR correctly moves account-owned failure detection ahead of conversation and thread filtering, while retaining fresh-cursor and outbound-account isolation.
Deleted-failure lifecycle defect: Outbound-send events preserve a pre-delete message clone, while a later delete emits a separate tombstone; scanning every historical event sees the original failure before the tombstone and throws.
Existing lifecycle handling: The same waiter already resolves latest events for final-message selection, but the new failure loop runs before that lifecycle resolution.
Findings 1 actionable finding [P2] Ignore failures deleted later in the event stream
Security None None.

How this fits together

QA Lab records channel events in a bus and passes them to shared transport waiters that determine whether ephemeral-Gateway scenarios passed. Those waiters feed QA channel and Crabline scenario results.

flowchart LR
  A[Channel and provider events] --> B[QA event bus]
  B --> C[Lifecycle event history]
  C --> D[Shared transport waiter]
  D --> E{Visible final or active failure?}
  E -->|Visible final| F[Scenario passes]
  E -->|Failure or deletion| G[Scenario fails or waits]
Loading

Before merge

  • Ignore failures deleted later in the event stream (P2) - The loop checks each historical owned outbound event before resolving lifecycle state. A failure message is emitted as a non-deleted clone and later receives a separate delete event, so this throws on the old clone even though the failure is no longer visible. Resolve each message to its latest event before extracting failure text, and cover failure → delete → visible final.
  • Resolve merge risk (P1) - Without lifecycle-aware failure detection, a deleted provider-failure reply can fail a later otherwise-valid scenario and turn QA results false-red.
  • Complete next step (P2) - A narrow lifecycle-order repair and one regression test can address the remaining concrete defect without changing product direction.

Findings

  • [P2] Ignore failures deleted later in the event stream — extensions/qa-lab/src/qa-transport.ts:506-516
Agent review details

Security

None.

PR surface

Source +6, Tests +130. Total +136 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 19 13 +6
Tests 2 130 0 +130
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 149 13 +136

Review metrics

Metric Value Why it matters
Production vs test delta production +6 net; tests +130 The small production increase is justified by canonical visible-message and account-owned-failure invariants; the regression coverage is concentrated in QA transport tests.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Resolve each account-owned message to its latest lifecycle state before extracting failures, then retain only visible failures as terminal evidence.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Resolve each account-owned message to its latest lifecycle state before extracting failures, then retain only visible failures as terminal evidence.

Do we have a high-confidence way to reproduce the issue?

Yes—source establishes a deterministic sequence: emit an owned failure, delete that message, then emit a visible successful final; the new loop still reads the earlier non-deleted failure event.

Is this the best way to solve the issue?

No—the account-first scope is correct, but failure detection must use latest lifecycle state so a deleted failure cannot override a later visible success.

Full review comments:

  • [P2] Ignore failures deleted later in the event stream — extensions/qa-lab/src/qa-transport.ts:506-516
    The loop checks each historical owned outbound event before resolving lifecycle state. A failure message is emitted as a non-deleted clone and later receives a separate delete event, so this throws on the old clone even though the failure is no longer visible. Resolve each message to its latest event before extracting failure text, and cover failure → delete → visible final.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3d669c761666.

Labels

Label changes:

  • add P2: The patch corrects bounded internal QA verdict semantics, but the remaining defect can still create false scenario failures.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored QA PR is not subject to the external-contributor proof gate; the body nevertheless reports ephemeral-Gateway scenario runs and exact-head CI evidence.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: The patch corrects bounded internal QA verdict semantics, but the remaining defect can still create false scenario failures.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored QA PR is not subject to the external-contributor proof gate; the body nevertheless reports ephemeral-Gateway scenario runs and exact-head CI evidence.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs extensions/qa-lab/src/qa-transport.test.ts.
  • [P1] node scripts/run-vitest.mjs extensions/qa-lab/src/bus-state.test.ts.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • steipete: Recent QA transport refactors and historical fixes, including the current PR, place this person closest to the shared waiter behavior. (role: recent QA transport contributor; confidence: high; commits: ce06e792, 85fd4c9; files: extensions/qa-lab/src/qa-transport.ts, extensions/qa-lab/src/bus-waiters.ts)
  • Dallin Romney: History shows repeated work on the live channel adapter and QA transport scenarios adjacent to this shared waiter. (role: historical QA transport contributor; confidence: medium; commits: b29d472, 04601ae; files: extensions/qa-lab/src/qa-channel-transport.ts, extensions/qa-lab/src/qa-transport.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve failure replies from latest lifecycle state before evaluating them.
  • Add a focused failure-send → delete → visible-final regression test and rerun the QA transport coverage.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit b0d8dd3 into main Aug 5, 2026
199 checks passed
@steipete
steipete deleted the codex/autoqa-visible-transport-evidence-20260805 branch August 5, 2026 16:30
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant