Repository navigation
feat(loop)!: a derived Status lifecycle replaces the awaiting, blocked and stuck labels - #217
Merged
Merged
Conversation
One 503 mid-plan ended an `act` leg after the lease was taken and before the lock label was written. sydevs/SahajAtlasWeb#318 and sydevs/WeMeditateWeb#146 were then refused as contention on every later fire, silently, for days, until the refs were deleted by hand on 2026-10-27. `installRetry` wraps the Octokit request hook once per leg, so REST, `paginate` and GraphQL all retry a 500/502/503/504 or a dropped connection `dispatch.githubRetry.attempts` times, doubling from `baseSeconds`. A 4xx is an answer and is never retried. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… blocked and stuck labels On 2026-10-27 seven open items sat in a dead zone with none of `awaiting`, `blocked` or `bot:working` (SahajAtlasWeb#318 and #328, WeMeditateWeb#124, #146, #150, #168 and #198). Each label was written on a transition, so a transition that was missed left nothing at all. What changes, each with the failure it prevents: - Status is derived, never read. `status.mjs` turns the record, the relationships, Hold Until, the lock and the PR into one of Awaiting, Blocked, Hold, Pending, Working or Done; every plan ends in `syncStatus` and `apply` writes it after the plan's other writes. `rec.status` remembers the value written, so a different one on the board is a drag, reverted and journalled (`board-drag`). Roadmap goals get a Status too. `bot:working` stays: it is the lease a session reads, the unlock event, and the kill switch. - Approval lives in the record (`approved: {by, at}`), not in a Status the board could lose. `pendingImplement` folds into it; `hold`, `revise`, a reopen, an abandoned PR and a build that ends with no PR spend it. - Pending has a due. A wait the machinery owns starts `pendingSince`; past `dispatch.pendingDueMinutes` the reconciler checks it again, up to `maxAttempts`, then hands it back with the reason. #328 and #198 sat approved and armed for days with nobody owning the wait. `handback` replaces `stuck` and every give-up label. - The reconciler replaces the two-hour drift window, which the 2–7 hour cron rarely met (#124, #150): a cheap GraphQL view of every open item against the board, a full gather only where they disagree, plus every Pending item on the cron, and a capped pass on event runs. - A lease past its deadline is reclaimed whatever the label says, and a lease with a session on record and no lock is read as its lost unlock. - A refused fire sets `rec.pending` with a retry, so it reads Pending and is fired again instead of waiting on a drain that never comes. - `hold [until] <N days|weeks|months|date>`: a date, approval withdrawn, a bare hold spread across `holdUntil.defaultDays`, capped at 180 days. No recheck sessions and no `maxRehold`: the date passing hands the ticket back, and a blocker closing starts an approved ticket at once. `block on` keeps an approval; `block until <reason>` asks a session. `implement` on a held ticket clears the hold and starts it; on a blocked, unplanned goal it records the approval instead of refusing. - PRs are merged or closed: `hold` and `block` on a PR are refused. - A member's PR gets the loop: once ready, the critic, the other member asked to review (GitHub refuses the author, which failed on #318), fixes and auto-merge. Their drafts are left alone unless mentioned. - An approved PR with a thread waiting on a person reads Awaiting and names the thread once; an approved PR a session touched stays Pending, so a conflict fix no longer re-asks for review (#328, approved 3x). Past its due, mergeability GitHub still calls UNKNOWN is resolved, not read as clean. Not separately revertable: the derived Status replaces the label writes in every row of decide.mjs, so this lands and reverts as one commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…only with work The skills move with the dispatcher (5.0.0, so an installed plugin picks them up): - Labels and Status: start-run's "never write state" list, format-ticket, run-audit, finalize-pr, audit-deps, implement-ticket, improve-loop and implement-roadmap/cross-repo say Status is derived and name only the two labels left, `bot:working` and `proposal`. - write-ticket and revise-roadmap lose the `recheck` mode. `block` turns `block until <reason>` into a `Blocked by:` line or a Hold Until date with the reason written into the body, since nothing rechecks it later. - A base merge opens address-review (as before), fix-ci and a continued implement, and is pushed only with the work or when it resolved a conflict. address-review used to push a clean merge alone, which re-ran CI and put approved PRs back on the reviewer's list for nothing. - resolve-conflicts asks about a hunk only as a question thread, which is the one thing that makes an approved PR the person's turn again (the false re-ask on sydevs/SahajAtlasWeb#328). "You cannot push to a human's PR" becomes what is true: a session pushes only to `claude/*`, so a member's PR on a `claude/*` branch is pushed to like the bot's. `rule-delta.mjs --base origin/main workflow/skills`: 88 → 88 directives, none removed, one reworded (start-run's state list). Co-Authored-By: Claude Opus 5.5 <[email protected]>
README: the Status table replaces the label table, the verbs table gains `hold` and the reshaped `block`, and member PRs are described. routine-setup: three labels left, the new Status options and colours, the board views moved to Status filters, and `gh workflow run workflow-state.yml` as the on-demand full reconcile. why.md: a new "Status lifecycle" group with an entry per rule above, and the rules it replaces moved under Retired with their Replaced-by lines. The citation of #3, closed on 2026-10-27, is dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erived Status Four phases, dry run unless --apply: `records` writes `approved` into the status comment of every issue the old model approved (Status Approved, `pendingImplement`, `approveOnPlan`, or a goal that was planned), and a `handback` on an approved ticket still carrying `awaiting`, so it reads Awaiting rather than firing a build; `board` replaces the Status options (Done keeps its id and its items); `labels` deletes the three labels in every repo; `reconcile` dispatches each repo's workflow-state.yml. `records` runs before the merge: the old dispatcher keeps fields it does not know when it saves a record. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The migration records `approved` on every goal that was planned, so the reconcile pass, which starts an approved free ticket, would have reached sydevs/SahajCloud#902, #941, #897 and sydevs/SahajAtlasWeb#266 and approved their unstarted children: builds nobody asked for. A goal is now only ever planned by a pass (an approved goal whose blocker closed), never has its children approved; reconcile leaves goals alone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived
added a commit
that referenced
this pull request
Oct 28, 2026
…sal (#218) The first full reconcile after the Status lifecycle (#217) failed on SahajAtlasWeb#340, a review-asks refactor stacked on #318's branch. The plan armed auto-merge; GitHub refused with a GraphQL UNPROCESSABLE ("Pull request is in clean status"), which carries no HTTP status, so handOver rethrew it and the pass died before syncStatus. #340 was left with an empty Status, and every sweep would fail the same way. Two changes: - A PR whose base is not the default branch is never armed. Its base has no ruleset, so arming would merge an unreviewed change the moment it went green; the reviewer's merge is the gate, and the parent carries it to main. gather now records base.defaultBranch for this. - handOver treats a GraphQL FORBIDDEN or UNPROCESSABLE as a refusal, so any other refused mutation is handed to a person instead of crashing the job. Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 28, 2026
sydevs-bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
The name promised `never marked awaiting by the other`, and the assertion backing that promise went with the #217 label retirement in the previous commit. A name that advertises a dropped assertion is the same failure this branch set out to remove: a reader counts it as coverage when nothing can fail. The name now states the one thing left under test — one leg holds the lock, the other fires nothing. The SahajAtlasWeb#256 comment above stays; it is history, not a claim. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYAGuKHbV8X2qhfFBf
Ardnived
added a commit
that referenced
this pull request
Nov 2, 2026
…#235) * test(dispatcher): drop tests left behind by the #217 label retirement #217 replaced the awaiting, blocked and stuck labels with a derived Status, but the dispatcher tests still carried them: - Two assertions that the plan never adds the `awaiting` label (decide, roadmap). No code writes that label any more, so they could never fail. - `awaiting`/`stuck`/`blocked` keys in the contracts and rerun config fixtures. No source reads `labels.awaiting|stuck|blocked`. - journal-day's "cannot be created" test, a strict subset of the same case in journal.test.mjs, plus the fake's now-unused failCreate option. Item fixtures that carry an `awaiting` label stay: old items still wear it in the wild. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(dispatcher): name the roadmap lock test after what it asserts The name promised `never marked awaiting by the other`, and the assertion backing that promise went with the #217 label retirement in the previous commit. A name that advertises a dropped assertion is the same failure this branch set out to remove: a reader counts it as coverage when nothing can fail. The name now states the one thing left under test — one leg holds the lock, the other fires nothing. The SahajAtlasWeb#256 comment above stays; it is history, not a claim. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYAGuKHbV8X2qhfFBf --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Replaces the
awaiting/blocked/stucklabels and the Proposed / Revising / Approved / Done Status with one derived Status per item: Awaiting, Blocked, Hold, Pending, Working, Done. It also fixes the five defects that left items in a dead zone.The failure this prevents
On 2026-10-27, seven open items had none of
awaiting,blockedorbot:working: SahajAtlasWeb#318 and #328, and WeMeditateWeb#124, #146, #150, #168 and #198. Each label was written on a transition, so a missed transition left nothing. The root causes, and what fixes each:mergeableread as cleanawaitingwas set on transitions, never re-derivedstatus.mjsderives Status after every planWhat changes
board-drag. Roadmap goals get a Status too.bot:workingstays. It is the lease a session reads, the unlock event Actions wakes on, and the kill switch. No session can read or write Projects v2.approved: {by, at}. These spend it:hold,revise, a reopen, an abandoned PR, and a build that ends with no PR.hold [until] <N days|weeks|months|date>sets Hold and withdraws approval. With no argument it picks 30–90 days out, spread by item. The cap is 180 days.block on <ref>keeps an approval.block until <reason>asks a session to turn the reason into a relationship or a hold.implementon a Hold clears it and starts. On a blocked, unplanned goal it records the approval.holdandblockon a PR are refused: a PR is merged or closed.maxRehold. When a blocker closes, an approved ticket starts at once and any other comes back to you.assignment.respondTo) get the loop once ready: the critic, the other member asked to review, fixes and auto-merge. A member's draft is left alone unless they mention the bot.Why one PR
The repo's rule is one behaviour per PR, and never a skill change together with a ceiling change. The user chose one combined PR, because every part reads the same new state:
Split, the PRs would deploy a window where the board vocabulary, the labels and the skills disagree.
maxReholdgoes andmaxHorizonDaysmoves 30 → 180 in the same change.Commits
fix(dispatcher): retry a GitHub 5xx under every call. Standalone; it passes the old suite.feat(dispatcher)!: derive Status from state, and retire the awaiting, blocked and stuck labels. This can't be reverted alone: the derived Status replaces the label writes in every row ofdecide.mjs.feat(loop): skills read a derived Status, and a base merge is pushed only with work. Plugin bumped 4.1.0 → 5.0.0.docs(loop): the Status lifecycle in README, why.md and routine-setupchore(rollback): migrate-to-lifecycle.mjsfix(dispatcher): no pass but a person's verb approves a goal's children. Found in the replay: the migration marks planned goals approved, and reconcile must not start their children.rule-delta.mjs --base origin/main workflow/skills: 88 → 88 directives. None were removed and one was reworded (start-run's "never write state" list now names onlylabels.proposaland Status).Validation
node --test dispatcher/test/*.test.mjs: 332 pass, 0 fail.status.test.mjs(every lane, goals, PRs),lifecycle.test.mjsandretry.test.mjs.lease.test.mjscovers the deadline reclaim.claude plugin validate ./workflow --strict: passed.gather → decide → deriveStatusagainst all 85 live open items, with the migration simulated in memory. It matches the 2026-10-27 dry run except where items moved since:sweep-prwould fire the same.Runbook (in order)
The board views have no API, so set them in the UI:
is:open status:Awaitingis:open status:Working,Pendingis:open -type:Roadmap(board by Status)is:open -type:Roadmap status:Hold,Blockedtype:Roadmap, plus a Status column🤖 Generated with Claude Code