feat(enrichment): classify long-form doc extensions as docs#3329
Conversation
categorizeFile (analysis-context.ts) recognized only .md/.mdx/.rst/.txt as docs, so the long-form spellings .markdown, .adoc, and .asciidoc fell through to the source category — a NOTES.markdown or guide.adoc change was treated as source rather than documentation. Add the three spellings to the docs extension list. This matches the canonical DOCS_EXTENSIONS set in src/signals/path-matchers.ts and rag.ts's DOC_EXT_RE, which already treat them as docs. Matching is case-insensitive via the existing lowercased-extension path (README.ADOC classifies as docs).
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 03:09:06 UTC
⏸️ Suggested Action - Manual Review 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.
|
Summary
categorizeFile(inreview-enrichment/src/analysis-context.ts) assigns each changed file a category (docs,source,asset,lockfile, …) used for review scheduling/scope. Its docs list recognized only.md/.mdx/.rst/.txt, so the long-form doc spellings.markdown,.adoc, and.asciidocfell through to thesourcecategory — aNOTES.markdownorguide.adocchange was mischaracterized as a source change rather than documentation.This adds the three spellings to the docs extension list:
DOCS_EXTENSIONSset insrc/signals/path-matchers.ts(md, mdx, markdown, rst, adoc, asciidoc) andrag.ts'sDOC_EXT_REalready classify all three as docs —rag.tseven carries a comment noting these long-form spellings were a known miss elsewhere. This brings the categorizer in line.README.ADOCclassifies as docs.No linked issue
This is a no-issue PR by design: a self-contained classification-coverage fix that adds three doc extensions to
categorizeFileplus a focused test, touching onlyreview-enrichment/. There is no behavior change beyond correctly categorizing these docs, so no tracking issue is needed. It mirrors the accepted no-issue precedent for the same kind of classification-inventory change (e.g. the recently-merged#3204and#3264).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coverage— nosrc/**lines changed (this change is underreview-enrichment/, which Codecov does not measure), socodecov/patchhas no diff to gate; suite is green.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderatereview-enrichment/test/analysis-context.test.tsdrivescreateAnalysisContextand asserts.markdown/.adoc/.asciidoc(and uppercase.ADOC) categorize asdocs, while.tsstayssource.npm run rees:testpasses (863 tests; analyzer-metadata check clean).Validated green against the full GitHub CI
validate-codecheck set —actionlint,db:migrations:check,db:schema-drift:check,cf-typegen:check,selfhost:validate-observability,typecheck,test:coverage,test:workers,build:mcp,test:mcp-pack,build:miner,rees:test,ui:openapi:check,ui:openapi:settings-parity,ui:version-audit,ui:lint,ui:typecheck,ui:test,ui:build. Branch rebased on latestmain.Safety
Notes
Analogues followed end-to-end: the existing category tests in
analysis-context.test.ts(e.g. the.zstasset and case-insensitive lockfile cases), and the recently-merged classification-inventory PRs#3204and#3264..txtis intentionally left in the docs list (it is not in the canonicalDOCS_EXTENSIONSbut is present inrag.ts'sDOC_EXT_RE) — this PR only adds the missing long-form spellings and changes nothing else.