Make xy.pyplot gallery-compatible with Matplotlib 3.11 - #413
Conversation
|
Too many files changed for review. ( |
|
Important Review skippedToo many files! This PR contains 552 files, which is 252 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (552)
You can disable this status message by setting the Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Final exact-head acceptance audit is complete for
The PR description now contains the complete standard shard artifact IDs/digests and final acceptance evidence. The PR remains draft for maintainer review. |
There was a problem hiding this comment.
All reported issues were addressed
Not reviewed (too large): gallery/matplotlib-3.11.1/manifest.json (~14,146 lines), gallery/matplotlib-3.11.1/baseline.json (~11,911 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Note: This PR contains a large number of files. cubic only reviews up to 200 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 72 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
3 issues found across 8 files (changes from recent commits).
Not reviewed (too large): gallery/matplotlib-3.11.1/baseline.json (~1,861 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/pyplot_gallery/contract.py">
<violation number="1" location="scripts/pyplot_gallery/contract.py:1379">
P3: When a promoted (schema 2/3) baseline has paths that don't match the manifest, this new guard returns immediately after recording only the path-mismatch error, so all subsequent independent checks in the same function — the acceptance-report provenance validation (record SHA, implementation_commit, report/promoted manifest hashes, extended-spec hash) and the archive provenance hash checks — are silently skipped. The schema-1 branch directly above handles the same mismatch as a no-op and still runs those later checks, so this is an inconsistency that reduces the diagnostic surface during contract verification. Consider not short-circuiting the whole function: keep the fatal path-mismatch error but let the downstream provenance/archive checks run and accumulate, returning once with all findings, which matches how the schema-1 path behaves.</violation>
<violation number="2" location="scripts/pyplot_gallery/contract.py:1413">
P2: Acceptance provenance can claim different shards consumed different input manifests and still verify, although promotion requires every report to reference the same pre-promotion manifest bytes. Validate one shared lowercase SHA-256 value across all `report_manifest_sha256` records.</violation>
<violation number="3" location="scripts/pyplot_gallery/contract.py:1426">
P2: Schema-1 regressions are now self-validating because `verify_contract()` derives expected gate counts from the mutable baseline it is checking. Keep the historical `d505ef...` counts independently pinned (or independently hash the legacy baseline) instead of using `_legacy_summary()` as the verification oracle.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
| or not isinstance(record.get("sha256"), str) | ||
| or len(record["sha256"]) != 64 | ||
| or record.get("implementation_commit") != baseline.get("audit_commit") | ||
| or not isinstance(record.get("report_manifest_sha256"), str) |
There was a problem hiding this comment.
P2: Acceptance provenance can claim different shards consumed different input manifests and still verify, although promotion requires every report to reference the same pre-promotion manifest bytes. Validate one shared lowercase SHA-256 value across all report_manifest_sha256 records.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/pyplot_gallery/contract.py, line 1413:
<comment>Acceptance provenance can claim different shards consumed different input manifests and still verify, although promotion requires every report to reference the same pre-promotion manifest bytes. Validate one shared lowercase SHA-256 value across all `report_manifest_sha256` records.</comment>
<file context>
@@ -1375,6 +1409,11 @@ def verify_contract(root: Path = CORPUS_ROOT) -> list[str]:
or not isinstance(record.get("sha256"), str)
or len(record["sha256"]) != 64
+ or record.get("implementation_commit") != baseline.get("audit_commit")
+ or not isinstance(record.get("report_manifest_sha256"), str)
+ or len(record["report_manifest_sha256"]) != 64
+ or record.get("promoted_manifest_sha256") != baseline.get("manifest_sha256")
</file context>
| errors.append("promoted baseline acceptance report provenance is invalid") | ||
| else: | ||
| expected_summary = ( | ||
| _legacy_summary( |
There was a problem hiding this comment.
P2: Schema-1 regressions are now self-validating because verify_contract() derives expected gate counts from the mutable baseline it is checking. Keep the historical d505ef... counts independently pinned (or independently hash the legacy baseline) instead of using _legacy_summary() as the verification oracle.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/pyplot_gallery/contract.py, line 1426:
<comment>Schema-1 regressions are now self-validating because `verify_contract()` derives expected gate counts from the mutable baseline it is checking. Keep the historical `d505ef...` counts independently pinned (or independently hash the legacy baseline) instead of using `_legacy_summary()` as the verification oracle.</comment>
<file context>
@@ -1383,17 +1422,14 @@ def verify_contract(root: Path = CORPUS_ROOT) -> list[str]:
- "temporary_waiver_count": 375,
- }
+ expected_summary = (
+ _legacy_summary(
+ manifest=manifest,
+ baseline_examples=baseline_examples,
</file context>
| else {} | ||
| ) | ||
| if not expected_summary: | ||
| return errors |
There was a problem hiding this comment.
P3: When a promoted (schema 2/3) baseline has paths that don't match the manifest, this new guard returns immediately after recording only the path-mismatch error, so all subsequent independent checks in the same function — the acceptance-report provenance validation (record SHA, implementation_commit, report/promoted manifest hashes, extended-spec hash) and the archive provenance hash checks — are silently skipped. The schema-1 branch directly above handles the same mismatch as a no-op and still runs those later checks, so this is an inconsistency that reduces the diagnostic surface during contract verification. Consider not short-circuiting the whole function: keep the fatal path-mismatch error but let the downstream provenance/archive checks run and accumulate, returning once with all findings, which matches how the schema-1 path behaves.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/pyplot_gallery/contract.py, line 1379:
<comment>When a promoted (schema 2/3) baseline has paths that don't match the manifest, this new guard returns immediately after recording only the path-mismatch error, so all subsequent independent checks in the same function — the acceptance-report provenance validation (record SHA, implementation_commit, report/promoted manifest hashes, extended-spec hash) and the archive provenance hash checks — are silently skipped. The schema-1 branch directly above handles the same mismatch as a no-op and still runs those later checks, so this is an inconsistency that reduces the diagnostic surface during contract verification. Consider not short-circuiting the whole function: keep the fatal path-mismatch error but let the downstream provenance/archive checks run and accumulate, returning once with all findings, which matches how the schema-1 path behaves.</comment>
<file context>
@@ -1335,14 +1362,21 @@ def verify_contract(root: Path = CORPUS_ROOT) -> list[str]:
+ else {}
)
+ if not expected_summary:
+ return errors
if expected_summary["acceptance_complete"] is not True:
errors.append(
</file context>
Summary
Makes
xy.pyplota gallery-compatible drop-in surface for Matplotlib 3.11 while preserving the dependency-free, performance-oriented native renderer.native,compat, and lazyautomodes plusplt.set_mode(),plt.get_mode(), andXY_PYPLOT_MODE.module://xy.backends.backend_xyMatplotlib backend.Matplotlib supplies frontend semantics in compat mode, but accepted charts are rendered by XY: gallery acceptance rejects Agg or any other renderer fallback.
Gallery contract
The original Python and notebook archives remain provenance-locked at 507 members each. XY's runnable contract excludes the 48 three-dimensional examples and contains 459 byte-exact source files.
pyplot-eligible sources acceptedpyplotbackend/font/GUI examples classifiedExact pixels are not required. The four non-exact dimensions (
skewt,figure_size_units,horizontal_barchart_distribution, andcolormap_reference) pass the documented tolerant dimension policy. All other structural, semantic, visual, and behavioral gates pass without waivers.Executable contract and CI
The harness:
The browser probes use a bounded Playwright/Chromium driver, fail closed when CI requires a browser, preserve semantic diagnostics, and avoid Linux Chromium first-profile hangs.
Evidence and tracked root causes
Browse the permanent comparison screenshots.
xy.pyplotRoot-cause issues include complete upstream Matplotlib sources, comparison screenshots, affected-example counts, acceptance tests, and the
pyplotlabel:pcolormesh/hist2dFixes #354
Fixes #409
Fixes #414
Fixes #415
Fixes #416
Revalidates #410 and #411.