Skip to content

chore: wire structs for run_vm results, single clone on recipe add - #161

Merged
NovusEdge merged 2 commits into
mainfrom
chore/followups
Sep 29, 2026
Merged

NovusEdge merged 2 commits into
mainfrom
chore/followups

Conversation

@NovusEdge

Copy link
Copy Markdown
Owner

Two follow-ups.

  • up, down, create, rm and clone built --json data from inline map[string]any literals. They now use wire.VMResult, wire.VMDeleted and wire.VMCloned. Struct fields are in the sorted-key order the maps encoded, so the JSON is byte-identical; a test compares each struct against the map it replaced.
  • Interactive stoat recipe add <url> cloned the repo for the preview and again for the install. recipes.AddPreviewed moves the preview checkout into the stage instead. Preview gained a parent-directory argument so the checkout is on the same filesystem as the cache. The test deletes the source after Preview, so a second clone would fail.

Left alone: transactionRename and transactionRemoveBackup. Replacing them means threading a struct or parameters through Add, Remove, publishArtifacts and the rollback path, which is more code than the two vars it removes.

up, down, create, rm and clone built their --json data from inline map literals. They now use wire.VMResult, VMDeleted and VMCloned, with fields in the sorted-key order the maps encoded, so the output is unchanged. A test compares each struct with the map it replaced.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
recipe add previewed the URL with one clone and then Add cloned it again. AddPreviewed now renames the preview checkout into the stage, so the installed tree is the one the user confirmed. Preview takes a parent directory so the checkout is on the cache's filesystem.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8ab040ae-c2a9-487e-a9ee-b1c1fe944c90

📥 Commits

Reviewing files that changed from the base of the PR and between ba413a3 and 9b26794.

📒 Files selected for processing (6)
  • internal/cli/run_recipe_remote.go
  • internal/cli/run_vm.go
  • internal/cli/wire/dto.go
  • internal/cli/wire/dto_test.go
  • internal/recipes/remote.go
  • internal/recipes/remote_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NovusEdge
NovusEdge merged commit 012ee24 into main Sep 29, 2026
7 checks passed
@NovusEdge
NovusEdge deleted the chore/followups branch September 29, 2026 18:27
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