feat(source/kafka): cold-group seek/lag, typed start-offset option, honest vendor-boundary docs - #200
Merged
Merged
Conversation
…onest vendor-boundary docs P1-4: SeekToStart/SeekToEnd/SeekToTime enumerated partitions from committed offsets only, so a fresh group (nothing committed) silently no-oped. Partition discovery now falls back to a kmsg MetadataRequest for any consume topic without commits; Lag keeps the committed baseline but reports an error (exported ErrNoCommittedOffsets sentinel) instead of a misleading 0 for a cold group, and excludes never-committed partitions. P1-5: WithStartOffset(kafka.StartEarliest|StartLatest) maps onto kgo.ConsumeStartOffset for brand-new groups (default earliest = franz-go default); committed partitions always resume from their commit. Cold-start posture documented in package doc and README. P1-3: 'No franz-go type appears in an exported signature' corrected to the real boundary in kafka.go package doc and README: the neutral Inlet/ Subscription/Message seam is vendor-free; WithSASL/WithBalancer/ WithClientOptions/WithClient deliberately expose franz-go types as power seams. Core Seekable/LagReporter doc comments updated to match backend behavior. Tests: cold-group seek discovery, committed-vs-metadata partition selection, mixed-topic coverage, Lag cold-group sentinel + partial-commit counting, metadata error propagation, WithStartOffset mapping.
joshua-temple
force-pushed
the
feat/source-v1-capabilities
branch
from
August 23, 2026 03:06
6c81f15 to
730b579
Compare
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.
Checkpoint 2/5 — P1 fixes on the road to source/v1.0.0
Stacked on #199 (checkpoint 1).
P1-4 — cold-group Seek/Lag silently no-oping
SeekToStart/End/Timebuilt requests purely fromCommittedOffsets(); a fresh group got an empty request and succeeded while doing nothing. NowassignedPartitionsenumerates committed offsets per topic where present and falls back to broker metadata (kmsg.MetadataRequest) for topics without commits — seeks always act.Lagneeds a committed baseline: it now returns exportedErrNoCommittedOffsets(errors.Is-matchable) for a cold group instead of0, nil, and counts only partitions with commits (documented).P1-5 — initial start-offset policy exposed + documented
New
WithStartOffset(kafka.StartEarliest | kafka.StartLatest)mapping tokgo.ConsumeStartOffset; default stays earliest (franz-go's default), committed partitions always resume from commit regardless. Cold-start posture documented in the package doc (# Cold start) and README (## Cold start).P1-3 — false vendor-free claim corrected
"No franz-go type appears in an exported signature" was false. Rewritten to the real boundary in both
kafka.gopackage doc and README: neutral seam vendor-free;WithSASL/WithBalancer/WithClientOptions/WithClientare deliberate typed power seams. CoreSeekable/LagReporterdocs updated to describe actual enumeration/baseline semantics.Evidence (run locally on this branch)
GOWORK=off go build ./... && go vet ./... && go test -race -count=1 ./...go vet ./... && go test -race -count=1 . ./memsourceNew tests (all pass under
-race -count=1):TestSeekToStartColdGroupDiscoversPartitions,TestSeekToEndUsesCommittedWhenPresent,TestSeekToTimeColdGroupMixedTopics,TestLagColdGroupErrorsWithSentinel,TestLagPartialCommitsCountOnlyCommitted,TestTopicPartitionsErrorPropagates,TestWithStartOffsetOptionConfigAndMapping.Regressions vs baseline: none (full suites green). API diff vs review-approved list: adds only
WithStartOffset,StartOffset+StartEarliest/StartLatestconstants, andErrNoCommittedOffsetssentinel — all required by approved P1 fixes.