feat(enrichment): categorize the full binary inventory as assets - #3558
feat(enrichment): categorize the full binary inventory as assets#3558davion-knight wants to merge 1 commit into
Conversation
categorizeFile only recognized a narrow hand-listed set of binary extensions (png/jpg/jpeg/gif/webp/pdf/zip/gz/zst) as the `asset` category, so every other binary the shared inventory already knows — mp4, mov, webm, woff2, wasm, node, safetensors, gguf, onnx, and the rest — fell through to `source`, mislabeling a media/font/model-weight change as a source change. Delegate the check to the shared binary-extension inventory (`BINARY_EXT_RE` from analyzers/binary-extensions, the same source asset-weight and provenance use) instead of a duplicated list, matching the JSONbored#3252 unification. `.svg` is text (deliberately not in the binary inventory) but is still an asset for categorization, so it is kept explicitly. Purely additive — only binaries that were previously `source` become `asset`; no other category changes.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-05 17:01:26 UTC
🛑 Suggested Action - Reject/Close
Review summary Nits — 6 non-blocking
Why this is blocked
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.
|
|
Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; Maintainer requires a linked issue). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
categorizeFile(inreview-enrichment/src/analysis-context.ts) assigns each changed file a category used for review scheduling/scope. Itsassetcheck used a narrow hand-listed set of binary extensions —png/jpg/jpeg/gif/webp/pdf/zip/gz/zst— so every other binary the shared inventory already knows (mp4,mov,webm,woff2,ttf,wasm,node,safetensors,gguf,onnx, …) fell through tosource, mislabeling a media / font / model-weight change as a source change.This delegates the check to the shared binary-extension inventory:
BINARY_EXT_RE(fromanalyzers/binary-extensions) is the same inventoryasset-weightandprovenancealready use; this replaces the duplicated list with it, matching the feat(enrichment): unify binary extension inventory for asset-weight and provenance #3252 unification (and the same consolidation direction as the merged feat(enrichment): skip all binary + lockfile files in history analyzers #3359)..svgpreserved:.svgis text (deliberately not in the binary inventory) but is still anassetfor categorization, so it is kept explicitly.sourcebecomeasset; every one of the original 9 extensions is in the inventory, so no file that wasassetchanges, and no other category is affected. The full existing test suite (1034 tests) passes unchanged, confirming nothing relied on a binary beingsource.No linked issue
This is a self-contained classification-coverage fix + de-duplication touching only
review-enrichment/. It broadens theassetcategory to the shared inventory and removes a hand-maintained list; no new external behavior beyond correctly categorizing more binaries. It mirrors the accepted no-issue precedent for the same kind of enrichment change (e.g. the merged #3329 and #3359).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.png(legacy),.mp4/.woff2/.wasm/.safetensors(newly covered) categorize asasset,.svgstaysasset, and.tsstayssource.npm run rees:testpasses (1034 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(the.zstasset, long-form docs, and case-insensitive lockfile cases), and the merged consolidation PRs #3329 and #3359. The.svgspecial-case preserves the pre-existing behavior exactly (svg was already anassethere); only genuinely-binary extensions are newly recognized.