feat(ci): parallel coverage engine + explicit-gated coverage job; de-razor coverage to 96.62% #11258

Merged
HAL9000 merged 5 commits from coverage-engine-master-port into master 2026-06-02 03:34:31 +00:00
Owner

Phase 2 — parallel coverage engine → master + de-razored coverage

Ports the fast/parallel slipcover coverage engine onto master, reconciles the coverage gate to a single source, and adds genuine coverage headroom.

noxfile.pycoverage_report full-suite path now fans out K concurrent slipcover processes (K=COVERAGE_PROCESSES, default 4) over N bin-packed chunks, fails loud on any dead chunk (never merges survivors), and merges per-chunk JSON. Bounds per-process peak RSS (~658 MB/chunk, ceiling ~2.6 GB) — kills the single-process OOM/reaper collapse (~1.4 GB). COVERAGE_THRESHOLD reads pyproject [tool.coverage.report].fail_under. Features enumerated by glob (no run_behave_parallel orchestrator import).

pyproject.toml — adds [tool.coverage.report].fail_under = 96.5 as the single source of truth (+ evidence-gated ratchet rule, objective 97%).

.forgejo/workflows/ci.yml — coverage job carries the skip_coverage operator valve; propagates nox's exit explicitly (set -uo pipefail + PIPESTATUS + exit $rc) instead of relying on the runner's implicit pipefail; adds timeout-minutes: 30; deletes the dead threshold=50 step; fixes the phantom-97 label.

Coverage — de-razored from 96.465% (passed only by rounding) to 96.623% (genuine buffer): omit the TYPE_CHECKING-only application/services/__init__.py (uncoverable, slipcover has no per-line pragma) + new coverage_validation_error_paths.feature (16 scenarios over core/validation.py defensive branches). fail_under stays 96.5 (ratchet rule).

Local full engine run on master's suite: NOX_EXIT=0, all 12 chunks alive, 96.623%.

🤖 Generated with Claude Code

## Phase 2 — parallel coverage engine → master + de-razored coverage Ports the fast/parallel slipcover coverage engine onto master, reconciles the coverage gate to a single source, and adds genuine coverage headroom. **noxfile.py** — `coverage_report` full-suite path now fans out K concurrent slipcover processes (K=`COVERAGE_PROCESSES`, default 4) over N bin-packed chunks, fails loud on any dead chunk (never merges survivors), and merges per-chunk JSON. Bounds per-process peak RSS (~658 MB/chunk, ceiling ~2.6 GB) — kills the single-process OOM/reaper collapse (~1.4 GB). `COVERAGE_THRESHOLD` reads `pyproject [tool.coverage.report].fail_under`. Features enumerated by glob (no `run_behave_parallel` orchestrator import). **pyproject.toml** — adds `[tool.coverage.report].fail_under = 96.5` as the single source of truth (+ evidence-gated ratchet rule, objective 97%). **.forgejo/workflows/ci.yml** — coverage job carries the `skip_coverage` operator valve; propagates nox's exit **explicitly** (`set -uo pipefail` + `PIPESTATUS` + `exit $rc`) instead of relying on the runner's implicit pipefail; adds `timeout-minutes: 30`; deletes the dead `threshold=50` step; fixes the phantom-97 label. **Coverage** — de-razored from 96.465% (passed only by rounding) to **96.623%** (genuine buffer): omit the TYPE_CHECKING-only `application/services/__init__.py` (uncoverable, slipcover has no per-line pragma) + new `coverage_validation_error_paths.feature` (16 scenarios over `core/validation.py` defensive branches). `fail_under` stays 96.5 (ratchet rule). Local full engine run on master's suite: NOX_EXIT=0, all 12 chunks alive, 96.623%. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HAL9000 added 2 commits 2026-06-01 21:13:45 +00:00
Ports the WS1 fast/parallel coverage engine onto master and reconciles the
coverage gate to a single source. Local full-suite run on master's suite:
NOX_EXIT=0, all 12 chunks alive (no dead chunks), peak 658MB/chunk
(ceiling ~2.6GB vs the old ~1.4GB single-process that OOMs/reaper-kills),
96.465% -> 96.5 (rounded) >= 96.5 floor.

