tests: push coverage to 95%+ across all 5 packages#1
Merged
Conversation
Add focused unit tests targeting the uncovered branches surfaced by go tool cover. Covers: supervisor lifecycle (spawn, waitReady, verifyBinary, superviseOne crash-loop + verify-fail paths) using on-disk POSIX-shell fake binaries; service-level Start/Stop/Call edge cases; ipc framing error branches (zero-length, oversized, partial body, bad JSON, write failures); manifest validate condition-tree branches (composite op arity, nested recursion, empty/missing field guards); payment seal registry + nonce-size + key-size error paths; extend registry register/run/clone edge cases. New test files only; existing tests untouched. Per-package coverage: pkg/extend 94.8 -> 100.0 pkg/ipc 75.3 -> 92.9 pkg/manifest 82.8 -> 100.0 pkg/payment 89.7 -> 98.5 plugin/appstore 69.8 -> 91.5 module average 82.5 -> 96.6
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
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.
Summary
Push test coverage from ~82% baseline to 96.6% module average via focused unit tests against branches that go cover flagged as uncovered. No production changes — new `*_test.go` files only.
Per-package coverage delta
What got covered
What stayed uncovered (and why — these are the ceiling)
Test plan
Bugs surfaced
None. The supervisor, IPC, and manifest paths I drove all behaved as documented. The dev-mode `EmbeddedCatalogPubkey` placeholder is a known release-prep gap (already loudly logged at `Start`); covering it in tests doesn't fix it but does pin the WARNING contract so a silent removal of the warning would fail `TestStartWarnsOnPlaceholderCatalogPubkey`.