mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
A Session no longer holds its line while a commit is stored. Commits that arrive while one storage call is in flight go out together in the next call, each with its own seq and outcome; a job runs until it touches a key an unpublished commit wrote, then waits for that commit's publication. Outcomes are delivered in line order; publication is in line order, one commit per macrotask. The scheduler's decisions run as regions that record the keys they read and rerun after a wait, with side effects only after a clean check. Storage.commit(batches, receive, context) replaces commit(writes, adopt, context): prefix semantics (Durable's own checks refuse a batch and keep the ones before it; any other failure rejects the call), receipts per stored batch, optional publishing() scope. Memory, SQLite, JSONL, IndexedDB and StoreStorage implement it natively; StoreStorage through the new ChordStore.commitSeries (one store transaction per call), replacing commitInBatch. A normal run makes no storage reads: bounded record cache, conversation tails, task-document index, kept context ranges. A tool slot's running status and a generation's attempt are stored with the next commit (12 instead of 14 commits per run). One Harness with 128 conversations over storage with a 4 ms round trip: about 5 -> 440 agent runs per second. Design: packages/durable/docs/group-commit.md. |
||
|---|---|---|
| .. | ||
| allocator.test.ts | ||
| applier.test.ts | ||
| apply-batch.test.ts | ||
| archive.test.ts | ||
| catalog.test.ts | ||
| claims.test.ts | ||
| columns.test.ts | ||
| engine.test.ts | ||
| evaluate.test.ts | ||
| export.test.ts | ||
| expression.test.ts | ||
| import.test.ts | ||
| json-column.test.ts | ||
| jsonl.test.ts | ||
| outbox.test.ts | ||
| query.test.ts | ||
| refusal.test.ts | ||
| rows.test.ts | ||
| sql.test.ts | ||
| store.test.ts | ||
| table-changes.test.ts | ||
| table-evolve.test.ts | ||
| table-handle.test.ts | ||
| table-history.test.ts | ||
| table-migration.test.ts | ||
| table-writes.test.ts | ||
| table.test.ts | ||
| text.test.ts | ||