molecule-core/workspace-server
Molecule AI Core-BE 1ecc384852 test(handlers): fix delegation and MCP tests exposed by full platform suite
Commit b9311134 added a CanCommunicate hierarchy check to proxyA2ARequest.
The executeDelegation tests call proxyA2ARequest directly but did not mock
the workspace hierarchy lookup, causing sqlmock to reject the unexpected
queries and fall through to the DELEGATION_FAILED path.

Fix: add mockCanCommunicate(mock, testSourceID, testTargetID, true) to
each affected executeDelegation test so the hierarchy check returns true
and the proxy is actually called.

Separately, TestMCPHandler_CommitMemory_GlobalScope_Blocked expected
zero DB calls (the handler should block GLOBAL scope before any DB work).
With no memv2 wired, toolCommitMemory fell through to the legacy shim,
which called scopeToWritableNamespace before the scope check.

Fix: wire memv2 via withMemoryV2APIs(nil, nil) in newMCPHandler so the
v2 path is taken and the GLOBAL scope check fires before any DB call.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 21:30:50 +00:00
..
cmd docs(runbook): add admin-auth.md covering test-token route lockdown 2026-05-10 02:20:30 +00:00
internal test(handlers): fix delegation and MCP tests exposed by full platform suite 2026-05-11 21:30:50 +00:00
migrations feat(plugins): plugin drift detector + queue + admin apply endpoint (#123) 2026-05-10 00:39:50 +00:00
pkg/provisionhook feat(#1957): wire gh-identity plugin into workspace-server 2026-04-24 15:01:41 +00:00
.air.toml feat(local-dev): air-based hot-reload for workspace-server 2026-05-08 08:10:50 -07:00
.ci-force chore: force Platform(Go) CI run on main — validate go vet clean 2026-04-21 15:43:19 +00:00
.gitignore feat(local-dev): containerize platform + canvas stack via docker-compose (closes #126) 2026-05-08 10:53:39 -07:00
.golangci.yaml chore(workspace-server): add golangci.yaml disabling errcheck 2026-04-24 07:16:54 +00:00
Dockerfile ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
Dockerfile.dev ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
Dockerfile.tenant fix(dockerfile-tenant): chown /org-templates to canvas user so !external resolver can mkdir cache 2026-05-09 19:40:52 -07:00
entrypoint-tenant.sh fix(memory-plugin): gate sidecar spawn on cutover-active 2026-05-05 12:39:03 -07:00
go.mod fix(internal#214): refresh go.sum for the go.moleculesai.app/plugin/gh-identity vanity path 2026-05-09 23:55:20 -07:00
go.sum [core-lead-agent] fix(core#228): cascade fixes for PluginResolver — make main compile 2026-05-10 09:46:35 +00:00