Commit Graph
3 Commits
Author SHA1 Message Date
RickiNanoandClaude Opus 5.5 41e675e35d Preferences: show Effect Cache, which the engine reads (#204)
The prefs_usage test skipped prefs.rs entirely, so it never saw
Session::apply_prefs read performance.effectCacheMb, and the working
setting stayed in HIDDEN_UNTIL_IMPLEMENTED. The test now scans the
`impl Session` blocks of prefs.rs, as the scorecard's prefs audit does,
and the setting is shown again.

With the field visible, the web build could take a budget up to
65536 MB, more than wasm's 4 GiB address space, so the cache could grow
until allocation aborts. The new Performance::effect_cache_budget_bytes
caps it at WASM_MEMORY_USAGE_CAP_MB on the web, as
effective_memory_usage_mb does, and converts with saturating_mul: on
wasm32 the old `mb << 20` truncated mod 4 GiB (4096 MB became 0, 5000 MB
became 904 MB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:46:28 +01:00
aiongg 065c2c2beb test: keep split modules visible to the source scans
The i18n coverage scan and prefs_usage stopped reading a file at its first `#[cfg(test)] mod`. A split parent declares `#[cfg(test)] mod tests;` before the rest of its code, so the scans skipped that code, and on main an inline test module in the middle of panels.rs hid the code after it. Both now drop only the body of an inline test module.

The prefs audits in scorecard and prefs_usage count a read when the section and the field appear in the same file. Both now also treat a split module (`foo.rs` with `foo/`) as one file, and prefs_usage leaves out `engine/src/prefs/` as scorecard already does, since that directory now holds the rest of the prefs model.

On main and on this branch: the i18n coverage report is identical (2,142 source keys; the old scan found 2,049 on main), `cargo xtask scorecard --check` is up to date, and prefs_usage passes.
2026-10-26 22:54:56 +00:00
aiongg a6428d3dfb Build each crate's integration tests as one binary
Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs; helper modules under tests/common move with them.

These keep their own binary (own process):
- engine panic_hunt: a process-wide panic hook counts every panic.
- engine text_gamma: changes the process-wide text gamma.
- engine smart_filter_stages, mask_cache_purge: assert on global caches.
- codecs pnm_peak_memory: reads the process's peak RSS.
- photocraft mac_menu_appkit: harness = false.
2026-10-22 16:55:34 +00:00