Skip to content

ci: define the labels as code and triage pull requests by them - #1426

Open
TarikGul wants to merge 12 commits into
mainfrom
tg/label-system
Open

TarikGul wants to merge 12 commits into
mainfrom
tg/label-system

Conversation

@TarikGul

@TarikGul TarikGul commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Defines every label in .github/labels.yml and triages pull requests and issues by them, following up on the process workshop and the label decisions of 16.10. docs/labels.md describes the system.

Names are family:value, matching the labels already created in the repository.

On issues

Family Answers Set by
area: (core, ios, android, js, ci, docs, rfc) What does it touch? Automatically from the pull request that closes it, or by hand
needs: (decision, spec, UI) What is blocking it? Whoever works on it
spa: (humanity, jollity, scarcity, seity) Which product needs it? Whoever files it

Type, status, priority and target date on issues are issue fields, not labels.

On pull requests

Family Answers Set by
status: (waiting-on-review, waiting-on-author, ready-to-merge, blocked) Who acts next? waiting-on-review automatically, the rest by hand
needs: (decision, spec, UI) What is blocking it? The author or reviewer
size: (XS to XXL) How much is there to read? Automatically, from the lines changed
ci: (ios-simulator, ios-device, android-device, android-emulator-tests, host-playground-e2e, no-changeset) Which builds run? The author

scripts/sync-labels.py applies the file. It renames labels in place so everything keeps what it carries. Where the new name already exists, it merges whichever label is on fewer items into the other and gives the survivor the new name, so the migration writes 21 labels rather than one per item. Writes are paced and retried on rate limits, and an interrupted run can be repeated. This pull request's checks include a dry run of the 23 changes: the old path labels become area: labels (rust absorbs the 21 issues already on area:core), each old build label becomes its ci: label in the same merge that switches the workflows over, and invalid, w3s and post-w3s are deleted. Nothing changes until it merges.

issue-areas.yml runs when a pull request merges and adds the areas it touched to the issues it closes, from the paths in .github/areas.yml, which check-path-routing.py holds to CODEOWNERS. Older pull requests keep the areas they had. pr-triage.yml sizes every pull request from the lines a reviewer reads, leaving out what .gitattributes marks generated, lockfiles and database schemas, and gives a ready pull request with no status status:waiting-on-review. label-gate.yml fails while a needs: label or status:blocked is on a pull request. The backport job finds its work order by branch.

Beyond the 16.10 decisions: needs: labels also go on pull requests, and the label gate holds a merge while one is on.

Left as they are until decided: Epic, enhancement, feature request, proposal, R2 blocker, R3+ and host-work.

After merge:

  • make Label gate a required check on main, so it holds a merge rather than only reporting
  • check whether the project board's auto add filters on rfc, which becomes area:rfc

#1396 names the build labels by their old names, so whichever of the two merges second needs a small update.

Every label is defined in .github/labels.yml, grouped into families named for the question each answers: area, status, size, priority, type and ci. scripts/sync-labels.py applies the file, renaming labels in place so everything that carries one keeps it; a pull request that changes it gets a dry run, and the push to main applies it.

pr-triage.yml sizes every pull request from its reviewable lines and gives a ready one with no status 'status: waiting on review'. label-gate.yml fails while a pull request carries a status that holds the merge. Every workflow, template and doc that named a label now uses the new name. docs/labels.md describes the system.
@github-actions github-actions Bot added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code labels Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at f67e9cb.

Raw Gzip Brotli
truapi-host 8.27 MiB 5.79 MiB 5.47 MiB
truapi-provider 4.03 MiB 1.27 MiB 960.2 KiB
truapi 6.72 MiB 952.4 KiB 778.5 KiB
trinity-stack 562.4 KiB 225.5 KiB 186.6 KiB
Total 19.57 MiB 8.21 MiB 7.35 MiB

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.16 MiB 1.09 MiB 835.3 KiB
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 3.99 MiB 1.26 MiB 952.5 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 525.1 KiB 217.1 KiB 179.3 KiB

No file changed size.

Commit: 791367a

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 22 passed and 2 skipped by path filter.

All job results
job result
android-app success
android-bindings success
bundle-size success
changes success
changeset-guard skipped
cli-package success
codegen success
e2e skipped
explorer success
headless-install success
host-wasm success
ios-app success
ios-bindings success
licenses success
playground success
provider-android-bindings success
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint success

Signing credentials: valid as of 2026-10-27

Commit 791367a3 · run log

@valentyna-kozlova

valentyna-kozlova commented Oct 16, 2026 •

Copy link
Copy Markdown

16.10 Decisions:

Issue fields:
Type: Bug, Feature, Task - manual
Status: Triage, Backlog, In progress... - both
Priority: Urgent, High, Medium, Low
Target date - manual
Labels - both

Labels at the Issue level:

Family Answers Who sets it Automated or manual?
area: (core, ios, android, js, ci, docs, rfc) What does it touch? Bot, from the paths changed Auto
needs: (decision, UI, spec) What is blocking the issue? Whoever works on the issue Manual
spa: (Jollity, Humanity, ...) Which product needs it? Whoever creates the issue Manual

There are other non-grouped labels on the issue level.

Labels at the PR level:

