Reference in New Issue
Block a user
Delete Branch "task335/drop-runtime-image-pins-mig-fresh"
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
Drops molecule-core's dead
runtime_image_pinsmigration (mig 047) + the dead reader athandlers/runtime_image_pin.go. CP (molecule-controlplanemig 027) is the single SSOT for runtime image pins — it has the writer, reader, hard-gate (RFC internal#541 Step 2), seeded post-suspension digests, and the admin endpoints. This PR ratifies that reality.Closes #335 (🚨 SSOT-Instance-12 —
runtime_image_pinsreplicated across molecule-core + molecule-controlplane DBs without sync trigger).Supersedes #1608 (silent-revert blocker)
#1608 was cut from a base before #1585 (RFC#596 Phase 2 dual-push to Gitea-PyPI primary) landed on main (commit
6602361b, 2026-05-20). Merging #1608 as-is would have silently reverted.gitea/workflows/publish-runtime.yml(-106 LoC):Publish to Gitea PyPI registry (PRIMARY)step — gonecontinue-on-error: trueonPublish to PyPI— gone (re-restoring PyPI as a hard requirement → 2026-05-19 P0 re-arming)Publish job summaryblock — goneSub-agent
a5521785flagged this on PR #1608 comment 41389. Per CTO memo 2026-05-20 (reference_package_distribution_open_ecosystem_dual_push): "Our packages = open-ecosystem → dual-push Gitea + PyPI ... RFC#596 stays dual-push."This PR is a clean rebase against current main (tip
f17375a9) with the substantive Go logic of #1608 preserved + zero workflow-file delta. Verified via the API compare endpoint: diff vs main contains ONLYworkspace-server/...files.What changed
workspace-server/migrations/20260520120000_drop_runtime_image_pins.{up,down}.sql— drop the unused table; care-zone columnworkspaces.runtime_image_digest+ its partial index PRESERVED per RFC internal#617 §3workspace-server/internal/handlers/runtime_image_pin.go+runtime_image_pin_test.go— DELETED (dead reader)workspace-server/internal/handlers/workspace_provision.go—Image: ""instead ofresolveRuntimeImage(ctx, payload.Runtime); survivingdb.DB.QueryRowupgraded toQueryRowContextsoctxstays load-bearingworkspace-server/internal/provisioner/{provisioner,registry}.go— doc comments updated to point at CP as SSOTworkspace-server/internal/db/migration_20260520_drop_runtime_image_pins_test.go— static-file regression pin: up.sql DROPs the table, does NOT touch the care-zone column / index, and the dead reader files cannot be re-added without failing the testmock.ExpectQuery("SELECT digest FROM runtime_image_pins")inhandlers_test.go+workspace_provision_test.go; comment refresh inprovisioner_test.goVerification
go vet ./internal/handlers/... ./internal/db/... ./internal/provisioner/...— cleango build ./...— cleango test ./internal/handlers/— 16.5s, all passgo test ./internal/db/ -run TestMigration20260520— 0.2s, passgo test ./internal/provisioner/— 0.3s, passf17375a9, NOT pre-#1585 stale base;.gitea/workflows/publish-runtime.ymlis byte-identical to mainTier / review
tier:medium+area:schema. Reversible via down-migration. Two-eye review: core-be (Go read path) + core-qa (migration correctness). Cascade plan to ~6 live tenant DBs per RFC internal#617 §7 +feedback_image_promote_is_not_user_live(verify on at least 2 tenants post-deploy).Test plan
runtime_image_pinstable dropped +workspaces.runtime_image_digestcolumn preservedMemory consulted:
feedback_no_single_source_of_truth,feedback_image_promote_is_not_user_live,feedback_verify_actual_endstate_not_ack_follow_sop,reference_package_distribution_open_ecosystem_dual_push.RFC: molecule-ai/internal#617
core-be APPROVE
Review lens: Go read-path + provisioner.go / registry.go / workspace_provision.go correctness.
What was checked
Read path verdict: clean removal. CP-as-SSOT contract preserved at selectImage() line 386 (cfg.Image set by CP -> honor it). Behavior under load is identical for any runtime CP has NOT pinned (legacy :latest), and for any runtime CP HAS pinned the digest still flows through cfg.Image upstream of this code.
Care zone: workspaces.runtime_image_digest column + idx_workspaces_runtime_image_digest index correctly preserved (verified in up.sql — DROP TABLE only). New regression test in db/migration_20260520_drop_runtime_image_pins_test.go pins this.
Rebase verdict: confirmed branch is off current main (
f17375a9). publish-runtime.yml byte-identical to main. No #1585 silent-revert.Approve.
core-qa APPROVE
Review lens: migration correctness + test coverage.
Migration files
Test coverage
Cascade plan check
PR body lists the ~6 live tenant DB cascade per RFC internal#617 §7 + feedback_image_promote_is_not_user_live (verify on at least 2 tenants post-deploy). Tier:medium is correct for a reversible schema change.
Verdict: migration correctness is sound; test coverage pins the load-bearing invariants. Approve.