refactor(iac): delete bespoke in-core infra-admin surface (infra-admin migration PR-3)#838
Conversation
… by step.iac_provider_* + plugin SPA)
Removes the entire iac/admin/ package tree (audit, catalog, handler, proto,
testdata, ui assets), module/infra_admin*.go (5 files), cmd/wfctl/infra_admin*.go
(3 files), and engine_infra_admin_test.go. The factory registration and
schema.RegisterModuleType("infra.admin") are removed from engine.go. The
`wfctl infra admin` subcommand and its usage line are removed from infra.go.
The proto-vendor-staleness CI workflow and its script are deleted.
Makefile targets test-integration-admin and vendor-infra-proto are removed.
iac/wfctlhelpers/desired_hash_test.go: drops TestDesiredStateHash_MatchesHandlerInlined
(cross-package divergence guard against handler.DesiredHash, which is gone).
Also folds in: fix(schema): declare iac_provider_drift 'reason' output.
Adds {Key:"reason", Type:"string", Description:"Why drift detection is
unsupported (set only when supported=false)"} to the step.iac_provider_drift
Outputs in schema/step_schema_builtins.go, matching the key the step emits
on the ErrProviderMethodUnimplemented path.
Files deleted: 59 (iac/admin/* 46, module/infra_admin* 5, cmd/wfctl/infra_admin* 3,
engine_infra_admin_test.go 1, .github/workflows/proto-vendor-staleness.yml 1,
scripts/check-vendored-proto.sh 1, plus 2 Makefile targets).
Files modified: engine.go, cmd/wfctl/infra.go, Makefile,
iac/wfctlhelpers/desired_hash_test.go, schema/step_schema_builtins.go.
GOWORK=off go build ./... && go test ./...: all green, 0 lint issues.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…admin rejected
Boot smoke transcript (binaries built from this commit):
POSITIVE (engine starts with valid config):
$ wfctl validate example/api-server-config.yaml
PASS /…/example/api-server-config.yaml (5 modules, 1 workflows, 0 triggers)
exit code: 0
NEGATIVE (infra.admin type is gone — config rejected at load):
Config:
modules:
- name: bad-admin
type: infra.admin
$ server -config /tmp/infra-admin-negative-test.yaml
2026/06/02 04:43:04 Setup error: failed to build engine: failed to build
workflow: config validation failed: config validation failed with 1 error(s):
- modules[0].type: unknown module type "infra.admin"
exit code: 1
Full suite: GOWORK=off go test ./... → all packages ok, 0 FAIL
Lint: golangci-lint run --new-from-rev=origin/main → 0 issues
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
PR-3 of the infra-admin plugin migration: deletes the bespoke in-core infra.admin surface (host module, handler library, catalog, audit writer, vendored proto, UI assets, Makefile targets, CI workflow, and CLI subcommand) now that general step.iac_provider_* steps in PR-2 replace it. Also declares the reason output on step.iac_provider_drift's schema (fix-forward for prior Copilot feedback).
Changes:
- Delete
iac/admin/*(handler, catalog, audit, ui, ui_dist, testdata, proto),module/infra_admin*.goand tests,cmd/wfctl/infra_admin*files, theinfra.adminfactory registration inengine.go, theinfra adminwfctl subcommand, theproto-vendor-staleness.ymlworkflow, andvendor-infra-proto/test-integration-adminMakefile targets. - Declare
reasonoutput onstep.iac_provider_driftschema (was emitted at runtime but undeclared). - Strip the divergence-guard test in
iac/wfctlhelpers/desired_hash_test.gothat depended on the deletediac/admin/handlerpackage.
Reviewed changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| schema/step_schema_builtins.go | Adds the previously-undeclared reason output to step.iac_provider_drift. |
| engine.go | Removes engine-side registration of the infra.admin module factory + schema type. |
| engine_infra_admin_test.go | Deletes the factory-registration test (paired with the deletion). |
| Makefile | Drops vendor-infra-proto + test-integration-admin targets and their entries from .PHONY. |
| scripts/check-vendored-proto.sh | Deletes the vendored-proto staleness check script. |
| .github/workflows/proto-vendor-staleness.yml | Deletes the CI workflow that ran the staleness check. |
| iac/admin/** (many files) | Deletes the handler library, catalog, region/engine catalogs, audit writer, vendored proto fixture, UI HTML/JS/CSS, and all paired tests. |
| module/infra_admin_clock.go | Deletes the test-clock seam used only by the host module. |
| iac/wfctlhelpers/desired_hash_test.go | Drops the cross-package divergence-guard test against the deleted handler.DesiredHash. |
| cmd/wfctl/infra.go | Removes the admin subcommand dispatch + usage entry. |
| cmd/wfctl/infra_admin_parity_test.go, infra_admin_audit_test.go | Deletes CLI-side tests for the removed infra admin subcommand. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
PR-3 of the infra-admin plugin migration (after PR-1 #836 + PR-2 #837, both merged). Deletes the bespoke in-core infra-admin surface now that its replacement (general
step.iac_provider_*steps + provider service-registration) is merged.Tasks
module/infra_admin.go(+ tests) +iac/admin/*(handler, proto, catalog, audit, ui, ui_dist, testdata) + theinfra.adminmodule-type registration inengine.go+ theDOCUMENTATION.mdrow. 59 files, −16,102 lines. Zero external importers (survey clean, re-confirmed); no dangling refs; build green.reasonoutput onstep.iac_provider_drift's schema (was emitted but undeclared — Copilot feat(iac): step.iac_provider_* general steps — stateless two-phase (infra-admin migration PR-2) #837).infra.admin; a config withtype: infra.adminnow fails to load with "unknown module type" (negative test proving the deletion took effect).ADR 0011 (plugin-not-core). No back-compat (sole consumer; scenario 92 is replaced in PR-5). After merge: cut the workflow release (Task 23) so the plugin (PR-4) + scenario (PR-5) can pin it.
🤖 Generated with Claude Code