Skip to content

feat(labels): add the generic org-wide issue taxonomy - #310

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/issue-labels
Nov 23, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/issue-labels

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the org-wide issue taxonomy: every issue carries exactly one category: and one type: from two closed sets (12 labels total). There are no severity/priority/size/status/ownership labels and no fallback value: an under-specified issue is improved or split, never guessed.

  • Generic, no repo→category defaults. labels/category-rules.json holds only generic path rules and action keywords. The classifier reads the paths the issue names, then the generic action keywords; it never reads the repository name. Every category is available in every repository, so a new or future repo needs no rule change.
  • One tool, one classifier. scripts/labels.sh owns sync, audit, classify, apply, retire, render, verify-close, sample, explain. api_error_class is the ONE 404/quota/permission classifier in scripts/lib-org.sh; backfill-missing-tags.sh delegates to it.
  • Org-level placement. The taxonomy, rules, workflows, the org issue form, sync/audit and claims live once in opencharly/.github. Labels are per-repo storage only; the org label-sync workflow provisions the same 12 labels everywhere and bootstrap-repo-main.yml syncs a new repo. No repository ships a label config.
  • The org issue form (.github/ISSUE_TEMPLATE/issue.yml) is generated by render: four required fields (Category, Type, Remedy/files, Cited decision/rule), labels: [], inherited by every repository without its own template.
  • Held-out validation. The valid set R is disjoint from A–O (0 exact-line overlap; used 318 = 298 + 20) and passed the fresh generic reader: 0 splits, 1 remedy-less under-specified, every category usable in every repository.

Files (branch diff origin/main...HEAD: 15 files, +2392/−6)

File Change
labels/taxonomy.json new — 12 labels, generic test sentences, retired/forbidden sets, form values
labels/category-rules.json new — generic path rules + action keywords; no repo names/defaults
labels/cold-reader-used.json new — A–O + R (318 ids)
scripts/labels.sh new — the ONE tool (sync/audit/classify/apply/retire/render/verify-close/sample/explain)
scripts/labels-test.sh new — 21 mock-gh arms, including the genericity arm
.github/ISSUE_TEMPLATE/issue.yml new — the generated org-default form
.github/workflows/label-sync.yml new — manual dispatch, dry-run default, App token
.github/workflows/label-audit.yml new — daily report-only audit, org variables
.github/workflows/bootstrap-repo-main.yml modified — sync the labels for a newly bootstrapped repo
.github/workflows/workflow-checks.yml modified — run scripts/labels-test.sh
scripts/lib-org.sh modified — api_error_class (the one classifier)
scripts/backfill-missing-tags.sh modified — delegates to api_error_class
scripts/governance-claims.tsv modified — rows for the spec, rules, tool, README and form
AGENTS.md modified — canonical label files, test, issue form
README.md modified — issue-label taxonomy section; generic rules; new-repo inheritance

R1 finding fixed in this change (the sampler id-form bug)

The first live draws compared a short repo#num candidate against a used set stored as org/repo#num, so a used issue was never excluded. Samples P and Q were duplicates of A–O (19 and 8 ids) and are not held-out rounds; they are not recorded.

  • Root cause: the sampler built id="$repo#$inum" while cold-reader-used.json holds org/repo#num.
  • Missed control: the offline test's used fixture used the short form, so the live full form was never exercised.
  • Blast radius: P and Q invalid as held-out sets; no repository state was changed.
  • Root fix: the sampler normalizes to org/repo#num; the test uses a full-form used fixture; sample --from <fixture> --record records the fixture that was actually read; the used set is rebuilt from A–O + R (318).

Review round 1 RCA (BLOCK on 8bcd405, fixed on af01114)

The first push was BLOCKed with 9 findings. Root cause: the change was authored as a tool-first draft and the pre-validator self-audit was not run against the full verb matrix or the changed-file/rule accounting. Missed control: labels-test.sh covered sync/audit/apply/sample/retire/render/verify-close but not classify, --ignore-retired, forbidden_prefixes, the sample count, or every verb's quota path; the body deferred the form and framed the retirement execution as a follow-up while claiming fully tested. Blast radius: one validator round; no repository state changed. Root fixes:

  1. The form is landed here. The retirement execution is filed as Retire the default issue labels after the all-open-issue backfill #311 because it is data-order-gated on the backfill; ## Filed issues lists it. The retire path itself is in this PR.
  2. cmd_audit now matches every forbidden_prefixes value; the test asserts priority:high is forbidden, not unknown.
  3. retire --after-backfill audits with --ignore-retired; the test proves a retired-only finding clears the gate while a real finding still reds it.
  4. classify + apply round-trip arm; the classify TSV now carries category:/type: labels (the first draft emitted bare values, so apply would have rejected them).
  5. handle_api_class is the ONE quota/permission/absent policy; classify, sample, retire, the close-pass and verify-close now stop or exit 1 as the body claims; tests cover classify, sample, retire and close-pass quota refusals.
  6. Tier lowered to analysed on a live system (the live boundary is the sync dry-run; the remaining verbs are offline-mock covered).
  7. The body now accounts for every changed file, answers the pillars/ARCH/DISP/QUAL/COORD, and pastes the real YAML command/output.
  8. The category-map sweep is pasted below (grep -rn 'category-map' . → no output, exit 1).
  9. sample --n dies when the draw cannot satisfy N; the test proves it.

