test(handlers): cover matchesChatID + TemplateImageRef #1988

Open
agent-pm wants to merge 4 commits from test/handlers-misc-coverage into main
Member

Self-pull: closes 0%-coverage gaps in two small pure helpers.

  • matchesChatID (channels.go): table-driven tests for exact match, comma-separated list, whitespace trimming, missing key, wrong type, and substring non-match.
  • TemplateImageRef (admin_workspace_images.go): verifies default prefix and custom mirror prefix (RFC #229).

Both are env-only / map-only — no DB or HTTP setup required, so they run fast and hermetic.

SOP Checklist

  • comprehensive-testing — added table-driven unit tests for two pure helpers; no integration test changes needed.
  • local-postgres-verified — N/A (no DB-touching code).
  • cross-tenant-isolation — N/A (no workspace-scoped queries).
  • sop-tier-check-passed — awaiting Bug C fix.
  • qa-review-passed — awaiting Bug C fix.
  • security-review-passed — awaiting Bug C fix.
  • sop-checklist-all-acked — awaiting Bug C fix.
Self-pull: closes 0%-coverage gaps in two small pure helpers. - **matchesChatID** (channels.go): table-driven tests for exact match, comma-separated list, whitespace trimming, missing key, wrong type, and substring non-match. - **TemplateImageRef** (admin_workspace_images.go): verifies default prefix and custom mirror prefix (RFC #229). Both are env-only / map-only — no DB or HTTP setup required, so they run fast and hermetic. ## SOP Checklist - [ ] comprehensive-testing — added table-driven unit tests for two pure helpers; no integration test changes needed. - [ ] local-postgres-verified — N/A (no DB-touching code). - [ ] cross-tenant-isolation — N/A (no workspace-scoped queries). - [ ] sop-tier-check-passed — awaiting Bug C fix. - [ ] qa-review-passed — awaiting Bug C fix. - [ ] security-review-passed — awaiting Bug C fix. - [ ] sop-checklist-all-acked — awaiting Bug C fix.
agent-pm force-pushed test/handlers-misc-coverage from c6f546b5d6 to 7509451b04 2026-05-28 05:40:13 +00:00 Compare
core-be added 4 commits 2026-06-02 04:40:44 +00:00
- matchesChatID: table-driven tests for exact match, comma-separated
  list, whitespace trimming, missing key, wrong type, and substring
  non-match (regression guard for the SQL LIKE → exact-match fix).
- TemplateImageRef: verifies default ghcr.io prefix and custom
  MOLECULE_IMAGE_REGISTRY mirror prefix (RFC #229).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- QueueDepth: 0% → 100% (success + query-error paths)
- stitchDrainResponseToDelegation: 0% → 66.7% (success, empty sourceID/delegationID early-return, zero rows)
- NewArtifactsHandler: 0% → 100% (missing env + present env paths)
- PatchAbilities: 0% → 77.8% (invalid ID/body, no fields, not-found, broadcast-only, both-fields)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- QueueStatusByID: 0% → 100%
  - success with all optional fields populated
  - success with NULL optional fields
  - not-found → sql.ErrNoRows
  - query error propagation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
test(handlers): cover ListGlobal
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 4s
Harness Replays / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 13s
CI / Detect changes (pull_request) Successful in 12s
E2E API Smoke Test / detect-changes (pull_request) Successful in 13s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 10s
gate-check-v3 / gate-check (pull_request_target) Successful in 6s
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
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 6s
Harness Replays / Harness Replays (pull_request) Successful in 1s
CI / Canvas (Next.js) (pull_request) Successful in 1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
E2E Chat / detect-changes (pull_request) Successful in 25s
qa-review / approved (pull_request_target) Failing after 15s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 7s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 55s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 50s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1m5s
CI / Platform (Go) (pull_request) Failing after 3m14s
CI / all-required (pull_request) Has been skipped
sop-checklist / all-items-acked (pull_request_target) Has been cancelled
sop-checklist / review-refire (pull_request_target) Has been cancelled
sop-tier-check / tier-check (pull_request_target) Failing after 10s
2cd51bb397
- ListGlobal: 0% → 87.5% (success with rows, empty result, query error)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
core-be force-pushed test/handlers-misc-coverage from 7509451b04 to 2cd51bb397 2026-06-02 04:40:44 +00:00 Compare
core-be requested review from core-lead 2026-06-02 04:56:19 +00:00
core-be requested review from core-security 2026-06-02 04:56:20 +00:00
devops-engineer added the merge-queue-hold label 2026-06-06 10:40:45 +00:00
Member

merge-queue: could not update this branch with main — the update returned a merge conflict (HTTP 409) that the queue cannot auto-resolve (POST /repos/molecule-ai/molecule-core/pulls/1988/update -> HTTP 409: {"message":"merge failed because of conflict","url":"https://git.moleculesai.app/api/swagger"}). Applied merge-queue-hold to unblock the queue (HOL guard). Fix: rebase/merge main into this branch and resolve the conflicts, then remove merge-queue-hold to requeue.

merge-queue: could not update this branch with `main` — the update returned a merge conflict (HTTP 409) that the queue cannot auto-resolve (POST /repos/molecule-ai/molecule-core/pulls/1988/update -> HTTP 409: {"message":"merge failed because of conflict","url":"https://git.moleculesai.app/api/swagger"}). Applied `merge-queue-hold` to unblock the queue (HOL guard). Fix: rebase/merge `main` into this branch and resolve the conflicts, then remove `merge-queue-hold` to requeue.
Some optional checks failed
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 4s
Harness Replays / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 13s
CI / Detect changes (pull_request) Successful in 12s
E2E API Smoke Test / detect-changes (pull_request) Successful in 13s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 10s
gate-check-v3 / gate-check (pull_request_target) Successful in 6s
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
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 6s
Harness Replays / Harness Replays (pull_request) Successful in 1s
CI / Canvas (Next.js) (pull_request) Successful in 1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
E2E Chat / detect-changes (pull_request) Successful in 25s
qa-review / approved (pull_request_target) Failing after 15s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 7s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 55s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 50s
Required
Details
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1m5s
Required
Details
CI / Platform (Go) (pull_request) Failing after 3m14s
CI / all-required (pull_request) Has been skipped
Required
Details
sop-checklist / all-items-acked (pull_request_target) Has been cancelled
sop-checklist / review-refire (pull_request_target) Has been cancelled
sop-tier-check / tier-check (pull_request_target) Failing after 10s
This pull request has changes conflicting with the target branch.
  • workspace-server/internal/handlers/workspace_abilities_test.go
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin test/handlers-misc-coverage:test/handlers-misc-coverage
git checkout test/handlers-misc-coverage
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1988