refactor(plugin): decompose manager.go god file into 6 focused modules#121
Open
acamarata wants to merge 3 commits into
Open
refactor(plugin): decompose manager.go god file into 6 focused modules#121acamarata wants to merge 3 commits into
acamarata wants to merge 3 commits into
Conversation
…dules Split internal/plugin/manager.go into six single-responsibility files: - installer.go: Install/Remove/Update + lock serialization + reverse-deps - download.go: downloadPlugin/extractTarGz/rollbackInstall - loader.go: ListInstalled/LoadManifestsFromDir/List + nginx route scan - security.go: checksum/Ed25519 signature/CRL/license/EOL/postInstallEvent - config.go: DisablePlugin/EnablePlugin/IsDisabled + table-conflict guards - paths.go: DefaultCacheDir/LicenseCacheDir/pingAPIURL/findPlugin wrappers manager.go reduced to type declarations only (<40L). All exported symbols preserved — no callers require changes. go build ./... passes clean. Ticket: T-E2-04 (Mega Phase 1, Epic E2)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…(T-E2-06) Split hardening_check.go (808L) → hardening_check_db.go / hardening_check_auth_net.go / hardening_check_infra.go / hardening_check_helpers.go in cli/internal/doctor. Split loader.go (942L) → loader_known_vars.go / loader_parse_env.go / loader_helpers.go in cli/internal/config. Split scaffold.go (938L) → scaffold_templates_infra.go / scaffold_templates_code.go in cli/internal/plugin/scaffold. Each file has a Purpose/Inputs/Outputs/Constraints/SPORT comment block. Build verified clean (go build ./...).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/plugin/manager.go(1424L) into six single-responsibility files, all inpackage plugininstaller.go— Install/Remove/Update + file-lock serialization + reverse-dependency checksdownload.go— downloadPlugin / extractTarGz / rollbackInstallloader.go— ListInstalled / LoadManifestsFromDir / List + nginx route conflict scansecurity.go— checksum (SHA-256), Ed25519 signature, author CRL revocation, license validation, EOL block, postInstallEvent telemetryconfig.go— DisablePlugin / EnablePlugin / IsDisabled + table-prefix and exact-name conflict detectionpaths.go— DefaultCacheDir / LicenseCacheDir / pingAPIURL / findPlugin + exported wrappersmanager.goreduced to type declarations only (38L)All exported symbols preserved — zero callers require changes.
go build ./...passes clean.Test plan
go build ./...from cli root — passes with zero errorsgo test ./internal/plugin/...— run existing test suite to confirm no regressionsnself plugin list,nself plugin install <name>,nself plugin remove <name>against staging