Skip to content

fix(config): wire badgeEnabled into the .gittensory.yml manifest parser#2598

Merged
JSONbored merged 1 commit into
mainfrom
fix/manifest-badge-enabled-wiring
Jul 2, 2026
Merged

fix(config): wire badgeEnabled into the .gittensory.yml manifest parser#2598
JSONbored merged 1 commit into
mainfrom
fix/manifest-badge-enabled-wiring

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • .gittensory.yml.example documents badgeEnabled under settings: as a config-as-code-settable field, and it's fully wired everywhere else (DB column, RepositorySettings type, API, the badge consumer itself) — but FocusManifestSettings's Pick<RepositorySettings, ...> list and parseSettingsOverride in src/signals/focus-manifest.ts both omitted it, so a maintainer setting badgeEnabled in .gittensory.yml had the value silently ignored.

Scope

  • src/signals/focus-manifest.ts — added badgeEnabled to the FocusManifestSettings Pick-list and to the existing boolean-field normalization loop in parseSettingsOverride, mirroring autoLabelEnabled exactly. resolveEffectiveSettings needs no change — it spreads settings.* generically, so the field now overrides the DB value automatically.
  • test/unit/focus-manifest.test.ts — added a regression test proving .gittensory.yml's badgeEnabled value actually overrides the DB-stored value.

Validation

  • npx vitest run test/unit/focus-manifest.test.ts — 163/163 passing
  • npm run typecheck — clean
  • npm run test:ci — full local gate green
  • npm audit --audit-level=moderate — 0 vulnerabilities

Safety

  • Two-line wiring fix plus one new test; no behavior change for any repo not setting badgeEnabled in .gittensory.yml.
  • Stays within src/** and test/**.

Closes #2555

.gittensory.yml.example documents badgeEnabled under settings: as a
config-as-code-settable field, and it's fully wired everywhere else
(DB column, RepositorySettings type, API, the badge consumer) -- but
FocusManifestSettings's Pick<RepositorySettings, ...> list and
parseSettingsOverride both omitted it, so a maintainer setting it in
.gittensory.yml had the value silently ignored.

Added badgeEnabled to the manifest Pick-list and the existing
boolean-field normalization loop in parseSettingsOverride, mirroring
autoLabelEnabled exactly. resolveEffectiveSettings needs no change --
it spreads settings.* generically, so the field now overrides the DB
value automatically. Added a regression test proving the override
actually takes effect.

Closes #2555
@dosubot dosubot Bot added the size:XS label Jul 2, 2026
@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-02 12:20:27 UTC

2 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This change correctly wires `settings.badgeEnabled` into the manifest settings type and the existing boolean normalization path in `src/signals/focus-manifest.ts`, matching the surrounding config-as-code pattern. The added regression test covers parser acceptance for both boolean values and proves a `true` manifest value overrides a `false` DB value through `resolveEffectiveSettings`. The visible diff is narrow and coherent with the PR description, with no reachable breakage in the changed lines.

Nits — 3 non-blocking
  • nit: `test/unit/focus-manifest.test.ts:1437` proves `true` overrides `false`, but it does not exercise the equally regression-prone `false` override over a `true` DB value in the resolver path.
  • Add a second resolver assertion in `test/unit/focus-manifest.test.ts:1437` using `const dbTrue = { badgeEnabled: true } as unknown as RepositorySettings;` and expecting `resolveEffectiveSettings(dbTrue, parsedFalse).badgeEnabled` to be `false`, so the test locks down that explicit `false` is not dropped by the overlay.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2555
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; 1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 65 registered-repo PR(s), 55 merged, 536 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 65 PR(s), 536 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 65 PR(s), 536 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (issue #2555, issue #2567)
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • No action.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.02%. Comparing base (2af7092) to head (f71d2a4).
⚠️ Report is 10 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2598      +/-   ##
==========================================
+ Coverage   95.99%   96.02%   +0.02%     
==========================================
  Files         230      233       +3     
  Lines       25887    26077     +190     
  Branches     9410     9474      +64     
==========================================
+ Hits        24851    25041     +190     
  Misses        425      425              
  Partials      611      611              
Files with missing lines Coverage Δ
src/signals/focus-manifest.ts 99.26% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 192d732 into main Jul 2, 2026
12 checks passed
@JSONbored
JSONbored deleted the fix/manifest-badge-enabled-wiring branch July 2, 2026 12:24
@github-actions github-actions Bot mentioned this pull request Jul 2, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(config): wire badgeEnabled into the .gittensory.yml manifest parser

1 participant