Skip to content

fix(run): keep established deployment lock authoritative#511

Merged
wolfy-j merged 2 commits into
mainfrom
fix/run-module-lock-authority
Jul 22, 2026
Merged

fix(run): keep established deployment lock authoritative#511
wolfy-j merged 2 commits into
mainfrom
fix/run-module-lock-authority

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • treat an existing wippy.lock as the authority when wippy run org/module names its selected deployment root
  • resolve the Hub only when no lock exists
  • reject different roots, different versions, and non-verifiable labels with explicit wippy update / fresh-directory guidance
  • document the bootstrap-versus-restart contract in CLI help

No compatibility fallback or inferred root is introduced: an existing lock must select exactly one root.

Verification

  • make test
  • make lint
  • built the Linux candidate and ran a persisted 44-pack Kickside deployment with wippy run kickside/kickside
  • observed direct loading entries from lock file (2,724 entries), no Hub resolution, system/login HTTP 200
  • verified wippy.lock SHA-256 remained byte-for-byte unchanged across successful restart and rejected wrong-root, wrong-version, and @latest invocations

Copilot AI review requested due to automatic review settings July 21, 2026 23:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 run CLI help to document the bootstrap-vs-restart contract when a lock exists.
  • Adds useLockedHubDeployment to decide whether a Hub-looking reference should restart from wippy.lock versus 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 thread cmd/wippy/cmd/run.go
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 thread cmd/wippy/cmd/run.go
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`,
@wolfy-j
wolfy-j merged commit 56ed07c into main Jul 22, 2026
5 checks passed
@wolfy-j
wolfy-j deleted the fix/run-module-lock-authority branch July 22, 2026 01:16
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.

3 participants