chore: cargo fmt across workspace; add analytics domain to CSP
Build and Deploy / build-and-push (push) Successful in 4m46s
Build and Deploy / build-and-push (push) Successful in 4m46s
- Apply cargo fmt to solitaire_engine, solitaire_server formatting. - solitaire_server/src/lib.rs: add https://analytics.aleshym.co to script-src, img-src, and connect-src so the analytics beacon loads without a CSP violation. - docs and README updates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,11 @@ Our 767-line `solitaire_core::solver` reimplements the full game rules to run th
|
||||
### 5. JSON Serialisation / Persistence
|
||||
`solitaire_core::GameState` serialises the full mid-game state to JSON via `serde` so the engine can save on exit and restore on launch. `KlondikeState` derives `Clone` + `Eq` + `Hash` but not `Serialize` / `Deserialize`. No upstream changes are needed — this is handled externally.
|
||||
|
||||
**Current verification (2026-06-01):** `klondike v0.3.0` and `card_game v0.4.0`
|
||||
crate manifests expose no `serde` dependency/feature, and source exports no
|
||||
serde derives for instruction/state snapshot types. Keep Ferrous'
|
||||
`SavedInstruction` bridge in place.
|
||||
|
||||
**Session history:** `StateSnapshot<G>` stores the pre-move game state and instruction. On load, the session is reconstructed from the serialised snapshot history — no full replay from seed needed.
|
||||
|
||||
**In our wrapper:** Serialise the `solitaire_core` wrapper struct using newtypes. Define `SavedInstruction` (a `Serialize + Deserialize` mirror of `KlondikeInstruction`) and `SavedStateSnapshot`. Reconstruct `SessionState` from the deserialised history. Schema version field lives on our wrapper.
|
||||
@@ -147,6 +152,29 @@ Steps in dependency order. Upstream issues #10, #11, and the solver are all merg
|
||||
|
||||
---
|
||||
|
||||
## Quaternions Upgrade Runbook
|
||||
|
||||
Use this sequence whenever upgrading `klondike` / `card_game` from the
|
||||
Quaternions registry:
|
||||
|
||||
1. Review upstream changes/releases:
|
||||
- <https://git.aleshym.co/Quaternions/card_game>
|
||||
- <https://git.aleshym.co/Quaternions/klondike>
|
||||
2. Run:
|
||||
```bash
|
||||
scripts/update_quaternions_deps.sh <klondike_version> <card_game_version>
|
||||
```
|
||||
3. If the script passes, inspect the resulting `Cargo.lock` diff and land the
|
||||
upgrade with the normal PR flow.
|
||||
|
||||
The script enforces:
|
||||
- lockfile update to requested versions
|
||||
- `cargo test --workspace`
|
||||
- `cargo clippy --workspace -- -D warnings`
|
||||
- deterministic replay/debug-API smoke tests in `solitaire_wasm`
|
||||
|
||||
---
|
||||
|
||||
## What Does NOT Need to Change
|
||||
|
||||
- The `solitaire_engine` Bevy layer — it works against `solitaire_core` types; changes are isolated to `solitaire_core`.
|
||||
|
||||
Reference in New Issue
Block a user