feat(afk): scheduler skips issues blocked by another open issue #138
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/136"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Promotes the
## Blocked byissue-body section to a machine-read contract (ADR-0042): the AFK engine no longer schedules a ready-for-agent issue while any issue that section references is still open.What changed
internal/afk/blocked.go):ParseBlockedBy— section-scoped local#Nextraction with the tolerant-but-bounded grammar ofclosesDirectiveRe(case-insensitive heading at any ATX level, section runs to the next heading,#70≠#7, refs elsewhere in the body never block);ForeignBlockedBy— cross-repo/URL refs surfaced for logging only;PartitionBlocked— splits the ready queue against the open set (any open ref blocks; closed/dangling refs never do).FilterClaimable, andlaunch()/ScheduleOncenow route through it instead of duplicating the claim filter inline — the locked claim path, scheduler pre-tick,ClaimableIssuesFor, andGET /repos/{id}/readyshare one definition of "claimable". Manual starts skip blocked issues identically.Tracker.Issues(StateOpen)fires only when a claimable issue actually carries a local blocker ref — zero added forge calls for repos not using the convention (pinned by test).*TrackerError→ 502 on manual start); data ambiguity fails open (dangling ref unblocks). All-blocked ≡ empty queue: no launch, no consecutive-failure strike. Skipped issues emit one structured line, e.g.afk: skipped blocked issues … #87 (blocked by #74).#N— prose never blocks); triage skill + triage-labels (ready-for-agent+ live blockers is a valid pairing); CONTEXT.md claimable definition.Verification
blocked_test.go, 32 subtests).Issues(StateOpen)call without refs; open-set fetch failure fails closed on both auto and manual paths.go build ./...,go vet ./..., fullgo test ./...green (only pre-existing sandbox-only tmuxx integration failures, present on clean main),golangci-lint 2.12.2 run ./...→ 0 issues, gofmt clean.Closes #136
🤖 Generated with Claude Code
https://claude.ai/code/session_01D9H315aPekfjPpRiBjcsX8