Skip to content

Migrate to property-testing-testo and enable regression corpus in CI - #24

Merged
rasuvaeff merged 1 commit into
masterfrom
feat/property-corpus-pipeline
Aug 10, 2026
Merged

Migrate to property-testing-testo and enable regression corpus in CI#24
rasuvaeff merged 1 commit into
masterfrom
feat/property-corpus-pipeline

Conversation

@rasuvaeff

@rasuvaeff rasuvaeff commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Fixes #23.

What

  • Drop frozen `rasuvaeff/property-testing: ^2.6`, require `rasuvaeff/property-testing-testo: ^0.1` via `-W`.
  • Add the corpus pipeline to the `coverage` job in `.github/workflows/build.yml`:
    • `actions/cache/restore` with `key: property-db-${{ github.run_id }}-${{ github.run_attempt }}` + `restore-keys: property-db-`;
    • `env: PROPERTY_DB: ${{ github.workspace }}/build/property-db` on `composer test:coverage:ci`;
    • `actions/cache/save` with `if: ${{ !cancelled() }}` and the same key.
  • Pattern mirrors `clickhouse-toolkit` PR #27 (reviewed; CodeRabbit nitpick on redundant concurrency declined — workflow-level `concurrency` already cancels stale runs in the same branch scope).

Local verification (full corpus cycle)

  1. Falsified `CompositionLawsPropertyTest::andIsCommutative` with an extra `Assert::true(false)`.
  2. Ran `testo --suite=Integration --filter=andIsCommutative` with `PROPERTY_DB=/app/build/property-db`:
    • `build/property-db/.json` written with a minimised `seed` entry for the property.
  3. Re-ran the same command: corpus replay reproduced the failure (regression persists across runs).
  4. Reverted the falsification; re-ran: property passed (300 assertions over 150 runs) and the corpus entry was auto-dropped — `.json` removed, only the transient `.lock` remained.
  5. `composer build` green: 258 tests, 2518 assertions.

Why split restore/save

A combined `actions/cache` declares `post-if: success()` — on a red property run the corpus is never saved, which is precisely the case that produces a new counterexample. `save` with `if: ${{ !cancelled() }}` persists the corpus even when `test:coverage:ci` exits non-zero. `run_attempt` is in the key so a re-run (same `run_id`) writes a fresh key instead of hitting `Cache already exists`.

Acceptance

  • `rasuvaeff/property-testing` removed from `composer.json`.
  • `rasuvaeff/property-testing-testo: ^0.1` in `require-dev`.
  • Corpus pipeline present in `coverage` job.
  • `composer build` green locally.
  • Local falsification persisted a corpus entry; after revert it was auto-dropped.

Summary by CodeRabbit

  • Tests

    • Improved coverage testing by restoring previously discovered regression cases before test runs and preserving updated cases afterward.
    • Enhanced property-based testing to support more consistent detection and reproduction of edge-case failures.
  • Chores

    • Updated the development testing setup to use the latest property-testing tooling.

Switch from the frozen rasuvaeff/property-testing:^2.6 to the split
rasuvaeff/property-testing-testo:^0.1 adapter (issue-first per
TESTING-STRENGTHENING-PLAN.md §3.1). Add the three-step corpus pipeline
(restore / PROPERTY_DB env / save) to the coverage job, mirroring the
pattern landed in clickhouse-toolkit PR #27.

Locally verified the full corpus cycle: a deliberately falsified
CompositionLawsPropertyTest::andIsCommutative persisted a minimised
seed to build/property-db, the next run replayed it and failed, and
after reverting the falsification the corpus entry was auto-dropped on
a green replay.

Fixes #23
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 43b77d52-5ae9-46e8-98f3-46dd84254370

📥 Commits

Reviewing files that changed from the base of the PR and between 93f3733 and fd70648.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • composer.json

📝 Walkthrough

Walkthrough

The PR replaces the frozen property-testing package with property-testing-testo and adds regression corpus restore, usage, and save steps to the coverage workflow.

Changes

Property testing corpus

Layer / File(s) Summary
Property-testing dependency and CI corpus wiring
.github/workflows/build.yml, composer.json
The development dependency changes to rasuvaeff/property-testing-testo. The coverage job restores and saves build/property-db and passes its path through PROPERTY_DB.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • rasuvaeff/circuit-breaker issue 13 — Covers the same property-testing dependency migration and PROPERTY_DB corpus caching pattern.
  • rasuvaeff/clickhouse-toolkit issue 26 — Covers the same persistent PROPERTY_DB corpus workflow.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the dependency migration and regression corpus CI changes.
Linked Issues check ✅ Passed The changes satisfy issue #23 by replacing the dependency and adding the restore, PROPERTY_DB, and save steps for the regression corpus.
Out of Scope Changes check ✅ Passed All described changes directly support issue #23, with no unrelated code or configuration changes identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/property-corpus-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rasuvaeff
rasuvaeff merged commit 78f0820 into master Aug 10, 2026
11 checks passed
@rasuvaeff
rasuvaeff deleted the feat/property-corpus-pipeline branch August 10, 2026 17:27
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.

Migrate to property-testing-testo and enable regression corpus in CI

1 participant