Export completed Cargo dependency graphs as offline inputs #193

Open
opened 2026-10-24 13:02:29 +02:00 by erikinkinen · 1 comment
Owner

Problem and motivation

The offline source bundle and generated locks do not describe Cargo's resolved packages, targets, features or dependency edges. That information currently remains in host-specific metadata from the completing Cargo operation.

Proposed behavior and scope

Keep the final metadata graph in its completing owner and export portable source coordinates through version 3 of the existing build inventory. Preserve every package, declared target and feature, active resolve edge, workspace member and selected lock. Record the configuration actually resolved; other feature and target configurations remain separate work.

Authority, security and reliability

Export must borrow the original Cargo and source owners. Reports and copied views cannot recreate them. Bind paths and package references to the exact selected source roles and Git objects, preserving distinct owners even when repository URLs match. Require explicit work and time budgets, retain the first failure, and retire held descriptors once. Export and offline admission run no Cargo, Git, compiler, network access or build recipe.

Acceptance criteria

  • Register the graph only after the real final Cargo operation and source checks; reject foreign or premature completion views.
  • Preserve complete observed package, target, feature, dependency, resolve and workspace data with checked reference closure.
  • Map known paths and opaque package IDs to original role and manifest coordinates; reject escaping, missing and ambiguous bindings.
  • Add strict inventory version 3 support across current consumers, retaining versions 1 and 2 and deeply immutable selections.
  • Preserve bounded evidence reads, original errors and once-only cleanup without producer replay or cache transport.
  • Add a real pipeline round trip and graph, path, schema, role and cleanup controls; update component and technical documentation.

Alternatives and tradeoffs

Re-running Cargo during admission requires a separately admitted tool and source-object transport. Copying its cache would hide those inputs. A portable graph preserves the existing result without claiming that upstream Cargo can already consume the bundle. Unknown semantic fields need explicit support rather than silent omission; authored metadata stays descriptive data.

Tracking and rollout

Extends source bundles and generated locks. Tracked by Phase 6 completion. Native Cargo source transport, toolchains and the full guest builds remain separate requirements.

## Problem and motivation The offline source bundle and generated locks do not describe Cargo's resolved packages, targets, features or dependency edges. That information currently remains in host-specific metadata from the completing Cargo operation. ## Proposed behavior and scope Keep the final metadata graph in its completing owner and export portable source coordinates through version 3 of the existing build inventory. Preserve every package, declared target and feature, active resolve edge, workspace member and selected lock. Record the configuration actually resolved; other feature and target configurations remain separate work. ## Authority, security and reliability Export must borrow the original Cargo and source owners. Reports and copied views cannot recreate them. Bind paths and package references to the exact selected source roles and Git objects, preserving distinct owners even when repository URLs match. Require explicit work and time budgets, retain the first failure, and retire held descriptors once. Export and offline admission run no Cargo, Git, compiler, network access or build recipe. ## Acceptance criteria - [ ] Register the graph only after the real final Cargo operation and source checks; reject foreign or premature completion views. - [ ] Preserve complete observed package, target, feature, dependency, resolve and workspace data with checked reference closure. - [ ] Map known paths and opaque package IDs to original role and manifest coordinates; reject escaping, missing and ambiguous bindings. - [ ] Add strict inventory version 3 support across current consumers, retaining versions 1 and 2 and deeply immutable selections. - [ ] Preserve bounded evidence reads, original errors and once-only cleanup without producer replay or cache transport. - [ ] Add a real pipeline round trip and graph, path, schema, role and cleanup controls; update component and technical documentation. ## Alternatives and tradeoffs Re-running Cargo during admission requires a separately admitted tool and source-object transport. Copying its cache would hide those inputs. A portable graph preserves the existing result without claiming that upstream Cargo can already consume the bundle. Unknown semantic fields need explicit support rather than silent omission; authored metadata stays descriptive data. ## Tracking and rollout Extends [source bundles](https://git.erikinkinen.fi/erix/integration/issues/191) and [generated locks](https://git.erikinkinen.fi/erix/integration/issues/192). Tracked by [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). Native Cargo source transport, toolchains and the full guest builds remain separate requirements.
Author
Owner

Implemented locally in signed checkpoints 3a466580 (Integration) and 800211f0 (manual). The completed graph retains original source-role bindings, preserves supported Cargo semantics and shares the generated-lock inventory. Contained path traversal now follows literal links before processing ... Coherent publication is pending.

Original object transport is the next step toward fresh offline Git and Cargo consumption.

Implemented locally in signed checkpoints `3a466580` (Integration) and `800211f0` (manual). The completed graph retains original source-role bindings, preserves supported Cargo semantics and shares the generated-lock inventory. Contained path traversal now follows literal links before processing `..`. Coherent publication is pending. [Original object transport](https://git.erikinkinen.fi/erix/integration/issues/194) is the next step toward fresh offline Git and Cargo consumption.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:22 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#193
No description provided.