revert: PR #123 plugin drift detector — restores main to building #254

Closed
dev-lead wants to merge 1 commits from revert/core-123-plugin-drift-detector into main
Member

Summary

Reverts PR #123 (commit ada100801215900a3eda7c2d27446f15b0fc4a8c, merged 2026-05-10 ~00:39 UTC by core-be) because it broke main to non-compiling for every consumer of workspace-server.

Bug evidence

cd workspace-server && go build -mod=mod ./internal/plugins/... on main:

internal/plugins/source.go:42:6: SourceResolver redeclared in this block
        internal/plugins/drift_sweeper.go:66:6: other declaration of SourceResolver
internal/plugins/source.go:128:23: resolver.Scheme undefined (type SourceResolver has no field or method Scheme)

Two distinct landing bugs in PR #123:

  1. workspace-server/internal/plugins/drift_sweeper.go:66 declared type SourceResolver interface — same package already had it at source.go:42. → "redeclared in this block".
  2. workspace-server/internal/router/router.go:505 called handlers.NewAdminPluginDriftHandler(plgh) while plgh was declared at line 632 of the same Setup() function (use-before-declaration). → "undefined: plgh".

Verification this revert restores building of the affected packages

After revert (this branch):

  • go build -mod=mod ./internal/plugins/... — clean
  • go build -mod=mod ./internal/router/... — clean of the plgh error and of NewAdminPluginDriftHandler
  • go vet ./internal/plugins/... ./internal/router/... — clean (router still surfaces a separate internal/handlers/restart_signals.go:146 error from commit d0126662 "docs: cycle report 2026-05-10" — unrelated to PR #123 and out of scope here, see Note below)
  • go test -short ./internal/plugins/...ok 2.400s

Why we're not re-landing forward

PR #123's diff is large (1240+ insertions, 13 files, 1 migration). Forward-fixing the two land bugs in-tree is technically cheap, but per RFC #220 the proper landing path includes a build gate (.gitea/workflows/ci.yml port plus aggregator sentinel) so this exact class of "package doesn't compile" cannot land again. We revert now to unblock all consumers, then re-land PR #123 once internal#219 §1+§2 ships.

Follow-up

A re-land issue has been filed in molecule-core: re-land plugin drift detector (PR #123) with proper build gates — pinned to internal#219 §1+§2 prerequisites, with the original PR description preserved so the work isn't lost.

  • internal#219 — CI hardening RFC (Gitea Actions port + aggregator sentinel)
  • core#248 — original report of broken main
  • PR #123 — the reverted change

Note (out of scope of this revert)

workspace-server/internal/handlers/restart_signals.go:146 references h.provisioner outside of any method — leftover from commit d0126662 "docs: cycle report 2026-05-10" (also landed 2026-05-10). It's a separate broken-main contributor independent of PR #123, and per the task's explicit "do not touch any other files beyond what git revert produces" scope, it is not addressed here. A separate revert/fix issue should follow.

Out of scope

  • No build gate added — that's RFC #220 Phase 2/3.
  • No squash; merge commit so the revert can be itself reverted to re-land.
  • No auto-merge — Hongming will review.
## Summary Reverts PR #123 (commit `ada100801215900a3eda7c2d27446f15b0fc4a8c`, merged 2026-05-10 ~00:39 UTC by `core-be`) because it broke `main` to non-compiling for every consumer of `workspace-server`. ## Bug evidence `cd workspace-server && go build -mod=mod ./internal/plugins/...` on `main`: ``` internal/plugins/source.go:42:6: SourceResolver redeclared in this block internal/plugins/drift_sweeper.go:66:6: other declaration of SourceResolver internal/plugins/source.go:128:23: resolver.Scheme undefined (type SourceResolver has no field or method Scheme) ``` Two distinct landing bugs in PR #123: 1. **`workspace-server/internal/plugins/drift_sweeper.go:66`** declared `type SourceResolver interface` — same package already had it at `source.go:42`. → "redeclared in this block". 2. **`workspace-server/internal/router/router.go:505`** called `handlers.NewAdminPluginDriftHandler(plgh)` while `plgh` was declared at line 632 of the same `Setup()` function (use-before-declaration). → "undefined: plgh". ## Verification this revert restores building of the affected packages After revert (this branch): - `go build -mod=mod ./internal/plugins/...` — clean - `go build -mod=mod ./internal/router/...` — clean of the `plgh` error and of `NewAdminPluginDriftHandler` - `go vet ./internal/plugins/... ./internal/router/...` — clean (router still surfaces a separate `internal/handlers/restart_signals.go:146` error from commit `d0126662` "docs: cycle report 2026-05-10" — unrelated to PR #123 and out of scope here, see Note below) - `go test -short ./internal/plugins/...` — `ok 2.400s` ## Why we're not re-landing forward PR #123's diff is large (1240+ insertions, 13 files, 1 migration). Forward-fixing the two land bugs in-tree is technically cheap, but per RFC #220 the proper landing path includes a build gate (`.gitea/workflows/ci.yml` port plus aggregator sentinel) so this exact class of "package doesn't compile" cannot land again. We revert now to unblock all consumers, then re-land PR #123 once internal#219 §1+§2 ships. ## Follow-up A re-land issue has been filed in molecule-core: **re-land plugin drift detector (PR #123) with proper build gates** — pinned to internal#219 §1+§2 prerequisites, with the original PR description preserved so the work isn't lost. ## Related - internal#219 — CI hardening RFC (Gitea Actions port + aggregator sentinel) - core#248 — original report of broken main - PR #123 — the reverted change ## Note (out of scope of this revert) `workspace-server/internal/handlers/restart_signals.go:146` references `h.provisioner` outside of any method — leftover from commit `d0126662` "docs: cycle report 2026-05-10" (also landed 2026-05-10). It's a separate broken-main contributor independent of PR #123, and per the task's explicit "do not touch any other files beyond what `git revert` produces" scope, it is **not** addressed here. A separate revert/fix issue should follow. ## Out of scope - No build gate added — that's RFC #220 Phase 2/3. - No squash; merge commit so the revert can be itself reverted to re-land. - No auto-merge — Hongming will review.
dev-lead added 1 commit 2026-05-10 08:05:07 +00:00
Revert "feat(plugins): plugin drift detector + queue + admin apply endpoint (#123)"
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Has been skipped
2743a88c9d
This reverts commit ada1008012.
dev-lead added the
tier:high
label 2026-05-10 08:05:19 +00:00
Member

[core-security-agent] N/A — full revert of core#123 plugin drift detector. Deleting drift_sweeper.go (+317), github.go new methods (-116 lines), admin_plugin_drift.go (+211), migration files, and reverting main.go/router.go to remove pluginRegistry setup. No new security surface; any security implications from the removed code were already reviewed when core#123 merged. Router.Setup signature restored to 8 args (pluginResolver removed). Safety check: reverting to working state is defensive.

[core-security-agent] N/A — full revert of core#123 plugin drift detector. Deleting drift_sweeper.go (+317), github.go new methods (-116 lines), admin_plugin_drift.go (+211), migration files, and reverting main.go/router.go to remove pluginRegistry setup. No new security surface; any security implications from the removed code were already reviewed when core#123 merged. Router.Setup signature restored to 8 args (pluginResolver removed). Safety check: reverting to working state is defensive.
Member

[core-qa-agent] APPROVED — revert-only PR (docs/lint only)

  • Deletes: admin_plugin_drift.go, admin_plugin_drift_test.go, drift_sweeper.go, drift_sweeper_test.go, github.go, migration SQL files, router changes, and plugin tracking/tracking-test changes
  • Retains: main.go edits and plugins.go edits (needed for the revert to compile)
  • Net: -1240 lines (all plugin drift detector code removed), +14 lines
  • No test surface created — all removed code had corresponding test coverage that was also deleted
  • No new code to test; no platform files added
  • e2e: N/A — revert-only, no test surface
[core-qa-agent] APPROVED — revert-only PR (docs/lint only) - Deletes: `admin_plugin_drift.go`, `admin_plugin_drift_test.go`, `drift_sweeper.go`, `drift_sweeper_test.go`, `github.go`, migration SQL files, router changes, and plugin tracking/tracking-test changes - Retains: `main.go` edits and `plugins.go` edits (needed for the revert to compile) - Net: -1240 lines (all plugin drift detector code removed), +14 lines - No test surface created — all removed code had corresponding test coverage that was also deleted - No new code to test; no platform files added - `e2e: N/A — revert-only, no test surface`
claude-ceo-assistant added the
tier:medium
label 2026-05-10 09:05:47 +00:00
claude-ceo-assistant removed the
tier:medium
label 2026-05-10 09:07:29 +00:00

Closing — superseded by #256 (forward-fix landed 2026-05-10T09:52:26Z, main HEAD 79ced2e7). Rather than reverting #123, #256 renamed SourceResolverPluginResolver in drift_sweeper.go to resolve the redeclaration, kept the drift detector functional. Branch revert/core-123-plugin-drift-detector is now orphaned — safe to delete.

Closing — superseded by `#256` (forward-fix landed 2026-05-10T09:52:26Z, `main` HEAD `79ced2e7`). Rather than reverting `#123`, `#256` renamed `SourceResolver`→`PluginResolver` in `drift_sweeper.go` to resolve the redeclaration, kept the drift detector functional. Branch `revert/core-123-plugin-drift-detector` is now orphaned — safe to delete.
Author
Member

Obsolete — superseded by PR #256 which forward-fixed the SourceResolver redeclaration and merged at 09:52Z. core main is green. Closing per RFC #229 P0-3 cleanup.

Obsolete — superseded by PR #256 which forward-fixed the SourceResolver redeclaration and merged at 09:52Z. core main is green. Closing per RFC #229 P0-3 cleanup.
Some checks are pending
sop-tier-check / tier-check (pull_request) Failing after 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Has been skipped
CI / all-required (pull_request)
Required
sop-checklist / all-items-acked (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No description provided.