Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions DEVIATIONS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Shell changes from the frozen shell

## Accumulating continuation

The optional `settle.continuation = 'accumulate'` reoffers waits within their allowance, retains provider failures across waits and absorbs admitted input at a strict retry not-before time. Whole-window count, rendered bytes and age constrain wait eligibility, including ties. Ordinary continuation keeps the frozen behavior. The existing reducer and delivery machinery remain in use; no host timer or alternate scheduler is introduced.

Reducer revision 4 records this transition change. Accumulating waiting state retains failures; legacy separate waiting state keeps its historical zero-reset meaning. A live writer mode change requires no held batch or fresh entries. Old readers are not fenced by this revision number. [The reference](docs/reference.md#accumulating-continuation) defines the API and limits.

## Serial intake

The optional serial intake owns registration, asynchronous preparation and immediate effects for one scope. It gives registered raw work precedence over an idle deferred timer and suppresses the pre-input catch-up tick for that owned input only. The existing reducer tick runs after a nonempty batch. Ordinary input and frozen differential cases retain their prior scheduling.

The queue, callbacks and catch-up metadata are local and are never stored. Persisted inputs and reducer revision 3 are unchanged. Closing fences unapplied completion results and joins their native release writes. This is local ordering, not distributed scope ownership. [Serial intake](docs/reference.md#serial-intake) defines the boundary and limits.
The queue, callbacks and catch-up metadata are local and are never stored. Serial intake introduced no new persisted inputs or reducer-version change. Closing fences unapplied completion results and joins their native release writes. This is local ordering, not distributed scope ownership. [Serial intake](docs/reference.md#serial-intake) defines the boundary and limits.

## Continuous quiet duration

An optional `Event.quietForMs` gives a continuous event its own quiet duration. Once any continuous entry supplies it, the continuous deadline is the latest of the entries' individual end times. Entries without a duration use the policy's `streamGapMs`. Other kinds keep their independent triggers. With no explicit duration, the frozen default behavior remains unchanged, including backwards clocks.

The reducer revision is 3. Explicit durations persist in entries and logged inputs; summaries rebuild from them. Tail replay uses the snapshot policy for omitted durations. A live policy change recomputes those defaults under the new policy, as before. Processes sharing a store must use the same revision before opting in. Shared fixtures and runtime tests cover the extension; the frozen differential cases omit it. [The reference](docs/reference.md#continuous-quiet-duration) defines admission and timing.
Continuous durations were introduced in reducer revision 3. Explicit durations persist in entries and logged inputs; summaries rebuild from them. Tail replay uses the snapshot policy for omitted durations. A live policy change recomputes those defaults under the new policy, as before. Processes sharing a store must use the same revision before opting in. Shared fixtures and runtime tests cover the extension; the frozen differential cases omit it. [The reference](docs/reference.md#continuous-quiet-duration) defines admission and timing.

## Observation time

Expand Down
7 changes: 5 additions & 2 deletions conformance/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Conformance fixtures

attend has two implementations, TypeScript in `src/` and Python in `python/`. Both run the JSON fixtures in this directory and must reproduce every recorded value. The TypeScript source is the spec: `pnpm conformance:update` rebuilds every fixture from `src`, and `pnpm test` fails when `src` and the fixtures disagree.
attend has two implementations, TypeScript in `src/` and Python in `python/`. Both run the JSON fixtures in this directory and must reproduce every recorded value. `pnpm conformance:update` rebuilds the current-behavior fixtures from TypeScript `src`, and `pnpm test` fails when source and fixtures disagree. Frozen legacy fixtures are excluded from regeneration so a change cannot rewrite its compatibility baseline.

| Fixture | What it pins | TypeScript source |
| Fixture | What it pins | Source |
|---|---|---|
| `step-101.json`, `step-202.json`, `step-303.json` | The pure reducer. Each plan is a list of logged inputs from a seeded random plan, stepped from `initialRecord(scope)` with its config. Every step records its effects in full and a digest of the record after it, and every 16th step and the last also record the full record. | `test/conformance/fixtures.ts` |
| `ids.json` | Window ids (FNV-1a 64 over `len:scope` and each `len:id`) for pinned and random strings, lone surrogates included, and UTF-8 lengths. | `test/conformance/fixtures.ts` |
| `threshold.json` | `thresholdRoute`, `validate` and `suggestThreshold`. NaN inputs are written as `null`. | `test/conformance/fixtures.ts` |
| `notice.json` | `defaultNotice` text. | `test/conformance/fixtures.ts` |
| `scenarios.json` | The runtime: timed pushes, flushes and ends per scope through `createAttend` on a fake clock over the memory store, with scripted judge, sink and dead-letter answers. Each records every judge input, every delivery and dead-letter attempt, every trace by scope, each call's result, inspections, the final records and the decision log. | `test/conformance/scenario.ts`, `test/conformance/scenarios.ts` |
| `judges.json` | `jevJudge`, `decisionsJudge` and `llmJudge` against scripted replies: every request byte for byte, the budget, and how the call ended. | `test/conformance/judges.ts` |
| `continuation-legacy.json` | Revision-3 commit groups, snapshots/tails and expected reads, captured from source commit `f111566c1fa28d7dd7a124502eca4943dbbe15d6`. Both ports load the original writes and check reads plus mode-switch behavior. Frozen; not rebuilt by `conformance:update`. | `test/continuation.test.ts`, `python/tests/test_continuation.py` |

## Comparing values

Expand All @@ -22,6 +23,8 @@ attend has two implementations, TypeScript in `src/` and Python in `python/`. Bo
A scenario starts a fake clock at `start` (default 1000), creates attend over a fresh memory store with the scenario's `kinds` map, `settle` policy and `config`, and runs it with `sweepMs` (default 1000). It then performs its steps in order and lets the runtime go idle after each one:

- `push`: push the events to the scope and await it. Events default to `at: 0` and `data: {}`.
- `submit`: register preparation on a scope named in `intakes`. It can delay or fail preparation and return a source cursor or truncation flag. The runner opens those handles before starting attend.
- `closeIntake`: fence and join that scope's intake.
- `advance`: advance the fake clock, firing each due timer in order and letting its work finish.
- `flush` and `end`: call them on the scope and await them.
- `release`: settle a held judge answer or handler attempt, with `answer` or with `fail` and `permanent`.
Expand Down
Loading
Loading