Skip to content

Harvest native range fixtures - #39

Merged
andrew merged 1 commit into
mainfrom
issue-36-native-range-harvest
Aug 19, 2026
Merged

Harvest native range fixtures#39
andrew merged 1 commit into
mainfrom
issue-36-native-range-harvest

Conversation

@andrew

@andrew andrew commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Harvest native range containment fixtures from npm, PyPI, RubyGems, Composer, Pub, Cargo, and Maven reference implementations.

Extend tools/harvest to regenerate the pinned fixtures and record Maven provenance. Fix the range parsing and containment differences exposed by the reference cases while preserving existing native-to-VERS rendering.

Part of #36.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the local conformance dataset by harvesting native-range containment fixtures from multiple ecosystems’ reference implementations, and updates VERS parsing/containment behavior to match the newly harvested reference cases (notably around prerelease and PEP 440 boundary handling) while keeping the existing native-to-VERS rendering stable.

Changes:

  • Extend tools/harvest to extract and generate containment-type reference fixtures (including Maven) and record them in provenance.
  • Update range containment semantics (npm/cargo prerelease admission rules; PyPI PEP 440 boundary/equality nuances) and expand native-range parsing support (npm partials/hyphens, PyPI ==/!= X.*, cargo partial upper bound handling).
  • Add large harvested fixture JSONs under testdata/local/tests/ plus extractor unit tests.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/harvest/main.go Adds containment fixture generation path, new input schema shape, and provenance tracking for multiple generated files per source.
tools/harvest/extract.go Implements native-range containment extractors for npm, PyPI, RubyGems, Composer, Pub, Cargo, and Maven.
tools/harvest/extract_test.go Adds unit tests covering new range extractor behavior and range fixture normalization/deduplication.
testdata/local/tests/npm_range_reference_test.json Adds harvested npm containment reference fixtures.
testdata/local/tests/pubb_range_reference_test.json Adds harvested Pub containment reference fixtures.
testdata/local/tests/gem_range_reference_test.json Adds harvested RubyGems containment reference fixtures.
testdata/local/tests/composer_range_reference_test.json Adds harvested Composer containment reference fixtures.
testdata/local/tests/maven_range_reference_test.json Adds harvested Maven containment reference fixtures.
testdata/local/provenance.json Records additional source files and generated fixture outputs (including Maven provenance).
range.go Aligns Range.Contains with reference containment behaviors (scheme-specific comparison and prerelease/PEP440 semantics).
parser.go Fixes/extends native range parsing for npm/cargo/PyPI and preserves legacy rendering via RawConstraints while enabling correct containment semantics.
parser_test.go Adds test coverage for new/adjusted parsing and containment edge cases.
pypi_test.go Updates expectations to match corrected PEP 440 containment behavior around exclusive release upper bounds.
composer_pub.go Extends Composer range parsing to handle *-dev wildcard forms used by reference fixtures.
composer_pub_test.go Expands negative tests and adds coverage for composer *-dev wildcard range behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andrew
andrew merged commit 0557379 into main Aug 19, 2026
6 checks passed
@andrew
andrew deleted the issue-36-native-range-harvest branch August 19, 2026 07:31
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.

2 participants