Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
- name: Install test runner (S11 challenge contracts exercise pytest)
run: python -m pip install pytest

- name: Install ruff (version pinned so CI and local lint agree)
run: python -m pip install ruff==0.16.5

- name: Lint (enforced ruff line-length 120 + file/function size gates)
run: |
ruff check tools tests
ruff format --check tools tests
python tools/lint_sizes.py

- name: Validate public repository shape
run: python tools/validate_public.py

Expand All @@ -33,7 +42,9 @@ jobs:
git diff --check "$EMPTY_TREE"..HEAD

- name: Compile Python tools
run: python -m py_compile tools/validate_public.py tools/checkyourself.py tests/test_checkyourself_cli.py tests/test_validate_public.py
run: |
python -m py_compile tools/validate_public.py tools/checkyourself.py tools/lint_sizes.py
python -m py_compile tools/checkyourself/*.py tests/test_checkyourself_cli.py tests/test_validate_public.py tests/test_documentation_contract.py

- name: Run unit tests
run: python -m unittest discover -s tests
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

## Unreleased

### 2026-10-27 — Architecture split behind a facade + enforced size lint + retry re-invocations (1.8.0 staged, not published)

- Split the 5,519-line `tools/checkyourself.py` single-file dump into the
`tools/checkyourself/` package: 22 engine modules split by verb
(constants, errors, models, util, config, challenge_config, challenge_run,
scanning, detectors, scan, report, coverage, receipts, jsonlite,
validation, scoring, planning, describe, output, project, cli, mcp), a
re-export-only facade (`__init__.py`, 404 lines), and a 24-line
compatibility launcher at `tools/checkyourself.py` so every documented
invocation (`python3 tools/checkyourself.py <verb>`, the npm bin wrapper,
CI, and file-path module loaders) keeps working verbatim. The 11-tool MCP
surface serves byte-identical tool schemas, and the full suite reproduces
152 tests + 88 subtests green before and after.
- Enforced size discipline in CI: `ruff.toml` now selects E5 so the
line-length 120 limit is enforced (not just configured), CI runs
`ruff check` + `ruff format --check` with ruff pinned to 0.16.5, and the
new `tools/lint_sizes.py` gates facade ≤ 600 lines, module ≤ 1,000 lines,
and function ≤ 250 lines across production Python.
- Every user-facing error path now carries a concrete retry re-invocation
(kinocut `errors.py::retry_message` pattern): `errors.py` maps each verb to
a runnable MCP `tools/call` and CLI command, CLI errors print and JSON-emit
a `retry` field, argparse usage errors append a retry line, and every MCP
error (-32700/-32600/-32602/-32601) plus tool-call error results name the
exact re-invocation.
- npm packaging now ships `tools/checkyourself/` alongside the launcher.
The 1.8.0 release is staged here only; publishing to npm remains a
separate, CEO-gated act and has not been performed.

### 2026-10-27 — Test-suite count re-verification

- Re-verified the public test-count claims against the current repository
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"files": [
"bin/",
"tools/checkyourself.py",
"tools/checkyourself/",
"schemas/",
"checkyourself.manifest.json",
"NOTICE.md"
Expand Down
11 changes: 10 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Ruff config of record (FJ CI + local must agree — rule drift between runner
# versions caused 258 phantom errors on 2026-09-06; pin select+version in-repo)
# 2026-10: E5 added so the line-length=120 limit is enforced, not just configured
# (L4#10); W added for whitespace hygiene. File/function size discipline lives in
# tools/lint_sizes.py and runs in the same CI lint step.
line-length = 120
target-version = "py311"

[lint]
select = ["E4", "E7", "E9", "F"]
select = ["E4", "E5", "E7", "E9", "F", "W"]

[lint.per-file-ignores]
# The facade re-exports the full engine surface on purpose.
"tools/checkyourself/__init__.py" = ["F401"]
# The compatibility launcher star-imports the facade on purpose.
"tools/checkyourself.py" = ["F401", "F403", "E402"]
Loading
Loading