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
{{ message }}
Repository navigation
Tracking: dispatch vendored backends through one per-ecosystem table instead of string matches in core and the CLI #959
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: tracking. Source: review §2.1, Part 5.2 and 5.8; register E21.
Problem (verified on 9c43dfc)
Vendored mode has no backend abstraction. The eight vendor ecosystems are a string vocabulary that is re-matched wherever a per-ecosystem decision is made, and backends are uniform only by naming convention (service_preflight, vendor_*, revert_*_opts, vendored_entry_in_use). Production sites that enumerate the ecosystems include:
The lists drift.#832 (NuGet and Maven) and #958 (Hatch) are both a per-ecosystem fact ("which files carry my references") kept in a table apart from the backend that writes those files.
Target design
One per-ecosystem dispatch point in core, keyed by the existing Ecosystem enum (minus Deno). The CLI and the core helpers ask it instead of matching strings:
This is an enum with match arms that call the existing backend functions, not a trait object: async dispatch stays static, and each step is mechanical. Part 5.8's batched plan/materialize trait is the later step, after the revert engine (E24) and the batched planners (E27).
Per-ecosystem helpers become methods: leaf_to_purl, the redownload and recover arms, PRESTAGED_ECOSYSTEMS. ECOSYSTEM_DIRS and the in-memory ECOSYSTEMS derive from ALL.
Stop re-tagging JVM entries as "jvm" for new ledgers, and keep reading the alias at load (of_entry), with legacy-ledger fixtures.
Acceptance (for the tracking issue)
No production match on a vendor ecosystem string outside vendor/backend.rs and the ledger-load adapter. Enforce it with a source-scan architecture test like crawlers::architecture_tests.
The legacy-ledgers fixtures and the e2e_vendor_* suites stay green at every step.
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: tracking. Source: review §2.1, Part 5.2 and 5.8; register E21.
Problem (verified on
9c43dfc)Vendored mode has no backend abstraction. The eight vendor ecosystems are a string vocabulary that is re-matched wherever a per-ecosystem decision is made, and backends are uniform only by naming convention (
service_preflight,vendor_*,revert_*_opts,vendored_entry_in_use). Production sites that enumerate the ecosystems include:path.rsECOSYSTEM_DIRS;leaf_to_purl(8 arms);vendor::service_preflight(7 arms; gem alone takessource_path, pypi two caches);redownload.rsandlock_inventory/recover.rs;``prestage.rsPRESTAGED_ECOSYSTEMS;ledger_snapshots.rsWHOLE_FILE_KINDS;VENDORED_WRITES_UNMARKED;hosted/memory/types.rsECOSYSTEMS.commands/vendor.rs#L130-L297):SERVICE_ECOSYSTEMSlist (its refusal can never fire, Replace the single-variant vendor PackageSource with &Path and delete the scaffolding it props up #800);vend!/vend_installed!macros;Ecosystem identity has an alias. JVM entries are re-tagged
"jvm"(maven_repo.rs#L1344). That forces"maven" | "jvm"handling at the CLI revert match, inpath.rs#L92and inredownload.rs#L71-L88.The lists drift. #832 (NuGet and Maven) and #958 (Hatch) are both a per-ecosystem fact ("which files carry my references") kept in a table apart from the backend that writes those files.
Target design
One per-ecosystem dispatch point in core, keyed by the existing
Ecosystemenum (minus Deno). The CLI and the core helpers ask it instead of matching strings:This is an enum with
matcharms that call the existing backend functions, not a trait object: async dispatch stays static, and each step is mechanical. Part 5.8's batchedplan/materializetrait is the later step, after the revert engine (E24) and the batched planners (E27).Checklist (one PR each, in order)
VendorBackendenum withALL/dir/of_entry, and route revert and in-use dispatch through it. This deletes the two CLI matches and the CLI's"maven" | "jvm"arm.service_preflightthroughVendorBackend::{vendor, preflight}, normalizing the backend signatures (oneVendorCallargument struct). Deletevend!,vend_installed!and thevendor::service_preflightmatch. Blocked by Replace the single-variant vendor PackageSource with &Path and delete the scaffolding it props up #800, which removesPackageSource,vend_installed!andSERVICE_ECOSYSTEMS.leaf_to_purl, theredownloadandrecoverarms,PRESTAGED_ECOSYSTEMS.ECOSYSTEM_DIRSand the in-memoryECOSYSTEMSderive fromALL.wiring_files()per backend replaces the registry'sVENDORED/VENDORED_WRITES_UNMARKEDsplit for the reference scan (after Vendored-reference scan never sees NuGet or Maven wiring, so the orphan sweep deletes a still-wired unit #832 and Vendored-reference scan never reads hatch.toml, so the orphan sweep deletes a wheel that a Hatch environment still installs #958)."jvm"for new ledgers, and keep reading the alias at load (of_entry), with legacy-ledger fixtures.Acceptance (for the tracking issue)
matchon a vendor ecosystem string outsidevendor/backend.rsand the ledger-load adapter. Enforce it with a source-scan architecture test likecrawlers::architecture_tests.legacy-ledgersfixtures and thee2e_vendor_*suites stay green at every step.Dependencies
Npmarm), Share the single-lock wire and revert envelope across the Poetry, PDM and Pipenv vendored backends #937 (the PyPI envelope inside thePypiarm), Stage prebuilt service archives through one shared helper instead of four per-backend service-copy pipelines #906 (the service-copy pipeline), Move canonicalize_pypi_name and the PEP 508 name scanner out of crawlers and vendor into one PyPI name module #883 and --ecosystems rejectsNPMandnpm, pypi, which socket.yml patches.ecosystems accepts: the ecosystem name parser is written three times #773 (whereEcosystemlives).