Skip to content

0.0.7

Choose a tag to compare

@samzhu samzhu released this 30 Jul 07:27
· 49 commits to main since this release

ToppleCat 0.0.7

ToppleCat 0.0.7 replaces the earlier runtime-oriented acceptance API with one compiled ToppleScenario contract, and adds opt-in property-based verification.

⚠️ Breaking changes

Upgrade projects to the new acceptance-test shape:

  • Replace @ToppleTest with @ToppleAcceptanceTest.
  • Acceptance methods now receive ToppleCase, ToppleScenario, and a concrete ToppleStage.
  • Express setup and assertions directly through scenario.given(...), scenario.when(...), scenario.then(...), and scenario.and(...).
  • Replace field-based state transfer and fluent helpers. The old stage-field/state annotations, recorded/self helpers, sentence API, aliases, and runtime scenario processor are removed.
  • ToppleStage implementations must be non-final concrete classes with an accessible no-argument constructor.
  • Rename reviewer-custody tasks:
    • toppleCatHide → toppleCatSeal
    • toppleCatUpdateEscrow → toppleCatReseal
    • toppleCatMigrateEscrow has been removed.
  • Use --all-hidden-tests in place of --all-hidden.

This release deliberately does not migrate or read pre-0.0.7 reviewer custody. Create new 0.0.7 reviewer state and seal it after upgrading.

What’s new

  • A single compiled acceptance contract based on ToppleScenario, with compiler-described Given/When/Then/And steps.
  • Opt-in property-based testing through @ToppleProperty, PropertyTrials, and bounded generators.
  • An independent PROPERTY verification gate. Property checks fail safely and remain NOT_APPLICABLE when the safeguard is enabled but no properties are declared.
  • Reviewer custody now seals typed hidden-test rows; reviewer-only Java tests are no longer verification evidence.
  • Public evidence, feedback, and HTML reports align with the compiled contract while continuing to exclude reviewer-only details.
  • Updated documentation, samples, website, and Codex skills for authoring acceptance contracts and preparing releases.

Upgrade checklist

  1. Upgrade both the Gradle plugin and topplecat-junit dependency to 0.0.7.
  2. Rewrite acceptance methods and stages for the ToppleScenario API.
  3. Update renamed tasks and the hidden-test command-line option in scripts or CI.
  4. Recreate reviewer custody by running the normal review flow and toppleCatSeal.
  5. Run ./gradlew check and toppleCatVerify to confirm the complete contract verdict.

Requirements

ToppleCat 0.0.7 supports Java 25, Gradle, and JUnit 6.1.1.

=============================================

ToppleCat 0.0.7 以單一編譯後的 ToppleScenario 合約取代舊有的執行期驗收 API,並新增可選用的性質導向驗證。

⚠️ 破壞性變更

請將專案升級為新的驗收測試形式:

  • 將 @ToppleTest 改為 @ToppleAcceptanceTest。
  • 驗收方法現在會接收 ToppleCase、ToppleScenario 與具體的 ToppleStage。
  • 直接使用 scenario.given(...)、scenario.when(...)、scenario.then(...) 與 scenario.and(...) 描述設定與斷言。
  • 請取代欄位式狀態傳遞與 fluent helper。舊有的 stage 欄位/狀態註解、recorded/self helper、sentence API、別名與執行期 scenario processor 均已移除。
  • ToppleStage 實作必須是非 final 的具體類別,並提供可存取的無參數建構子。
  • 重新命名 reviewer custody 任務:
    • toppleCatHide → toppleCatSeal
    • toppleCatUpdateEscrow → toppleCatReseal
    • 已移除 toppleCatMigrateEscrow。
  • 請以 --all-hidden-tests 取代 --all-hidden。

本版刻意不遷移或讀取 0.0.7 以前的 reviewer custody。升級後請建立新的 0.0.7 reviewer state,再完成 seal。

新功能

  • 以 ToppleScenario 為基礎的單一編譯驗收合約,並由編譯器描述 Given/When/Then/And 步驟。
  • 透過 @ToppleProperty、PropertyTrials 與有界 generator 提供可選用的性質導向測試。
  • 獨立的 PROPERTY 驗證 gate。性質檢查會安全失敗;若 safeguard 已啟用但未宣告 property,則維持 NOT_APPLICABLE。
  • Reviewer custody 現在 seal 的是 typed hidden-test rows;reviewer-only Java tests 不再是驗證證據。
  • 公開 evidence、feedback 與 HTML report 會對齊編譯後合約,同時持續排除 reviewer-only 資訊。
  • 文件、範例、網站與 Codex skills 均已更新,以支援新的驗收合約撰寫與 release 準備流程。

升級清單

  1. 將 Gradle plugin 與 topplecat-junit dependency 一併升級至 0.0.7。
  2. 將驗收方法與 stage 改寫為 ToppleScenario API。
  3. 更新腳本或 CI 中重新命名的任務與 hidden-test 命令列選項。
  4. 依正常 review 流程重新建立 reviewer custody,並執行 toppleCatSeal。
  5. 執行 ./gradlew check 與 toppleCatVerify,確認完整合約 verdict。

環境需求

ToppleCat 0.0.7 支援 Java 25、Gradle 與 JUnit 6.1.1。