feat(labels): route ensureRepoLabels through label_catalog (LBL-2) #767

Merged
charles merged 1 commit from dev/755 into main 2026-05-02 20:37:28 +00:00
Collaborator

Adds ensureRepoLabels/ensureAllRepos that resolve specs per-repo from the label_catalog DB table via getLabelCatalogForRepo, replacing the static config/labels.json read path in the startup reconcile and labels-bootstrap CLI.

Test plan

  • New smoke test: seed label_catalog with a scope=repo colour override, call ensureRepoLabels, assert the repo-specific colour is passed to createLabel.
  • All 17 existing labels tests pass.
  • just qa clean (typecheck + Biome lint + format).

Closes #755

Adds `ensureRepoLabels`/`ensureAllRepos` that resolve specs per-repo from the `label_catalog` DB table via `getLabelCatalogForRepo`, replacing the static `config/labels.json` read path in the startup reconcile and `labels-bootstrap` CLI. ## Test plan - New smoke test: seed `label_catalog` with a `scope=repo` colour override, call `ensureRepoLabels`, assert the repo-specific colour is passed to `createLabel`. - All 17 existing labels tests pass. - `just qa` clean (typecheck + Biome lint + format). Closes #755
dev self-assigned this 2026-05-02 20:09:12 +00:00
feat(labels): route ensureRepoLabels through label_catalog (LBL-2)
All checks were successful
qa / dockerfile (pull_request) Successful in 6s
qa / qa (pull_request) Successful in 2m55s
f5d7f489d2
Add ensureRepoLabels/ensureAllRepos that resolve specs per-repo from the
label_catalog DB table via getLabelCatalogForRepo, so scope=repo/global
overrides land on the next ensure-labels pass without a restart.

Update main.ts startup reconcile and the labels-bootstrap CLI to use
ensureAllRepos/ensureRepoLabels instead of loadLabelSpecs+reconcileAllRepos.
Add smoke test: scope=repo colour override is used when creating the label.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-05-02 20:12:12 +00:00
reviewer approved these changes 2026-05-02 20:14:54 +00:00
reviewer left a comment

CI green (run #2877). ensureRepoLabels correctly routes through getLabelCatalogForRepo with repo>global>builtin priority. Smoke test covers scope=repo colour override. Startup path and CLI no longer touch labels.json.

Nit (non-blocking): loadLabelSpecs + DEFAULT_LABELS_JSON_PATH still live in labels.ts — issue AC says "grep shows zero labels.json reads outside builtin-sync.ts" but the function is still exported and used by the bundled-config parity test. Fine to leave as-is since it is not in the active reconcile path.

CI green (run #2877). `ensureRepoLabels` correctly routes through `getLabelCatalogForRepo` with repo>global>builtin priority. Smoke test covers scope=repo colour override. Startup path and CLI no longer touch labels.json. Nit (non-blocking): `loadLabelSpecs` + `DEFAULT_LABELS_JSON_PATH` still live in `labels.ts` — issue AC says "grep shows zero labels.json reads outside builtin-sync.ts" but the function is still exported and used by the bundled-config parity test. Fine to leave as-is since it is not in the active reconcile path.
charles deleted branch dev/755 2026-05-02 20:37:29 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!767
No description provided.