noxfile.py — coverage_report full-suite path now fans out K concurrent
slipcover processes (K=COVERAGE_PROCESSES, default 4) over N bin-packed
chunks (by scenario count), failing loud on any dead chunk (never merges
survivors) and merging per-chunk JSON. Bounds per-process peak RSS, killing
the single-process OOM/reaper collapse. Targeted (.feature posargs) runs keep
the single-process path. COVERAGE_THRESHOLD now reads
pyproject [tool.coverage.report].fail_under. Features are enumerated by direct
glob (NOT by importing run_behave_parallel, whose top level imports
behave/behave_parallel and is unavailable in the nox orchestrator process).

pyproject.toml — adds [tool.coverage.report].fail_under = 96.5 as the single
source of truth, with the evidence-gated ratchet rule (objective 97%).

.forgejo/workflows/ci.yml — coverage job: carries the skip_coverage operator
valve; propagates nox's exit EXPLICITLY (set -uo pipefail + PIPESTATUS +
exit $rc) instead of relying on the runner's implicit bash -eo pipefail;
adds timeout-minutes: 30 so a hang fails cleanly with diagnostics; deletes
the dead threshold=50 "Surface coverage summary" step; fixes the phantom-97
step label. Gating remains nox's --fail-under (sourced from pyproject).

