Skip to content

feat(selfhost): add private config lint helper - #2593

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:codex/selfhost-config-lint
Jul 2, 2026
Merged

feat(selfhost): add private config lint helper#2593
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:codex/selfhost-config-lint

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None. npm run test:ci passed, and npm audit --audit-level=moderate reported no vulnerabilities.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable; this is a backend helper and unit-test-only change.

Notes

  • The helper reports field names only and redacts parser warning fragments that could otherwise include supplied config values.

@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner July 2, 2026 11:47
@dosubot dosubot Bot added the size:L label Jul 2, 2026
@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 22:28:46 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This change adds a self-host-only lint helper that reuses the focus manifest parser, independently reports present top-level config fields, redacts parser warning values, and adds targeted unit coverage for valid, malformed, unknown-key, and oversize inputs. The visible implementation is coherent with the PR goal and the default-valued policy-field case is correctly covered by own-property detection in `src/selfhost/config-lint.ts:47`, so the external critical claim is not supported by the provided code. The main remaining issue is maintainability: the recognized top-level field list is duplicated locally and can drift from the real manifest parser as config grows.

Nits — 5 non-blocking
  • nit: `src/selfhost/config-lint.ts:4` duplicates the manifest's top-level field registry instead of deriving it from `focus-manifest`, so future `.gittensory.yml` fields can be parsed correctly but reported as unknown by this helper until two places are updated.
  • nit: `src/selfhost/config-lint.ts:110` uses `\w`, which allows underscores but not all YAML-visible identifier characters; that is fine for redaction, but the sanitized warning names may not exactly match unusual user keys.
  • In `src/selfhost/config-lint.ts`, consider exporting or sharing the canonical top-level field set from `src/signals/focus-manifest` so the lint helper cannot drift from the parser contract.
  • Add a regression test near `test/unit/selfhost-config-lint.test.ts:17` that includes any newly supported parser field when `focus-manifest` changes, or centralize the field list so that test becomes unnecessary.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2079
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:L; 1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 76 registered-repo PR(s), 66 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor oktofeesh1; Gittensor profile; 76 PR(s), 4 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • 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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x 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.06%. Comparing base (8514b24) to head (b1561b7).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2593   +/-   ##
=======================================
  Coverage   96.05%   96.06%           
=======================================
  Files         234      235    +1     
  Lines       26286    26333   +47     
  Branches     9534     9555   +21     
=======================================
+ Hits        25250    25297   +47     
  Misses        425      425           
  Partials      611      611           
Files with missing lines Coverage Δ
src/selfhost/config-lint.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oktofeesh1
oktofeesh1 force-pushed the codex/selfhost-config-lint branch from 5aec487 to b1561b7 Compare July 2, 2026 22:25
@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit 10acd78 into JSONbored:main Jul 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Development

Successfully merging this pull request may close these issues.

feat(selfhost): config-lint helper that surfaces .gittensory.yml parse warnings with friendly messages

2 participants