Repository navigation
fix(workboard): attribute slow card-list waits - #188782
Conversation
|
🦞👀 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 SummaryThis 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 adds phase timings to slow Workboard card-list warnings, including authorization and nested session preparation waits. Example: A card-list request spends 1,200 ms preparing session access and 25 ms in its handler.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it adds useful, focused diagnostic attribution, and no concrete introduced regression was found; the failed test-line CI gate remains unattributed. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway requests pass through session authorization before reaching the Workboard plugin; the existing diagnostic recorder now observes that full request lifetime and emits bounded numeric timings. flowchart LR
A[Workboard client] --> B[Gateway router]
B --> C[Session authorization]
C --> D[Session preparation]
C --> E[Workboard handler]
B --> F[Slow request recorder]
D --> F
F --> G[Diagnostic warning]
Technical reviewBest possible solution: Keep timing in the existing router and diagnostic owners, preserving request results, authorization, and content-free logging. Do we have a high-confidence way to reproduce the issue? Source confirms the missing Workboard phase attribution on fetched main; the supplied regression reports red-on-base and green-on-head results, but no target code was executed during this review. Is this the best way to solve the issue? The patch is a small extension of existing owners: outer request phases and fixed nested spans provide the requested attribution without changing storage or authorization semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1d2e0b28b60b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +66, Tests +114, Docs +16, Other +2. Total +198 across 9 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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 October 30, 2026, 7:15 PM ET / 23:15 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* fix(workboard): attribute slow card-list waits * test(workboard): use complete logger in shared-read fixture
What Problem This Solves
Slow Workboard card-list requests currently expose total RPC duration without showing whether they waited before the handler or in the card read itself.
User Impact
Operators using the existing diagnostics and warning settings get a bounded phase breakdown for card-list requests taking at least one second. This is diagnostic only: it does not claim to fix the underlying latency, change request results, or require new configuration.
Why This Change Was Made
Start timing at the gateway router so pre-handler authorization is included. Reuse the existing slow-request recorder and request-scoped timeline observer to separate admission/handler time and fixed nested session preparation phases, including row reads and publication settlement. Nested wall times overlap their parent phases. No request parameters, keys, paths, or error contents are logged, and fast requests remain quiet.
Production growth is 66 lines, justified by the requested missing attribution. There are no new caches, database operations, schemas, queues, or synchronization rules. Test growth is 114 lines for router success/failure attribution and bounded-span/privacy proof.
Evidence
81cf32d99769, both router regression cases fail specifically because no warning is emitted; response/error and handler assertions pass before that failure. All 52 affected session preparation/authorization/worker tests pass on the candidate.pnpm check:changed --stagedfound a test phase-type inference error and lint declaration issues. Those are corrected:pnpm tsgo:core,pnpm tsgo:core:test, focused lint, and the final eight diagnostic tests pass. All other gates in that full check passed; their unchanged results are reused. The test-line budget passes with four lines of remaining slack. The underlying production wait is unproven; the next slow-call sample supplies the missing phase evidence. The exploratory 10,000-card worker A/A probe had rebuild medians 14.54/14.53 ms, but did not include a large session database or btrfs contention and is not a production latency claim.Final-head CI run 41141632450, attempt 1, completed at
e751e6b319551cf4999ca43d700367a0dcf4f972. All substantive jobs includingsecurity-fastpassed except the inherited test-line ratchet; the aggregate CI gate failed downstream. The repaired shared-response shard passed.Inherited-only attribution: CI tested merge
f26ad2c9d5bfa2800e9a9403158ce02f02769643over main parent26e7d07934e57b66a3b411bfd479a546ec66c692. Base total/ceiling were 6,313,676 / 6,313,211; tested merge was 6,313,790 / 6,313,325. This PR adds exactly 114 test lines and 114 allocation, preserving the existing 465-line excess. Ratchet code and baseline scalar are unchanged. Local affected proof is green. Landing uses the authorized native pinned-head inherited-failure exception; failed CI is not represented as green.