Skip to content

Accumulate unfinished windows through waits and retries - #46

Merged
asher-aqi merged 7 commits into
mainfrom
feat/accumulating-continuation
Nov 14, 2026
Merged

asher-aqi merged 7 commits into
mainfrom
feat/accumulating-continuation

Conversation

@asher-aqi

@asher-aqi asher-aqi commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Add opt-in settle.continuation: 'accumulate' in both runtimes. An unresolved window keeps its wait and provider-failure allowances, absorbs retained arrivals at retry not-before, and applies bounds to the complete offered payload. Omission keeps existing separate behavior.

wait -> retain failures -> reoffer within allowance
failure -> retain arrivals -> retry at not-before
offer -> whole-window bounds and loss metadata -> judge

Revision 4 preserves failure allowance in waiting state. Writers refuse mode changes while a held batch or fresh input remains. Legacy separate snapshots remain readable. Native completion tokens, close/release behavior and dead-letter fields retain their meanings.

Stacked on #45 (feat/serial-intake). Retarget to main after that PR lands. Do not merge into the feature branch.

Original implementation evidence

  • Before: the only available continuation removes wait at the horizon, resets failures after wait, and can let a fresh deadline bypass retry backoff or omit fresh input from the retry.
    After: native runtime tests cover the new mode's ordering, allowances, controls, complete-window bounds and metadata, with failing tests committed before fixes. Existing defaults remain covered by the frozen differential suite.
  • One final local run: 1598 TypeScript passes with two existing Redis conformance skips; 421 Python passes with zero skips. Real Redis/Postgres tests continue waiting state in both runtime directions and preserve the next backoff.
  • Oracle 128 and benchmark contracts 77 pass. Types, Ruff, format, builds/wheel and docs pass; 41 documentation blocks include four existing optional-package skips.
  • Four histories captured from revision 3 source test old snapshots/tails and mode-switch refusal. Twelve new shared scenarios leave the previous 72 unchanged. Independent spec and standards review findings are resolved.

Integration check

The branch includes main's folded-event exports at 30f8f06. The changes introduced by this layer are unchanged after removing diff line numbers and blob hashes. The combined stack has the same tree as the previously tested composition. All eight distinct CI jobs passed on this updated head. The optional Macroscope review check was skipped.

Merge Danger

Door: one-way once enabled

Accumulating state requires compatible readers and writers. Drain unresolved windows under their saved mode, or use new scopes, before changing mode or rolling back. A reducer-version change does not fence older writers.

Blast Radius: reducer

The default remains separate. This adds no distributed ownership or hard memory cap. Package publication is separate.

Pin horizon eligibility, retry absorption and failure lifetime, complete-window bounds, and stored-policy mode changes before implementing the optional mode. Existing defaults remain the baseline.
Keep failure allowance and admitted input with an unresolved window. Evaluate the complete offered payload against native bounds, retain default behavior, and refuse a mode switch while old state is unfinished. Preserve revision-3 read compatibility and require failure state for accumulating waits.
A forced flush with no fresh events currently offers wait at retry, and end loses its closing reason. Pin both public control semantics without allowing either to shorten retry not-before.
Apply forced and ended controls at the pending retry boundary. Exercise revision-3 data, waiting restart, terminal outcomes and cross-runtime failure allowance, and document the mode and stored-state limits.
An empty gap or pruned background input currently bypasses retry/horizon merging and leaks into the next unrelated window. Pin the retained-window metadata and wait allowance before correcting the transition.
Route accumulating retries and horizons through the same settlement path, including empty fresh input. Fold gap/drop metadata once, retain wait allowance, and document held-only end and frozen legacy fixture semantics.
Include the updated intake parent while preserving accumulating continuation behavior.
@asher-aqi
asher-aqi changed the base branch from feat/serial-intake to main November 14, 2026 04:21
@asher-aqi
asher-aqi merged commit 776916c into main Nov 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant