Skip to content

Resolve referenced sibling pull requests on macOS and Windows - #738

Open
zardus wants to merge 2 commits into
masterfrom
feature/cle-ci-sync-binaries
Open

Resolve referenced sibling pull requests on macOS and Windows#738
zardus wants to merge 2 commits into
masterfrom
feature/cle-ci-sync-binaries

Conversation

@zardus

@zardus zardus commented Aug 11, 2026

Copy link
Copy Markdown
Member

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

The ci jobs cle inherits resolve the sibling pull requests a description names. Test macos-15 and Test windows-2022, which this workflow defines itself, did not: they took binaries from master, and their own uv sync took archinfo and pyvex from master too, since [tool.uv.sources] pins both there.

Both jobs now read every reference out of the body the way resolve_refs.py does and write no-sources-package plus upgrade-package to a uv configuration file under the runner temporary directory, so uv sync resolves that package from the pull request head and leaves the checkout untouched. This description names angr/archinfo#367, so the run on it exercises the path. angr/angr#6821 and angr/angr-management#1716 now carry this same mechanism.

Validation: #738 (comment).

The ci job cle inherits from angr/ci-settings resolves a sibling angr/binaries
pull request out of the description before it builds, but Test macos-15 and
Test windows-2022, which this workflow defines itself, check out binaries
master unconditionally. A cle change that needs a new fixture therefore passes
every inherited job and fails those two until the fixture lands.

Both jobs now read the reference out of the pull request body the way
resolve_refs.py does: angr/binaries#<number> or a pull request URL, first one
found, and its head only while that pull request is still open. A push, or a
body naming no binaries pull request, takes master. The body reaches the step
as an environment variable and only the digits extracted from it reach the ref,
so nothing in it is interpreted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@zardus

zardus commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Validation record for head b15360222433ca153c9369111fe44f7d2829bc90 against baseline 45c6509c753d07f740099035cd41f7f473dc6f31. This replaces the post-sync uv pip install --reinstall-package the branch previously carried: all three of angr/angr#6821, #738 and angr/angr-management#1716 now use one mechanism.

  • Mechanism: the reference becomes no-sources-package plus upgrade-package in a uv configuration file under $RUNNER_TEMP, and UV_CONFIG_FILE carries it to every later uv command in the job, so the override sits inside uv's own resolver instead of being applied on top of a finished sync. One resolution, one lock, and nothing to undo afterwards. Both settings are needed and neither works alone, checked on uv 0.12.1 against a throwaway project pinning archinfo to branch = "master": with no-sources-package alone the pin is dropped and archinfo resolves from PyPI, source = { registry = "https://pypi.org/simple" }, not from the pull request; with upgrade-package alone resolution fails outright, Requirements contain conflicting URLs for package `archinfo` in all marker environments: - git+https://github.com/angr/archinfo.git@master - git+https://github.com/angr/archinfo@refs/pull/367/head; with both, source = { git = "https://github.com/angr/archinfo?rev=refs%2Fpull%2F367%2Fhead#a5f11be91c0c6f4483dfb9bf7e3517f73febb7a4" }, that pull request's head. The alternatives remain unavailable: a uv.toml rejects a sources table outright, and override-dependencies is ignored for a package that already has a source.
  • --no-sync is gone from Run tests, so that line is back to what master has and the whole change is additive. It is no longer needed: because UV_CONFIG_FILE is exported for the rest of the job, the sync uv run performs on its own resolves the same thing rather than putting master back. Both jobs show it, Updated https://github.com/angr/archinfo (a5f11be91c0c6f4483dfb9bf7e3517f73febb7a4) during Run tests.
  • UV_CONFIG_FILE does not displace the project's own [tool.uv]: with the file set, default-groups from pyproject.toml still applied, so the only thing the file changes is the package being overridden.
  • End to end: this description named ArchPcode: Report no program counter for a language that declares none. archinfo#367 when the run triggered, and both jobs logged Installing archinfo from angr/archinfo#367, wrote no-sources-package = ["archinfo",] with upgrade-package = ["archinfo @ git+https://github.com/angr/archinfo@refs/pull/367/head",], and then uv sync itself installed + archinfo==9.3.3.dev0 (from git+https://github.com/angr/archinfo@a5f11be91c0c6f4483dfb9bf7e3517f73febb7a4), that pull request's head, in place of archinfo master da171ca, while pyvex stayed on master 90e9094. 225 passed and 9 skipped on both: macOS, Windows
  • The worktree the sync leaves behind, checked on 2b0085b, a commit carrying one extra step for this purpose that is not part of the change and has since been dropped, everything else identical: on both runners git status --porcelain --untracked-files=all listed ?? uv.lock and nothing else, which uv sync writes on its own and master's sync writes too, git diff --stat printed nothing and git diff --exit-code passed, so no tracked file changed. uv pip freeze in the same step reported archinfo at a5f11be and pyvex at master. The configuration file was written to /Users/runner/work/_temp/uv-sources.toml and D:\a\_temp\uv-sources.toml, outside the checkout: https://github.com/angr/cle/actions/runs/31585579428/job/94078525296 and https://github.com/angr/cle/actions/runs/31585579428/job/94078525694
  • Resolution against the real dependency graph, locally: uv lock on this pyproject.toml with the file the step writes for ArchPcode: Report no program counter for a language that declares none. archinfo#367 resolved 61 packages in one pass, took archinfo from refs/pull/367/head, and left pyvex on master.
  • Resolver, the run: block taken verbatim out of ci.yml and driven with bash --noprofile --norc -eo pipefail, the way a shell: bash step runs, against the real GitHub API:
  • Binaries: the combined step this branch used to carry is split back into the same Resolve the angr/binaries ref step Resolve referenced sibling pull requests in the coverage tests angr#6821 and Resolve referenced sibling pull requests in the test jobs angr-management#1716 use, byte for byte. Driven the same way it gives refs/pull/168/head for the open Regenerate caches for clarirs binaries#168, and master for merged Add fixtures for cle loader cases that had no real binary binaries#176, for a body naming only a sibling, and for an empty body. In the run above both jobs logged Checking out angr/binaries at master, this description naming no binaries pull request, so the two resolvers work independently.
  • Shared text: the run: script of Resolve the angr/binaries ref is sha256 0297b9806c9d2f6ebd9a4c5d… in all four workflows across the three repositories that carry it, and the run: script of Resolve referenced sibling pull requests is sha256 b0e3646b08d1a133c4a60f0f… in all four. This copy carries one extra YAML key, working-directory: cle, because the checkout is a subdirectory of the workspace here; nothing inside the script differs.
  • Lint: actionlint 1.7.12 with shellcheck 0.11.0 on ci.yml, clean on both the merge base and this head; pre-commit run --all-files in cle passes and leaves the tree unchanged.
  • Not run: the workspace Python gate, since this changes no Python.

Everything on this head is green, 19 checks of 19. ci / Test (0), an inherited job this change does not touch, failed once on rex's test_write_what_where_shadowstack, an exploit-generation test, and passed on re-run; the run before it, on the same description and the same inherited workflow, passed that job first time.

Caveats: a description edit does not retrigger CI and a re-run replays the original event payload, so a reference has to be in the description when the run starts. A GitHub API failure while checking that a referenced pull request is open leaves that sibling on master rather than failing the job. Only a [tool.uv.sources] entry pointing at a github.com repository can be overridden, matched by URL, so a path or registry source is left alone. Because the override now goes through the resolver, a sibling head that genuinely conflicts with the rest of the graph fails the sync instead of being installed over an already-resolved environment; that is the intended trade for a coherent lock.

@zardus zardus closed this Aug 11, 2026
@zardus zardus reopened this Aug 11, 2026
@angr-bot

Copy link
Copy Markdown
Member

Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/cle_738

@zardus zardus changed the title Check out a referenced angr/binaries pull request on macOS and Windows Resolve referenced sibling pull requests on macOS and Windows Aug 12, 2026
@zardus
zardus force-pushed the feature/cle-ci-sync-binaries branch from cd25d62 to 9ad26c0 Compare August 12, 2026 08:10
Test macos-15 and Test windows-2022 sync their own environment with uv, and
tool.uv.sources pins archinfo and pyvex to the master branch of their
repositories, so a cle change that needs a sibling fix is tested against master
and fails in those two jobs while every inherited job passes.

Every repository named in tool.uv.sources is now resolved out of the body the
same way the angr/binaries reference already was, in the two spellings
resolve_refs.py accepts, and only while the referenced pull request is open.
The first reference to each is written to a uv configuration file in the runner
temporary directory as no-sources-package plus upgrade-package, and
UV_CONFIG_FILE points the rest of the job at it. uv sync then resolves that
package from refs/pull/<number>/head and every other sibling from master, in one
lock, so nothing has to be reinstalled over the top and the test run no longer
needs --no-sync to keep master from coming back.

The configuration lives outside the checkout, so no tracked file changes, and a
pull request that names no sibling installs exactly what it installed before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@zardus
zardus force-pushed the feature/cle-ci-sync-binaries branch 2 times, most recently from 2b0085b to b153602 Compare August 12, 2026 10:05
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.

2 participants