Skip to content

ci(release): gate every core bump — auto and manual — on config validation - #105

Merged
loss-and-quick merged 2 commits into
mainfrom
ci/core-compat-gate
Jun 22, 2026
Merged

ci(release): gate every core bump — auto and manual — on config validation#105
loss-and-quick merged 2 commits into
mainfrom
ci/core-compat-gate

Conversation

@loss-and-quick

@loss-and-quick loss-and-quick commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Gates the weekly release's core auto-bump on the config-validation harness, so a new xray/sing-box version whose config schema drifted from our generators can't ship a broken build — and warns about the drift days earlier.

The release pipeline already auto-bumps the pinned core versions when upstream advances. Until now nothing checked that the new core still accepts the configs we generate; a schema change (a field a core starts rejecting, or a newly-required one) would sail straight into a release. This wires the validation harness in as a gate.

  • scripts/check-core-compat.sh — stages the cores (honouring XRAY_VERSION/SINGBOX_VERSION overrides) and runs cargo test -p kasumi-core --test core_validation against them. A rejected config fails the script. Shared by both entry points below.
  • release.yml (hard gate) — in prepare, when a core bump is detected (bins_changed), it stages the new versions and runs the check before the bump/tag. A rejected config fails the job → no bump, no tag, no release, until the generators are fixed. Exactly "no release-bump if the new version needs generator changes".
  • core-compat.yml (early warning, no spam) — runs weekly (Sunday, a day before the Monday release cron) against the latest upstream cores. On drift it opens one tracking issue, deduped by a fixed title (a persistent drift never opens a second); when compatibility is restored it auto-closes that issue. So at most one open issue, ever.

Verified locally (against the staged real cores)

  • Drift caught: with the pre-fix generators, the harness rejects 4 configs (naive + 3 shadowsocks ciphers) → check fails → gate would block. ✅
  • Passes when matching: with the fix(singbox): make shadowsocks ciphers, naive uTLS, and naive libcronet work #104 generator fixes, 49/49 generated configs are accepted → gate lets the release proceed. ✅
  • actionlint (both workflows) + shellcheck (the script) clean.

Affected layer

  • frontend/ — React Web UI
  • crates/ · src-tauri/ — Rust core / backend / Tauri desktop
  • module/
  • scripts/ — build / release helpers
  • CI / .github/
  • Docs only

Verification

  • actionlint .github/workflows/core-compat.yml .github/workflows/release.yml
  • shellcheck scripts/check-core-compat.sh
  • Harness drift signal verified both ways (4 rejected pre-fix → blocks; 49/49 with fixes → passes)
  • PR CI green (the workspace core_validation test skips without staged cores, as before)

Checklist

  • Title is a scoped Conventional Commit
  • No build artifacts committed (cores stay gitignored; staged at check time)
  • No user-visible strings / project-id renames

Notes for reviewers

Update: also covers manual bumps (not just the auto-bump)

The release gate only runs in release.yml, i.e. for the auto-bump. A collaborator hand-editing core-versions.sh (or the generators) in a normal PR would have bypassed it. core-compat.yml now also triggers on pull_request touching scripts/core-versions.sh, scripts/fetch-cores-desktop.sh, or crates/kasumi-core/**, validating the versions the PR pins against the real cores. So no path — automated or manual — can land a core our generators don't match.

Note on access: triggering a release (workflow_dispatch) needs repo write access, and pushing to main is blocked by the branch ruleset (release.yml uses a dedicated RELEASE_TOKEN PAT precisely to bypass it), so an outsider can't cut a release or push a bump to begin with — this closes the remaining gap for collaborators who can.

@github-actions github-actions Bot added the ci CI / workflows (.github/) label Jun 22, 2026
@loss-and-quick loss-and-quick changed the title ci(release): gate core auto-bump on config validation against the new cores ci(release): gate every core bump — auto and manual — on config validation Jun 22, 2026
@loss-and-quick
loss-and-quick force-pushed the test/rust-more-coverage branch from 412bd3e to 9ec1d0d Compare June 22, 2026 16:47
… cores

The weekly release auto-bumps pinned core versions when upstream advances. If a
new core version's config schema drifted from our generators, that shipped a
broken build. Now the bump is gated:

- scripts/check-core-compat.sh stages the cores and runs the config-validation
  harness against them (reused by both entry points below).
- release.yml prepare runs it against the NEW versions before the bump/tag; a
  rejected config fails the job, so no release is cut until the generators are
  fixed.
- core-compat.yml runs it weekly against the LATEST upstream cores for early
  warning, opening a single deduped tracking issue on drift (and closing it when
  compatibility is restored) — no issue spam.

Verified locally against the staged cores: the harness fails (4 configs) on the
pre-fix generators and passes (49/49) with the generator fixes, exactly the
signal the gate relies on.
The release gate only covers the auto-bump. A PR that hand-edits core-versions.sh
(or the generators) could otherwise merge a pin the cores reject. Run the same
config-validation harness on PRs touching core-versions.sh / fetch-cores-desktop.sh
/ crates/kasumi-core, against the versions the PR pins — so neither path can ship
a core our generators don't match. Issue bookkeeping stays schedule-only (on a PR
the red check is the signal).
@loss-and-quick
loss-and-quick changed the base branch from test/rust-more-coverage to main June 22, 2026 17:01
@loss-and-quick
loss-and-quick merged commit 4fcde56 into main Jun 22, 2026
8 checks passed
@loss-and-quick
loss-and-quick deleted the ci/core-compat-gate branch June 22, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI / workflows (.github/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant