You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(metadata): prevent framework misclassification in codebase detection (#96)
* fix(metadata): prevent framework misclassification in codebase detection
Fixes false-positive framework claims on generic Node repos by:
- Adding framework.indicators to FrameworkInfo (evidence signals per claim)
- Adding dep guards to Next.js and React analyzers (framework only if core dep present)
- Adding indicator collection to Angular analyzer (inside existing guard)
- Enforcing >=3 indicator threshold in indexer.mergeMetadata() before promoting claims
These changes prevent repos without react/nextjs/@angular/core dependencies from
being incorrectly flagged with a framework type. Framework claims now require
enumerated evidence signals that demonstrate genuine framework presence.
Tests: 21/21 passing (4 new negative tests, 2 indicator assertions, 4 merge E2E)
* fix: resolve PR #96 P1 regressions and add debug logging
This commit fixes two critical P1 regressions in framework detection:
**React regression**: Plain JS React apps (CRA/Vite without TypeScript) produce only
2 indicators (dep:react, dep:react-dom) below the MIN_INDICATORS=3 threshold. Added two
disk-based checks (disk:src-directory, disk:public-index-html) to bring them to 3.
**Angular regression**: Angular library projects declare @angular/core in peerDependencies
only (not in dependencies/devDependencies). Added peerDependencies to the allDeps merge,
and added disk:ng-package-json indicator to identify library projects.
**Debug logging**: selectFramework() now logs when framework claims are dropped below
threshold, aiding production diagnosis.
**Tests added**:
- Plain JS React: react + react-dom + src directory → framework detected
- Angular library: @angular/core in peerDependencies + ng-package.json → framework detected
All 449 tests passing (2 new). TypeScript: clean.
0 commit comments