Skip to content

Separate counted settlement from background retention - #48

Merged
asher-aqi merged 5 commits into
mainfrom
feat/independent-event-limits
Nov 14, 2026
Merged

asher-aqi merged 5 commits into
mainfrom
feat/independent-event-limits

Conversation

@asher-aqi

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

Copy link
Copy Markdown
Member

Summary

Add settle.eventLimits: { counted, background } (event_limits in Python) for accumulating continuation.

admit → deduplicate → retain background → counted threshold → settle

The counted threshold is inclusive. Background retention is FIFO across unresolved held and fresh input. Live offers stay immutable; retries keep their not-before time. Omission preserves scalar limits.

Revision 5 persists the option and refuses changes while work remains. Writer startup also fixes saved-tail replay that could reinterpret completed input under new settings. Stacked on #47.

Original implementation evidence

  • Before: committed failures for independent limits and completed-tail replay. After: 1,644 TypeScript passes (two existing skips), 486 Python passes (zero skips), oracle 128 and benchmark contracts 77.
  • Nine new shared scenarios; all 84 prior scenarios unchanged. Five frozen revision-four histories and eight cross-runtime Redis/Postgres cases cover saved-policy reads, refusal without writes and continuation.
  • Both type checks, lint/format, builds, wheel and documentation checks pass. Independent spec and standards reviews found no blocking issues.

Integration check

The branch includes main's folded-event exports at 7140bbb. 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. Duplicate runs also passed. The optional Macroscope review check was skipped.

Merge Danger

Door: two-way for callers that omit the option. Opt-in stored scopes must finish unresolved work before changing limits.

Blast Radius: window retention and replay. Requires explicit accumulating mode and compatible writer versions; this does not fence older writers. Atomic input can exceed the trigger. Raw-input capacity remains separate.

Pin inclusive counted settlement, independent background retention, held-state trimming and refusal of unresolved limit changes before adding the opt-in policy.
A writer with different timing must not resurrect input that the stored policy already settled and completed.
An opt-in accumulating policy can settle at counted equality while retaining background independently. Bound unresolved state across admission and result transitions, preserve immutable offers and metadata, and refuse policy changes while work remains. Replay stored tails under their saved policy before adopting writer settings.
Current-writer recovery and invariant checks now produce revision five; retain historical revision-four fixtures unchanged.
Carry the updated cleanup parent into the final stack layer. The assembled tree matches the previously verified combined candidate.
@asher-aqi
asher-aqi changed the base branch from fix/intake-preparation-cleanup to main November 14, 2026 04:22
@asher-aqi
asher-aqi merged commit 4e99a52 into main Nov 14, 2026
17 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