Skip to content

ci: the drift job checks an installed wheel, not just the source tree - #129

Merged
Shashankss1205 merged 1 commit into
mainfrom
ci/issue-103-drift-wheel-walk
Sep 26, 2026
Merged

Shashankss1205 merged 1 commit into
mainfrom
ci/issue-103-drift-wheel-walk

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Closes #103.

#116 already delivered most of that issue's acceptance criteria: a weekly resolve that ignores uv.lock, takes the newest release of every extra, reports to the issue tracker, and does not gate pull requests. What it did not cover is the other half — "imports every subpackage from the built wheel".

Why that half matters separately

It is the shape #101 actually was: mcp>=1.2 resolved to 2.0.0 for anyone installing fresh, mcp.server.fastmcp no longer existed there, and grapharc[mcp] was broken on arrival — while every job resolving from the lockfile stayed green.

A suite run from the source tree does not see that. It misses a packaging break that only appears in an installed wheel: a subpackage dropped from the build, or an extra whose new major moves a module the package imports at import time.

So upstream-drift now builds the wheel, installs it with [all] into a clean environment resolved from pyproject.toml's ranges, and walks it.

The walk is now shared, not duplicated

It moves out of ci.yml's heredoc into scripts/wheel_import_walk.py. Two jobs need exactly this check — build against what uv.lock pins, upstream-drift against what upstream has released since — and two copies would drift apart, which is the same failure mode as the phase vocabulary in #117.

Same logic, two parameters: which checkout to compare against, and the path prefix the import must come from. scripts/ contains no grapharc package, so running the file by path does not put the checkout on sys.path — the property the old cd /tmp existed for, preserved, and now reported with a message instead of a bare assert.

It earned its keep on the first run

Run against the wheel that was sitting in dist/, it reported:

error: in the source tree but not in the wheel: ['grapharc.examples.plan_research']

Correct — that wheel predated #115. Rebuilt, it walks 132 modules clean. (Worth noting for the pending 0.1.8 upload: dist/ needed rebuilding again after #115, and has been.)

Deliberately not done

No ceilings on the eight unbounded extras. The issue asks for a decision there and argues a bound should be "a ceiling with a reason attached, not a reflex" — adding eight at once is precisely that reflex, and it would refuse users upgrades that are perfectly fine. This PR closes the detection gap, which is what the acceptance criteria specify; the pinning policy stays an open decision for you.

Verified

2,214 selected, 13 deselected, ruff check . clean. The sdist's required-files and secret-leak checks still pass with scripts/ added (it is not shipped — CI reads it from the checkout).

🤖 Generated with Claude Code

Closes #103. #116 already covered most of what that issue asked for -- a weekly
resolve that ignores `uv.lock`, reporting to the issue tracker, not gating pull
requests. What it did not cover is the criterion's other half: importing every
subpackage from the *built wheel*.

The distinction is the one #101 was: `mcp>=1.2` resolved to 2.0.0 for anyone
installing fresh, `mcp.server.fastmcp` had gone, and `grapharc[mcp]` was broken
on arrival while every locked job stayed green. A suite run from the source tree
does not see a packaging break that only shows in an installed wheel -- a
subpackage dropped from the build, or an extra whose new major moves a module
the package imports at import time.

The walk moves out of `ci.yml`'s heredoc into `scripts/wheel_import_walk.py`,
because two jobs now need exactly this check and two copies would drift apart.
Same logic, two parameters: which checkout to compare against, and the prefix
the import must come from. `scripts/` holds no `grapharc` package, so running it
by path does not put the checkout on `sys.path` -- the property the old `cd /tmp`
was there for, kept and now asserted with a message rather than a bare
`assert`.

Verified by running it for real rather than reasoning about it, and it earned
its keep immediately: against the wheel then sitting in `dist/` it reported
`grapharc.examples.plan_research` missing -- correctly, because that wheel was
built before #115 merged. Rebuilt, it walks 132 modules clean.

Deliberately **not** done: putting a ceiling on the eight unbounded extras. The
issue asks for a decision on that and argues a bound should be "a ceiling with a
reason attached, not a reflex" -- so adding eight of them at once is the reflex
it warns against, and it would refuse users upgrades that are fine. Detection is
what this closes; the policy is left open.

Verified: 2214 selected, 13 deselected, ruff clean; the sdist's required-files
and secret-leak checks still pass with `scripts/` added.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Shashankss1205
Shashankss1205 merged commit 3b5fdba into main Sep 26, 2026
14 checks passed
@Shashankss1205
Shashankss1205 deleted the ci/issue-103-drift-wheel-walk branch September 26, 2026 19:30
Shashankss1205 added a commit that referenced this pull request Sep 26, 2026
#115 and #129 merged after the release commit. 0.1.8 is still unpublished and
untagged, so folding them into its notes is right for the same reason #124 and
#128 did it.

The research registry gets a full entry: it is a shipped module and it closes
the gap that the planner's headline capability -- decomposition -- was the one
with no runnable example, while the only registry in the box demonstrated
refusal. Credited to @only-ouc, whose pull request it is.

The drift job's wheel walk goes in the tooling paragraph beside the styling
gate: it changes nothing shipped, it changes what a break in shipped behaviour
would be caught by.

Co-authored-by: Claude Opus 5 (1M context) <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.

packaging: every extra but mcp is unbounded, and the lockfile hides the next 2.0

1 participant