Step 21.9: plan amendments and regression
CI / check (push) Successful in 6m44s
Details
CI / check (push) Successful in 6m44s
Details
CR-021 §6: plan 0.3, 0.5 and 12.1, CR-001 goals note, CR-014 Step 14.6 (the event-queue catch-up) and CR-019 (pilots choose from completable boards). Full suite and e2e pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8b1f6428db
commit
0cb8e364c6
|
|
@ -1737,3 +1737,7 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md`
|
||||||
- **The window opens at minute 180**, when every world owns four ships. Seed 777 (0.34) and 99 (0.38) fall below 40% on their own; the target is checked on the median, like the other balance targets.
|
- **The window opens at minute 180**, when every world owns four ships. Seed 777 (0.34) and 99 (0.38) fall below 40% on their own; the target is checked on the median, like the other balance targets.
|
||||||
- **No tuning**: the default 15-game-minute turnaround and 3-minute first look give a median of 56%.
|
- **No tuning**: the default 15-game-minute turnaround and 3-minute first look give a median of 56%.
|
||||||
- **A stranded Independent pilot is a violation** when the company has money above the floor but the ship can't reach anywhere. None occurred.
|
- **A stranded Independent pilot is a violation** when the company has money above the floor but the ship can't reach anywhere. None occurred.
|
||||||
|
|
||||||
|
## Step 21.9
|
||||||
|
|
||||||
|
- **The game design document is left to the designer** (CR-021 §6), as with CR-016.
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ Record these in `DECISIONS.md` and in `implementation-plan.md` §0.5.
|
||||||
- **Test:** For each goal, a state summary just short of the condition reports it incomplete, and a summary that meets it reports it complete. Results are identical for identical inputs.
|
- **Test:** For each goal, a state summary just short of the condition reports it incomplete, and a summary that meets it reports it complete. Results are identical for identical inputs.
|
||||||
- **Amended by CR-010:** Goal 4 "Hire your first pilot" is now "Fly a contract with [veteran's name]" (`veteran-contract`, Step 10J.3).
|
- **Amended by CR-010:** Goal 4 "Hire your first pilot" is now "Fly a contract with [veteran's name]" (`veteran-contract`, Step 10J.3).
|
||||||
- **Amended by CR-013:** Goal 3 is "Buy a ship from the Market" (ships from the deal don't count) and goal 4 is "Complete a Priority contract" (Step 10M.2).
|
- **Amended by CR-013:** Goal 3 is "Buy a ship from the Market" (ships from the deal don't count) and goal 4 is "Complete a Priority contract" (Step 10M.2).
|
||||||
|
- **Noted by CR-021:** a later goal for buying the Dispatch Office is possible; it is not part of CR-021.
|
||||||
|
|
||||||
### Step 10A.6 — Schema and database
|
### Step 10A.6 — Schema and database
|
||||||
- Add to the database: company loan balance; tutorial runs completed; a deal-accepted flag; claimed goals per player; the repayment amount on each dispatch record; the `purchasable` flag reflected wherever ship models are listed.
|
- Add to the database: company loan balance; tutorial runs completed; a deal-accepted flag; claimed goals per player; the repayment amount on each dispatch record; the `purchasable` flag reflected wherever ship models are listed.
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ Record these in `DECISIONS.md` and `implementation-plan.md` §0.5.
|
||||||
### Step 10K.6 — Resolution loop
|
### Step 10K.6 — Resolution loop
|
||||||
- Resolve due dispatches, rest endings, and shop completions on load, when the app resumes (Capacitor `resume`, browser `visibilitychange`), and every 5 seconds while open. Uses the same idempotent resolution as Step 6.1.
|
- Resolve due dispatches, rest endings, and shop completions on load, when the app resumes (Capacitor `resume`, browser `visibilitychange`), and every 5 seconds while open. Uses the same idempotent resolution as Step 6.1.
|
||||||
- **Test:** A dispatch whose arrival passed while the app was closed is resolved exactly once on load. Running the loop twice in a row changes nothing the second time. "While you were away" summaries appear as before.
|
- **Test:** A dispatch whose arrival passed while the app was closed is resolved exactly once on load. Running the loop twice in a row changes nothing the second time. "While you were away" summaries appear as before.
|
||||||
|
- **Amended by CR-021:** The loop (and every command) runs the event-queue catch-up: arrivals, each at its own time, and Independent pilots' decisions, in time order, at most 7 days, in chunks with a progress hook (Step 21.4).
|
||||||
|
|
||||||
### Step 10K.7 — Switch the client to the engine
|
### Step 10K.7 — Switch the client to the engine
|
||||||
- The typed API client calls engine commands instead of HTTP. TanStack Query keeps working with engine calls as its query and mutation functions. Remove the server-time sync (Step 8.3); use the engine clock.
|
- The typed API client calls engine commands instead of HTTP. TanStack Query keeps working with engine calls as its query and mutation functions. Remove the server-time sync (Step 8.3); use the engine clock.
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,8 @@ Record these in `DECISIONS.md` and `implementation-plan.md` §0.5, using the nex
|
||||||
| CR-005 10E.3, 10E.8 | Class-mix test uses a full-capability fleet fixture; "TOO SLOW" card badge removed. |
|
| CR-005 10E.3, 10E.8 | Class-mix test uses a full-capability fleet fixture; "TOO SLOW" card badge removed. |
|
||||||
| CR-002 | Stored boards also record the fleet snapshot (18.3). |
|
| CR-002 | Stored boards also record the fleet snapshot (18.3). |
|
||||||
|
|
||||||
|
> **Amended by CR-021:** Independent pilots choose only from these completable boards (the board the player sees, minus first contacts, the first-look window and the job the player has open); the board rules don't change.
|
||||||
|
|
||||||
## 7. Out of scope
|
## 7. Out of scope
|
||||||
|
|
||||||
A "show all jobs" toggle, regenerating boards immediately when the fleet changes, hiding jobs based on credits or fuel on board, and anything else in `implementation-plan.md` §0.3.
|
A "show all jobs" toggle, regenerating boards immediately when the fleet changes, hiding jobs based on credits or fuel on board, and anything else in `implementation-plan.md` §0.3.
|
||||||
|
|
|
||||||
|
|
@ -773,6 +773,7 @@ Steps 10M.1–10M.5 are specified in `memory-bank/change-requests/CR-013-veteran
|
||||||
- **Amended by CR-012:** The script runs two second-ship policies, Lighter-first and Clipper-first; both must reach "own three ships" within 25 % of each other's time. *(Replaced by CR-013, below.)*
|
- **Amended by CR-012:** The script runs two second-ship policies, Lighter-first and Clipper-first; both must reach "own three ships" within 25 % of each other's time. *(Replaced by CR-013, below.)*
|
||||||
- **Amended by CR-013:** The player starts with two ships (Courier and Clipper) and a 66,600 cr loan; re-check every timing target with them. Targets: first Market purchase 45–75 minutes, first discovery under 90 minutes, loan paid off in under 4 hours of active play. Run two first-purchase policies, Lighter-first and Freighter-first; both must reach "own four ships" within 25 % of each other's time.
|
- **Amended by CR-013:** The player starts with two ships (Courier and Clipper) and a 66,600 cr loan; re-check every timing target with them. Targets: first Market purchase 45–75 minutes, first discovery under 90 minutes, loan paid off in under 4 hours of active play. Run two first-purchase policies, Lighter-first and Freighter-first; both must reach "own four ships" within 25 % of each other's time.
|
||||||
- **Amended by CR-018:** Ships are on Manual refueling: the simulated player taps "Refuel here first" before a leg only when the best job needs more fuel than is aboard (or to go looking for work), instead of relying on Auto top-up. The deal's ships start full. The first Market purchase target is 30–95 minutes (user decision). The balance script also prints each ship's fuel share of the median payout per route (Step 18.1).
|
- **Amended by CR-018:** Ships are on Manual refueling: the simulated player taps "Refuel here first" before a leg only when the best job needs more fuel than is aboard (or to go looking for work), instead of relying on Auto top-up. The deal's ships start full. The first Market purchase target is 30–95 minutes (user decision). The balance script also prints each ship's fuel share of the median payout per route (Step 18.1).
|
||||||
|
- **Amended by CR-021:** An away scenario: after three hours of play the fleet is fixed, and for eight hours either the usual policy flies every ship or the hired pilots fly Independent while the avatar stays put. The Independent fleet must earn 40–80% of active play (median over the worlds), never buy fuel below the spending floor and never be stranded (Step 21.8).
|
||||||
- **Amended by CR-019:** Boards are generated for each location's qualifying fleet and read with jobs the fleet can no longer complete hidden, as in the engine; a check confirms no run is ever shown a job its fleet can't complete. Before buying a ship, the simulated player keeps enough cash to fill every landed ship's tank.
|
- **Amended by CR-019:** Boards are generated for each location's qualifying fleet and read with jobs the fleet can no longer complete hidden, as in the engine; a check confirms no run is ever shown a job its fleet can't complete. Before buying a ship, the simulated player keeps enough cash to fill every landed ship's tank.
|
||||||
- **As built:** `packages/sim/balance/simulate.ts` (run with `pnpm --filter @deadhead/sim balance [seed] [hours]`), tested in `packages/sim/test/balance.test.ts` over seven world seeds: timing targets on the median of the Lighter-first runs (the default player buys the cheaper ship first), the four-ship comparison on both policies' medians, and every invariant in every run. Meeting the targets needed decisions 0.5.84 and 0.5.85 and the tuning in `DECISIONS.md` (Step 12.1).
|
- **As built:** `packages/sim/balance/simulate.ts` (run with `pnpm --filter @deadhead/sim balance [seed] [hours]`), tested in `packages/sim/test/balance.test.ts` over seven world seeds: timing targets on the median of the Lighter-first runs (the default player buys the cheaper ship first), the four-ship comparison on both policies' medians, and every invariant in every run. Meeting the targets needed decisions 0.5.84 and 0.5.85 and the tuning in `DECISIONS.md` (Step 12.1).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -481,4 +481,6 @@ Spec: `memory-bank/change-requests/CR-021-independent-pilots.md` (received as "C
|
||||||
|
|
||||||
Screenshots: `docs/screenshots/21-7-logbook-phone.png`, `21-7-logbook-desktop.png` (Rosa, an hour away: 11–12 jobs, two rests), `21-7-first-look-desktop.png`. Tests (`apps/web/test/board-logbook.test.tsx`): the chip counts down from 02:31 and disappears after the window; no chip without Independent pilots or on a first contact; the indicator only after 0.5 s and never for a quick pass; the logbook's entries, XP and current status per pilot; totals that are the sums of the entries; the sheet shows the logbook and the player's own trip as a card. Summary fixtures gained `independent`.
|
Screenshots: `docs/screenshots/21-7-logbook-phone.png`, `21-7-logbook-desktop.png` (Rosa, an hour away: 11–12 jobs, two rests), `21-7-first-look-desktop.png`. Tests (`apps/web/test/board-logbook.test.tsx`): the chip counts down from 02:31 and disappears after the window; no chip without Independent pilots or on a first contact; the indicator only after 0.5 s and never for a quick pass; the logbook's entries, XP and current status per pilot; totals that are the sums of the entries; the sheet shows the logbook and the player's own trip as a card. Summary fixtures gained `independent`.
|
||||||
- [x] **Step 21.8 — Balance.** `simulate` takes `scenario: { atMinute, minutes, mode }`. It plays as usual until `atMinute` (180: four ships), then for `minutes` neither buys, upgrades nor claims goals. In `active` mode the usual policy flies every ship. In `away` mode the avatar stays put and hired pilots act at their decision points through the sim's `chooseAction`, as the engine's catch-up does: turnaround, first-look window, the spending floor, waiting and heading home. `scenarioEarnings` is the window's credits gained plus loan repaid. The balance script prints the comparison. Results with default content (7 worlds, 8 hours): away / active ratios 0.34–0.62, median **0.56** (target 40–80%), so no tuning was needed; no pilot bought fuel below the floor or was stranded. Tests (`packages/sim/test/balance.test.ts`): the median ratio is within 40–80%; the away runs have no violations.
|
- [x] **Step 21.8 — Balance.** `simulate` takes `scenario: { atMinute, minutes, mode }`. It plays as usual until `atMinute` (180: four ships), then for `minutes` neither buys, upgrades nor claims goals. In `active` mode the usual policy flies every ship. In `away` mode the avatar stays put and hired pilots act at their decision points through the sim's `chooseAction`, as the engine's catch-up does: turnaround, first-look window, the spending floor, waiting and heading home. `scenarioEarnings` is the window's credits gained plus loan repaid. The balance script prints the comparison. Results with default content (7 worlds, 8 hours): away / active ratios 0.34–0.62, median **0.56** (target 40–80%), so no tuning was needed; no pilot bought fuel below the floor or was stranded. Tests (`packages/sim/test/balance.test.ts`): the median ratio is within 40–80%; the away runs have no violations.
|
||||||
- [ ] Step 21.9 — Plan amendments and regression
|
- [x] **Step 21.9 — Plan amendments and regression.** CR-021 §6 applied: plan 0.3 (automation struck; standing orders, pilot traits, decision events and a hiring market stay deferred) and 0.5 (0.5.122–0.5.130); a note on CR-001's goals (a Dispatch Office goal later, not now); CR-014 Step 14.6 (the loop is the event-queue catch-up); CR-019 (pilots choose from completable boards); plan Step 12.1 (the away scenario). `game-design-document.md` is the designer's to update. Full suite: typecheck, lint, 1399 unit tests and 9 e2e tests pass.
|
||||||
|
|
||||||
|
**Phase 21 is complete; stopped for review.** Manual check for the user: buy the Dispatch Office on the Bridge, set Rosa to Independent with default orders, close the app for an hour, reopen and read her logbook; then confirm a first-contact job stayed on the board for you.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue