Make CI green: version-independent flag names, SWR corpus skip - #15
Merged
Conversation
CI has been red on every master push since 2026-07-13, failing 11 tests. Two causes: 1. EnumNameConverter relied on composite Flag .name, which is None before Python 3.11, so 3.10 emitted 'ROM_ACT_TYPES.3' where 3.11+ emits 'ROM_ACT_TYPES.IS_NPC|SENTINEL'. The converter now decomposes unnamed composites into single-bit member names in ascending bit order, matching 3.11+ output exactly on every version. The named-combinations test also derived its expectation from .name; it now builds it from single-bit members directly. 2. test_fuss_fields_are_editable_declaratively was the only SWR test missing the corpus-unavailable skip guard, so it crashed on the hardcoded local path when C:\Users\Q\src\swrfuss is absent. Verified: full suite passes on CPython 3.10.11, 3.11, and 3.13 locally (938 passed each), interpreter versions confirmed in-run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HfQ678eD83tiAALqNkct1U
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.
CI has been red on every master push since 2026-07-13 (11 failing tests, all pre-existing — identical failure sets on master and PR runs). Two causes, both fixed:
1. Composite flag names are version-dependent
EnumNameConverter._unstructure_enumrelied onobj.name, which for composite Flag values (e.g.IS_NPC | SENTINEL) isNonebefore Python 3.11, so the 3.10 job emittedROM_ACT_TYPES.3where 3.11+ emitsROM_ACT_TYPES.IS_NPC|SENTINEL. The converter now decomposes unnamed composites into single-bit member names in ascending bit order — exactly what 3.11+ produces — so JSON output is identical on every supported version.test_every_int_flag_type_jsonifies_named_combinationsalso built its expectation from.name(and fromlist(flag_type), whose iteration semantics changed in 3.11); it now derives both the value and the expected string from single-bit members directly. No IntFlag in the codebase defines composite members, so theA|Bcontract is unambiguous.2. Missing corpus skip guard
test_fuss_fields_are_editable_declarativelywas the only SWR test without theswr_paths()skip guard, so it crashed withFileNotFoundErroron the hardcodedC:\Users\Q\src\swrfusspath on any machine without the corpus — including CI.Verification
Full suite run locally per version, mirroring CI's
uv run --extra test pytest:🤖 Generated with Claude Code
https://claude.ai/code/session_01HfQ678eD83tiAALqNkct1U