fix(selfhost): decouple taxonomy labels from outcome labels#2735
Conversation
The per-PR TYPE label (gittensor:bug/feature/priority) was nested inside the public-surface label decision, so miner-detection status, oss_maintainer mode, or a maintainer-authored PR could silently suppress it even though it is internal triage metadata, not a contributor-facing signal. Add an independent typeLabelsEnabled setting (default true) and apply the type label regardless of author type or the narrower reasons the base context label can be off, while still respecting publicAudienceMode: gittensor_only's stricter promise of total silence for a non-confirmed-miner author and the agentPaused kill-switch.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 56e08f4 | Commit Preview URL Branch Preview URL |
Jul 03 2026, 09:16 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2735 +/- ##
==========================================
+ Coverage 96.01% 96.04% +0.03%
==========================================
Files 244 245 +1
Lines 27300 27344 +44
Branches 9919 9934 +15
==========================================
+ Hits 26211 26263 +52
+ Misses 462 458 -4
+ Partials 627 623 -4
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 09:35:55 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
5ad170b to
56e08f4
Compare
Summary
The per-PR TYPE/taxonomy label (
gittensor:bug/gittensor:feature/gittensor:priority,classified from the PR title + changed paths) was nested inside
if (decision.willLabel), thegate that governs the public-facing
gittensorLabelcontext label. Sincedecision.willLabelfolds in miner-detection status,
publicAudienceMode: oss_maintainer+ an unconfirmed miner,autoLabelEnabled, and the repo'spublicSurfacemode, any of those conditions silently alsosuppressed the type label — even though it is internal triage metadata, not a contributor-facing
signal, and its own header comment already said it should be independent of the context label.
This is a follow-up to #2719 (
fix(selfhost): scope label automation for one-shot reviews): thatPR separated the outcome/enforcement label families from the base context label's autonomy dial;
this PR does the analogous split for the last remaining coupled family — taxonomy labels.
Changes:
typeLabelsEnabled(defaulttrue, matching the priorde-facto behavior), wired through the standard settings pipeline (migration,
RepositorySettings,.gittensory.ymlparser, OpenAPI schema, DB repository defaults/row-mapping).src/queue/processors.ts: moved the type-label block out from underdecision.willLabelintoits own gate keyed on
typeLabelsEnabled. It now applies regardless of author type (bot,maintainer-excluded, missing author) or the narrower reasons the context label can be off
(
oss_maintainer+ unconfirmed miner,autoLabelEnabled,publicSurfacemode) — the one thingstill respected is
publicAudienceMode: gittensor_only's stricter promise of total silence for anon-confirmed-miner author, and the
agentPausedkill-switch. Added atype_label_decisionstructured log line (applied/label or the suppression reason) alongside the existing
type_label_errorconvention for operator visibility..gittensory.yml.example: documentedtypeLabelsEnabledand added a short summary of the fournow-fully-independent label families (context / taxonomy / autonomy-outcome / anti-abuse
enforcement) and which setting governs each.
No linked issue: this is a direct follow-up to the maintainer's own investigation that produced
#2719, continuing the same label-decoupling work with no separate tracking issue filed.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally (unsharded, full run) — 7144+ tests passed, pre-existing skips only; every changed file (src/types.ts,src/db/schema.ts,src/db/repositories.ts,src/signals/focus-manifest.ts,src/signals/settings-preview.ts,src/queue/processors.ts,src/openapi/schemas.ts) is 100% line- and branch-covered on the diff, verified directly againstcoverage/lcov.infofor the exact changed line ranges (two intentionally-unreachable lines — acontentGlobsforward-compat hook never wired to any real setting, and a?? truefallback that can't be undefined once resolved through the DB layer — are marked withv8 ignoreand explained inline, matching this file's existing convention).npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run selfhost:env-reference:check(part of the fulltest:cichain but not in thistemplate's list) fails on a clean
origin/maincheckout with no changes from this PR applied —confirmed by stashing this branch's diff and re-running. Pre-existing, unrelated drift; flagged
separately rather than folded into this PR's diff.
Safety
typeLabelsEnabledadded toRepositorySettingsSchemaandRepoSettingsPreviewSchema;openapi.jsonregenerated;ui:openapi:settings-paritypasses.UI Evidencesection below. — N/A, backend/config-as-code only, no visible UI change..gittensory.yml.exampleupdated;CHANGELOG.mduntouched.Notes
migrations/0101_type_labels_enabled.sqladdstype_labels_enabled(NOT NULL DEFAULT 1) — a plain hand-authoredALTER TABLE ADD COLUMN, matching this repo's establishedmigration convention. Verified the number was still free against
origin/mainimmediately beforeauthoring and again right before pushing.
RepositorySettings.typeLabelsEnabledis declaredboolean | undefined(optional), matching theexisting precedent for fields like
badgeEnabled— always populated by the DB layer, optionalonly so the ~15 existing test fixtures that construct a
RepositorySettings-shaped objectwithout every field don't need touching.
publicAudienceMode: gittensor_only's stricter"stay entirely quiet for a non-confirmed-miner author" promise still holds even with the gate
enabled — the type label does not leak out from underneath that mode's total-silence guarantee,
unlike the narrower
oss_maintainer/author-type exclusions it is deliberately decoupled from.