coverage_threshold_config_steps.py — the fail-under feature step resolves the
floor from pyproject when COVERAGE_THRESHOLD delegates to the reader.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test(coverage): de-razor master coverage 96.465% -> 96.623%
CI / integration_tests (pull_request) Has started running
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 45s
CI / build (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 1m11s
CI / quality (pull_request) Successful in 1m16s
CI / typecheck (pull_request) Successful in 1m24s
CI / security (pull_request) Successful in 1m23s
CI / unit_tests (pull_request) Failing after 4m57s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Has been cancelled
a49f37eb1f
Master passed the 96.5 floor only by rounding (96.465 -> 96.5). Add genuine
behave coverage + omit a structurally-uncoverable module so the floor has real
headroom. fail_under stays 96.5 (ratchet rule: raise only after coverage holds).

- omit src/cleveragents/application/services/__init__.py (noxfile + pyproject):
  100% of its "missing" lines are inside an `if TYPE_CHECKING:` block (never
  executes at runtime) and slipcover has no per-line pragma to exclude them.
- features/coverage_validation_error_paths.feature (+ steps): 16 scenarios
  exercising the defensive error-path branches in core/validation.py that the
  existing structural_validation.feature does not reach (non-dict node, dup
  decision_id, non-list children, invalid child ULID, missing decision fields,
  wrong-typed confidence/parent/sequence, malformed structured-output, unknown
  dispatcher target). Routed through the public
  validate_structured_component_output dispatcher; pure functions, no DB/CLI.

Full engine run: NOX_EXIT=0, no dead chunks, 96.623% (validation.py now fully
covered).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
drew added 1 commit 2026-06-01 21:37:28 +00:00
fix(coverage): resolve fail-under from pyproject in threshold-enforcement step (WS5)
CI / lint (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 59s
CI / security (pull_request) Successful in 1m16s
CI / helm (pull_request) Successful in 40s
CI / build (pull_request) Successful in 43s
CI / push-validation (pull_request) Successful in 20s
CI / unit_tests (pull_request) Successful in 4m26s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 9m34s
CI / integration_tests (pull_request) Failing after 21m41s
CI / status-check (pull_request) Failing after 3s
b499834c0f
The coverage_report noxfile session now delegates COVERAGE_THRESHOLD to the
pyproject single source (`COVERAGE_THRESHOLD = _read_coverage_fail_under()`),
so the AST value is a Call, not a Constant. The
coverage_threshold_enforcement.feature step "I parse the COVERAGE_THRESHOLD
constant from noxfile.py" raised ValueError (errored scenario) because it only
handled a literal constant — this was the missed third WS5 step file (the
config + consolidated steps were already reconciled).

Add the same pyproject `[tool.coverage.report].fail_under` fallback used by
coverage_threshold_config_steps.py, and fix the phantom-97 in the feature
description prose. Verified: the four coverage feature files now pass
(136 scenarios, 0 errored); previously unit_tests errored on
coverage_threshold_enforcement.feature:7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
drew added 1 commit 2026-06-02 02:11:58 +00:00
fix(coverage): reconcile robot coverage-threshold test with pyproject delegation (WS5)
CI / integration_tests (pull_request) Has started running
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 40s
CI / build (pull_request) Successful in 46s
CI / lint (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m6s
CI / quality (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m51s
CI / unit_tests (pull_request) Successful in 7m23s
CI / coverage (pull_request) Has started running
CI / docker (pull_request) Successful in 1m52s
CI / status-check (pull_request) Has been cancelled
8119043837
integration_tests (Robot/pabot) failed on robot/coverage_threshold.robot
"Noxfile Contains Coverage Threshold Constant": it asserted the literal
`COVERAGE_THRESHOLD = 96.5` in noxfile.py, but the coverage_report session now
delegates the constant to pyproject's single source
(`COVERAGE_THRESHOLD = _read_coverage_fail_under()`).

This was the last WS5 reconciliation gap (the plan enumerated behave feature
steps + ci.yml + guidelines prose, but not the Robot suite). Assert the
delegation plus the pyproject floor (`fail_under = 96.5`) instead of the literal,
mirroring the behave step fix in b499834c0. The other assertions in the suite
(--fail-under= substring, [tool.coverage.run], branch=true, source=["src"]) are
unaffected; verified no other robot/behave/pytest test depends on the literal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
drew added 1 commit 2026-06-02 02:32:47 +00:00
perf(ci): raise pabot integration parallelism cap min(2)->min(6)
CI / lint (pull_request) Successful in 37s
CI / push-validation (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 27s
CI / build (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 1m20s
CI / security (pull_request) Successful in 1m21s
CI / unit_tests (pull_request) Successful in 4m19s
CI / docker (pull_request) Successful in 1m19s
CI / integration_tests (pull_request) Successful in 7m45s
CI / coverage (pull_request) Successful in 8m18s
CI / status-check (pull_request) Successful in 3s
11c0fd11d5
integration_tests was throttled to `min(2, _default_processes())` (commit
92e258535, a flaky-stabilization measure). Evidence from a cached CI run shows
the suite does ~47min of work serialized through 2 pabot lanes on a 32-core
runner -> ~24min wall (exactly 2x == 2 lanes), the chronic ~21-30min seen
across recent runs. It is linearly parallelism-bound.

Raise the cap to `min(6, _default_processes())`: ~4x more lanes -> projected
~6-8min wall, while staying well short of per-core fan-out (the runner reports
32 cores; behave already uses all of them). The cap is kept (not removed)
because the suite makes live LLM calls — ~149 HTTP 429 rate-limit responses
were observed even at 2-way, and unbounded fan-out would spike 429/OOM flakes
(the exact failure 92e258535 was masking). 6 is a deliberate middle ground;
TEST_PROCESSES / --processes still override.

Updates the now-stale "<=2 processes" docstrings on integration_tests and
slow_integration_tests. Behave/unit_tests parallelism (_default_processes(),
uncapped) is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HAL9000 added the controller-managed label 2026-06-02 03:15:24 +00:00
HAL9001 approved these changes 2026-06-02 03:29:49 +00:00
HAL9001 left a comment
Owner

Approved

Reviewed at commit 11c0fd1.

Confidence: medium.

**✅ Approved** Reviewed at commit `11c0fd1`. Confidence: medium. <!-- controller:fingerprint:b6a7c6ab4cc646aa -->
HAL9000 added the auto/claimed-merge label 2026-06-02 03:34:25 +00:00
Author
Owner

Claimed by merge_drive.py (pid 2496307) until 2026-06-02T05:04:25.113249+00:00.

This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.

<!-- merge_drive.py: claim --> Claimed by `merge_drive.py` (pid 2496307) until `2026-06-02T05:04:25.113249+00:00`. This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
HAL9001 approved these changes 2026-06-02 03:34:29 +00:00
HAL9001 left a comment
Owner

Approved by the controller reviewer stage (workflow 124).

Approved by the controller reviewer stage (workflow 124).
HAL9000 merged commit 6200574444 into master 2026-06-02 03:34:31 +00:00
HAL9000 removed the auto/claimed-merge label 2026-06-02 03:34:31 +00:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#11258