feat: Workshop Phase 1 — State Schema v1 (#404)
All checks were successful
Tests / lint (push) Successful in 3s
Tests / test (push) Successful in 57s

Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
This commit was merged in pull request #404.
This commit is contained in:
2026-03-19 02:24:13 -04:00
committed by hermes
parent ab3546ae4b
commit 3571d528ad
4 changed files with 134 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ def test_build_world_state_maps_fields():
def test_build_world_state_defaults():
"""Missing fields get safe defaults."""
result = _build_world_state({})
assert result["timmyState"]["mood"] == "focused"
assert result["timmyState"]["mood"] == "calm"
assert result["timmyState"]["energy"] == 0.5
assert result["version"] == 1
@@ -147,7 +147,7 @@ def test_world_state_endpoint_fallback(client, tmp_path):
mock_get.return_value = {
"version": 1,
"liveness": "2026-03-19T02:00:00Z",
"mood": "idle",
"mood": "calm",
"current_focus": "",
"active_threads": [],
"recent_events": [],
@@ -156,7 +156,7 @@ def test_world_state_endpoint_fallback(client, tmp_path):
resp = client.get("/api/world/state")
assert resp.status_code == 200
assert resp.json()["timmyState"]["mood"] == "idle"
assert resp.json()["timmyState"]["mood"] == "calm"
def test_world_state_endpoint_full_fallback(client, tmp_path):
@@ -172,7 +172,7 @@ def test_world_state_endpoint_full_fallback(client, tmp_path):
assert resp.status_code == 200
data = resp.json()
assert data["timmyState"]["mood"] == "idle"
assert data["timmyState"]["mood"] == "calm"
assert data["version"] == 1