Repository navigation
fix(tasks): retain admitted work across list retries - #154338
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: needs changes before merge. Reviewed September 21, 2026, 7:32 AM ET / 11:32 UTC (Revision 11). ClawSweeper reviewWhat this changesTasks page requests reuse their initial accepted-work boundary across retries and wait for already-admitted identity-changing mutations to finish publication. Merge readiness⛔ Needs changes before merge - 1 item remains The repair remains useful and has no actionable correctness findings. The updated failure disposition resolves the prior Windows validation concern under the repository’s best-effort policy. Priority: P2 Review scores
Verification
How this fits togetherThe task registry combines persisted task records with live worker publications. Gateway Tasks requests read that registry, filter records by current session access, and return paginated summaries. flowchart TD
A[Tasks page request] --> B[Capture accepted work]
C[Task events and mutations] --> B
B --> D[Await captured settlement]
D --> E[Refresh canonical task rows]
E --> F[Check current identity and access]
F -->|Valid| G[Return task page]
F -->|Retry| E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +70, Tests +174, Docs +7. Total +251 across 11 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep request-scoped waiting in the existing read owner while preserving canonical refresh, independent internal reads, and final access checks. Do we have a high-confidence way to reproduce the issue? Yes: current-main source exposes both repeated event-fence capture and the commit-before-publication window, with focused registered-handler regressions for each. This read-only review did not execute them. Is this the best way to solve the issue? Yes: retaining preparation across retries repairs the existing owner boundary without replacing pagination, weakening identity checks, or adding a parallel persistence path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 10c229159ceb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
|
Merged via squash auto-merge.
|
* commit '0883394977d1fb3af657635967f6e447bd7fff9a': (72 commits) fix(ui): await scheduled rail layout in focus test fix(cron): keep healthy active runs from delaying job lists (#154421) fix(plugins): prevent config conflicts during legacy plugin installation (#154539) perf(gateway): reduce repeated session-list work (#154551) fix(tasks): retain admitted work across list retries (#154338) perf(gateway): speed up transcript artifact downloads (#154726) chore(ui): refresh control ui locales (#154580) fix(release): keep two extended-stable months eligible (#154777) fix(tests): avoid avatar descriptor reuse race (#154747) perf(plugins): reduce callback scope overhead (#154625) fix(ui): include final request time in completed work summaries (#149240) fix(ai): avoid retrying conflicting Responses terminal statuses (#149242) fix: identify malformed Code Mode JavaScript as input errors (#149222) fix(doctor): settle imported JSONL transcript leftovers (#154413) fix(cloud): restore node bootstrap with bundled browser runtime (#154654) test(ui): await publication state notifications (#154768) fix(plugins): keep unchanged plugins running across metadata refreshes (#151281) fix: keep chat panel accessibility targets within each pane (#153478) fix: forced Gateway restarts cancel healthy subagent work (#154300) improve: reduce session delivery reader imports (#154740) ...
* fix: keep task list retries from waiting on newer activity * fix(tasks): separate read-fence test registration from metadata additions * test(tasks): consolidate read fence regression into projection coverage * fix(tasks): settle admitted mutations before external reads * fix(tasks): keep unrelated progress reads independent
What Problem This Solves
A busy Tasks page can repeatedly wait for new events or observe a committed run before its creation owner publishes it, exhausting the page's stabilization retries.
User Impact
Tasks page requests retain their initial accepted event prefix and wait once for identity-changing mutations already admitted for the same database and store. Later arrivals do not extend those waits. Internal reads keep per-task authority checks, allowing unaffected progress updates to continue while another task is being replaced.
Why This Change Was Made
Keep read preparation and mutation settlement with their existing owners. Page retries reuse the captured preparation while refreshing canonical rows; mutation settlement includes persistence, publication and failure cleanup. Pagination, session access and database ownership are still checked before responding. No schema, configuration, migration or retention change is introduced.
Evidence
The registered retry-prefix regression fails before the repair. The admitted-creation regression also fails for the intended unavailable-page outcome before its repair. Historical initial and integrated sibling proofs passed.
Fresh CI on
c754ba5caught two progress regressions, a type-import cycle and an unbound test method. The repair limits mutation-cohort waiting to page requests, uses the existing leaf store contract for identity, and preserves the method receiver. Existing progress assertions and deadlines remain unchanged.The repaired cumulative source passed 128 tests, including all 46 progress tests, five registered projection tests and 77 read/metadata/publication siblings. The static import-cycle check, production types, formatting and type-aware lint passed. Independent review found no actionable P0–P2 findings.
Linux proof used Node 26.8.2 in the existing
71fba998integration checkout with the cumulative Tasks candidate and this repair; it is not a clean installation of the published head. Type-aware lint also passed on the exact four-file Windows repair. Current-head GitHub CI passed for637243b267174cae65e332ad8c991972b5272e3f. Native merge gates landed it as4feebfc3da5077467a571bdfa9f62da60f378ae6; merge cleanup is complete.Current-main integration preserves the new flow-maintenance context/store API and adds the page mutation cohort as its third argument. Two fresh independent review passes found no actionable P0–P2 findings; focused type-aware lint for the changed read owner and current maintenance caller exited successfully. This source review and lint do not replace current-head runtime CI.
Measured test cost
Retained standalone commands used
pnpm test <file> --maxWorkers=1; these are source-qualified historical wall times, not measurements of the entire current head:src/tasks/task-registry-projection-read.test.ts71fba998integrated candidate663fd686, compiler-cache hitsrc/tasks/task-registry-read.test.ts71fba998integration, patch3fba51a7src/gateway/server.tasks-list-performance.test.ts347133a9integration, patchf628d9f8; test body 9.207 sThe Windows cleanup diagnostic separately took 199.913 s including its controller/compiler startup, with a 58.742 s test body; it used the maintained direct Node wrapper and phase logging. It is not a
pnpmor cross-platform performance comparison. Current-head CI started at 11:23:57 UTC; lint passed in 10m44s (11:25:59–11:36:43 UTC), and all required CI gates subsequently passed before merge.Remaining validation limits
No Gateway throughput or latency improvement is claimed. Earlier load screening completed all 32 tool turns but failed five of 64 Tasks probes; a later combined experiment still failed two of 64. Fresh representative load proof remains outstanding.
Windows cleanup disposition: an earlier run passed the test body but timed out removing its fixture home; the exact OS locking process was not established. Missing scoped idle-coordinator disposal was repaired in #154617. The retained Windows diagnostic with that repair passed both the unchanged 60-second test and final 300-second hook, with final removal completing in 10.545 ms. Current test/helper source matches its uninstrumented inputs, and the current coordinator cleanup implementation matches the executed repair byte for byte. The extracted fixture helper preserves the same awaited close/dispose/remove order. Phase logging did not change assertions or deadlines but may affect scheduling, so this is reused cleanup-contract evidence, not a fresh Windows run of this entire head. Current Windows CI skips this test; the prepared local rerun is blocked by 2.28 GiB free disk versus its retained 10 GiB guard. This bounded Windows validation gap is recorded rather than treating the earlier failure as a current Tasks defect; landing still requires the normal current-head CI and review gates.