Skip to content

test: add property checks for runtime invariants#21

Merged
AdmilsonCossa merged 1 commit into
mainfrom
hardening/property-tests
May 11, 2026
Merged

test: add property checks for runtime invariants#21
AdmilsonCossa merged 1 commit into
mainfrom
hardening/property-tests

Conversation

@AdmilsonCossa
Copy link
Copy Markdown
Collaborator

Summary

  • add deterministic fast-check property tests for core WorkIt runtime invariants
  • add npm run test:property
  • include property tests in Vitest discovery so normal test and coverage gates exercise them

Invariants covered

  • run.pool preserves order and never exceeds the concurrency cap
  • work().inParallel preserves input order and respects the cap
  • run.race cancels cooperative losers with typed race_lost reasons
  • run.retry stops immediately on CancellationError
  • run.timeout preserves typed timeout reasons
  • first scope cancellation reason remains authoritative

Validation

  • npm run test:property
  • npm test
  • npm run test:coverage
  • npm run verify

Closes #19

@AdmilsonCossa AdmilsonCossa force-pushed the hardening/property-tests branch from 35c7dbe to 8824ac3 Compare May 11, 2026 08:23
@AdmilsonCossa AdmilsonCossa self-assigned this May 11, 2026
@AdmilsonCossa AdmilsonCossa force-pushed the hardening/property-tests branch from 8824ac3 to 6dd598b Compare May 11, 2026 09:54
@AdmilsonCossa AdmilsonCossa merged commit 1e4a0e2 into main May 11, 2026
3 checks passed
@AdmilsonCossa AdmilsonCossa deleted the hardening/property-tests branch May 11, 2026 09:56
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.

Add fuzz and property-based tests for core invariants

1 participant