Repository navigation
cloudfall CLI phase 3: health, backup, propose/approve, operator approve, migrate on treaty - #8
Merged
Merged
Conversation
Phase 3 of moving the cloudfall CLI off argparse, for the commands that change servers and whose answer fits a dataclass. EngineContext and AgentConfig carry a step runner, subprocess by default for MCP and the argparse commands, so the treaty commands run every engine step and check-mode run through ctx.run in the project directory. operations approve and migrate keep --yes: without it they preview and answer effect noop, since treaty reads would_* only from its own dry run (treaty #197). deploy, rollback, restart and data migrate wait for treaty #183 (wouldRun). New exit codes 87 to 90 carry the result in data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 3 of moving the
cloudfallCLI to treaty: seven commands that run Ansible. Stacked on #7 (basetreaty-cli-phase2), which is stacked on #6.Changes
health,backup run,backup verify,operations propose,operations approve,operator approveandmigraterun incloudfall.app; their argparse handlers are goneEngineContextandAgentConfigcarry a step runner (lifecycle.subprocess_stepby default), so MCP and the argparse commands are unchanged while the treaty commands run every engine step throughctx.runin the project directory.operations propose/approvepass actx.runcheck runner todecision.propose/approveoperations approveandmigratekeep--yes; without it they change nothing and answereffect: noop(treaty readswould_*only from its own dry run: #197).operator approveandbackup runstay ungated, as decideddata: 87ENGINE_STEP_FAILED, 88UNHEALTHY, 89CHECK_FAILED, 90NOT_VERIFIED; a pausedmigrateis 3PARTIAL_FAILURE, and a failed step's code and message are inerror.contextsubprocess=andrequired_tools=, sodoctorchecks ansible-playbookNot moved yet
deploy,rollback,restartanddata migratewritewouldRunin their plan answer, which needs an output adapter on a mutating command: treaty #183.Checks
uv run pytest: 456 passed, 1 xfailed (FORCE_COLORunset)treaty audit cloudfall.app:app: #180 false positives and advice onlyhealth crm-backendagainst the example project (TEST-NET hosts): inventory rendered in the project, Ansible ran throughctx.run, exit 88 with the result indataoperations proposeon a fixture repository ran real check mode throughctx.runand wrote the diff;operations approvewithout--yespreviewed and changed nothing🤖 Generated with Claude Code