fix(run): keep established deployment lock authoritative#511
Merged
Conversation
skhaz
approved these changes
Jul 20, 2026
There was a problem hiding this comment.
Pull request overview
This PR tightens wippy run org/module behavior so that an existing wippy.lock remains the authoritative deployment selection, avoiding implicit Hub re-resolution and preventing accidental root/version drift during restarts.
Changes:
- Updates
wippy runCLI help to document the bootstrap-vs-restart contract when a lock exists. - Adds
useLockedHubDeploymentto decide whether a Hub-looking reference should restart fromwippy.lockversus bootstrap via Hub. - Adds test coverage for the new lock-authority decision logic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/wippy/cmd/run.go | Routes Hub module refs through lock-authority checking; updates CLI help text. |
| cmd/wippy/cmd/run_pack.go | Introduces useLockedHubDeployment to enforce root/version/selector rules when wippy.lock exists. |
| cmd/wippy/cmd/run_pack_test.go | Adds tests validating lock-present vs lock-absent behavior and rejection cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
154
to
+164
| if isHubModuleRef(commandName) { | ||
| packPaths, err := downloadHubModule(cmd.Context(), commandName, registryURL) | ||
| useLock, err := useLockedHubDeployment(commandName, defaultLockFile) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| return runFromPackFiles(cmd, packPaths, commandArgs, useCase) | ||
| if useLock { | ||
| // A module reference identifies the established deployment; it is | ||
| // not an update instruction or a named process entrypoint. | ||
| commandName = "" | ||
| commandArgs = nil | ||
| } else { |
Comment on lines
+61
to
+63
| wippy run acme/http # Bootstrap latest when no lock exists | ||
| wippy run acme/http@1.2.3 # Bootstrap a specific version | ||
| wippy run acme/http # Restart the established locked deployment`, |
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
wippy.lockas the authority whenwippy run org/modulenames its selected deployment rootwippy update/ fresh-directory guidanceNo compatibility fallback or inferred root is introduced: an existing lock must select exactly one root.
Verification
make testmake lintwippy run kickside/kicksideloading entries from lock file(2,724 entries), no Hub resolution, system/login HTTP 200wippy.lockSHA-256 remained byte-for-byte unchanged across successful restart and rejected wrong-root, wrong-version, and@latestinvocations