Skip to content

fix(knowledge): show read and write settings enabled on first install - #184755

Merged
roboclaw-bot merged 2 commits into
openclaw:mainfrom
hannesrudolph:fix/knowledge-first-install-defaults
Nov 5, 2026
Merged

roboclaw-bot merged 2 commits into
openclaw:mainfrom
hannesrudolph:fix/knowledge-first-install-defaults

Conversation

@hannesrudolph

@hannesrudolph hannesrudolph commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes Operator Read and Writes Enabled appearing off when opening Knowledge settings on a first install, even though both runtime defaults are on.

User Impact

Fresh Knowledge settings now reflect the effective read/write policy without requiring an edit. Explicit false values remain off, including after saving and reloading. No migration or operator action is required.

Why This Change Was Made

Declare the existing runtime defaults in both Knowledge configuration schema sources so the schema-driven Control UI can display them. This is a metadata correction, not a change to runtime permissions or generic form behavior.

Evidence

  • The focused browser regression failed on the original unchecked default, then passed with the fix using the actual Knowledge manifest and production config schema builder.
  • Verified opening settings does not write config, each gate can be disabled independently, omitted siblings remain omitted, and explicit opt-outs survive save/reload.
  • Existing policy tests (3), extension source typecheck, UI E2E typecheck, targeted lint/format and config documentation baseline check passed.
  • Production runtime and Control UI builds passed. An additional isolated real Gateway + Chromium proof (no WebSocket mocks) passed: fresh omitted gates display on without authoring config, each explicit opt-out reaches the real config file and survives browser reload, and both opt-outs remain unchanged after Gateway restart. No operator Gateway or live configuration was changed.
  • Latest stable v2026.10.7 has no bundled Knowledge plugin, so there is no stable Knowledge configuration to upgrade. Existing authored opt-outs were instead verified through the actual candidate persistence/restart lifecycle.
  • Local independent review found no code or security defect; the missing execution evidence noted by that review is supplied here.
  • Dependency and sensitive-change security statuses now pass; dependency review reports no dependency changes requiring review.

Before:

Knowledge first-install settings before, read and write gates unchecked

After:

Knowledge first-install settings after, read and write gates checked

Real isolated Gateway round-trip

Fresh config with both values omitted:

Real isolated Gateway showing read and write defaults enabled

Explicit opt-outs persisted through the real Gateway and browser reload, then independently checked unchanged after Gateway restart:

Real isolated Gateway showing saved read and write opt-outs

@clawsweeper

clawsweeper Bot commented Oct 26, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui plugin: knowledge size: S labels Oct 26, 2026
@hannesrudolph
hannesrudolph marked this pull request as ready for review October 26, 2026 15:33
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR declares Knowledge’s existing read and write defaults in both configuration schemas so omitted settings display as enabled.

Example: Open Knowledge settings with plugins.entries.knowledge.config omitted.

  • Before: Operator Read and Writes Enabled appear unchecked although both runtime policies are true.
  • After: Both appear checked, while explicitly saved false values remain unchecked.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow contract correction with inspected shipped-UI evidence, a meaningful browser regression, preserved opt-outs, and green exact-head checks.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots demonstrate the changed Knowledge settings, and isolated real Gateway screenshots plus the recorded Chromium round-trip cover omitted defaults and persisted false values through reload and restart.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Knowledge settings misleadingly show read and write access disabled when omitted configuration enables both.
Reason: This maintainer-authored correction aligns visible settings with the existing documented contract without introducing options or changing effective permissions.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR corrects misleading Knowledge settings with a focused patch, convincing visual proof, and green checks; no actionable defect was found.

Priority: P2
Reviewed head: e1a7985298462d44f0f942875073eafd8a003c31

Before merge

None.

Findings

None.

Agent review details

How this fits together

Knowledge supplies plugin configuration schemas to the Gateway’s config schema builder; the Control UI renders those defaults alongside authored settings, while Knowledge resolves runtime policy.

flowchart LR
  A[Knowledge manifest] --> C[Gateway config schema]
  B[Runtime configuration schema] --> E[Knowledge policy]
  C --> D[Control UI settings]
  F[Authored configuration] --> D
  F --> E
Loading

Technical review

Best possible solution:

Merge the focused schema correction while retaining existing runtime policy and explicit opt-outs.

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

Current-main schema omissions, the renderer’s false fallback, and the supplied before screenshot establish the mismatch; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The smallest complete fix is to declare the existing defaults at both plugin schema sources and exercise the settings flow; no generic renderer change or new policy owner is needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6a1f6b0c7bc7.

Provenance checked

  • Knowledge read/write schema metadata keeps the original intent (65ad180: The bundling change retained Knowledge’s default-on runtime policy while exposing its configuration through the plugin manifest.)
  • Generated configuration fingerprints keeps the original intent (ee584a7: The fingerprints track configuration schema output; refreshing plugin and combined hashes follows the metadata correction.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit 65ad180 adds extensions/knowledge/src/stores-config.ts:95 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 65ad18005286; files: extensions/knowledge/src/stores-config.ts)

PR surface

Source +2, Tests +92, Generated 0. Total +94 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 6 4 +2
Tests 1 92 0 +92
Docs 0 0 0 0
Config 0 0 0 0
Generated 1 2 2 0
Other 0 0 0 0
Total 4 100 6 +94

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Incorrect checkbox state creates bounded settings confusion without changing runtime access or blocking setup.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 11:54 AM ET / 15:54 UTC.

steipete added a commit that referenced this pull request Oct 30, 2026
…88556)

## What Problem This Solves

Knowledge currently walks valid store keys twice and makes an extra array copy before three explorer projections. Let the existing schema validator own key validation, and let filter/toSorted/toReversed provide the arrays they already allocate.

## User Impact

No user-visible behavior change. The malformed-membership path still makes affected agents unavailable. Store-key syntax, membership/authority checks, sorting, rendering, pagination, and source-array ownership stay unchanged. No SQL, schema, SDK, or provider-request change.

## Why This Change Was Made

The validated schema owns key syntax; the native array methods own the required copies. Keep those owners and delete the redundant work.

## Evidence

### Acceptance and counts

This is a four-site cleanup, using the final-small-batch exception; production +4/-5 lines (net -1), net test lines unchanged. Count acceptance: one redundant key scan and its regex allocation removed; three explicit array copies removed. No wall-clock, CPU, SQL, or Gateway latency claim; no timing experiment. Existing nonmutating methods remain, with no new lint suppression.

- Focused existing stores-config suite: 4/4 passed, including malformed-key invalidation, revision stability, policy rejection, and conversation grants.
- Changed-file oxfmt, oxlint, and git diff --check passed.
- Two isolated Codex P0–P2 reviews of the full four-file diff against 8f1ef6c: both scoped-clean; no findings. Initial temporary-directory preflight refusals were corrected before either reviewer executed.
- Initial exact-head CI run 41097808042 exposed a storage-schema replacement-fixture failure (expected three indexes, got two). The unchanged file passes 10/10 on both base and candidate; inode reuse was not reproduced locally. Earlier fixture cleanup can leave freed inode IDs in the module admission set. The replacement test now uses a freshly imported owner, preserves both warm-file/replacement index assertions, and passes 10/10 locally. Net test lines remain zero.
- One additional isolated Codex P0–P2 delta review found no actionable issue in the fixture repair; the final import alias also passes no-shadow lint.
- Final exact-head CI 41099978168 at 31f0f63: all applicable test, type, lint, source-contract, architecture, extension-boundary and baseline-ratchet gates passed, including the previously failing extensions-config shard. Security/dependency review passed. GitHub status requests intermittently returned 502/504; no test rerun or bypass was used.

Open-PR overlap comparison used base and candidate merge-tree output against #186270 (2a8f1cc) and #184755 (e1a7985). Conflict blocks are identical: 51→51 and 1→1 respectively; no new conflict. Final shared-index refresh also checked the test file and found no further peers. #186270 is now merged; the remaining open #184755 still has the identical single unrelated generated-baseline conflict. Broader scan candidates needing mutable-sort lint exceptions, uncertain input contracts, or another owner were retained rather than included here.

Release-note context: reduce redundant Knowledge config validation and explorer array copying without changing user-visible behavior.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…enclaw#188556)

## What Problem This Solves

Knowledge currently walks valid store keys twice and makes an extra array copy before three explorer projections. Let the existing schema validator own key validation, and let filter/toSorted/toReversed provide the arrays they already allocate.

## User Impact

No user-visible behavior change. The malformed-membership path still makes affected agents unavailable. Store-key syntax, membership/authority checks, sorting, rendering, pagination, and source-array ownership stay unchanged. No SQL, schema, SDK, or provider-request change.

## Why This Change Was Made

The validated schema owns key syntax; the native array methods own the required copies. Keep those owners and delete the redundant work.

## Evidence

### Acceptance and counts

This is a four-site cleanup, using the final-small-batch exception; production +4/-5 lines (net -1), net test lines unchanged. Count acceptance: one redundant key scan and its regex allocation removed; three explicit array copies removed. No wall-clock, CPU, SQL, or Gateway latency claim; no timing experiment. Existing nonmutating methods remain, with no new lint suppression.

