Skip to content

Commit 9f1077d

Browse files
authored
Merge pull request #40 from konjoai/claude/arm-python-coverage
2 parents fd718b4 + 4956076 commit 9f1077d

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

β€Ž.github/workflows/konjo-gate.ymlβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ name: "Konjo Quality Gate β€” Wall 2"
44
# `continue-on-error` removed and now fail the job (and the aggregate gate) on
55
# violation β€” they are verified clean repo-wide. Steps marked "WARN-ONLY" still
66
# carry `continue-on-error: true` because pre-existing debt would break CI; each
7-
# is armed once its debt is cleared (file size, complexity, Python coverage,
8-
# mutation). Do not add new
7+
# is armed once its debt is cleared (file size, complexity, mutation). Do not add new
98
# `continue-on-error` steps; clear the debt and arm instead.
109
#
1110
on:
@@ -84,17 +83,18 @@ jobs:
8483
- run: |
8584
cargo install cargo-nextest --locked --quiet 2>/dev/null || true
8685
cargo install cargo-llvm-cov --locked --quiet 2>/dev/null || true
87-
pip install pytest pytest-cov --quiet && pip install -e . --quiet 2>/dev/null || true
86+
pip install -e "./python[api]" pytest pytest-cov pytest-asyncio httpx --quiet
8887
# ARMED (blocking): library kernels are ~97% line-covered. The CLI binary
8988
# (main.rs) and the PyO3 FFI glue (pybindings.rs) are excluded β€” they carry
9089
# no Rust unit tests by design (the CLI is an entrypoint; the bindings are
9190
# covered by the Python suite, see the rust-accel job).
9291
- name: Rust coverage
9392
run: cargo llvm-cov nextest --workspace --all-features --lcov --output-path lcov.info --ignore-filename-regex 'main\.rs|pybindings\.rs' --fail-under-lines 80
94-
# WARN-ONLY: Python line-coverage threshold not yet measured/enforced.
93+
# ARMED (blocking): the package is ~93% line-covered by the python/tests
94+
# suite. Runs the real suite (api deps + pytest-asyncio installed above) and
95+
# enforces β‰₯80% on first-party `kohaku`.
9596
- name: Python coverage
96-
continue-on-error: true
97-
run: python -m pytest tests/ --cov=. --cov-report=json -x -q 2>/dev/null || true
97+
run: cd python && python -m pytest tests/ --cov=kohaku --cov-fail-under=80 -q
9898
- uses: codecov/codecov-action@v4
9999
if: always()
100100
with: {files: lcov.info, fail_ci_if_error: false}

β€ŽCLAUDE.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ cargo check, clippy, ruff lint, ruff format, DRY check, TODO scan. Blocks the co
5959

6060
**Wall 2 β€” CI gate** (`.github/workflows/konjo-gate.yml`):
6161
Target spec β€” coverage β‰₯ 80% Β· mutation survival ≀ 10% Β· complexity ≀ 15 Β· file ≀ 500L Β· zero DRY violations.
62-
*Phased arming:* the gate fails the merge only on **armed** steps (currently `cargo fmt`, `clippy` incl. `pedantic`, `ruff lint`, `ruff format`, `mypy --strict`, `DRY`, `Rust coverage β‰₯ 80%` β€” verified clean repo-wide). The rest run **warn-only** (`continue-on-error`) while pre-existing debt is cleared β€” file size, complexity, Python coverage, mutation β€” and are armed one at a time as each is cleaned. See the header comment in the workflow.
62+
*Phased arming:* the gate fails the merge only on **armed** steps (currently `cargo fmt`, `clippy` incl. `pedantic`, `ruff lint`, `ruff format`, `mypy --strict`, `DRY`, `coverage β‰₯ 80%` (Rust + Python) β€” verified clean repo-wide). The rest run **warn-only** (`continue-on-error`) while pre-existing debt is cleared β€” file size, complexity, mutation β€” and are armed one at a time as each is cleaned. See the header comment in the workflow.
6363

6464
**Wall 3 β€” Adversarial review** (local only β€” disabled in CI):
6565
`git diff HEAD~1 | python3 .konjo/scripts/konjo_review.py`

0 commit comments

Comments
Β (0)