Skip to content

fix(ci): register mermaid/mermaid_mcp pytest markers#149

Merged
Data-Wise merged 1 commit into
devfrom
fix/mermaid-markers
Jun 13, 2026
Merged

fix(ci): register mermaid/mermaid_mcp pytest markers#149
Data-Wise merged 1 commit into
devfrom
fix/mermaid-markers

Conversation

@Data-Wise

Copy link
Copy Markdown
Owner

Problem

pytest --strict-markers (set in pyproject.toml addopts) hard-errors during collection of:

  • tests/test_mermaid_dogfood.py@pytest.mark.mermaid
  • tests/test_mermaid_e2e.py@pytest.mark.mermaid_mcp

because 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-markers promotes 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 mermaid and mermaid_mcp in pyproject's markers list. 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 --admin bypasses it was forcing.

Verification

  • pytest --collect-only --strict-markers on the mermaid files: exit 0 (was error).
  • Full suite: 1729 passed, 38 skipped, 1 xfailed (the mermaid_mcp tests skip cleanly when the MCP server isn't running — the fix only repairs collection, not behavior).

🤖 Generated with Claude Code

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 Data-Wise merged commit d21a1e4 into dev Jun 13, 2026
1 check passed
@Data-Wise Data-Wise deleted the fix/mermaid-markers branch June 13, 2026 21:48
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>
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