Skip to content

chore: CI + scripts cleanup (review items #12 #13 #24 #31 #32 #37)#108

Merged
okhsunrog merged 1 commit intomainfrom
chore/ci-and-scripts-cleanup
Apr 26, 2026
Merged

chore: CI + scripts cleanup (review items #12 #13 #24 #31 #32 #37)#108
okhsunrog merged 1 commit intomainfrom
chore/ci-and-scripts-cleanup

Conversation

@okhsunrog
Copy link
Copy Markdown
Owner

Six small review-list items rolled into one PR — all CI/dev-tooling, no runtime behaviour change.

# Where What
#12 `Dockerfile` Pin Rust to 1.95.0 and cargo-ndk to 4.1.2. Was floating `stable` + latest cargo-ndk on monthly image rebuild. Versions in ENV vars for one-line bumps.
#13 `ci.yml` + `Dockerfile` Add shellcheck step covering 11 .sh files (module-side + dev tooling). `-e SC2034,SC3043` excludes Magisk `SKIPUNZIP` (read externally) and `local` in Android sh (mksh supports it). shellcheck added to image; inline `apt-get install` fallback for the window before image rebuild.
#24 `ci.yml` keystore `printf '%s\n'` instead of heredoc. Heredoc without single-quoted EOF re-expands `$`, backticks, backslashes in values.
#31 `release.py::patch_file` Hard-fail if a regex pattern doesn't match (was silently leaving stale versions when source format drifted).
#32 `release.py` + `changelog_lib.py` Split `rotate_fragments_into_history` into rotate + delete. release.py now `save_json` + `write_md` BEFORE unlinking fragment files — if anything fails, the run is retryable.
#37 `codegen-interfaces.py` + regenerated test modules Emit `assert!(x, msg)` / `assert!(!x, msg)` instead of `assert_eq!(x, true/false, msg)`. Was firing `clippy::bool_assert_comparison` on every generated row under `cargo clippy --tests`. CI clippy steps now pass `--tests` so the class of regression is caught.

Verified

  • `uvx ruff check && uvx ruff format --check` clean.
  • `shellcheck -x -e SC2034,SC3043 …` passes on all 11 files.
  • `cargo ndk -t arm64-v8a clippy --tests -- -D warnings` passes for both `zygisk` and `lsposed/native`.

Image-rebuild note

Both `#12` (rust pin) and `#13` (shellcheck) only fully take effect after the next `ci-image.yml` run, which triggers on push-to-main with paths-filter on `Dockerfile`. The `apt-get install` fallback inside the shellcheck step covers the gap; `#12` is harmless until then (CI keeps using whatever was in the previous image, which is `stable` anyway).

No changelog (CI/dev-tooling).

Six small review-list items rolled together — all CI/dev-tooling, no
runtime behaviour change.

  #12  Dockerfile: pin Rust 1.95.0 and cargo-ndk 4.1.2 (was floating
       `stable` + latest cargo-ndk on monthly rebuild). Versions live
       in ENV vars to make the next bump a one-line edit.

  #13  Add shellcheck to lint job. SC2034/SC3043 excluded — Magisk
       reads SKIPUNZIP externally; Android's /system/bin/sh (mksh on
       Pixel) does support `local` despite POSIX. Verified locally
       that the 11 .sh files (module-side + dev tooling) pass.
       shellcheck baked into the CI image via apt; inline apt-get
       fallback covers the window before image rebuild.

  #24  ci.yml keystore.properties: replace heredoc with `printf '%s\n'`.
       Heredoc without single-quoted EOF re-expands $, backticks and
       backslashes in the password — printf takes the value verbatim.

  #31  scripts/release.py::patch_file now hard-fails when a regex
       pattern doesn't match (was silently leaving stale versions).

  #32  Split rotate_fragments_into_history into rotate + delete steps
       so release.py can save_json + write_md *before* unlinking the
       fragment files. If anything in between fails, fragments are
       still on disk and the run is retryable.

  #37  codegen-interfaces.py: emit `assert!(matches_vpn(…), msg)` /
       `assert!(!matches_vpn(…), msg)` instead of
       `assert_eq!(matches_vpn(…), true/false, msg)` —
       clippy::bool_assert_comparison was firing on every generated
       row under `cargo clippy --tests`. Both generated test modules
       regenerated. CI's clippy steps now also pass `--tests` so this
       class of regression is caught.
@okhsunrog okhsunrog merged commit a4d2f9c into main Apr 26, 2026
13 checks passed
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