feat(review): extract a codebase-grounded repo profile from RAG + signals - #3039
Conversation
…nals Adds extractRepoProfile(env, repoFullName), a single, versioned repo-profile-extraction primitive that turns a repo's existing RAG index (repo_chunks) and existing settings/manifest signals into a structured profile: architecture/module map, naming and test-file conventions, build/test/lint commands, and contribution-workflow facts (gate presence, linked-issue policy, CI workflow files). Deliberately deterministic (no embedding/vector-query calls, no AI): reads indexed file paths and package.json content directly out of the repo_chunks store RAG ingestion already populates, so it introduces no second indexing pipeline and stays fully fixture-testable. Returns an explicit insufficient-data result (never a partial guess) when the repo has no RAG index populated yet. Exports rag-index.ts's existing listStoredChunkPaths so this module can reuse it instead of re-deriving "what files does this repo have indexed" logic. Part of #2993. Closes #2999.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3039 +/- ##
==========================================
+ Coverage 96.08% 96.09% +0.01%
==========================================
Files 260 261 +1
Lines 28774 28859 +85
Branches 10475 10504 +29
==========================================
+ Hits 27647 27732 +85
Misses 492 492
Partials 635 635
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-04 09:59:05 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 6 non-blocking
Concerns raised — review before merging
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.
|
Summary
extractRepoProfile(env, repoFullName)(src/review/repo-profile.ts), a single, versioned repo-profile-extraction primitive that turns a repo's existing RAG index (repo_chunks) and existing settings/manifest signals into a structured profile: architecture/module map, naming and test-file conventions, build/test/lint commands, and contribution-workflow facts (gate presence, linked-issue policy, CI workflow files).package.jsoncontent directly out of therepo_chunksstore RAG ingestion already populates, so it introduces no second indexing pipeline and stays fully fixture-testable.present: falseinsufficient-data result (never a partial guess) when the repo has no RAG index populated yet, per the roadmap's fail-closed design principle.rag-index.ts's existinglistStoredChunkPathsso this module reuses it instead of re-deriving "what files does this repo have indexed" logic.Part of #2993 (repo-doc generation roadmap). Closes #2999.
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 changed file (src/review/repo-profile.ts): 100% statements/branches/functions/lines. Full unshardedtest:coverageleft to CI per this repo's own "don't duplicate CI locally" convention; ran the affected suites directly instead (test/unit/repo-profile.test.ts,test/unit/rag-index.test.ts,test/unit/rag-wiring.test.ts,test/unit/review-adapters.test.ts— 105/105 passing).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, no API/OpenAPI surface changed)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
gittensor:featureand intentionally left for community contributors.FocusManifest), becauseFocusManifestis maintainer-authored.gittensory.ymlconfig/preferences, while this profile describes what the code actually looks like — a fundamentally different kind of fact, per feat(review): extract a codebase-grounded repo profile from RAG + signals #2999's own explicit "land as a standalone module" requirement.