Skip to content

Tests: Wave 6 — modules + dispatch harness (coverage 59.2% → 70.0%)#67

Merged
WebTigers merged 1 commit into
mainfrom
test/wave6-collect
Jul 24, 2026
Merged

Tests: Wave 6 — modules + dispatch harness (coverage 59.2% → 70.0%)#67
WebTigers merged 1 commit into
mainfrom
test/wave6-collect

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

Five parallel agents on the module + controller layer, using the new dispatch harness. ~167 tests, combined suite 1617 green. Overall line coverage 59.2% → 70.0%.

The unlock: a controller dispatch harness

ControllerTestCase (landed in #66) instantiates a controller and dispatches one action with view-rendering off — the action body runs (branch logic, _json body, redirect / _forward decision) without the theme/view-script stack. This made core/controllers (0% before) and every module controller coverable for the first time.

Coverage by bucket (before → after)

core/controllers 0→87 cms 33→94 code 41→90 blog→95
access→84 agent module 6→66-78 profile→68 system 37→59
schedule→91 signup→96 search→93 media/analytics/identity controllers 90-100%

All six core controllers: Api 80, Auth 79, Error 95, Index 87, Page 98, Admin 91.

Real bug fixed (a test found it)

Backup_IndexController::_json(int $result, string $messageKey, array $data = []): string was an incompatible override of Tiger_Controller_Action::_json($data, $status = 200) — under PHP 8.5 that's a fatal at class declaration, so every /backup request 500'd (the backup admin UI was entirely broken). Renamed the helper to _jsonBody(); the characterization test that pinned the fatal is replaced with real dispatch coverage of index/download/restore.

Harness hardening

Three agents independently hit it, so it's folded into the base: ControllerTestCase now sets redirector->setExit(false) (the redirector exits after sending headers by default, which would kill the PHPUnit process the moment a controller action redirects).

Honestly-bounded ceilings (covered at guard level, not chased)

Updates::_applyOne would run a real composer update / swap the live vendor/ on a dev box; is_uploaded_file() uploads; live-model agent turns; render-only .phtml leaves. CI floor MIN_COVERAGE 55 → 66.

Next

At 70%, the remaining lever to 80% is the library kernel (66%, 3,123 uncovered) — Wave 7 targets its reachable remainder.

🤖 Generated with Claude Code

… 70.0%)

Five parallel agents on the module + controller layer, collected + verified on one DB:
~167 tests, combined suite 1617 green.

The unlock: a controller dispatch harness (ControllerTestCase, landed #66) that runs a
controller action with view-rendering off — so core/controllers (0% before) and every
module controller are now coverable. Results: core-controllers 0→87% (Api 80, Auth 79,
Error 95, Index 87, Page 98, Admin 91), cms 33→94, code 41→90, agent module 6→66-78,
system 37→59, + module controllers (profile 68, access 84, blog/media/analytics/identity/
signup/search/schedule 90-100%).

REAL BUG FIXED (a test found it): Backup_IndexController::_json(int,string,array):string
was an incompatible override of Tiger_Controller_Action::_json($data,$status) — a PHP 8.5
fatal at class load, so EVERY /backup request 500'd (the backup admin UI was broken).
Renamed the helper to _jsonBody(); replaced the characterization test with real dispatch
coverage.

Harness hardening (3 agents independently hit it): folded redirector->setExit(false) into
ControllerTestCase setUp (the redirector exits after headers → would kill the PHPUnit
process on a controller redirect).

CI floor MIN_COVERAGE 55 → 66.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WebTigers
WebTigers merged commit a5ac7c8 into main Jul 24, 2026
10 of 11 checks passed
WebTigers added a commit that referenced this pull request Jul 24, 2026
…tie) (#68)

messages_append_and_transcript_reads_oldest_first appended two messages in the same
millisecond, so neither created_at (second precision) nor the time-ordered v7 message_id
could order them deterministically — transcript()'s message_id-DESC tiebreak fell to the
v7 random bits, and the order flipped ~intermittently (green in #65, red in #67's CI run).
Real conversation turns are seconds apart; force a created_at gap so the oldest-first
assertion is deterministic. Verified stable across repeated runs. No source change — the
model's ordering is correct for real use.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WebTigers
WebTigers deleted the test/wave6-collect branch July 25, 2026 08:16
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