Repository navigation
kafka: per-record time partition extraction and age validation - #115
Merged
Merged
Conversation
Use the per-record event and schema path for time-only streams as well as custom-partitioned streams. Carry the time partition limit from stream metadata and share HTTP timestamp validation before event conversion. Skip invalid records with their Kafka source identity while retaining the non-partitioned batch path. Cover initial configured/default limits, reference-relative age, invalid time fields, combined partitions, and warning identity with isolated test validation state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VibeSWE
changed the base branch from
fix/kafka-custom-partition-events
to
main
November 8, 2026 14:33
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.
Fixes #113, Fixes #114
Rebased on #111 head
72243be51eaad79617746f722524b03ff0761102; base branch:fix/kafka-custom-partition-events. Independently rechecked in a fresh worktree: the fetched head already has72243be5as its direct parent, so the requested rebase is a no-op. Validated head remainse611ad08493eeb7e289e3382b8e3f5941a398951.Kafka builds per-record events whenever a stream has a time or custom partition. Time-only streams extract timestamps from each object and share #111's accumulator, conflict isolation, and single schema staging path. Accepted events have
is_first_eventcleared after schema staging succeeds, including time-only events. The accumulator clones stored metadata once, buffers record changes, rejects conflicts without mutation, and publishes once.The connector carries
time_partition_limitfrom stream metadata and calls the shared HTTP time validator before conversion. Missing, invalid, non-string, and out-of-policy timestamps are skipped individually with topic/partition/offset/tenant warnings. Existing policy is preserved: configured/default initial day limit, thenevent_max_chunk_agerelative to the process-wide reference. Streams without partition settings retain their batch path; offset commits and partial-storage behavior are unchanged.Validation on clean head
e611ad08493eeb7e289e3382b8e3f5941a398951in/home/ajs/.t3/worktrees/parseable/t3-b3a12076:cargo clippy --features kafka --all-targets: exit 0; existing warnings in unchanged files, no diagnostics in the two PR-modified files.git diff --check, andcargo build --features kafka: passed.Every Cargo invocation used the requested shared flock/build environment, with target artifacts inside this worktree.
New live evidence:
/home/ajs/.cache/parseable-kafka-time-partition-fix-20261107/rebased-e611ad08/REPORT.md. The rebuilt binary embeds clean commite611ad08, independently verified through/api/v1/about; SHA-2567743c6684dbe53c7db5491004f86613aa0e60839f110220553174d01382720c1.The final isolated broker run passed time-only valid/invalid/initial-old/reference-old records, combined custom+time, #111 custom mixed-payload/conflict/all-invalid scenarios, ordinary Kafka ingestion, and HTTP
[]returning 400 followed by continued ingestion. It verifies exactly one schema staging write within each Kafka processing interval for time-only, combined, and conflict chunks; rejected fields never enter the schema; all expected offsets commit with zero lag. Unit tests also cover configured/default limits, shared HTTP flatten validation, and tenant-bearing warnings.The OSS API does not create time partitions and rejects HTTP time-partition ingestion before age validation. The harness seeds legacy metadata only in its own stopped local-store fixture and verifies the loaded settings; it does not claim live HTTP age parity. An initial added write-count assertion counted later background conversion; that attempt is archived, the assertion was scoped to Kafka processing, and the full harness was rerun successfully. Original evidence is preserved. Both attempts' owned containers, servers, and runtime directories were independently verified removed.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.🤖 Generated with Claude Code