Repository navigation
refactor(runtime): deslop runtime configuration knobs - #164268
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: blocked before merge. Reviewed October 3, 2026, 7:58 AM ET / 11:58 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR removes unused private runtime options and alternate paths across session assembly, Discord, session maintenance, CLI, QA, redaction, and UI helpers. Merge readiness⛔ Blocked before merge - 2 items remain This remains useful, unmerged cleanup with no blocking defect found. Retained production callers and the public SDK boundary do not support the earlier generic compatibility blocker. Priority: P3 Review scores
Verification
How this fits togetherRuntime owners prepare models, resources, delivery policy, and maintenance settings before passing them to internal helpers. These helpers assemble agent sessions, schedule Discord requests, and maintain session artifacts. flowchart TD
A[Configuration and admitted work] --> B[Runtime owners]
B --> C[Prepared session inputs]
C --> D[Agent sessions]
B --> E[Discord request scheduler]
E --> F[Discord transport]
B --> G[Session maintenance]
G --> H[Session rows and artifacts]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep decisions with the existing runtime owners and let private helpers consume their prepared inputs while preserving public configuration and storage contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this is behavior-preserving cleanup, and no introduced failing path was identified; tests were not executed during this read-only review. Is this the best way to solve the issue? Yes: the inspected production callers already own the removed decisions, and the explicit public SDK exports and persisted identities remain intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 063685e96d00. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
Remove private option branches with no production setters across embedded session assembly, Discord scheduling/deployment, legacy-store maintenance, and source delivery. Keep documented configuration and environment semantics, public SDK exports, persisted shapes, and current admission ownership unchanged.
Remove orphan warning and model guidance helpers, exercise real tool and maintenance boundaries in fixtures, and prune resolved line/assertion baselines. Keep warning delivery types, admission preservation, and migration failure assertions intact.
9799463 to
7b85ca9
Compare
## What Problem This Solves Private runtime helpers still expose options and alternate paths that no production caller selects, duplicating decisions already made by their callers. ## User Impact Users retain the same behavior, documented configuration and environment variables, persisted data, protocol shapes, tool descriptions, and UI output. Shipped SDK exports remain intact. ## Why This Change Was Made - Require the embedded session owner's selected model, thinking level, and prepared resources. Remove unreachable default model selection and ambient resource discovery while retaining explicit extension resource hooks, model clamping, and session identity fences. - Collapse Discord command deployment to its existing global reconciliation path and make the private REST scheduler own its fixed production limits. Preserve application-scoped deployment hashes, rate-limit retries, lane scheduling, request authority, and settlement. - Remove unused legacy-store read maintenance, write hooks, force overrides, and reporting branches. Retain current configuration, live admission preservation, artifact cleanup, disk-budget commits, and the shared maintenance ordering. - Replace the unused generic source-delivery builder with Cron's concrete projection. Remove smaller unused CLI, QA, redaction, and UI knobs; reuse the existing QA credential environment reader. The batch removes **1,068 net production lines** and 639 net test/support lines. Tests exercise the retained production paths using real admission scopes and fixed scheduler defaults. The max-lines exception for the now-smaller resource loader and the reduced cast count are pruned. ## Evidence - Independent Codex autoreview: scoped clean through P2; supplied diff and caller evidence reviewed. - Both import-cycle checks: **0 cycles** after rebasing onto current main. - Production and test types, all three Knip export scans, database/authorization guards, and targeted core/UI/plugin/script lint passed. The broad core lint fallback timed out after 900 seconds; the native targeted route covered every existing changed core/UI file and passed. - Focused runtime proof: **106 files / 2,270 tests passed**, including all **48 plugin contract files / 1,132 tests**. The repository runner completed 11 serial shards in **2,723 seconds** with one Vitest worker. Existing SQLite/session migration and ownership tests dominate this elapsed time on the shared Mac; their real failure and preservation assertions remain intact. - UI proof: **3 files / 27 tests passed** in **11.20 seconds**, covering settings controls and toast placement/lifecycle. - The test preparation build compiled the worker generation successfully (**12,187 inputs, 18,098 outputs; 115.5 seconds**). Hosted `build-artifacts`, architecture, dependency, source-contract, and core lint checks passed on `7b85ca91a64124b4dbf5be6436269c85c53adc8f` in [CI run 37119615795](https://github.com/openclaw/openclaw/actions/runs/37119615795). Final-head hosted CI remains the landing gate. - Main advanced during publication and conflicted in the resource-loader test. The resolution preserves main's constructor helper, no-ambient-resolution assertion, and exact prompt-name/path assertion while exercising explicit extension resources. Fresh P0-P2 review passed; all three resource-loader/root-help test files passed again in 117.15 seconds. Production changes remain unchanged. - Blacksmith remained queued; AWS first refused allocation and a later provisioning attempt was canceled without a ready machine. Validation uses the explicitly authorized local fallback at `nice -n 15`, one heavy command at a time. ## Fixes Found Along the Way Hosted CI exposed two fixture dependencies on the retired session defaults. The shared fixture now carries its configured thinking level into session creation, preserving the existing high-reasoning and compaction assertions. Worker lifecycle tests now assert that prepared turns avoid policy rediscovery, then explicitly exercise the real policy resolver in the same subprocess to retain the source-policy and compiled SDK identity regression checks. All shutdown, authority, transcript, and settlement assertions remain. The four affected and sibling suites pass **118 tests in 312.11 seconds** with one worker. The two reasoning suites also pass **14 tests under Bun in 74.03 seconds**, matching the failed CI runtime. Fresh independent review is clean through P2.
Remove invariant or unread private options, result fields, and forwarding layers across runtime owners, bundled plugins, Control UI, and private packages. Preserve configuration, CLI, SDK, persisted-data and wire contracts. Net production reduction: 1,421 lines. Validation includes 6,489 focused tests, 139 exact-head integration cases, 1,135 plugin contracts, type/lint/guard checks, and zero static/runtime import cycles. Land under the maintainer-authorized inherited-CI exception. Exact head 87d9ef3 has three inherited failed test shards. Auth/cron failures independently match main CI 37234906309; Google Meet matches scheduled main run 37235364849 and is fixed by #165133. The other executed checks passed. See the PR Evidence section for exact jobs and causal qualification. Related: #164268, #164810.
Specialize private agent, Gateway, infrastructure, and plugin flows to their actual callers. Remove unused options, fixed-value forwarding, and unread result fields while preserving public SDK, configuration, protocol, and lifecycle contracts. Preserve the new commentary-media ownership hook during conflict integration. Net production reduction: 969 lines. Independent review was clean; focused owner tests passed and both import-cycle checks reported zero. Matching inherited main failures and exact-head CI evidence are recorded in PR #165198. Related prior batches: #164268, #164810, #165124.
Remove invariant or unread private options, result fields, and forwarding layers across runtime owners, bundled plugins, Control UI, and private packages. Preserve configuration, CLI, SDK, persisted-data and wire contracts. Net production reduction: 1,421 lines. Validation includes 6,489 focused tests, 139 exact-head integration cases, 1,135 plugin contracts, type/lint/guard checks, and zero static/runtime import cycles. Land under the maintainer-authorized inherited-CI exception. Exact head 87d9ef3 has three inherited failed test shards. Auth/cron failures independently match main CI 37234906309; Google Meet matches scheduled main run 37235364849 and is fixed by openclaw#165133. The other executed checks passed. See the PR Evidence section for exact jobs and causal qualification. Related: openclaw#164268, openclaw#164810.
Specialize private agent, Gateway, infrastructure, and plugin flows to their actual callers. Remove unused options, fixed-value forwarding, and unread result fields while preserving public SDK, configuration, protocol, and lifecycle contracts. Preserve the new commentary-media ownership hook during conflict integration. Net production reduction: 969 lines. Independent review was clean; focused owner tests passed and both import-cycle checks reported zero. Matching inherited main failures and exact-head CI evidence are recorded in PR openclaw#165198. Related prior batches: openclaw#164268, openclaw#164810, openclaw#165124.
What Problem This Solves
Private runtime helpers still expose options and alternate paths that no production caller selects, duplicating decisions already made by their callers.
User Impact
Users retain the same behavior, documented configuration and environment variables, persisted data, protocol shapes, tool descriptions, and UI output. Shipped SDK exports remain intact.
Why This Change Was Made
The batch removes 1,068 net production lines and 639 net test/support lines. Tests exercise the retained production paths using real admission scopes and fixed scheduler defaults. The max-lines exception for the now-smaller resource loader and the reduced cast count are pruned.
Evidence
build-artifacts, architecture, dependency, source-contract, and core lint checks passed on7b85ca91a64124b4dbf5be6436269c85c53adc8fin CI run 37119615795. After the fixture corrections below, final-head CI run 37121056677 passed on5f5e9ac40d92c67d3be8e624db59065f3f0b5b2d; squash mergee8df9f33024f6370978e49310abee4f2f63b9023completed on October 3, 2026.nice -n 15, one heavy command at a time.Fixes Found Along the Way
Hosted CI exposed two fixture dependencies on the retired session defaults. The shared fixture now carries its configured thinking level into session creation, preserving the existing high-reasoning and compaction assertions. Worker lifecycle tests now assert that prepared turns avoid policy rediscovery, then explicitly exercise the real policy resolver in the same subprocess to retain the source-policy and compiled SDK identity regression checks. All shutdown, authority, transcript, and settlement assertions remain. The four affected and sibling suites pass 118 tests in 312.11 seconds with one worker. The two reasoning suites also pass 14 tests under Bun in 74.03 seconds, matching the failed CI runtime. Fresh independent review is clean through P2.