How tested

Run on the committed tree af0111455ba3e6ddabb3dfc2e9dca5d1401a3ccd (worktree-local). All exit 0 unless stated:

$ bash scripts/labels-test.sh
PASS: the label taxonomy tool syncs, audits (forbidden prefixes + the retired gate),
classifies and applies, samples (tested-fixture recording + --n), retires, renders,
verifies close, handles the quota/permission classes in every verb, and classifies by
the issue text alone (never the repo name)
# 21 arms; new arms: forbidden prefix, --ignore-retired retire gate, classify+apply,
# sample --n, classify/sample/retire/close-pass quota

$ bash scripts/governance-reconcile.sh
governance-reconcile: checked=38 skipped=55 fail=0

$ bash scripts/governance-reconcile.sh --self-test
governance-reconcile --self-test: all assertions passed

$ bash scripts/backfill-missing-tags_test.sh
PASS: the backfill tags only what is untagged and unexplained, in the right form,
verifies every create by the ref itself, and names an exhausted quota once at every
read AND at the create (19 properties)

$ python3 scripts/check-action-runtimes.py
check-action-runtimes: OK (17 workflow files; 5 audited pins; node24)

$ python3 -c 'import sys,yaml; [yaml.safe_load(open(p)) for p in sys.argv[1:]]; print("yaml: ok")' \
    .github/workflows/label-sync.yml .github/workflows/label-audit.yml \
    .github/workflows/bootstrap-repo-main.yml .github/workflows/workflow-checks.yml \
    .github/ISSUE_TEMPLATE/issue.yml
yaml: ok

$ grep -rn 'category-map' .
# no output; exit 1 (the retired map is absent)

$ bash scripts/labels.sh sync --dry-run --repos 'charly sdk spec'
36 PLAN lines; sync: mode=plan created=0 updated=0 unchanged=0 failed=0
# live GitHub read; no writes

Held-out genericity round (set R): a fresh reader saw only the definitions and 20 issues from 20 different repositories. Result: 0 SPLIT-REQUIRED, 1 UNDER-SPECIFIED (a pure decision record, type only); every axis cited a precedence rule, and: "the category set is fully usable in every repository because every category is stated in terms of capability and named artifacts, never repository identity."

Attribution: analysed on a live system — the live boundary is the sync dry-run; the remaining verbs are covered by the offline mock-gh suite, and the form/workflows are static and YAML-validated. The full gate's live boundary does not cover every changed path.

