Repository navigation
fix(ci): match only readcon-core entries in the version check - #146
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87a4984. Configure here.
The cleanup test treated every path under the system temporary directory as a leak. With `TMPDIR` unset that directory is `/tmp`, so a checkout there makes `build/` a child of it. A `TMPDIR` that already contains the checkout does the same. The scratch directory is created in `build/`, and the check now requires that parent. The before and after names in the system temporary directory are still compared. Kitline-Change: mvvsnvpnmqxvonlwqxwzvlmwuzpnnrnm
`mpi_library` and `accepted_corpus_rewrites_are_byte_identical` return when a compiler or MPI wrapper is missing. The `eprintln!` on that path printed during a passing run. The rewrite assertions are unchanged. Kitline-Change: ytuqkvytszvwopnxvtmklvouqlrplrok
The workflow `pull_request` trigger listed `main` and not `develop`. A pull request into `develop` never started it. Path filters stay the same list already on that trigger. Kitline-Change: lknlnvwxrlqxlzuoxzzorslqlsvpwpvo
The lockstep scan treated every token equal to VERSION as this package. A conda pin of libintl in `pixi.lock` uses the same digits and belongs to another package. The scan now requires a readcon-core package entry. `cargo update -p readcon-core` refreshes `tests/minimage-link/Cargo.lock` to that version. `tests/python/test_check_release_artifacts.py` is a fixture of fixed tags, so the check no longer requires it to contain the current version. Kitline-Change: pyrxqnxolqtvpypyurmzrklzmsyotpxz
The assert_eq! on the scratch directory's parent kept the old assert!'s wording, which claimed the scratch was in the system tempdir. That is wrong for any parent other than build/; reword it to name the actual check.
test_lockstep_gate_ignores_unrelated_conda_pins asserted that pixi.lock contains a libintl pin at VERSION, which coupled the test to that dependency's own version. A synthetic libfoo pin at VERSION, appended to a scratch copy of pixi.lock and restored in finally, exercises the same gate behavior without depending on a real package's version happening to match.
readcon_core_package_entry() missed a readcon-core package entry when: a cog-emitted version line (as in Cargo.toml and pixi.toml) sits behind a `# [[[cog ...]]]` comment rather than directly after `name`; an inline-table pin orders `path` before `version`; or a `[dependencies.readcon-core]` (also dev-/build-dependencies and target tables) declares `version` on a later line. Extend the three regexes to cover those shapes while still requiring the readcon-core name on the entry, so unrelated packages are not flagged. Add pytest cases that append each shape to a scratch copy of pixi.lock, restored in finally, and assert the gate fails naming the file.
version_sot.marker_files() scans the repository for literal cog start markers and hands every match to cogapp --check. Both the docstring of readcon_core_package_entry() in scripts/check_version_sot.sh and the cog-commented entry fixture in tests/python/test_version_sot.py contained literal marker brackets, causing cogapp --check to fail on both files. Reword the docstring without bracket sequences and build the test's synthetic marker strings dynamically, matching scripts/version_sot.py.
In readcon_core_package_entry(), the [dependencies.readcon-core] pattern used (?:[^\n\[][^\n]*\n?)*?, where the optional newline lets the outer quantifier partition any non-matching line exponentially and hang on a path-only dependency table without a version key. It also failed to cross blank lines within the table, could cross indented table headers, and matched keys ending in version such as rust-version. Match full lines ending in a mandatory newline, stop before any line starting with optional horizontal whitespace and [, allow trailing comments or whitespace on the table header, and anchor the version key to the start of its line. Add pytest cases covering blank lines in the table and a non-matching path-only table followed by another table at VERSION.
HaoZeke
force-pushed
the
fix/core-hygiene-r1
branch
from
December 4, 2026 23:01
0c560a5 to
e6c74db
Compare
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.

language_package_versions_match_cargofails ondevelop. The version lockstep scan inscripts/check_version_sot.shflagged any token equal toVERSION. A conda pin oflibintlinpixi.lockuses the same digits and belongs to another package. The scan now requires a readcon-core entry: a Cargo package record, a quoted pin, an equality pin, a conda explicit pin, or a hyphenated artifact name.tests/minimage-link/Cargo.lockis refreshed to the current version.tests/python/test_check_release_artifacts.pylists fixed tags, so it leaves the allowlist. Two new cases intests/python/test_version_sot.pycheck that an unrelated pin passes and that a stray readcon-core entry inpixi.lockfails.The scan also catches three more ways a stray readcon-core entry can be written: a version line that sits after a
# [[[cog ...]]]comment, as inCargo.tomlandpixi.toml; an inline pin that listspathbeforeversion; and a[dependencies.readcon-core]table, including the dev, build and target forms, withversionon a later line. Each shape still has to name readcon-core, so other packages pass. New cases append each shape topixi.lockand expect the check to fail and name the file. The test for unrelated conda pins no longer depends on the reallibintlpin. It appends a made-uplibfoopin at the current version and restores the file afterwards, so the next version bump cannot break it.The convert cleanup test counted every path under the system temporary directory as a leak. A checkout under
/tmp, or under aTMPDIRthat contains it, putsbuild/inside that directory, so the test failed there. It now requires the scratch directory's parent to bebuild/, and still compares the names in the system temporary directory before and after. Its failure message now says the scratch parent is notbuild/, rather than claiming the directory is in the system temporary directory.The cross-binding rewrite tests also printed to the test log during a passing run. They return early when a tool such as
gfortranormpicxxis missing, and that path no longer prints a line. Their assertions are unchanged.The Julia tests never ran on a pull request into
develop, because the workflowpull_requesttrigger listed onlymain. It now listsdevelopandmain, with the same path filters.Two follow-up fixes for the version check. The marker scan in
scripts/version_sot.pypasses every file that holds a literal cog start marker tocogapp --check. The new docstring inscripts/check_version_sot.shand a test fixture intests/python/test_version_sot.pyboth held one, soversion-sourcefailed on them. The docstring no longer spells out the marker, and the test now builds its marker strings at run time. The[dependencies.readcon-core]pattern could also backtrack without bound on a table that haspathbut noversion. It now matches whole lines, crosses blank lines in the table, stops at the next table header even when indented, accepts a trailing comment on the header, and no longer treats keys such asrust-versionasversion. New cases cover a table with blank lines and a path-only table followed by another table at the current version.