Skip to content

Expose complete bounded load laws through typed bindings - #610

Merged
samtalki merged 16 commits into
codex/gridlabd-pr-12-canonicalfrom
codex/gridlabd-pr-13-bindings
Oct 27, 2026
Merged

samtalki merged 16 commits into
codex/gridlabd-pr-12-canonicalfrom
codex/gridlabd-pr-13-bindings

Conversation

@frederikgeth

@frederikgeth frederikgeth commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Add complete owner-rooted C views for distribution voltage laws and prescribed PF powers, preserving all voltage bounds, dropout and current limits. Existing ABI 7 struct layouts and legacy refusal behavior remain unchanged. Reuse one private law-view builder; Julia access copies only the requested row and retains the original ordinary-load constructor. Python parse exceptions retain structured component diagnostics.

Preserve main's SINCAL source-loss diagnostic and module retention details through canonical GLM network and module emission; the new regression and facade dispatch checks pass. Bounded laws remain intact, and current IVR preparation explicitly refuses their piecewise equations. The source-only template witness, browser-source replay and published schema guards retain the new main behavior.

Rebased onto Rust main c505aa9a0cabe56b618fc7c6f55853fc141e74f0 on 27 October 2026. Parent: #609 (codex/gridlabd-pr-12-canonical). Current head: 592eb5e75d7e8255770c37a8b7dac01d0cb0b40d. The complete #598 → #610 chain includes #598's later pre-allocation include-budget fix, current-main correctness fixes and unchanged published schemas. Julia CI pins PowerIO.jl #168 at 43475ef0d8f156af477c1f7009149f245315c25f.

Fresh local validation of the cumulative stack: 3,268 workspace/C ABI tests passed (42 existing ignores), all seven CI Clippy configurations passed, conversion-matrix findings are unchanged, and the generated 0.11.7 schema matches. Root budget tests pass on Rust 1.99 and 1.88 (89 each); the DSS fidelity checkpoint passes 566 distribution tests (9 existing ignores). Both Julia companions passed against matching full-feature libraries (1,975 / 2,068 assertions, one existing broken test each), with byte-exact raw-binding regeneration. All 23 Python oracle/control unit tests pass.

Fresh current-head hosted CI is running. These cumulative local results do not substitute for each prefix's hosted checks. Native qualification figures above refer to existing pinned feature evidence; the complete feeder-oracle corpus was not rerun. See the committed qualification guide and #697 for current status.

Sam's review/approval remains required. Future integration keeps #598 → #610 order, pairing Julia #167 with Rust #599 and Julia #168 with Rust #610 and checking actual main between authorized merges. No PR merge, tag, deployment or release is authorized.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Conversion Matrix

Legend

Cells show X/Y: observed warnings / expected warnings. Counts include source parse, target write, and target readback.

A nonzero cell means the target format cannot carry what the source stated, and every warning names the field or record it cannot carry. A write or readback warning names a field of the target format; a source parse warning, which every cell of that row shares, names what the source document itself leaves unstated. A warning that named a writer PowerIO could extend instead of a limit of the format would be a defect in this table.

  • 🟢 0/0: no warnings and checked invariants held.
  • 🟡 X=Y: observed warnings match the reviewed expected count, and that count is nonzero.
  • 🔴 X!=Y or invariant failure: behavior changed. If warnings decreased because fidelity improved, update the expected counts in the same PR.
  • Expected counts are the *_WARNING_BASELINE arrays in powerio-cli/tests/conversion_matrix_report.rs; accept an intentional change by editing the matching source/target entry in the same PR.

Transmission

Six generated cases per writable source row; one vendored case per read-only source row.

Into a case format

