From 6e560f46635907ea593ba30b51c9b4b4498b4d3f Mon Sep 17 00:00:00 2001 From: Tang WeiHao Date: Sat, 11 Apr 2026 06:17:54 +0000 Subject: [PATCH 1/5] Use CARGO_PKG_VERSION for -V flag instead of hardcoded string Co-Authored-By: Claude Opus 4.6 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index b52a508..e494327 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ fn main() { match args[1].as_str() { "-h" | "--help" => print_help(), - "-V" | "--version" => println!("tinydew 0.1.0"), + "-V" | "--version" => println!("tinydew {}", env!("CARGO_PKG_VERSION")), "status" => { let state = tinydew::db::load_or_create(); tinydew::ui::render_status(&state); From 8f1723396d4065343da68ba608b498decfd3d778 Mon Sep 17 00:00:00 2001 From: Tang WeiHao Date: Sat, 11 Apr 2026 06:19:11 +0000 Subject: [PATCH 2/5] Add -V and -h showcase steps to CI Co-Authored-By: Claude Opus 4.6 --- .github/workflows/show-case.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/show-case.yml b/.github/workflows/show-case.yml index 181ec1c..360c444 100644 --- a/.github/workflows/show-case.yml +++ b/.github/workflows/show-case.yml @@ -22,6 +22,12 @@ jobs: - name: Build run: cargo build + - name: Show Version + run: cargo run -- -V + + - name: Show Help + run: cargo run -- -h + - name: Initial Status run: cargo run -- status From 530bae551964f9a6b6638ad0d09a894d41c537a5 Mon Sep 17 00:00:00 2001 From: Tang WeiHao Date: Sat, 11 Apr 2026 06:20:56 +0000 Subject: [PATCH 3/5] Bump version to 0.1.2 Co-Authored-By: Claude Opus 4.6 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 85d66b7..4d1e033 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tinydew" -version = "0.1.1" +version = "0.1.2" edition = "2024" license = "MIT" From ba48332def1b651c435b5bae24e3ac97b19e480e Mon Sep 17 00:00:00 2001 From: Tang WeiHao Date: Sat, 11 Apr 2026 06:21:52 +0000 Subject: [PATCH 4/5] Add -V and -h steps to CI spec Co-Authored-By: Claude Opus 4.6 --- agents/ci.spec.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/agents/ci.spec.md b/agents/ci.spec.md index 669be3b..b789ed5 100644 --- a/agents/ci.spec.md +++ b/agents/ci.spec.md @@ -30,9 +30,12 @@ Implemented. 1. Checkout (`actions/checkout@v4`). 2. Install stable Rust toolchain (`dtolnay/rust-toolchain@stable`). 3. `cargo build` — compile the project. - 4. Print initial status: + 4. Show version and help: + - `cargo run -- -V` — print version from Cargo.toml. + - `cargo run -- -h` — print help information. + 5. Print initial status: - `cargo run -- status` - 5. Run each action followed by `cargo run -- status` to show the result: + 6. Run each action followed by `cargo run -- status` to show the result: **Basic actions at Farm (start at (3,3)):** - `cargo run -- do move down` → `cargo run -- status` - `cargo run -- do move left` → `cargo run -- status` @@ -78,7 +81,7 @@ Implemented. - `cargo run -- status` *(back at Farm)* **Sleep and day transition:** - `cargo run -- do sleep` → `cargo run -- status` *(show day 2 state)* - 6. Each step uses a descriptive `name` label (e.g., "Move Down", "Status after Move Down", "Navigate to Square", "Status at SouthRiver") for readable CI output. + 7. Each step uses a descriptive `name` label (e.g., "Move Down", "Status after Move Down", "Navigate to Square", "Status at SouthRiver") for readable CI output. ### Showcase — Regions (`regions-showcase` job) - **Purpose**: Demonstrate region traversal across all four regions in a single run. From 55e5060509c260f062e06c30ae3757930f8585c0 Mon Sep 17 00:00:00 2001 From: Tang WeiHao Date: Sat, 11 Apr 2026 06:33:03 +0000 Subject: [PATCH 5/5] Add status after every action in all showcase jobs, rename first job to hello-case Co-Authored-By: Claude Opus 4.6 --- .github/workflows/show-case.yml | 96 +++++++++++++++++++++++++++++++-- agents/ci.spec.md | 20 +++++-- 2 files changed, 108 insertions(+), 8 deletions(-) diff --git a/.github/workflows/show-case.yml b/.github/workflows/show-case.yml index 360c444..551956d 100644 --- a/.github/workflows/show-case.yml +++ b/.github/workflows/show-case.yml @@ -10,7 +10,7 @@ env: TINYDEW_DB_PATH: /tmp/tinydew-showcase.sqlite jobs: - showcase: + hello-case: runs-on: ubuntu-latest steps: - name: Checkout @@ -176,11 +176,15 @@ jobs: run: cargo run -- status - name: Clear tile above player run: cargo run -- do clear up + - name: Status after Clear + run: cargo run -- status - name: Plant seed run: cargo run -- do plant up + - name: Status after Plant + run: cargo run -- status - name: Water crop run: cargo run -- do water up - - name: Status after planting and watering + - name: Status after Water run: cargo run -- status # Navigate Farm -> SouthRiver for fishing (each action = 5 min) @@ -206,39 +210,71 @@ jobs: # Fish 17 times to reach 23:55 (each fish = 60 min) - name: Fish 1 run: cargo run -- do fish + - name: Status after Fish 1 + run: cargo run -- status - name: Fish 2 run: cargo run -- do fish + - name: Status after Fish 2 + run: cargo run -- status - name: Fish 3 run: cargo run -- do fish + - name: Status after Fish 3 + run: cargo run -- status - name: Fish 4 run: cargo run -- do fish + - name: Status after Fish 4 + run: cargo run -- status - name: Fish 5 run: cargo run -- do fish + - name: Status after Fish 5 + run: cargo run -- status - name: Fish 6 run: cargo run -- do fish + - name: Status after Fish 6 + run: cargo run -- status - name: Fish 7 run: cargo run -- do fish + - name: Status after Fish 7 + run: cargo run -- status - name: Fish 8 run: cargo run -- do fish + - name: Status after Fish 8 + run: cargo run -- status - name: Fish 9 run: cargo run -- do fish + - name: Status after Fish 9 + run: cargo run -- status - name: Fish 10 run: cargo run -- do fish + - name: Status after Fish 10 + run: cargo run -- status - name: Fish 11 run: cargo run -- do fish + - name: Status after Fish 11 + run: cargo run -- status - name: Fish 12 run: cargo run -- do fish + - name: Status after Fish 12 + run: cargo run -- status - name: Fish 13 run: cargo run -- do fish + - name: Status after Fish 13 + run: cargo run -- status - name: Fish 14 run: cargo run -- do fish + - name: Status after Fish 14 + run: cargo run -- status - name: Fish 15 run: cargo run -- do fish + - name: Status after Fish 15 + run: cargo run -- status - name: Fish 16 run: cargo run -- do fish + - name: Status after Fish 16 + run: cargo run -- status - name: Fish 17 run: cargo run -- do fish - - name: Status before midnight (23:55) + - name: Status after Fish 17 (23:55) run: cargo run -- status # ===== CASE 1: Cross midnight — day increments, day-start does NOT fire ===== @@ -250,14 +286,24 @@ jobs: # ===== CASE 2: Reach 06:00 — day-start fires automatically ===== - name: Fish toward 06:00 (1) run: cargo run -- do fish + - name: Status after Fish toward 06:00 (1) + run: cargo run -- status - name: Fish toward 06:00 (2) run: cargo run -- do fish + - name: Status after Fish toward 06:00 (2) + run: cargo run -- status - name: Fish toward 06:00 (3) run: cargo run -- do fish + - name: Status after Fish toward 06:00 (3) + run: cargo run -- status - name: Fish toward 06:00 (4) run: cargo run -- do fish + - name: Status after Fish toward 06:00 (4) + run: cargo run -- status - name: Fish toward 06:00 (5) run: cargo run -- do fish + - name: Status after Fish toward 06:00 (5) + run: cargo run -- status - name: "CASE 2: Fish crosses 06:00 — day-start fires" run: cargo run -- do fish - name: "CASE 2: Status — day 2 06:55, weather rolled, crop grew, spawns appeared" @@ -281,11 +327,15 @@ jobs: run: cargo run -- do move up - name: Navigate to (3,3) run: cargo run -- do move up + - name: Status back at Farm + run: cargo run -- status - name: Harvest mature crop above run: cargo run -- do harvest up + - name: Status after Harvest + run: cargo run -- status - name: Water crop above run: cargo run -- do water up - - name: "CASE 3: Status before sleep — crop harvested and re-watered" + - name: "CASE 3: Status after Water — crop harvested and re-watered" run: cargo run -- status - name: "CASE 3: Sleep" run: cargo run -- do sleep @@ -375,14 +425,24 @@ jobs: # Day 1 — Buy 5 seeds (start with 1, total 6) - name: Buy Seed 1 run: cargo run -- do buy seed + - name: Status after Buy Seed 1 + run: cargo run -- status - name: Buy Seed 2 run: cargo run -- do buy seed + - name: Status after Buy Seed 2 + run: cargo run -- status - name: Buy Seed 3 run: cargo run -- do buy seed + - name: Status after Buy Seed 3 + run: cargo run -- status - name: Buy Seed 4 run: cargo run -- do buy seed + - name: Status after Buy Seed 4 + run: cargo run -- status - name: Buy Seed 5 run: cargo run -- do buy seed + - name: Status after Buy Seed 5 + run: cargo run -- status # Clear and plant at (4,1) through (4,6) # Player at (3,3), navigate up to (3,1) then work downward @@ -392,36 +452,58 @@ jobs: run: cargo run -- do move up - name: Clear (4,1) run: cargo run -- do clear right + - name: Status after Clear (4,1) + run: cargo run -- status - name: Plant (4,1) run: cargo run -- do plant right + - name: Status after Plant (4,1) + run: cargo run -- status - name: Navigate to (3,2) run: cargo run -- do move down - name: Clear (4,2) run: cargo run -- do clear right + - name: Status after Clear (4,2) + run: cargo run -- status - name: Plant (4,2) run: cargo run -- do plant right + - name: Status after Plant (4,2) + run: cargo run -- status - name: Navigate to (3,3) run: cargo run -- do move down - name: Clear (4,3) run: cargo run -- do clear right + - name: Status after Clear (4,3) + run: cargo run -- status - name: Plant (4,3) run: cargo run -- do plant right + - name: Status after Plant (4,3) + run: cargo run -- status - name: Navigate to (3,4) run: cargo run -- do move down - name: Clear (4,4) run: cargo run -- do clear right + - name: Status after Clear (4,4) + run: cargo run -- status - name: Plant (4,4) run: cargo run -- do plant right + - name: Status after Plant (4,4) + run: cargo run -- status - name: Navigate to (3,5) run: cargo run -- do move down - name: Clear (4,5) run: cargo run -- do clear right + - name: Status after Clear (4,5) + run: cargo run -- status - name: Plant (4,5) run: cargo run -- do plant right + - name: Status after Plant (4,5) + run: cargo run -- status - name: Navigate to (3,6) run: cargo run -- do move down - name: Clear (4,6) run: cargo run -- do clear right + - name: Status after Clear (4,6) + run: cargo run -- status - name: Plant (4,6) run: cargo run -- do plant right - name: "Grow: Status after planting 6 crops" @@ -440,18 +522,24 @@ jobs: run: cargo run -- do move up - name: Water (4,1) run: cargo run -- do water right + - name: Status after Water (4,1) + run: cargo run -- status - name: Navigate to (3,2) run: cargo run -- do move down - name: Navigate to (3,3) run: cargo run -- do move down - name: Water (4,3) run: cargo run -- do water right + - name: Status after Water (4,3) + run: cargo run -- status - name: Navigate to (3,4) run: cargo run -- do move down - name: Navigate to (3,5) run: cargo run -- do move down - name: Water (4,5) run: cargo run -- do water right + - name: Status after Water (4,5) + run: cargo run -- status # Sleep to next day - name: "Grow: Sleep to Day 2" diff --git a/agents/ci.spec.md b/agents/ci.spec.md index b789ed5..ac5ed35 100644 --- a/agents/ci.spec.md +++ b/agents/ci.spec.md @@ -22,7 +22,7 @@ Implemented. 2. Install stable Rust toolchain (`dtolnay/rust-toolchain@stable`). 3. `cargo test initial_farm_ui -- --nocapture` — run the farm UI regression test with visible output. -### Showcase (`show-case.yml`) +### Showcase (`show-case.yml`) — `hello-case` job - **Trigger**: Push to any branch, PR to `main`. - **Runner**: `ubuntu-latest`. - **Purpose**: Demonstrate all CLI actions and print the game status after each one as a showcase. @@ -83,6 +83,18 @@ Implemented. - `cargo run -- do sleep` → `cargo run -- status` *(show day 2 state)* 7. Each step uses a descriptive `name` label (e.g., "Move Down", "Status after Move Down", "Navigate to Square", "Status at SouthRiver") for readable CI output. +### Showcase — Day Transition (`day-transition-cases` job) +- **Purpose**: Verify day-transition mechanics: midnight crossing, 06:00 day-start trigger, and sleep. +- **DB**: `/tmp/tinydew-cases.sqlite` (isolated). +- **Steps**: + 1. Build the project. + 2. Setup: clear, plant, and water a crop on Day 1, showing status after each action. + 3. Navigate Farm → SouthRiver. Show status at destination. + 4. Fish 17 times to reach 23:55, showing status after each fish. + 5. **CASE 1**: Fish once to cross midnight → show status (day 2 00:55, no day-start effects). + 6. **CASE 2**: Fish 5 more times with status after each, then fish once more to cross 06:00 → show status (day-start fires: weather, crop growth, spawns). + 7. **CASE 3**: Navigate back to Farm (show status at destination), harvest (show status), water (show status), sleep → show status (day 3 06:00). + ### Showcase — Regions (`regions-showcase` job) - **Purpose**: Demonstrate region traversal across all four regions in a single run. - **DB**: `/tmp/tinydew-regions.sqlite` (isolated). @@ -98,9 +110,9 @@ Implemented. - **DB**: `/tmp/tinydew-grow.sqlite` (isolated). - **Steps**: 1. Build the project. - 2. Buy 5 seeds (start with 1 → total 6). - 3. Navigate along column x=3 from y=1 to y=6, clearing and planting at (4,1), (4,2), (4,3), (4,4), (4,5), (4,6). Show status. - 4. Navigate back and water only (4,1), (4,3), (4,5) — skip (4,2), (4,4), (4,6). + 2. Buy 5 seeds (start with 1 → total 6), showing status after each purchase. + 3. Navigate along column x=3 from y=1 to y=6, clearing and planting at (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), showing status after each clear and plant action. + 4. Navigate back and water only (4,1), (4,3), (4,5) — skip (4,2), (4,4), (4,6), showing status after each water action. 5. Sleep to Day 2. Show status — watered crops matured, unwatered crops remain seedlings. ## Notes