[FEATURE] Track main in Cargo and resolve CI feature branches explicitly #142

Open
opened 2026-10-16 15:57:05 +02:00 by erikinkinen · 7 comments
Owner

Problem and motivation

Cargo manifests currently select dependency commits with rev. The required
workflow is to track main in those declarations and let CI use matching feature
branches. Source resolution must support that workflow while preserving the
original Git objects and a reproducible record of what Cargo actually consumed.

Proposed behavior and scope

Use canonical EriX Git URLs with branch = "main" in Cargo manifests. Standalone
CI receives an explicit branch context, selects the matching feature branch when
present, and otherwise selects main. Resolve each repository once for the
complete dependency graph and freeze its actual commit before building.

Integration catalogs and retained build inputs continue to select exact commits.
Offline catalog builds must use those selections without consulting branches.

Authority, security and reliability

Keep repository URLs, branch context, Git environment and network operations
explicit. An authenticated absence response permits the fallback to main;
transport, authentication and malformed-response failures must stop resolution.
Mirrors must retain the selected original objects and exact package identities.
Uncertain or partial lock updates must retain their failure evidence.

Acceptance criteria

  • Enforce canonical main declarations throughout the Cargo dependency closure,
    including optional, development, build, target and workspace dependencies.
  • Cover matching feature branches, positive absence, malformed or duplicate
    refs, transport failures and moving branches; freeze one selection per URL.
  • Verify exact original commits and mirror refs, and reject conflicting
    repository selections or substituted package identities.
  • Exercise genuine offline Cargo metadata and lock generation. Preserve
    existing locks unless an explicit generated-checkout refresh is selected.
  • Adopt the resolver, explicit branch context and main declarations across
    affected repositories while preserving exact Integration catalog inputs.
  • Update shared policies, component documentation and the technical manual;
    remove superseded commit-only declaration checks and pass affected CI suites.

Alternatives and tradeoffs

Commit selections remain useful in catalogs and build records. Keeping them in
Cargo declarations would retain the current conflict with the requested branch
workflow. Branch discovery adds a network step to standalone CI, so its selected
commits must be recorded and reused throughout that build.

Tracking and rollout

Publish the shared resolver first, then migrate declarations and CI consumers in
dependency order, followed by coherent catalog selections and shared policies.
Keep the identity protections covered by #17
and fix the fixture assumptions tracked by #21.
Coordinate catalog and helper adoption with #68
and #105.
Track the work alongside #1
and phase completion.

## Problem and motivation Cargo manifests currently select dependency commits with `rev`. The required workflow is to track `main` in those declarations and let CI use matching feature branches. Source resolution must support that workflow while preserving the original Git objects and a reproducible record of what Cargo actually consumed. ## Proposed behavior and scope Use canonical EriX Git URLs with `branch = "main"` in Cargo manifests. Standalone CI receives an explicit branch context, selects the matching feature branch when present, and otherwise selects `main`. Resolve each repository once for the complete dependency graph and freeze its actual commit before building. Integration catalogs and retained build inputs continue to select exact commits. Offline catalog builds must use those selections without consulting branches. ## Authority, security and reliability Keep repository URLs, branch context, Git environment and network operations explicit. An authenticated absence response permits the fallback to `main`; transport, authentication and malformed-response failures must stop resolution. Mirrors must retain the selected original objects and exact package identities. Uncertain or partial lock updates must retain their failure evidence. ## Acceptance criteria - [x] Enforce canonical main declarations throughout the Cargo dependency closure, including optional, development, build, target and workspace dependencies. - [x] Cover matching feature branches, positive absence, malformed or duplicate refs, transport failures and moving branches; freeze one selection per URL. - [x] Verify exact original commits and mirror refs, and reject conflicting repository selections or substituted package identities. - [x] Exercise genuine offline Cargo metadata and lock generation. Preserve existing locks unless an explicit generated-checkout refresh is selected. - [x] Adopt the resolver, explicit branch context and main declarations across affected repositories while preserving exact Integration catalog inputs. - [ ] Update shared policies, component documentation and the technical manual; remove superseded commit-only declaration checks and pass affected CI suites. ## Alternatives and tradeoffs Commit selections remain useful in catalogs and build records. Keeping them in Cargo declarations would retain the current conflict with the requested branch workflow. Branch discovery adds a network step to standalone CI, so its selected commits must be recorded and reused throughout that build. ## Tracking and rollout Publish the shared resolver first, then migrate declarations and CI consumers in dependency order, followed by coherent catalog selections and shared policies. Keep the identity protections covered by [#17](https://git.erikinkinen.fi/erix/integration/issues/17) and fix the fixture assumptions tracked by [#21](https://git.erikinkinen.fi/erix/integration/issues/21). Coordinate catalog and helper adoption with [#68](https://git.erikinkinen.fi/erix/integration/issues/68) and [#105](https://git.erikinkinen.fi/erix/integration/issues/105). Track the work alongside [#1](https://git.erikinkinen.fi/erix/integration/issues/1) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65).
Author
Owner

