Skip to content

extdeps/python: PEP 440 version identification model - #5307

Merged
briansrls merged 8 commits into
mainfrom
session/clever-seal-76-pep440
Jun 19, 2026
Merged

briansrls merged 8 commits into
mainfrom
session/clever-seal-76-pep440

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

  • Add dsl/extdeps/version/pep440.dag modeling PEP 440 public/local version structure (epoch, release segments, pre/post/dev suffixes, local labels) distinct from std.types.SemVer.
  • Provide canonical wire label functions and version-specifier clause rendering.
  • Add python_pep440_version_witness_test.dag with by-execution witnesses (final, alpha, epoch, post, dev, local, specifier clauses).

Merge order (operator-visible — sequential with #5309)

DRAFT until #5309 merges. This PR and #5309 both edit dsl/std/realization_width.dag + witness file. Even a textual auto-merge can be semantically skewed (PR CI tests each branch, not the merged tree).

Primary: merge #5309 (Cargo SemVer) first.
Then: rebase this branch onto updated main, re-run CI green, flip to ready-for-review.

Do not merge #5307 and #5309 simultaneously.

Test plan

  • gunbc run --source-root dsl --entry dsl/test/claim/python_pep440_version_witness_test.dag --function python_pep440_version_witnesses --claim-run → true

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Review item 1 (length(local: v.local) at line 154): valid on reviewed SHA, fixed.

The finding was correct for 758251f759 — length(local: …) is not a defined free function in dsl/ (list sizing is receiver dispatch: .length() or count(xs:)).

Addressed in follow-up commits on this branch:

  • 96155456b1 removed the invalid call (interim count(xs: v.local))
  • latest HEAD switches to v.local.length() == 0, matching dsl/std/realization_schedule.dag and peers

Witness corpus re-run green:
gunbc run --source-root dsl --entry dsl/test/claim/python_pep440_version_witness_test.dag --function python_pep440_version_witnesses --claim-run → true

— sent from clever-seal-76

@briansrls
briansrls force-pushed the session/clever-seal-76-pep440 branch from ec37783 to 37fcb25 Compare June 19, 2026 18:49
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Review item 1 (release-segment zero-padding): valid on reviewed SHA 5b2ac08, already fixed on current HEAD fee898ebf5.

pep440_compare_release_rest now zero-pads shorter release tails before comparison (PEP 440 / PyPA ordering): when one side is exhausted, implicit 0 segments are consumed from the longer side until both are empty or a non-zero mismatch is found.

Witness added: w_release_segments_zero_pad_equal asserts 1 vs 1.0 compares Equal.

Re-run green:
gunbc run --source-root dsl --entry dsl/test/claim/python_pep440_version_witness_test.dag --function python_pep440_version_witnesses --claim-run → true

— sent from clever-seal-76

@gunbai-bot
gunbai-bot Bot marked this pull request as draft June 19, 2026 19:47
@briansrls
briansrls force-pushed the session/clever-seal-76-pep440 branch from 2b7bc8e to 32cfc8f Compare June 19, 2026 19:52
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 19, 2026 19:53
@gunbai-bot
gunbai-bot Bot marked this pull request as draft June 19, 2026 19:53
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 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Intentionally DRAFT — not abandoned.

Blocked on #5309 merge (operator-visible sequential gate): both PRs edit realization_width.dag; #5309 is primary per manager/zesty-lark directive.

After #5309 lands: rebase → CI green → gh pr ready 5307. Do not flip ready against stale main while #5309 is still open.

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/clever-seal-76-pep440 branch from 3a7a846 to 8ffb55b Compare June 19, 2026 20:55
@gunbai-bot gunbai-bot Bot mentioned this pull request Jun 19, 2026
6 tasks
briansrls and others added 8 commits June 19, 2026 21:47
Decompose public/local version segments per PEP 440 (not std SemVer), add canonical wire labels and claim witnesses executed green.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use count(xs:) instead of undefined length(); discriminate 1.0a1 vs 1.0a2 on the numeric suffix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the invalid length(local:) free-function call with list .length(), matching realization_schedule.dag peers.

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

Model PEP 440 N(.N)* as Pep440ReleaseSegments { first, rest } so empty release cannot be constructed; witnesses call record constructors directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebase onto main, wire VersionIdentity/VersionConstraint/VersionScheme projections, add structural compare on public carriers, and update witness imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compare release→pre→post→dev per cited suffix order (with bare-dev tier), remove asymmetric pep440_scheme.compare placeholder, and add discriminating ordering witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Per PyPA ordering, 1 and 1.0 compare equal; witness added. Addresses cursor RC on release padding.

Co-authored-by: Cursor <cursoragent@cursor.com>
PEP 440 specifier wire text (>= 3.11) — not a bare version identity.
Witnessed in python_pep440_version_witness_test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 19, 2026 21:48
@briansrls
briansrls force-pushed the session/clever-seal-76-pep440 branch from 8ffb55b to b95a310 Compare June 19, 2026 21:48
@briansrls
briansrls merged commit 8556e9e into main Jun 19, 2026
1 check passed
@briansrls
briansrls deleted the session/clever-seal-76-pep440 branch June 19, 2026 22:36
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