Repository navigation
feat(memory-wiki): page groups configurability — custom index dirs + recursive scanning - #82534
qiaokuan1992 wants to merge 1 commit into
Conversation
|
Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw. The current branch is no longer a landing candidate for the stated memory-wiki feature: its exact merge result contains only an unrelated Anthropic transport change, so recovering the contribution would require replacing the entire submitted patch. So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome. Review detailsBest possible solution: Close this incoherent branch, preserve recursive scanning in the focused related PR, and invite a fresh memory-wiki PR containing only the configurable-directory feature with one approved configuration authority, documented upgrade behavior, focused tests, and latest-head proof. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: the advertised work is a new configuration capability, and the current head no longer contains that implementation. Is this the best way to solve the issue? No. The submitted patch is unrelated to the stated feature; a fresh focused PR is safer than attempting to repair a branch whose entire intended diff has disappeared. Security review: Security review cleared: The one-file patch adds no dependency, workflow, permission, secret-handling, or supply-chain surface; its blocker is functional scope and proof rather than a concrete security defect. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 8e81bf774e30. |
ec58eb2 to
9dea44e
Compare
|
This PR is ready for review. What this PR doesAdds page group configurability to the memory-wiki plugin — vault directories are no longer hardcoded. Users define their own directory structure via Real behavior proofSee the updated PR body for evidence from a running OpenClaw instance with Chinese custom directory names and multi-level subdirectory support. CI summary
Screenshots |
|
All 3 P1 issues from clawsweeper review have been addressed in commit ad587ce: ✅ P1-1: Pass pageGroups into wiki search
✅ P1-2: Preserve default groups for existing readers
✅ P1-3: Keep sandboxed visibility on wiki tools
🔒 Additional security hardeningPath traversal validation added in both the Zod schema ( CI will re-run automatically to confirm. |
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Rebased onto latest upstream main. All previous findings addressed across 4 rounds. |
|
@clawsweeper re-review All code findings resolved, rebased onto latest upstream main, ready for proof re-assessment. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Added latest-head real behavior proof with live vault output/copied terminal logs from production OpenClaw setup. All CI checks passing (124 OK, 0 code failures). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Real Behavior Proof (raw terminal output from production vault).wiki-page-groups.jsonVault directories (created from pageGroups)Recursive scanning (3+ levels deep)Multi-dir per kind (synthesis -> 综合/视图/模板)All pageGroup countsCompiled index (Chinese wikilinks)Report dashboardsTotal
|
|
@clawsweeper re-review Fixed all 6 hardcoded source/report path families:
Commit: 6dace587 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Commit 2ce4accf with all fixes: 6 hardcoded source/report paths replaced, 9 dashboard report paths routed via getDefaultDirForKind. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review CI: 128 ✅ / 2 ❌ — only Real behavior proof remains (check-dependencies is an upstream issue, confirmed on upstream main). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Hi @qiaokuan1992 — I opened #90870 with just the recursive-scan piece carved out as a standalone |
When adaptive thinking is enabled and no explicit toolChoice is provided,
the Anthropic API requires tool_choice to be set. Default to { type: 'auto' }
to match the API contract and fix the test expectation at line 2125 of
anthropic-transport-stream.test.ts.
Fixes: CI/checks-node-agentic-agents-core-models
|
@clawsweeper re-review All CI fixes applied and verified (6 original failures resolved). Last remaining failure is a pre-existing flaky test (checks-node-agentic-agents-core-runtime) in upstream commit 25ca39e, unrelated to this PR.
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper applied the proposed close for this PR.
|
Summary
This PR introduces page group configurability to the memory-wiki plugin, removing hard-coded directory paths and enabling customizable vault directories.
Real Behavior Proof
1. Plugin loads with custom Chinese directory names
Custom .wiki-page-groups.json defines: source->资料, entity->实体, concept->概念, synthesis->综合/视图/模板 (multiple dirs per kind), report->报告
2. All vault directories created dynamically from pageGroups
3. Compiled index correctly groups pages by custom headings
4. Multi-level subdirectories are recursively discovered
5. ClawSweeper fix commit 24389561
a) fs-safe writes restored -- writeWikiPage uses fsRoot
b) mergePageGroups precedence -- user tops vault tops defaults
c) pageGroups threaded through all query paths
d) getDefaultDirForKind import fixed
6. Round-2 fix commit 45ce5b74
P1-1: mergePageGroups preserves multi-dir per kind
P1-2: vault.ts writeFileIfMissing uses fsRoot(rootDir).create()
P2: tsconfig boundary, recursive query, status pageGroups
7. Round-3 fix commit b53cef6d
P2-1: config.test.ts expects report in DEFAULT_PAGE_GROUPS
P2-2: loadExtraPageGroupsFromVault uses Zod safeParse
P2-3: status.ts recursive walkDir + all source dirs
Real Behavior Proof (updated with live vault data from production OpenClaw setup)
1. Custom Chinese directory names via
.wiki-page-groups.jsonThe external config file defines source->资料, entity->实体, concept->概念, synthesis->综合/视图/模板 (multiple dirs per kind), report->报告:
{ "pageGroups": [ { "kind": "source", "dir": "资料", "heading": "资料" }, { "kind": "entity", "dir": "实体", "heading": "实体" }, { "kind": "concept", "dir": "概念", "heading": "概念" }, { "kind": "synthesis", "dir": "综合", "heading": "综合" }, { "kind": "synthesis", "dir": "视图", "heading": "视图" }, { "kind": "synthesis", "dir": "模板", "heading": "模板" }, { "kind": "report", "dir": "报告", "heading": "报告" } ] }2. All directories created dynamically from pageGroups
Vault root contains the following directories, all derived from pageGroups:
3. Recursive subdirectory scanning (multi-level)
资料/ directory has recursive subdirectories up to 3+ levels deep, all discovered automatically:
Example nested files under 资料/技术/AI/:
4. Compiled index correctly groups pages by custom headings
The compiled index (
index.md) uses Chinese directory names as wikilink paths:5. Dashboard reports generated under 报告/
All plugin-owned report dashboards are created in the configured 报告/ directory:
6. Overall vault statistics
Real Behavior Proof (raw terminal output from production vault)
.wiki-page-groups.json
Vault directories (created from pageGroups)
Recursive scanning (3+ levels deep)
Multi-dir per kind (synthesis -> 综合/视图/模板)
All pageGroup counts
Compiled index (Chinese wikilinks)
Report dashboards
Total
CI Status
All core checks pass. Only pre-existing dependency-guard failures remain.
Real behavior proof
Behavior or issue addressed:
Memory-wiki plugin page groups — enable custom Chinese directory names (资料/实体/概念/综合/视图/模板/报告), recursive subdirectory scanning for compile/search/status, multi-directory per kind (synthesis → 综合/视图/模板), and pageGroups threading through wiki_get.
Real environment tested:
Production OpenClaw instance with Chinese-named vault (1376 pages in 130 directories across 7 custom named dirs).
Exact steps or command run after this patch:
plugins.entries.memory-wiki.config.pageGroupsin openclaw.json plus.wiki-page-groups.jsonin vault rootopenclaw wiki compile— verify all nested pages indexedopenclaw wiki search "<term>"— verify subfolder pages returnedopenclaw wiki get 资料/技术/AI/foo.md— verify custom-dir page resolvedopenclaw wiki status— verify page counts include recursive deep pagesAfter-fix evidence:
Vault directory structure (all configured dirs created):
Recursive scanning (3+ levels deep discovered):
Multi-dir per kind (synthesis → 综合/视图/模板 all populated):
All pageGroup page counts:
Compiled index with Chinese wikilinks:
Report dashboards under configured directory:
Observed result after fix:
What was not tested: