Skip to content

test: cover single-component byte-identical write, skip-ci marker, and backoff jitter - #545

Merged
joshua-temple merged 1 commit into
mainfrom
test/tier-b-unit-coverage
Jul 9, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
test/tier-b-unit-coverage

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

Three load-bearing paths had no executing unit coverage:

  • The single-component state-write path (WriteScopedState with Component=="" reaching applySingleComponentWrites) was only proven transitively via a related wrapper, not driven directly, despite byte-identical single-component output being a hard invariant.
  • The [skip ci] marker on state commits (load-bearing for RC-tag trigger suppression) was asserted nowhere.
  • Retry backoff was tested only at its attempt ceiling; the timing growth, cap, and jitter bounds were untested.

Fix

Adds executing unit tests that drive the real paths:

  • WriteScopedState single-component form asserts a flat state.<env> leaf (no components: nesting) and byte-identity against the whole-node oracle.
  • Generator and reset paths assert [skip ci] is present on state commits and absent on the hotfix cherry-pick commit that must trigger CI.
  • backoffForAttempt (git and statewrite) asserts per-attempt doubling, the 8s cap, and jitter bounds, deterministically with no real sleeping.

No behavior change; the byte-identical invariant holds (characterization coverage).

Verification

go build ./..., go test ./... (2696 pass), golangci-lint run ./... all clean.

… jitter

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 48935af into main Jul 9, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the test/tier-b-unit-coverage branch July 9, 2026 23:39
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