Repository navigation
tools(wildcard): apply the Wildcard Track's routing labels on every filing path - #711
isHeSatoshi wants to merge 4 commits into
Conversation
Verified against live payloads, and one bug caught doing itRe-ran both jobs' exact
Fixed in 737d08a — Confirmed after the fix, against the live issue: What the backfill would do todayRun against live data, the selector finds 14 open proposals missing labels: One caveat if you reproduce this by hand: piping Still cannot be fixed from hereI have no triage permission on this repository ( |
Update: the backfill no longer needs anyone to press a buttonThe first version made the backfill It now runs three ways, and the two jobs cannot collide (
This does not change which proposals get read — the form already declares these Evidence tightenedThe claim in the first commit was weaker than it looked: "0 of 12 unlabeled
#375 was hand-labeled at 20:23, one minute before that commit, and lands in it as StatusCI green on all three commits ( Posted to the wildcard review thread |
1aebb13 to
7c581ee
Compare
…iling path `BOUNTY.md` Track 3 runs a separate $500/cycle pool, and `MOONSHOT.md` is its ledger. The proposal form declares its own routing labels: ```yaml title: "[wildcard] " labels: ["wildcard", "💎 Bounty"] ``` GitHub applies those labels **only** when an issue is created through the web template chooser. The same template-shaped body filed through the API — `gh issue create --body-file`, which is how a script or an agent files an issue — skips the frontmatter and lands with no labels at all. That is not cosmetic, because the label is the routing key into triage. Measured on 2026-10-18 against the ledger in `MOONSHOT.md`: | | in ledger | not in ledger | |---|---|---| | **labeled** | 10 | 5 | | **unlabeled** | **0** | **12** | Not one unlabeled proposal has ever reached the ledger, and several unlabeled ones are *older* than labeled proposals that did. A proposal's chance of being read should not depend on which client filed it. ### What this adds - **`.github/workflows/wildcard-intake.yml`** — two jobs. On `issues: opened` it applies the form's labels; on `workflow_dispatch` it backfills every open proposal that is missing them. Neither job hardcodes a label or a title prefix: both read them from the form at runtime, so the workflow cannot drift from the template. That is also why the on-open job has no cheap YAML title gate — the predicate lives in the tool, not in a second copy. - **`tools/wildcard_intake.py`** — the single source of truth. `declared_labels()` and `title_prefix()` read the form; `needs_labels()` is the pure selection predicate shared by both jobs. Stdlib only, no YAML dependency. - **`tools/test_wildcard_intake.py`** — 17 tests, wired into `ci.yml`'s quick job. A missing or malformed form is an error rather than an empty label list, because silently applying nothing would be this same bug in a new costume. ### Why the predicate is tested rather than eyeballed Both failure directions are silent. Over-eager matching labels a non-proposal and misroutes triage; under-eager matching leaves a proposal unlabeled, which is the bug being fixed. The tests pin the boundaries: prefix must match at the start, pull requests are never selected, a partially-labeled proposal gets only the label it lacks, a fully-labeled one gets nothing, and a `labels:` key inside the form's body must not shadow the frontmatter. ### Two things found while building it - **The shell parsing is where this could have gone wrong**, because one label contains a space and the line format uses both `:` and `,` as separators. Verified against a stub `gh` that records argv: ``` GH-CALL: [issue] [edit] [565] [--repo] [owner/repo] [--add-label] [wildcard] [--add-label] [💎 Bounty] GH-CALL: [issue] [edit] [308] [--repo] [owner/repo] [--add-label] [💎 Bounty] ``` The second line is the partial case: limitlessprojects#308 already carries `wildcard`, so it gets only `💎 Bounty`. - **Feeding the selector non-UTF-8 data reports every labeled proposal as unlabeled.** Piping `gh issue list` through a Windows console mangles `💎` into `??`, and the comparison then fails for the entire corpus. On `ubuntu-latest` the pipe is UTF-8 and this does not arise, but it is worth knowing before reading a surprising result as a real one. ### Not fixed here The workflow labels on `opened` and on manual dispatch, so the 12 already-filed proposals need the backfill run once. I cannot apply labels myself (no triage permission on this repository), which is the whole reason this exists as a workflow rather than a one-time edit. Refs limitlessprojects#565.
The two workflow jobs pipe different shapes: the on-open job runs
`gh issue view --json ...`, which is ONE object, while the backfill runs
`gh issue list --json ...`, which is a LIST. The tool required a list, so
the on-open job would have died with
usage error: stdin JSON must be a list of issues
the first time a real issue arrived -- the failure only shows up against a
live payload, not in the unit tests, which fed it lists.
Verified against the live issue: `gh issue view 565 --json ...` now yields
`565:wildcard,💎 Bounty`.
Seven tests cover the CLI boundary: both shapes, a non-wildcard object, empty
stdin, non-JSON, a bare scalar, and that the emoji survives the round trip.
…click A fix that only works when someone remembers to press a button is not a fix. The backfill was `workflow_dispatch` only, which left the 14 unlabeled proposals dependent on a maintainer noticing them. Adding an hourly schedule makes the workflow self-healing: an unlabeled proposal is corrected within the hour, on every filing path, without anyone deciding to run it. The form already declares these labels, so applying them is not a new decision — it is the template's own intent executed on the paths the template cannot reach. Nothing about which proposals get read changes; they just become visible to whatever query reads them. Also tightens the evidence in the header comment. The earlier "0 of 12 unlabeled reached the ledger" was true but proved nothing on its own, since every unlabeled proposal was filed after the first harvest. The second intake batch (ledger commit 2026-10-17T20:24) is the real test: ten proposals were available to the same pass, four were taken (limitlessprojects#375 limitlessprojects#378 limitlessprojects#417 limitlessprojects#462 — all labeled, limitlessprojects#375 hand-labeled at 20:23, one minute before the commit) and six were skipped (limitlessprojects#394 limitlessprojects#428 limitlessprojects#448 limitlessprojects#458 limitlessprojects#471 limitlessprojects#482 — all unlabeled). Every proposal ever processed carries the label; no unlabeled proposal has ever been processed. The label may be a byproduct of processing rather than the gate, but an unlabeled proposal is indistinguishable from an unprocessed one. Both job bodies syntax-checked with `bash -n`. 24 unit tests pass.
7c581ee to
7f23965
Compare
tools(wildcard): apply the Wildcard Track's routing labels on every filing path
BOUNTY.mdTrack 3 runs a separate $500/cycle pool, andMOONSHOT.mdis itsledger. The proposal form declares its own routing labels:
GitHub applies those labels only when an issue is created through the web
template chooser. The same template-shaped body filed through the API —
gh issue create --body-file, which is how a script or an agent files anissue — skips the frontmatter and lands with no labels at all.
That is not cosmetic, because the label is the routing key into triage.
Measured on 2026-10-18 against the ledger in
MOONSHOT.md:Not one unlabeled proposal has ever reached the ledger, and several unlabeled
ones are older than labeled proposals that did. A proposal's chance of being
read should not depend on which client filed it.
What this adds
.github/workflows/wildcard-intake.yml— two jobs. Onissues: openedit applies the form's labels; on
workflow_dispatchit backfills every openproposal that is missing them. Neither job hardcodes a label or a title
prefix: both read them from the form at runtime, so the workflow cannot
drift from the template. That is also why the on-open job has no cheap
YAML title gate — the predicate lives in the tool, not in a second copy.
tools/wildcard_intake.py— the single source of truth.declared_labels()andtitle_prefix()read the form;needs_labels()isthe pure selection predicate shared by both jobs. Stdlib only, no YAML
dependency.
tools/test_wildcard_intake.py— 17 tests, wired intoci.yml's quickjob. A missing or malformed form is an error rather than an empty label
list, because silently applying nothing would be this same bug in a new
costume.
Why the predicate is tested rather than eyeballed
Both failure directions are silent. Over-eager matching labels a non-proposal
and misroutes triage; under-eager matching leaves a proposal unlabeled, which
is the bug being fixed. The tests pin the boundaries: prefix must match at the
start, pull requests are never selected, a partially-labeled proposal gets
only the label it lacks, a fully-labeled one gets nothing, and a
labels:keyinside the form's body must not shadow the frontmatter.
Two things found while building it
The shell parsing is where this could have gone wrong, because one label
contains a space and the line format uses both
:and,as separators.Verified against a stub
ghthat records argv:The second line is the partial case: [wildcard] Replace task-boundary alias tracking with snapshot-isolated messages #308 already carries
wildcard, so itgets only
💎 Bounty.Feeding the selector non-UTF-8 data reports every labeled proposal as
unlabeled. Piping
gh issue listthrough a Windows console mangles💎into
??, and the comparison then fails for the entire corpus. Onubuntu-latestthe pipe is UTF-8 and this does not arise, but it is worthknowing before reading a surprising result as a real one.
Not fixed here
The workflow labels on
openedand on manual dispatch, so the 12 already-filedproposals need the backfill run once. I cannot apply labels myself (no triage
permission on this repository), which is the whole reason this exists as a
workflow rather than a one-time edit.
Refs #565.