Skip to content

treaty rc10: engine on ctx.run, migrate --build fix, nine cloudfall commands on treaty - #6

Merged
romamo merged 4 commits into
mainfrom
treaty-rc10
Oct 2, 2026
Merged

romamo merged 4 commits into
mainfrom
treaty-rc10

Conversation

@romamo

@romamo romamo commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Moves cloudfall-engine onto treaty 1.0.0rc10's process handling, fixes a regression from #4, and starts moving the cloudfall CLI to treaty (phases 0 and 1 of the migration plan).

Changes

  • Engine on rc10 (23d8a89): playbook run and artifact build start Ansible and git through ctx.run, so --timeout and Ctrl-C stop the whole process group and secrets are redacted from the play log. doctor checks ansible-playbook 2.21 and git 2.24. The play log streams at a terminal; off a terminal it needs -v, and a failed run keeps the log's tail in error.context.output
  • Fix (cc5a8f5): migrate --build and the MCP build_artifact tool read the release from the engine's treaty envelope. Since feat!: cloudfall-engine runs on treaty #4 every build step failed with "artifact builder returned no release id". The new test runs the real engine
  • Nine read-only commands on treaty (85e2eb4): config validate, inventory show, operations list/show/decisions, operator list/show, audit, services status run in cloudfall.app. cli.main routes a command line there when app.resolves claims it, else to argparse, so root --help and every other command are unchanged
  • Known gap pinned (c083593): a strict xfail for treaty #181

Breaking, for callers of the nine commands

  • The envelope is treaty's: data.status replaces the top-level status; other data keys are unchanged; failures are on stdout
  • Exit codes: audit drift 83 (was 1), unknown 84 (was 3), with the report in data; 79 project, 80 config or evidence, 85 inventory, 86 record, 5 not found, 2 bad input. The old snake_case code is in error.context.code
  • --output json after one of these commands is refused (treaty's --output is a file path)

atlas-fleet's Taskfile only reads exit status; its project gives the same validate, inventory, audit (drift, same report), services status and operator list results through the new commands.

treaty issues filed

#173, #174, #175 (planning); #179 (why --format html waits on it), #180 (audit false positive), #181 (drift report order)

Checks

  • uv run pytest: 455 passed, 1 xfailed (run with FORCE_COLOR unset; one existing argparse help test fails under FORCE_COLOR=3)
  • ruff, mypy: clean
  • treaty audit cloudfall_engine.cli:app: no warnings; treaty audit cloudfall.app:app: only the two #180 false positives

🤖 Generated with Claude Code

romamo and others added 4 commits October 1, 2026 16:31
treaty rc10 closes the issues that kept the engine on subprocess:
ctx.run streams a child's output (#61) and gives children a UTF-8 locale
Ansible accepts (#62). playbook run and artifact build now start their
children through ctx.run, so --timeout and Ctrl-C stop the process group
and secrets are redacted from the play log.

The play log streams to stderr at a terminal and under -v; elsewhere a
failed run carries the log's tail in error.context.output. A git step past
its limit is treaty's TIMEOUT (exit 10). Both commands declare their
program and minimum version, so doctor checks ansible-playbook and git.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the engine moved to treaty (PR #4) its answer is an envelope with
the build under data, but build_release_artifact returned the envelope
itself, so migrate found no release id and every build step failed. The
new test runs the real engine command against a local repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first step of moving the cloudfall CLI off argparse. cloudfall.app
holds a treaty App with config validate, inventory show, operations
list/show/decisions, operator list/show, audit and services status;
cli.main sends a command line there when app.resolves claims it and to
argparse otherwise, so root --help still lists every command.

data keeps the keys argparse wrote, status included: each answer is a
Payload whose schema comes from the command's output shape in the
operating contract, which now marks the commands treaty runs and
describes their envelope. audit's drift and unknown verdicts exit 83 and
84 with the report in data. Paths resolve against the project without
os.chdir, and --inventory with --project is a declared Excludes rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A drift or unknown audit returns its report through Exit(data=...), and
treaty 1.0.0rc10 re-sorts an output adapter's arrays on that path. The
strict xfail fails the suite once treaty keeps the declared order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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