Repository navigation
feat(memory-wiki): allow owner-scoped bridge reads in shared vaults - #189336
Conversation
Keep the sandbox-inferred default. Opt-in owner mode reuses the existing wiki page visibility policy for every caller, including non-sandboxed agents. Co-authored-by: igs-rogenlo <[email protected]> Co-authored-by: ACD_RD4駱俊馳 <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Minimal credited replacement for #129191. Local autoreview is scoped-clean at P0–P2; the focused 64-test owner/reader suite and targeted checks passed. Please review unchanged defaults, opt-in owner filtering, schema validation, and sandbox visibility. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs real behavior proof before merge. What this changesAdds an optional bridge ownership setting that scopes imported-page retrieval while keeping native wiki pages shared. Example: Agent main searches a global vault containing bridge notes owned by main and secondary.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this maintainer-authored PR addresses a distinct shared-vault use case, and source review found no introduced correctness defect. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherMemory Wiki receives trusted caller context and operator configuration, resolves page visibility, and applies that scope to direct reads and worker searches before returning wiki results. flowchart TD
A[Operator configuration] --> C[Wiki query owner]
B[CLI or agent tool context] --> C
C --> D[Ownership visibility scope]
D --> E[Direct reader or scan worker]
F[Shared vault pages] --> E
E --> G[Filtered search or get results]
Technical reviewBest possible solution: Keep the optional policy in the existing plugin visibility owner, preserving default behavior and the documented distinction between retrieval filtering and whole-vault isolation. Do we have a high-confidence way to reproduce the issue? Current main visibly bypasses bridge ownership filtering for non-sandboxed callers; the supplied regression reports that behavior before the change, and no target code was executed during this review. Is this the best way to solve the issue? The implementation is the smallest complete owner-mode change: reuse the existing visibility policy, validate the optional enum at both configuration boundaries, and retain distinct schema and tool-result regressions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 140e7af66277. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete disclosure regression was found, and the existing sandbox predicate remains intact. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +43, Docs +19, Generated 0, Other +2. Total +69 across 10 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 8:01 AM ET / 12:01 UTC. |
|
Merged via squash.
|
…penclaw#189336) Keep the sandbox-inferred default. Opt-in owner mode reuses the existing wiki page visibility policy for every caller, including non-sandboxed agents. Co-authored-by: igs-rogenlo <[email protected]> Co-authored-by: ACD_RD4駱俊馳 <[email protected]>
Supersedes #129191, thanks @igs-rogenlo.
What Problem This Solves
Agents sharing a global wiki cannot restrict imported bridge notes to their owners without also separating the native wiki into per-agent vaults.
User Impact
Operators can opt into
plugins.entries.memory-wiki.config.bridge.ownership: "owner"so non-sandboxed agents retrieve their own bridge notes while native wiki pages stay shared. The omitted setting and explicit"sandboxed-only"preserve today's behavior; sandboxed reads never widen.Owner mode hides bridge pages without matching ownership, including unowned pages and calls without a resolved identity. CLI calls resolve the default agent unless
--agentis supplied. This filters wiki query results, not filesystem access or compiled prompt digests; native aggregate pages remain shared. Existing configurations need no migration or action.Why This Change Was Made
Reuse the existing plugin-owned visibility filter and validate one optional enum in its runtime and manifest schemas. Delegation and public SDK additions from the original proposal are outside this minimal replacement. Main's
vault.scope: "agent"separates the entire vault and does not cover this shared-native-pages scenario.The simplification removes the one-use bridge-page predicate in the same visibility owner. Production TypeScript is −3 lines; manifest schema/help is +8 lines, for +5 production/config lines overall. Tests are +43 lines, allocated in a dedicated test-line record for the tool-level regression and independent schema boundary. Generated config artifacts add exactly one plugin leaf (4911 → 4912); core/channel counts are unchanged.
Evidence
447e14d02460: owner-modewiki_searchreturned another agent's bridge page; runtime schema rejected both new enum values. The original two-file run had 3 expected failures and 40 passes (50.60 seconds wall time).pnpm test extensions/memory-wiki/src/query.test.ts extensions/memory-wiki/src/config.test.ts extensions/memory-wiki/src/query.reads.test.ts extensions/memory-wiki/src/query.path-lookup.test.ts extensions/memory-wiki/src/query.abort.test.ts extensions/memory-wiki/src/query-reader.test.ts --maxWorkers=1— 64 passed, 6 files, 46.77 seconds wall time including cold worker preparation; test execution about 2 seconds. PR CI succeeded at the same head: run 41198930094, all 32 executed jobs passed; the changed-test job took 273 seconds including setup.wiki_searchandwiki_gettools on a synthetic temporary vault, checking omitted/legacy/owner settings, sandboxed and non-sandboxed calls, shared native pages, unowned bridge pages, unresolved identity, and CLI-style default identity. Existing memory-provider seams remain mocked; no live Gateway/model or stable-upgrade run was performed on the production host.config:docs:check,plugins:inventory:check, staged test-line ratchet, andgit diff --checkpassed. Broad compiler/test proof is delegated to PR CI.447e14d02460, including query/config/tool context: scoped-clean at P0–P2, no actionable findings. Local ClawSweeper is unavailable. The requested hosted review completed with no code findings and asks for broader trusted-runtime and fresh/stable-install evidence. Review addressed by the maintainer ruling: the one optional field preserves defaults and sandbox restrictions; focused red→green proof and exact-head green CI are sufficient. Broader runtime/upgrade runs are not required for this change and were not performed. Applicable security review andopenclaw/ci-gatehave passed.gh pr view/gh pr diffonly and was never checked out or executed. Human credit from both commit-author identities is retained; agent co-authors are excluded.Upgrade note: existing configs without
bridge.ownershipvalidate unchanged and retain current sandbox-inferred visibility; the runtime and manifest schema test covers the omitted field, and the tool regression covers unchanged default visibility.