Repository navigation
fix(powermodels): validate bus identifiers before conversion - #767
BurhanAbdullah wants to merge 33 commits into
Conversation
f7c6749 to
606a50f
Compare
|
CI diagnosis (verified from the failing job logs): the Rust workflow is green on this head. The Python 3.12, GridFM-extra, Windows native, lint, quality, wheel and distribution checks are green. Two failures are shared prerequisites rather than failures in this PR's changed Rust code:
No checks are being skipped or weakened, and I am not marking this ready to merge while those prerequisites remain unresolved. |
|
Fresh CI diagnosis on this head (not a parser-code failure):
I am not weakening the Julia ABI gate or marking either PR ready while the shared prerequisites remain unresolved. |
|
Fresh CI diagnosis: Rust and the full 65-cell conversion matrix pass. Remaining failures match shared base/dependency issues: Python 3.9 cannot be installed on ubuntu-26.04 (runner fix #779); Julia ABI-7 companion check reports the five AC-OTS entry points are not bound in PowerIO.jl; validation fails only the two PMD BMOPF fixtures ( |
|
Pushed two CI-only fixes to this PR branch:
Fresh full CI has started on |
|
Further CI root-cause fix pushed: |
|
The fresh run on the updated Python/macOS workflow still fails the Julia ABI job for the same shared companion-pin reason, not because of this PR's parser/model change. The current check reports ABI-7 exports missing from the pinned PowerIO.jl checkout, including AC-OTS instance/solution, island, and sensitivity entry points ( |
|
Follow-up correction from the latest full CI run: the earlier Python 3.9 runner change was incomplete because the The remaining known shared blockers are the Julia ABI companion pin and the two PMD BMOPF validation fixtures, both handled by the upstream release-validation work in #744. I am keeping this PR focused on its parser change and will refresh/retest after the maintainers resolve and merge the #744/#771 design conflict. |
0605727 to
114d658
Compare
114d658 to
856f13b
Compare
|
CI diagnosis from the latest current-head run: Python, Julia ABI, conversion matrix, interoperability, schema, docs, fuzz and semver checks are passing. Validation fails on the same two existing PMD fixtures: |
frederikgeth
left a comment
There was a problem hiding this comment.
Reviewed b5318d7. The parser change looks sound; please fix the new overflow test's 32-bit input and assertion before approval.
Validation in an isolated checkout: all 9 existing PowerModels unit tests and 14 PowerModels integration tests passed. Additional boundary checks passed for all ten equipment-reference fields, including missing references when bus 0 exists, null/negative/fractional/out-of-range references, explicit zero, valid maximum IDs, and the documented null bus_i/index fallback. All ten reported current-head workflows are green.
Integration remains #779 -> #744 -> refreshed #767. The copied runner and BMOPF prerequisite changes match those PRs. The unrelated provenance-index optimization should be separated or explicitly described with its validation.
|
Current-head audit (2 Nov 2026), head
This branch is 2 commits behind main and still depends on #744 becoming the upstream base. Refresh after #744 integrates and obtain a fresh review; do not treat the skipped large-case leg as exercised. |
# Conflicts: # .github/workflows/validation.yml # CHANGELOG.md
…-roles fix(mcopf): reject nonphase delta terminal maps
…idation integration
…ower-factor fix(mcopf): retain tiny power factors with bounded coefficients
…ri-coverage ci: run GridFM CLI and Miri ownership coverage
frederikgeth
left a comment
There was a problem hiding this comment.
Re-reviewed 4fc170b alongside #766. The previous overflow-test finding is resolved: the first unsupported ID is constructed in u64 space with checked addition, and either platform-range or PowerIO-range diagnostic is accepted. No actionable findings; approved.
All 26 focused PowerModels tests pass. Supplemental public-API checks reject missing, null, negative, fractional and out-of-range values across all ten equipment-reference fields (60 cases), while preserving bus zero and the largest supported bus ID. The missing-reference check fails on main by accepting a missing load_bus when bus zero exists, confirming the regression.
The shared provenance optimization was reviewed and tested once on #766; this PR's implementation differs only in a comment. Combined integration and formatting pass, and all ten current-head workflows pass.
Summary
Validate PowerModels bus identifiers and equipment references before narrowing or constructing canonical bus IDs. Missing and out-of-range references now fail explicitly instead of silently aliasing bus 0.
Review fix
The overflow regression constructs the first out-of-range ID in
u64space. On 32-bit targets it is rejected byusize::try_from; on 64-bit targets it reaches the explicit PowerIO ID ceiling. The assertion accepts the platform-range or PowerIO-range diagnostic. The previous #744-based Rust log confirmedbus_ids_outside_supported_range_are_rejectedpasses, and its wasm32 check completed successfully.Supporting stored-IR performance change
The stored-record provenance-index optimization is explicitly documented here. It replaces ordered lookup sets/maps with capacity-reserved, borrowed-key hash indexes for source IDs, diagnostic IDs and history IDs. It does not alter serialization, record ordering, validation rules, or duplicate/reference checks. The unchanged
six_figure_record_counts_decode_within_the_ceilingregression passed under the original strict five-second assertion; no threshold was relaxed.Previous #744-based validation 41413090108 / job 125170387382 fetched the pinned
case13659pegase.m, found 74 shifted rows out of 20,467, and passed all 65 matrix cells.Final current-head CI
Head:
4fc170b4a1c67b5caafa394aa5fa1cea77c4425d(22 commits ahead, 0 behind current maina6bc722a72e700768c6b9fb0a339964f7f27cf2e). The three-dot diff is limited toCHANGELOG.md,powerio-tx/src/format/powermodels.rs, andpowerio/src/stored/dto.rs.All 10/10 workflow runs completed successfully: Semver
41425899357, Docs41425899514, Python41425899493, Fuzz smoke41425899385, PowSybl41425899345, Conversion Matrix41425899512, CIM schema41425899581, Julia binding41425899446, Rust41425899562, Validation41425899448. No failed, cancelled or pending jobs. The only job-level skips are the PR-event-gated PyPI publish, browser-matrix converter and deploy jobs.bus_ids_outside_supported_range_are_rejectedpassed.u64space with checked addition. The assertion accepts the sharedbus ID rangediagnostic from either 32-bitusizeconversion or the PowerIO ceiling. wasm32 job 125212309815 passed.six_figure_record_counts_decode_within_the_ceilingregression passed under the original strict five-second assertion; no threshold or test was changed.dc_makebdc, and endedall checks passed.The stored-record provenance-index optimization remains documented above; its decoder performance regression is unchanged. Frederik's 32-bit overflow review thread has been answered with current-head evidence and resolved. This PR is ready for maintainer review; no merge was performed.