Skip to content

fix(settings): resolve reviewed hero setting names for fire-mode keys - #416

Merged
e54-bot merged 2 commits into
mainfrom
wt-414-hero-names
Oct 9, 2026
Merged

e54-bot merged 2 commits into
mainfrom
wt-414-hero-names

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #414 — the residual hero/key name divergences recorded on opy-rs#495, verified against the pinned OverPy 9.7.10 oracle and the vendored corpus artifacts.

  • table.rs: removed the dead primaryFire slot arm for enableAutomaticFire/enableScoping. No applicable hero carries a primaryFire gameplay slot, so emission hard-errored (missing setting mapping) for ana/ashe/widowmaker instead of using the reviewed literal labels (No Automatic Fire, No Scope) already in the labels table with full locale coverage.
  • hero_setting_aliases.json: pinned the oracle-verified per-hero names as reviewed aliases (same mechanism as the existing Mei enableSecondaryFire entry):
    • Secondary Fire / 辅助攻击模式 for the 14 heroes in the pinned schema's enableSecondaryFire include list whose export label is blank (anran, baptiste, cassidy, genji, illari, kiriko, mercy, moira, roadhog, symmetra, torbjorn, winston, zarya, zenyatta)
    • Roadhog en-US: Pig Pen, Pig Pen Cooldown Time, Take a Breather Cooldown Time/Maximum Time/Recharge Rate — the export carries stale Take-a-Breather-era names for ability2 and blank labels for secondaryFire
    • Vendetta secondaryFireRechargeRate% → Warding Stance Regen Scalar / 招架姿态恢复倍率
  • zh-CN provenance split: Roadhog's secondaryFire* zh-CN stays verbatim per the pinned ai-pve corpus artifact (OverPy 9.7.13 emits raw keys there — secondaryFireCooldown%: 480, secondaryFireRechargeRate%: 150), while the 9.7.10 localized spellings (呼吸器冷却时间, 呼吸器充能速度) are kept as secondary parse aliases so 9.7.10-era zh-CN text still resolves to the canonical member. En-US follows the 9.7.10 oracle and the bastion corpus (Take a Breather Cooldown Time: 100% under Roadhog).

Evidence

  • Oracle probes (9.7.10, en-US + zh-CN): probe_batch.cjs emits No Automatic Fire/No Scope (ana), Secondary Fire (genji), Take a Breather */Pig Pen * (roadhog), Warding Stance Regen Scalar (vendetta) — all matched.
  • Full applicable hero×key name-gap analysis: 20 en-US mismatches before → 0 after.
  • cargo test --workspace --all-targets, cargo fmt --all --check, cargo clippy --workspace --all-targets -D warnings, workshop-catalog-gen check: all clean.
  • New regression test pinned_hero_setting_names_emit_the_oracle_spellings covers all three fixed classes plus round-trip reparse.

Follow-ups / limits

  • zh-CN emission for the non-Roadhog pairs (e.g. 辅助攻击模式, 拴猪圈) follows the 9.7.10 oracle; no corpus artifact exercises those keys in zh-CN. Other covered locales for Secondary Fire (es-MX/fr-FR/ja-JP/th-TH/tr-TR) still emit the raw key via the blank export label — same as before; extending locale coverage is recorded scope for a later pass if a producer artifact backs it.
  • Roadhog secondaryFireMaximumTime% zh-CN falls back to the raw key, consistent with the 9.7.13 corpus family behavior.

The enableAutomaticFire and enableScoping keys were routed through a
primaryFire gameplay-slot lookup that no applicable hero carries, so
emission failed with a missing-mapping error instead of using the
reviewed literal labels (No Automatic Fire, No Scope) already in the
catalog. Drop the dead slot arm.

Pin the remaining oracle-verified per-hero fire-mode names as reviewed
aliases: the generic Secondary Fire label for the fourteen heroes the
pinned schema includes (matching the existing Mei precedent), Roadhog's
Pig Pen ability-2 names and Take a Breather secondary-fire names in
en-US, and Vendetta's Warding Stance Regen Scalar. Roadhog's zh-CN
secondary-fire spellings stay verbatim per the pinned ai-pve artifact
(OverPy 9.7.13), with the 9.7.10 localized spellings kept as secondary
parse aliases.

Fixes #414

@e54-bot e54-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent verification done against the pinned OverPy 9.7.10 oracle (vendored at opy-rs/tools/overpy/oracle, probed end-to-end via probe_batch.cjs-equivalent compiles in en-US + zh-CN), the two constrained corpus artifacts, and the alias/slot resolution paths in table.rs/parser.rs/emitter.rs. Implementation matches the evidence; approving with one minor asymmetry noted below.

