LyraCore test audit work list

All eight findings are resolved. PR #641 merged as ee4d292a on 2026-10-10 after all nine checks passed. PR #640 had already merged the overlapping source-check removals. PR #641 removes 22 weak tests and adds five, for 17 fewer tests against its main baseline. CI gains 359 existing tests that it previously omitted.

Pull request #641

8 done, 0 in progress, 0 pending

Eight findings from the audit of commit 6f0d8c64. This document tracks the authorized fixes and removals. This work changes tests and tooling. It does not update realms.

#WorkStatusEvidence
1Setup-only tests

Remove four construction tests that do not exercise the behavior they claim to cover.

Source files at audit baselinemodule/src/import_meta.rs
module/src/loot/mod.rs
module/src/loot/tag.rs
module/src/creatures/ai.rs
DoneFour setup-only tests removed. The rebased Module unit suite passed all 1,557 tests.
2Copied test implementations

Remove 15 tests and their private state models from GO model import, vmap lifecycle, and motion. Keep tests that call production calculations or an actual Store seam.

Source files at audit baselinemodule/src/go_model.rs
module/src/vmap.rs
module/src/motion.rs
DoneFifteen tests and their copied state models removed. Production calculations and real Store tests remain. The rebased Module suite passed.
3Non-production text accepted as executable code

Exclude comments, literals and test-only code from raw table-read checks. Preserve the documented Package API body helpers. Exercise subscription query values through the production function.

Source files at audit baselinemodule/src/test_scan.rs
gateway/src/stdb/connection.rs
DoneNine shared scanner tests passed. They cover literal and comment decoys, generic functions, final fields and exact signatures containing array lengths. One new test checks production query lists. PR #640 already removed the other overlapping source-presence checks.
4Importer fixtures share production offsets

Use fixed source column positions in quest type and reward-mail fixtures so an incorrect production offset fails the test.

Source files at audit baselineimporter/src/main.rs
DoneAll 399 enabled importer tests passed on the rebased branch. Earlier independent mutations of quest type, reward mail template and reward mail delay offsets failed as intended.
5Useful tests missing from CI

Run package-delta, module package API lint, and all Datascript suites in CI.

Source files at audit baseline.github/workflows/rust.yml
.github/workflows/runtime-scripts.yml
crates/lyracore-package-delta/tests/common/mod.rs
crates/lyracore-package-delta/tests/quest_identifiers.rs
docs/testing.md
.github/PULL_REQUEST_TEMPLATE.md
DoneCI now includes 289 package-delta tests, 44 package API checks and 26 more Bun tests (45 total). All passed locally. Fixed the stale quest fixture these new CI steps exposed. Testing docs and the PR checklist match the workflows.
6Snapshots of implementation bodies

Remove source-body equality tests that pin internal control flow and logging. Retain structural architecture checks and behavioral tests.

Source files at audit baselinegateway/src/stdb/world_store.rs
gateway/src/realm_core.rs
module/src/auth.rs
module/src/chat.rs
module/src/mail_escrow.rs
module/src/transfer/tests.rs
module/src/vmap.rs
module/src/creatures/cycle/harness.rs
DoneCompleted by merged PR #640. Its removals include all 12 implementation-body snapshots identified by this audit. The rebase preserves those deletions and does not claim them as new removals in PR #641.
7Duplicates and false idempotence claims

Remove repeated mount projections, duplicated well-fed calculations, and the duplicate shared dungeon-map assertion.

Source files at audit baselinemodule/src/mount.rs
module/src/spell/tests.rs
module/src/instance.rs
DoneThree duplicate tests removed. The remaining Module unit suite passed all 1,557 tests.
8Determinism assertion accepts two failures

Require both Datascript emissions to succeed and produce artifacts before comparing bytes. Make the refused-script fixture write synchronous.

Source files at audit baselinedatascripts/tests/emit.test.ts
DoneAll four emission tests and all 45 Bun tests passed at f794e576. The earlier exit-1 mutation failed the determinism assertion. Artifact-content assertions read emitted output.

Verification