Repository navigation
perf(cron): compact worker replies for run transcripts - #163885
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 October 8, 2026, 2:14 AM ET / 06:14 UTC (Revision 3). ClawSweeper reviewWhat this changesThis PR makes the Cron read worker return compact transcript identity facts instead of full run-history records while preserving transcript responses and access checks. Review scores
ProductKind: Performance · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this is a distinct, useful optimization with no actionable patch findings. The author’s MEMBER association also prevents automatic closure. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCron stores automation run history in SQLite. When a user opens a run transcript, a worker selects its recorded conversation and the Gateway checks current access before returning messages. flowchart TD
A[Run transcript request] --> B[Gateway access checks]
B --> C[Cron read worker]
D[Stored run history] --> C
C --> E[Compact transcript identity]
E --> F[Physical transcript and fresh access verification]
F --> G[Transcript page and cursor]
Technical reviewBest possible solution: Keep transcript selection in the existing admitted worker and retain fresh authorization and final publication checks in their current Gateway owners. Do we have a high-confidence way to reproduce the issue? Not applicable as a functional bug: this is an internal performance improvement. Source confirms the existing full-history transfer, and the author reports a baseline-failing compact-reply regression. Is this the best way to solve the issue? Yes: moving selection into the existing worker avoids unnecessary transfers while preserving the original codec, cursor bytes, bulk-history path, and access boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 594335a38e5a. Provenance checked
TestingProof path: in-process harness. Added test files: 2. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +87, Tests +72, Other -1. Total +158 across 7 files. 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 History |
7ca3c4b to
f309923
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* improve(cron): return compact worker bindings for run transcripts * test(cron): preserve read-only module exports in publication mock
What Problem This Solves
Viewing a cron run transcript transferred every full history record for that job to the Gateway twice, including recovery state the transcript does not use.
User Impact
Transcript responses, pagination cursors and current access checks stay unchanged. The Gateway receives compact binding facts instead of recovery payloads. No configuration, migration or operator action is required.
Why This Change Was Made
The existing admitted cron read worker selects the unique recorded transcript and computes its cursor binding. The Gateway retains both fresh reads, authority and sharing checks, and physical transcript-owner verification. Bulk
cron.runsreads stay unchanged.Full worker-side history acquisition still occurs. This reduces unnecessary worker-to-Gateway transfer; it does not optimize SQL scanning or worker startup.
Evidence
d995acf9dcb80cd7801ba12abb5de185504a4db4: 34/34 focused cases passed on Node 24.16.0/macOS arm64: Doctor fixture 3, cron startup recovery 1, transcript history 7, publication authority 3, bulk runs 14, read-only worker 6. Tests cover original nine-field cursor identity, archived pagination, combined selectors, incomplete duplicates, sharing, retention and physical ownership.f30992390535c484e3171ba72beeea140d07e9c2only adds an export-preserving publication-test mock and removes its one obsolete mock-baseline entry. The affected 3/3 cases passed again; independent review found no assertion or isolation regression. Production and all other test files remain byte-identical to the integrated proof.f30992390535c484e3171ba72beeea140d07e9c2, including production and test types. The PR rollup has 70 successful checks and no failures; skipped checks are not coverage.Production: +132/−45 (net +87), for the typed compact request/result and worker selection boundary; Gateway selection/hash code is removed. Tests: +188/−116 (net +72). One obsolete test-mock allowance is removed.
Previous CI prerequisite
The previous CI run failed two Doctor fixture cases on old head
7ca3c4bba5b34df571337da48510b12a8bfa534a. Cancelled jobs are not coverage.This branch now incorporates upstream worker-retirement fix
68f76fc9and shared-state drain fix #164805, through frozen based51917edde3d3949a535131b97dbc6f43c4ea6ef. Both Doctor helpers await canonical agent and shared-state cleanup before launching their child. All three Doctor cases now pass locally without added retries or timeout changes. Current required CI now passes; no inherited-CI or admin exception is requested.Review disposition
Fresh ClawSweeper review completed for the exact head at 06:14 UTC on October 8: no findings, security issues, before-merge items or rank-up moves. Direct maintainer review accepts the existing-worker boundary as the canonical fix. The review correctly notes that the performance proof is a registered-handler harness with real SQLite workers, not an installed Gateway/CLI benchmark; no broader performance claim is made. The
needs-humanmarker is satisfied by this maintainer disposition, not a CI waiver.Landed
Native squash landing verified on October 8 at 06:24:50 UTC as 467fc82c4fd9. All six source/test blobs match the reviewed head. The landed baseline delta removes only this mock allowance and preserves unrelated newer-main baseline changes. The commit is an ancestor of current remote main.