Skip to content

ci-local-merge: list a PR's files from the paginated files API - #476

Merged
ymote merged 1 commit into
mainfrom
fix/ci-merge-pr-files
Oct 11, 2026
Merged

ymote merged 1 commit into
mainfrom
fix/ci-merge-pr-files

Conversation

@ymote

@ymote ymote commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Why

tools/ci-local-merge.sh 473 refused #473 although its local CI evidence was complete: the script listed the PR's files with gh pr diff --name-only, and GitHub's diff endpoint refuses a diff over 20,000 lines (#473 adds about 34,000, mostly the generated designs and evidence frames App Flow keeps). #473 was then merged by running the script's own checks, unchanged, with the file list from the paginated files API (see its merge comment).

What

  • pr_files lists the files from gh api --paginate repos/{owner}/{repo}/pulls/<n>/files, each file's path plus a renamed file's old path, which is how the workflows' pull_request path filters see a rename. Names with spaces survive (one line per file).
  • The script refuses when GitHub lists fewer files than changedFiles (the listing stops at 3,000), since the triggered workflows would then be unknown.
  • docs/local-ci.md says where the files come from.

Tests

  • python3 -m unittest tools/test_ci_local.py: 38 tests, including the new PullRequestFiles (paginated listing, renamed paths, a name with spaces).
  • python3 -m unittest discover -s tools -p 'test_*.py': 153 tests.
  • Live: pr_files(473) returns 235 files, equal to the PR's changedFiles and to git diff --name-only of its range.

🤖 Generated with Claude Code

`gh pr diff --name-only` refuses a diff over 20,000 lines, so the merge
script could not work out which workflows #473 triggers (it adds about
34,000 lines of generated designs and evidence frames) and refused it.

List the files from GitHub's paginated pulls/<n>/files instead, with a
renamed file's old path as the pull_request path filters see it, and
refuse when GitHub lists fewer files than the PR changes (the listing
stops at 3,000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote

ymote commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

Local CI passed on 04b3671 (tools/ci-local.sh --only desktop,phone --linux-host --offload, 53m14s, Darwin arm64; the ubuntu jobs and the macOS jobs' portable steps (their macOS steps ran here) on the Linux build host, Linux x86_64).

GitHub would run for this PR: desktop.yml, phone.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.

Job Step Result Time
ci-local / drift The local mapping fits the workflows PASS -
desktop.yml / desktop Prepare the pinned framework sources PASS 3s
desktop.yml / desktop (linux) Prepare the pinned framework sources PASS 0s
desktop.yml / desktop (linux) One copy of every shell source PASS -
desktop.yml / desktop (linux) One Makepad, App Hub, octos and Rinx in the locked graph PASS 2s
desktop.yml / desktop (linux) The native apps' generated places match native-apps.json PASS 0s
desktop.yml / desktop Compile the desktop with the shared runtime PASS 18m12s
desktop.yml / desktop Desktop tools and scripts PASS 1m17s
desktop.yml / native-host-api Prepare the pinned framework sources PASS 5s
desktop.yml / native-host-api Build the native acceptance host and pinned Hub CLI PASS 16m34s
desktop.yml / native-host-api Signed app tool calls a real OS permission API PASS 6s
phone.yml / home (linux) Prepare pinned sources and the reviewed runtime patch PASS 0s
phone.yml / home (linux) Verify the single runtime graph PASS 1s
phone.yml / home (linux) The native apps' generated places match native-apps.json PASS 0s
phone.yml / home (linux) The pinned octos revision PASS -
phone.yml / home (linux) Build octos (unless cached) PASS -
phone.yml / home (linux) Build Home, App Hub admission and runtime policy tests PASS 3m00s
phone.yml / home (linux) Test Home, App Hub admission and runtime policy PASS 39s
phone.yml / home (linux) Two-lane scenario (real kernel, scripted model) PASS 27s
phone.yml / home (linux) Build opt-in AppCard tests PASS 2m38s
phone.yml / home (linux) Test opt-in AppCard PASS 1s
phone.yml / home (linux) Build craft-engine relay and system-chat tests PASS 2m45s
phone.yml / home (linux) Test craft-engine relay and system chat PASS 4s
phone.yml / home (linux) Build linked Terminal tests PASS 2m25s
phone.yml / home (linux) Test linked Terminal PASS 1s
phone.yml / home (linux) Build Wasm and runtime policy tests PASS 1m16s
phone.yml / home (linux) Test Wasm and runtime policy PASS 11s
phone.yml / home Prepare pinned sources and the reviewed runtime patch PASS 3s
phone.yml / home Validate launcher icons and Apple asset catalogs PASS 7s
phone.yml / home Compile Home and its bundled modules PASS 16m48s
linux-host / sandbox (linux) python3 tools/setup.py PASS 0s
linux-host / sandbox (linux) Process sandbox on Linux (Landlock, seccomp) PASS 1m29s

Notes:

  • GitHub runs Python 3.12; this run used Python 3.9.6
  • GitHub runs Python 3.12; the Linux host used Python 3.14.4

@ymote
ymote merged commit 3eef447 into main Oct 11, 2026
2 of 3 checks passed
@ymote
ymote deleted the fix/ci-merge-pr-files branch October 11, 2026 02:46
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