feat(engine): extract path-matchers.ts's pure classifier family to gittensory-engine - #4444
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4444 +/- ##
==========================================
+ Coverage 93.97% 93.98% +0.01%
==========================================
Files 414 414
Lines 37317 37311 -6
Branches 13636 13634 -2
==========================================
Hits 35068 35068
+ Misses 1594 1588 -6
Partials 655 655
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 19:12:56 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 6 non-blocking
Linked issue satisfactionAddressed 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
src/signals/path-matchers.ts's pure classifier family (classifyChangedFile,isGeneratedFile,isVendoredFile,isLockfile,isMinifiedFile,isDocsFile,isDependencyManifestFile,isConfigFile,isNonSubstantivePaddingFile,isTestFile,isCodeFile) topackages/gittensory-engine/src/signals/path-matchers.ts, mirroring the already-shippedtest-evidence.tsextraction exactly.src/signals/path-matchers.tsbecomes a thin re-export shim (export * from "../../packages/gittensory-engine/src/signals/path-matchers";) over the canonical engine implementation, matchingsrc/signals/test-evidence.ts's established pattern (relative source import, not the published package, sotypecheck/test:coveragedon't depend on the engine's builtdist/output)../signals/path-matcherssubpath topackages/gittensory-engine/package.json'sexportsmap, matching the./signals/test-evidence/./signals/check-summaryprecedent. Not added to the main barrel (index.ts), consistent with those two siblings, which also aren't barrel-exported.isCodeFile/isTestPathfrom./test-evidence.js) now resolves withinpackages/gittensory-engine/src/signals/instead of the siblingsrc/signals/test-evidence.tsshim.basename,extension) during the move —extension()was called nowhere in the original file (onlybasename()fed it, andbasename()had no other caller), so carrying them into the new home would have left 100%-uncovered lines threatening this diff's Codecov patch-coverage requirement. Nothing public changed: neither function was exported.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint— not run; no workflow files touched.npm run typecheck(clean on this diff; the repo's one pre-existing failure — a missingaws4fetchtype declaration insrc/selfhost/s3-blob-store.ts— reproduces identically on a cleanmaincheckout and is unrelated). Also rannpm run ui:typecheckdirectly given this file's documented UI-reachability constraint (viafocus-manifest.ts→apps/gittensory-ui/src/lib/registration-workspace.ts) — clean.npm run test:coveragelocally — ran the new engine file's coverage in isolation against every existing consumer test (test/unit/path-matchers.test.ts,changed-files-classify.test.ts,finding-category-classify.test.ts,review-effort.test.ts): 100% statements/branches/functions/lines onpackages/gittensory-engine/src/signals/path-matchers.ts. Also ran the full downstream surface (those four plus everyfocus-manifest*suite, 739 tests total) to confirm the shim conversion is fully transparent — all pass unmodified, per the issue's explicit "existing test coverage passes unmodified" deliverable. Did not run the full unshardednpm run test:coverage(this dev machine is shared with several other concurrent contributor sessions and a full run does not complete in reasonable time).npm run test:workers— not run; no Cloudflare Worker code touched.npm run build:mcp/npm run test:mcp-pack/ miner-pack equivalents — not run directly, butnpm --workspace @jsonbored/gittensory-engine run buildwas run locally to produce a freshdist/and re-verify the tests against the compiled package; it succeeds.test:mcp-pack/test:miner-packthemselves fail on this Windows machine for an unrelated, pre-existing reason (spawnSync("npm", ...)needsshell:trueon Windows; reproduces identically on a cleanmaincheckout).npm run engine-parity:drift-check— ran directly: the new engine file is correctly recognized as backing a valid thin re-export shim (not flagged). The check's only reported failures are two pre-existing, unrelated files (signals/check-summary.ts,signals/test-evidence.ts) that are themselves false positives from this Windows machine's CRLF checkout tripping a\r-handling gap in the checker's own shim-detection regex (.replace(/\/\/.*$/, "")—.doesn't match\rwithout thesflag, so a trailing\rblocks the match) — confirmed by re-running the same comparison with line endings normalized to LF (matching real Linux CI), which reports zero failures.npm run docs:drift-check— clean, unaffected.npm run ui:openapi:check/ui:lint/ui:build— not run; no OpenAPI/UI-behavior changes (ui:typecheck was run directly, see above).npm audit --audit-level=moderate— not run; no dependency changes.path-matchers.test.tssuite (already comprehensive: generated/vendored/lockfile/minified/docs/config/dependency-manifest classification, path normalization, defensive null handling, and a perf benchmark) is the coverage, and it passes unmodified against the moved implementation exactly as the issue requires.If any required check was skipped, explain why:
mainWindows-local environment issues (CRLF checkout,npm pack'sspawnSyncWindows incompatibility) that do not reflect real CI behavior (GitHub Actions runs on Linux with an LF checkout, and a dedicated CI step already builds@jsonbored/gittensory-enginebeforetest:coverageruns).Safety
ui:typecheckthat the UI's reachability path to this module still compiles).UI Evidence
Not applicable; pure internal code move, no UI behavior change.
Notes