Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
aa47350
schedulertest: add scheduler lifecycle driver and property checks
davidporter-id-au Nov 11, 2026
780fc97
Strengthen scheduler lifecycle checks and fix exposed progress bugs
chaptersix Nov 11, 2026
410af8f
Tighten scheduler lifecycle test gates and harness failure modes
chaptersix Nov 11, 2026
ca0ded1
Run property tests in a dedicated CI job
chaptersix Nov 11, 2026
608344e
Fix scheduler backfill migration cursor and callback ordering
chaptersix Nov 11, 2026
3fb3983
Refuse rollback while invoker actions are in flight
chaptersix Nov 11, 2026
522ff18
Prove rollback destination ownership before closing the source
chaptersix Nov 11, 2026
818f725
Hold the overlap slot for selected starts awaiting their RunId
chaptersix Nov 11, 2026
a4e1b5c
Document ported scheduler fixes and unify remaining counterexamples
chaptersix Nov 11, 2026
0bf2ff7
Record the completed race-detector run in the coverage document
chaptersix Nov 11, 2026
fceb1cc
Run the scheduler harness on rapid's test handle
chaptersix Nov 12, 2026
2eae399
Move the task stepping loop into chasmtest
chaptersix Nov 12, 2026
75e20d0
Port the scheduler mutation check to Go and discover property-test pa…
chaptersix Nov 12, 2026
ef5690a
Skip the unresolved migration counterexamples instead of gating them …
chaptersix Nov 12, 2026
4982ed7
Tidy the scheduler Snapshot and invariant helpers
chaptersix Nov 12, 2026
7cd3341
Drive the scheduler property as a state machine with wider operations
chaptersix Nov 12, 2026
4a76fa7
Share one action budget across the invoker's terminate, cancel and st…
chaptersix Nov 12, 2026
2117d28
Keep scheduler tweakables at their defaults in the property test
chaptersix Nov 12, 2026
471e17b
Share scheduler test fixtures between the unit tests and the lifecycl…
chaptersix Nov 12, 2026
2bda549
Check the stuck and idle-deadline invariants from one place
chaptersix Nov 12, 2026
7c1bbc1
Build the scheduler driver on the shared test engine
chaptersix Nov 12, 2026
6321164
Describe the shared scheduler test scaffolding in the coverage document
chaptersix Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,33 @@ jobs:
path: ${{ env.LEAK_OUTPUT_DIR }}
if-no-files-found: ignore

property-test:
name: Property test
needs: [pre-build]
runs-on: ubuntu-24.04-arm
env:
GITHUB_TIMEOUT: 15
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ env.COMMIT }}

- name: Prepare Go
uses: ./.github/actions/prepare-go

- name: Run property tests
timeout-minutes: ${{ fromJSON(env.GITHUB_TIMEOUT) }}
run: make PROPERTY_TEST_TIMEOUT="$(("$GITHUB_TIMEOUT" - 1))m" property-test

- name: Upload failing cases
if: failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: property-test-failfiles
path: "**/testdata/rapid/**/*.fail"
if-no-files-found: ignore

integration-test:
name: Integration test
needs: [pre-build]
Expand Down Expand Up @@ -511,6 +538,7 @@ jobs:
needs:
- misc-checks
- unit-test
- property-test
- integration-test
- functional-test
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@

# Ignoring AI agent files
.agents/

# rapid failfiles replay raw draw sequences and go stale on generator changes;
# pin regressions with hand-written tests. CI uploads them as artifacts on failure.
**/testdata/rapid/
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,29 @@ leak-test:
-timeout $(LEAK_TIMEOUT) $(TEST_TAG_FLAG) \
./tests/leakcheck/ -args -persistenceType=sql -persistenceDriver=sqlite

# Property tests get a dedicated run: more generated cases than the unit-test
# default, and no retries, so a failing seed is reported instead of retried away.
# Failing cases are minimized into testdata/rapid/ next to the test.
# Default: every package with a test file that imports pgregory.net/rapid (the
# -rapid.checks flag is only defined in test binaries that link rapid, so any
# other package would fail with "flag provided but not defined").
PROPERTY_TEST_DIRS ?= $(patsubst %/,%,$(sort $(dir $(shell grep -l '"pgregory.net/rapid"' $(filter %_test.go,$(filter-out ./common/testx/% ./tests/mixedbrain/%,$(ALL_SRC)))))))
PROPERTY_TEST_CHECKS ?= 5000
PROPERTY_TEST_TIMEOUT ?= 10m
property-test:
@printf $(COLOR) "Run property tests..."
CGO_ENABLED=$(TEST_CGO_ENABLED) go test $(PROPERTY_TEST_DIRS) -count=1 \
-timeout $(PROPERTY_TEST_TIMEOUT) \
$(if $(TEST_RACE_ENABLED),-race,) \
$(TEST_TAG_FLAG) \
-rapid.checks=$(PROPERTY_TEST_CHECKS) $(TEST_ARGS)

# Mutation checks: each mutates one production file via a go test overlay and
# requires the named regression test to fail. See cmd/tools/mutationtest.
mutation-test:
@printf $(COLOR) "Run mutation tests..."
CGO_ENABLED=$(TEST_CGO_ENABLED) go run ./cmd/tools/mutationtest

verify-test-log:
@test -s test.log || (echo "TEST FAILURE: test.log is missing or empty" && exit 1)
@grep -q "^ok" test.log || (echo "TEST FAILURE: no passing test found in test.log" && exit 1)
Expand Down
Loading