Family Answers Who sets it Automated or manual?
status: (waiting on review, waiting on author, ready to merge, blocked) Who acts next? First one automatic, then author or reviewer "Waiting on review" is auto, the rest is manual
size: (XS to XXL) How much is there to read? Bot, from the lines changed Auto
ci: (ios simulator, ios device, android device, ...) Which builds run? The author, same as today's build labels Manual

# Conflicts:
#	.github/workflows/host-playground-e2e.yml
#	.github/workflows/ios-pr.yml
#	README.md
Names are family:value, matching the labels created in the repository. Issues take area, needs and spa; pull requests take status, needs, size and ci. Type, status and target date on issues are issue fields, so the type and priority families are gone, and the labels whose replacement is still open are held as pending.

Pull requests no longer carry an area. issue-areas.yml adds the areas a pull request touches to the issues it closes, reading the path map from .github/areas.yml, which check-path-routing.py now holds to CODEOWNERS. The backport job finds its open work order by branch rather than by area label. The label gate holds on any needs label and on status:blocked.
@TarikGul
TarikGul marked this pull request as ready for review October 20, 2026 13:10
@TarikGul
TarikGul requested a review from a team October 20, 2026 13:10
When a new label and an old one both exist, the sync merges the one on fewer items into the other and gives the survivor the new name, so the migration writes 21 labels rather than one per pull request carrying an old one. Writes pause between calls and back off on rate limits, and a merge skips items already labelled, so an interrupted run can be repeated.

issue-areas.yml runs when a pull request merges, so an unmerged or forked pull request cannot label issues. pr-triage.yml reads .gitattributes with the permission it needs and matches its patterns as git does. The RFC skill's commands use area:rfc, and the docs say when areas are applied, that older pull requests keep theirs, and that priority is an issue field.
# Conflicts:
#	.github/workflows/ios-device-preview.yml
#	.github/workflows/ios-pr.yml
Agents label pull requests and file issues, so the skill says which labels to set by hand and which are automatic, when a ci: label is worth its macOS jobs, how status and needs labels move, and that a label is only ever added or renamed through .github/labels.yml.
@valentyna-kozlova

Copy link
Copy Markdown

@TarikGul fyi I've deprecated enhancement, feature request, proposallabels

Comment thread .github/workflows/issue-areas.yml Outdated
.replace(/\u0001/g, '(.*/)?')
.replace(/\0/g, '.*') + '$');
const { data } = await github.rest.repos.getContent({
owner, repo, path: '.github/areas.yml', ref: pr.base.sha,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pr.base.sha may not be what we want here: it stays at the base commit of the last sync, so a PR merged without a re-sync would not find areas.yml and the 404 would fail the run. Would ref: pr.base.ref work instead? WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to merge_commit_sha, which also covers pull requests opened before areas.yml existed.

timeout-minutes: 5
permissions:
contents: read
issues: read

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this job also needs pull-requests: read: without it the issues endpoint hides PRs, so the dry run counts 10 items on rust where there are 263 and ends up planning the opposite merge direction from the one apply will take

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added pull-requests: read to the plan job.

Comment thread .github/areas.yml
# Keep it flat: a quoted label, then one quoted glob per line. issue-areas.yml
# reads it without a YAML parser.

"area:rfc":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC-only PRs also match docs/**, so their issues get area:docs too. Is that intended? If not, exclude docs/rfcs/ from area:docs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluded docs/rfcs/ from area:docs.

root = root_of(glob)
if root:
roots.add(root)
for globs in data.values():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: also check that every area label is defined in labels.yml. At the moment a typo passes and creates a new label on GitHub.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, a misspelt area now fails the check.

Comment thread .github/workflows/ios-pr.yml Outdated
return;
}
const label = 'ios-simulator-build';
const label = 'ci:ios-simulator';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: skip-ci (line 192) isn't in labels.yml and doesn't exist in the repo. Define it or drop the check.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gone, main moved that logic out when it split ios-app.yml.

Comment thread .github/labels.yml
reason: "Release-specific, and that release has passed"

# Left exactly as they are until their replacement is decided.
pending:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: python and Stability aren't listed. Add them to pending or retired.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added both under pending.

# Conflicts:
#	.github/workflows/android-device-preview.yml
#	.github/workflows/android-instrumented-tests.yml
#	.github/workflows/ci.yml
#	.github/workflows/host-playground-e2e.yml
#	.github/workflows/ios-app.yml
#	.github/workflows/ios-device-preview.yml
#	README.md
issue-areas.yml reads .github/areas.yml from the merge commit, so a pull request opened before the file existed still finds it. The sync plan job reads pull requests, so its counts match the apply. areas.yml takes a ! glob to keep docs/rfcs/ out of area:docs, and check-path-routing.py fails on an area labels.yml does not define. python and Stability are pending.

@decrypto21 decrypto21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, nits:

  1. pr-triage.yml:25: cancel-in-progress can drop the status when a push follows open, ready or draft. Set it on every event.
  2. label-gate.yml:16: merge_group always passes, but queued pull requests can still be labelled.
  3. issue-areas.yml:70: 404 when the base has no areas.yml (release/*).
  4. Old label names left in comments in the iOS, Android and e2e preview workflows.

…ued runs

pr-triage.yml decides status:waiting-on-review from the pull request's state on every event, so a run a push cancels leaves nothing the next run misses. Label gate reads the queued pull request's labels in the merge queue, since a queued pull request can still be labelled. issue-areas.yml labels nothing when the base branch has no areas.yml, and the preview workflows' comments name the ci: labels.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants