Repository navigation
Add manual primer previews and simplify SymPy-only comments - #11760
Conversation
Add artifact-only manual analysis for verified closed or merged PRs while retaining automatic publication guards. Render a compact non-blocking notice for canonical SymPy-only differences and retain the full report. Classification D: workflow harness/configuration; no typeshed or type-precision changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR. |
|
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
+ .../projects/sympy/sympy/solvers/ode/lie_group.py:619:61 - error: Operator "-" not supported for type "Unknown | Basic" (reportOperatorIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1579:38 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1580:38 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1590:9 - error: No overloads for "update" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1590:12 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1590:19 - error: Argument of type "Unknown | dict[Unknown, Unknown] | None" cannot be assigned to parameter "m" of type "Iterable[tuple[str, Unknown]]" in function "update"
+ Type "Unknown | dict[Unknown, Unknown] | None" is not assignable to type "Iterable[tuple[str, Unknown]]"
+ "None" is incompatible with protocol "Iterable[tuple[str, Unknown]]"
+ "__iter__" is not present (reportArgumentType)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1597:43 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1597:64 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1603:9 - error: No overloads for "update" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1603:12 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1603:19 - error: Argument of type "Unknown | dict[Unknown, Unknown] | None" cannot be assigned to parameter "m" of type "Iterable[tuple[str, Unknown]]" in function "update"
+ Type "Unknown | dict[Unknown, Unknown] | None" is not assignable to type "Iterable[tuple[str, Unknown]]"
+ "None" is incompatible with protocol "Iterable[tuple[str, Unknown]]"
+ "__iter__" is not present (reportArgumentType)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1610:43 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1610:74 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1616:9 - error: No overloads for "update" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1616:12 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1616:19 - error: Argument of type "Unknown | dict[Unknown, Unknown] | None" cannot be assigned to parameter "m" of type "Iterable[tuple[str, Unknown]]" in function "update"
+ Type "Unknown | dict[Unknown, Unknown] | None" is not assignable to type "Iterable[tuple[str, Unknown]]"
+ "None" is incompatible with protocol "Iterable[tuple[str, Unknown]]"
+ "__iter__" is not present (reportArgumentType)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1623:49 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:1623:70 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3442:7 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3442:38 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3443:7 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3443:38 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3444:14 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3445:14 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3446:14 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3458:50 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3459:50 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3460:50 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3500:5 - error: No overloads for "update" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3500:7 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3500:14 - error: Argument of type "Unknown | dict[Unknown, Unknown] | None" cannot be assigned to parameter "m" of type "Iterable[tuple[str, Unknown]]" in function "update"
+ Type "Unknown | dict[Unknown, Unknown] | None" is not assignable to type "Iterable[tuple[str, Unknown]]"
+ "None" is incompatible with protocol "Iterable[tuple[str, Unknown]]"
+ "__iter__" is not present (reportArgumentType)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3501:18 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3501:43 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3502:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3502:16 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3502:24 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3502:31 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3503:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3503:15 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3503:23 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3503:30 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3504:7 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3504:46 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3504:54 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3505:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3505:19 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3505:29 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3506:10 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3507:10 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3508:10 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3559:5 - error: No overloads for "update" match the provided arguments (reportCallIssue)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3559:7 - error: "update" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3559:14 - error: Argument of type "Unknown | dict[Unknown, Unknown] | None" cannot be assigned to parameter "m" of type "Iterable[tuple[str, Unknown]]" in function "update"
+ Type "Unknown | dict[Unknown, Unknown] | None" is not assignable to type "Iterable[tuple[str, Unknown]]"
+ "None" is incompatible with protocol "Iterable[tuple[str, Unknown]]"
+ "__iter__" is not present (reportArgumentType)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3560:18 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3560:43 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3561:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3561:16 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3561:24 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3561:31 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3562:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ .../projects/sympy/sympy/solvers/ode/ode.py:3562:15 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
... (truncated 251 lines) ...
|
mypy_primer analysisAdvisory AI analysis of primer run 34908468059, attempt 1 Added/removed counts are diagnostic headers; message rewrites can appear on both sides.
Evidence and limitations by projectsympyThe complete shard diff reports 38,682 -> 38,798 errors (+116), with 165 added and 49 removed diagnostic headers plus 78 added and 33 removed detail lines. Added headers are dominated by reportOptionalSubscript (+71), reportOptionalMemberAccess (+11), reportCallIssue (+7, with one removed), unspecified (+75, with 48 removed), reportAttributeAccessIssue (+17, with two removed), and reportOperatorIssue (+1). The largest concrete cluster is sympy/solvers/ode/ode.py:1579-1623 and 3442-3618: indexing values now inferred as None and calls to update are reported as both unknown-member/overload/argument errors, including Unknown | dict[Unknown, Unknown] | None not satisfying Iterable. This is a potentially meaningful precision/checking change, but the PR diff contains no analyzer, typeshed, or checker implementation changes. Other additions include attribute failures at riccati.py:702, recurr.py:424-449, and tensor/array/expressions/tests/test_array_expressions.py:247, 1036-1092; operator failures at vector/implicitregion.py:188-214 (notably int/MPZ and Expr/MPZ). Many lines are rewrites at existing locations rather than new headers: unions gain Add in stats and stochastic-process diagnostics, and detail-only lines change type unions without a location header. Removed examples include the riccati.py:275 zip/__init__ diagnostic and two pde.py:173 pop diagnostics, while riccati.py:869 and single.py:2652 are message/type-union rewrites. The exact PR changes the mypy-primer collector, report rendering, manual preview gates, documentation, and tests; it explicitly preserves full reports while shortening canonical SymPy-only comments. Therefore the primer delta cannot be safely classified as an ecosystem improvement or regression caused by this commit. It should be re-run or compared Explanation truncated; see the full report artifact linked below. Unresolved / coverage limits: The source run identifies head d7ef7e7 and base c2c824b, but available run metadata does not establish a separate synthetic merge/base checkout or SymPy revision used by primer. No reproduction was performed. The 75 unspecified added headers and detail-only rewrites cannot all be tied to a causal implementation change from this PR.
Full evidence and limitations: download |
| roles: all | ||
| needs: [collect] | ||
| if: needs.collect.outputs.has_changes == 'true' | ||
| concurrency: |
There was a problem hiding this comment.
Warning · Non-blocking recommendation
📍 .github/workflows/mypy-primer-analysis.md:22
[unverified] Using github.run_id unconditionally makes every automatic run's generated concurrency groups unique, removing the existing cross-run queue and allowing overlapping analysis agents. Preserve the previous discriminator for workflow_run events and use github.run_id only for manual previews; two overlapping automatic runs would confirm the runtime impact.
[verified]
| `${onlyProject.detailLinesAdded} added / ${onlyProject.detailLinesRemoved} removed detail lines.`, | ||
| '', | ||
| ...footer, | ||
| ].join('\n'); |
There was a problem hiding this comment.
Warning · Non-blocking recommendation
📍 build/ci/mypyPrimerAnalysis.ts:507
[unverified] This replacement labels every canonical SymPy-only result as “non-blocking primer noise,” including a validated likely-regression, so the visible comment can contradict the retained analysis. Preserve the assessment in the short notice or restrict this wording to non-regression assessments; add a likely-regression rendering test to confirm the behavior.
[verified]
|
Result: Verification detailsVerification: Isolated verification observed failures that were not classified as caused by this PR: Targeted ESLint check. Summary: The targeted mypy-primer Jest suite passed all 85 tests, covering closed-PR previews, publication isolation, generated workflow scripts, and SymPy-only rendering. TypeScript type-checking and changed-file formatting also passed. A direct ESLint invocation did not run because it lacked the repository script's legacy-config environment setting; this was unrelated to the PR. Verification is therefore partial, although behavioral test confidence is high. Test runs: 3 passed, 1 failed
❌
|
Bill Schnurr (bschnurr)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Summary
workflow_dispatchinputs for a recorded primer run ID and attempt, allowing artifact-only previews for verified closed or merged PRs.previewjob summary and savecomment.mdandfull-report.mdin themypy-primer-analysis-reportartifact.publishAnalysis. Automatic runs still require a current open PR.The SymPy-only notice is a reporting policy, not proof that a checker change is harmless. Report coverage, evidence validation, and the requirement to submit a valid report remain enforced.
Manual preview example
After this workflow is merged, preview the final recorded primer run for #11601 with:
This uses the original complete artifacts rather than the truncated raw PR comment. The recorded run must be successful, its attempt must match, all eight shards and the PR-number artifact must be available, and the PR must match the recorded repository, branch, and head commit. Closed-PR association is permitted only for previews; superseded heads and ambiguous associations are still rejected.
Manual previews retain the existing GPT-5.6 Luna model, 25-credit budget, read-only agent tools, native MCP preflight, report validation, and threat detection. They never post a PR comment. Each run has a distinct job-concurrency discriminator.
Validation
Test policy classification: D — harness/configuration. No checker behavior, typeshed, or type-precision expectations changed.
The actual AI preview for #11601 has not run yet; that remains a post-merge verification step.