feat(recording): link session observations proposals and action results

Capture all successful state reads with hashes and session-local IDs. Record action intent before POST, retain accepted/rejected/unknown results, and link subsequent observations. Preserve legacy feeds and finalize each invocation synchronously.
This commit is contained in:
0xrsydn 2026-09-22 15:26:59 +07:00
commit 9696282110
10 changed files with 476 additions and 123 deletions

View file

@ -5,7 +5,8 @@
- `brain.py`: policy entry point; dispatch, navigation, shops, and minigames.
- `policy/combat.py` and `policy/selection.py`: combat and selection proposals.
- `policy/context.py`: shared `Decision`, pending actions, and session-owned `PolicyContext`.
- `run.py`: observedecideact loop, captures, and session attribution.
- `run.py`: observedecideact loop and session attribution.
- `recording.py`: linked session journals; schema and limits in `docs/RECORDING.md`.
- `run_state.py`: reported run identity and combat-pile provenance; see `docs/RUN_STATE.md`.
- `sts2.py`: local game HTTP client. `jev.py`: TypeSafe model client and gates.
- `migrate.py`: dataset migration and integrity checks.
@ -31,6 +32,7 @@ Prefer integration/end-to-end checks; keep only essential regression tests and u
- Keep policy memory session-owned. Proposals do not record execution; reconcile accepted requests with fresh observations.
- Compute arithmetic and legality in code, not in Jev. Confidence does not prove correctness.
- Keep deterministic fallbacks usable with `client=None`. Test model paths with stubs.
- Preserve observation/proposal/attempt links. Flush attempt intent before POST; acceptance is not proof of a game effect.
- Preserve session/step attribution. Run outcomes are not per-decision correctness labels.
- Split evaluation data by run, not by decision row.