Skip to content

docs: the queue classifier has ten causes, three of which add a runner - #120

Merged
addisdev merged 1 commit into
mainfrom
docs/queue-cause-count
Oct 27, 2026
Merged

addisdev merged 1 commit into
mainfrom
docs/queue-cause-count

Conversation

@addisdev

@addisdev addisdev commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

The README says the queue classifier has eight causes and that exactly one offers to add a runner. Neither matches the code:

  • dashboard/lib/queue-cause.js defines ten entries in CAUSES.
  • Three of them return actionEligible = true: unserved, role-unserved and repo-capacity.

docs/concepts.md (the README's own link target) and docs/figures/queue-causes.html already say ten and three. Only the README was behind. tayloraddison.dev's case study on this project cites ten, which is how the mismatch came up.

Two comments in queue-cause.js carried older counts too, so I fixed them in the same change:

Was Now
"That answers two of seven causes" ten
"for the six causes marked false" seven are marked false
The unserved branch called itself action-eligible "unlike every other non-capacity cause" not true since role-unserved exists; now names both

Comments and README only, no behaviour change.

Platform tested on

  • macOS: not tested locally on macOS; the macOS CI jobs (Preflight smoke test, Fleet Cockpit, Shell tests) pass. Nothing here is platform-specific.
  • Node: node -v → v22.22.0

Checklist

  • Tests pass: cd dashboard && npm test (1112 tests: 1111 pass, 0 fail locally; green in CI)
  • Shell syntax clean: no shell files changed; CI "Shell checks" green
  • No host-specific data: scripts/release-check.sh --offline. It couldn't run locally (no authenticated gh), but CI's "Release check (offline)" passed on a43fa05.
  • Docs updated if behaviour changed (no behaviour change; README brought in line with docs/concepts.md)
  • Schema migration (n/a)
  • New environment variables (n/a)
  • Security-sensitive change (n/a)

Also run: node --check on every tracked .js file, make-skill.mjs --check ("skill is up to date"), make-glance-fixtures.mjs --check (exit 0) and scripts/check-docs.sh (done, all ok).

CI note: "Shell tests" failed once on two lane_wait_s == 0 timing assertions in the admission-hook tests, which this PR doesn't touch (details in the comment below). It passed on one rerun.

🤖 Generated with Claude Code

https://claude.ai/code/session_019W86FcknjPBqAPtVcnH8Ja

The README said eight causes and that exactly one offers to add a runner.
lib/queue-cause.js defines ten (CAUSES), and three return
actionEligible = true: unserved, role-unserved and repo-capacity. That
matches docs/concepts.md and the queue-causes figure, which already say
ten and three.

Two comments in queue-cause.js carried older counts too: "two of seven
causes" and "the six causes marked false" (seven are marked false), and
the unserved branch called itself the only action-eligible non-capacity
cause, which role-unserved no longer leaves true. Comments only; no
behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W86FcknjPBqAPtVcnH8Ja

Copy link
Copy Markdown
Owner Author

Shell tests failed on a43fa05, in two assertions of hooks/tests/run.sh's "lanes observe" block:

  • ...from the start of the wait (line 965): expected 0, got 1
  • the lanes would have let it in at once (line 978): expected 0, got 1

Everything else passed (148 of 150 in that file), and so did the other eight jobs.

This PR changes only a README paragraph and three comments in dashboard/lib/queue-cause.js, nothing the admission hook runs. Both assertions require lane_wait_s, a whole-second count, to be exactly 0. On a loaded GitHub-hosted macOS runner the hook can cross a second boundary between its start and its decision, which gives 1. main passed the same job on the same base (9a87c00, run 40129594328).

There's no fix for these two yet. #76 makes a similar change for two other timing checks but doesn't touch the lanes-observe ones. A patch in that spirit would be to allow a one-second tolerance, e.g. [ "$(field … lane_wait_s)" -le 1 ], since these checks exist to catch a lane that held the job, not a sub-second tick. I haven't widened this PR to include it.

I'm rerunning the failed job once.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

The lane_wait_s timing flake from the earlier failure now has its own fix in #121. Instead of a 1-second slack, it checks the first look by structure, so it can still catch a lane wait re-taken at admission. This PR doesn't need it, since it's green on the rerun.


Generated by Claude Code

@addisdev
addisdev merged commit f9b7463 into main Oct 27, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants