Skip to content

Add cloudfall release approve and its approval record (S-008-2, S-008-4, S-008-11, S-008-12) - #172

Merged
shipmill-romamo[bot] merged 2 commits into
mainfrom
feat/160-release-approve
Oct 30, 2026
Merged

shipmill-romamo[bot] merged 2 commits into
mainfrom
feat/160-release-approve

Conversation

@shipmill-romamo

Copy link
Copy Markdown
Contributor

Summary

Adds cloudfall release approve COMPONENT --release RELEASE, a person's command that records the approval of one release of one component as a ReleaseApproval record (spec S-008, "The approval record"). It deploys nothing: deploy reading the record is #163.

  • Before asking, it checks the component exists, refuses a component of an automatic application with PRECONDITION release_approval_not_required, and verifies the artifact with verify_artifact (a failure exits PRECONDITION with the lifecycle code)
  • It then asks the person to type the release id through ctx.attest, as decisions approve and operator approve do. The prompt names the application, component, release, git commit, archive SHA-256, servers and expiry. Off a terminal it exits 4 PERSON_REQUIRED, a mistyped id 4 ATTESTATION_MISMATCH, and --yes never answers it; nothing is written on failure
  • On success it writes <approvals>/<metadata.id>.json (default decisions/releases), validated against the new config/schemas/v1/release-approval.schema.json, with metadata.id = approval-<UTC time>-<16 hex> and a spec holding application, component, release, artifactSha256, gitCommit, servers, approver, approvedAt, expiresAt and via: terminal. The record holds no secret
  • --valid-for takes whole hours from 1 to 168 (default 24); out of range is a usage error naming --valid-for. --approver defaults to USER
  • Declared mcp=False, requires_person=True, not in PROJECT_COMMANDS; cataloged in commands.py as a project command (it writes into the project, not the servers)

Plan

  • Serves: G-2
  • Files: config/schemas/v1/release-approval.schema.json (new), sdk/src/cloudfall/release_approval.py (new), sdk/src/cloudfall/lifecycle.py (the artifact's git commit, a public component lookup), sdk/src/cloudfall/app.py (release approve), sdk/src/cloudfall/commands.py (catalog entry), sdk/src/cloudfall/agent_server.py (docstring only), sdk/tests/test_release_approval.py (new), sdk/tests/test_agent_server.py, changelog.d/160-release-approve.md
  • Order: failing tests first in sdk/tests/test_release_approval.py for S-008-2, S-008-4, S-008-11 and S-008-12; then the schema, the record model in release_approval.py, the command in app.py and its catalog entry; then lint, types and the touched tests
  • Proof: S-008-2, S-008-4, S-008-11, S-008-12 (tests named test_s008_<k>_...); test_catalog_names_every_cli_leaf_command_once; the agent server test that release_approve is no tool

Fixes #160
Part of #106

🤖 Generated with Claude Code

shipmill-romamo Bot and others added 2 commits October 30, 2026 16:07
A person approves one built release of one component at a terminal by typing the release id back, and the command writes one ReleaseApproval record under decisions/releases/ naming the archive SHA-256, git commit, servers, approver and expiry. It checks the component, refuses an automatic application and verifies the artifact before asking, and --yes never answers it. It deploys nothing; deploy reads the record in issue 163 (spec S-008).

Fixes #160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pproval

An approver with a newline, an escape sequence or a bidi override is refused by the model (release_approver_invalid) and by the schema, since a later plan shows it. A second approval of the same release by the same person in the same second has the same id; it now exits PRECONDITION release_approval_exists naming the recorded file instead of an unhandled FileExistsError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shipmill-romamo
shipmill-romamo Bot merged commit c7cc626 into main Oct 30, 2026
1 check passed
@shipmill-romamo
shipmill-romamo Bot deleted the feat/160-release-approve branch October 30, 2026 14:37
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.

Add cloudfall release approve and its approval record (S-008-2, S-008-4, S-008-11, S-008-12)

0 participants