Repository navigation
Preserve source observation time for event deadlines - #43
Merged
Merged
Conversation
A buffered source needs to retain its observation clock without backdating processing. Pin the public input, quiet and age deadlines, pruning, invalid input, and unchanged arrival-clock behavior before implementing it.
Allow buffered sources to supply observation time for quiet and age deadlines while processing clocks continue to govern leases, waits, retries and settlement. Preserve arrival behavior when the field is absent, and retain both clocks through storage and replay. Co-Authored-By: Codex gpt-6-astra <noreply@openai.com>
The clock extension intentionally advances the reducer revision. Keep the recovery and invariant tests checking that exact revision, and describe observation extrema in the summary documentation.
Apply the existing Python formatter to the new fixtures and recovery cases so the format check passes. Their parsed Python syntax is unchanged.
Function and symbol values currently disappear before validation. Reproduce whole-batch admission and cover top-level toJSON, getters and unchanged nested data normalization.
Reject invalid captured observation values before serialization can omit them. Read each root property once and leave nested event data on its existing JSON path.
Verify the reviewed folded-event exports together with source observation clocks before merging the next stack layer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Buffered sources can now supply
Event.observedAtfor quiet and age deadlines in TypeScript and Python. Omission keeps ingestion timing.Admission rejects invalid or future observation times before admitting the batch. TypeScript validates captured root fields before JSON normalization can erase an invalid value, while retaining read-once getters and ordinary nested-data normalization. Both runtimes retain the field through logs, snapshots and recovery. The reducer revision advances to 2. Seven shared scenarios cover the new behavior; existing shared fixtures remain unchanged.
Original implementation evidence
pnpm checkrun passed 1,511 tests with two existing Redis malformed-position skips. Python passed 306 tests with zero skips, including cross-runtime recovery; the follow-up changes only TypeScript. Local Redis and Postgres stores were exercised.Integration check
The branch now includes main's folded-event exports at
b8a4c9b. Focused fold and observation-time checks pass: 34 TypeScript and 35 Python tests. All eight CI jobs passed on this head; the optional Macroscope review check was skipped.Merge danger
Door: Two-way before sources opt in. Afterward, downgrading changes the timing of stored observations.
Blast radius: Scheduling.
Processes sharing a store must use the same reducer version before supplying
observedAt. The existing mismatch handler replays and resnapshots; it does not fence older readers. No package version or release changes are included.