- Focused existing stores-config suite: 4/4 passed, including malformed-key invalidation, revision stability, policy rejection, and conversation grants.
- Changed-file oxfmt, oxlint, and git diff --check passed.
- Two isolated Codex P0–P2 reviews of the full four-file diff against 5fe865c: both scoped-clean; no findings. Initial temporary-directory preflight refusals were corrected before either reviewer executed.
- Initial exact-head CI run 41097808042 exposed a storage-schema replacement-fixture failure (expected three indexes, got two). The unchanged file passes 10/10 on both base and candidate; inode reuse was not reproduced locally. Earlier fixture cleanup can leave freed inode IDs in the module admission set. The replacement test now uses a freshly imported owner, preserves both warm-file/replacement index assertions, and passes 10/10 locally. Net test lines remain zero.
- One additional isolated Codex P0–P2 delta review found no actionable issue in the fixture repair; the final import alias also passes no-shadow lint.
- Final exact-head CI 41099978168 at 31f0f63: all applicable test, type, lint, source-contract, architecture, extension-boundary and baseline-ratchet gates passed, including the previously failing extensions-config shard. Security/dependency review passed. GitHub status requests intermittently returned 502/504; no test rerun or bypass was used.

Open-PR overlap comparison used base and candidate merge-tree output against openclaw#186270 (2a8f1cc) and openclaw#184755 (e1a7985). Conflict blocks are identical: 51→51 and 1→1 respectively; no new conflict. Final shared-index refresh also checked the test file and found no further peers. openclaw#186270 is now merged; the remaining open openclaw#184755 still has the identical single unrelated generated-baseline conflict. Broader scan candidates needing mutable-sort lint exceptions, uncertain input contracts, or another owner were retained rather than included here.

Release-note context: reduce redundant Knowledge config validation and explorer array copying without changing user-visible behavior.
RomneyDa added a commit that referenced this pull request Oct 31, 2026
…88556)

## What Problem This Solves

Knowledge currently walks valid store keys twice and makes an extra array copy before three explorer projections. Let the existing schema validator own key validation, and let filter/toSorted/toReversed provide the arrays they already allocate.

## User Impact

No user-visible behavior change. The malformed-membership path still makes affected agents unavailable. Store-key syntax, membership/authority checks, sorting, rendering, pagination, and source-array ownership stay unchanged. No SQL, schema, SDK, or provider-request change.

## Why This Change Was Made

The validated schema owns key syntax; the native array methods own the required copies. Keep those owners and delete the redundant work.

## Evidence

### Acceptance and counts

This is a four-site cleanup, using the final-small-batch exception; production +4/-5 lines (net -1), net test lines unchanged. Count acceptance: one redundant key scan and its regex allocation removed; three explicit array copies removed. No wall-clock, CPU, SQL, or Gateway latency claim; no timing experiment. Existing nonmutating methods remain, with no new lint suppression.

- Focused existing stores-config suite: 4/4 passed, including malformed-key invalidation, revision stability, policy rejection, and conversation grants.
- Changed-file oxfmt, oxlint, and git diff --check passed.
- Two isolated Codex P0–P2 reviews of the full four-file diff against 8f1ef6c: both scoped-clean; no findings. Initial temporary-directory preflight refusals were corrected before either reviewer executed.
- Initial exact-head CI run 41097808042 exposed a storage-schema replacement-fixture failure (expected three indexes, got two). The unchanged file passes 10/10 on both base and candidate; inode reuse was not reproduced locally. Earlier fixture cleanup can leave freed inode IDs in the module admission set. The replacement test now uses a freshly imported owner, preserves both warm-file/replacement index assertions, and passes 10/10 locally. Net test lines remain zero.
- One additional isolated Codex P0–P2 delta review found no actionable issue in the fixture repair; the final import alias also passes no-shadow lint.
- Final exact-head CI 41099978168 at 31f0f63: all applicable test, type, lint, source-contract, architecture, extension-boundary and baseline-ratchet gates passed, including the previously failing extensions-config shard. Security/dependency review passed. GitHub status requests intermittently returned 502/504; no test rerun or bypass was used.

Open-PR overlap comparison used base and candidate merge-tree output against #186270 (2a8f1cc) and #184755 (e1a7985). Conflict blocks are identical: 51→51 and 1→1 respectively; no new conflict. Final shared-index refresh also checked the test file and found no further peers. #186270 is now merged; the remaining open #184755 still has the identical single unrelated generated-baseline conflict. Broader scan candidates needing mutable-sort lint exceptions, uncertain input contracts, or another owner were retained rather than included here.

Release-note context: reduce redundant Knowledge config validation and explorer array copying without changing user-visible behavior.

(cherry picked from commit cd8290c)
Co-authored-by: RomneyDa <[email protected]>
Preserve the current Knowledge schema and prompt metadata, regenerate config fingerprints, and align regression selectors with current UI copy.

Co-authored-by: jalehman <[email protected]>
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 5, 2026 23:17
@roboclaw-bot
roboclaw-bot merged commit 439d6eb into openclaw:main Nov 5, 2026
105 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. plugin: knowledge proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants