Skip to content

workflow: claims by assignment, Ready gating, coordinator work list, leases, SQLite simulation - #5

Merged
zackees merged 3 commits into
masterfrom
workflow-v2
Oct 25, 2026
Merged

zackees merged 3 commits into
masterfrom
workflow-v2

Conversation

@zackees

@zackees zackees commented Oct 25, 2026

Copy link
Copy Markdown
Member

Implements the project-management recommendations as one Python package with a production backend (gh) and a SQLite simulation backend. The same entry points run in both (--sim world.db).

Claims (workflow/claims.py, ported from obs-studio's claim bot with all its tests):

  • A claim is now an assignment. It expires after 24 h without progress, 8 h on P0.
  • An implementation claim needs the ready label. Claiming: investigation works on any issue. /ready and /investigate move an issue between the two.
  • Claims are refused while an issue has an open blocker (GitHub's "blocked by" dependency) or an open decision.
  • Existing claimed labels migrate to assignments on the next sweep.

Board (workflow/board.py):

  • New statuses: Investigating, Ready, Blocked, Stalled (a PR silent for 72 h) and Tracker (an issue with sub-issues).
  • An issue moves to In review or In merge queue with the PR that closes it.
  • Priority and Size fields are filled from P0–P3 and size: labels. Dates use GitHub's built-in Created, Updated and Closed fields.

Coordinator (workflow/coordinator.py): the per-tick work list, computed from live state and ordered fix-master → requeue → fix-ci → enqueue → rebase → review → decide → triage → stalled → investigating → escalated, with instructions per kind. The skill now says: run it and clear it.

Leases (workflow/lease.py): one git ref per task. GitHub creates refs atomically, so parallel coordinators never act on the same task. A lease lapses after 2 h.

Simulation (workflow/sim.py): a SQLite GitHub. Comments run the claim bot, and a fake clock fires the hourly sweep and the 30-minute board sync.

Workflows only schedule scripts, and a test enforces it. claim-bot.yml is a reusable workflow for any repo. board-sync.yml runs the tests on PRs and before each sync.

Docs: WORKFLOW.md (lifecycle, definition of Ready, commands, roles). The obs-org-coordinator and obs-org-worker skills are rewritten. Workers stop once their PR is in the merge queue; the coordinator owns ejections, rebases and CI repairs.

Tests: uv run -m unittest discover -s tests -t .. Over 160 tests, including whole-lifecycle simulations and a 20-thread lease race. Production read path checked: uv run -m workflow.coordinator against the live org.

…leases, SQLite simulation

One Python package runs the org's process in production (gh) and in a
SQLite simulation of GitHub and its Actions:

- claims.py: claims are assignments; 24 h expiry (8 h on P0); only Ready
  issues can be claimed for implementation, investigations on any issue;
  /ready and /investigate; open blockers and decisions refuse claims;
  claimed labels migrate to assignments.
- board.py / board_sync.py: Status adds Investigating, Ready, Blocked,
  Stalled and Tracker, from labels, assignees, dependencies and linked PRs;
  Priority and Size fields from labels.
- coordinator.py: the coordinator's per-tick work list, computed from live
  state, with instructions per kind.
- lease.py: atomic per-task leases (git refs) so parallel coordinators never
  act on the same task.
- sim.py: SQLite GitHub; comments run the claim bot, a fake clock fires the
  hourly sweep and the 30-minute sync.

Workflows only schedule scripts. The claim bot is a reusable workflow any
org repo can call. 160+ tests, including whole-lifecycle simulations and a
20-thread lease race.
@obs-rust-project-manager obs-rust-project-manager Bot moved this to Ready to merge in obs-rust Multiview Oct 25, 2026
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 25, 2026
…nly (obs-rust#2286)

The claim bot moves to obs-rust/.github as a reusable workflow, so every
org repo shares one set of rules (obs-rust/.github#5). A claim is now the
issue's assignee and lapses after 24 hours without progress (8 on P0). Only
issues labeled ready can be claimed for implementation; an underdefined
issue gets 'Claiming: investigation' and then /ready. Open blockers and
decisions refuse a claim. Existing claimed labels migrate to assignments
on the first sweep.

Workers hand their PR to the coordinator once it is in the merge queue.
The coordinator starts each tick from the computed work list
(uv run -m workflow.coordinator) and leases each task.

The logic and its tests (ci/test_claim_bot.py, ported) now live in
obs-rust/.github's workflow/ and tests/.
@zackees
zackees merged commit 822771c into master Oct 25, 2026
2 checks passed
@zackees
zackees deleted the workflow-v2 branch October 25, 2026 01:33
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Ready to merge to Done in obs-rust Multiview Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant