Repository navigation
ci: enforce the 100% line coverage gate - #14
Merged
Merged
Conversation
…he last defensive arm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mechanism (mirrors the psr15-guard pilot, php 8.3 + pcov): the bespoke bin/test_agent.php suite stays in place and a runner (.github/coverage-runner.php, php-code-coverage ^11) executes it under coverage, gating on every reachable line in src/. The suite grew from 57 to 610 assertions.
Coverage went from 76.53% to 100.00% reachable lines (pcov, php 8.3). The extension adds: utils/model/config edges, static-only class contract checks, a scripted RESP fake server (tests/fake_redis_server.php) covering the StreamRedisClient wire paths (AUTH/SELECT, error replies, truncated bulks, protocol errors, abortive RST writes, command timeouts), scriptable raw 200 bodies in tests/mock_server.php, EventBuffer persistence edges, HttpTransport status-classification and 413/400/429 flows against the mock API, agent lifecycle failure containment, the ext-redis adapter driven over the real phpredis extension against the redis service, and the PredisRedisClient adapter over a scripted client.
Provably-unreachable defensive lines: 57, enumerated in UNREACHABLE_LINES inside the runner with per-file reasoning; the gate fails on any uncovered line NOT in that list, so regressions cannot slip through. Summary of the audited sites:
The coverage and test jobs run php with the sockets extension (the RST tests use socket_import_stream); the coverage job runs as the non-root runner user, which the install-id permission-failure test requires. Suite pass/fail remains gated by the existing test job.