The queue: parking, the operator's order, blocked items (M2.2)
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 3m26s
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 3m26s
Several work items on the new loop (L1, D4): - Switching parks the item on the workspace: its work is committed and its branch pushed; resuming checks the item's branch back out. Branches of open items are never set aside by a fresh workspace. - Next item: the operator's "do #N next" first, otherwise the oldest. - Issues with open Gitea dependencies are blocked until they close, checked at intake and on every round; status shows blocked items and the line. Tests: queue unit tests, the property walk over several issues with dependencies and a new parked_work_safe property (it catches parking disabled), and an end-to-end test with two issues where B depends on A. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
1 parent
d504588a57
commit
cceb30c729
11 files changed
+657
-85
No files matched your search
@@ -13,6 +13,7 @@ from nisse_dev.state import StateStore, WorkItem
|
||||
READY = "ready"
|
||||
RUNNING = "running" # a driver run is under way; on boot it means interrupted
|
||||
WAITING = "waiting"
|
||||
BLOCKED = "blocked" # waits for its recorded dependencies to close (L1)
|
||||
CLOSED = "closed"
|
||||
|
||||
# What a waiting item waits for.
|
||||
@@ -25,7 +26,7 @@ MERGE = "merge" # the PR's review and merge (D4, D5)
|
||||
class Loop:
|
||||
thread: str = "" # the root of the item's Matrix thread (L5)
|
||||
issue: int = 0 # its record issue (D1)
|
||||
wait: str = "" # GO_AHEAD / ANSWER, when waiting
|
||||
wait: str = "" # GO_AHEAD / ANSWER / MERGE, when waiting
|
||||
rev: int = 0 # the latest proposal put up (L3)
|
||||
started: bool = False # scope agreed: a go-ahead was given (D1)
|
||||
note: str = "" # what a waiting item said it is waiting on
|
||||
@@ -37,6 +38,8 @@ class Loop:
|
||||
comments: int = 0 # the last PR conversation comment taken (L8)
|
||||
notes: tuple[str, ...] = () # review notes taken (#69)
|
||||
fixes: int = 0 # review fixes pushed, for follow-up branch names
|
||||
blocked_by: tuple[str, ...] = () # open dependencies, "owner/repo#N" (L1)
|
||||
first: int = 0 # the operator's "do #N next": higher runs sooner
|
||||
# Where the operator last spoke (D5: answer where asked): "" for the
|
||||
# Matrix thread, or the PR it came from, with the inline location and a
|
||||
# little of what they said, for quoting.
|
||||
@@ -51,6 +54,7 @@ class Loop:
|
||||
def loop_of(item: WorkItem) -> Loop:
|
||||
data = dict(item.data.get("loop", {}))
|
||||
data["notes"] = tuple(data.get("notes", ()))
|
||||
data["blocked_by"] = tuple(data.get("blocked_by", ()))
|
||||
return Loop(**data)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user