Repository navigation
chore(loop): let a maintainer's claim label exit the waiting-human inbox - #80
Merged
Merged
Conversation
Contributor
Coverage
|
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.
What / why
The loop's human inbox (
waiting-human) had no exit door.docs/norms/ops.md("The claim signal") promises that a maintainer applyingready-for-agentby hand is the claim, androute()does returnrun(feature|bugfix)forissues.labeled.claimability()refuseswaiting-human(D29), so that run loggedskip: task #77 not claimable (status=waiting-human)and the task stayed in the inbox.handleInboxonly re-runs fornew/ready/waiting-info, soissue_comment.createdon awaiting-humantask is inbox-only.workflow_dispatchhits the same claim check.So on #77 both human actions — comment, then apply the claim label — were no-ops. This PR opens the one door
ops.mdalready describes.Change
shared/route.mjs: newhumanClaimOf({ eventName, action, event }, status)— true only forissues.labeled, labelready-for-agent, senderOWNER/MEMBER/COLLABORATOR, and task statuswaiting-human.entry.mjsdoRun: before the claim check, that event moves the task toready(timelineclaimed, labels refreshed from the event payload,saveTask). Every other path keeps D29's guarantee: the reopen repair,start --taskand PRsynchronizestill cannot convert an inbox item.scripts/loop/README.md: D37 entry, the trigger table row, and a cross-reference from D29.Proof
Predicate exercised directly against the real module (blocking cases are as important as the accepting one):
node --checkpasses on both changed scripts. The real end-to-end proof is the post-merge run: after this lands, re-applyingready-for-agenton #77 must loghuman claim: task #77 waiting-human -> readyand thenrun ... started (... stage=feature).Risk
Tier: host script only (
scripts/loop/**), no package surface. If the predicate is too narrow, the symptom is the current one (task stays in the inbox); if it were too wide, an inbox task could be claimed without a human act — which is why it is limited to the claim label from a repo role, and why the other four role labels are still no-ops.