Repository navigation
cloudfall CLI phase 2: init, add, dashboard build, services inspect on treaty - #7
Merged
Merged
Conversation
Phase 2 of moving the cloudfall CLI off argparse, for the commands whose answer fits a dataclass: treaty requires an effect from a command that writes, and an output adapter cannot carry one yet (treaty #183), so observe, secrets render and import stay on argparse. init's git steps take a runner, so the command passes ctx.run and doctor checks git; add resolves the project without validating it first, as it did. Each command declares its own timeout, and the evidence options of services status are shared with dashboard build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
Merged
Merged
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.
Phase 2 of moving the
cloudfallCLI to treaty. Stacked on #6: review that first; this PR's base istreaty-rc10.Changes
init,add ssh-key,add server-type,add server,dashboard buildandservices inspectrun incloudfall.app; their argparse handlers are gone, their parsers stay so root--helplists themdatakeeps the old keys and gainseffect(created, orupdatedfor a rebuilt dashboard): treaty requires it of a command that writes (REQ-C-003)init's git steps take a runner (project.initialize_git), so the command runs git throughctx.runanddoctorchecks git 2.24; the argparse default stayssubprocessservices inspect600 s for its probes);addanddashboard buildtake--raw-payloadimport render, which still runs thereExit codes, for callers of these six
6
CONFLICTfor an existing resource (was 2), 7PERMISSION_DENIEDfor a read-only path (was 1 or 2), 4PRECONDITIONfor a non-emptyinitdirectory (was 2), 5NOT_FOUNDfor a missing key file, 2ARG_ERRORfor a bad id, name or address. The old code is inerror.context.code.Not moved yet
observe,secrets render,import renderandimport render-apihave camelCase keys (exitCode,environmentFile,environmentFiles) that need an output adapter, and an adapter cannot be returned from a command that writes: treaty #183.treaty issues filed
#183 (adapter on a mutating command), #184 (a write under the project directory cannot be declared as a side effect).
Checks
uv run pytest: 456 passed, 1 xfailed (FORCE_COLORunset)treaty audit cloudfall.app:app: the #180 false positive and advice only (one-line descriptions refuse newlines on purpose)init,add ssh-key,add server,config validate, then a repeatedadd server(exit 6) and a bad id (exit 2)🤖 Generated with Claude Code