Repository navigation
refactor(runtime): retire private construction and reset seams - #178787
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 maintainer review before merge. What this changesThis PR removes private construction and reset controls, inlines provider metadata, and adapts tests to the native runtime owners. Example: Generate poster.png through image_generate.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed cleanup preserves serving behavior, and source review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands, agent tools, plugins, and the session sidebar call runtime owners that coordinate Gateway requests, providers, and database workers and return results or lifecycle updates. flowchart TD
A[CLI and agent requests] --> B[Native runtime owners]
C[Session sidebar] --> B
B --> D[Gateway and providers]
B --> E[Database workers]
D --> F[Results and lifecycle updates]
E --> F
Technical reviewBest possible solution: Retain the existing runtime owners and land this simplification once the required checks are satisfied. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported product bug; source and caller searches confirm the removed controls are private seams. Is this the best way to solve the issue? The change uses existing owners, removes the superseded controls, preserves provider metadata and lazy execution, and retains distinct lifecycle assertions without adding production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f7572ad13d1. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -101, Tests +470. Total +369 across 70 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 20, 2026, 5:47 PM ET / 21:47 UTC. |
|
Exact-head CI39516699338 attempt1 is complete at 3f35052. All167 check runs were enumerated:105 success,58 intentional scope-selected skips,1 neutral,2 failures and1 superseded metadata cancellation. No pending check or missing selected proof remains. All selected runtime/types/extensions/architecture/boundaries/UI/PostgreSQL/ratchets pass, including the repaired resource-publication and transcript fixtures. Security-fast118951065636 succeeds.
Cancelled metadata118950449211 is superseded by successful exact-head metadata118950580637/run39516736257 and118960361525/run39519737190. It is not treated as inherited failure or missing proof. Actual tested mergea9b3f9a5988a6f0277c11fa28a766b785905153a has ordered parents140e8841b1e491f4523bbc52a20454cef326ebb7 / exact3f350521. Independently recomputed tree d9fe782eee27859c9eea50d91a329cf665082e84 matches. The native inherited-failure exception pins the reviewed exact head and preserves the confirmed-retired auto outcome through explicit replacement recovery. CI remains red, not relabeled green. Final70-path cut removes101 production lines and adds472 fixture/support lines. No product guard, assertion, timeout, suppression or baseline allowance is weakened; no rerun, repush or optional rebase is used to chase green. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Remove PluginRuntimeResolver after the registry factory was folded into its owner (#178830). Keep the capture logger local after native logger ownership replaced injection (#178787). Privatize local GitHub, port and UI declarations introduced by #178712, #178866, #176382 and #176347. Validation: 76 targeted tests, production and affected test typechecks, typed lint, formatting, and P2 review. Deadcode scans now contain only pending UI mounting surfaces and a separately identified subagent fixture export.
…law#178787) * refactor(runtime): retire private construction and reset seams * test(media): preserve native lifecycle spy delegation * test(transcripts): establish state scope before metadata
Remove PluginRuntimeResolver after the registry factory was folded into its owner (openclaw#178830). Keep the capture logger local after native logger ownership replaced injection (openclaw#178787). Privatize local GitHub, port and UI declarations introduced by openclaw#178712, openclaw#178866, openclaw#176382 and openclaw#176347. Validation: 76 targeted tests, production and affected test typechecks, typed lint, formatting, and P2 review. Deadcode scans now contain only pending UI mounting surfaces and a separately identified subagent fixture export.
What Problem This Solves
Private construction and reset controls still expose choices that serving callers never select. Some tests bypass the native owner through those seams, while three search providers wrap fixed metadata in single-caller factories.
Changes
Remove the fixed status Tailnet/update suppliers, ACP's private injected clock, active-memory's private grace/circuit/map-reset controls, and the migration state-directory reset. Tests retain the original asynchronous operations and native database cohorts, join them before cleanup, and use existing per-run operations or reload the original owner graph. The product's grace period, leases, migration algorithms and persisted shapes stay unchanged.
Inline Brave, Perplexity and Parallel Free's sole metadata bases into their actual provider descriptors without loading search execution eagerly. Remove Firecrawl's unused private DNS callback plumbing; native DNS and every SSRF guard remain.
Image, video and music constructors now choose the native background scheduler directly. Tests hold external results, observe the actual terminal publication, and join the cron fixture's real cleanup tail before retiring mocks. GitHub publication uses the native in-process caller; integration tests retain actual request/authorization dispatch behind a per-invocation module-boundary transport. Transcripts capture the native state directory and logger; delayed fixture constructors explicitly select their own isolated directory. Catalog helpers rely on the already-required application context while preserving connection, scope and asynchronous identity checks.
This accumulated residue removes 101 net production lines across 70 paths. Tests/support grow by 472 lines, for 371 overall lines added. Fixture growth replaces production test controls with original-operation lifetime observation; the migration fixture's sequential import graph, restart/reopen operation and recall tracking live in sibling test-support modules. Moved metadata and fixture code are fully counted.
Best-effort tradeoffs accepted
No public SDK/configuration/CLI/protocol contract, persisted shape, dependency, permission, durability, security guard or realistic-concurrency behavior is removed. Phase E standalone session memory is untouched.
Evidence
Completed exact-head CI (39516699338, attempt 1) passes every selected runtime, type, extension, architecture, boundary, UI, PostgreSQL and security gate, including the repaired resource-publication and transcript fixtures. The only substantive failure is inherited Doctor lint118951551770:
src/flows/doctor-repair-flow.ts:73:28,typescript(unbound-method)on capturedcheck.repair; aggregate118963727543 is downstream. Actual tested mergea9b3f9a5988a6f0277c11fa28a766b785905153a has ordered baseline140e8841b1e491f4523bbc52a20454cef326ebb7 and exact3f350521f92d2c77763e6a3dbd7ab20354e862b5 parents. Determining flow/types/core lint configuration are byte-identical baseline..tested merge and baseline..independently replayed clean maine6b866d3adb8d19ca878d493e4a0d21f1e9c3974, which reproduces the identical diagnostic. Old cancelled metadata is superseded by successful exact-head metadata. This is an inherited-only native exception, not a green-CI claim; no rerun, source workaround, optional rebase or push was made for it.The first exact-head CI run found 18 owned media-resource fixture failures across the resources and donor-resources suites. The settlement observer obtained no implementation from bare Vitest spies and suppressed the real terminal publisher. The repair captures and explicitly delegates to the native completion/failure owners before observation; all assertions that native operations actually publish success/failure remain. The installed Vitest spy API reproduces the original suppression and the corrected delegation. Independent P0-P2 repair review is scoped-clean with no findings (confidence 0.99), before only mechanical receiver binding required by lint. Final repair types (5.890s), format (9.880s), lint (39.011s), line-cap ratchet (5.540s), and all 14 suppression-audit cases pass. The focused resources/donor-resources replay stops at the compiled-worker prerequisite before cases; it is not a runtime pass. Exact-head hosted CI must validate the repaired fixture graph.
The next exact-head CI run (39509057480, job 118926216864) passes those resource suites but fails the transcript future-title case: active capture count is zero. The changed transcript fixture published plugin metadata before setting its isolated state directory, invalidating the metadata environment fingerprint and allowing unintended cold discovery during provider-absence retries. Move only the existing directory creation/environment stub before metadata construction and publication. Storage paths, tests, assertions, timers and production compatibility checks stay unchanged. Targeted types (10.683s), formatting (16.412s), typed lint (64.485s), line caps (7.246s) and all 14 suppression-audit cases (36.638s driver) pass. Fresh incremental P0–P2 review is scoped-clean, no findings, confidence 0.99. The isolated transcript replay stops before cases at the compiled-worker prerequisite (20503ms; owned runner joined, 32.696s overall), so complete causality and runtime repair remain exact-head hosted-CI proof gaps. This is a concrete fixture-scope repair, not a claim that a passing local replay reproduced or resolved the CI failure.
Expanded targeted core and UI typechecks pass. Native formatting passes for all 70 files. Five focused UI catalog/event/discovery/warm-boot files pass 135 tests across two serial shards (67.176 seconds wall time). They retain context replacement, scope/currentness, reconnect, pagination, visible error, authority and deletion coverage. Existing unrelated Solid diagnostic warnings are emitted; no assertion fails. Typed lint passes after the disposable-variable naming repair; the line-cap ratchet passes for all 70 files after moving the unchanged restart fixture operation into its existing test-support owner. Final affected-fixture types pass in 6.547s, typed lint in 36.616s, the line-cap gate in 8.168s and all 14 suppression-audit tests in 36.017s. Fresh independent P0-P2 review of the final 70-path candidate, including the helper extraction, is scoped-clean with no findings (confidence 0.87).
The final focused native attempt selects59 explicit changed/sibling keeper files. It stops before cases at the compiled-worker cache prerequisite (13292ms cache miss); the task-owned runner is interrupted and fully joined21.634s, then independently verified absent. This is incomplete runtime proof, not59 passing files. The shared-host budget prohibits broad local builds, whole-graph checks and E2E; exact-head PR CI supplies broad consumer/cycle/deadcode proof. UI lint's original configuration selection incidentally emitted the SDK declaration prerequisite; no separate broad build was run, and subsequent checks use the canonical boundary-free UI lint config. No timeout, retry, skip, assertion, cap allowance or suppression is weakened. There is no visual markup/style change or live-provider claim.