Skip to content

Make deploy enforce approval: manual (S-008-1, 3, 5..10, 15, 16) #163

Closed

Description

@shipmill-romamo

Builds part of spec S-008, docs/specs/008-enforce-manual-approval.md (feature issue #106): the acceptance criteria below. Each needs a test that names its id (test_s008_<k>_..., or a proves: S-008-1 comment line).

This is deploy enforcing approval: manual: the counting rules, the plan's approval object, the MCP tool, the Breaking changelog entry and the docs.

  • S-008-1: deploy crm-backend --release R --yes on a project whose application declares approval: manual and whose approvals folder holds no record exits 4 PRECONDITION with context.code: deployment_approval_missing, a message naming the application, crm-backend and R, and context.command equal to cloudfall release approve crm-backend --release R; no ansible-playbook runs and no release receipt is written
  • S-008-3: After S-008-2, deploy crm-backend --release R --yes deploys and its result carries approval with that record's path, approver and approvedAt
  • S-008-5: cloudfall mcp serve for a project lists no release_approve tool, and its deploy tool called with yes: true for a manual application without a record returns PRECONDITION with deployment_approval_missing
  • S-008-6: A record for release R doesn't count when the archive at tmp/artifacts/crm-backend/R.tar.gz and its metadata now give another SHA-256, when the component's declared servers differ from the record's servers, or when expiresAt has passed; deploy --yes refuses with deployment_approval_missing and lists the record with digest_mismatch, servers_changed or expired
  • S-008-7: A record naming another release or another component doesn't count for R
  • S-008-8: deploy without --yes exits 0, runs no ansible-playbook, and shows approval with policy: manual, status: missing and command before S-008-2, and status: approved with the record's path, approver and expiresAt after it
  • S-008-9: For an automatic application, deploy --yes deploys without any record, its plan shows approval: {"policy": "automatic"}, and a file in the approvals folder that isn't valid JSON doesn't stop it
  • S-008-10: For a manual application, a file in the approvals folder that isn't valid JSON or doesn't match release-approval.schema.json makes deploy exit RECORD_INVALID naming the file
  • S-008-15: A deploy that fails its health gate leaves its approval record unchanged, and a second deploy --yes of the same release before expiresAt uses the same record
  • S-008-16: changelog.d/106-enforce-manual-approval.md has a ### Breaking entry naming deploy --yes and migrate --yes on manual applications and both migrations (approve with cloudfall release approve, or switch to approval: automatic), and docs/ci-deploy-guide.md no longer says that no command acts on approval

Depends on #160

Activity

  1. shipmill-romamo commented on Oct 30, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: implement. Serves: G-2. A build issue of spec S-008 (docs/specs/008-enforce-manual-approval.md, approved in #128), sub-issue of #106. The criteria above are the scope; each gets a test naming its id. It starts once every issue on its Depends on line has closed.

  2. shipmill-romamo commented on Oct 30, 2026

    @shipmill-romamo
    ContributorAuthor

    The build is in #178: deploy --yes refuses a manual application's release with PRECONDITION / deployment_approval_missing unless a release approve record still counts (same archive digest, same servers, not expired), before any playbook or receipt; the plan and the result carry approval, and a broken file in the approvals folder fails a manual deploy with RECORD_INVALID while an automatic one never reads the folder.

    Behaviour change, as the spec intends: every project that declares manual and deploys today is refused until it approves or switches to automatic. The changelog's Breaking entry names migrate --yes too, which only #165 gates, so #165 is being built stacked on #178 and the two land together.

    This issue closes when #178 merges.

  3. shipmill-romamo commented on Oct 30, 2026

    @shipmill-romamo
    ContributorAuthor

    Update: #178 passed review (no way around the approval found) and CI is green, but it waits on a maintainer decision posted on the PR: its ### Breaking changelog entry, which S-008-16 asks for, makes the next release a major one. #182 (for #165) is stacked on it and lands right after.

  4. shipmill-romamo commented on Oct 31, 2026

    @shipmill-romamo
    ContributorAuthor

    Released in v0.8.0rc14 (pre-release).
    A plain install gets it with the next stable release.
    If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions