Skip to content

Batch 19: RUST-017 follows ci/*.py scripts invoked as modules and helper-built test commands - #470

Merged
zackees merged 1 commit into
mainfrom
feat/ci-lint-batch19
Oct 26, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/ci-lint-batch19

Conversation

@zackees

@zackees zackees commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Batch 19, ci.yml part. Selftest (with PyYAML): 1647 tests OK; local gate passed.

Refs #132

RUST-017: false negative in ci/*.py scripts invoked as modules

Found while fixing running-process for #132: ci/independent_spawn.py passes test-serializing flags, but precheck reported nothing. There were two causes:

  1. Module invocation. The workflow runs the script as uv run --no-project --module ci.independent_spawn, and the scanner only followed ci/*.py paths. test_invocations now also follows -m ci.foo / --module ci.foo → ci/foo.py, only for modules under ci and only when the file exists.
  2. Helper-built commands. The test command comes from cargo_command("test", …) in ci/soldr.py, so the word "cargo" never appears as a command in the script. rust_nocapture now also treats a script as building a test command when it calls a *cargo* function whose first argument is the literal "test"/"nextest". The rest of the argv is assembled at runtime, so these findings are needs_review (the rule's existing status for that case), not violations.

Result on running-process: six new needs_review findings in ci/independent_spawn.py; the existing findings are unchanged. ci/independent_broker_docker.py stays out of scope: its flag goes to a prebuilt test binary in docker run, not to a cargo test/nextest run, and it runs a single test.

Because the module-reference change lives in the shared scanner, RUST-015, RUST-016, CPP-001, TEST-003 and PKG-010 now also see module-invoked scripts. The selftest is unchanged.

Fleet work this batch, outside this repo:

Local-Gate: v1 tree=6d9067a115b829efc55484f71761b470c85faab0 secs=102
@zackees
zackees merged commit 09faf76 into main Oct 26, 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.

1 participant