Skip to content

Six dependency sources

source on a binding says where the selected bytes came from. Six values, and the set is closed.

Source The bytes come from
foundation A component already in the foundation's component store
project_prepared A component prepared at project scope from runtime.xratu requirements
project_system A system binding admitted from runtime.xratu apt
closure_local A component built for this closure alone
provider_runtime The runtime provider, which is where CPython and its standard library live
host_system_abi The host ABI the foundation was built against

The first four are selections the resolver makes among candidates. The last two are substrate facts a binding records rather than choices between alternatives.

The order candidates are preferred in

Candidates that satisfy the requirement are ranked, and the first is selected. The ranking has three levels, applied in order:

  1. A compatible foundation component wins. Foundation candidates rank ahead of everything else.
  2. Then the source's own preference rank, lower first, as declared in the approved source set.
  3. Then the highest version.
foundation_rank = 0 if candidate["source"] == "foundation" else 1
return (
    foundation_rank,
    candidate["source_preference_rank"],
    tuple(-part for part in version.release),
)

The selected candidate's reason code records which level decided it: compatible_foundation_preferred when the foundation won, and highest_precedence_compatible_candidate otherwise.

The foundation ranks first so that bytes already inventoried, signed and provenance-bound on it are reused instead of fetched and rebuilt. A project gets that reuse without any block naming the foundation, because the preference lives in the ranking rather than in a declaration.

Absence from the foundation is ordinary

A requirement the foundation does not carry resolves like any other. The resolver prefers a compatible foundation component and otherwise resolves, fetches and builds one from the approved sources.

Build refusal is reserved for substantive failure: no matching version, an unreachable or forbidden source, an unsatisfiable platform, ABI or native closure, an ambiguous or conflicting result, a failed fetch or build, or failed inventory and provenance verification. Absence from the foundation is never itself a refusal.

Where each source shows up in a cell

foundation, project_prepared and closure_local bindings become component mounts and, for Python distributions, import roots in the cell's environment view. project_system bindings become loader roots in the native loader view and stay out of Python import authority. provider_runtime is the interpreter the cell already runs, and host_system_abi is the ABI the whole closure was checked against.

See Cell environment view and Native loader view.

The source is not the authority

Where bytes came from and whose declaration authorised them are separate facts. A component prepared at project scope still reaches only the blocks that declared a compatible requirement. See Requirement scope and binding source.