Repository navigation
fix: green CI — stable enum JSON serialization and clean mypy - #882
Merged
Merged
Conversation
Two CI jobs were failing (surfaced by recent PR runs; both pre-existing): - jit-tests: CrashSignature.to_dict() left crash_type as a CrashType(str, Enum) member. json.dumps of a str-Enum subclass is version-dependent (value vs str(enum)), so test_to_dict_json_roundtrip passed locally but failed on CI's CPython. Serialize crash_type.value explicitly for stable, cross-version output. - static-analysis: `mypy lafleur` reported 25 errors in 10 files (present since before the recent PRs). Fixed all of them with no runtime behavior change: telemetry/dynamic keys go through plain-dict views instead of the RunStats TypedDict (artifacts, orchestrator, utils); formatter argument types are bridged with casts / corrected annotations (report, campaign, lineage, orchestrator); a LineageGraph.metadata annotation and a forest-mode metrics None-guard were tightened; and small nits cleared (unused type: ignore, var_map annotation, dedent argument, driver main() call). Closes #881 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Both CI jobs were failing (surfaced by recent PR runs; both issues pre-existing on
main).jit-tests:
test_to_dict_json_roundtripCrashSignature.to_dict()leftcrash_typeas aCrashType(str, Enum)member.json.dumpsof a str-Enum subclass is version-dependent — some CPython builds emit the value ("C_ASSERTION"), othersstr(enum)("CrashType.C_ASSERTION") — so the test passed locally but failed on CI's CPython. Now serializescrash_type.valueexplicitly for stable, cross-version output.static-analysis:
mypy lafleur(25 errors, 10 files)All pre-existing (identical count at
4ecede4). Fixed with no runtime behavior change:RunStatsTypedDict (artifacts.pytimeseries snapshot,orchestrator.pydynamicstat_key,utils.pysetdefault).report.py,campaign.pycrash-attribution card +linesredefinition,orchestrator.py_format_run_*params).LineageGraph.metadataannotation widened todict[str, Any]; forest-modemetricsNone-guard added.type: ignore(corpus_manager.py),var_mapannotation (generic.py),dedentargument (jit_seeds.py),drivermain()call.Test plan
mypy lafleur→ Success: no issues found in 38 source files (was 25 errors).test_to_dict_json_roundtrippasses; full suite 2169 passed.ruff check+ruff format --checkclean.Closes #881
🤖 Generated with Claude Code