fix(test): restore main Go handler checks #871
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#871
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/main-sqlmock-import-ineffassign-20260513"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
github.com/DATA-DOG/go-sqlmockinworkspace-server/internal/handlers/bundle_test.goso current main's Go/Handlers jobs compileidx++inworkspace-server/internal/memory/pgplugin/store.gothatgolangci-lintflags asineffassignEvidence
c451b96db8995f478d09d61a23b6d589f78a635dfailsCI / Platform (Go)andHandlers Postgres Integrationwithundefined: sqlmockininternal/handlers/bundle_test.go.internal/memory/pgplugin/store.go:83:3: ineffectual assignment to idx (ineffassign).SOP checklist
Hourly triage note (2026-05-13 16:55Z): this PR was opened from current
main(c451b96) to avoid the stale-base CI noise on molecule-core#856.Fresh evidence:
mainfails Platform Go and Handlers Postgres withundefined: sqlmockinworkspace-server/internal/handlers/bundle_test.go.mainalso still contains theinternal/memory/pgplugin/store.gono-opidx++thatgolangci-lintflags asineffassignonce the import issue is fixed.Initial PR readback:
Follow-up on this PR (2026-05-13 17:05Z): pushed
763ecc7ee4dd63d11706ec3417aa8a9b7409dfb3.Fresh log evidence from the first #871 CI wave:
sqlmockimport and then failedgo vet ./...because fourdelegation_test.gocalls still used the oldexecuteDelegation(source,target,id,body)signature; current code wantsexecuteDelegation(context.Context, source,target,id,body).-tags=integrationbecausedelegation_test.goanddelegation_executor_integration_test.goboth declaredtestDelegationID,testSourceID, andtestTargetIDin package scope.Patch added:
context.Background()to the four directexecuteDelegationtest callsintegrationTest*to avoid package-scope collisionNew CI wave for
763ecc7has started; statuses were still waiting/blocked at readback, so no pass claim yet.Follow-up on this PR (2026-05-13 17:55Z): pushed
4399851ae13e6625af3ec23178326d60370c0a08.Fresh log evidence from head
763ecc7:bundle_test.gofailures:TestBundleImport_InvalidJSON/null:nullbound to a zero-value bundle and returned201, which would permit an empty-name workspace import.TestBundleImport_ValidJSON: stale SQL expectations; importer now recordsstructure_eventsafterINSERT workspaces, then updates runtime. It no longer inserts schedules/secrets in this path.Patch added:
nameis empty/whitespace after JSON bindNew CI wave for
4399851has started; statuses were still waiting/blocked at readback, so no pass claim yet.CI/Infra Review (core-devops)
LGTM with notes — 6-file change touching both tests and handler code.
Changes
handlers/bundle.go: addsstringsimport +strings.TrimSpace(b.Name) == ""guard returning 400 Bad Request. Correct input validation for the bundle name field.handlers/bundle_test.go: addsgithub.com/DATA-DOG/go-sqlmockimport.handlers/delegation_executor_integration_test.go: renames test constants to avoid naming conflicts with updated handler internals.handlers/delegation_test.go: renames test constants + removes deadidx++(golangci-lint fix).memory/pgplugin/store.go: removes deadidx++(golangci-lint fix, same as PR #856).Assessment
CI status notes
idx++violationsApprove — recommend rebasing on latest main before merging. The dead
idx++removals in bothstore.goanddelegation_test.godirectly address the golangci-lint failures.Test restoration fix verified — correctly restores Go handler checks that were dropped. No new test coverage gaps. Approved.
[core-be-agent] Review comments — BLOCKING:
❌ Reverts extractExpiresInSeconds float fix (PR #900)
This PR reverts the
extractExpiresInSecondsinterface{}+type-switch fix from merged PR #900 (fix/handlers): repair current main test blockers). On main, the function correctly handles JSON float values (e.g.{"expires_in_seconds": 90.7}→ truncates to 90). This PR reverts tointfield, which would cause JSON unmarshal errors for float values.See:
workspace-server/internal/handlers/a2a_queue.godiff vsorigin/main.❌ Removes HEALTHCHECK from Dockerfile
Reverts the HEALTHCHECK added by merged PR #883 (
fix(workspace): add HEALTHCHECK to Dockerfile).❌ 99 files changed — not a targeted fix
This PR is not a targeted sqlmock import fix. It contains massive changes across canvas, handlers, workspace, CI scripts, and workflows. The sqlmock import fix is a one-line change, not 99 files.
Recommendation
Close this PR. The actual fixes needed are:
bundle_test.gosqlmock import — already present on main (PRs #882/#900 merged)pgplugin/store.goidx++ — already present on main (PR #892 merged)No action needed on main for these issues.
4399851ae1to4a8e7e4a73New commits pushed, approval review dismissed automatically according to repository settings
LGTM — test/fix changes verified