Skip to content

[Draft] OBI-29: Worker recovery, Argo sync and request history #19

Done
1 of 2 issues completed
Done

Description

@ephico2real2

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_others and cmapi/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_doubled for the restart, and a new test in cmapi/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_synced and cmapi/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

Out of scope

  • The source states none for this story.

Evidence

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.

Sub-issues

Sub-issues

1 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    In-Progress
    class:INV
    status:partly-fixed
    story
    on Nov 13, 2026
  2. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    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 from gh and git at 2026-11-13T09:18Z.

  3. added a commit that references this issue on Nov 21, 2026
  4. ephico2real2 commented on Dec 1, 2026

    @ephico2real2
    OwnerAuthor

    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.

  5. ephico2real2 commented on Dec 1, 2026

    @ephico2real2
    OwnerAuthor

    Defect #792 found on PR #791 (#783): the portal test pins capacity percentages of a recorded sample; fixed in #791.

  6. ephico2real2 commented on Dec 1, 2026

    @ephico2real2
    OwnerAuthor

    Proof for each acceptance criterion of #19, read on 2026-12-01. It is for the owner to approve closing this story.

    Sources:

    1. Requests expose events and documented retry, revert and cancel transitions

    • Tests (CI 46763751234, 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).
    • CRC:
      • The 3 requests have 33 events (logs/b/req48-final.txt).
      • Screenshots of the portal's workflow: screens/48-deleted-workflow-req-20261201-000{1,2,3}-1440-light-chrome.png. The one for 0003 shows 13 of 13 steps, ending prune_confirmed.
      • No retry, revert or cancel ran on CRC.

    2. Worker restart and duplicate webhook delivery do not duplicate side effects

    3. Polling works without optional Argo integrations; a namespace reaches Synced after approval with no manual Git step

    4. Failures retain audit and release locks/reservations according to lifecycle rules

    • Named test: cmapi/tests/core/test_lifecycle_expiration.py::test_every_terminal_state_releases_everything (line 64), CI 46763751234 reference-code. It checks the namespace lock only: holds_lock() is false for synced, rejected, cancelled, timeout, superseded and failed.
    • Reservations: cmapi/tests/service/test_capacity_reservations_62.py::test_a_request_that_ends_releases_its_hold[reject|cancel|timeout] (line 172), CI 46763751234 service.
    • Audit kept on a failure: cmapi/tests/service/test_flow.py::test_pr_edited_after_approval_fails_the_cmapi_check (line 272). The failed request keeps its head_moved event.
    • CRC: on the success path, 3 capacity holds were taken and all 3 released (logs/b/oldrows.txt). No failure ran on CRC.

    Not proven, or open:

  7. ephico2real2 commented on Dec 2, 2026

    @ephico2real2
    OwnerAuthor

    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.

  8. ephico2real2 commented on Dec 2, 2026

    @ephico2real2
    OwnerAuthor

    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).

  9. ephico2real2 commented on Dec 2, 2026

    @ephico2real2
    OwnerAuthor

    Filed #823 (Low, Backlog): the request a :revert opens stores a made-up requester record. Found while fixing #815/#816.

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

    In-Progressclass:INVstatus:partly-fixedstory

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions