Skip to content

test: improve reliability coverage#8

Merged
lutefd merged 7 commits into
mainfrom
fix/test-reliability
Jun 25, 2026
Merged

test: improve reliability coverage#8
lutefd merged 7 commits into
mainfrom
fix/test-reliability

Conversation

@lutefd

@lutefd lutefd commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Why

This PR improves test reliability and coverage across the Fabric codebase, with a focus on the internal/cli package

Protocol impact

  • Behavior: No observable protocol behavior changes. The core.Materialize refactor caches parsed RecordStateChanged payloads internally but produces the same snapshot/conflict output.
  • Schema: None.
  • Compatibility: Existing immutable events remain valid and readable.
  • Trust / provenance: No changes to trust semantics or provenance assertions.
  • Implementation: protocol.newTypedID now uses io.ReadFull for stronger random-read guarantees; direction.Repository depends on a local Ledger interface instead of the concrete store.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

  • I kept unrelated changes out of this PR.
  • I updated protocol docs, schemas, and fixtures when required. (No schema/docs changes required.)
  • I preserved immutable event and provider-neutral behavior.

lutefd added 7 commits June 25, 2026 09:36
- 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
@lutefd lutefd merged commit c9bb054 into main Jun 25, 2026
2 checks passed
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