fix(memory-wiki): tolerate public artifacts without agent ids#92897
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 14, 2026, 2:30 AM ET / 06:30 UTC. Summary PR surface: Source +1, Tests +70. Total +71 across 3 files. Reproducibility: yes. at source level: register a memory capability whose Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land one canonical fix that normalizes missing Do we have a high-confidence way to reproduce the issue? Yes, at source level: register a memory capability whose Is this the best way to solve the issue? Yes. Normalizing once in AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 462c076a24e2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +70. Total +71 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
1aa30f8 to
19678ed
Compare
|
Maintainer closeout for current head
Landing as the canonical fix for #92207. |
Fixes #92207
Summary
agentIdsproduce an empty agent list instead of throwing.listActiveMemoryPublicArtifactsand the memory-wiki bridge sync path.Real behavior proof
Behavior addressed: memory-wiki bridge imports no longer crash when a public memory artifact omits
agentIds.Real environment tested: local OpenClaw source checkout on macOS, running the actual memory-wiki bridge sync against a temporary workspace and temporary bridge vault with a legacy memory provider that omits
agentIds; no Vitest test harness for this proof.Exact steps or command run after this patch: ran
./node_modules/.bin/tsx -e '...'to create a temp workspace containingMEMORY.md, register a memory public-artifact provider that returns the artifact withoutagentIds, and callsyncMemoryWikiBridgeSourceswith bridge mode enabled.Evidence after fix: live terminal output from that local OpenClaw setup after this patch:
{ "importedCount": 1, "artifactCount": 1, "workspaces": 1, "pagePath": "sources/bridge-workspace-0c64b7ec-memory-2d62c497.md", "titleLine": "# Memory Bridge: MEMORY", "agentsLine": "- Agents: unknown", "threwAgentIdsIterableError": false }Observed result after fix: the bridge imported the public memory artifact, rendered the bridge source page with unknown agents, and did not throw
artifact.agentIds is not iterable.What was not tested: a live Windows gateway session calling every
wiki_*tool; this PR covers the shared bridge sync path that caused the reported crash.Verification
node scripts/run-vitest.mjs src/plugins/memory-state.test.ts -t "normalizes public memory artifacts without agent ids"node scripts/run-vitest.mjs extensions/memory-wiki/src/bridge.test.ts -t "imports bridge artifacts from legacy providers without agent ids"node scripts/run-vitest.mjs src/plugins/memory-state.test.ts extensions/memory-wiki/src/bridge.test.ts./node_modules/.bin/oxfmt --check --threads=1 src/plugins/memory-state.ts src/plugins/memory-state.test.ts extensions/memory-wiki/src/bridge.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/plugins/memory-state.ts src/plugins/memory-state.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/memory-wiki/src/bridge.test.tsnode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test.tsbuildinfogit diff --check -- src/plugins/memory-state.ts src/plugins/memory-state.test.ts extensions/memory-wiki/src/bridge.test.ts