Skip to content

release: PowerIO.jl companion for PowerIO 0.12.0 - #201

Merged
samtalki merged 36 commits into
mainfrom
claude/gallant-mccarthy-jtum92
Nov 13, 2026
Merged

samtalki merged 36 commits into
mainfrom
claude/gallant-mccarthy-jtum92

Conversation

@samtalki

@samtalki samtalki commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Current head: 697f5d89bab7bca009b267642dd9c09e777b8937. Check snapshot (2026-11-12 14:13 UTC): four successful checks; GitHub reports reviewer approval. This head includes the stable 0.11.12 pins, numeric thermal ratings, and the BMOPF companion #203. The current tested Rust/Julia source pair is recorded below; earlier results retain their historical commits.

This is the Julia companion for PowerIO 0.12.0-rc.1. It exposes the same typed native behavior, carries the complete ABI-7 patch companion, and advances compatibility checks to the PowerIO release series.

Features included

  • BMOPF companion (test: follow powerio's one BMOPF output #203): tests and documentation follow the shared native writer's single BMOPF output, phase-to-ground voltage bounds, typed geometry and refusal of version-qualified format tokens. The written schema_version follows the bundled schema identity; the writer adds no $schema URL. This follows the proposed schema and does not claim Task Force ratification.
  • Shared input collections: @frederikgeth's feat: bind shared input collections (PowerIO #774 P10 companion) #200 binds inspection, case selection and parsing over bounded shared inputs, with owner-rooted handles and Julia coverage of the C collection API.
  • Egret electrical time series: exported TimePoint and time_points expose labels and optional durations without serializing the network. Tests cover canonical Egret emission after IR serialization, signed native branch results, same-format source retention and garbage-collection/lifetime behavior. The supported profile has fixed identity/topology; it does not add unit commitment or general intertemporal optimization semantics.
  • Correctness and usability: overflow rejection for narrowed bridge values, load multipliers and transformer tap squares; nonconsecutive network axes; DC phase-shift conventions; graph projection checks; explicit library probing; and the persistent Preferences fix (PowerIO init fails with Preferences.load_preference disable_invalidation keyword #196). The incorrect graph expectation now checks the actual stub-bus topology rather than omitting the check.
  • Numeric thermal ratings (PowerIO RFC #841): zero is a finite bound and positive infinity means no bound. ApparentPower accepts positive infinity; to_powerdata preserves a finite zero rating and rejects positive ratings that underflow the solver type. The companion includes regression coverage for these semantics.
  • Typed 0.12 model parity: ThreeWindingTransformer.magnetizing_connection, regenerated declarations from the RC header, and entry-point coverage in both directions. Rust owns conversion semantics; Julia uses the same C library rather than implementing parallel adapters.
  • One release-based compatibility policy: IR carries the release string and the C header exposes PIO_VERSION_*/pio_version_numbers. The binding accepts a library in the supported 0.12 series at or above its minimum. A legacy library is identified through its ABI number; its pre-0.11 pio_version return value is never interpreted as the newer string-view layout. Stand-in libraries test those cases.
  • RC artifact validation: canonical vX.Y.Z-rc.N tags now pass through the same artifact updater as stable tags, with exact native version, release-series, required-symbol and GridFM checks. Regressions cover five-platform synthetic pin generation, idempotence, malformed tags, and mismatched RC binaries; General registration remains stable-only.
  • Evidence-bearing CI: missing companion access fails instead of producing a skipped green gate. Successful source tests record the exact Rust and Julia commits. GitHub Actions updates are included.

Folded PRs and attribution

The recorded heads are ancestors of this branch. #203 has already merged into this RC companion; it reaches main when this companion merges. #179, #186–#192, #195 and #198 have already auto-closed as merged through the patch companion #202. #182, #183 and #200 still target main and will auto-close as merged when their included heads reach main through this PR's merge commit. Preserve original commits and contributor identities; squash/rebase would lose the ancestry used by GitHub indirect merges. A later push to a carried PR requires another ancestry check.

PR Included work Author Included head
#179 probe explicit native library candidates @BurhanAbdullah f8a68566
#186 pin graph projection edge cases @BurhanAbdullah f6bbe748
#187 align supported Julia and PowerIO versions @BurhanAbdullah f2b48401
#188 cover nonconsecutive bus IDs across network axes @BurhanAbdullah e25c02fd
#189 reject overflowing transformer tap squares @BurhanAbdullah 201aa05e
#190 reject overflow when narrowing bridge values @BurhanAbdullah a9073f0d
#191 reject overflowing load-series multipliers @BurhanAbdullah 8f4ff04b
#192 verify DC phase-shift injection invariants @BurhanAbdullah 77868e9c
#195 require Julia bindings for ABI 7 entry points @BurhanAbdullah bcfd1f61
#198 bump the actions group across 1 directory with 2 updates @dependabot[bot] 36f79542
#182 expect the release string in written PowerIO IR documents @samtalki 0199f808
#183 check the PowerIO release series instead of the ABI number @samtalki 18cff9bf
#200 bind shared input collections (PowerIO #774 P10 companion) @frederikgeth 64c770e2
#203 follow the shared native BMOPF output and geometry @samtalki 55562a9d

The new release/0.11.10 Julia patch companion at 69ed0f05 is also an ancestor of this branch. Its PR #202 merged at 469b1c03; the subsequent stable release bot commit 2c00bf2f is now also an ancestor. Its native artifact publication, General registration, TagBot release and fresh registry-install tests are complete.

@BurhanAbdullah authored the library probe, overflow fixes, axis/graph/convention tests and binding coverage. @frederikgeth authored the collection API and its integration. @samtalki integrated the release-series migration, native parity, preference fix and Egret metadata access. Dependabot's dependency commits and all original human identities/coauthor trailers remain intact. @MohamedNumair and @qian-harvard's adapter and metadata work in the Rust release is exercised through the shared native library.

Julia interop and release sequence

Keep the separately registered Julia package over the shared C interface. Julia's C interface supports the existing typed calls and ownership rules, and the package installs tested prebuilt artifacts. The current registered RustCall.jl supports inline Rust, generated wrappers and crate loading, but requires Julia 1.12 and a Rust toolchain. The current jlrs supports embedding and Julia-callable Rust libraries with a Rust 1.97 minimum. Adopting either would change PowerIO's current Julia 1.10/Rust 1.89 installation and toolchain guarantees. BinaryBuilder/JLL packaging can be evaluated separately while retaining the typed C API and five-platform packaged-library tests. These are release-scope and compatibility decisions, not general rankings of the alternatives.

The ABI-7 Julia patch companion and Rust #823 are merged. Stable tag v0.11.10 identifies Rust 83ceea2e; its release workflow supplies the native archive gates. The 0.11.10 native/Python/Rust publication, Julia artifact tests, General registration and TagBot release are complete. Fresh registry installs passed for Rust, Python and Julia. After separate review and current-head checks, merge this PR and Rust #821 before the RC tag.

Project.toml and Artifacts.toml deliberately retain the stable package version and pins; at 697f5d89 they match the 0.11.12 bot update 34fdd5db. The generated header determines native compatibility, so that old artifact is not the correct default for this new-series Git checkout. Install the exact Julia companion commit with the matching RC native library through POWERIO_CAPI, following the RC installation instructions, and record PowerIO.library_version(). Source-generation checks additionally use the paired POWERIO_HEADER. Canonical -rc.N artifact validation does not register a prerelease in General or change the stable release selector.

#175 remains open because CEnum 1.0 conflicts with Clang.jl 0.19's dependency range. #168's obsolete Rust pin is not adopted. A dependency's pre-1.0 version alone does not prohibit PowerIO 1.0: the outstanding work is to settle public type compatibility and convention decisions and complete or rescope the public milestone, as detailed in Rust #821.

Validation and remaining gates

Current source pair: Julia CI passes 3,774/3,774 tests on Julia 1.10 and 4,089/4,089 on current Julia, plus documentation and the trimmed app. Its logs identify exact Rust 5a63285fd6b92181393ff9893cf4cc32ab858a66 and Julia tested merge 7619d401951c49b5ccbc07a106d6e6a12eb8f80d (parents stable 34fdd5db and companion head 697f5d89). Rust binding CI passes 4,089/4,089 tests at Rust tested merge 6debb4af with exact Julia 697f5d89, and accounts for 555 C entry points (436 bound, 119 explicitly exempt). These are source tests, separate from final paired-main and actual RC archive acceptance.

Historical public pair (531e1b3f / ad406c59): Julia CI, attempt 2 passed 3,744/3,744 tests on Julia 1.10 and 4,059/4,059 on current Julia, with documentation and the trimmed-app build also passing. Checkout logs identify exact Rust 531e1b3fb6268d92dd0a54c850be28f4f78f84ed and Julia tested merge d356959720686a7ba435e0528a7dcc322eb8ff1a (parents published stable 2c00bf2f and the earlier companion head ad406c59). Rust's separate binding run passed 4,059/4,059 and its no-prob feature probe for tested Rust merge 8b887716b6721af404cfcee383a2f298c74b748d (parents stable 83ceea2e and RC 531e1b3f) with exact Julia ad406c59. The downloaded binding artifact, its SHA-256 2e66586ad541a4d64121de009d6c22984e50d7e434fd53581c8c381462206523 and merge parents were verified. C coverage accounts for 555 declared entry points, 436 bound and 119 explicitly exempt.

Historical local check: the ad406c59 Julia tree passed 4,057 local tests, with one expected macOS skip for a Linux-only C-compiler allocation probe, using the recorded native build from Rust 90316c00. Runtime/header trees remained unchanged at e070192d; Rust 531e1b3f includes later parser-allocation and lazy Python-index changes. The older local result does not certify those changes. The linked source CI qualifies its recorded historical pair; it does not qualify later Rust or Julia revisions.

Local validation of Julia d7d878fa against the exact Rust 90316c0 native library and header passes 4,057 tests with one existing broken-test marker. The native build includes the release feature set matrix,gridfm,dist,prob. The new regressions exercise canonical rc.1/rc.2 tags, exact version mismatches, unchanged pins on rejection, and stable-only release selection.

The Julia PR CI run passed 3,744/3,744 tests on Julia 1.10 and 4,059/4,059 on current Julia. Its checkout logs identify Julia tested merge 4a8eb103df38edb76f5084f118dccb03ba528cc6 (including the earlier head d7d878fa35dfa10b892fe76d408326096aedb5d2) and Rust 90316c0036468c2b15684311ae13fed7e09dc8cf.

The earlier Rust source-binding run remains separate historical evidence: 3,988/3,988 tests for Julia 6d16d2b22005d7eaf01152ff20f8b93e965d2e04 and Rust tested merge e8d9c5cca9c1c020d78a78d814147816e3c57e3c. Its binding evidence artifact records that exact pair; it does not certify the later artifact-updater change.

Human review, final paired main checks, and the five-platform tests of the actual tag-built RC archives remain required. Synthetic artifact-pin tests and local source builds do not replace those packaged-library gates. This PR does not tag or publish a release.

Companion merges across repositories are not atomic. After both corresponding main branches are updated, verify the recorded Rust/Julia commit pair and rerun Julia source CI if its first run used the older Rust main. Require the final paired checks before tagging.

samtalki and others added 22 commits October 24, 2026 21:58
PowerIO now writes the release whose schema a document follows as the
header's "version" (eigenergy/powerio#701), so a written document no longer
states the integer 2. The 0.11 documents these tests read still state 2,
and the refusal checks for other versions are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLm2qa6Lh1cugRdjQet74i
powerio drops PIO_ABI_VERSION and pio_abi_version. The header now states
the release it was generated from (PIO_VERSION_MAJOR, _MINOR, _PATCH),
and pio_version_numbers returns the library's release. _ensure_compatible
accepts a library from the header's release series (the same major and
minor before 1.0, the same major from 1.0 on) at the header's release or
a newer one, and refuses a library from another series, an older release,
or one without pio_version_numbers with an error naming both releases.

abi_version and the PIO_ABI_VERSION binding constant are removed;
library_version stays. src/LibPowerIO.jl is regenerated from the new
header. The artifact updater applies the same rule and parks with
release_series_mismatch or release_too_old.

The documentation now describes a PowerIO IR document's version as the
release whose schema it follows, and the tests accept either the 0.11
integer or a release string no newer than the library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLm2qa6Lh1cugRdjQet74i
src/LibPowerIO.jl now carries the release the header was generated from
(PIO_VERSION_MAJOR, _MINOR, _PATCH), and powerio moves those constants with
every release. The check that regenerates the binding from the powerio
header and diffs it would then fail after each powerio version bump until
someone regenerated the file by hand, although a binding generated from an
older header of the same release series works with the newer library. The
check now ignores a change to those three lines alone; any other change to
the generated file still fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLm2qa6Lh1cugRdjQet74i
Preferences.jl 1.6 has no disable_invalidation keyword, so
clear_library!(persist=true) threw a MethodError. A runtime read of the
deleted key returns the default.

Fixes #196
…ABI number

Retargeted from 0.12 to the 1.x series. Resolutions and fixes on top:

- Address the #183 review P1: a library without pio_version_numbers is
  described by its pio_abi_version number, never by calling pio_version,
  whose return type before 0.11 (const char *) crashed when read as a
  PioStringView. Stand-in libraries cover both shapes.
- Keep the explicit library_available(path) probe from #179 (cache keyword).
- Regenerate LibPowerIO.jl from the 1.0.0-rc.1 header.
- Compare library_version() by its core release; a prerelease states
  its core release in pio_version_numbers.
- Drop two stale to_graph assertions from #186 that contradicted the exact
  graph pinned just above them.
…e connects

ThreeWindingTransformer gains magnetizing_connection, "star_point" or
"winding1_terminal", from the C view field powerio#741 adds. Regenerate
LibPowerIO.jl from that header.
The PowerIO candidate is 0.12.0-rc.1 rather than 1.0.0-rc.1: its public
Rust API still exposes pre-1.0 crates. LibPowerIO.jl takes the header's
0.12.0 numbers, and the documentation and changelog name the 0.12.x
series. The release check itself is series-generic and unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y9wBqGJM8X2DZbNSGQt1T
@samtalki samtalki changed the title release: PowerIO.jl companion for PowerIO 1.0.0-rc.1 release: PowerIO.jl companion for PowerIO 0.12.0-rc.1 Nov 7, 2026
Generate the additive time-point C accessor, preserve owner lifetimes, and test canonical Egret emission after IR. Document Julia interop choices and patch-before-RC sequencing.
@samtalki

samtalki commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@frederikgeth @BurhanAbdullah please review the updated companion at 6d16d2b2, particularly collection ownership, typed time-point lifetimes, Egret canonical emission, and the retained overflow/axis/convention tests. Your original contributions are preserved and credited in the PR ledger.

The ABI-7 subset is now #202. The intended sequence waits for the 0.11.10 artifact tests and registration before merging this 0.12 companion. Local Pkg.test() passes 3,986 tests with one existing broken-test marker; final paired CI and the later packaged-artifact tests remain separate gates.

@frederikgeth frederikgeth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed Julia ad406c59fbbdcbb2a6ea6a4c0e0eb739c32b2d75 against the Rust companion 531e1b3fb6268d92dd0a54c850be28f4f78f84ed (native 0.12.0-rc.1). One P2 integration issue needs a coordinated fix in the Rust companion and a Julia regression test: SINCAL MDB inputs with acquired-table companions fail through the new collection API, although the existing parse API accepts the same bytes and options. Details and a reproducer are attached to the collection call.

Validation on macOS with Julia 1.12.6:

  • Full Julia suite: 3,737 passed, one platform-specific skip.
  • Regenerating src/LibPowerIO.jl from the exact companion header produced no diff (555 entry points).
  • Additional collection checks passed for ZIP paths and bytes, byte-vector views, copy/close ownership, limits, retained-source emission and IR deserialization.
  • The new three-winding transformer connection field and its IR round trip passed.

These checks use a local native build with matrix,gridfm,dist,prob; they do not replace the five-platform packaged-library release gates.

Comment thread src/input_collection.jl Resolved
Preserve the RC release-series API and stable artifact pins. Test acquired-table
SINCAL selections in memory and folder collections, boundary errors and ownership.
Isolate legacy pointer-returning ABI-6 rejection in a subprocess.

Full Julia 1.12.1 suite: 3757 passed with the matching native source build.
samtalki and others added 2 commits November 10, 2026 22:44
A rating of zero is a real bound and positive infinity means no bound.
ApparentPower accepts +Inf, and to_powerdata keeps a finite zero rating
while refusing a positive rating that underflows the solver type.

Companion to powerio codex/thermal-limits; recovered from an
uncommitted Codex worktree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recovered Codex work from codex/thermal-limits (ee12a09).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@frederikgeth frederikgeth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed Julia e6e2f43 against the native library built from Rust b4cd4bb92e885094ca60c7f275fcb46221878474.

The acquired-table SINCAL MDB collection issue from my previous review is fixed; the original reproducers now pass, including multiple snapshot selections and collection ownership checks. No new actionable Julia findings.

Validation: 3,768 local tests passed with one expected Linux-only skip on macOS; 46 additional thermal checks passed for zero, finite, and infinite limits through typed updates, IR round trips, and Float32/Float64 solver-facing arrays. Regenerating all 555 C entry-point declarations against the current native header produced no changes.

Approving the Julia binding changes. The transformer-rating export regression and stale PowSybl oracle reported on eigenergy/powerio#821 remain separate outstanding fixes before the combined release proceeds.

@BurhanAbdullah BurhanAbdullah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current PR head with particular attention to collection ownership, time-point lifetimes, Egret emission, and the retained numerical regressions. Those paths look well covered by the code and tests I inspected. I found one compatibility issue that should be resolved before the RC companion is approved: the runtime release check compares only the numeric major/minor/patch tuple, so it cannot distinguish prerelease revisions within the same release (for example, 0.12.0-rc.1 versus 0.12.0-rc.2). See the inline P2 comment on src/capi.jl.

Comment thread src/capi.jl
"series than this PowerIO.jl, which needs PowerIO $series at $want or newer. " *
"Build powerio-capi from a PowerIO $series release, or use the PowerIO.jl " *
"release that matches the library.")
got >= want || error(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Distinguish prerelease versions in the compatibility check. got is built from pio_version_numbers() and _HEADER_RELEASE is built from the generated PIO_VERSION_MAJOR/MINOR/PATCH constants. Both therefore collapse 0.12.0-rc.1 and 0.12.0-rc.2 to 0.12.0, so a binding generated against rc.2 accepts an rc.1 library as compatible. That is weaker than the documented “same release or newer” rule and can allow a native candidate that predates symbols/behavior added in a later RC. Please carry the full prerelease identity into the generated header/binding compatibility metadata (or use another monotonic compatibility marker) and add a stand-in-library regression proving rc.1 is rejected by an rc.2 binding while rc.2 is accepted.

samtalki and others added 7 commits November 11, 2026 09:47
Companion for eigenergy/powerio#844. Schema 0.2.0 output names the bus
phase to ground bounds vpg_min/vpg_max and carries geometry in the typed
bus.*.geo and line.*.geo slots; 0.1.0 output keeps v_* and extras.geojson.
The geometry page says the same.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Companion for eigenergy/powerio#844, which makes PowerIO write one BMOPF
version: 0.2.0, as proposed in distribution-system-opt/dsopt-schema#2.
bmopf-json@0.1.0 is refused, so the tests drop the 0.1.0 output branches,
write 0.2.0 from the deserialized module, and check the refusal. The
distribution and geometry pages say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Companion for eigenergy/powerio#844 following dsopt-schema 6796394: a 0.2.x
document's one version identifier is meta.schema_version, and output carries
no meta.$schema. The phase-bounds input states only schema_version, so its
unchanged source still echoes, and the fresh write is checked for the
release and the absent URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow powerio's cleanup: there is one BMOPF, `bmopf`/`bmopf-json` are
its format strings, and a `bmopf-json@<version>` string is refused. The
tests check that a written document's `schema_version` is the directory
of the schema's `$id` and that the tokens 0.11 accepted are refused; the
docs name no schema version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test: follow powerio's one BMOPF output
…hy-jtum92

Carry the PowerIO.jl 0.11.12 release commit (artifacts, version and the
0.11.12 changelog entry) into the 0.12.0-rc companion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PowerIO ships 0.12.0 as a final release with no release candidate. Replace
the rc.1 installation instructions with a section on testing main against an
unreleased library between a new series' companion merge and its release,
and point README and CONTRIBUTING at it. State the 0.11 patch / 0.12 tag
ordering in terms of the v0.12.0 tag.

The generic prerelease handling (updater accepting vX.Y.Z-rc.N, selector
ignoring prereleases) stays; its tests and comments now use a hypothetical
1.0.0-rc.N instead of 0.12.0-rc.N, and the updater gate gains a stable 0.12.0
library against a 0.12.0 header case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samtalki samtalki changed the title release: PowerIO.jl companion for PowerIO 0.12.0-rc.1 release: PowerIO.jl companion for PowerIO 0.12.0 Nov 13, 2026
@samtalki
samtalki marked this pull request as ready for review November 13, 2026 22:19
@samtalki
samtalki merged commit 520959b into main Nov 13, 2026
4 checks passed
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.

4 participants