diff --git a/.changeset/host-steal-detection.md b/.changeset/host-steal-detection.md deleted file mode 100644 index d2cb0bd..0000000 --- a/.changeset/host-steal-detection.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"kit": minor ---- - -host: detect CPU steal at callback-deadline kills (detection only) - -The per-callback kill switch is wall-clock only, and a true fuel/instruction -budget is impossible on this stack (wazero v1.12.0 / extism v1.7.1 expose no -fuel/epoch/gas metering API). So a CPU-steal-throttled VM can blow the deadline -on a guest running pure, well-behaved guest code, and that kill is booked as a -fault that can quarantine a healthy game. - -This change MEASURES host-stolen CPU at the kill site and records it alongside -the existing deadline metric — detection only, no behavior change: - -- A failure-tolerant, build-tagged steal sampler reads ONLY the /proc/stat - aggregate hypervisor-STEAL field (Linux; a no-op ok=false stub elsewhere), - sampled at callback BOUNDARIES, never per-instruction. cgroup throttling is - deliberately NOT read: steal blames the host (the eventual exonerate case), - whereas cgroup throttle blames the guest (a runaway you must not exonerate). -- A new NON-BREAKING optional `StealMetrics` extension interface is recorded via - a type assertion at the wall-clock-kill site, so existing Metrics implementers - compile and run unchanged. fault(), quarantine, and End() are untouched; the - existing GameCallbackDeadline record is never replaced or suppressed. diff --git a/CHANGELOG.md b/CHANGELOG.md index fd94f83..0a30aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # kit +## 2.14.0 + +### Minor Changes + +- b5f722c: host: detect CPU steal at callback-deadline kills (detection only) + + The per-callback kill switch is wall-clock only, and a true fuel/instruction + budget is impossible on this stack (wazero v1.12.0 / extism v1.7.1 expose no + fuel/epoch/gas metering API). So a CPU-steal-throttled VM can blow the deadline + on a guest running pure, well-behaved guest code, and that kill is booked as a + fault that can quarantine a healthy game. + + This change MEASURES host-stolen CPU at the kill site and records it alongside + the existing deadline metric — detection only, no behavior change: + + - A failure-tolerant, build-tagged steal sampler reads ONLY the /proc/stat + aggregate hypervisor-STEAL field (Linux; a no-op ok=false stub elsewhere), + sampled at callback BOUNDARIES, never per-instruction. cgroup throttling is + deliberately NOT read: steal blames the host (the eventual exonerate case), + whereas cgroup throttle blames the guest (a runaway you must not exonerate). + - A new NON-BREAKING optional `StealMetrics` extension interface is recorded via + a type assertion at the wall-clock-kill site, so existing Metrics implementers + compile and run unchanged. fault(), quarantine, and End() are untouched; the + existing GameCallbackDeadline record is never replaced or suppressed. + ## 2.13.0 ### Minor Changes diff --git a/package.json b/package.json index 8bcfe11..cfbb4ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kit", - "version": "2.13.0", + "version": "2.14.0", "private": true, "description": "Version management for the shellcade gamekit (Go module + CLI). Versions and changelogs are driven by changesets; binaries by GoReleaser.", "scripts": { diff --git a/rust/Cargo.toml b/rust/Cargo.toml index e5a13f5..e2a3cd7 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -15,7 +15,7 @@ [package] name = "shellcade-kit" -version = "2.13.0" +version = "2.14.0" edition = "2021" # #[unsafe(no_mangle)] (emitted by shellcade_game! so expansions survive # edition-2024 game crates) stabilized in 1.82.