1.3 KiB
1.3 KiB
Phase 2 — dependency identification and externalization
Goal
Shrink the app-authored surface by identifying vendored third-party code, recording package-match decisions, and externalizing only high-confidence matches while preserving safe fallbacks.
Scripts
scripts/identify-dependencies.jsscripts/externalize-dependencies.js
Inputs
--manifest <runs/<id>/manifest.json>--segments <runs/<id>/segments.jsonl>--bundle <bundle.js>optional- optional npm metadata, tarballs, or CDN mirrors
- optional runtime traces
Responsibilities
- score vendored candidates using static evidence first
- use runtime evidence only as a tie-breaker
- record accepted, rejected, and unresolved decisions in machine-readable manifests
- externalize accepted dependencies only
- preserve bundled fallback code so execution remains safe
Release-oriented requirements
- dependency decisions should be reusable across nearby upstream snapshots when hashes and evidence remain compatible
- dependency reports should feed the compact upstream summary for published releases
- do not block later phases on perfect package-version recovery
Verification
- verify accepted matches externalize cleanly
- verify unresolved matches stay in the bundled fallback path
- confirm dependency decisions are deterministic for the same ingest output