Rulebook compliance

  • R0: loaded /charly-internals:git-workflow, skills, repo-setup, strict-policy, cutover-policy before the first git/gh action.
  • R1: both anomalies (the sampler id-form and the round-1 findings) have the RCA above, naming root cause, missed control, blast radius and root fix; every finding is fixed here or filed (Retire the default issue labels after the all-open-issue backfill #311); zero warnings in the gates.
  • R2: one classifier (api_error_class), one taxonomy spec, one generic rules file, one labels tool. The retired category-map is absent (sweep above).
  • R3: no sleeps, blind retries or ad-hoc podman/systemctl; handle_api_class is the ONE quota/permission/absent policy; every verb stops or aborts with the retry set.
  • R4: the tool is the product; README/AGENTS and the commands here run with the repo's own scripts.
  • R5: no legacy label map or repo-default path survives; the category-map sweep is pasted.
  • R6: git status checked first; no destructive action, no force-push, no direct main push; the branch is feat/issue-labels.
  • R7: labels-test.sh fails without the implementation (21 arms, including classify+apply, forbidden prefixes, the retire gate and the sample count); the live --dry-run executed the changed sync path; the emitted workflows/form are validated.
  • R8: the live boundary is a real GitHub read (sync --dry-run, no writes); the offline mock gh is unit coverage only.
  • R9: no charly binary and no Go build in this repo; N/A.
  • R10: change class = config/scripts + workflows + a form (no disposable bed); the gate is this repo's workflow-checks and the org charly/pr-validator on this PR.
  • R11: org process, not a product mechanism — no DESIGN amendment. D-NAME-4 is followed; runtime/spec are label values scoped by their prefixes, not new DESIGN terms.
  • RDD: the high-risk assumptions (generic classification; no repo signal) were proven on the fresh R reader and the live sync dry-run; no disposable bed applies to org config.
  • ADE: N/A — no candy plan:; the labels tool's test suite is the acceptance.
  • SDD: taxonomy.json is the single authored shape; the form is generated from it; no hand-written generated Go; no CUE change.
  • ARCH: placement is the org .github config repo; no core/sdk/candy move.
  • DISP: no disposable target is mutated; N/A.
  • QUAL: bash -n clean; no Go files; no golangci surface.
  • COORD: tracking issue Org-wide issue taxonomy: one category + one type per issue, mandatory at creation opencharly#1238 claimed and updated; Retire the default issue labels after the all-open-issue backfill #311 filed; the session footer is in the body and both commits.

Change classification

Change class: config/scripts + workflows + one generated org form; no R10 beds.

Breaking change + rollback: none — the labels, tooling and form are additive; no consumer-visible surface is removed. Rollback is a revert of this PR. The retirement of the default labels is the filed #311 execution after the backfill.

Filed issues

Review round 1 RCA (comment)

The round's RCA is posted as a PR comment and repeated in the section above; the fix head is af0111455ba3e6ddabb3dfc2e9dca5d1401a3ccd.

Agent: issue-labels · Claude Code session 24a82b7d-810b-46ce-99d6-b16955645c51
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Add the 12-label two-axis taxonomy (exactly one `category:` and one `type:` per
issue) with NO repo→category defaults. The classifier reads only the issue's
paths and generic action keywords; every category is available in every
repository, so a new or future repo needs no rule change.

Land the canonical spec (`labels/taxonomy.json`), the generic rules
(`labels/category-rules.json`), the used-id record, the one `scripts/labels.sh`
tool (sync/audit/classify/apply/retire/render/verify-close/sample/explain) and
its mock-gh test, the manual sync and daily report-only audit workflows, the
bootstrap sync, and the governance-claim rows. The org issue form is generated
later, after the first sync.

Record the valid held-out set A–O + R. P and Q are excluded: the live sampler
compared a short `repo#num` against a full `org/repo#num` used set, so they
were duplicates (19 and 8 ids). The fix normalizes to `org/repo#num`, the test
uses a full used id, and `sample --from` records the fixture that was actually
read. R is disjoint from A–O (0 exact-line overlap) and passed: 0 splits, 1
remedy-less under-specified, every category usable in every repository.

Add `api_error_class` to `lib-org.sh` as the ONE quota/permission classifier;
the tag backfill delegates to it and its 19-property test still passes.

*Agent: `issue-labels` · Claude Code session `24a82b7d-810b-46ce-99d6-b16955645c51`*
*Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)*
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 8bcd4055fe21dc9db8ccbec0796165e303309a98 (branch: feat/issue-labels)

Change class: config/scripts + workflows; no R10 bed.
Placement: CORRECT — org .github canonical tooling; no core/sdk/candy move.
Security screen: T1/T2/T4 PASS. T3 description↔code mismatch: forbidden_prefixes is declared but never enforced (see block 2).
Comments: none.

Blocks

  1. HC/A1/CONC(b) — deferred work with no filed issue. The body defers the issue form (“lands in the follow-up after the first sync”) and retirement (“separate Phase 5 subcommand, after the backfill”), while ## Filed issues says None. Land the form (render output) and the retirement path in this cutover, or file real issues and list them under ## Filed issues; remove the Phase/follow-up framing.

  2. T3/A1/R7 — forbidden_prefixes is dead data. labels/taxonomy.json defines forbidden_prefixes (priority:, status:, owner:, …), and the body/README claim audit reports forbidden labels, but scripts/labels.sh cmd_audit only reads forbidden_values. A priority:high issue is counted unknown, not forbidden. Make cmd_audit test every forbidden prefix, add a failing-without-fix test arm, and update the body/README.

  3. R7/R10 — retire --after-backfill can never run when retired labels are in use. scripts/labels.sh cmd_retire gates on cmd_audit --strict; cmd_audit treats every non-spec label (including retired labels such as bug) as unknown, so audit is red exactly when retirement is needed. Exclude retired labels from the after-backfill gate (or gate only on non-retired findings), and test the guard.

  4. R10 — the classify verb is untested; the body claims it is covered. scripts/labels-test.sh calls explain, never classify; the new TSV/classify path can regress with the suite green. Add a classify arm (and an apply round-trip) that fails on the pre-fix implementation.

  5. R3/R1 — quota/permission handling is inconsistent with the body’s R3 claim. cmd_sync/cmd_audit stop and exit 1, but cmd_classify warns and exits 0, cmd_sample silently continues, cmd_retire treats quota as success, and cmd_audit --close-pass ignores gh_call failures. The body says the quota/permission classes stop the sweep and print the retry set. Centralize the class handling across every verb and add tests.

  6. A3 — fully tested and validated is inflated. The only live boundary evidence is sync --dry-run; label-audit.yml, label-sync.yml, classify, retire apply, audit --close-pass, and most verbs ran only against mock gh. That is at most analysed on a live system, not fully tested. Lower the tier or execute the changed paths live and paste the output.

  7. A1 — the body does not account for every changed file or every applicable rule. scripts/governance-claims.tsv is added but absent from the Summary; the rulebook section lists R0–R11 but omits the pillars (RDD/ADE/SDD), ARCH, DISP, QUAL, and COORD answers; the YAML check is pasted as python3 -c 'import yaml; ...' with no real command. Add the missing accounting, answer/N/A each applicable rule, and paste the actual YAML command/output.

  8. CONC(d)/R5 — the category-map sweep is claimed, not pasted. R2 says grep -rn 'category-map' → 0, but no executed command output appears. Paste the real command and output, or remove the sweep claim.

  9. R7/R10 — sample --n can return fewer than N. scripts/labels.sh cmd_sample caps at five passes per repo and never checks the selected count against n; one repo with many issues yields five, not twenty. Die when the draw cannot satisfy --n, and add a test.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…e, tests)

