molecule-core/workspace-server/internal/scheduler
Molecule AI Core-DevOps a50f51eb8f handlers/internal: fix db.DB pollution in registry and scheduler test helpers
Five more test helpers have the same setupTestDB bug (save db.DB but
don't restore on teardown). go test -race runs tests in parallel; when
test A sets db.DB = mockA and test B sets db.DB = mockB, if A runs
first and cleanup closes mockA, B then runs with db.DB pointing at a
closed mock.

Fixed files:
- internal/registry/liveness_test.go    setupLivenessTestDB
- internal/registry/hibernation_test.go  setupHibernationMock
- internal/registry/access_test.go      setupMockDB
- internal/registry/healthsweep_test.go  setupTestDB
- internal/scheduler/scheduler_test.go   setupTestDB

All now follow: prevDB := db.DB; db.DB = mockDB;
t.Cleanup(func() { mockDB.Close(); db.DB = prevDB })

Total files fixed for mc#975: 8 files, ~20 test helper functions across
the workspace-server. Together with the CI fix to remove the
PHASE3_MASKED workaround, this should make CI/Platform (Go) stable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 12:58:03 +00:00
..
native_scheduler_test.go feat(runtime): native_scheduler skip — primitive #3 of 6 2026-04-26 22:47:00 -07:00
scheduler_test.go handlers/internal: fix db.DB pollution in registry and scheduler test helpers 2026-05-14 12:58:03 +00:00
scheduler.go fix(textutil): SSOT for rune-safe string truncation, fix 3 audit-gap bugs 2026-05-05 23:01:21 -07:00