Repository navigation
refactor(tasks): remove maintenance dependency registry - #155120
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. |
4e41dfa to
c5c18a3
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 9:18 PM ET / September 22, 2026, 01:18 UTC (Revision 2). ClawSweeper reviewWhat this changesTask maintenance calls its existing runtime owners directly, while tests replace the removed dependency registry with restorable spies and existing database-worker routing. Merge readiness✅ Ready for maintainer review Keep open. This remains a useful, distinct cleanup, and no actionable introduced defect was found. The maintainer-authored, protected PR is not eligible for automatic closure. Priority: P3 Review scores
Verification
How this fits togetherTask maintenance combines persisted task records with live runtime and session facts to recover interrupted work, identify lost tasks, and clean up completed work. Gateway scheduling and CLI inspection consume these maintenance operations. flowchart TD
A[Gateway scheduler or CLI] --> B[Task maintenance]
C[Persisted task records] --> B
D[Runtime and session owners] --> B
B --> E{Liveness and retention checks}
E --> F[Recovered or lost task status]
E --> G[Session cleanup and record pruning]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -73, Tests +162. Total +89 across 20 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep maintenance decisions with the existing runtime owners and confine test substitutions to restorable test support. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes internal test indirection rather than reporting a new product failure. Is this the best way to solve the issue? Yes. Direct calls preserve the existing owners and narrow helper contracts without adding another runtime abstraction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c803800ac2bc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Use the existing maintenance owners directly and scope test substitutions through restorable spies. Preserve the session-store fixture lifetime already maintained on main and route the remaining six database-backed suites through their broker owner.
c5c18a3 to
64e2690
Compare
|
Merged via squash.
|
Use the existing maintenance owners directly and scope test substitutions through restorable spies. Preserve the session-store fixture lifetime already maintained on main and route the remaining six database-backed suites through their broker owner. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Task maintenance carries a mutable dependency registry and test-only setter/resetter around functions already owned by the task, session, and ACP runtimes.
User Impact
Maintenance keeps its existing liveness authority, recovery, retention, lazy ACP cleanup, currentness checks, and scheduler stop/join behavior.
Why This Change Was Made
Call the existing owners directly, retain the narrow ACP/backing/snapshot contracts, and move test substitutions into scoped spies that restore prior implementations. This removes 73 production lines. Test/support changes add 162 lines, for an overall increase of 89 lines.
Route six remaining database-backed suites through the existing process-isolated broker owner. Preserve the newer session-store fixture lifetime and awaited database closure already on main, including its existing broker route.
Related: #150153. Built on the landed runtime cleanup in #155157.
Evidence
Current source: commit
64e2690b684d2c1293e4a48d69d353511732522d, treed16dd3255ca915e82deab4383c19baf0d993a70a, base3aa130d87165ab08ce615238c8cc1a606ce19840. Exact-head PR CI remains required before landing. No production Gateway was exercised by this qualification.