Repository navigation
feat(orchestrator): a spec's tickets run as a queue of lanes - #337
Merged
Merged
Conversation
Owner
Author
|
bstack-judge: PASS tier=1 sha=38a78bb31d3b50dcc3f5d8dd16afc2bb1400ce17 PR 337, head 38a78bb (checked out detached, SHA confirmed). No blocking finding. I did not run the PR's throwaway-repo walk. I used Criteria and proof:
Run on head:
Dropped hypotheses:
[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Request
#324, "Orchestrator: a spec's tickets as a queue of lanes" (behaviour 12 of spec #318; takes over the job of #133):
tracker.mjs next. Before the start, a cheap research lane names the areas each ticket is likely to touch; tickets that share an area go in one lane, in blocker order.Closes #324
What changed
scripts/queue.mjs:queue.mjs <spec or ticket>... [-R owner/repo] [--areas <file>] [--running <refs>] [--builders <n>]. Refs areowner/repo#n, URLs, or#nwith-R, so one call spans repos. It reads open tickets throughtracker.mjs'sfrontier(a spec through its sub-issues, loose tickets by ref), groups tickets of one repo whose areas overlap (a directory overlaps the files under it) into one lane in blocker order, and prints{ lanes, running, start, waiting, end }. A lane runs one ticket at a time;startnever takes the running count past--builders(default 3). Running = claimed tickets plus--running(lane threads alive without a claim).waitingsays what each non-startable ticket waits for (ready-for-human,plan:grill,plan:prototype, a missing proof tool, or its blockers).endisdonewith no open ticket,ownerwhen nothing runs or can start.tracker.mjs: blocked rows ofnextcarry their open blockers (blockedBy);frontieralso takes an explicit ticket list.queue.mjsafter every lane result,ready-for-humanplus a comment on a ticket whose lane stoppedneeds_ownerorcappedso the queue skips it, and the two endings. README lists it.State stays derived: the queue is recomputed from GitHub (claims, labels, closed tickets) and the areas each time; nothing is stored besides the areas comment.
Verification
node --test "tests/*.test.mjs": exit 0.tests/queue.test.mjs(15 tests): grouping and path overlap, repos never mixed, blocker order and cycles, one ticket per lane, the cap with claims and--running, next ticket after a merge, skipping an owner ticket, both endings with reasons, refs and args, andcollectover a spec plus a loose ticket in another repo.node tools/check-plugin.mjs: ok.queue.mjsagainst a throwaway repo: a spec with four tickets (two onsrc/text.mjs, one blocked by another), walking the states on GitHub:#11 ready, #10 blocked, lane 2#12 blocked, lane 3#13 ready;start: #11,#13--builders 2:start:empty,running: 2start: #10(lane 3 still running, cap 2)ready-for-human, rest closed:end: owner,waiting #13: needs a person (ready-for-human)end: donedelegate_taskis for the owner's test.