Skip to content

refactor(config): simplify remaining config helpers - #162097

Merged
steipete merged 1 commit into
mainfrom
deslop/l246-config8-followup
Sep 30, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l246-config8-followup

Conversation

@steipete

@steipete steipete commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Finishes four small helper cleanups found during the maintainer-requested eighth config sweep.

User Impact

No user-visible change. Config schemas, defaults, environment handling, migration decisions, refusal order, and persisted session keys stay the same.

Why This Change Was Made

  • Remove the unused DiscoveryToggleConfig type left after its model discovery fields were retired. It has no repository consumers or public SDK export; the still-used Bedrock type remains.
  • Re-export the docs baseline functions directly through the existing lazy runtime facade, preserving names and dependency order.
  • Let the canonical main-session-key builder perform main-key normalization once.
  • Classify cron ownership once instead of allocating two filtered arrays and repeating the same lookups.

Production diff: 23 added / 40 removed, 17 net lines removed. No tests changed.

Evidence

  • Independent review found no actionable P0-P2 findings.
  • Blacksmith Testbox tbx_01m3sxdrf1qfe6fc408sjgf0bf, run 36767521248, verified the four source hashes against base 3c0ae56c634e664ff12cfc2664bcdb9cf330ce5f.
  • 63 tests passed across docs baseline, cron ownership, session key, session path, and filesystem import-boundary suites.
  • Generated config docs hashes/counts, core typechecking, and changed-file lint passed.
  • Both import-cycle checks reported zero cycles.
  • No schema, generated snapshots, dependencies, or protected SQLite accessor files changed.

Config compatibility assessment

The review's requested compatibility assessment is complete. This changes no schema, default, environment variable, migration marker, redaction rule, or stored format. The docs facade exposes the same five operations in the same dependency order. Main-key normalization remains with buildAgentMainSessionKey, which already calls normalizeMainKey; persisted keys are unchanged. Cron classification preserves both predicates, counts, refusal order, and the existing repair/recheck path. The removed type has no consumers and is absent from public SDK exports. No updater or live-upgrade execution is claimed.

Exact-head hosted CI

Run 36769831270 completed on 91162736eeb2b9660af6c7c48ab32438ed70c23a: 143 jobs passed, 22 skipped, two test jobs failed, and the CI gate failed downstream. Security-fast, dependency review, security-sensitive review, all selected types/lint/build checks, and architecture checks passed.

checks-node-changed-compact-large-26 (job 110073528939) fails setup-inference.first-signin.integration.test.ts:420:38: expected confirm, received note, in the same-owner sign-in/revoked-retry case. The identical failure is present on unrelated PR #162093, head be4f3855425d239b494f77e308881b2b0c7a3157, run 36769218900 / job 110071456815. That PR changes only src/agents/apply-patch-paths.ts. The assertion was introduced by #162020, which is already this PR's base; no Gateway/authentication source or test changes here.

checks-node-changed-compact-small-4-1 (job 110073535262) fails server.catalog-startup.test.ts:86:3, “starts with provider settings without model rows when a channel is auto-enabled,” with Test timed out in 90000ms. The same case/error appears in the latest CI for unrelated PR #160471's still-current head f007e2c16e02455a3ace3d5e803af02bccac4130: September 28 run 36428787158 / job 108950748546. This is independent current-PR evidence, not a claim that the latest hourly main reproduced the timeout.

The docs facade is only loaded by docs baseline generation, the removed type has no runtime effect, and the session helper still applies the same canonical normalization. The cron change only combines synchronous classification; it adds no await, retry, startup operation, or changed refusal decision. The startup fixture has no legacy cron jobs. Gateway/catalog/auth source and both failing tests are unchanged by this PR. These inherited failures remain with the main-CI coordinator; no retry, timeout increase, assertion change, or main repair is included. The maintainer-authorized exception is pinned to the exact tested head and does not describe the hosted run as green.

The catalog-startup test has identical Git blob d60a895ece760b2cfb5f066acf0787a8a2ee4f11 at this PR's base/head and the independent PR head above.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) September 30, 2026 20:06
@clawsweeper

clawsweeper Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 30, 2026, 4:06 PM ET / 20:06 UTC.

ClawSweeper review

What this changes

The PR simplifies documentation exports and cron-owner classification, removes duplicate session-key normalization, and deletes an unused model-config type.

Merge readiness

⛔ Blocked before merge - 1 item remains

Current main still contains the older helpers, so this focused cleanup remains useful. Source inspection found no introduced change to the examined config-write or session-key contracts.

Priority: P3
Reviewed head: 91162736eeb2b9660af6c7c48ab32438ed70c23a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A compact, source-consistent cleanup with relevant existing coverage and no identified patch defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR reports focused Testbox results; source inspection found no stored-format change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR reports focused Testbox results; source inspection found no stored-format change.
Evidence reviewed 8 items Introduced patch: The pinned PR delta changes four config helper files and no tests, schemas, dependencies, or workflows.
Current-main comparison: The verified test-merge result retains these four edits relative to its current-main parent; the cleanup is not already on that main revision.
Documentation loader: The lazy runtime facade still exposes the same five documentation-schema operations.
Findings None None.
Security None None.

How this fits together

OpenClaw config helpers generate configuration documentation and guard config writes. Session-key routing maps inbound messages to persisted session buckets.

flowchart LR
  A[Config and message inputs] --> B[Config helpers]
  B --> C[Docs schema loader]
  B --> D[Cron owner check]
  B --> E[Session key builder]
  C --> F[Generated config docs]
  D --> G[Config write or refusal]
  E --> H[Session store bucket]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

Source -17. Total -17 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 4 23 40 -17
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 23 40 -17

Review metrics

None.

Technical review

Best possible solution:

Retain the canonical session-key builder and the existing cron refusal contract, then land the smaller helpers through the normal PR gates.

Do we have a high-confidence way to reproduce the issue?

Not applicable: the PR reports no defect. Existing tests and the inspected source define the behavior it aims to preserve.

Is this the best way to solve the issue?

Yes: the patch reuses existing owners for normalization and documentation exports without adding a competing config path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7045908edbfc.

Labels

Label changes:

  • add P3: This is a small, behavior-preserving cleanup with no reported user-facing defect.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a small, behavior-preserving cleanup with no reported user-facing defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete disabled auto-merge September 30, 2026 20:35
@steipete
steipete merged commit 8f469e9 into main Sep 30, 2026
222 of 226 checks passed
@steipete
steipete deleted the deslop/l246-config8-followup branch September 30, 2026 20:35
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
## What Problem This Solves

Finishes four small helper cleanups found during the maintainer-requested eighth config sweep.

## User Impact

No user-visible change. Config schemas, defaults, environment handling, migration decisions, refusal order, and persisted session keys stay the same.

## Why This Change Was Made

- Remove the unused `DiscoveryToggleConfig` type left after its model discovery fields were retired. It has no repository consumers or public SDK export; the still-used Bedrock type remains.
- Re-export the docs baseline functions directly through the existing lazy runtime facade, preserving names and dependency order.
- Let the canonical main-session-key builder perform main-key normalization once.
- Classify cron ownership once instead of allocating two filtered arrays and repeating the same lookups.

Production diff: 23 added / 40 removed, **17 net lines removed**. No tests changed.

## Evidence

- Independent review found no actionable P0-P2 findings.
- Blacksmith Testbox `tbx_01m3sxdrf1qfe6fc408sjgf0bf`, [run 36767521248](https://github.com/openclaw/openclaw/actions/runs/36767521248), verified the four source hashes against base `c3dd660f699728d5ba714e447f8484590d085f5d`.
- 63 tests passed across docs baseline, cron ownership, session key, session path, and filesystem import-boundary suites.
- Generated config docs hashes/counts, core typechecking, and changed-file lint passed.
- Both import-cycle checks reported zero cycles.
- No schema, generated snapshots, dependencies, or protected SQLite accessor files changed.

### Config compatibility assessment

The review's requested compatibility assessment is complete. This changes no schema, default, environment variable, migration marker, redaction rule, or stored format. The docs facade exposes the same five operations in the same dependency order. Main-key normalization remains with `buildAgentMainSessionKey`, which already calls `normalizeMainKey`; persisted keys are unchanged. Cron classification preserves both predicates, counts, refusal order, and the existing repair/recheck path. The removed type has no consumers and is absent from public SDK exports. No updater or live-upgrade execution is claimed.

### Exact-head hosted CI

[Run 36769831270](https://github.com/openclaw/openclaw/actions/runs/36769831270) completed on `91162736eeb2b9660af6c7c48ab32438ed70c23a`: 143 jobs passed, 22 skipped, two test jobs failed, and the CI gate failed downstream. Security-fast, dependency review, security-sensitive review, all selected types/lint/build checks, and architecture checks passed.

`checks-node-changed-compact-large-26` ([job 110073528939](https://github.com/openclaw/openclaw/actions/runs/36769831270/job/110073528939)) fails `setup-inference.first-signin.integration.test.ts:420:38`: expected `confirm`, received `note`, in the same-owner sign-in/revoked-retry case. The identical failure is present on unrelated PR openclaw#162093, head `be4f3855425d239b494f77e308881b2b0c7a3157`, [run 36769218900 / job 110071456815](https://github.com/openclaw/openclaw/actions/runs/36769218900/job/110071456815). That PR changes only `src/agents/apply-patch-paths.ts`. The assertion was introduced by openclaw#162020, which is already this PR's base; no Gateway/authentication source or test changes here.

`checks-node-changed-compact-small-4-1` ([job 110073535262](https://github.com/openclaw/openclaw/actions/runs/36769831270/job/110073535262)) fails `server.catalog-startup.test.ts:86:3`, “starts with provider settings without model rows when a channel is auto-enabled,” with `Test timed out in 90000ms`. The same case/error appears in the latest CI for unrelated PR openclaw#160471's still-current head `f007e2c16e02455a3ace3d5e803af02bccac4130`: [September 28 run 36428787158 / job 108950748546](https://github.com/openclaw/openclaw/actions/runs/36428787158/job/108950748546). This is independent current-PR evidence, not a claim that the latest hourly main reproduced the timeout.

The docs facade is only loaded by docs baseline generation, the removed type has no runtime effect, and the session helper still applies the same canonical normalization. The cron change only combines synchronous classification; it adds no await, retry, startup operation, or changed refusal decision. The startup fixture has no legacy cron jobs. Gateway/catalog/auth source and both failing tests are unchanged by this PR. These inherited failures remain with the main-CI coordinator; no retry, timeout increase, assertion change, or main repair is included. The maintainer-authorized exception is pinned to the exact tested head and does not describe the hosted run as green.

The catalog-startup test has identical Git blob `d60a895ece760b2cfb5f066acf0787a8a2ee4f11` at this PR's base/head and the independent PR head above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant