From 4b0471d89158f94855816361778bf10decd04248 Mon Sep 17 00:00:00 2001 From: Marsh Macy Date: Wed, 25 Nov 2026 23:07:42 -0800 Subject: [PATCH 1/2] Keep the gate fuzz's probe word out of a cache's description The gated fixture's level 2 cache was described as "A ferryman's strongbox.", and the gate fuzz asserts that "ferryman" never reaches the player view. Since 2.6.0 the players read a cache's description once it is in view, so the fuzz failed whenever it placed the party beside that cache. The description no longer uses the word, which stays in the gate's wiring alone. Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3 --- tests/crawl_fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/crawl_fixtures.py b/tests/crawl_fixtures.py index f4ffeb13..1811ed11 100644 --- a/tests/crawl_fixtures.py +++ b/tests/crawl_fixtures.py @@ -431,7 +431,7 @@ def build_gated_adventure() -> Adventure: FeatureSpec( id="vault", kind="treasure_cache", - description="A ferryman's strongbox.", + description="An iron strongbox.", cell=(1, 0), item_ids=("silver_seal",), ), From abae51f934c613f03f8975bb5e4f3d91561db4e3 Mon Sep 17 00:00:00 2001 From: Marsh Macy Date: Wed, 25 Nov 2026 23:07:42 -0800 Subject: [PATCH 2/2] Prepare osrlib 2.8.0 Set the version to 2.8.0, date the changelog section, and point the three tests that read the unreleased section at the 2.8.0 section. Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3 --- CHANGELOG.md | 5 ++++- pyproject.toml | 2 +- tests/test_can_back_stab.py | 8 ++++---- tests/test_feature_description_docs.py | 10 +++++----- tests/test_view_spell_lists.py | 6 +++--- uv.lock | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b87133f..052eef47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [2.8.0] - 2026-11-25 + ### Added - [`MapFeatureView.emptied`][osrlib.crawl.views.MapFeatureView.emptied] is true for an authored treasure cache the party has emptied (#316). The cache stays in `features` under the same `id` and description, so a client can draw it opened, and the flag is true exactly when `TakeTreasure` would refuse the cache with `exploration.feature.emptied`. Before, the view's feature list didn't mark an emptied cache, so a client kept offering it. @@ -710,7 +712,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - The documentation site: quickstart, guides, front-end walk-throughs, and a full reference for every command, event, rejection code, message code, RNG stream, and content id. - The typed surface: complete type hints under `py.typed`, checked in CI. -[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...HEAD +[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.8.0...HEAD +[2.8.0]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...v2.8.0 [2.7.0]: https://github.com/mmacy/osrlib-python/compare/v2.6.0...v2.7.0 [2.6.0]: https://github.com/mmacy/osrlib-python/compare/v2.5.1...v2.6.0 [2.5.1]: https://github.com/mmacy/osrlib-python/compare/v2.5.0...v2.5.1 diff --git a/pyproject.toml b/pyproject.toml index 3fd19026..57e96b41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "osrlib" -version = "2.7.0" +version = "2.8.0" description = "B/X (1981 Basic/Expert) tabletop RPG rules engine for turn-based dungeon crawlers" readme = "README.md" # The wheel ships Open Game Content (osrlib/data/*.json and its LICENSE-OGL.md diff --git a/tests/test_can_back_stab.py b/tests/test_can_back_stab.py index 1c6231ac..6f3d98aa 100644 --- a/tests/test_can_back_stab.py +++ b/tests/test_can_back_stab.py @@ -576,16 +576,16 @@ def test_a_planned_move_doesnt_change_who_can_back_stab_in_the_free_round(self): # ---------------------------------------------------------------------- the guides -def _unreleased() -> str: +def _released_in_2_8_0() -> str: changelog = (REPO / "CHANGELOG.md").read_text() - match = re.search(r"^## \[Unreleased\]\n(.*?)^## \[", changelog, flags=re.S | re.M) + match = re.search(r"^## \[2\.8\.0\][^\n]*\n(.*?)^## \[", changelog, flags=re.S | re.M) assert match is not None return match.group(1) def test_the_changelog_records_the_new_lists(): - unreleased = _unreleased() - bullet = next((line for line in unreleased.splitlines() if "(#319)" in line), "") + released = _released_in_2_8_0() + bullet = next((line for line in released.splitlines() if "(#319)" in line), "") assert "EncounterView.can_back_stab" in bullet assert "BattleRoundPreview.can_hide" in bullet assert "BattleRoundPreview.can_back_stab" in bullet diff --git a/tests/test_feature_description_docs.py b/tests/test_feature_description_docs.py index af426049..d0ac97f4 100644 --- a/tests/test_feature_description_docs.py +++ b/tests/test_feature_description_docs.py @@ -87,13 +87,13 @@ def test_the_guide_links_the_two_audiences(): assert "][osrlib.crawl.dungeon.FeatureSpec.referee_notes]" in text -def test_the_unreleased_changelog_tells_an_upgrading_author(): - # One bullet under Unreleased says that the players read a cache's description since 2.6.0 - # and names the new field. No released section is rewritten to say it. +def test_the_changelog_tells_an_upgrading_author(): + # One bullet under 2.8.0 says that the players read a cache's description since 2.6.0 + # and names the new field. No other section is rewritten to say it. sections = _changelog_sections() - bullets = [line for line in sections["Unreleased"].splitlines() if line.startswith("- ")] + bullets = [line for line in sections["2.8.0"].splitlines() if line.startswith("- ")] matching = [line for line in bullets if "2.6.0" in line and "referee_notes" in line and "#318" in line] assert len(matching) == 1, bullets for name, text in sections.items(): - if name != "Unreleased": + if name != "2.8.0": assert "referee_notes" not in text, name diff --git a/tests/test_view_spell_lists.py b/tests/test_view_spell_lists.py index f1ef2249..899210c8 100644 --- a/tests/test_view_spell_lists.py +++ b/tests/test_view_spell_lists.py @@ -615,9 +615,9 @@ def test_the_views_guide_and_the_changelog_describe_the_lists(): root = Path(__file__).parent.parent guide = (root / "docs" / "guides" / "views-and-visibility.md").read_text() changelog = (root / "CHANGELOG.md").read_text() - unreleased = changelog.split("## [Unreleased]", 1)[1].split("\n## [", 1)[0] + released = changelog.split("## [2.8.0]", 1)[1].split("\n## [", 1)[0] for name in ("preparable_spells", "learnable_spells", "spell_slots", "spell_levels"): assert name in guide, name - assert name in unreleased, name - assert "#326" in unreleased + assert name in released, name + assert "#326" in released diff --git a/uv.lock b/uv.lock index fd54e137..be27177b 100644 --- a/uv.lock +++ b/uv.lock @@ -497,7 +497,7 @@ wheels = [ [[package]] name = "osrlib" -version = "2.7.0" +version = "2.8.0" source = { editable = "." } dependencies = [ { name = "pydantic" },