Skip to content

Generate reference containment fixtures - #40

Merged
andrew merged 2 commits into
mainfrom
issue-36-generated-containment
Aug 19, 2026
Merged

Generate reference containment fixtures#40
andrew merged 2 commits into
mainfrom
issue-36-generated-containment

Conversation

@andrew

@andrew andrew commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Generate 10,299 containment cases by crossing harvested native ranges with version pools and evaluating them with pinned ecosystem implementations. Add harvest-time adapters for Node, Python, Ruby, PHP, Dart, Rust, and Maven's Java classes while keeping the generated JSON self-contained for go test.

Fix Composer branch containment differences exposed by the new matrix.

Stacked on #39. Part of #36.

@andrew
andrew requested a lite review from Copilot August 19, 2026 07:29
Base automatically changed from issue-36-native-range-harvest to main August 19, 2026 07:31

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 extends the tools/harvest fixture generator to produce a large matrix of generated containment reference cases by crossing harvested native ranges with harvested version pools and evaluating them against pinned reference implementations (Node, PyPI, RubyGems, Composer, Pub, Cargo, Maven). It also updates Composer branch containment behavior in the library to match the newly generated reference expectations.

Changes:

  • Add per-ecosystem “reference evaluator” adapters to compute containment results from pinned reference implementations and emit generated containment JSON fixtures.
  • Refactor harvester flow to support generated-range outputs alongside harvested native-range outputs, recording them in testdata/local/provenance.json.
  • Adjust Composer branch-version containment semantics (and wildcard handling) and add tests to cover the updated behavior.

Reviewed changes

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

Show a summary per file
File Description
tools/harvest/reference.go Adds runtime-backed evaluators (Node/Python/Ruby/PHP/Dart/Rust/Java) and helpers to generate containment results.
tools/harvest/reference_test.go Unit tests for containment query cross-product, result application, and runtime detection.
tools/harvest/main.go Wires generated containment harvesting into the main harvest pipeline; adds per-source runtime/evaluator configuration.
tools/harvest/extract.go Fixes Composer bound-containment extraction for dev-* versions in harvested native-range assertions.
tools/harvest/extract_test.go Updates/extends tests for Composer bound-containment extraction and for rejecting conflicting native→VERS conversions.
testdata/local/tests/pub_range_generated_test.json Adds generated Pub containment fixtures (large matrix).
testdata/local/tests/maven_range_generated_test.json Adds generated Maven containment fixtures.
testdata/local/tests/composer_range_reference_test.json Updates Composer reference fixtures to reflect branch containment differences.
testdata/local/provenance.json Records the additional generated containment JSON files per source.
range.go Updates Range.Contains to handle Composer branch containment and interval containment semantics.
composer_pub.go Updates Composer wildcard handling and introduces isComposerBranchVersion used by comparison/validation.
composer_pub_test.go Adds tests covering Composer branch containment across wildcards, comparisons, and exclusions.

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

Comment thread tools/harvest/main.go
Comment thread tools/harvest/main.go
@andrew
andrew merged commit e95aae0 into main Aug 19, 2026
5 checks passed
@andrew
andrew deleted the issue-36-generated-containment branch August 19, 2026 08:00
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