Repository navigation
0.0.7
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
@ToppleTestwith@ToppleAcceptanceTest. - Acceptance methods now receive
ToppleCase,ToppleScenario, and a concreteToppleStage. - Express setup and assertions directly through
scenario.given(...),scenario.when(...),scenario.then(...), andscenario.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.
ToppleStageimplementations must be non-finalconcrete classes with an accessible no-argument constructor.- Rename reviewer-custody tasks:
toppleCatHide→toppleCatSealtoppleCatUpdateEscrow→toppleCatResealtoppleCatMigrateEscrowhas been removed.
- Use
--all-hidden-testsin 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
PROPERTYverification gate. Property checks fail safely and remainNOT_APPLICABLEwhen 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
- Upgrade both the Gradle plugin and
topplecat-junitdependency to0.0.7. - Rewrite acceptance methods and stages for the
ToppleScenarioAPI. - Update renamed tasks and the hidden-test command-line option in scripts or CI.
- Recreate reviewer custody by running the normal review flow and
toppleCatSeal. - Run
./gradlew checkandtoppleCatVerifyto 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→toppleCatSealtoppleCatUpdateEscrow→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 準備流程。
升級清單
- 將 Gradle plugin 與
topplecat-junitdependency 一併升級至0.0.7。 - 將驗收方法與 stage 改寫為
ToppleScenarioAPI。 - 更新腳本或 CI 中重新命名的任務與 hidden-test 命令列選項。
- 依正常 review 流程重新建立 reviewer custody,並執行
toppleCatSeal。 - 執行
./gradlew check與toppleCatVerify,確認完整合約 verdict。
環境需求
ToppleCat 0.0.7 支援 Java 25、Gradle 與 JUnit 6.1.1。