ci: add coverage --min gate + token-confidentiality regression pins - #14
Conversation
Goosterhof
left a comment
There was a problem hiding this comment.
Verdict: approve-worthy — clean, well-evidenced fortification of a public Composer package that shipped with coverage: none.
Verified against src/KendoReports.php at the PR head (no library source changes, as claimed):
- Coverage floor teeth are real:
composer.json:43wirespest --coverage --min=98, andphpunit.xml's<source><include><directory>src</directory></include></source>is the PHPUnit 10+ shape (no silent-no-op<coverage>block to worry about). CI (check (8.4),check (8.5)) is green on this exact head, which is the actual proof the 98.1% claim holds and the min gate doesn't trivially pass. - The named uncovered line (
KendoReports.php:122, the string-pathfile_get_contentsattach branch) checks out — confirmed by direct read, and it is a genuinely separate, already-parked concern (arbitrary-file-read/SSRF), not swept under the coverage floor. - The three token-confidentiality regression tests (
tests/Feature/KendoReportsTest.php) are non-vacuous: each also asserts the log/exception message does contain'422', which rules out the "nothing was actually captured" false-negative (an empty$loggedor empty exception message would trivially satisfy a barenot->toContain($secretToken)assertion). Traced both failure branches againstReportSubmissionException::rejected()/::failed()and thefail()swallow path (error_log(sprintf('[kendo-report-tool] %s', ...))) — neither ever folds the request/token into the message, so the pins are honest regression coverage, not decorative.
No blockers, no majors. One observation, not a finding: --min=98 is a deliberate floor short of 100 pinned to a known, tracked gap (SSRF-branch coverage) rather than an arbitrary slack — reasonable, but worth actually ratcheting to 100 when that Medic item lands rather than letting the floor comment go stale.
Self-authored (Goosterhof reviewing Goosterhof) — posting as COMMENT per standing voice rules, not APPROVE.
Automated war-room agent review — posted because this PR carries the Agent Review Requested label.
Town Crier Review · 8/10 · PASS · 🤝 Confirm — 🟡 2kendo-report-tool #14 · AC anchor: none · head Tip Config- and test-only diff, and we corroborate the thread's core claims on an independent read: the 98% coverage floor has real teeth (phpunit.xml.dist ships the 2 finding(s) posted inline:
Bus thread · 1 prior review(s):
|
jasperboerhof
left a comment
There was a problem hiding this comment.
Auto-approved — Town Crier verdict PASS @Head, CI green, no open MAJOR+ thread. Our approval is our independent vote (approve-alongside): a peer's review / CHANGES_REQUESTED never withholds it — we verify every blocker ourselves, and a real one drops our own verdict below PASS. Any open 🟡 MINOR threads alongside this approval are non-blocking (TC-0036 R4) — author's choice: fold here or follow-up; if folding into this PR, say so in-thread and disarm auto-merge. See the verdict comment + inline notes.
Adds a coverage floor to the published package's CI. Both ci.yml and release.yml gain the pcov driver (coverage: none -> pcov) and run a new `composer test:coverage` step (pest --coverage --min=98). Floor is the measured 98.1% — KendoReports.php:122 (the string-path file_get_contents attach) is the sole uncovered line, a parked M-1 Medic item; aspiration --min=100 is documented for ratchet-up once that branch is covered. Teeth are the pest --coverage --min CLI flag, not a phpunit.xml <coverage> block (a silent no-op on PHPUnit 10+). Also pins the token-confidentiality invariant Sapper flagged as inspection- only: three tests assert the report:create Bearer token never appears in a surfaced ReportSubmissionException message (rejection + transport failure) or the error_log swallow path. A future ->throw()/->retry() that folded the request into the message would trip these before shipping a leak. No library source change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EmzU5UEBBVH4K691qiuxCh
9083cbe to
e3833f7
Compare
Adds a coverage floor to a published public Composer package that shipped with
coverage: none(first-contact recon Mod-1,campaigns/kendo-report-tool/2026-07-14-first-contact-recon.md).composer test:coverage=pest --coverage --min=98wired into ci.yml + release.yml. Teeth = the--minCLI flag (a<coverage>XML block alone is a silent no-op on PHPUnit 10+).KendoReports.php:122— the string-pathfile_get_contentsattach branch, which is the parked M-1 Medic item (arbitrary-file-read/SSRF; zero fleet consumers use the string branch).--min=100aspiration documented in-workflow; ratchet the floor when that branch is dropped/covered.report:createBearer token must never surface in aReportSubmissionExceptionmessage or theerror_logswallow path. Pins the Sapper durability caveat — a future->throw()/->retry()would fold the request (Authorization header) into the logged message; these fail before it could leak.No library source change. Armorer execution report:
reports/kendo-report-tool/execution/2026-07-14-armorer-coverage-gate.md.🤖 Generated with Claude Code