Online edition for BLOGE
0.9.8-RC1· facts verified 2026-09-15 · 中文
Appendix B — Session Cheat Sheet
Read Chapter 14 first. Return here when authoring or diagnosing a multi-turn session.
Choose the Boundary
| Need | Use | Do not use |
|---|---|---|
| One external pause and resume | Graph await | A session with one artificial round |
| Repeated outside turns with similar processing | session | A hand-built loop around HTTP requests |
| Named business states and backward transitions | state_machine | Phase names pretending to be states |
Phase Card
| Item | Question |
|---|---|
ONCE or ROUND | Does this phase run once, or once per incoming signal? |
max_rounds | What finite budget stops a runaway conversation? |
until | What observable result ends the phase? |
| signal schema | Which payload is legal at this boundary? |
| timeout / idle timeout | How does waiting end without a signal? |
| owner | Which outer runtime owns identity, recovery, and termination? |
Runtime Moves
| Move | Meaning | Evidence to retain |
|---|---|---|
| start | Create one stable session identity | Definition version and initial context |
| signal | Deliver one validated round payload | Signal type, correlation identity, accepted/rejected outcome |
| restore | Rehydrate from the last durable snapshot | Snapshot version and original deadlines |
| terminate | End by policy rather than normal until | Stable reason and final status |
Failure Scan
- Reject an invalid signal before it mutates round state.
- Keep phase and session round limits finite.
- Test late, duplicate, and concurrent signals.
- For crash recovery, use
bloge-session-durable; an in-memory session is not a durability claim. - In nested orchestration, send all external signals through the declared outer owner.
Mainline: Chapter 14, Chapter 16. Exact contracts: docs/session-phase-round-specification.md, bloge-session-ext, and bloge-session-durable in the BLOGE source tree.