Skip to main content
← Back to list
01Issue
FeatureShippedPlatformPublic
Assigneeszack

Relationships

#4888 Scorecard scanCode: scan each code module once with the extension-scoring FromSites functions

Opened by zack · 11/18/2026· Shipped 11/18/2026

What

Once the extension-scoring package from swamp-club#4874 is published, switch scanCode in lib/infrastructure/extension-tarball-analyzer.ts to scan each code module once, and bump the @swamp-club/extension-scoring pin (currently 0.20261027.5).

Today scanCode calls markdownImports(file.path, content) and then, within the read caps, writtenSpecifiers(content, file.path). Each call parses the module with Babel and walks it. The package now exports:

  • importedSpecifiersAt(source, { path }) from @swamp-club/extension-scoring/source, which returns the module's import sites, or null when it does not parse
  • markdownImportsFromSites(path, sites) from @swamp-club/extension-scoring/secret-docs
  • writtenSpecifiersFromSites(sites, sourceFile) from @swamp-club/extension-scoring/dependency-audit, which returns null for null sites, exactly as writtenSpecifiers does

So the loop becomes: const sites = importedSpecifiersAt(content, { path: file.path }), then Markdown imports from sites for every module, and written specifiers from the same sites for modules within the caps. A null result still goes to unreadableModules.

Expected effect

Measured on @swamp/aws/ec2@2026.11.18.1 (253 code files, 142M chars), with identical results:

  • pinned package, current loop: 14.3s per scan
  • new package, current loop: 8.7s (the pruned AST walk alone)
  • new package, one scan per module: 6.3s

Verification

tests/integration/extension_scoring_vectors_test.ts passes against the new package (167 tests, run locally against the swamp-club#4874 branch). Re-run it after the pin bump, together with the archive worker tests.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 9 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

11/18/2026, 10:00:55 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/18/2026, 9:07:07 PM

Sign in to post a ripple.