You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 77b31fe
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ A wait only observes. It ends with a reply or failure, when its task pauses, at
42
42
43
43
Replies and failures arrive on their own. At the next safe turn boundary, or once when the parent is idle, pi-sub batches unannounced ones into one message; a complete tool return already counts as delivery. Each completed execution has an immutable report ID. Serialized reports up to 2 KiB are inline; larger ones include a reference, a response preview of at most 512 bytes and an error preview of at most 240 bytes. A result or batch is at most 8 KiB; an oversized batch is cached as a report with a summary and reference.
44
44
45
-
Page a report with `sub_result({ report: "<report-id>", offset: 0, limit: 4096 })`. This returns plain text and the next offset without executing a child. Offsets are zero-based UTF-8 byte boundaries; limits are bytes, default 4096, minimum 4 and maximum 4096. The parent runtime has one 16 MiB FIFO cache of UTF-8 report payloads; reads do not refresh it. Eviction returns “Report no longer available”, without recreating the report. A single report over 16 MiB spills to a private temporary file until runtime teardown. A batch also spills if caching it would evict a report it references; later FIFO eviction is unchanged. The budget excludes JS heap, native history, pending input and journals. Session switch, fork, reload or shutdown tears down the runtime; preserve relevant findings before leaving.
45
+
Page a report with `sub_result({ report: "<report-id>", offset: 0, limit: 4096 })`. This returns plain text and the next offset without executing a child. Offsets are zero-based UTF-8 byte boundaries; limits are bytes, default 4096, minimum 4 and maximum 4096. The parent runtime has one 16 MiB FIFO cache of UTF-8 report payloads; reads do not refresh it. If FIFO eviction reaches a task’s current report before its first handoff, the cache keeps a temporary disk copy. After handoff or replacement by the task’s next execution, later writes may evict it. An expired reference returns “Report no longer available”. A single report over 16 MiB spills to a private temporary file until runtime teardown. A batch also spills if caching it would evict a report it references; later FIFO eviction is unchanged. The budget excludes JS heap, native history, pending input and journals. Session switch, fork, reload or shutdown tears down the runtime; preserve relevant findings before leaving.
Copy file name to clipboardExpand all lines: docs/decisions/0007-bounded-report-cache.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Each completed execution produces an immutable report with its own ID. A parent
8
8
9
9
Acceptance or stop removes the task, not its cached reports. First delivery includes the inline result or preview and reference; accepting a previously delivered result returns only the task ID, status and available report ID. Operator stop notifications include final report IDs. There are no idempotent task receipts. Evicted reports fail explicitly with “Report no longer available”; they are not silently recreated. Reports and spill files expire at runtime teardown. Full reports are not retained unbounded in the coordinator or native message details.
10
10
11
-
A serialized report of at most 2 KiB is inline. Larger reports carry a reference, a response preview of at most 512 bytes and an error preview of at most 240 bytes. The entire model-facing result or batch is at most 8 KiB; an oversized batch is itself cached as a report and delivered as a summary and reference. If inserting the envelope would evict a referenced report, spill the envelope without changing the FIFO. This protects the handoff, not subsequent reads. Delivery of an inline report or reference is independent of reading and task acceptance.
11
+
A serialized report of at most 2 KiB is inline. Larger reports carry a reference, a response preview of at most 512 bytes and an error preview of at most 240 bytes. The entire model-facing result or batch is at most 8 KiB; an oversized batch is itself cached as a report and delivered as a summary and reference. If inserting the envelope would evict a referenced report, spill the envelope without changing the FIFO. FIFO displacement before first delivery spills the task's current report instead of dropping it. Once handed off or superseded, a displaced copy is deleted on the next insertion that does not reference it. This protects the first handoff, including acceptance or stop, not subsequent reads. Delivery of an inline report or reference is independent of reading and task acceptance.
12
12
13
13
`sub_result` accepts either `{id, wait?, timeout?, finish?}` for task observation and acceptance, or `{report, offset?, limit?}` for report paging, never both. Paging returns plain text and the next offset without starting a child execution. Offsets are zero-based UTF-8 byte boundaries; the limit is in bytes, defaults to 4096 and is between 4 and 4096 inclusive.
0 commit comments