Mount scopes and root scopes¶
A component's scope records which declaration made it available. The scope also tells you which cells receive the same bytes and whether the component may contribute Python imports, native libraries or executables.
The three scopes¶
| Scope | Declared by | Available to | Typical contents |
|---|---|---|---|
| System baseline | The Runtime Foundation | Every cell using that foundation | Foundation libraries and executables |
| Project-wide | The project's runtime.xratu |
Every cell in the project release | Shared native packages |
| Reusable block | The block's @xratu declarations |
Cells running that block | Python packages and block-specific native packages |
A Python dependency belongs to the reusable-block scope, even when the project build prepares the component alongside other runtime dependencies. This keeps one block from gaining imports merely because a sibling block selected them.
What each scope can provide¶
System-baseline and project-wide components provide native runtime substrate.
Project-wide components appear under /xck/project-system/ in every cell for
the release. They do not become Python import roots.
Reusable-block components appear under /xck/components/ only for blocks that
declared them. A Python distribution selected by the block contributes import
roots; a block-specific native package contributes loader roots.
How XCK checks scope¶
During closure construction, XCK derives scope from the declaration that selected each component. It refuses a closure when:
- a component is attributed to a different declaration scope;
- one component is selected under two different scopes;
- a project-wide native component is presented as a Python import source;
- a loader location does not match the selected component.
These checks make dependency visibility predictable: project declarations provide common native substrate, while block declarations grant only that block's execution cells access to block-specific packages.
Diagnosing a missing dependency¶
When one block can import a package and another cannot, compare their @xratu
declarations before changing the project runtime. A reusable-block dependency
must be declared by each block that imports it. Use runtime.xratu only for
native packages that genuinely belong in every cell in the project.
Related: Cell environment view, Native loader view, and Three declaration scopes.