Skip to content

fix(wfctl): retain core registry inspector diagnostics - #1089

Draft
intel352 wants to merge 1 commit into
mainfrom
fix/registry-core-error-context
Draft

intel352 wants to merge 1 commit into
mainfrom
fix/registry-core-error-context

Conversation

@intel352

Copy link
Copy Markdown
Contributor

wfctl plugin registry-sync core already captures compiler stderr, but the CLI display helper unwraps the error to exec.ExitError and prints only exit status 1. Return inspection errors through the existing contextualCLIError wrapper so compiler diagnostics and inspection context survive while typed underlying errors remain accessible.

This diagnostic loss hid the Go 1.26.5 versus required 1.27.2 mismatch in registry sync run 39911651841. The registry toolchain-selection correction is a separate change.

Validation

  • Six focused cmd/wfctl tests pass, including two new tests crossing the real Go subprocess, core-sync command and CLI display helper.
  • Tests verify compiler stderr, exit status 1, missing-compiler context, scratch cleanup and no registry writes when inspection fails.
  • go vet -p 2 ./cmd/wfctl and git diff --check pass.
  • Reverting the production wrapper fails both new tests; restoring it passes. Independent review repeated this proof with the exact production source and display helper.
  • Real offline core inspection of 7310361d5bf5d7229d0f26fd6cbbac752bee454b using Go 1.27.2 returned 30 plugins without manifest writes.
Without fix:
displayed error "exit status 1" lost compiler diagnostic "requires go >= 99.0.0"
displayed error "executable file not found in $PATH" lost inspector context

With fix:
TestPluginRegistrySyncCore_PreservesCompilerDiagnosticForDisplay PASS
TestPluginRegistrySyncCore_PreservesMissingCompilerContext PASS

Checks used macOS ARM64 with network-disabled dependency resolution and read-only module mode. Hosted Linux/full-suite validation remains the PR CI gate. No installed profile, plugin loading path, guest sandbox or acceptance code is changed. Independent local review found no blocking issues.

Merge hold

Keep this PR in draft under the current no-release scope. Merging to main triggers .github/workflows/pre-release.yml, which publishes snapshot releases and a GHCR snapshot image. This task does not authorize that release, a profile install, or changes to those workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant