Repository navigation
Conversation
Stage command-bearing input before mailbox admission, publish its existing queued lifecycle event, and project mailbox waiting state through the existing pending-input UI contract. Attribute admission waits to queued diagnostics and cover reconnect plus successor start after active completion, failure, and cancellation.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR shows accepted command-bearing chat messages in the existing queue while they wait during reply initialization. Example: Send
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a current queue-visibility gap, and the reviewed diff introduces no definite correctness or security defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway chat admission hands accepted input to the session mailbox; pending-input history and lifecycle events expose waiting messages to the Control UI. flowchart LR
A[Chat send] --> B[Approved input custody]
B --> C[Session mailbox]
C --> D[Turn execution]
C --> E[Queue lifecycle event]
B --> F[Pending input history]
E --> G[Control UI queue]
F --> G
Technical reviewBest possible solution: Retain the existing custody, mailbox, and queue projection owners with this focused admission-visibility repair. Do we have a high-confidence way to reproduce the issue? The source establishes a concrete reproduction: command-bearing input skips ingress staging and can block before the prepared-followup predicate recognizes it; the PR reports baseline failure for this exact case. Is this the best way to solve the issue? The patch repairs missing custody and publication at existing owners, reuses the existing UI contract, and adds no competing queue implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dfc053fd4c6e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +21, Tests +123, Docs +2, Other +47. Total +193 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 12:44 PM ET / 17:44 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
) Stage command-bearing input before mailbox admission, publish its existing queued lifecycle event, and project mailbox waiting state through the existing pending-input UI contract. Attribute admission waits to queued diagnostics and cover reconnect plus successor start after active completion, failure, and cancellation.
Related: #195754
What Problem This Solves
Fixes an accepted chat message waiting silently behind an active turn when admission blocks during reply initialization, including command-bearing follow-ups such as
/verbose on Explain the queued request.User Impact
The existing Queued indicator appears while the message waits and is restored after reconnect. The follow-up starts after the active turn completes, fails, or is cancelled. Slow-send diagnostics classify the admission wait as
queued.Why This Change Was Made
Command-bearing input skips ingress staging and can wait in the mailbox before reply preparation. The pending-input projection previously recognized only prepared follow-ups. Stage custody before that wait, publish the existing queued lifecycle event from the mailbox owner, and project its existing waiting phase. This uses the existing queue UI and reconnect contract without another notice implementation, cache, config option, or schema change.
Production delta is +21 lines: missing custody staging, owner publication, and timing attribution. Regression coverage adds 123 lines with an exact test-line allocation; benchmark tooling adds 45 net lines. The author simplification pass retained one queue owner and replaced the narrower projection predicate.
Evidence
stage=startupand a ~3.2-second mailbox wait.startupto 12/12queued. Warm queued visibility medians: 50.8–55.7 ms.pnpm check:changed --base 25bb300ac765 --timedcompleted. Patch-caused test type/style findings were repaired and their focused checks pass. Remaining failures reproduce on exact parent25bb300ac765: historical changelog attribution and unused exports in daemon/provider/dashboard owners. Causal introductions: changelog fix(release): align attribution gate with human credit policy #194364, provider exports refactor(plugins): forward auth and catalog to their owners #190205, daemon scanner fix(cli): surface stale-updater launchd scan failures in deep status #195977, dashboard export Dashboards gallery: Display menu with list view, ordering and grouping #194455. Exact-base replay plus controlled import restoration establishes these as recorded main regressions.Full fixture: 35.20 GiB SQLite data/indexes, 5,000 sessions, 62,000 files/1.14 GB, synthetic only. APFS on macOS; this does not establish btrfs latency parity. Serial timing arms A1/A2/B1/A3/B2 use six fresh-session pairs each, a fixed 3-second model hold and identical 1-second history polling windows. Settled A3/B2 warm reply initialization is 3,059→3,059 ms and mailbox wait 3,043→3,031 ms. Whole-process CPU is 15.080→15.326 s (+1.6%); main-thread CPU 4.329→4.394 s; follow-up median 3,218.0→3,229.3 ms. Early unchanged A/A CPU varies 43.806→27.054 s, so there is no CPU speedup claim.
Separate main-isolate allocation ABAB samples are 1,645,207,232 / 1,635,663,968 / 1,521,763,568 / 1,628,766,792 bytes: candidate mean +3.1%, baseline A/A variation −7.5%. These are whole-flow samples, not exact owner allocation costs. One instrumented cold sample misses the first 1-second polling window but has queued custody after reconnect while still held. One uninstrumented cold candidate takes 4,881 ms versus baseline 3,936 ms; owner spans locate the extra time in existing memory preparation, while reply initialization stays 3,222 versus 3,218 ms. Matching fixture background embeddings/temp-root warnings and shared-host variability limit CPU/allocation interpretation.
CI run 42664885443 attempt 1 has one root failure: the restart-resume E2E expects admission invalidation although #195902 deliberately allows accepted finalizers to read shared state until owner drain. The same assertion reproduces on exact CI main parent
6edcaa28edb7817efda38eccc4f0c7fd13ad148c; introducing commitcd48b392e86fd58975cf84e6348c81c272148ed8changed the contract without updating this consumer. This is a recorded main test regression. Landing uses the authorized inherited-failure exception at pinned head4a2b37a9c0c513ec8ce5302ba8a28f4fdcb9feef, not a claim of green CI. No CI rerun was requested. Separate local replay observations remain unresolved: candidate managed process-exit timeout; baseline SIGTERM/final-shutdown budget overruns (11,867/18,544 ms), with managed shutdown completing in 7,325 ms. These timing findings are retained separately from the single CI assertion failure.The concrete command-bearing reproduction is proven. It does not establish the exact message branch used by the original production incident.
Before/after images below use controlled mock-Gateway states and one unchanged UI build. They demonstrate presentation of the missing/restored queue contract; the real-Gateway proof above independently demonstrates server admission and reconnect.