The declaration parser, explicit branch selector and object-file reader now pass all 39 focused tests. These include genuine local Git queries and controls for implicit alternates, symlinks, changed bytes, replaced directories and descriptor cleanup.

I’m wiring these helpers into Cargo setup. Checkout bytes will be compared with verified original blobs without reading the source repository’s local configuration or trusting its index. Real Cargo source identities, lock refresh and the coherent manifest/workflow rollout remain open.

The declaration parser, explicit branch selector and object-file reader now pass all 39 focused tests. These include genuine local Git queries and controls for implicit alternates, symlinks, changed bytes, replaced directories and descriptor cleanup. I’m wiring these helpers into Cargo setup. Checkout bytes will be compared with verified original blobs without reading the source repository’s local configuration or trusting its index. Real Cargo source identities, lock refresh and the coherent manifest/workflow rollout remain open.
Author
Owner

The main-branch migration remains private. The resumed materialization tests pass, but the real Cargo test found a missing transport path for a dependency used only as a Git submodule. The file-only policy correctly refuses the HTTPS fetch. I am extending the transport closure to those exact gitlink commits while preserving their original URLs, Git objects and Cargo source identities.

The main-branch migration remains private. The resumed materialization tests pass, but the real Cargo test found a missing transport path for a dependency used only as a Git submodule. The file-only policy correctly refuses the HTTPS fetch. I am extending the transport closure to those exact gitlink commits while preserving their original URLs, Git objects and Cargo source identities.
Author
Owner

The new Cargo consumers and catalog handling pass 39 focused checks, including original Git submodules, generated workspaces, first-lock creation and Python/Bash consumers. Both consumer routes now place warning denial after their explicit flags; the regression checks confirm that an earlier -A warnings cannot suppress an actual compiler warning.

The fleet rollout is still in progress. Bootloader and host-fixture consumers, the two Cargo-generated maintained locks and the final policy/workflow composition remain open.

The new Cargo consumers and catalog handling pass 39 focused checks, including original Git submodules, generated workspaces, first-lock creation and Python/Bash consumers. Both consumer routes now place warning denial after their explicit flags; the regression checks confirm that an earlier `-A warnings` cannot suppress an actual compiler warning. The fleet rollout is still in progress. Bootloader and host-fixture consumers, the two Cargo-generated maintained locks and the final policy/workflow composition remain open.
Author
Owner

The resolver and dependency migration are pushed across all 76 repositories. All 271 cross-repository Cargo declarations use branch = "main"; standalone CI resolves matching feature branches once and retains the selected original Git objects. Catalog builds still select exact commits. Cargo generated both maintained lockfiles offline, and the shared policies and manual now describe the same workflow.

The focused resolver checks and all 261 Docs tests pass. Affected CI runs are still being checked, so the final acceptance item remains open.

