Skip to content

fix(selfhost): recognize repoDocGeneration in the config-lint allowlist - #3364

Merged
JSONbored merged 1 commit into
mainfrom
fix/selfhost-config-lint-repodocgen-allowlist
Jul 5, 2026
Merged

fix(selfhost): recognize repoDocGeneration in the config-lint allowlist#3364
JSONbored merged 1 commit into
mainfrom
fix/selfhost-config-lint-repodocgen-allowlist

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • src/selfhost/config-lint.ts's TOP_LEVEL_FIELDS allowlist (used to tell a self-host operator which .gittensory.yml top-level keys are recognized vs. unknown) lists gate, settings, review, features, contentLane — but not repoDocGeneration, even though it's a fully real, documented, actively-parsed top-level field (feat(config): add .gittensory.yml surface to enable/scope repo-doc generation #3002). An operator who sets repoDocGeneration: got a false "Manifest contains unknown top-level field: repoDocGeneration" warning even though the field works correctly. Fix: add it to the allowlist.
  • While auditing this doc surface, found the self-hosting-configuration docs page describes blockedPaths as enforced via a manifest_blocked_path finding gated by gate.manifestPolicy: block — that finding code does not exist anywhere in the codebase (confirmed by grep), and rules/advisory.ts's own comment states path holds are "intentionally separate and configured via hardGuardrailGlobs." Corrected that paragraph, and added the missing repoDocGeneration doc section (mirroring the existing contentLane one) since it wasn't documented on this page at all.
  • No issue filed — small, self-evident config-as-code parity fix plus a docs accuracy correction, found via direct investigation, not a reported incident.

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. (One coherent change: repoDocGeneration parity across the linter and the docs page.)
  • 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 typecheck (backend, clean)
  • npx tsc --noEmit in apps/gittensory-ui (clean)
  • npx eslint src/routes/docs.self-hosting-configuration.tsx in apps/gittensory-ui (only the pre-existing, repo-wide react-refresh/only-export-components warning shared by every doc route file; 0 errors)
  • npx prettier --write on the edited docs file
  • npx vitest run test/unit/selfhost-config-lint.test.ts (16/16 passing, including 2 new/updated cases)
  • npm run test:workers / npm run build:mcp / npm run test:mcp-pack / npm run ui:openapi:check / npm run ui:build — not run individually this PR; no worker/MCP/OpenAPI/schema surface touched. Ran the full npm run test:ci gate once already this session on the sibling PR fix(settings): authorize circuit-breaker hold labels via merge/close autonomy #3363 from the same branch point with no relevant failures; this PR's diff is strictly narrower (no src/settings or executor changes).
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries — added a dedicated regression test for repoDocGeneration: alone, and extended the "recognizes every field" exhaustive test to include it.

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. — N/A.
  • API/OpenAPI/MCP behavior is updated and tested where needed. — N/A, no API/OpenAPI/MCP surface changed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. — N/A, static docs copy only.
  • Visible UI changes include a UI Evidence section below. — Text-only docs copy edit on an existing page (no layout/component change), so no screenshot table; happy to add one if requested.
  • Public docs/changelogs are updated where needed — this PR is the docs correction (not a changelog edit).

Notes

repoDocGeneration is a real, actively-parsed top-level manifest field
(#3002), but was missing from config-lint.ts's TOP_LEVEL_FIELDS
allowlist, so an operator using it got a false "unknown top-level
field" warning even though the field works correctly.

Also corrects the self-hosting-configuration docs page, which claimed
blockedPaths is enforced via a manifest_blocked_path finding gated by
gate.manifestPolicy: block — that finding code does not exist; path
holds are enforced only via settings.hardGuardrailGlobs. Adds the
missing repoDocGeneration doc section alongside the existing
contentLane one.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui f66bd18 Commit Preview URL

Branch Preview URL
Jul 05 2026, 05:03 AM

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

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 05:08:22 UTC

3 files · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change correctly adds repoDocGeneration to the self-host config lint top-level allowlist and extends the regression coverage so the real lint path no longer emits the false unknown-field warning. The docs update also removes the stale blockedPaths enforcement claim and documents repoDocGeneration in the self-host configuration page. I do not see a reachable correctness defect in the changed code.

Nits — 3 non-blocking
  • apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx:563: nit: The new repoDocGeneration docs should also be reflected in the private-config overlay docs, because config/examples/README.md lists deep-merged top-level blocks and currently stops at contentLane.
  • config/examples/README.md: Update the nested-mapping list to include repoDocGeneration if it follows the same private global/per-repo overlay behavior, so the self-host docs do not drift across pages.
  • 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 ⚠️ Missing No linked issue or no-issue rationale found.
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 (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 56 registered-repo PR(s), 46 merged, 416 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 56 PR(s), 416 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
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: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 56 PR(s), 416 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • No action.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3364   +/-   ##
=======================================
  Coverage   93.88%   93.88%           
=======================================
  Files         281      281           
  Lines       30566    30566           
  Branches    11134    11134           
=======================================
  Hits        28698    28698           
  Misses       1211     1211           
  Partials      657      657           
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.

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 5, 2026
@JSONbored
JSONbored merged commit 7d600e0 into main Jul 5, 2026
13 checks passed
@JSONbored
JSONbored deleted the fix/selfhost-config-lint-repodocgen-allowlist branch July 5, 2026 05:12
JSONbored added a commit that referenced this pull request Jul 12, 2026
…field (#5307)

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

1 participant