Repository navigation
Add cloudfall release approve and its approval record (S-008-2, S-008-4, S-008-11, S-008-12) - #172
Merged
Merged
Conversation
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>
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.
Summary
Adds
cloudfall release approve COMPONENT --release RELEASE, a person's command that records the approval of one release of one component as aReleaseApprovalrecord (spec S-008, "The approval record"). It deploys nothing:deployreading the record is #163.automaticapplication withPRECONDITIONrelease_approval_not_required, and verifies the artifact withverify_artifact(a failure exitsPRECONDITIONwith the lifecycle code)ctx.attest, asdecisions approveandoperator approvedo. The prompt names the application, component, release, git commit, archive SHA-256, servers and expiry. Off a terminal it exits 4PERSON_REQUIRED, a mistyped id 4ATTESTATION_MISMATCH, and--yesnever answers it; nothing is written on failure<approvals>/<metadata.id>.json(defaultdecisions/releases), validated against the newconfig/schemas/v1/release-approval.schema.json, withmetadata.id=approval-<UTC time>-<16 hex>and aspecholdingapplication,component,release,artifactSha256,gitCommit,servers,approver,approvedAt,expiresAtandvia: terminal. The record holds no secret--valid-fortakes whole hours from 1 to 168 (default 24); out of range is a usage error naming--valid-for.--approverdefaults toUSERmcp=False,requires_person=True, not inPROJECT_COMMANDS; cataloged incommands.pyas aprojectcommand (it writes into the project, not the servers)Plan
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.mdsdk/tests/test_release_approval.pyfor S-008-2, S-008-4, S-008-11 and S-008-12; then the schema, the record model inrelease_approval.py, the command inapp.pyand its catalog entry; then lint, types and the touched teststest_s008_<k>_...);test_catalog_names_every_cli_leaf_command_once; the agent server test thatrelease_approveis no toolFixes #160
Part of #106
🤖 Generated with Claude Code