Source ↓ / target → MATPOWER .m PowerModels JSON PSS/E .raw 33 PSS/E RAWX 35 PowerWorld .aux egret JSON pandapower JSON Surge JSON PSLF .epc
MATPOWER .m 🟢 0/0 🟡 1/1 🟡 15/15 🟡 15/15 🟡 18/18 🟡 7/7 🟡 14/14 🟡 23/23 🟡 14/14
PowerModels JSON 🟢 0/0 🟢 0/0 🟡 15/15 🟡 15/15 🟡 17/17 🟡 6/6 🟡 13/13 🟡 22/22 🟡 13/13
PSS/E .raw 33 🟡 1/1 🟡 1/1 🟢 0/0 🟢 0/0 🟡 2/2 🟡 1/1 🟡 3/3 🟡 1/1 🟡 2/2
PSS/E RAWX 35 🟡 1/1 🟡 1/1 🟢 0/0 🟢 0/0 🟡 2/2 🟡 1/1 🟡 3/3 🟡 1/1 🟡 2/2
PowerWorld .aux 🟡 1/1 🟢 0/0 🟡 6/6 🟡 6/6 🟢 0/0 🟢 0/0 🟡 8/8 🟢 0/0 🟡 6/6
egret JSON 🟢 0/0 🟢 0/0 🟡 9/9 🟡 9/9 🟡 12/12 🟢 0/0 🟡 7/7 🟡 1/1 🟡 7/7
pandapower JSON 🟢 0/0 🟢 0/0 🟡 7/7 🟡 7/7 🟡 8/8 🟢 0/0 🟢 0/0 🟢 0/0 🟡 7/7
Surge JSON 🟢 0/0 🟢 0/0 🟡 9/9 🟡 9/9 🟡 12/12 🟢 0/0 🟡 6/6 🟢 0/0 🟡 7/7
PSLF .epc 🟢 0/0 🟢 0/0 🟡 1/1 🟡 1/1 🟡 1/1 🟢 0/0 🟡 4/4 🟡 3/3 🟢 0/0
XIIDM 1.17 🟡 9/9 🟡 7/7 🟡 33/33 🟡 33/33 🟡 8/8 🟡 7/7 🟡 9/9 🟡 7/7 🟡 8/8
JIIDM 1.17 🟡 9/9 🟡 7/7 🟡 33/33 🟡 33/33 🟡 8/8 🟡 7/7 🟡 9/9 🟡 7/7 🟡 8/8
CGMES 3.0 🟡 8/8 🟡 6/6 🟡 67/67 🟡 42/42 🟡 6/6 🟡 6/6 🟡 7/7 🟡 6/6 🟡 6/6
UCTE-DEF .uct 🟡 18/18 🟡 12/12 🟡 6/6 🟡 6/6 🟡 18/18 🟡 12/12 🟡 6/6 🟡 12/12 🟡 18/18
PyPSA CSV 🟢 0/0 🟡 6/6 🟡 14/14 🟡 14/14 🟡 14/14 🟡 6/6 🟡 9/9 🟡 6/6 🟡 12/12
GridFM Parquet 🟡 6/6 🟢 0/0 🟡 14/14 🟡 14/14 🟡 14/14 🟡 6/6 🟡 9/9 🟢 0/0 🟡 12/12
PSS/E .raw 32 🟡 5/5 🟡 4/4 🟡 2/2 🟡 2/2 🟡 4/4 🟡 4/4 🟡 5/5 🟡 4/4 🟡 6/6
IEEE CDF 🟡 8/8 🟡 8/8 🟡 6/6 🟡 6/6 🟡 8/8 🟡 8/8 🟡 9/9 🟡 8/8 🟡 8/8
GO Challenge 3 JSON 🟡 6/6 🟡 5/5 🟡 7/7 🟡 7/7 🟡 9/9 🟡 5/5 🟡 7/7 🟡 5/5 🟡 7/7
DeepMind OPFData JSON 🟡 3/3 🟡 2/2 🟡 5/5 🟡 5/5 🟡 5/5 🟡 3/3 🟡 4/4 🟡 2/2 🟡 4/4

Into an exchange format

Source ↓ / target → XIIDM 1.17 JIIDM 1.17 CGMES 3.0 UCTE-DEF .uct
MATPOWER .m 🟡 70/70 🟡 70/70 🟡 57/57 🟡 42/42
PowerModels JSON 🟡 69/69 🟡 69/69 🟡 56/56 🟡 41/41
PSS/E .raw 33 🟡 32/32 🟡 32/32 🟡 12/12 🟡 29/29
PSS/E RAWX 35 🟡 32/32 🟡 32/32 🟡 12/12 🟡 29/29
PowerWorld .aux 🟡 54/54 🟡 54/54 🟡 30/30 🟡 33/33
egret JSON 🟡 68/68 🟡 68/68 🟡 36/36 🟡 36/36
pandapower JSON 🟡 55/55 🟡 55/55 🟡 35/35 🟡 52/52
Surge JSON 🟡 67/67 🟡 67/67 🟡 36/36 🟡 36/36
PSLF .epc 🟡 38/38 🟡 38/38 🟡 11/11 🟡 28/28
XIIDM 1.17 🟢 0/0 🟢 0/0 🟡 179/179 🟡 60/60
JIIDM 1.17 🟢 0/0 🟢 0/0 🟡 179/179 🟡 60/60
CGMES 3.0 🟡 44/44 🟡 44/44 🟢 0/0 🟡 51/51
UCTE-DEF .uct 🟡 36/36 🟡 36/36 🟡 12/12 🟢 0/0
PyPSA CSV 🟡 70/70 🟡 70/70 🟡 38/38 🟡 38/38
GridFM Parquet 🟡 64/64 🟡 64/64 🟡 32/32 🟡 40/40
PSS/E .raw 32 🟡 14/14 🟡 14/14 🟡 9/9 🟡 10/10
IEEE CDF 🟡 13/13 🟡 13/13 🟡 8/8 🟡 14/14
GO Challenge 3 JSON 🟡 8/8 🟡 8/8 🟡 7/7 🟡 14/14
DeepMind OPFData JSON 🟡 32/32 🟡 32/32 🟡 8/8 🟡 32/32

