Repository navigation
refactor(tasks): remove unused flow observer callbacks - #154863
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, 9:29 AM ET / 13:29 UTC. ClawSweeper reviewWhat this changesRemoves unused task-flow observer callbacks and updates tests to check stored state, in-memory state, and transaction settlement directly. Merge readiness✅ Ready for maintainer review Keep open: this cleanup remains applicable on current main, and the reviewed diff introduces no actionable correctness defect. Priority: P3 Review scores
Verification
How this fits togetherTask Flow tracks managed work and mirrors task status into SQLite and an in-memory registry. Worker reconciliation keeps that registry current; separate task and subagent observers notify active consumers. flowchart TD
A[Task updates and managed work] --> B[Task-flow registry]
B --> C[SQLite transaction]
C --> D[Commit or rollback]
D --> E[In-memory flow state]
C --> F[Worker reconciliation]
F --> E
E --> G[Flow readers and task observers]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -180, Tests -310. Total -490 across 20 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep persistence and projection settlement with their existing owners while retiring the unused flow notification path. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an internal cleanup, and source inspection confirms the removed registration path is test-only. Is this the best way to solve the issue? Yes: removing the unused callbacks while retaining transaction settlement and checking resident state is a focused simplification of the existing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 904b41e9e99f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Related: #150153.
What Problem This Solves
The task-flow registry carries observer callbacks, snapshot copies, and publication bookkeeping that are configured only by tests and have no production subscriber.
User Impact
No intended user-visible change. Persistence, process-local flow projections, transaction rollback/commit settlement, worker reconciliation, and the separate live task-observer system retain their existing owners and behavior. Schemas and storage contracts are unchanged.
Why This Change Was Made
Remove the unused flow-observer path and update its test consumers to assert resident state and lifecycle settlement directly. The atomic subagent/task/flow replacement still installs committed state before delivering the remaining task and subagent observers.
This removes 180 application lines and 310 test/support lines, with no tooling growth.
Evidence
One existing runtime case,
preserves large managed state and wait payloads across worker creation and reopen, exhausts the worker’s unchanged 512 MiB heap limit with its 72 MiB payload. It reproduced independently on both the exact clean base and this candidate with separate frozen dependencies. That result is retained as an unresolved baseline failure; this PR does not fix it, change the payload/Unicode/heap cap, or claim the whole runtime file passed. Exact-head CI passed for034889201710ad729a28a947c22158d17b250ee8; that CI result does not erase the separately reproduced isolated-heap failure.