Skip to content

Cap powerio below 0.10 so a fresh install resolves a usable version - #72

Merged
qian-harvard merged 2 commits into
mainfrom
fix/powerio-ceiling-0-3-1
Sep 19, 2026
Merged

qian-harvard merged 2 commits into
mainfrom
fix/powerio-ceiling-0-3-1

Conversation

@qian-harvard

Copy link
Copy Markdown
Contributor

The problem

pip install powermcp==0.3.0 has been broken since powerio 0.10.0 shipped, and main's CI has been red for 12 days for the same reason.

pyproject.toml:52 declares powerio[mcp,matrix]>=0.9.0,<1. powerio is pre-1.0, so a <1 ceiling admits every future minor — today the resolver picks 0.11.3. But the code targets the 0.9 API, and 0.11 removed powerio.Package, which powermcp/solver_case.py calls at seven sites (:115, :130, :253, :257, :261, :267), and renamed most of the powerio.mcp.server surface.

Verified against the published wheels:

powerio 0.9.0 powerio 0.11.3
class Package present gone
parse_file present gone

CI run 34049789070 on main@97e3dd961 failed, 283 passed, 17 skipped on both 3.10 and 3.12:

module 'powerio' has no attribute 'Package'              x32
module 'powerio.mcp.server' has no attribute 'save'      x32
module 'powerio.mcp.server' has no attribute 'matrix'    x24
module 'powerio.mcp.server' has no attribute 'convert'   x20
module 'powerio' has no attribute 'parse_file'            x4

That run installed powerio-0.11.0. A run today would install 0.11.3 and fail the same way. The last green run on main was the v0.3.0 release itself (2026-08-22).

Worth noting the knock-on cost: every open PR is currently being evaluated against a red baseline. In #68 the author absorbed all of #64's work into his branch because his own clean two-file commit failed with 78 errors, none of them in his code.

The change

Cap the ceiling at <0.10 in all thirteen declaration sites — the root pyproject.toml, PSCAD/pyproject.toml, and eleven requirements.txt files. Bump to 0.3.1. Add a comment at the root declaration recording why the ceiling is 0.10 rather than 1, so it doesn't regress.

No code changes. Moving to the 0.11 API is #64's job, and this pin is superseded the moment that lands.

tests/test_doctor.py:124 also contains the string powerio[mcp,matrix]>=0.9.0,<1, deliberately left alone: it is a synthetic fixture feeding doctor._declared_requirement to test specifier parsing, not a declaration of this repo's dependency, and its Version("1.0.0") not in req.specifier assertion is still exactly what it means to test.

Verification

  • pip download "powerio[mcp,matrix]>=0.9.0,<0.10" resolves to powerio 0.9.0, and that wheel's __init__.py exports both class Package and parse_file — the two names solver_case.py needs.
  • All four pyproject.toml files parse under tomllib; all eleven requirements.txt files intact.
  • pytest tests/test_doctor.py — 16 passed, 3 failed, and those same 3 fail identically on unmodified main (they concern hope/PyYAML in my local environment, not this change). The test that reads a powerio specifier, test_the_floor_is_found_without_top_level_distribution_metadata, passes.
  • The full suite was not run locally: this machine has mcp 1.29.0, which lacks mcp.server.mcpserver, so ~66 tests fail here for environmental reasons. CI is the real check, and it should go green on this branch.

Suggested follow-up

Tag v0.3.1 and publish once this is green. There is currently no released version of PowerMCP that installs and works.

🤖 Generated with Claude Code

qian-harvard and others added 2 commits September 18, 2026 21:08
`pip install powermcp==0.3.0` has been broken since powerio 0.10.0
shipped. The pin reads `powerio[mcp,matrix]>=0.9.0,<1`, so the resolver
picks the newest pre-1.0 release — today 0.11.3 — while the code targets
the 0.9 API. powerio is pre-1.0 and breaks API across minor versions:
0.11 removed `powerio.Package`, which `powermcp/solver_case.py` calls at
seven sites, and renamed most of the `powerio.mcp.server` surface.

CI on main has been red since 2026-09-06 for the same reason: run
34049789070 reports 61 failed, 283 passed on both 3.10 and 3.12, with
`module 'powerio' has no attribute 'Package'` 32 times and
`'powerio.mcp.server' has no attribute 'save'` 32 more.

Cap the ceiling at 0.10 in all thirteen declaration sites. Verified that
`powerio[mcp,matrix]>=0.9.0,<0.10` resolves to powerio 0.9.0 and that
that wheel exports both `Package` and `parse_file`.

This is the pin fix only. Moving the code to the 0.11 API is #64.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The version is declared in three places that test_package_versions_match
asserts are equal: pyproject.toml, powermcp/__init__.py, and the literal
in the assertion itself. The first commit moved only pyproject.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@qian-harvard
qian-harvard merged commit 5db4a0b into main Sep 19, 2026
2 checks passed
@qian-harvard
qian-harvard deleted the fix/powerio-ceiling-0-3-1 branch September 19, 2026 01:38
qian-harvard added a commit that referenced this pull request Sep 19, 2026
…-result

Fix PowerFactory follow-up review findings

Addresses the findings collected in #65 after #63 merged: structured
deletion results that distinguish a deleted component from a failed
graphical cleanup, read-only tools that connect on a cold server,
name-length validation and retained-name rollback, protected-cubicle
preservation, parameter coercion edge cases, confirmation tokens bound
to the component's full PowerFactory path, and packaging rules that keep
evidence, reports and tests out of the distribution.

Merged on the contributor's verification. The two open questions from
review — desktop freeze state after an add/delete cycle, and whether
PowerFactory's GetContents pattern matching is case-sensitive — need a
live PowerFactory that no maintainer here has. The contributor ran them
against a real install; the case-sensitivity question is tracked
separately rather than held against this PR.

Conflict in pyproject.toml resolved by hand: both this branch and #72
capped powerio at <0.10 independently, so the pin was identical on both
sides and only the explanatory comment differed. Kept the contributor's
one-line summary plus the concrete detail from #72.

Closes #65

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
qian-harvard added a commit that referenced this pull request Sep 19, 2026
Modernize every bridge for PowerIO 0.11.2

Resolves the conflicts that #72 introduced when it capped powerio at
<0.10 as a stopgap. All fifteen conflicts were mechanical: fourteen were
the powerio pin and the version string, resolved to the branch side,
since replacing that cap is the point of this PR.

The exception is the hatch exclude list in pyproject.toml, where main and
the branch each added different entries. Both are kept: main's
PowerFactory evidence and test exclusions, and the branch's .venv and
uv-build-cache exclusions. Verified against the built sdist, which
contains neither.

Verified on Python 3.12.4 in a clean venv (pip install -e . pytest):

  tests/                          358 passed, 19 skipped
  PowerFactory/ (not run by CI)    29 passed, 3 subtests
  python -m build + twine check    PASSED on sdist and wheel

powerio resolves to 0.11.3 under the new >=0.11.2,<0.12 pin. #77's
case-insensitive lookup fix survives the merge intact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant