Skip to content

Install the §9 release gate (shared code rules, check.py, v0.3.3 baseline, CI) - #66

Merged
guijacquemet merged 1 commit into
mainfrom
claude/section9-gate
Nov 4, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/section9-gate

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

An external audit found no tools/check.py, no shared tools/code_rules.py, no baseline and no [tool.morphobricks.code-rules] config here; CI ran only ruff and pytest.

What

  • tools/code_rules.py: byte-identical copy from preprocessing main, SHA-256 cc04a420a4d25d5ef200bfa370f052d9911786fde0c57385dcaf155716d6e0a2, pinned by tests/test_code_rules.py.
  • tools/check.py: the runner used by fiberfeatures (Ruff's findings go through the same shrink-only baseline, --ignore-noqa), plus ruff format --check and pytest in the full run; --rules for CI.
  • pyproject.toml: the §9 Ruff rules (C90, PLR0913, PLR0915, ANN, PGH004, required from __future__ import annotations), [tool.morphobricks.code-rules] with owner = "normalization" and a layer for each of the 18 modules (17 pure, csv_io io, the package __init__ orchestration), pythonpath = ["tools"].
  • CI lint job: ruff format --check and python tools/check.py --rules (plain ruff check . would list the v0.3.3 debt, which lives in the baseline now).
  • AGENTS.md: the new tools and "done means".

Baseline

tools/code_rules_baseline.json was generated on a 320f304 (v0.3.3) worktree: 37 entries, sum of sizes 1323, # noqa ratchet all 0; histogram.py is 864 lines (limit 600). Main (534c63d, with #65) was checked against it: no entry grew and none shrank (shrunk_baseline == baseline, histogram.py still 864). No new code is baselined; the only debt is v0.3.3's.

Checks

python tools/check.py: ruff format clean, 627 passed, 2 skipped (csbdeep not installed, tests/test_rgb.py:78), code rules clean.


Generated by Claude Code

…line, CI

Adds tools/code_rules.py (byte-identical shared copy, SHA-256 pinned in
tests/test_code_rules.py), tools/check.py, the [tool.morphobricks.code-rules]
config with a layer for every module, the Ruff section 9 rules, and
tools/code_rules_baseline.json taken from v0.3.3 (320f304). Main (534c63d,
with #65) matches that baseline exactly: nothing grew. CI runs
python tools/check.py --rules in place of plain ruff check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
@guijacquemet
guijacquemet merged commit 3c057c3 into main Nov 4, 2026
8 checks passed
@guijacquemet
guijacquemet deleted the claude/section9-gate branch November 4, 2026 21:45
@guijacquemet guijacquemet mentioned this pull request Nov 5, 2026
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.

2 participants