|
2026-09-24
| ||
| 00:58 | • Ticket [bd68d10734] Worker tokens minted from Runners cannot claim any task type (claims lack the prefix) (G-70) status still Closed with 1 other change artifact: bef7ea71e8 user: zeitgeist | |
|
2026-09-19
| ||
| 15:16 | • Closed ticket [bd68d10734]. artifact: 807cf6aafd user: zeitgeist | |
|
2026-09-16
| ||
| 22:40 | • Ticket [bd68d10734]: 2 changes artifact: e4fab4113b user: zeitgeist | |
| 22:04 | • Ticket [bd68d10734]: 2 changes artifact: 3568229b5e user: jva | |
| 18:39 | • Ticket [bd68d10734]: 2 changes artifact: 0131cfd9a5 user: zeitgeist | |
| 18:22 | • New ticket [bd68d10734]. artifact: 522f288be2 user: jva | |
Worker tokens minted from Runners cannot claim any task type (claims lack the prefix) (G-70)
A worker token minted from Settings > Runners on dantest-sandbox (once with no prefixes, once with prefixes=dantest-; the page shows 'fleet-wide - dantest-') authenticates against the bridge at 127.0.0.1:8082 but every POST /v1/tasks/poll answers 403 'task type "dantest-puzzles" not permitted for this token'. The check is bridge/poll.go firstUnauthorizedTaskType against workertoken.Claims; claims are baked in at mint, so the prefix quarry records and displays is not the prefix in the token. No repository-scoped worker can claim work, so no repository CI can run.
Related: G-66 (ticket 698442a3), the secret in the 303 Location; note the URL ends in #runners, so anything parsing after wt= captures eight junk characters and sees a 401 that looks like a bad token.
Triage (zeitgeist): first-hand — I filed this while standing up a worker, so it is not part of jva's campaign.
Narrow and checkable: the prefix quarry records and displays is not the prefix baked into the token's claims at mint. The token authenticates; only the claim check refuses.
Consequence is total for repository CI — no repository-scoped worker can claim any task. Shares a subject with 698442a3 but not a cause.
Correction from zeitgeist (2026-09-16 22:03Z), amending the title's claim: this is not a mint-boundary bug. dagnats' Claims.AllowsTaskType (internal/workertoken/token.go) matches an exact task type or a DOT-delimited namespace (prefix P matches P.foo by testing taskType[len(P)] == '.'), so 'dantest-' can never match 'dantest-puzzles'. Nothing is lost in transit; the two sides mean different things by 'prefix'.
The actual defect is the Runners form: the field is labelled 'prefixes' with placeholder 'e2e- build-', which reads as string-prefix matching and is the natural thing to type. Anyone who follows the placeholder mints a credential that matches no task type and then gets a 403 that blames the task type. Signifier problem (the control advertises behaviour it does not have) plus error-recovery problem (the 403 names the wrong cause and no remedy).
Workaround: mint with exact task types, space separated ('dantest-puzzles dantest-html'). With that, the host worker polled and received run 26acbacb. Suggested fix: relabel the field ('task types, or a namespace ending in a dot'), fix the placeholder, and make the 403 say 'this token allows [x]; the task type was [y]'.
Correction — this ticket's premise is mine and it is wrong. I gave jva the diagnosis in the sandbox chat and they filed it faithfully; the error is not theirs.
The title says claims lack the prefix quarry records. They do not. Nothing is lost between quarry and dagnats, and no repository-scoped worker is broken.
dagnats' Claims.AllowsTaskType (internal/workertoken/token.go) admits exactly two things:
- an exact equal: taskType == prefix
- a DOT-delimited namespace: taskType[len(prefix)] == '.' && taskType[:len(prefix)] == prefix
The real task types in the queue are run-scoped, e.g. dantest-puzzles.26acbacb9e1879580c89a231477106f4. So "dantest-puzzles" matches correctly, because the next character after it is a dot. "dantest-" can never match anything: the next character is 'p'. That is the whole failure.
The actual defect is the form. quarry's Runners field is labelled "prefixes" with placeholder "e2e- build-". That reads as string-prefix matching, which is what anyone would type, and it mints a credential matching no task type. The 403 that follows then blames the task type rather than the token's scope, so the reader is pointed away from the cause. Word it as a task type or a dotted namespace, and say what the trailing form means.
Verified rather than argued: minting with exact task types — "dantest-puzzles dantest-html" — produced a green run on dantest-sandbox. Run df735a8dc4ad86a9de29aeaacb93cc22, both steps pass, worker polling /v1/tasks/poll on the bridge.
Retitle to the form, not the mint. Leaving the original text above rather than editing it: these tickets are fossil-tier artifacts, so the record corrects forward.
Both halves fixed and deployed.
QUARRY (landed as worker-scope): the Runners field says 'by task type' with real examples, states that a name matches a whole task type or a namespace the type continues after a dot, and refuses a scope ending in - _ or . at mint time with a message naming what to type instead. The guard is a heuristic over names and the code says so — whether a scope can ever match depends on which task types exist, which the ci package cannot know — so the ACCEPTED side is pinned too.
DAGNATS (filed as danmestas/dagnats#711, fixed in v0.0.18, deployed here): the 403 now names the requested task type AND the token's scopes, says plainly when a token has no task types at all, flags the prefix near miss, and suggests the scope that would work. The field is documented rather than renamed, which is right — the name is where the misunderstanding starts, but renaming breaks every consumer to fix a docs problem.
The ticket's original premise was mine and wrong twice; the corrections are in the comments above and the record stands as filed. Verified by jva before any of it: minting with exact task types produced a green run, df735a8dc4ad, both steps passing.