Repository navigation
refactor(memory-wiki): inline gateway source sync - #134992
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 4:54 AM ET / 08:54 UTC. ClawSweeper reviewWhat this changesThe PR deletes a private Memory Wiki gateway wrapper and calls the canonical imported-source sync directly from its seven synchronous gateway operations. Merge readinessNo blocking correctness or security finding: the seven gateway handlers preserve the same awaited source-sync call, inputs, signal behavior, and error boundary. This member-authored, maintainer-labeled PR should remain open for normal maintainer handling. Priority: P3 Review scores
Verification
How this fits togetherGateway requests enter the Memory Wiki plugin, resolve the active configuration and lifecycle signal, synchronize imported sources, then read or update the wiki vault. The source-sync owner serializes vault writes and refreshes derived indexes before the gateway returns its result. flowchart LR
A[Gateway request] --> B[Memory Wiki gateway]
B --> C[Resolve config and signal]
C --> D[Imported source sync]
D --> E[Wiki read or mutation]
E --> F[Gateway response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -12. Total -12 across 1 file. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Merge the deletion-only refactor if normal maintainer review accepts it, leaving source synchronization owned solely by the canonical source-sync module. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR intentionally preserves existing behavior, and source comparison establishes the same sync arguments, await ordering, and exception propagation. Is this the best way to solve the issue? Yes. Removing the private adapter is the cleanest path because the same canonical object call is already used by the gateway’s explicit import operations and Memory Wiki CLI paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f91bbe52916. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
The Memory Wiki gateway carried a local positional wrapper around the canonical source-sync object API. That wrapper owned no policy, lifecycle, ordering, or error behavior, and duplicated an already-direct call pattern in the same module.
Why This Change Was Made
Delete
syncImportedSourcesIfNeededand have its seven gateway call sites invokesyncMemoryWikiImportedSourcesdirectly. Each call preserves the sameconfig,appConfig, conditionalsignalproperty,awaitordering, and surroundingtry/catchboundary.The architectural owner remains
extensions/memory-wiki/src/source-sync.ts; tool-side wrappers and all config, storage, SDK, docs, and test surfaces remain unchanged.User Impact
No user-visible behavior change. The gateway now has one fewer adapter and one canonical source-sync call shape.
Evidence
pnpm test:extension memory-wiki: 42 files, 489 tests passed.node scripts/check-changed.mjs -- extensions/memory-wiki/src/gateway.ts: all selected checks passed except the dead-export scan initially lacked trackedui/configfiles omitted by the shared worktree sparse profile.node --import tsx scripts/check-deadcode-exports.mts: production, full-tree, and script scans passed with 0 entries.pnpm check:import-cycles: 0 runtime value cycles.pnpm build: passed.git diff --check: passed.Production LOC:
+7/-19, net-12.Test LOC:
0.Overlap checked on September 1, 2026:
gateway.ts.gateway.ts.