Repository navigation
#498 refactor: resolve co-core from the co-pypi index, retire the wheelhouse - #559
Merged
Merged
Conversation
…elhouse co-core and co-core-aio 0.38.0 now lock from cannobserv's Artifact Registry index (explicit [[tool.uv.index]] + a [tool.uv.sources] entry each), with a sha256 per file; the index's four 0.38.0 files equal the bucket's byte for byte. No other package moves in uv.lock. scripts/co-pypi.sh + co_pypi_token.py (ported from broker#144) mint a co-pypi-reader access token and exec one uv with the pair in its environment alone, from an allowlist, out of the lock's co-pypi group, --isolated so a release's .venv is built by its own sync only. deploy.sh runs the release's wrapper (D10) with deploy.env's key; CI's lint/test/browser jobs take the token from WIF on the uv sync --locked step alone. scripts/sync_wheelhouse.py, .wheelhouse/.gitkeep and its test go; docs, allowlists and guards follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…floored env, so it cannot pass vacuously Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sync under it stays quiet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… insecure-host and config variables before the build Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orrowed from google-auth Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
CR: findings addressed (head
|
| Item | Action | Result |
|---|---|---|
| 1 | Fixed | e433e846: the certifi sweep now runs through _unfloored(). A parametrized self-test proves the pattern catches an unfloored env, on one line and continued with \, and passes floored ones, so the sweep can't pass vacuously. |
| 2 | Fixed | 72ffa0a0: the wrapper's outer uv run is --quiet. A cold-cache deploy-shaped sync now prints 0 bytes, and an unquiet wrapped command still prints its own output. |
| 3 | Stet | The red tests and the implementation shipped in one commit. The red run was observed in-session (30 failed, 1 error). |
| 4 | Fixed | 32aa2ee2: deploy.sh unsets the caller's UV_INDEX, UV_DEFAULT_INDEX, UV_INDEX_URL, UV_EXTRA_INDEX_URL, UV_FIND_LINKS, UV_INSECURE_HOST, UV_INDEX_STRATEGY, UV_KEYRING_PROVIDER and UV_CONFIG_FILE. The new test fails against the previous deploy.sh, and passes with the change. ENVIRONMENT.md notes it. |
| 5 | Fixed | b08a0f91: cryptography>=50,<51 is in the dev group. I re-locked through bash scripts/co-pypi.sh uv lock. uv.lock gains only the two group-metadata lines, and the co-core entries are unchanged. |
Still paused before the merge and the deploy. Merge on a deploy day, after broker#85's post-window notice: not Fri 11-27, and not in the Mon 11-30 06:00–08:00Z window. The host steps are in #498 (comment). The head to merge is now b08a0f91ec0aa0a4d3767fb5095e20ef6f08b510.
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #498 (epic #503). Brief: #498 (comment). Corrections to the brief: #498 (comment)
What
co-coreandco-core-aionow resolve from cannobserv's co-pypi Artifact Registry index, and the GCS wheelhouse is retired. The shape is broker#144's.pyproject.toml: anexplicit[[tool.uv.index]] co-pypiat the org registry's URL byte for byte, plus a[tool.uv.sources]entry for each package. The pin stays at>=0.38,<0.39. A newco-pypidependency group (google-auth[requests]) holds the helper's own dependency, locked.uv.lock: only the two co-core entries change, still at 0.38.0, from.wheelhousefilenames to index URLs with sha256s. Two other lines change: the group's metadata, and google-auth'srequestsextra. The package set and every version are identical (checked by diff).scripts/co-pypi.sh+scripts/co_pypi_token.py(ported from broker#144):bash scripts/co-pypi.sh uv <cmd>mints aco-pypi-readertoken and execs that oneuv.UV_INDEX_CO_PYPI_USERNAME/_PASSWORDare set in the child's environment alone, starting from an allowlist. The token is never in argv, a file or output.uv runis--isolated.deploy.shruns the release's wrapper (D10), and a plainuv run --project <release>would fill the release's.venvwith packages hardlinked from the cache before the--link-mode copysync, sochown -Rcould reach the uv cache.scripts/deploy.sh:bash scripts/co-pypi.sh uv sync --locked --no-dev …inside the release, withARCHIVER_CO_PYPI_KEYtaken fromdeploy.env'sGOOGLE_APPLICATION_CREDENTIALS.ARCHIVER_CO_PYPI_KEYand theUV_INDEX_CO_PYPI_*pair from its caller.lint,test,browser): the wheelhouse sync step is gone. The auth step gainsid: authandtoken_format: access_token, and the pair goes on theuv syncstep alone. That step is now--locked: with a token present, an unlocked sync could re-lock against the index.scripts/sync_wheelhouse.py,.wheelhouse/.gitkeepandtests/scripts/test_wheelhouse_gitkeep.py. One/.wheelhouse/ignore line stays, so an existing checkout's files can't be committed by accident.deploy/README.md,docs/DEPLOYMENT.md(new § The co-pypi index), ENVIRONMENT (ARCHIVER_CO_PYPI_KEY), ARCHITECTURE, CONVENTIONS and SKILLS, plus thedependabot.yml/audit.ymlheaders andaudit_lock.sh's fix message. The.skills/doc maps and context-seams allowlist were re-judged.No CHANGELOG entry: no contract path is touched (
alembic/versions/,src/api/routes/,src/api/schemas/,clients/python/).Not changed:
deploy/archiver.service: its comment ("private wheels are fetched into the release at deploy time … never depends on GCS") is still true, and editing it would make the deploy install a changed unit..skills/context-loss-ok:9,:44: these quote A stored source_spec the current schema rejects cannot be edited at all #164's past text, not live text.Provenance: same bytes
The index's sha256 equals the bucket object's (
gs://co-gcs-pypi/wheels/) and the main checkout's.wheelhousecopy, for all four 0.38.0 files. The table is in the corrections comment. The new lock carries exactly those hashes.Tests
tests/test_dependency_index.py: the index rules, a sha256 per file, wheels locked, no credential in a committed URL, theco-pypigroup's closure (PyPI only, certifi included, never a default group), and the wheelhouse gone.tests/scripts/test_co_pypi_token.py: the allowlist, the key, refusals, no token in output, and the shell wrapper's argv including--isolated.tests/ci/test_ci_co_pypi.py: the token reaches the locked sync step alone, andclient-drift/changelogget no OIDC.TestWheelsbecomesTestIndexintests/deploy/test_deploy.py, against a recording fake wrapper: the release's own wrapper runs with deploy.env's key; a shell key or pair never reaches it; a failed mint switches nothing; a commit without the wrapper switches nothing. The certifi floor's fetch check now covers any--no-project --withenv, and checks that the mint runs from the floored lock.bash scripts/pre-ship.shpassed, with 6161 passed, 8 skipped, and vitest 142 passed.Rehearsal (before merge, as the brief asked)
git archive HEAD, emptyUV_CACHE_DIR, no.wheelhouse:uv sync --locked --no-devgets401 Unauthorizedonco_core-0.38.0-py3-none-any.whl.ARCHIVER_CO_PYPI_KEYfrom deploy.env,bash scripts/co-pypi.sh uv sync --locked --no-dev --compile-bytecode --link-mode copy --python /usr/bin/python3.12): rc 0 in 15.6 s.co-coreandco-core-aio0.38.0, both import, and no dev packages.home = /usr/bin.What works without a token, on a synced venv [measured]:
uv run,uv sync --lockedwith nothing to fetch,uv lock --checkanduv audit --frozen. Sopre-ship.shanddev_server.shneed no change.Known limits
deploy.shstops with "nothing switched" on a commit that has noscripts/co-pypi.sh, because its lock names.wheelhouse. A switch-back reuses the existing release, so it isn't affected.uvinherit the pair: hatchling building the editable project, andgitfor the two git-sourced SDKs. That's accepted, as in broker#144. The bound is the reader role and the token's hour.co-pypigroup is resolved from PyPI by hash at the first wrapper run on an empty cache: 11 packages, which Archiver already locks throughgoogle-cloud-storage.PYTHON_INDEX_OIDC_GCPregistry. That's cannobserv docs/DEPENDABOT.md, step 3: repo id1231433739, in both the provider condition and the registry list. My PAT can't read the registry (it needsadmin:org), so whether that's already done is unmeasured.Deploying
This deploys:
pyproject.toml,uv.lockandscripts/deploy.shchange.🤖 Generated with Claude Code