From e6d0fa9597bf80f2bd7760c1522d3c6ed77a51ba Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 19 Nov 2026 00:22:57 +0000 Subject: [PATCH] Clean up wonder achievement titles; release viewer 226 engine 159 --- docs/achievements.md | 11 +++++++++ server/src/achievements.rs | 10 ++++---- web-client/docs/viewer-publishing.md | 12 ++++++++++ web-client/package-lock.json | 4 ++-- web-client/package.json | 2 +- web-client/release/achievement-assets.json | 2 +- web-client/release/engine-package.json | 2 +- web-client/scripts/nonfaction-assets.test.mjs | 17 ++++++++++++-- web-client/src/achievements.test.ts | 23 +++++++++++++++---- 9 files changed, 66 insertions(+), 17 deletions(-) diff --git a/docs/achievements.md b/docs/achievements.md index b7afc583..aa387102 100644 --- a/docs/achievements.md +++ b/docs/achievements.md @@ -12,6 +12,17 @@ its existing engine hooks. The web-client tests check the generated API against `@boardgamers/protocol` **0.11.0** types and runtime schemas; there is no separate JavaScript scoring implementation. +## Viewer 0.1.226 / engine 0.4.159 — revision 7, 46 definitions + +Removes “: Recorded as Built” from the eight individual wonder titles: Great +Arena, Great Pyramids, Great Gardens, Great Library, Great Lighthouse, Great +Mausoleum, Great Statue and Great Wall. IDs, detailed descriptions, conditions, +icons, award behavior and catalog order remain unchanged from revision 6. +Tests retain the historical revision-5 fixture with an explicit eight-name +allowlist alongside the revision-6 addition/order expectations. Publish the matching +viewer and engine to activate revision 7 through the BGS achievement installer. +No artwork uploads, backfill, live-game changes or history repair. + ## Viewer 0.1.225 / engine 0.4.158 — revision 6, 46 definitions Adds **50 Points** (`score-50`): “Finish a game with at least 50 victory points in diff --git a/server/src/achievements.rs b/server/src/achievements.rs index 989a2b5a..c7c6de08 100644 --- a/server/src/achievements.rs +++ b/server/src/achievements.rs @@ -181,7 +181,7 @@ pub fn definitions() -> Manifest { })); definitions.extend(WONDERS.map(|(_, id, name)| Definition { id: id.into(), - name: format!("{name}: Recorded as Built"), + name: name.into(), description: format!("Finish with {name} recorded as built by your civilization. Destroyed wonders and merely owning captured wonders do not count."), icon: Some(Icon::Asset { key: format!("achievement-{id}") }), })); @@ -200,7 +200,7 @@ pub fn definitions() -> Manifest { icon: Some(Icon::Asset { key: format!("achievement-faction-{slug}") }), })); Manifest { - revision: 6, + revision: 7, achievements: definitions, } } @@ -358,7 +358,7 @@ mod tests { #[test] fn manifest_and_real_end_turn_for_all_lengths() { let manifest = definitions(); - assert_eq!(manifest.revision, 6); + assert_eq!(manifest.revision, 7); assert_eq!(manifest.achievements.len(), 46); assert_eq!( manifest @@ -665,7 +665,7 @@ mod tests { FACTIONS.iter().map(|(name, _)| (*name).into()).collect() ); let manifest = serde_json::to_value(definitions()).unwrap(); - assert_eq!(manifest["revision"], 6); + assert_eq!(manifest["revision"], 7); assert_eq!(manifest.as_object().unwrap().len(), 2); let entries = manifest["achievements"].as_array().unwrap(); assert_eq!(entries.len(), 46); @@ -806,7 +806,7 @@ mod tests { .iter() .find(|entry| entry.id == id) .unwrap(); - assert_eq!(entry.name, format!("{name}: Recorded as Built")); + assert_eq!(entry.name, name); assert_eq!( entry.description, format!( diff --git a/web-client/docs/viewer-publishing.md b/web-client/docs/viewer-publishing.md index a72884b4..38ff417d 100644 --- a/web-client/docs/viewer-publishing.md +++ b/web-client/docs/viewer-publishing.md @@ -1618,3 +1618,15 @@ the full viewer bundle and engine, then verify installer-owned revision 6 and th exact ordered catalog in both public and admin metadata. Preserve gallery, Standard length default and unrelated metadata. No backfill, live-game moves, history repair or Fossil refresh. See `docs/achievements.md` for the catalog contract. + +# Viewer 0.1.226 / engine 0.4.159 — wonder title cleanup + +The eight individual wonder titles now contain only their wonder names (no +“: Recorded as Built” suffix). All 46 definitions retain their revision-6 IDs, +descriptions, conditions, icons and order; evaluator and award behavior are unchanged. +Publish the matching viewer and engine after both release-commit CI workflows pass. +Verify installer-owned revision 7 in public and admin metadata against the exact +46-definition engine catalog. Download and byte-verify the frozen viewer and engine +and all 58 existing named assets; upload no artwork. Preserve gallery, Standard +length default and unrelated metadata. No backfill, live-game changes, history repair +or Fossil refresh. Historical fixtures and activation receipts remain untouched. diff --git a/web-client/package-lock.json b/web-client/package-lock.json index bb9a3c05..9f882037 100644 --- a/web-client/package-lock.json +++ b/web-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@boardgamers/clash-web-client", - "version": "0.1.225", + "version": "0.1.226", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@boardgamers/clash-web-client", - "version": "0.1.225", + "version": "0.1.226", "dependencies": { "@boardgamers/protocol": "0.11.0", "lucide-svelte": "^0.577.0", diff --git a/web-client/package.json b/web-client/package.json index 7412396f..6260482c 100644 --- a/web-client/package.json +++ b/web-client/package.json @@ -1,6 +1,6 @@ { "name": "@boardgamers/clash-web-client", - "version": "0.1.225", + "version": "0.1.226", "private": true, "type": "module", "scripts": { diff --git a/web-client/release/achievement-assets.json b/web-client/release/achievement-assets.json index b50c0dd8..1ba97488 100644 --- a/web-client/release/achievement-assets.json +++ b/web-client/release/achievement-assets.json @@ -13,7 +13,7 @@ "web-client/src/civilization-emblems.ts": "01b0cbf3fa77a8466532ccd73d63c1a3ddc9bbc79fc06ce7224b425322a9c9f0", "web-client/src/civilization-flags.ts": "cd176076bfe05b3059093b80c88596b7ae46b77898695c6c7406cbe1a3a0f78b", "server/src/content/civilizations.rs": "73602f3db506f3dc2dbc6de43d01179440fd3bb034c997ff209336faaef2a332", - "web-client/package-lock.json": "c5436f27b8198441b70fb5b5ad0d8cf231fc1fdfd6982f064811ced63aca68ec", + "web-client/package-lock.json": "3105337a05dc96f7ef1c1ffa8094c44ca12d18d4004bbafe834b11c024d5a29a", "web-client/node_modules/lucide-svelte/dist/Icon.svelte": "f7b49ab842c143fa680fa8bd9a54a9efdc48c2e2d49fa574bd5ccf8f6cfca5be", "web-client/node_modules/lucide-svelte/dist/defaultAttributes.js": "5b8981c6e3434ae6538716af9e0403554e7708c4087f18d060950a7bef00d96a", "web-client/node_modules/lucide-svelte/LICENSE": "668dcc52803480e0a026b31140a4cae668772663cd764e5991d252eef03f98db" diff --git a/web-client/release/engine-package.json b/web-client/release/engine-package.json index 978be049..f3785356 100644 --- a/web-client/release/engine-package.json +++ b/web-client/release/engine-package.json @@ -1,6 +1,6 @@ { "name": "@boardgamers/clash-server", - "version": "0.4.158", + "version": "0.4.159", "description": "Clash of Cultures: Monumental edition engine for Boardgamers Space", "license": "MIT", "type": "commonjs", diff --git a/web-client/scripts/nonfaction-assets.test.mjs b/web-client/scripts/nonfaction-assets.test.mjs index 3219ed24..38b41330 100644 --- a/web-client/scripts/nonfaction-assets.test.mjs +++ b/web-client/scripts/nonfaction-assets.test.mjs @@ -73,12 +73,23 @@ test('generated engine schema, 46 definitions sharing 41 existing assets', async const engine = createRequire(import.meta.url)(process.env.CLASH_TEST_ENGINE ?? '../.engine/server.js'); assert.ok(inspectEngine(engine).compatible); const m = engine.achievementDefinitions(); - assert.equal(m.revision, 6); + assert.equal(m.revision, 7); assert.equal(m.achievements.length, 46); const baselineManifest = JSON.parse( await readFile(path.join(root, 'web-client/src/fixtures/achievements-revision-5.json'), 'utf8'), ); const previous = new Map(baselineManifest.achievements.map((a) => [a.id, a])); + // Revision 7 changes only these eight names; keep the revision-5 fixture historical. + const wonderNames = new Map([ + ['built-great-arena', 'Great Arena'], + ['built-great-pyramids', 'Great Pyramids'], + ['built-great-gardens', 'Great Gardens'], + ['built-great-library', 'Great Library'], + ['built-great-lighthouse', 'Great Lighthouse'], + ['built-great-mausoleum', 'Great Mausoleum'], + ['built-great-statue', 'Great Statue'], + ['built-great-wall', 'Great Wall'], + ]); const expectedIds = [ ...baselineManifest.achievements.slice(0, 10).map((a) => a.id), 'score-30', @@ -105,7 +116,9 @@ test('generated engine schema, 46 definitions sharing 41 existing assets', async description: 'Finish a game with at least 50 victory points in the final state.', icon: { type: 'asset', key: 'achievement-score-40' }, } - : previous.get(id), + : wonderNames.has(id) + ? { ...previous.get(id), name: wonderNames.get(id) } + : previous.get(id), ), ); const factions = JSON.parse( diff --git a/web-client/src/achievements.test.ts b/web-client/src/achievements.test.ts index 4ce787cc..6be64c9b 100644 --- a/web-client/src/achievements.test.ts +++ b/web-client/src/achievements.test.ts @@ -22,7 +22,7 @@ const finish = () => engine.tryMove(fixture, JSON.stringify({ Playing: 'EndTurn' test('WASM achievement catalog follows official protocol 0.11.0', () => { const manifest = achievementManifestSchema.parse(hooks.achievementDefinitions()); - assert.equal(manifest.revision, 6); + assert.equal(manifest.revision, 7); assert.equal(manifest.achievements.length, 46); assert.deepEqual( manifest.achievements.slice(10, 22).map((a) => a.id), @@ -63,8 +63,8 @@ test('WASM achievement catalog follows official protocol 0.11.0', () => { const nonfactionArt = JSON.parse( readFileSync(new URL('../release/achievement-assets-nonfaction.json', import.meta.url), 'utf8'), ); - assert.equal(nonfactionArt.revision, 3, 'revision 6 reuses the existing objective artwork'); - assert.equal(art.revision, 2, 'revision 6 preserves the existing faction artwork'); + assert.equal(nonfactionArt.revision, 3, 'revision 7 reuses the existing objective artwork'); + assert.equal(art.revision, 2, 'revision 7 preserves the existing faction artwork'); assert.deepEqual( [ ...new Set( @@ -81,13 +81,24 @@ test('WASM achievement catalog follows official protocol 0.11.0', () => { } }); -test('revision 6 preserves all 45 previous definitions with the explicit new catalog order', () => { +test('revision 7 permits only eight wonder renames alongside revision 6 additions and order', () => { // Captured from the generated ba8ee4e2 / engine 0.4.157 catalog before rebuilding. const previous: AchievementManifest = JSON.parse( readFileSync(new URL('./fixtures/achievements-revision-5.json', import.meta.url), 'utf8'), ); const manifest = hooks.achievementDefinitions(); const previousById = new Map(previous.achievements.map((a) => [a.id, a])); + // Revision 7 changes only these eight names; keep the revision-5 fixture historical. + const wonderNames = new Map([ + ['built-great-arena', 'Great Arena'], + ['built-great-pyramids', 'Great Pyramids'], + ['built-great-gardens', 'Great Gardens'], + ['built-great-library', 'Great Library'], + ['built-great-lighthouse', 'Great Lighthouse'], + ['built-great-mausoleum', 'Great Mausoleum'], + ['built-great-statue', 'Great Statue'], + ['built-great-wall', 'Great Wall'], + ]); const expectedIds = [ ...previous.achievements.slice(0, 10).map((a) => a.id), 'score-30', @@ -114,7 +125,9 @@ test('revision 6 preserves all 45 previous definitions with the explicit new cat description: 'Finish a game with at least 50 victory points in the final state.', icon: { type: 'asset', key: 'achievement-score-40' }, } - : previousById.get(id), + : wonderNames.has(id) + ? { ...previousById.get(id), name: wonderNames.get(id) } + : previousById.get(id), ), ); });