Skip to content

fix(ci): close release/wheel smoke harness drift gap (#995)#996

Merged
dekobon merged 3 commits into
mainfrom
fix/995-smoke-harness-drift
Jun 30, 2026
Merged

fix(ci): close release/wheel smoke harness drift gap (#995)#996
dekobon merged 3 commits into
mainfrom
fix/995-smoke-harness-drift

Conversation

@dekobon

@dekobon dekobon commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the CI coverage gap behind #995: the release/wheel smoke harnesses
only run on a v* tag (or an opt-in PR label), so three assertions rotted
silently across breaking changes and blocked the v2.0.0 cut. This makes
that drift surface on a PR instead of at release time.

(#995 is already closed; this PR carries the implementation + review
remediations on the fix/995-smoke-harness-drift branch.)

What changed

Per-PR coverage (the actual gap)

Extraction (so embedded scripts can't silently rot again)

  • Moved the inline wheel smokes into checked-in scripts/smoke/
    (lib_wheel_smoke.py, cli_wheel_smoke.sh), invoked by both wheel
    workflows and gated locally: mypy --strict + ruff (wired into the
    py-* make targets) and shellcheck. Runnable via make smoke.

Per-PR dry-run (Option 2)

  • smoke-dryrun.yml runs those scripts against a cheap dev build
    (cargo build + maturin develop) on PRs touching the wheel plumbing
    or the smoke scripts.

Lesson #80 captures the two intertwined failure modes (tag-gated
assertions rot; as_f64()-coercing mirrors verify nothing).

Scope note

OS-package (.apk/.deb/.rpm) build validation stays tag-gated by
design — a signed multi-arch build needs the Alpine/abuild toolchain and
is too heavy for a per-PR job. release.yml is deliberately not a
smoke-dryrun trigger (its packaging smoke isn't extracted, so a dev-build
run would be a hollow green check); the arch-qualified .apk asset name
from c53e504b guards bug #1's regression.

Review

Ran review, code-review, rust-optimize, audit-tests on the branch.
All code-review findings fixed in fix(ci): address review findings
(commit on this branch): Windows Git Bash path regression in the CLI smoke,
the Python script escaping the lint gate (now wired in + verified by
injection), a duplicated maturin-cleanup block (hoisted to PY_EXT_CLEAN),
the release.yml hollow-trigger, and an inaccurate cyclomatic comment.
audit-tests verdict: PASS (the new test's discriminating power confirmed
by a reverted perturbation).

Validation

make pre-commit green; make smoke passes both legs; actionlint,
shellcheck, ruff, mypy --strict clean; the exact smoke-dryrun.yml
build/smoke invocations reproduced locally.

dekobon added 3 commits June 29, 2026 14:18
Three stale smoke assertions blocked the v2.0.0 cut because the
release/wheel smoke scripts only run on a `v*` tag, so breaking
changes rotted them undetected (#530 integer metrics, #614
AnalysisError -> AnalysisFailure rename). Close the recurring class:

- Pin #530 integer-metric JSON serialization in a per-PR CLI test
  (cli_metrics_json_serializes_integer_metrics_as_integers) with a
  float negative control; the existing as_f64()-coercing round-trip
  tests could not catch it. The AnalysisFailure rename was already
  pinned per-PR in big-code-analysis-py/tests/test_batch.py.
- Extract the inline library + CLI wheel smokes into checked-in,
  lint-gated scripts under scripts/smoke/ (mypy --strict + ruff;
  shellcheck), referenced by both wheel workflows and runnable via
  `make smoke`.
- Add smoke-dryrun.yml: a path-filtered PR job that runs those
  scripts against a cheap dev build (cargo build + maturin develop)
  when the release/wheel plumbing changes, so a future rename or
  serialization change reds a PR check instead of a release.

OS-package (.apk/.deb/.rpm) build validation stays tag-gated by
design (Alpine/abuild cost); the arch-qualified .apk asset name
shipped in c53e504 guards that packaging regression.

Fixes #995
Remediate findings from review / code-review of the #995 branch:

- cli_wheel_smoke.sh: write fixtures to a *relative* mktemp dir, not an
  absolute /tmp path. The python-cli-wheels.yml windows-latest leg runs
  under Git Bash against the native bca.exe; an absolute MSYS path would
  not survive POSIX->Windows arg translation and the smoke would red on
  a correct wheel. The old inline code used cwd-relative names.
- Makefile: gate scripts/smoke/lib_wheel_smoke.py under py-lint /
  py-fmt-check / py-typecheck (ruff + mypy --strict, bindings config) so
  the extracted script does not drift outside every per-PR gate — the
  exact failure this branch exists to fix (lesson #80). The CHANGELOG's
  "mypy --strict / ruff" claim is now actually enforced.
- Makefile: hoist the duplicated maturin 0-byte-.so / abi3-shadow
  cleanup into one PY_EXT_CLEAN variable shared by py-test, py-stubtest,
  and smoke-lib (the review caught a third drifting copy).
- smoke-dryrun.yml: drop release.yml from the path trigger (the dev-build
  run validates none of its deb/rpm/apk packaging, so it produced a
  hollow green check) and reword the header so it no longer overclaims to
  catch src-side metric/API renames — those are caught per-PR by
  format_smoke.rs / test_batch.py, which the comment now states.
- cli_wheel_smoke.sh: document that the EXPECTED_TAG match is a
  deliberate substring (tag vs Cargo pre-release punctuation can differ),
  so it is not "tightened" into a release blocker.
- format_smoke.rs: correct the cyclomatic.sum=3 derivation comment
  (unit base + function entry + if; else adds nothing under McCabe).
@dekobon dekobon merged commit abc812c into main Jun 30, 2026
55 checks passed
@dekobon dekobon deleted the fix/995-smoke-harness-drift branch June 30, 2026 16:57
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