Skip to content

docs(source): close contract-doc gaps found by the adversarial review gate - #205

Merged
joshua-temple merged 1 commit into
mainfrom
docs/source-v1-gate-fixes
Aug 23, 2026
Merged

docs(source): close contract-doc gaps found by the adversarial review gate#205
joshua-temple merged 1 commit into
mainfrom
docs/source-v1-gate-fixes

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Checkpoint 4.5 — gate findings resolved

The three-panel adversarial review of merged main (2931f24) returned 12 HELD / 1 BROKEN / 3 UNDOCUMENTED (contract adversary), 11/11 PASS with zero production findings (implementation breaker, executed experiments under -race), and all-PASS release audit (API delta exactly the approved list; changelogs/STABILITY consistent; dependency purity verified; full matrix green incl. RedPanda integration).

This PR resolves the panel's one P1 and the actionable P2 doc gaps — all documentation-level; zero behavior changes:

Finding Fix
P1: DLQ produce-failure semantics unspecified Term row: failed produce → Settle error, record unmarked → redelivered
P2: unconditional in-session redelivery claim vs Kafka caveat handler.go defers to adapter-documented constraints
P2: ctx-cancel vs ErrDrained precedence in drain wait stated in inlet.go Next
P2: duplicate-settle behavior unspecified across surfaces inlet.go Settle documents safety + accounting invariant
P2: NextBatch "buffered" ambiguity drain clause covers fetched-not-yet-returned records
P2: repeated Term on tx subscription hot-loop capability.go Begin doc states unmarked-redeliver consequence
P2: direct Settle during open Begin documented as programming error with consequences
P2: NakAfter pause × BlockRebalanceOnPoll README clarification

Per gate rules, clearing these findings invalidates prior clearances: the full three-panel gate reruns on this PR's merge commit before any tag is cut.

Also recorded as known follow-up (out of scope): examples/sourcedrive/go.mod carries testcontainers deps like the pre-change baseline — example module, no downstream consumers.

… gate

Reviewer-panel findings, all documentation-level (implementation verified
conforming by executed experiments):

- P1: DLQ produce-failure semantics were unspecified. Documented on the Term
  row: a failed dead-letter produce returns the error from Settle and leaves
  the record unmarked, so it is redelivered — nothing is silently lost.
- handler.go ActionNak no longer states an unconditional in-session redelivery
  guarantee; it now defers to each adapter's documented constraints (Kafka's
  concurrent-commit caveat), matching source/doc.go's scoping.
- inlet.go Next: ctx cancellation during the drain wait takes precedence over
  ErrDrained; the buffered-yield clause now covers Batched.NextBatch records
  fetched but not yet returned; Settle documents duplicate-settle safety.
- kafka capability.go Begin: repeated Term on a transactional subscription
  leaves the record unmarked (hot-loop consequence stated); mixing a direct
  Settle into an open Begin documented as a programming error.
- kafka README: NakAfter(d) pause interaction with BlockRebalanceOnPoll
  clarified.
@joshua-temple
joshua-temple merged commit 6775ee5 into main Aug 23, 2026
121 checks passed
@joshua-temple
joshua-temple deleted the docs/source-v1-gate-fixes branch August 23, 2026 05:07
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