Repository navigation
test(settings): pin parse/check/emit agreement on members and blocks - #466
Merged
Merged
Conversation
Adds a standalone check_emit_agreement target that runs parsed sources and producer-built settings trees through parse -> check -> emit and asserts the accept/reject verdict is identical at every reachable stage. Covered areas per #459: hero settings members (the #438 slot-guard shape and its accepted counterparts) and catalogued versus uncatalogued keyed blocks (the #413/#424 carried-block shapes), including the producer-only RawGroup pass-through marker and unwritable leaf shapes. Sensitivity was verified in both directions before commit: dropping the hero-slot check guard makes check accept members emit still rejects, and reverting the catalogued carried-block arm makes check reject blocks emit still accepts; in both cases the new tests fail as designed. No source changes were needed: the covered surface is currently consistent. Fixes #459
Teakowa
approved these changes
Oct 15, 2026
Teakowa
left a comment
Contributor
There was a problem hiding this comment.
Reviewed line by line and verified locally: the new tests run green against the PR code, coverage matches the issue's acceptance criteria, and the documented sensitivity proofs hold.
# Conflicts: # crates/workshop-rs/Cargo.toml
# Conflicts: # crates/workshop-rs/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a standalone
check_emit_agreementtest target (new[[test]]incrates/workshop-rs/Cargo.toml+tests/check_emit_agreement.rs, 10 tests) that runs parsed sources and producer-builtSettingstrees through parse → check → emit and asserts the accept/reject verdict is identical at every reachable stage, per #459.Covered areas:
doctrine+enableAbility3/ability3Cooldown%/enablePassive) are rejected bycheckwith the missing-slot diagnostic and fail emission with the missing-mapping error; the accepted counterparts (gameplay-name resolution, reviewed label rows, shared labels, carried raw members) pass both stages.key { ... }blocks whether or not the key is declared; both stages reject the team-position cases (unknown hero).RawGrouppass-through at team/mode/top-level/hero positions vs resolvedGroupat the same positions, typed leaves inside carried blocks, misplacedWorkshop/leaf nodes, kind mismatches — all asserted to agree.Disagreements found: none — the covered surface is currently consistent, so no source fix was needed.
Sensitivity proof (both directions, run before commit):
unemittable_hero_memberguard (src/settings/check.rswalk_heroes) → check acceptsdoctrine/enableAbility3while emit still fails withmissing setting mapping→ 2 tests fail.(Group\|RawGroup, None)incheck_member→ check rejectslobby/Map Rotation { }(does not match its table kind) while emit accepts → 4 tests fail.Test plan
cargo test -p workshop-rs --test check_emit_agreement→ 10 passedcargo test -p workshop-rs --lib→ 314 passed (settings_pipeline, audit_regressions, emitter, parser all green)cargo test -p workshop-rs --test integration→ 199 passedcargo fmt --all -- --check→ clean;cargo clippy --workspace --all-targets -- -D warnings→ clean;git diff --check→ cleanFixes #459