Skip to content

feat(frameworks): wire stage-3 config-AST evidence into detection#264

Merged
theagenticguy merged 1 commit into
mainfrom
feat/wire-framework-detection-stages
Jun 29, 2026
Merged

feat(frameworks): wire stage-3 config-AST evidence into detection#264
theagenticguy merged 1 commit into
mainfrom
feat/wire-framework-detection-stages

Conversation

@theagenticguy

Copy link
Copy Markdown
Owner

Summary

Wires framework-detection stage 3 (config-AST) into the production path. This was the documented-deferred near-miss flagged by the latent-bug sweep: inspectConfigAst (handles next.config.*, astro.config.*, vite.config.*, META-INF/spring.factories) shipped as a tested standalone module but had zero production callers — the dispatcher input couldn't carry config text, so its evidence never reached frameworksDetected.

What changed

  • FrameworkDetectorInput gains optional configText. The dispatcher runs inspectConfigAst once, groups findings by framework name, and merges them as stage-3 evidence into a detection that already hit on a manifest/layout signal.
  • Corroborates, never creates: config text alone does not conjure a detection (a repo can vendor a config without using the framework). A stage-3 finding only attaches when stages 1/4 already fired for that framework.
  • frameworks.ts pre-reads CONFIG_AST_FILES alongside manifests/lockfiles and threads configText through both entrypoints, so the profile phase picks it up with no phase-ordering change. Legacy callers that omit configText are unaffected (verified by a no-op test).

Verification

  • End-to-end: analyze on a Next.js repo now records the nextjs detection with evidence stages [1, 3, 4] — stage 3 contributing next.config present + nextjs router: app-router (previously only [1, 4]).
  • New tests: stage-3 evidence merges into nextjs; config-text-alone does not create a detection (using spring.factories, which is not a catalog file-marker); omitting configText is a no-op.
  • frameworks 92 + ingestion 638 tests green; full workspace 0 failures; biome ci clean.

Deferred: stage 5 (imports / SCIP)

Stage 5 consumes resolved IMPORTS edges, but the profile phase runs (deps: [scan]) before crossFile resolves them. Wiring it needs a phase-ordering change (run framework detection after crossFile, or add a later detection pass). Documented in the package header as the remaining step — out of scope here to avoid a DAG change in this PR.

🤖 Generated with Claude Code

Stage 3 (config-AST: next.config.*, astro.config.*, vite.config.*,
META-INF/spring.factories) shipped as a tested standalone module but reached no
detection — the dispatcher input had no way to carry config text, so
`inspectConfigAst` was never called in production and its evidence never landed
on `frameworksDetected`.

Wire it: `FrameworkDetectorInput` gains optional `configText`; the dispatcher
runs `inspectConfigAst` once, groups findings by framework name, and merges them
as stage-3 evidence into a detection that ALREADY hit on a manifest/layout
signal — config text corroborates, it never creates a detection (a repo can
carry a vendored config without using the framework). The `frameworks.ts`
wrapper pre-reads CONFIG_AST_FILES alongside manifests/lockfiles and threads
`configText` through both entrypoints, so the profile phase picks it up with no
phase-ordering change. Legacy callers that omit `configText` are unaffected.

Verified end-to-end: `analyze` on a Next.js repo now records the nextjs
detection with evidence stages [1, 3, 4] — stage 3 contributing "next.config
present" + "nextjs router: app-router" (previously only [1, 4]).

Stage 5 (imports/SCIP) stays deferred: it consumes resolved IMPORTS edges, but
the profile phase runs (deps: [scan]) before `crossFile` resolves them. Wiring
it needs a phase-ordering change; documented in the package header as the
remaining step. frameworks 92 + ingestion 638 tests green; full workspace 0 fail.
@theagenticguy theagenticguy merged commit 18e08b2 into main Jun 29, 2026
38 checks passed
@theagenticguy theagenticguy deleted the feat/wire-framework-detection-stages branch June 29, 2026 17:39
@github-actions github-actions Bot mentioned this pull request Jun 29, 2026
theagenticguy added a commit that referenced this pull request Jun 29, 2026
🤖 Automated release via release-please
---


<details><summary>root: 0.10.3</summary>

##
[0.10.3](root-v0.10.2...root-v0.10.3)
(2026-06-29)


### Features

* **frameworks:** wire stage-3 config-AST evidence into detection
([#264](#264))
([18e08b2](18e08b2))
* **pack:** context-bom read-receipt (9th BOM item) + real production
provenance
([#261](#261))
([b936af2](b936af2))


### Bug Fixes

* wire four dropped injection seams (F1–F4 from the latent-bug sweep)
([#263](#263))
([dde590e](dde590e))
</details>

<details><summary>cli: 0.10.3</summary>

##
[0.10.3](cli-v0.10.2...cli-v0.10.3)
(2026-06-29)


### Features

* **pack:** context-bom read-receipt (9th BOM item) + real production
provenance
([#261](#261))
([b936af2](b936af2))


### Bug Fixes

* wire four dropped injection seams (F1–F4 from the latent-bug sweep)
([#263](#263))
([dde590e](dde590e))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant