test: improve reliability coverage#8
Merged
Merged
Conversation
- Use io.ReadFull for random ID bytes - Simplify relation ID derivation for valid receipt IDs - Add tests for random read errors and invalid receipt IDs - Expand validation test coverage
- Cache parsed state-change payloads during materialization - Add direction protocol and relevance tests
- Define Ledger interface for direction repository - Add nil ledger guard in validate - Expand repository test coverage
- Extract file system operations into package vars - Add tempFile interface for test substitution - Expand immutable store and runtime tests
- Introduce package-level id generator variables for tests - Wire newThreadID/newRelationID/newProjectionID/newReceiptID - Pass Global scope through note projection
- Add command validation and lifecycle command tests - Add matching, storage, and output prompt tests - Add relation graph and storage/runtime behavior tests - Cover lock paths, current-thread errors, stale/seen classification, and revision delivery
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.
Why
This PR improves test reliability and coverage across the Fabric codebase, with a focus on the
internal/clipackageProtocol impact
core.Materializerefactor caches parsedRecordStateChangedpayloads internally but produces the same snapshot/conflict output.protocol.newTypedIDnow usesio.ReadFullfor stronger random-read guarantees;direction.Repositorydepends on a localLedgerinterface instead of the concretestore.Ledger.Verification
go test ./...passes across all packages.go test -coverprofile=/tmp/cli.out ./internal/cli/...reports 93.5% statement coverage.Direction changes
None — this PR contains no new live, candidate, or durable Fabric direction records.
Checklist