[ENG-4061] Scan component scripts for imports and bound unproven flows - #309
Merged
Merged
Conversation
Vue, Svelte and Astro single-file components are now part of the import inventory: their script blocks and Astro frontmatter are scanned for imports, a component whose script cannot be delimited counts as an unscannable file, and a skipped directory that holds components counts as holding source. Components are scanned for imports only, which the coverage notes now say. Unproven flows grow with inputs times sinks, so an endpoint keeps at most 200 of them and a map at most 1000. Proven flows are always kept. An endpoint that left flows out is marked flowsTruncated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Adds component import scanning and unproven flow bounding with solid testing. 🎯 Quality: 100% Elite · 📦 Size: Large — consider splitting if possible 📈 This month: Your 160th PR — above team average · Averaging Excellent |
daniloradovic
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs ENG-4061
Single-file components are in the import inventory
.vue,.svelteand.astrofiles were not walked at all, so their imports were missing whilecoverage.importsCompletestayedtrue. Now:<script>block and Astro---frontmatter is scanned for imports, with lines reported in the component file;<script>or frontmatter fence) counts inimportCoverageGaps.unscannableFiles, and a computed import in one counts inunresolvableImports. Either makes the inventory incomplete;Unproven flows are bounded
Unproven flows (anything other than
exact-local/transformed-local) pair every input with every sink, so a wide endpoint could produce tens of thousands of them.flowsTruncated: true, and a coverage note says how many endpoints were affected. The field is only emitted when something was left out.For example, a 300-field × 300-sink handler now maps to about 0.15 MB, down from about 56 MB.
Validation: full suite (3,450 passed, 7 skipped), typecheck, build. New regression tests fail on
main, and each rule has its own test.🤖 Generated with Claude Code