Skip to content

Pin cw to the fleet-wide ADR-0005 range - #18

Merged
thorwhalen merged 2 commits into
mainfrom
pin-cw-to-adr-0005
Sep 4, 2026
Merged

thorwhalen merged 2 commits into
mainfrom
pin-cw-to-adr-0005

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

What

One line: the cw requirement becomes cw>=0.1.1,<0.2, the fleet-wide spelling
the argh -> cw migration standardised on.

Why

Closing out the fleet migration, an audit of every cw declaration under the
projects tree (parsed with tomllib, not grepped) found 39 declarations across
36 projects
. 32 already used the canonical spelling or a cw[extra] self
reference. Six real deviations remained, and this repo was one of them.

The deviation is not cosmetic. cw ADR-0005 §5 ("the rollback drill") is written
around a consumer whose pin has an upper bound; a requirement with no <0.2
resolves to the newest release, so a future cw 0.2 -- which is explicitly
reserved for grammar changes -- would be installed automatically and change this
package's command line without anything in this repo moving. The upper bound is
the whole mechanism by which the fleet can ship a cw major without auditing every
consumer first.

Risk

None. cw 0.1.4 (current on PyPI) satisfies the old spelling and the new one
identically, so no resolution in any existing environment changes. This is a
metadata-only edit; no source file is touched.

Part of the argh -> cw programme close-out (i2mint/cw#30).

The argh -> cw migration standardised on `cw>=0.1.1,<0.2` across the fleet.
This repo was one of the few left outside that spelling, so its resolver was
free to pick up a future cw 0.2 -- the exact grammar-drift scenario the upper
bound exists to prevent (cw ADR-0005, "the rollback drill": a consumer with no
upper bound silently resolves to the newest release).

No behaviour change: cw 0.1.4 satisfies both the old spelling and the new one.

Claude-Session: https://claude.ai/code/session_01K6LB3AwUmKDxaFNZ2NqPGr
Both of these assert on the *reader* -- that an extra is returned as a list, and
that a multi-line array is read whole -- but they did it by hardcoding the exact
requirement string `cw`, using the live pyproject.toml as fixture data. Adding
the version specifier to that requirement therefore broke two tests that have
nothing to do with dependency policy, and would have broken them again on the
next pin bump.

The doctest now matches `['cw...']` with ELLIPSIS, which still shows the shape
the docstring is documenting. The array test matches on the distribution name
via the module's own `distribution_names`, which is exactly the helper that
exists to cut the version off a requirement.

Claude-Session: https://claude.ai/code/session_01K6LB3AwUmKDxaFNZ2NqPGr
@thorwhalen
thorwhalen merged commit 70b03f5 into main Sep 4, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the pin-cw-to-adr-0005 branch September 4, 2026 13:20
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