Verified

  • enableAutomaticFire/enableScoping apply only to ana/ashe/widowmaker (pinned applicability only lists); none carries a primaryFire gameplay slot (gameplay.json), so the removed arm hard-errored MissingMapping for exactly its applicable heroes — confirmed by re-running the new test against the pre-fix files (fails on enableAutomaticFire as the issue describes). For heroes that do carry primaryFire (e.g. vendetta) the old arm would have emitted an unrelated ability name, so removal is strictly better even off-applicability. Oracle emits No Automatic Fire/No Scope (en-US) and 禁止自动射击/禁止开镜狙击 (zh-CN); the labels table covers all 15 locales with identical spellings.
  • Every new alias row probed against the 9.7.10 oracle, all matched. The 15-hero enableSecondaryFire set (14 new + existing mei) is exactly the oracle's enableGenericSecondaryFire include list — which the oracle renames to enableSecondaryFire in its per-hero merge (overpy.js, destKey rewrite) — so the alias direction mirrors upstream semantics. Roadhog Pig Pen/Take a Breather rows and vendetta Warding Stance Regen Scalar/招架姿态恢复倍率 verified verbatim in both locales.
  • Find-first alias ordering does what the PR intends: first zh-CN row emits the raw key (matches the 9.7.13 ai-pve artifact's secondaryFireCooldown%: 480 / secondaryFireRechargeRate%: 150), while .any() parse acceptance keeps 呼吸器冷却时间/呼吸器充能速度 resolving canonically. Empirically checked member resolution: Take a Breather Cooldown Time → secondaryFireCooldown% (bastion corpus line round-trips), Pig Pen Cooldown Time → ability2Cooldown%, Secondary Fire under Genji → enableSecondaryFire (the reviewed ENTRIES row precedes the generated enableGenericSecondaryFire row — no mis-bind), 拴猪圈/呼吸器 → enableAbility2.
  • Corpus: no fixture contains 呼吸器*/拴猪圈*/招架姿态*/辅助攻击模式 as hero settings (only Button(Secondary Fire) in rule code), so the added aliases break nothing pinned.
  • cargo test --workspace --all-targets, fmt --check, clippy -D warnings, workshop-catalog-gen check, git diff --check: all clean locally; CI green including the real-project scenarios job.
  • Side note on the Issue: its §2 list names soldier, but the oracle's actual include list contains mei+roadhog instead of soldier (soldier has the non-blank Helix Rockets label) — this PR followed the oracle, which is correct.

Minor finding (non-blocking)

  • roadhog secondaryFireMaximumTime% zh-CN is the one asymmetric cell. The PR body says it "falls back to the raw key", but zh-CN emission actually hard-errors (missing setting mapping for locale 'zh-cn', verified via CLI), and the 9.7.10 zh-CN spelling 呼吸器最长时间 stays an unresolved raw member while its siblings resolve. Since the new en-US alias now makes this member canonical, an en-US→zh-CN convert containing Take a Breather Maximum Time under Roadhog newly fails rather than emitting verbatim. Two alias rows — {roadhog, secondaryFireMaximumTime%, zh-CN, "secondaryFireMaximumTime%"} then {"呼吸器最长时间"} — would mirror the sibling keys' provenance split. Fine as a follow-up if preferred.

Pre-existing observations (out of scope, worth recording)

  • generated_hero_settings.rs has two vendetta secondaryFireRechargeRate% rows (Warding Stance Regen Scalar :966 shadowing Warding Stance Recharge Rate :978); the new alias pins the oracle-correct first one.
  • gameplay.json still lists roadhog ability2 as Take a Breather/呼吸器 while 9.7.10 heroKw has Pig Pen/拴猪圈 — only feeds parse acceptance of old spellings; emission goes through the aliases.
  • Pre-existing aliases that diverge from 9.7.10 but are pinned by the 9.7.13 corpus (sojourn 充能速度 充能射击, hazard 尖刺护体资源恢复/消耗, wreckingBall/hammond ability1Cooldown% rows) are untouched and consistent with the provenance-split policy this PR applies.
  • PR-body follow-up says non-en/zh locales emit the raw key for Secondary Fire; they actually emit the localized generic label (es-MX Disparo secundario etc.) via the labels table — same as the oracle's generic label, so reality is better than stated.

The key otherwise hard-errors MissingMapping in zh-CN: the verbatim pin keeps 9.7.13-corpus emission while the 9.7.10 spelling stays parse-accepted, matching the sibling Take a Breather keys.
@e54-bot
e54-bot merged commit 7479507 into main Oct 9, 2026
5 checks passed
@e54-bot
e54-bot deleted the wt-414-hero-names branch October 9, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hero settings emission diverges from pinned names for primary-fire slots, generic Secondary Fire, and multi-slot heroes

2 participants