fix(ci): register mermaid/mermaid_mcp pytest markers#149
Merged
Conversation
test_mermaid_dogfood.py (@pytest.mark.mermaid) and test_mermaid_e2e.py (@pytest.mark.mermaid_mcp) used markers absent from pyproject's markers list. With --strict-markers, that's only safe while an env pytest plugin registers them at install time; when that install flakes, collection hard-errors and the ENTIRE "Craft CI" run aborts (exit 2) — a CI-wide failure unrelated to any diff (observed taking down PR #148 and dev's own merge-commit run on 2026-06-13). Registering both markers makes collection deterministic regardless of plugin availability. Full suite: 1729 passed, 38 skipped (mermaid_mcp tests skip cleanly when the MCP server is absent), 1 xfailed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Data-Wise
pushed a commit
that referenced
this pull request
Jun 13, 2026
… gaps shipped - PR #149 merged → dev d21a1e4 (markers registered; --strict-markers flake gone). - Doc-gap closure 8854470: counts 110/39, hub entry, 2 flowcharts. - Next Action A resolved; flagged 2 leftover local branches needing manual -D. 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.
Problem
pytest --strict-markers(set inpyproject.tomladdopts) hard-errors during collection of:tests/test_mermaid_dogfood.py→@pytest.mark.mermaidtests/test_mermaid_e2e.py→@pytest.mark.mermaid_mcpbecause neither marker is in pyproject's
markers = [...]list. These markers are normally registered by an environment pytest plugin installed at CI time; when that install flakes,--strict-markerspromotes the unknown-mark warning to a hard collection error and the entire Craft CI run aborts (exit 2).This took down PR #148 (twice on re-run) and dev's own merge-commit CI run on 2026-06-13 — a CI-wide failure with no relation to any code diff.
Fix
Register
mermaidandmermaid_mcpin pyproject'smarkerslist. Registering a marker that a plugin may also register is harmless (pytest dedupes) and makes collection deterministic regardless of plugin availability — eliminating this flake class and the--adminbypasses it was forcing.Verification
pytest --collect-only --strict-markerson the mermaid files: exit 0 (was error).mermaid_mcptests skip cleanly when the MCP server isn't running — the fix only repairs collection, not behavior).🤖 Generated with Claude Code