Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/upstreaming-investigator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion .github/workflows/upstreaming-investigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ You MUST investigate the project's upstream history, not just its checkout:
distinguish build/runtime/optional dependencies where the data supports it,
report omissions/conflicts explicitly, and never invent edges. A missing
project or tool failure is not an empty or complete dependency graph.
7. Audit every direct and transitive build and test dependency against both
public PyPI and `https://pypi.riseproject.dev/simple` for the proposed
riscv64 interpreter and libc matrix. Inspect actual filenames and wheel tags,
not only package-page existence. Read relevant CI logs for unexpected sdist
downloads. When public PyPI lacks a compatible wheel but the RISE index has
one, record the exact package/version/interpreter evidence and identify the
workflow environment that must receive both
`PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple` and
`PIP_PREFER_BINARY=true`. The latter prefers an available wheel but preserves
a source fallback. Distinguish pip/cibuildwheel resolution from uv, which
requires its corresponding `UV_*` index settings as well.

For every research category, record the exact queries, source URLs, findings,
search scope and whether pagination/discussion review is complete. Link concrete
Expand Down Expand Up @@ -463,7 +474,11 @@ call: `{"path": "upstreaming-out"}` (the native handler names the artifact
approve scope, with evidence:
- release coverage: which platforms and architectures the latest release
ships wheels for on PyPI, and whether riscv64 is already there;
- build backend and native dependencies;
- build backend and native dependencies, plus build/test dependency wheel
availability across the target matrix. For any dependency without a
compatible public-PyPI wheel, state whether the RISE index has a compatible
wheel and where the paired `PIP_EXTRA_INDEX_URL` and `PIP_PREFER_BINARY`
settings must propagate;
- release graph: the workflows and jobs that build, test and publish
wheels, and how they are triggered;
- existing architecture precedent: the nearest aarch64/s390x/ppc64le
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstreaming-worker.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion .github/workflows/upstreaming-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,24 @@ and analogous changes in the proposal diagnosis.
emulation/cross-build path cannot support riscv64. Follow the nearest existing
architecture precedent rather than preferring RISE runners. When required by
the selected topology, use `manylinux_2_39_riscv64` and
`musllinux_1_2_riscv64` images.
`musllinux_1_2_riscv64` images. Before finalizing any build or test workflow,
inspect its dependency declarations and CI logs for packages downloaded as
sdists on riscv64. Check public PyPI and the RISE simple index for compatible
wheels across every affected interpreter and libc. When public PyPI lacks a
compatible build or test dependency wheel but
`https://pypi.riseproject.dev/simple` has one, add both
`PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple` and
`PIP_PREFER_BINARY=true` to the narrowest environment that reaches that pip
resolver. Use the ordinary job or step `env` for native pip, `CIBW_ENVIRONMENT`
for build resolution inside cibuildwheel, and `CIBW_TEST_ENVIRONMENT` for test
dependency resolution; set both scopes when both phases need the registry.
Do not use `PIP_ONLY_BINARY`: source fallback must remain available where the
RISE index has no matching wheel. If the project invokes uv, retain the two
requested `PIP_*` settings and also configure uv's corresponding extra-index
and index-strategy settings because uv does not read pip's index variables.
Record package names, versions, tags, index evidence and propagation scope in
`diagnosis` and verify from CI that the dependency resolves as a wheel rather
than an sdist.
3. Temporary fork-only changes that let CI run on the fork (for example
removing `if: github.repository == 'owner/repo'`) go in a separate commit
whose subject starts with `{debug}`. Never when `upstream_facing` is true.
Expand Down
1 change: 1 addition & 0 deletions SESSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
- Aligned the controller's cheap comment filter with first-nonblank-line command parsing so blank-line-prefixed commands are both acknowledged and reconciled.
- Added a hash-pinned gh-aw v1.2.2 console guard that preserves canonical agent evidence while preventing untrusted model or MCP text from being parsed as GitHub Actions workflow commands.
- Replaced console-byte rewriting with GitHub's native stop-commands protocol: trusted pre/post agent steps bracket exact output with a random step-output token and always restore command processing.
- Required investigator and worker dependency audits to use the RISE simple index plus `PIP_PREFER_BINARY=true` when public PyPI lacks compatible riscv64 build/test wheels, and updated both mirrored porting-skill paths with resolver-scope guidance.
23 changes: 18 additions & 5 deletions skills/python-project-porting/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ or a repeated ask. Follow them exactly; the reference files explain the why.
- **Default to NO comments in workflows** — they are read as reference. One "why" line only for
a genuine non-obvious deviation; never narrate standard steps.
- **Never set `CIBW_BUILD_VERBOSITY`** — drop it if you inherit it from a template.
- **Do not source-build a dependency when a compatible RISE wheel exists.** Audit actual
build and test resolver logs plus both simple indexes for the complete target matrix. When
public PyPI lacks a compatible wheel but `https://pypi.riseproject.dev/simple` has one,
pass both `PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple` and
`PIP_PREFER_BINARY=true` to the exact build/test resolver environment. Prefer-binary keeps
source fallback for matrix rows the registry does not cover; never replace it with a broad
`PIP_ONLY_BINARY`. For uv commands, also set the equivalent `UV_*` index configuration.
- **Start from upstream's own build/test workflow, then delete** everything that isn't Linux
glibc/musl, and only then apply the riscv64 changes. Jobs consuming the setup matrix must
use `${{ matrix.platform }}` in build selectors, names, and artifact names instead of
Expand Down Expand Up @@ -151,13 +158,19 @@ name, repo, version, upstream build docs — come from the invoking prompt):
4. **Map the git tag to the Python version** (see gotcha 3). Take the tag as the
workflow input; derive `package_version` from the built sdist filename.

5. **Identify native deps** the bdist needs at build time. Three cases: (a) none
bundled → add `CIBW_BEFORE_BUILD` to build them in-container (cffi builds libffi
5. **Identify native and Python deps** the bdist needs at build time. Three native cases:
(a) none bundled → add `CIBW_BEFORE_BUILD` to build them in-container (cffi builds libffi
that way); (b) the sdist bundles its C sources (protobuf bundles upb/utf8_range)
→ no before-build needed; (c) the dep is another Python wheel we already ship →
`pip install` it from our registry in `CIBW_BEFORE_BUILD` (see gotcha 17).

6. **Wire up real testing** — mirror how upstream tests its wheels (gotcha 6).
`pip install` it from our registry in `CIBW_BEFORE_BUILD` (see gotcha 17). For Python
build dependencies, inspect resolver logs and wheel tags on both indexes. If public PyPI
has no compatible wheel but RISE does, propagate the paired `PIP_EXTRA_INDEX_URL` and
`PIP_PREFER_BINARY=true` settings into the build environment.

6. **Wire up real testing**: mirror how upstream tests its wheels (gotcha 6). Audit every
direct and transitive test dependency the same way. Put the paired pip settings in the
test environment when they avoid an unnecessary riscv64 sdist build, and confirm in CI
that the resolver selected a wheel.

7. **Validate locally, then push** (gotcha 9). Open a PR; the `pull_request` path
trigger runs CI for every pending version. Watch, triage, iterate.
Expand Down
6 changes: 3 additions & 3 deletions skills/python-project-porting/references/gotchas-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1383,9 +1383,9 @@ The porting gotchas (566 of them) live in [`references/gotchas/`](gotchas/), spl
- **353** — Gotcha 30's registry check has moved off redirects: unhosted packages now
answer plain `404`, not `302` — the check logic is unaffected, but scripts written
against the old behavior may misread it.
- **354** — `PIP_PREFER_BINARY` (not `PIP_ONLY_BINARY`) is the fix when our registry
hosts a wheel for only *some* matrix interpreters and an unpinned test dependency
keeps resolving to a newer, wheel-less release.
- **354**: Pair the RISE `PIP_EXTRA_INDEX_URL` with `PIP_PREFER_BINARY=true` (not
`PIP_ONLY_BINARY`) when public PyPI lacks a compatible build/test dependency wheel or an
unpinned dependency otherwise resolves to a newer, wheel-less release.
- **375** — `uv` can reject a real `abi3` wheel resolved by name from an index as "has no
usable wheels" even though the identical wheel installs fine as a local file.
- **399** — A dependency we already publish can satisfy a dependent's *runtime* link and still
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,18 @@ To pull up one entry: `grep -n '^N\. ' references/gotchas/dependencies-and-regis
version has to line up" bit for it exactly: PyPI's latest was newer than what we host,
so pip took that and built it from source, costing ~45 minutes per job (and cp314t has
no registry wheel at any pandas version, so it always builds from source regardless).
`CIBW_TEST_ENVIRONMENT: PIP_PREFER_BINARY=1` (test-phase only, per gotcha 12) tells pip
to prefer an *older* wheel-backed version over a newer sdist-only one — it dropped
cp312/cp313/cp314 to a few seconds (the registry wheel resolves) while leaving cp314t's
from-source fallback intact, which had already been confirmed to build cleanly, just
slowly. `PIP_ONLY_BINARY` would have been wrong here — it hard-fails cp314t instead of
letting it fall back to source.
The reusable setting is the pair
`PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple` and
`PIP_PREFER_BINARY=true`: the first makes the RISE wheel a candidate, while the second
lets an older compatible wheel beat a newer sdist-only release. Put both in
`CIBW_TEST_ENVIRONMENT` for cibuildwheel test dependency resolution, in
`CIBW_ENVIRONMENT` for build dependency resolution, or in the job/step `env` for a
native pip invocation. Set both scopes when both phases resolve affected dependencies.
In the clevercsv case, the test-phase setting dropped cp312/cp313/cp314 to a few seconds
while leaving cp314t's from-source fallback intact, which had already been confirmed to
build cleanly, just slowly. `PIP_ONLY_BINARY` would have been wrong here because it
hard-fails cp314t instead of letting it fall back to source. Always confirm wheel filenames/tags on
both indexes before the change and confirm the resolver selects a wheel in CI afterward.

375. **`uv` (0.12.13, riscv64) can reject a real, `--only-binary`-eligible `abi3` wheel as
"has no usable wheels" when it is resolved *by name from an index*, even though the
Expand Down
Loading