Skip to content

kafka: per-record time partition extraction and age validation - #115

Merged
VibeSWE merged 1 commit into
mainfrom
fix/kafka-time-partition
Nov 8, 2026
Merged

VibeSWE merged 1 commit into
mainfrom
fix/kafka-time-partition

Conversation

@VibeSWE

@VibeSWE VibeSWE commented Nov 8, 2026 •

Copy link
Copy Markdown

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 has 72243be5 as its direct parent, so the requested rebase is a no-op. Validated head remains e611ad08493eeb7e289e3382b8e3f5941a398951.

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_event cleared 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_limit from 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, then event_max_chunk_age relative 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 e611ad08493eeb7e289e3382b8e3f5941a398951 in /home/ajs/.t3/worktrees/parseable/t3-b3a12076:

  • Kafka tests: 35 passed.
  • Event tests: 82 passed.
  • JSON tests: 75 passed.
  • cargo clippy --features kafka --all-targets: exit 0; existing warnings in unchanged files, no diagnostics in the two PR-modified files.
  • Rustfmt on both PR-modified files, git diff --check, and cargo 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 commit e611ad08, independently verified through /api/v1/about; SHA-256 7743c6684dbe53c7db5491004f86613aa0e60839f110220553174d01382720c1.

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.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

🤖 Generated with Claude Code

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
VibeSWE changed the base branch from fix/kafka-custom-partition-events to main November 8, 2026 14:33
@VibeSWE
VibeSWE merged commit bef95bd into main Nov 8, 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.

Kafka: time-partition age/limit validation skipped compared to HTTP ingest Kafka: time-partition-only streams drop every chunk

1 participant