Skip to content

Make CI green: version-independent flag names, SWR corpus skip - #15

Merged
ctoth merged 1 commit into
masterfrom
fix/ci-green
Jul 27, 2026
Merged

Make CI green: version-independent flag names, SWR corpus skip#15
ctoth merged 1 commit into
masterfrom
fix/ci-green

Conversation

@ctoth

@ctoth ctoth commented Jul 27, 2026

Copy link
Copy Markdown
Owner

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_enum relied on obj.name, which for composite Flag values (e.g. IS_NPC | SENTINEL) is None before Python 3.11, so the 3.10 job 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 — exactly what 3.11+ produces — so JSON output is identical on every supported version. test_every_int_flag_type_jsonifies_named_combinations also built its expectation from .name (and from list(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 the A|B contract is unambiguous.

2. Missing corpus skip guard

test_fuss_fields_are_editable_declaratively was the only SWR test without the swr_paths() skip guard, so it crashed with FileNotFoundError on the hardcoded C:\Users\Q\src\swrfuss path on any machine without the corpus — including CI.

Verification

Full suite run locally per version, mirroring CI's uv run --extra test pytest:

  • CPython 3.10.11 (version confirmed in-run — an earlier attempt silently fell through to a PATH pytest on 3.13, so interpreter identity is now asserted): 938 passed
  • CPython 3.11: 938 passed
  • CPython 3.13: 938 passed

🤖 Generated with Claude Code

https://claude.ai/code/session_01HfQ678eD83tiAALqNkct1U

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
@ctoth
ctoth merged commit 58e63cc into master Jul 27, 2026
4 checks passed
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.

1 participant