Repository navigation
ci: docs-only main commits don't block a swap; bench an earlier main run; tests pass on Windows - #1119
Merged
Conversation
main_moved (fetch and verify) counted every commit on main since a run's base that touched flm-dev-kit/FLM_DLL/, flm-dev-kit/FLM_Xclbin/, src/lib/ or src/xclbins/, so a pull request that only edited Markdown under FLM_DLL forced every open dev-kit pull request to merge main and run CI again before it could swap. A commit now counts only when it changes a file there that changes.py's is_non_code does not call non-code (so the two agree); anything under src/lib/ and src/xclbins/ always counts. The files are read from the trees (diff-tree), so verify's blob:none clone still fetches nothing. The unknown-base and not-an-ancestor errors are unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
A dispatch of devkit-bench.yml with build-run only accepted the Build and
Test run of the dispatched commit itself. main moves often, so naming the
previous push run on main was refused ("run is not this repository's
Build and Test run for this commit").
find-build now takes --ref (github.ref) and, for a dispatch on
refs/heads/main only, also accepts a build-run that is this repository's
Build and Test push run on main whose head is the dispatched commit or an
ancestor of it (git merge-base --is-ancestor in the resolve job's checkout,
which already fetches the full history). The plan, the head-sha output and
so the report name the run's commit, whose packages and dev-kit builds are
benched. Other branches still need the exact commit, a run found without
build-run still must be of the exact commit, and the run must still have
completed with success or failure and hold the dev-kit artifacts.
Co-Authored-By: Claude <noreply@anthropic.com>
The suite runs on Linux in CI; on Windows six tests failed and one more failed under a non-UTF-8 locale: - test_devkit_check (Synthetic and its subclass Catalog): tearDown could not delete git's read-only object files; use an rmtree that clears the read-only bit and retries (onexc on Python 3.12+, onerror before), as test_devkit_swap already does. - test_devkit_xclbin_compare test_unreadable_files_are_rows: skip when a symbolic link cannot be created (Windows without the privilege). - test_devkit_assemble_xclbins test_assemble: compare relative paths as POSIX paths. - test_devkit_rtp_lock: read and write the fixtures and the lock as UTF-8 (the lock's header has a non-ASCII character; devkit_rtp_lock.py itself already uses UTF-8). Test-only: no production behaviour changes. Co-Authored-By: Claude <noreply@anthropic.com>
A dispatch on main may bench an earlier push run, but the plan still selected models from the dispatched commit's catalog and dev-kit maps, and the bench job overlaid the engines its engines.json names. An engine or model added or renamed on main in between would ask the overlay for a library the run never built, or bench a model its packages do not hold. resolve.py plan now always reads the catalog, engines.json and kernel_assignment.json of the benched commit (the plan's head_sha) on a dispatch, and fails rather than fall back to another commit's when it cannot read them (the resolve checkout has the whole history). The bench job checks out flm-dev-kit/FLM_DLL at that commit on a dispatch and passes its engines.json to devkit-overlay-package, which gains an optional engines input. Co-Authored-By: Claude <noreply@anthropic.com>
verify runs the pull request's code, and changes.py is not in SWAP_CI_PATHS (a new model family edits it and comes with its swap). With main_moved calling changes.is_non_code, a pull request could widen NON_CODE and make verify ignore source commits on main, accepting a stale swap. devkit_swap.py, which is in SWAP_CI_PATHS, now holds a copy of the pattern, and a test pins it equal to changes.py's. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
…artifact The bench job checked out flm-dev-kit/FLM_DLL at needs.resolve.outputs.head-sha to read the benched commit's engines.json. Code scanning flags a checkout of a computed commit followed by cached steps in a workflow the default branch also runs (schedule) as cache poisoning: 8 high alerts and 1 medium on this pull request. resolve already has a full-history checkout: it now reads that engines.json with git show (data only, after checking the sha and that the file parses) and uploads it as devkit-bench-engines; the bench job downloads it. No bench job checks out a computed commit any more. Co-Authored-By: Claude <noreply@anthropic.com>
zaneni6
marked this pull request as ready for review
November 23, 2026 23:51
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.
Summary
Three follow-ups found while running the swap flow for real (#1094, #1114).
1. Documentation-only commits on main no longer make a swap stale
devkit_swap.pymain_moved(used byfetchandverify) counted any commit on main touchingflm-dev-kit/FLM_DLL/,flm-dev-kit/FLM_Xclbin/,src/lib/orsrc/xclbins/since the tested run's base, even one that only changed Markdown. #1103 only edited two.mdfiles underFLM_DLL/, and #1114 had to merge main and re-run full CI before it could swap.src/lib/orsrc/xclbins/always counts.devkit_swap.pykeeps its own copy ofchanges.py'sNON_CODEpattern rather than importing it:devkit_swap.pyis swap CI,changes.pyis not, so a PR could otherwise widen the docs list to hide source commits on main fromverify. A test keeps the two copies identical.git diff-tree), soverify'sblob:noneclone still downloads no binary.2. A
devkit-bench.ymldispatch on main can bench an earlier push runfind-buildonly accepted a Build and Test run of the dispatched commit itself, so on a moving main the window was tiny (a dispatch with the previous push run was refused).refs/heads/mainwithbuild-run: the run may also be this repository's Build and Test push run on main whose head is an ancestor of the dispatched commit (same repository and workflow, completed success or failure, with dev-kit builds).head_sha, the report, the model selection (catalog,engines.json,kernel_assignment.jsonread at that commit; the plan fails if they cannot be read), and theengines.jsonthe overlay uses (a new step checks outflm-dev-kit/FLM_DLLat that commit).build-run, still need the exact commit.3. The CI unit tests pass on Windows
Tests only, no production change: an
rmtreethat clears read-only.gitobjects (test_devkit_check, also inherited byCatalog), a skip when a symlink cannot be created,as_posix()path comparisons, and explicit UTF-8 intest_devkit_rtp_lock(it failed under a cp1252 locale).Testing
MainMoved(docs-only, code, binaries,.mdundersrc/, merge commits, the error cases), theNON_CODEcopy matchingchanges.py, andfind-build/ plan for an ancestor push run on main, its refusals (other branch, non-ancestor, pull_request, dispatch, fork, other workflow, cancelled, no dev-kit builds) and the run's maps.devkit_check.pyandcheck_internal_refs.pypass.🤖 Generated with Claude Code