test(registry): regression for boot Register non-200 log (#2615) #2630

Merged
devops-engineer merged 1 commits from fix/registry-boot-register-log-regression-test into main 2026-06-12 06:37:58 +00:00
Member

Closes molecule-core#2615 (next coverage gap).

PR #2563 added a deferred log in RegistryHandler.Register that records boot_register_failed status=%d whenever boot registration returns non-200, but it shipped without a test. This change adds two regression tests in workspace-server/internal/handlers/registry_test.go:

  • TestRegister_Non200_LogsStatusCode — drives a 500 response path and asserts the failure log contains the workspace ID and status=500.
  • TestRegister_200_DoesNotLogFailure — drives a successful 200 first-registration and asserts the failure log is not emitted.

Test plan:

cd workspace-server
go test ./internal/handlers -run "TestRegister_Non200_LogsStatusCode|TestRegister_200_DoesNotLogFailure" -v

Both tests pass locally.

Closes molecule-core#2615 (next coverage gap). PR #2563 added a deferred log in `RegistryHandler.Register` that records `boot_register_failed status=%d` whenever boot registration returns non-200, but it shipped without a test. This change adds two regression tests in `workspace-server/internal/handlers/registry_test.go`: - `TestRegister_Non200_LogsStatusCode` — drives a 500 response path and asserts the failure log contains the workspace ID and `status=500`. - `TestRegister_200_DoesNotLogFailure` — drives a successful 200 first-registration and asserts the failure log is *not* emitted. Test plan: ```bash cd workspace-server go test ./internal/handlers -run "TestRegister_Non200_LogsStatusCode|TestRegister_200_DoesNotLogFailure" -v ``` Both tests pass locally.
agent-dev-a added 1 commit 2026-06-12 06:34:52 +00:00
test(registry): regression for boot Register non-200 log (#2615)
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 9s
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 12s
Harness Replays / Harness Replays (pull_request) Successful in 2s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 1s
sop-checklist / na-declarations (pull_request) N/A: (none)
CI / Detect changes (pull_request) Successful in 17s
sop-checklist / all-items-acked (pull_request_target) Successful in 11s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E API Smoke Test / detect-changes (pull_request) Successful in 21s
CI / Canvas Deploy Status (pull_request) Successful in 2s
E2E Chat / detect-changes (pull_request) Successful in 23s
E2E Chat / E2E Chat (pull_request) Successful in 4s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 34s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 43s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 38s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 54s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 31s
CI / Platform (Go) (pull_request) Successful in 2m22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m23s
CI / all-required (pull_request) Successful in 2s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 4s
security-review / approved (pull_request_review) Successful in 5s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
audit-force-merge / audit (pull_request_target) Successful in 9s
6a11c96f13
Adds two regression tests covering #2563's deferred boot_register_failed log:\n\n- TestRegister_Non200_LogsStatusCode: a 500 register path captures the log line with workspace ID and status code.\n- TestRegister_200_DoesNotLogFailure: a successful 200 register does not emit the failure log.\n\nRefs molecule-core#2615.
agent-dev-a requested review from molecule-code-reviewer 2026-06-12 06:37:17 +00:00
agent-dev-a requested review from agent-reviewer-cr2 2026-06-12 06:37:18 +00:00
agent-reviewer-cr2 approved these changes 2026-06-12 06:37:47 +00:00
agent-reviewer-cr2 left a comment
Member

Approved on head 6a11c96f13.

5-axis review:

  • Correctness: the new tests drive the real RegistryHandler.Register path and assert the deferred boot_register_failed status=<code> log appears on a 500 response and is absent on a 200 response.
  • Robustness: both failure and success sides are covered, including workspace ID in the failure log and SQL expectations for the exercised handler branches.
  • Security: no production behavior or secret surface changed; log assertion covers status/workspace identifier only.
  • Performance: test-only change with no runtime cost.
  • Readability: regression intent is clear and the tests reuse existing register-path fixtures.

Verification note: attempted focused Go test, but this runtime does not have go installed. Static review found no blocker.

Approved on head 6a11c96f13e64fb4b3d17fc96b8c6c30e1c3229f. 5-axis review: - Correctness: the new tests drive the real `RegistryHandler.Register` path and assert the deferred `boot_register_failed status=<code>` log appears on a 500 response and is absent on a 200 response. - Robustness: both failure and success sides are covered, including workspace ID in the failure log and SQL expectations for the exercised handler branches. - Security: no production behavior or secret surface changed; log assertion covers status/workspace identifier only. - Performance: test-only change with no runtime cost. - Readability: regression intent is clear and the tests reuse existing register-path fixtures. Verification note: attempted focused Go test, but this runtime does not have `go` installed. Static review found no blocker.
devops-engineer merged commit deac9fc08e into main 2026-06-12 06:37:58 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2630