Into a dataset directory

Source ↓ / target → PyPSA CSV GridFM Parquet
MATPOWER .m 🟡 15/15 🟡 31/31
PowerModels JSON 🟡 14/14 🟡 30/30
PSS/E .raw 33 🟡 9/9 🟡 28/28
PSS/E RAWX 35 🟡 9/9 🟡 28/28
PowerWorld .aux 🟡 13/13 🟡 27/27
egret JSON 🟡 9/9 🟡 25/25
pandapower JSON 🟡 8/8 🟡 18/18
Surge JSON 🟡 9/9 🟡 25/25
PSLF .epc 🟡 8/8 🟡 27/27
XIIDM 1.17 🟡 15/15 🟡 53/53
JIIDM 1.17 🟡 15/15 🟡 53/53
CGMES 3.0 🟡 13/13 🟡 51/51
UCTE-DEF .uct 🟡 12/12 🟡 36/36
PyPSA CSV 🟢 0/0 🟡 15/15
GridFM Parquet 🟡 12/12 🟢 0/0
PSS/E .raw 32 🟡 6/6 🟡 12/12
IEEE CDF 🟡 9/9 🟡 11/11
GO Challenge 3 JSON 🟡 9/9 🟡 11/11
DeepMind OPFData JSON 🟡 5/5 🟡 4/4

Distribution

Seven cases per source row.

Into a distribution format

Source ↓ / target → OpenDSS .dss BMOPF JSON PMD JSON
OpenDSS .dss 🟡 22/22 🟡 118/118 🟡 220/220
BMOPF JSON 🟡 46/46 🟢 0/0 🟡 26/26
PMD JSON 🟡 58/58 🟡 46/46 🟢 0/0

Geographic Layer

One case per source row.

Into the geographic layer document

Source ↓ / target → geo-json
PowerWorld .aux substation coordinates 🟢 0/0

A geographic layer is a powerio.GeoLayer, not a network: no grid exchange format states a standalone layer, so the layer has its own table rather than a row of the network matrix. Its source is the substation coordinates of a vendored PowerWorld auxiliary file.

Full warning details: download conversion-matrix-warning-details for this workflow run.

@frederikgeth
frederikgeth force-pushed the codex/gridlabd-pr-13-bindings branch 2 times, most recently from ed6c5f1 to c2f6d9d Compare October 11, 2026 00:49
@frederikgeth
frederikgeth marked this pull request as ready for review October 11, 2026 01:20
@frederikgeth
frederikgeth force-pushed the codex/gridlabd-pr-13-bindings branch from 07d5e7c to 08545a2 Compare October 17, 2026 00:09
@frederikgeth
frederikgeth force-pushed the codex/gridlabd-pr-13-bindings branch from 08545a2 to a0d86a6 Compare October 17, 2026 00:17
@frederikgeth
frederikgeth added this pull request to stack #698 October 24, 2026 23:26
samtalki and others added 4 commits October 27, 2026 10:18
…13-bindings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y9wBqFvHDPxuADQVtZTEZ
…13-bindings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y9wBqFvHDPxuADQVtZTEZ
…13-bindings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y9wBqFvHDPxuADQVtZTEZ
…13-bindings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y9wBqFvHDPxuADQVtZTEZ
@samtalki

Copy link
Copy Markdown
Member

Review record for #598–#610 before merging (three review passes over the stack against main c505aa9a, plus a converter CI diagnosis). Findings and what was done, pushed to the owning layers:

Checked clean: the GLM include budget for cached, supplied and file buffers; IR 2 additivity with older snapshots byte-identical; Carson and cable geometry and transformer math against Kersting; the IEEE feeder oracle (not vacuous); C ABI struct parity with powerio.h; the PowerIO.jl #167/#168 companions; no new fixture over 100 KiB.

The remaining Firefox converter failures on the stack are runner timeouts (a different test each run; Chromium and WebKit pass); #717 raises those timeouts.

@samtalki
samtalki merged commit f933625 into main Oct 27, 2026
2 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants