Skip to content

Resolve referenced sibling pull requests in the test jobs - #1716

Closed
zardus wants to merge 2 commits into
masterfrom
feature/am-ci-sync-binaries
Closed

zardus wants to merge 2 commits into
masterfrom
feature/am-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 Test jobs in ci.yml and coverage.yml run their own uv sync, and [tool.uv.sources] pins archinfo, pyvex, cle, claripy, angr and bintrace to a git branch of master, so a change needing a sibling change was built without it. This extends the binaries-only scan added here to all six, in the two spellings resolve_refs.py accepts, taking the first reference to each while it is open.

The reference becomes no-sources-package plus upgrade-package in a uv configuration file under the runner temporary directory, so uv resolves that package from the pull request head, keeps the rest on master, and writes nothing into the checkout. angr/angr#6821 and angr/cle#738 now carry this same mechanism.

Validation: #1716 (comment).

The pyinstaller / Build on macos-15-intel check is red for a reason unrelated to this change: building angr's Rust extension there fails in the core_affinity2 crate with error[E0308]: mismatched types at core_affinity2-0.16.1/src/lib.rs:885, which libafl 0.16.1 pulls in. That is angr/angr#6890. Every other check on this pull request passes.

@angr-bot

Copy link
Copy Markdown
Member

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

@zardus

zardus commented Aug 11, 2026 •

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Validation record for head d060e080a06b96bf803cc6776e31830334b3e3d8 against baseline 1de552537627152c06a673c5f917083823fde1ec. The head is unchanged: this is the mechanism the other two have now adopted, so nothing here needed to move. All three of angr/angr#6821, angr/cle#738 and #1716 now use one mechanism, and the two shared steps are byte-identical across them.

  • 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, re-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.
  • UV_CONFIG_FILE does not displace the project's own [tool.uv]: with the file set, default-groups from pyproject.toml still applied and the extra group was still installed, so the only thing the file changes is the package being overridden.
  • End to end, unchanged from the run this record already covered: with the description naming Check out a referenced angr/binaries pull request on macOS and Windows cle#738, every job that runs uv sync logged Installing cle from angr/cle#738, wrote no-sources-package = ["cle",] with upgrade-package = ["cle @ git+https://github.com/angr/cle@refs/pull/738/head",] to $RUNNER_TEMP/uv-sources.toml, and installed cle==9.3.3.dev0 (from git+https://github.com/angr/cle@9ad26c0), that pull request's head, instead of cle master 45c6509, while archinfo, pyvex, claripy and angr all came from their master branches and uv run pytest afterwards re-synced nothing: ci.yml ubuntu-24.04-arm, macOS, Windows, coverage.yml Build. Those same runs logged Checking out angr/binaries at master, so the two resolvers work independently.
  • The worktree the sync leaves behind: git diff --stat empty, so no tracked file changed, and git status --porcelain reporting only ?? uv.lock, which uv sync writes itself, plus ?? test_durations.json in coverage.yml from the durations cache. The configuration file is written under $RUNNER_TEMP and never in the checkout. That check ran on d1ac5bb8, a commit carrying an extra step for this purpose that is not part of the change, everything else identical: ci.yml ubuntu-24.04-arm, macOS, Windows, coverage.yml Build
  • Resolution against the real dependency graph, locally: uv lock on this pyproject.toml with the file the step writes for the current description, which names both Resolve referenced sibling pull requests in the coverage tests angr#6821 and Check out a referenced angr/binaries pull request on macOS and Windows cle#738, resolved the same 248 packages CI resolves in one pass, took angr from refs/pull/6821/head at f892974 and cle from refs/pull/738/head at b153602, the current heads of those two, and left angr-data, archinfo, bintrace, claripy and pyvex on master. Overriding two siblings at once therefore resolves as cleanly as one.
  • Resolver, the run: block taken verbatim out of both workflows and driven with bash --noprofile --norc -eo pipefail, the way a shell: bash step runs, against the real GitHub API. The two workflows carry byte-identical blocks:
    • angr/cle#738 and the github.com/angr/cle/pull/738 spelling each produce no-sources-package = ["cle",] and the matching upgrade-package; a body naming several siblings produces all of them
    • merged Place rebased objects in the free space, not one granule at a time cle#735 is reported closed and produces nothing; Add fixtures for cle loader cases that had no real binary binaries#176 and Add types and declarations for Go stdlib. angr-data#1, neither in [tool.uv.sources], produce nothing and make no API call; prose with no reference, an empty body, which is what ${{ github.event.pull_request.body }} evaluates to on a push and on a workflow_dispatch, and an unset PR_BODY, all write no file and leave UV_CONFIG_FILE unset
    • two references to one repository take the first
    • a body of angr/cle#738 $(touch …) `touch …` ; touch … && rm -rf / | id ${IFS} angr/cle#$(id -u) $(id)/$(id)#1 ../../etc#7 angr/cle;id#738 resolves refs/pull/738/head and nothing else, executes none of it, and leaves the canary file it would have created absent; only digits reach the URL and the body reaches the step through PR_BODY
    • angr/angr#6821 selects the angr entry and not angr-data, and angr/angr-data#1 selects neither here, since the match is on the quoted URL and the trailing quote keeps one from matching the other
    • run against the exact live description text of all three pull requests, each resolves only its intended siblings; this description's own validation link matches the URL spelling but overrides nothing, angr-management not being in its own [tool.uv.sources]
  • Binaries: unchanged, and byte-identical to the copies Resolve referenced sibling pull requests in the coverage tests angr#6821 and Check out a referenced angr/binaries pull request on macOS and Windows cle#738 now carry. 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. The earlier end-to-end runs stand: with the description naming Add fixtures for cle loader cases that had no real binary binaries#176 all five jobs logged Checking out angr/binaries at refs/pull/176/head and checked out 9141d93, and with no reference all five logged Checking out angr/binaries at master and made no API call.
  • 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. cle's copy carries one extra YAML key, working-directory: cle, because its own checkout is a subdirectory of the workspace there; nothing inside the script differs.
  • Lint: actionlint 1.7.12 with shellcheck 0.11.0 on both workflows reports the same five pre-existing SC2086 notes as the merge base and nothing new; pre-commit run --all-files in angr-management passes and leaves the tree unchanged.
  • Not run: the workspace Python gate, since this changes no Python.

Everything on this head is green apart from the one job noted here. The one red check, coverage.yml Report, is unrelated: it fails at Upload test coverage to Codecov with gpg: Can't check signature: No public key, because the action cannot verify the Codecov CLI download. Every coverage.yml run in this repository's recent history fails there, including master at 1de55253, this branch's base. That job runs no uv command and is untouched here.

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 repositories [tool.uv.sources] takes from GitHub can be overridden, matched by URL, so a reference to anything else is ignored. Because the override 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. pyinstaller-build.yml runs its own uv sync through nightly-build.sh and is left alone here.

@zardus zardus closed this Aug 11, 2026
@zardus zardus reopened this Aug 11, 2026
@zardus
zardus force-pushed the feature/am-ci-sync-binaries branch from d1ac5bb to d060e08 Compare August 12, 2026 09:19
@zardus zardus changed the title Check out a referenced angr/binaries pull request in the test jobs Resolve referenced sibling pull requests in the test jobs Aug 12, 2026
@zardus
zardus force-pushed the feature/am-ci-sync-binaries branch from d060e08 to f1513cd Compare August 18, 2026 18:55
@codecov

codecov Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.69%. Comparing base (c7e75a4) to head (1c599fd).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1716      +/-   ##
==========================================
+ Coverage   57.68%   57.69%   +0.01%     
==========================================
  Files         316      316              
  Lines       36929    36929              
  Branches     4397     4397              
==========================================
+ Hits        21303    21307       +4     
+ Misses      14885    14883       -2     
+ Partials      741      739       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zardus
zardus force-pushed the feature/am-ci-sync-binaries branch from f1513cd to b71cbbe Compare August 19, 2026 05:49
zardus and others added 2 commits August 22, 2026 17:18
The ci job angr-management inherits from angr/ci-settings resolves a sibling
angr/binaries pull request out of the description before it builds, but the
test jobs in ci.yml and coverage.yml, which this repository defines itself,
check out binaries master unconditionally. An angr-management change that needs
a new fixture therefore passes every inherited job and fails those 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>
The test jobs now check out a referenced angr/binaries pull request, but they
also run their own uv sync, and every sibling in [tool.uv.sources] is pinned to
a git branch of master. An angr-management change that needs an angr or cle
change is therefore built against master, where that change does not exist, and
fails for a reason the pull request already explains.

The same body is now scanned for owner/repo#<number> and pull request URLs
naming any repository that [tool.uv.sources] takes from GitHub. The first
reference to each, while it is open, 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 then resolves that one
package from refs/pull/<number>/head and every other sibling from master, in
the same lock as the rest of the environment.

The configuration lives outside the checkout, so no tracked file changes and
the worktree is as clean as an unmodified sync leaves it. Nothing is written
when the body names no sibling, which is every push and every workflow_dispatch.
Only digits extracted from the body reach the URL, and the body reaches the step
as an environment variable, so nothing in it is interpreted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@zardus
zardus force-pushed the feature/am-ci-sync-binaries branch from b71cbbe to 1c599fd Compare August 22, 2026 17:19
@zardus

zardus commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Closing this in favour of #1723, for the same reasons as angr/angr#6821.

This adds 122 lines across ci.yml and coverage.yml, because both the sibling-resolution block and the angr/binaries ref block are pasted into each of the two workflows. #1723 does the binaries half in 8 lines by calling the composite action in angr/ci-settings (angr/ci-settings#123), so the logic is defined once for the whole organisation.

The sibling-resolution half should not be here at all: pointing a Python sibling at a pull request branch belongs in tool.uv.sources in pyproject.toml, which behaves the same locally and in CI and needs no workflow code.

#1723 is currently red only because it references the action at master, where angr/ci-settings#123 has not landed; that clears on merge.

Apologies for the churn — I filed #1723 without checking this one first.

@zardus zardus closed this Aug 24, 2026
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