Repository navigation
refactor(config): deslop config and secrets - #157146
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 September 24, 2026, 7:57 AM ET / 11:57 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates configuration and plugin checks, SecretRef handling, and session transcript worker helpers, and removes a synchronous transcript-tail reader. Merge readiness⛔ Blocked before merge - 2 items remain This cleanup remains distinct from current main. The prior review’s update-proof request is addressed in the PR body, and source inspection found no definite introduced defect. The linked Testbox logs could not be independently inspected. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw loads configuration and plugin metadata, resolves credentials, and supplies the resulting state to the Gateway. Session history is read from SQLite through transcript workers for Gateway clients. flowchart LR
A[Config and auth stores] --> C[Config validation]
B[Plugin manifests] --> C
C --> D[Secret preparation]
D --> E[Gateway runtime]
F[Session SQLite store] --> G[Transcript worker]
G --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1482, Tests -6, Other -1. Total -1489 across 73 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep configuration, credential, and transcript decisions with their existing owners while preserving fresh-install and upgrade behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes duplicate implementation rather than reporting a broken behavior. Is this the best way to solve the issue? Yes: the branch reuses existing config, secrets, and transcript owners without adding a competing configuration or credential path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 074198a6341a. 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 (3 earlier review cycles) |
1aed667 to
8df9af6
Compare
8df9af6 to
a39f016
Compare
|
Merged via squash.
|
* refactor(config): deslop config and secrets * refactor(config): keep session path input immutable
…ifestSetupProvider The rebase onto main's openclaw#157146 metadata contribution refactor made tsgo infer the fixture's authEvidence as { type: string }[], which no longer satisfies PluginManifestSetupProviderAuthEvidence (missing required credentialMarker, non-literal type). Annotate the fixture and supply the required marker. Formatting proven separately: oxfmt 0.67.0 --check passes on the staged file (the host has no node_modules for the hook to run it).
What Problem This Solves
Config loading and secret preparation duplicate validation, target descriptions, result projections, and forwarding layers that must otherwise stay synchronized.
User Impact
No user-visible behavior change or migration. Config keys/defaults, validation and diagnostic text, generated schema/docs, SecretRef precedence, exec-provider restrictions, persisted state, Gateway protocol, and public plugin SDK contracts are preserved.
Why This Change Was Made
Existing owners now supply the shared behavior:
effectiveConfigRaw.Registry discovery order, aliases, and
includeInPlanremain covered by all six daemon-install consumer suites. Storage transactions, permissions, exec allowlists, redaction, revocation, and retention are unchanged.Evidence
Production-filter diff:
69 files changed, 1218 insertions(+), 2701 deletions(-)— 1,483 net lines removed (1,482 production TypeScript lines plus one shrink-only baseline line):Independent Codex autoreview is clean through P2, including the final path-input cleanup. No accepted/actionable findings remain. Both subsequent rebases are patch-identical by
git range-diff.a39f016dbefb5bf0df5655d0b4a9774149968051: green, including the aggregate CI/security status. CI run.node scripts/check-changed.mjs --base 4098a8106338d925a0be4ebf472fcaf1686d94c9: passed on final head in 1,742.301s on Linux Testbox. Earlier complete Linux runs passed, including all 25 typecheck shards and three Knip scans. No timeout or skip settings changed.pnpm config:schema:check,pnpm config:docs:check,pnpm config:channels:check,pnpm plugin-sdk:surface:check,pnpm plugin-sdk:check-exports, andnode scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts: passed on final head. Generated-sourcegit diff --exit-code: zero drift. Final Testbox run.plugin-sdk:api:check,pnpm plugin-sdk:api:diff --base 4098a8106338d925a0be4ebf472fcaf1686d94c9 --head HEAD: passed in 319.560s. Zero entrypoint or export additions/removals and zero direct signature changes. Its 993 reachable records reduce to 17 unique declaration differences; review confirmed internal export/type changes and type-emission ordering, with no public SDK contract break. Main's renderer fix fix(ci): render empty tuple SDK defaults #157183 resolves the earlier base-and-headDataViewfailure.node scripts/run-vitest.mjswith 990 selected focused/cross-shard files: passed in 2,570.620s on the original implementation, including config/secrets suites, affected consumers, and all six daemon-install suites. Two UI E2E files passed (8 tests). The subsequent credential discriminant correction emitted identical JavaScript; the local path-binding cleanup separately passed five boundary tests.pnpm buildpassed in 1,179.755s, and the later E2E bootstrap completed a full build in 18m34s. This proof was retained across the patch-identical rebases; final-head CI and the checks above cover the final source.node scripts/test-docker-all.mjs, scoped toonboard(local-basic,local-auth-refs) andpublished-upgrade-survivorwith baseline[email protected]: passed. Fresh setup took 24s; the auth-profile upgrade cell took 296s; the SQLite/session cell took 326s. Both receipts confirm the installed published updater performed the update successfully, with no recovery. Gateway SecretRef activation/authentication/readiness passed;sessions.listandchat.historyverified eight conversations across two agents before and after a manual Gateway restart. The bounded synthetic fixture contained 12 sessions, 50 events, and eight cron jobs; this is functional compatibility proof, not stress coverage. Package source was8df9af674e5cc3576cce4643252f54d54d6d85cdbefore the final patch-identical rebase; tarball SHA-25638841ddb335fa5d2f8ff95dd3dbc5e3a56bb135a65dfaaf76dc6b9c5b295c017. Installed-package Testbox run.The registry E2E limitation is pre-existing: the identical 12-file selection on one Linux Testbox failed 28 cases on clean baseline
cdd5eebe3c87b2ed6478358514e2d30a39b2a2acand 27 on the candidate, with zero candidate-only failures. Ten candidate files / 136 tests passed. The earlier comparison likewise had 27 baseline versus 26 candidate failures, with zero candidate-only failures. Latest A/B run. No assertions or timeouts were weakened, and these delivery-settlement failures are not claimed fixed.CI recovery: rebased to include #157133's missing wrapper-archive dependencies. A same-host tooling A/B reproduced its 11 failures on the old merge baseline; the corrected candidate removed those failures. An intermittent native-TypeScript
context canceledstderr assertion remains recorded. A later hosted worker-facade case hit its existing 120-second timeout; replaying its original 42-file shard passed on both base and candidate (155.907s / 164.361s total; the case took 32.762s / 43.255s). Neither passing replay is claimed as a fix. Final CI is green after the necessary SDK-reporter rebase.Changed-test cost with
pnpm test <file> --maxWorkers=1on Linux Testbox:io.context.plugin-metadata.test.ts15.455s;session-accessor.sqlite-cold-read.test.ts63.421s;session-cold-storage.test.ts53.320s;runtime-shared.test.ts1.631s. No new tests, sleeps, worker pins, or serial configuration were added.