Repository navigation
Description
Part of #8
Story
As a requester, I want to track and recover an approved change.
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 watch_sync, prune and open_revert are on main. Nothing of cmapi has run on a real Argo CD (#64).
Acceptance criteria
- Requests expose events and documented retry, revert and cancel transitions, shown by
cmapi/tests/service/test_review_e_recovery.py::test_retry_from_sync_failed_really_watches_again,cmapi/tests/service/test_flow.py::test_cancel_by_requester_and_refused_for_othersandcmapi/tests/service/test_review_d_delivery.py::test_revert_of_a_create_goes_through_prune_and_leaves_no_orphan - Worker restart and duplicate webhook delivery do not duplicate side effects, shown by
cmapi/tests/service/test_review_e_recovery.py::test_kill_at_each_step_resumes_with_nothing_doubledfor the restart, and a new test incmapi/tests/service/for the webhook, not written yet - Polling works without optional Argo integrations; a namespace reaches Synced after approval with no manual Git step, shown by
cmapi/tests/service/test_flow.py::test_create_auto_approved_to_syncedandcmapi/tests/service/test_review_h_tools_migrate.py::test_synced_only_after_a_read_confirms - Failures retain audit and release locks/reservations according to lifecycle rules, shown by
cmapi/tests/core/test_lifecycle_expiration.py::test_every_terminal_state_releases_everything
Tasks
- Install Argo CD on kind (Wave 2) and on CRC (Wave 5, Argo CD on CRC for the argocd delivery: the install, the Application per cluster, the AppProject and the repository credential (#63 design step) #64).
- Prove one request and one delete through Argo CD 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-29.
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.#510 docs/13: the apply as measured on CRC, and ci/kyverno after #516
ephico2real2 commentedon Dec 1, 2026
New task under this story: #783. The webhook receivers are not built, so the duplicate-webhook-delivery test of this story's second criterion cannot be written yet. The Argo CD receiver is #767.
ephico2real2 commentedon Dec 1, 2026
Defect #792 found on PR #791 (#783): the portal test pins capacity percentages of a recorded sample; fixed in #791.
ephico2real2 commentedon Dec 1, 2026
Proof for each acceptance criterion of #19, read on 2026-12-01. It is for the owner to approve closing this story.
Sources:
290e7f26(PR #783: the Git webhook receiver, with signature verification and delivery de-duplication #791 merged; it closed Task: the Git webhook receiver and duplicate-delivery de-duplication, so #19's webhook criterion can be proven #783, the Git webhook receiver). Every test line below was read on290e7f26.290e7f26, green (serviceandreference-code). Both runpytest -q, which prints no test names, so each test is cited by its file and line on main and its job's result.0030e34. Delivery modeapply; Argo CD is not installed on CRC. Namespacecmap-live-r48-dev; evidence inworkbench/cmapi/ob1-run48/.1. Requests expose events and documented retry, revert and cancel transitions
service):cmapi/tests/service/test_review_e_recovery.py::test_retry_from_sync_failed_really_watches_again(line 224);cmapi/tests/service/test_flow.py::test_cancel_by_requester_and_refused_for_others(line 212);cmapi/tests/service/test_review_d_delivery.py::test_revert_of_a_create_goes_through_prune_and_leaves_no_orphan(line 166).logs/b/req48-final.txt).screens/48-deleted-workflow-req-20261201-000{1,2,3}-1440-light-chrome.png. The one for 0003 shows 13 of 13 steps, endingprune_confirmed.2. Worker restart and duplicate webhook delivery do not duplicate side effects
cmapi/tests/service/test_review_e_recovery.py::test_kill_at_each_step_resumes_with_nothing_doubled(line 43), CI 46763751234service.read_folder,open_pr,pr_status,branch_head,set_checkandmerge; the cluster'sapply; and the merge transaction's commit.POST /api/v1/webhooks/git(Task: the Git webhook receiver and duplicate-delivery de-duplication, so #19's webhook criterion can be proven #783, PR #783: the Git webhook receiver, with signature verification and delivery de-duplication #791),cmapi/tests/service/test_git_webhook_783.py, CI 46763751234service::130test_the_same_delivery_twice_makes_one_job_one_event_and_one_state_change: the same delivery ID twice gives one job, one event and one state change; the second is answered 200duplicate.:252test_two_deliveries_of_one_id_at_the_same_moment_move_the_check_once: two deliveries of one ID sent at once move the check once (PostgreSQLINSERT ... ON CONFLICT DO NOTHINGin the transaction that moves the job).:174a delivery for a request pastpr_opendoes not move it back;:193a cancellation that wins is not undone;:222a delivery does not hurry a check that backs off after an error.3. Polling works without optional Argo integrations; a namespace reaches Synced after approval with no manual Git step
Tests (CI 46763751234,
service):cmapi/tests/service/test_flow.py::test_create_auto_approved_to_synced(line 64) andcmapi/tests/service/test_review_h_tools_migrate.py::test_synced_only_after_a_read_confirms(line 251).CRC, apply mode, no Argo CD:
req-20261201-0001, create40464d00req-20261201-0002, change2d365637req-20261201-0003, delete62042856cmapi-bot, with no manual Git step.cmapi.approver-platformat 16:34:38Z. It wentawaiting_pruneat 16:35:03Z, andcmapi.operatorconfirmed the prune withPOST /admin/prune:confirm. It became synced with "absence confirmed by a successful read".applyconfirmed each by a full read ("objects 5, pruned 0, confirmed true").logs/b/objsnap-diff-create.txtandobjsnap-diff-delete.txt, outside 0;objsnap-diff-end.txt, before = end.Not proven:
watch_sync(the poll) ran once on CRC, for the delete (job 18152).4. Failures retain audit and release locks/reservations according to lifecycle rules
cmapi/tests/core/test_lifecycle_expiration.py::test_every_terminal_state_releases_everything(line 64), CI 46763751234reference-code. It checks the namespace lock only:holds_lock()is false for synced, rejected, cancelled, timeout, superseded and failed.cmapi/tests/service/test_capacity_reservations_62.py::test_a_request_that_ends_releases_its_hold[reject|cancel|timeout](line 172), CI 46763751234service.cmapi/tests/service/test_flow.py::test_pr_edited_after_approval_fails_the_cmapi_check(line 272). The failed request keeps itshead_movedevent.logs/b/oldrows.txt). No failure ran on CRC.Not proven, or open:
apps-crc.testing(docs/13, "The Git webhook"). The tests post deliveries signed as GitHub documents them, including GitHub's own test vector (:278).ephico2real2 commentedon Dec 2, 2026
Closed with the owner's approval (2026-12-01), on the proof above (comment 7329132777): main 290e7f2, CI run 46763751234. #767 (Argo CD receiver) and #64 (Argo CD on CRC) stay open as their own issues.
ephico2real2 commentedon Dec 2, 2026
Filed under #19 while fixing #812: #818 (Medium: a PR whose base is changed after cmapi opened it is merged into that base), #819 (Low, Backlog: git_reconcile counts a PR into another base as the request's PR), #820 (Low: Gitea find_pr reads one page of 50; fixed in the #812 PR, since it sits in the lines that PR edits).
ephico2real2 commentedon Dec 2, 2026
Filed #823 (Low, Backlog): the request a :revert opens stores a made-up requester record. Found while fixing #815/#816.