Repository navigation
refactor(runtime): rely on canonical async lifecycle owners - #177635
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR removes duplicate timeout, lease, queue, and cleanup bookkeeping in favor of existing runtime owners. Example: Machine discovery fails for profile "production" while its operating-system discovery remains pending.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 6 items remain Keep this PR open: the maintainer-directed simplification is useful, but the conversation tests and mock baseline need to follow the removed behavior. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway, CLI, plugin installation, and worker services delegate asynchronous work to lifecycle owners that control cancellation, persistence, authority checks, and shutdown settlement. flowchart TD
A[Gateway and CLI requests] --> B[Existing admission owners]
B --> C[Runtime operations]
C --> D[Network and native processes]
C --> E[Database and configuration writers]
B --> F[Cancellation and shutdown settlement]
F --> C
Technical reviewBest possible solution: Keep the existing owners, migrate the affected validation contracts, and verify authority and Doctor compatibility through their real persistence boundaries. Do we have a high-confidence way to reproduce the issue? This is a refactor without a claimed end-user bug reproduction; hosted CI directly records the two conversation-test failures identified in this review. Is this the best way to solve the issue? Reusing the existing lease, request deadline, transcript queue, and cleanup owners is appropriate, and the explicit maintainer tradeoffs justify removing the duplicate checks. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9bee70655af. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No reachable authorization bypass was established, but the changed grant lifetime needs final-effect verification. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -237, Tests +536. Total +299 across 45 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed October 19, 2026, 3:38 PM ET / 19:38 UTC. |
|
Merged via squash.
|
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ...
#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ... Co-authored-by: Vincent Koc <[email protected]>
…#177635) * refactor(runtime): rely on canonical async lifecycle owners * test(runtime): finish async owner fixture migrations
openclaw#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (openclaw#177614) fix(release): tag restart plugin cohorts consistently (openclaw#177725) refactor(ui): inline single-caller detail requests (openclaw#177705) chore(i18n): refresh native locales (openclaw#177721) refactor(codex): drop unread private runtime reports (openclaw#177689) refactor(ui): consolidate static artwork registries (openclaw#177692) refactor(ui): derive settings schema analysis in the view (openclaw#177624) refactor(media): consolidate capability defaults and compression grids (openclaw#177665) refactor(auth): bind OAuth managers to native provider operations (openclaw#177676) refactor(ui): remove redundant component rendering layers (openclaw#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082) fix(agents): report failed secret input prompt delivery (openclaw#177688) refactor(ui): share chat message render contracts (openclaw#177668) fix(ui): settle model status after overlapping publication (openclaw#177667) refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670) refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635) refactor: fold private operation helpers into their callers (openclaw#177655) refactor(ui): remove unused chat leaf element adapters (openclaw#177582) perf(talk): use published authority for foreign voice writes (openclaw#177533) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Runtime services maintain extra timeout, lease, cleanup and bookkeeping layers after their underlying owners already provide the same guarantees.
User Impact
No feature/public contract, persisted shape, transaction, durability, retention or permission change. Actual process/network deadlines, effect-time authority, ordinary restart durability and write-capable shutdown settlement remain.
Why This Change Was Made
Acquire resources where work actually starts, use owner-published facts, and keep one cleanup/timeout/queue owner. Remove redundant private wrappers and unused state instead of adding caches or fallback paths.
Net production LOC: 237 removed (110 added/347 deleted),27 production owners;48 total paths including CI fixture/ratchet completion. This is the runtime/service area of the independently reviewed residue, split under coordinator Rule14/Rule11 with the size floor waived.
Best-effort tradeoffs accepted
Evidence
Original full selected runtime groups completed, including package/Doctor/config/daemon458cases, Gateway/catalog/SQLite/MCP/meeting/network212cases with existing Bun native capability skips, marketplace39, wizard authority60, and summary13/TUI137. Explicit Node SQLite62cases covered all eight native binding cases skipped under Bun; there were no Node skips. Worker RPC/transcript28cases and the exact silent-response regression passed; no full worker-suite claim.
Fresh main's catalog lifetime warnings/tests, provider-machine notification owner and TUI broker wiring are preserved. Fresh focused consumers passed 199 tests across seven files (Gateway/catalog/provider62, TUI137). Unchanged-input proof above is reused for the other cuts.
Independent full-candidate review retained five findings with source-backed declines; accepted/actionable0, not a clean reviewer-verdict claim. Author simplification/test audit retained the distinct socket deadline, native download cleanup, runtime authority, provider work-count and summary boundaries. Fresh targeted production/test types, actual typed lint, all45-file format/line-cap checks, runtime cycles0, Madge0, wrapper closure3 and lint-suppression14 tests passed. Focused tests ran serially with one worker and nice10 under isolated state. Exact-head hosted CI is the broad gate. No full local build/E2E/whole-graph typecheck; no timeout increase, retry/skip/suppression addition or weakened kept assertion.
CI attribution and completion
Initial exact9fed CI39309865936 exposed three owned omissions: startup-origin consumers still awaited the now-synchronous result; two conversation-list fixtures pinned only the removed same-path replacement recheck; and hosted-stop's mock-export baseline retained one obsolete row. The startup assertions are unchanged, only the discarded synthetic recheck cases/orphan import are removed, and the baseline shrinks exactly one row. Worker/native admission, current route/disclosure authority, incognito behavior, zero-main-thread reads and real service-stop checks remain. The original pathname guard came from worker migration #163208, not a linked human pathname-replacement incident.
Fresh focused35tests/three files passed in199.1s; the completed compiler generation was verified/retained. Incremental independent review of all three repairs with the full registry owner found no actionable P0–P2 issues (.97). Targeted test types8.7s, actual typed lint52s, formatting1s, mock-export ratchet45s and suppression14tests19.5s passed. The sole repaired-head push is signed294cc1bec16addae22ca59edd3f82a5652f431c8; exact-head CI is the remaining broad gate. Production delta remains237removed. No import edge was added; earlier zero-cycle proof remains valid after deleting only the orphan test import.
The unchanged server.chat-abort-sibling-fanout.test.ts failure,
typed Stop rejects a replaced parent while retaining its accepted child cancellation, expected[]to equal['running-replacement-0'], matches the coordinator's open main signature from scheduled39278710829/39286736487. No changed hunk touches that test. This is inherited evidence, not a passing-CI claim; the three owned failures above are repaired rather than waived. Every final-head job is qualified before landing. No CI rerun or push merely to confirm green.Repaired-head CI39314667483 completed successfully at294cc1bec16addae22ca59edd3f82a5652f431c8, including all three PostgreSQL conformance shards and both planned extension typed-lint stripes118274917064/118274917186. Initial failures above remain historical attribution; final code CI is green, with no rerun or additional code push.