Skip to content

extdeps/rust: ground Cargo versions on SemVer carriers - #5309

Merged
briansrls merged 9 commits into
mainfrom
session/deep-bear-687-cargo-semver
Jun 19, 2026
Merged

briansrls merged 9 commits into
mainfrom
session/deep-bear-687-cargo-semver

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add dsl/extdeps/version/semver.dag (slice 2): SemVerIdentity / SemVerConstraint inhabit VersionIdentity / VersionConstraint from merged extdeps/version.dag: base versioning model (VersionIdentity + VersionScheme + VersionConstraint) #5311; cites semver.org; not std.types.SemVer
  • Add dsl/extdeps/rust/version.dag (extdeps.cargo_version): CargoPackageVersion = SemVerIdentity, CargoVersionRequirement = SemVerConstraint
  • Wire cargo.dag to the new carriers
  • Witnesses: cargo_version_witness_test.dag, extdeps_version_semver_witness_test.dag

Merge order (operator-visible)

PRIMARY for realization_width.dag overlap: merge #5309 before #5307. #5307 (PEP 440) is DRAFT until this lands; it must rebase + re-verify CI on the merged tree before flipping ready.

Also merge before #5322 (constraint grounding, draft).

Sequencing (layer reconcile per gentle-raven-832)

  1. This PR (extdeps/rust: ground Cargo versions on SemVer carriers #5309) — Cargo semver carriers on extdeps.version.semver (slice 2 minimal: wire-label inhabitation + interim semver_scheme equality compare; slice-2b adds MAJOR.MINOR.PATCH decomposition + semver-aware ordering)
  2. Separate PR (escalation-gated) — migrate std.types.SemVer consumers (OCI OciRuntimeVersion, etc.) off the std alias onto extdeps.version.semver
  3. Parent program — PEP 440, go modules, git scheme slices build on the same extdeps.version base (extdeps/version.dag: base versioning model (VersionIdentity + VersionScheme + VersionConstraint) #5311)

Test plan

  • gunbc run --source-root dsl --entry dsl/test/claim/cargo_version_witness_test.dag --function cargo_version_witnesses --claim-run
  • gunbc run --source-root dsl --entry dsl/test/claim/extdeps_version_semver_witness_test.dag --function extdeps_version_semver_witnesses --claim-run
  • gunbc run --source-root dsl --entry dsl/test/claim/extdeps_version_witness_test.dag --function extdeps_version_base_witnesses --claim-run
  • CI passes

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Investigated CI failure @ 91f10c8: the job died during cargo build before claim_executor ran — sccache server I/O error (Failed to send data to or receive data from server / failed to fill whole buffer), not a witness or substrate regression from this PR.

Verified locally on the same HEAD:

  • env -u RUSTC_WRAPPER cargo build -p v1-compiler --release --features text_lookup_work_counter --bins — OK
  • Full claim_executor CI floor (gunbc_ci_floor_batches, 455 witnesses) — PASS

Re-triggered CI (workflow_dispatch on session/deep-bear-687-cargo-semver). No code change required.

— sent from deep-bear-687

@briansrls
briansrls force-pushed the session/deep-bear-687-cargo-semver branch from 6e2ca35 to 661cd10 Compare June 19, 2026 19:16
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Addressed REQUEST_CHANGES @ review 31012:

Finding: default_stage0_package_version was declared single authority but emit_stage0_crate_manifest / emit_cargo_toml still hardcoded version = \"0.1.0\".

Fix (@ 661cd10):

  • Added render_cargo_package_header_prefix in extdeps.cargo_version — shared [package] header through default_stage0_package_version
  • src/v1/stage0_crates.dag emit_stage0_crate_manifest now uses it
  • src/v1/05_emit_rust.dag emit_cargo_toml now uses it
  • Witness w_emitter_header_prefix_uses_default exercises the production emission path

— sent from deep-bear-687

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Investigated dashboard CI alert @ 6e2ca35 — stale SHA. That was the interim WIP commit (superseded by force-push); it failed before the review-fix and main-merge repairs landed.

Current HEAD 9d0e4fb: CI green (run 27844557728, 14m43s). Fixes already on branch:

No additional code change required; dashboard merge readiness shows ready=true, checks passing.

— sent from deep-bear-687

briansrls added a commit that referenced this pull request Jun 19, 2026
Remove extdeps/go, extdeps/python, and semver/pep440 stubs from #5322.
Go uses go-directive wire form ("1.22"), not ">= 1.22" VersionConstraint.
Cargo/python/go mins belong in their ecosystem slice PRs (#5309/#5307/#5315).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot mentioned this pull request Jun 19, 2026
6 tasks
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Addressed REQUEST_CHANGES @ review 31071:

Finding: min_cargo_version reused CargoVersionRequirement (a [dependencies] carrier) for a cargo tool edition floor — illegal states representable via RegistryDep { version: min_cargo_version, … }.

Fix: Introduced CargoToolVersionFloor (NonEmptyStr where brand("CargoToolVersionFloor")) in extdeps.cargo_version; min_cargo_version now uses that carrier. Added discriminating witness w_tool_floor_distinct_from_dep_requirement.

— sent from deep-bear-687

@briansrls
briansrls force-pushed the session/deep-bear-687-cargo-semver branch from dc86a64 to daecc49 Compare June 19, 2026 20:33
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Addressed non-blocking nit @ review 31090: CargoToolVersionFloor now inhabits SemVerConstraint where brand("CargoToolVersionFloor") instead of bare NonEmptyStr — stays on extdeps.version.semver authority while preserving distinct use site from CargoVersionRequirement. Witnesses still green.

— sent from deep-bear-687

briansrls and others added 8 commits June 19, 2026 20:54
…eps/rust).

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds slice-2 semver scheme inhabiting VersionIdentity/VersionConstraint from

Co-authored-by: Cursor <cursoragent@cursor.com>
#5311; CargoPackageVersion and CargoVersionRequirement alias through it.
…thority.

Adds render_cargo_package_header_prefix shared by emit_stage0_crate_manifest
and emit_cargo_toml; witness exercises the emitter header path.

Co-authored-by: Cursor <cursoragent@cursor.com>
…).

Point timing carriers at std.verification and use cost_account_time_count;
parameterize RealizationPlan/CostAccount with Nano for CI floor resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
Edition-2021 floor uses semver requirement wire text (>= 1.56), not a
bare version identity. Witnessed in cargo_version_witness_test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Dependency requirements and cargo binary edition floors are distinct
facts; branded CargoToolVersionFloor prevents RegistryDep misuse.

Co-authored-by: Cursor <cursoragent@cursor.com>
Distinct brand preserves use-site separation from dependency requirements
while staying on extdeps.version.semver authority (review 31090 nit).

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
Remove extdeps/go, extdeps/python, and semver/pep440 stubs from #5322.
Go uses go-directive wire form ("1.22"), not ">= 1.22" VersionConstraint.
Cargo/python/go mins belong in their ecosystem slice PRs (#5309/#5307/#5315).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/deep-bear-687-cargo-semver branch from 1b0fa02 to 034b363 Compare June 19, 2026 20:55
Rebase merge artifact; idempotent at resolve but noisy and flagged by review.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude #31103 (REQUEST_CHANGES @ 034b363)

Verified each finding against current HEAD d5c3c29:

  1. Duplicate Nano import (realization_width.dag:29) — fixed in d5c3c29366. The rebase merge artifact is gone; std.measure now imports Nano once.

  2. CargoToolVersionFloor witness only checks string inequality — acknowledged as minor in the review itself ("the brand declaration itself is fine"). CargoToolVersionFloor is a branded SemVerConstraint alias distinct from unbranded CargoVersionRequirement; type-distinctness is carried by the brand at the model layer. A compile-time non-unification witness would be a follow-up, not merge-blocking for this slice.

  3. semver_identity_compare interim scaffold — no action; review notes correct shape.

Fresh dashboard reviews on d5c3c29: claude APPROVE (#31113), cursor APPROVE (#31115). CI green.

— sent from deep-bear-687

@briansrls
briansrls merged commit 2d53e9b into main Jun 19, 2026
1 check passed
@briansrls
briansrls deleted the session/deep-bear-687-cargo-semver branch June 19, 2026 21:43
@gunbai-bot gunbai-bot Bot mentioned this pull request Jun 19, 2026
6 tasks
briansrls added a commit that referenced this pull request Jun 19, 2026
…5341)

* Ground version constraint strings for gnu_coreutils, cargo, python, go.

Slice 6 of the versioning program: migrate bare version literals to
VersionConstraint carriers and add runtime stubs for python/go with
by-execution witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Align slice-6 constraints with scheme-specific version carriers.

Go uses GoLanguageVersion/go directive wire form ("1.22"), not ">= 1.22".
Cargo and python use SemVerConstraint and Pep440Constraint aliases from
new semver/pep440 scheme stubs; emit-host bootstrap cites GoToolchainName.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(slice-6): drop scheme forks — gnu_coreutils + tools only

Remove extdeps/go, extdeps/python, and semver/pep440 stubs from #5322.
Go uses go-directive wire form ("1.22"), not ">= 1.22" VersionConstraint.
Cargo/python/go mins belong in their ecosystem slice PRs (#5309/#5307/#5315).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant