Repository navigation
fix(settings): reject hero settings members for slots the hero lacks - #438
Merged
Merged
Conversation
check_emission now rejects a hero-scoped settings member when no reviewed label names it and gameplay data proves the hero has no corresponding ability slot, instead of letting emission fail with a missing-mapping error or spell a malformed placeholder. Unknown heroes and generated labels keep existing behavior. Fixes #429
This was referenced Oct 15, 2026
Teakowa
added a commit
that referenced
this pull request
Oct 15, 2026
…466) 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 Co-authored-by: Teakowa <git@teakowa.dev>
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
Closes #429.
The audit's remaining live defect for this issue was a validation gap: a
hero-scoped settings member like
Doctrine { enableAbility3: Off }passedcheckand then failed emission with amissing setting mappingerror —or worse, risked spelling a malformed
%1$srow for a hero that has nocorresponding ability slot at all.
check_emission'swalk_heroesnow rejects such a member when it is notraw, has no reviewed per-hero display label, and the gameplay catalog
proves the hero lacks the ability slot. Unknown heroes keep the previous
behavior, and slots the hero does own (e.g. Doctrine
ability1Cooldown%,whose label is composed from gameplay names) still emit and round-trip.
Investigated audit findings already covered on
main(PR #433):wreckingBallcanonical mapping —wrecking_ball_hero_settings_emitand
wrecking_ball_zh_label_binds_secondary_firecover the en and zhlabel bindings; no stale
hammondmapping remains.mode_inherited_setting_resolves_typedandgame_mode_start_all_slots_filled_resolvescover typed resolution;self-referential suggestions were not reproducible.
ability1Cooldown%under rowless heroes — resolved through thegameplay-name template; the new check keys on missing ability slots,
not on absent generated rows.
Test plan
cargo test -p workshop-rs --lib audit_regressions— 26 pass,including the new
hero_member_without_slot_is_rejected_by_checkcargo test --workspace --all-targets— all suites passcargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,workshop-catalog-gen -- check,git diff --check