Repository navigation
Description
Part of #8
Story
As a approver, I want to approve exactly the change that will reach a cluster.
Business value
The plan (#6) sets this release exit for phase 2: "rnd namespace POST to Synced with one portal approval and no manual Git step; edited approved PR fails cmapi check. Auto-approval remains disabled."
Context
build-tracker.md links PR #40 to this story. The worker jobs open_pr and pr_checks are on main. The Git host is a Gitea stand-in, which Wave 3 removes (#85). The GitHub adapter has not run against GitHub (#61).
Acceptance criteria
- Approve/reject permissions and environment rules are enforced; request audit records the decision, shown by
cmapi/tests/service/test_review_c_authz.py::test_environment_role_cannot_approve_or_reject_in_another_environment, and a new test incmapi/tests/service/for the audit record, not written yet - Only approved requests create bot PRs, shown by a new test in
cmapi/tests/service/, not written yet - CI validates schema, kubeconform, Kyverno and the cmapi check; post-approval changes fail plan-hash verification, shown by
cmapi/tests/service/test_flow.py::test_pr_edited_after_approval_fails_the_cmapi_checkand::test_validator_findings_refuse_the_plan - Git reviews cannot substitute for cmapi approval; auto-approval stays off until fresh capacity is available, shown by
cmapi/tests/service/test_flow.py::test_auto_approval_kill_switchandcmapi/tests/core/test_approvals.py::test_missing_capacity_facts_do_not_auto_approve
Tasks
- Fix SEC-02: The bot authenticates to the Gitea stand-in with basic auth over plain HTTP inside the cluster #59, SEC-03: The worker holds the bot credential and posts its own required checks, so CI is not independent of it #60, BUG-09: The GitHub adapter has never been exercised #61, BUG-11: pr_status reads only commit statuses, so Actions check runs never satisfy the worker #87 and BUG-12: A private-CA-only cmapi-trust will fail GitHub TLS in Wave 3 #97 in Wave 3.
- Open a real pull request on
cluster-configs-nonprod(Wave 3). - Send a real request through a real pull request on CRC (Wave 5).
Out of scope
- The source states none for this story.
Evidence
- PR cmapi service, image and charts: the foundation for the first deploy on CRC #40, merged at
1f30ab1on 2026-11-05.build-tracker.mdlinks it to this story ("Stories and epics").
Definition of done
- Mockup approved, or the work has no screen and no API shape
- Draft pull request open
- Build: tests fail before the change and pass after it
- Documented where a reader looks for it
- Review ruled
- Merged with its proof
- Released on the default branch
- The owner approves, after a comment cites the proof for each criterion and its cluster
Class
INV. The story adds a new capability to the product.
Source
Status: Draft backlog. No sprint commitment.
Owner in Paperclip: Ahsoka. Ahsoka mentors Luke and assigns bounded engineering work after technical review.
Source: OBI-28.
Epic: #8. Plan, release windows, and review gates: #6.
Dependencies: #7 (OBI-21), OBI-19, OBI-20.
Planned story; phase 2, provisional 8 points (Ahsoka/Yoda to validate).
- Attach automated or reproducible evidence for each criterion; cover denial/failure paths.
- Read the plan; Yoda owns design choices. Keep this in backlog until prerequisite phase evidence is accepted. Ahsoka may split and delegate to Luke with mentorship.
Language acceptance criterion
Before sprint entry, the owner must define technical terms and attach language review evidence for this text revision.
Use simple-english 2.1.1, Strict mode. Index #6 records the vocabulary source and review limits.
The source criteria remain unchanged. Language review remains open.
Activity
ephico2real2 commentedon Nov 13, 2026
Work tag: In-Progress. A part of this story is merged: PR #40, merge commit
1f30ab1, on 2026-11-05 (build-tracker.md, "Stories and epics"). The story is not complete, and no cluster proves it. Read fromghandgitat 2026-11-13T09:18Z.1 remaining item
Records: the stories section after section 9; #18 is 6 of 13 after #61 …
ephico2real2 commentedon Dec 1, 2026
New defect under this story: #764 (High, security), found while fixing #60.
ephico2real2 commentedon Dec 1, 2026
New defects under this story: #779 (Medium, security:
:rejectdoes not check the approving group) and #780 (Medium: a rejection records no approvals row and no approving group). Both found while writing the audit test for this story's first criterion.#18 story proof: refusals change no table; a first-of-two approval is…
Merge pull request #784 from ephico2real2/test/18-19-story-proof
#779, #780: story #18's decision test checks the refused reject and t…
ephico2real2#779, ephico2real2#780: a rejection takes the checks of a…
ephico2real2 commentedon Dec 1, 2026
Proof for each acceptance criterion of #18, written by the coordinator on 2026-12-01. It is for the owner to approve closing this story.
Sources:
03cda30c. The PRs merged today for this story:03cda30c, green (serviceandreference-code). Both runpytest -q, which prints no test names, so each test below is cited by its file and line on main and its job's result.0030e34, delivery modeapply. Namespacecmap-live-r48-dev, requestsreq-20261201-0001to0003, config PRs Use the existing Keycloak and LDAP server on CRC, and add the cmapi LDAP groups #32 to Create the LDAP bind user cmapi-ldap-bind on the existing LDAP server #34. Evidence is inworkbench/cmapi/ob1-run48/.1. Approve and reject permissions and environment rules are enforced; the request audit records the decision
cmapi/tests/service/test_review_c_authz.py:134test_environment_role_cannot_approve_or_reject_in_another_environment.cmapi/tests/service/test_decisions_story_18.py:59test_each_decision_is_an_audit_event_with_who_when_and_what.audit_eventsrow: who, the client, the action, the comment and the request, at a time inside the call.:133test_an_approval_is_audited_while_another_approval_is_still_needed.cmapi/tests/service/test_reject_decision_779_780.py. It tests an approver outside the group, the requester where self-approval is forbidden, the submitter on behalf of someone, and someone who already approved. Each is refused. A rejection is an approvals row with its group and an audit event. Migration 0014's round trip is tested too.req-20261201-0003, pending from 16:34:11Z.POST :approveascmapi.approver-platformanswered 200.approvalandapprovedare bycmapi.approver-platform.request.approveaudit event.2. Only approved requests create bot PRs
cmapi/tests/service/test_decisions_story_18.py:160test_only_an_approved_request_gets_a_bot_branch_and_pr.req-20261201-0003had no PR while pending. Its firstpush_branch(job 18146) was created in the approval's transaction (16:34:38.923089Z), and PR Create the LDAP bind user cmapi-ldap-bind on the existing LDAP server #34 followed at 16:34:48Z.3. CI validates schema, kubeconform, Kyverno and the cmapi check; post-approval changes fail plan-hash verification
cmapi/tests/service/test_flow.py:272test_pr_edited_after_approval_fails_the_cmapi_check.:368test_validator_findings_refuse_the_plan(at plan time).cmapi/tests/core/test_config_repo_ci.py: the config repository's workflow job names are the checks the worker waits for.ci/kubeconformandci/kyvernofrom the config repository's own Actions run and posts onlycmapi/check. A run counts only when it is the configured workflow'spull_requestrun on the approved head, branch and repository.ci: kubeconform: pass; kyverno: pass; cmapi check: pass. That was before #60 host CI on GitHub: ci/* from the config repository's Actions jobs; the worker posts cmapi/check alone #769 was deployed. No edited PR was tried on CRC.4. Git reviews cannot substitute for cmapi approval; auto-approval stays off until fresh capacity is available
cmapi/tests/service/test_flow.py:357test_auto_approval_kill_switch.cmapi/tests/core/test_approvals.py:215test_missing_capacity_facts_do_not_auto_approve.req-20261201-0001was auto-approved byauto:baseline-rnd-namespacewith capacityfits.Not proven, or open:
ephico2real2 commentedon Dec 1, 2026
Closed with the owner's approval, 2026-12-01 ("Close #18"). The proof is in the comment above. #60 (the branch-protection part), #764 and #227 stay open as accepted lab risks, and #789 waits on the owner's decision.
ephico2real2 commentedon Dec 2, 2026
Filed #824 under this story: the local reference app's :reject skips the ledger's decision checks. Found while implementing #811, and fixed in #811's pull request.