feat(config): add .gittensory.yml surface to enable/scope repo-doc generation - #3169
Conversation
…neration Adds a manifest-only repoDocGeneration: block (enabled, scope, and allowOverwriteExisting) with no DB-backed counterpart, since the repo-doc generation roadmap has no dashboard toggle. Wires it into openRepoDocPullRequest as two gates: the feature must be explicitly enabled and in scope before any profile extraction or GitHub call runs, and a file that looks hand-maintained (no marker block) is left alone unless allowOverwriteExisting is set, in which case it's discarded in favor of a fresh generate rather than partially merged. Closes #3002. Part of #2993.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-04 18:42:31 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3169 +/- ##
=======================================
Coverage 94.71% 94.72%
=======================================
Files 269 269
Lines 29544 29571 +27
Branches 10773 10784 +11
=======================================
+ Hits 27984 28011 +27
Misses 916 916
Partials 644 644
🚀 New features to boost your workflow:
|
Summary
repoDocGeneration:block to the.gittensory.ymlmanifest (src/signals/focus-manifest.ts, parsed viaparseFocusManifest) with three fields:enabled(defaultfalse-- the feature is opt-in per repo),scope(default["agents"]-- which generated file types are in play, forward-compatible with"skills"once feat(review): generate repo-specific Claude Code / Codex skill files #3001 lands), andallowOverwriteExisting(defaultfalse).openRepoDocPullRequest(src/github/repo-doc-pr.ts):enabled/scope.includes("agents")are checked immediately after the installation check, before any profile extraction or GitHub call -- cheap, since the common case is disabled.manual-review-required(its "this file looks hand-maintained, no marker block" signal),allowOverwriteExistingdecides whether that repo stays skipped (default) or gets a fresh wholesale generate discarding the old content (opt-in).CONTRIBUTING.md's config-as-code reference and the root.gittensory.yml(plus its bundled fallback copy insrc/config/gittensory-repo-focus-manifest.ts) with a commented-out worked example.Part of #2993 (repo-doc generation roadmap). Closes #3002.
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 actionlint(not run -- no workflow files touched)npm run typechecknpm run test:coverage-- scoped to the two changed source files: 100% statements/branches/functions/lines on the newrepoDocGenerationparsing (src/signals/focus-manifest.ts) and the new gating logic (src/github/repo-doc-pr.ts). Full unshardedtest:coverageleft to CI per this repo's own "don't duplicate CI locally" convention; rannpm run test:changedagainstorigin/maininstead, which pulled in 223 affected files (5676 tests) -- all green, including the bundled-YAML-alignment test this PR's.gittensory.ymledit required updating (test/unit/gittensory-focus-manifest.test.ts).npm run test:workers(not run -- no Cloudflare-Workers-pool-specific code touched)npm run build:mcp/npm run test:mcp-pack(not run -- no MCP package changes)npm run ui:openapi:check/npm run ui:lint/npm run ui:typecheck/npm run ui:build(not run -- noapps/gittensory-uichanges; this field has no OpenAPI/API surface since it's manifest-only, not aRepositorySettingsfield)npm audit --audit-level=moderate(not run locally -- no dependency changes; CI's dependency-review job covers this)If any required check was skipped, explain why:
validatejob runs them as a backstop.Safety
UI Evidencesection below with screenshots. (N/A -- no visible UI changes.)Notes
RepositorySettingsfield instead (thegittensory-gate-setting-wiringtemplate: migration + Drizzle + resolver + 4 OpenAPI schemas +api/routes.ts+ UIopenapi.jsonregen), matching how e.g.reviewCheckMode(feat(selfhost): configurable review-check publish mode (required/visible/disabled) #2852) was added. Chose the lighter manifest-only path because repo-doc generation has no dashboard/API surface today and the issue's own deliverables only ask for "yml schema addition with resolver wiring" -- adding an unused DB/OpenAPI round-trip for a field nothing reads from there would be scope creep.scope's empty-vs-omitted handling is deliberate: an omittedscopekey falls back to the default["agents"], but an explicitscope: []is honored as "nothing in scope" rather than silently re-defaulted -- and a genuinely malformed (non-list)scopevalue falls back to the default rather than emptying it out, since that would otherwise silently disable anenabled: trueconfig with no warning a maintainer would notice.