Repository navigation
feat(catalog)!: retire non-native ids forcePlayerHero, stopForcingHero, forceThrottle, stopChasingVariable, isFiringSecondaryFire - #299
Conversation
Remove the non-native duplicate identities forcePlayerHero, stopForcingHero, forceThrottle, stopChasingVariable and isFiringSecondaryFire, and the extra "Set Allowed Heroes" spelling of setAllowedHeroes. Their zh-CN spellings were already carried by the native entries. workshop-catalog-gen check now fails when an action or value carries an en-US spelling absent from the committed Workshop.codes wiki inventory. BREAKING CHANGE: the retired catalog ids and the "Set Allowed Heroes" spelling no longer resolve; use startForcingHero, stopForcingCurrentHero, startForcingThrottle, stopChasingGlobalVariable/stopChasingPlayerVariable, isFiringSecondary and "Set Player Allowed Heroes". Fixes #297
Teakowa
left a comment
There was a problem hiding this comment.
Three actionable findings:
-
tools/corpus/zh-cn-corpus.json— the PR notes say this committed corpus manifest was edited by hand because regenerating from the local export drifted from the pinned commit.AGENTS.mdexplicitly forbids manually refreshing committed test/result files and only permits committed fixtures/manifests when they are reproducible, machine-validated inputs. The corpus tests now validate the hand-edited result rather than demonstrating that the declared source/generator reproduces it. Regenerate from the exact pinned source, or otherwise make this update mechanically reproducible and validated before merge. -
crates/workshop-rs/src/bin/workshop-catalog-gen.rs::native_spellings— the new guard does not fully enforce #297's “one native identity” acceptance criterion.Catalog::loadrejects duplicate aliases case-sensitively, whilenative_spellingsdeliberately normalizes wiki names to lowercase. Existing names already demonstrate real case-only differences (Move Player to TeamvsMove Player To Team,Number Of PlayersvsNumber of Players). A second entry using the alternate casing would therefore pass both checks while representing the same native Workshop element. Reject duplicate action/value native names under the same normalization used for wiki membership, and add a regression test. -
Release notes — #297 requires the retired public identities to be called out in release notes. This repo creates releases with
gh release create --generate-notes, while this PR's title only sayskeep one catalog identity per native Workshop element; the five retired Rust API ids are only listed in the PR body. Ensure the release-note source that reaches the generated GitHub Release explicitly namesforcePlayerHero,stopForcingHero,forceThrottle,stopChasingVariable, andisFiringSecondaryFire.
native_spellings now rejects a second entry whose en-US spelling matches an existing one under the same case-insensitive normalization used for wiki membership.
|
Addressed in the latest push: (2) case-insensitive duplicate detection plus regression test; (3) the PR title now names the five retired ids, so the generated release notes list them. (1) Not resolved: the pinned export ( |
Teakowa
left a comment
There was a problem hiding this comment.
Findings 2 and 3 are resolved. One blocker remains:
tools/corpus/zh-cn-corpus.json: the author confirms this manifest is still hand-edited because the exact pinnedworkshop-dataexport is unavailable locally. That still conflicts with the repository contract requiring committed test/result data to be reproducible and machine-validated. Since the corpus tests consume this file, green CI only validates the edited snapshot, not that the declared pinned source/generator reproduces it. Regenerate it from the exact pinned export (or otherwise make the committed update mechanically reproducible and validate that path) before merge.
Regenerated with workshop-catalog-gen corpus from workshop-data at d854bf01; the result matches the earlier edit apart from generatorVersion.
|
Manifest is now regenerated, not hand-edited: Caveat: the same run also merges export-derived (OverPy-sourced) locale spellings into the native |
Summary
Keep one catalog identity per native Workshop element (Fixes #297).
forcePlayerHero,stopForcingHero,forceThrottle,stopChasingVariable,isFiringSecondaryFire, and the extraSet Allowed Heroesspelling ofsetAllowedHeroes. Their zh-CN spellings were already carried by the native entries, so none moved.workshop-catalog-gen checknow fails when an action or value has an en-US spelling outside it (case-insensitive).Notes
Verification
cargo test --workspace,cargo clippy --workspace --all-targets,workshop-catalog-gen check.