molecule-core/workspace-server
Molecule AI Dev Lead 84d9738b12 test(handlers): update KI005 terminal tests for ValidateToken (GH#756)
Three tests used ValidateAnyToken mock expectations and fallthrough behavior.
Now that HandleConnect uses ValidateToken (token-to-workspace binding), update:

- RejectsUnauthorizedCrossWorkspace: mock expects SELECT id+workspace_id
  (ValidateToken pattern); row returns workspace_id=ws-caller so validation
  passes, then CanCommunicate=false → 403 as before.

- RejectsInvalidToken: add setupTestDB so ValidateToken has a real mock;
  with no ExpectQuery set, the query returns error → 401 Unauthorized
  (was 503 fall-through; 401 is the correct explicit rejection).

- AllowsSiblingWorkspace: add setupTestDB + ValidateToken mock returning
  ws-pm binding; CanCommunicate=true → Docker nil → 503 as before.
2026-04-23 20:59:21 +00:00
..
cmd/server fix(go): replace $1 literal with resp.Body.Close() in 7 files (#1247) 2026-04-21 03:18:21 +00:00
internal test(handlers): update KI005 terminal tests for ValidateToken (GH#756) 2026-04-23 20:59:21 +00:00
migrations fix(review): address code review blockers on tool-trace + instructions 2026-04-22 16:18:06 -07:00
pkg/provisionhook fix(docker): fix plugin go.mod replace for TokenProvider interface (#960) 2026-04-20 13:42:53 -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(ws-server): pull env from CP on startup 2026-04-19 02:41:15 -07:00
Dockerfile chore: extract ContextMenu Zustand fix + a2a_proxy local-docker SSRF bypass + workspace-server Dockerfile GID entrypoint 2026-04-22 20:00:16 -07:00
Dockerfile.tenant feat(terminal): remote path via aws ec2-instance-connect + pty 2026-04-21 18:13:29 -07:00
entrypoint-tenant.sh fix(security): add USER directive before ENTRYPOINT in all tenant images (#1155) 2026-04-20 23:51:33 +00:00
go.mod Merge main into staging - resolving 1,388 commit divergence for PR #1573 2026-04-22 13:54:53 +00:00
go.sum feat(terminal): remote path via aws ec2-instance-connect + pty 2026-04-21 18:13:29 -07:00