Skip to content

fix(selfhost): recognize experimental: as a valid top-level manifest field#5307

Merged
JSONbored merged 1 commit into
mainfrom
fix/config-lint-experimental-field
Jul 12, 2026
Merged

fix(selfhost): recognize experimental: as a valid top-level manifest field#5307
JSONbored merged 1 commit into
mainfrom
fix/config-lint-experimental-field

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

#5030 (the gittensor subnet plugin) added a real, actively-parsed experimental: top-level manifest block, but never updated src/selfhost/config-lint.ts's TOP_LEVEL_FIELDS allowlist — the same class of bug already fixed once in this exact file for repoDocGeneration (#3364). All 3 production self-host repo configs declare experimental: { gittensor: true } today; running npm run selfhost:config-lint against any of them produces a false "unknown top-level field" warning.

Scope

src/selfhost/config-lint.ts (one line), test/unit/selfhost-config-lint.test.ts (regression test mirroring the #3364 precedent).

Validation

  • npm run typecheck — clean
  • npx vitest run test/unit/selfhost-config-lint.test.ts test/unit/gittensory-config-lint-script.test.ts — 28/28
  • Scoped coverage on config-lint.ts: 100% statements/branches/functions/lines
  • npm run docs:drift-check — clean
  • Verified by re-running the CLI against a live production config snapshot after this fix — no false positive on experimental

Closes #5281

…field

#5030 (the gittensor subnet plugin) added a real, actively-parsed
experimental: top-level manifest block, but never updated this
linter's TOP_LEVEL_FIELDS allowlist -- the same class of bug already
fixed once in this file for repoDocGeneration (#3364). All 3
production self-host repo configs declare experimental: gittensor:
true today; running the config-lint CLI against any of them produced
a false "unknown top-level field" warning.

Refs #5281
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.37%. Comparing base (b7a410d) to head (608ff35).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5307   +/-   ##
=======================================
  Coverage   94.37%   94.37%           
=======================================
  Files         474      474           
  Lines       40128    40128           
  Branches    14631    14631           
=======================================
  Hits        37869    37869           
  Misses       1583     1583           
  Partials      676      676           
Flag Coverage Δ
shard-1 46.28% <ø> (-0.28%) ⬇️
shard-2 34.74% <ø> (+0.06%) ⬆️
shard-3 32.05% <ø> (-0.04%) ⬇️
shard-4 31.97% <ø> (-0.11%) ⬇️
shard-5 33.45% <ø> (-0.15%) ⬇️
shard-6 45.07% <ø> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/selfhost/config-lint.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gittensory-orb gittensory-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-12 13:49:42 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): src/selfhost/config-lint.ts (matched src/selfhost/**).

Review summary
This is a one-line allowlist fix adding "experimental" to TOP_LEVEL_FIELDS in src/selfhost/config-lint.ts, mirroring the exact precedent set for repoDocGeneration in #3364, with a regression test that verifies lintManifestText no longer flags a standalone experimental: block as unknown. The fix is correctly traced to source: the array is the sole gatekeeper checked by unknownTopLevelWarnings and recognizedFieldsFor, so adding the string there directly resolves the false-positive warning described in the linked issue #5281. The change closes an eligible open issue, is narrowly scoped to the exact defect, and includes a real (non-fabricated) test exercising the actual code path.

Nits — 4 non-blocking
  • The regression test's inline comment is quite long (4+ lines) compared to the terser style used for the adjacent repoDocGeneration regression test in the same file — consider trimming it for consistency.
  • Consider whether other nested fields under experimental (beyond gittensor) should eventually get their own validation, though that's out of scope for this narrow fix.
  • 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.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5281
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 44 registered-repo PR(s), 36 merged, 476 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 44 PR(s), 476 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 44 PR(s), 476 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
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.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 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

@gittensory-orb gittensory-orb Bot added the manual-review Gittensor contributor context label Jul 12, 2026
@JSONbored JSONbored merged commit acc99a8 into main Jul 12, 2026
19 checks passed
@JSONbored JSONbored deleted the fix/config-lint-experimental-field branch July 12, 2026 13:49
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. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

Add "experimental" to config-lint.ts's TOP_LEVEL_FIELDS allowlist

1 participant