The resolver and dependency migration are pushed across all 76 repositories. All 271 cross-repository Cargo declarations use `branch = "main"`; standalone CI resolves matching feature branches once and retains the selected original Git objects. Catalog builds still select exact commits. Cargo generated both maintained lockfiles offline, and the shared policies and manual now describe the same workflow. The focused resolver checks and all 261 Docs tests pass. Affected CI runs are still being checked, so the final acceptance item remains open.
Author
Owner

Published the reconciled catalogs in b59c6cbc, selecting the signed component revisions and both genuinely regenerated main-branch Cargo locks. Catalog membership remains 76/73/15; the selected Integration helper stays at the published 74d8e383 source.

Published the reconciled catalogs in [`b59c6cbc`](https://git.erikinkinen.fi/erix/integration/commit/b59c6cbc1afa337bf93ed6275b390c44435d7867), selecting the signed component revisions and both genuinely regenerated main-branch Cargo locks. Catalog membership remains 76/73/15; the selected Integration helper stays at the published `74d8e383` source.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:18 +01:00
Author
Owner

The immutable-catalog path already uses owned original Git objects and real offline Cargo. The next change will expose that choice explicitly through the ordinary preparation/consumer interface and correct its source attribution. Standalone CI keeps its matching-feature-branch/main rules.

In catalog mode, authored dependencies still say branch = "main", but the selected source is the exact catalog commit. Cargo’s private transport ref is an implementation detail, not an observation of upstream main. The descriptor and metadata checks must retain those distinctions. Catalog resolution must not consult mutable branches. An independently observed upstream main without Cargo.toml stays a non-package; it cannot be relabelled as the selected provider.

Acceptance will use actual Git repositories with empty upstream mains and a selected two-package dependency graph. Real offline metadata, lock generation and a consumer build must use the selected original objects without rewriting authored manifests. Changed or mixed sources, foreign owners, unexpected transport refs and altered descriptors must refuse. The existing empty-main rejection remains covered independently. No path-only matrix or saved status/hash record becomes compiler origin.

The immutable-catalog path already uses owned original Git objects and real offline Cargo. The next change will expose that choice explicitly through the ordinary preparation/consumer interface and correct its source attribution. Standalone CI keeps its matching-feature-branch/main rules. In catalog mode, authored dependencies still say `branch = "main"`, but the selected source is the exact catalog commit. Cargo’s private transport ref is an implementation detail, not an observation of upstream `main`. The descriptor and metadata checks must retain those distinctions. Catalog resolution must not consult mutable branches. An independently observed upstream main without `Cargo.toml` stays a non-package; it cannot be relabelled as the selected provider. Acceptance will use actual Git repositories with empty upstream mains and a selected two-package dependency graph. Real offline metadata, lock generation and a consumer build must use the selected original objects without rewriting authored manifests. Changed or mixed sources, foreign owners, unexpected transport refs and altered descriptors must refuse. The existing empty-main rejection remains covered independently. No path-only matrix or saved status/hash record becomes compiler origin.
Author
Owner

Catalog-backed preparation is implemented in #341. Explicit provider mode resolves selected commits and their transitive dependencies through the retained Git owners and offline Cargo, while authored dependencies keep main. Private transport aliases are distinguished from upstream branch observations.

Python and Bash commands both bind the selected manifest and locked graph. The retained Python API keeps the original source pipeline and registered metadata through compilation. Native compiler-origin acceptance and in-EriX execution remain open.

Catalog-backed preparation is implemented in [#341](https://git.erikinkinen.fi/erix/integration/pulls/341). Explicit provider mode resolves selected commits and their transitive dependencies through the retained Git owners and offline Cargo, while authored dependencies keep `main`. Private transport aliases are distinguished from upstream branch observations. Python and Bash commands both bind the selected manifest and locked graph. The retained Python API keeps the original source pipeline and registered metadata through compilation. Native compiler-origin acceptance and in-EriX execution remain open.
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#142
No description provided.