Repository navigation
chore: speed up publication custody tests - #154768
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 maintainer review before merge. Reviewed September 21, 2026, 7:27 AM ET / 11:27 UTC. ClawSweeper reviewWhat this changesThe publication-state tests now await existing state-change notifications instead of waiting for polling ticks, while preserving their assertions. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused test-performance improvement, with no actionable correctness findings. Current main still uses the slower settlement helper. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI retains GitHub publication operations across session-pane changes. These tests exercise that ownership and recovery behavior through mocked Gateway requests and the production publication controller. flowchart LR
A[Test publication actions] --> B[Session publication owner]
B --> C[Publication controller]
C --> D[Mock Gateway responses]
D --> C
C --> E[State-change notification]
E --> F[Wait until activity clears]
F --> G[Existing assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +14. Total +14 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the existing publication notifications to settle tests promptly while retaining the timeout, activity checks, and custody assertions. Do we have a high-confidence way to reproduce the issue? Not applicable to a product defect: the PR targets test overhead, supported by the polling source and reported before/after timings; this review did not rerun tests. Is this the best way to solve the issue? Yes. Reusing the production notification callback avoids fixed polling latency without adding a production seam, weakening assertions, or shortening the timeout. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2cc189c8735f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Hosted timing evidence is now available for exact head All 28 cases passed in UI shard 2/3. The capacity case took 30 ms, and the file’s reported test duration was 193.908 ms. The retained earlier hosted baseline recorded 3588 ms for that case and 6304.173 ms for the same 28-case file. These are case/file timings from separate hosted runs, not a whole-CI speedup measurement. The candidate shard’s complete Test Control UI step took 254 seconds and its job envelope took 361 seconds; those envelopes include other tests and setup. The change preserves all existing cases, operations, assertions, and the settlement deadline. ClawSweeper’s completed exact-head review reported no actionable correctness or security findings. |
|
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) ...
What Problem This Solves
The publication custody tests waited for a 50 ms polling tick after mocked publication requests had already completed. Their 32-entry capacity scenario repeatedly paid that delay while checking retained retries and explicit acknowledgement.
User Impact
Internal test performance only; no user-visible behavior or production code changes. All 28 cases, publication operations, assertions, and the existing one-second settlement deadline remain unchanged.
Why This Change Was Made
Wake the existing settlement helper through the publication binding’s state-change callback. Recheck activity after each notification so completion followed by a queued refresh still waits for the current operation. This exercises the same notification used by the chat pane without adding a production test seam or shortening polling intervals.
Evidence
node scripts/run-vitest.mjs ui/src/lib/sessions/pull-request-state.test.ts --maxWorkers=1 --reporter=verboseon frozen main6e70aff092768801e539fb8f5af34055ec51e6ba.git diff --checkpassed.