Land the generated org issue form; enforce every `forbidden_prefixes` value in
the audit; make `retire --after-backfill` ignore retired labels (and test the
gate); add classify+apply, forbidden-prefix, sample `--n`, and per-verb
quota/permission coverage; fix the classify TSV to carry `category:`/`type:`
labels for `apply`; fix the retire open-issue count; lower the attribution tier
to the proof actually pasted.

The retire execution after the backfill is filed as #311 —
data-order-gated on the backfill, not an implementation deferral.

*Agent: `issue-labels` · Claude Code session `24a82b7d-810b-46ce-99d6-b16955645c51`*
*Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)*
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS

Review round 1 RCA — the BLOCK on 8bcd405 is fixed on af01114. Root cause: the tool-first draft skipped the full verb-matrix self-audit and the file/rule accounting. Missed control: labels-test.sh did not cover classify, --ignore-retired, forbidden_prefixes, sample --n, or every verb quota path; the body deferred the form and framed the retirement execution as a follow-up while claiming fully tested. Blast radius: one validator round, no repository state. Fixes: the form is landed; the retirement execution is filed as #311; forbidden_prefixes is enforced; retire --after-backfill uses --ignore-retired; classify+apply round-trip; handle_api_class is the one quota/permission policy across every verb; the classify TSV carries category:/type:; the retire count is fixed; sample --n dies on a short draw; the tier is lowered to analysed on a live system; the body now accounts for every file/rule and pastes the real YAML and category-map sweep. Evidence: labels-test 21 arms PASS; governance 38/0; self-test; backfill 19 properties; action pins; YAML; live sync dry-run 36 plans.

Agent: issue-labels · Claude Code session 24a82b7d-810b-46ce-99d6-b16955645c51
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: af0111455ba3e6ddabb3dfc2e9dca5d1401a3ccd (branch: feat/issue-labels)

Security screen: PASS (T1–T4 — no redefinition of the validator/rulebook, no embedded directives, no secrets/egress, actions SHA-pinned, guardrails additive/strengthened)
Checklist: All applicable rules PASS or NA (config/scripts/workflows/form in the org .github repo; no R10 bed applies).

Comment disposition:

  • @github-actions[bot] round-1 BLOCK (on 8bcd4055) — stale-superseded: all 9 findings are re-derived against the current diff and fixed — form landed (.github/ISSUE_TEMPLATE/issue.yml), forbidden_prefixes enforced (cmd_audit reads forb_prefixes; test 5), retire --after-backfill uses --ignore-retired (test 6c), classify+apply round-trip test (6b), handle_api_class quota/permission policy with per-verb tests (6d/8d/9b/9c), tier lowered to analysed on a live system, body accounts for all 15 files + R0–R11/pillars/ARCH/DISP/QUAL/COORD, real YAML and category-map sweep pasted, sample --n dies on a short draw (8c). The sync --dry-run pasted output (36 PLAN = 3 repos × 12 labels, counters 0) is internally consistent.
  • @aitrawog STATUS/RCA — coordination metadata; consistent with the body's round-1 RCA. Not a finding.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 23, 2026 09:57
@github-actions
github-actions Bot merged commit 4efc293 into main Nov 23, 2026
4 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 23, 2026
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.

1 participant