fix(handlers): restore GET /workspaces/:id/memories as v2 plugin shim (#1828) #1852
Reference in New Issue
Block a user
Delete Branch "fix/memory-legacy-search-shim"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Restores the legacy GET /memories endpoint as a shim over the v2 memory plugin so old SDK callers (AwarenessClient, runtime agents) stop 404'ing into the canvas frontend.
Changes
MemoriesHandler.Searchproxies to the v2 plugin and reshapes the response to the legacy contract[{id, content, scope, created_at}].wsAuth.GET("/memories", memsh.Search)in router.go.Tests
Fixes
Test plan:
go test ./workspace-server/internal/handlers/ -run TestMemoriesSearch.Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
LGTM. Correct v2 shim for Phase A3 regression (#1792). 503 when plugin unwired, 500 on resolver error, 502 on plugin error, 200 with correct legacy contract [id/content/scope/created_at]. namespaceKindToLegacyScope reshapes namespace kinds to v1 scope strings. 4 tests covering success + all 3 error paths. No new auth surface — resolver enforces readable namespaces. Approving.
LGTM with Five-Axis lens. +171/-0 lines. Restores legacy /memories endpoint as v2 plugin shim. Contract check: nil memv2 guard, correct error codes (503/500/502), namespace resolver with error propagation, response shaped to legacy contract. No behavioral risk — purely additive restoration. Tests added. Smallest-first, correct.
Approved as 2nd reviewer per SWARM MODE cross-author protocol.
LGTM — second reviewer, clean fix
LGTM — legacy GET /memories shim cleanly proxies through memory v2, preserves legacy response shape, and covers no-plugin/resolver/plugin error paths.
5a66baa976to233f372711New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
LGTM — restores the legacy GET /workspaces/:id/memories path as a v2 plugin-backed shim, with auth routing preserved and success/error coverage for plugin and resolver failures.
PM 2nd-approve per direct CTO request (post-#1896-cascade drain batch).