Fix the findings of the 2026-09-07T19-09 code analysis - #15
Merged
Conversation
- H: the appender-level exactly-once test observes the late send failure through captured meters and joins the send worker, so a broken claim wiring now turns it red (mutation-checked) - M: a send the Kafka client fails through its synchronous callback (metadata timeout, buffer exhausted, record too large) counts as fallback only, never as dispatched; SendCallback replaces the lambda; producer double + tests for the ApiException path - M: FallbackDispatcher.close() lets the worker drain for the whole shutdown budget before interrupting (was 200 ms), mirroring SendDispatcher; INTERRUPT_GRACE_MS replaces GRACEFUL_DRAIN_WAIT_MS - M: restart symmetry - stop() stops the fallback appender without detaching it, start() restarts it and re-arms the one-shot error report; restart test - M: the Kafka callback retains a detached DiversionClaim instead of the whole PendingSend (payload copy); README/KDoc document the heap bound under a slow broker (buffer.memory in event size) - L: metrics are unbound after the dispatcher closes, so shutdown diversions/drops are scraped during the teardown - L: bindMeterRegistry and the unbind in stop() are serialized by a ReentrantLock with the started state re-checked under it - L: idempotence validation covers acks=all; an explicit enable.idempotence=true suppresses the class's acks=1 default - L: the fallback worker carries the reentry guard; addAppender KDoc states the no-SLF4J-logging contract for fallback appenders - L: Logback-reconfiguration rebind gap documented (KDoc, README) with the public bindAppenders() as the manual path - L: assertion-less tests now assert accounting; exact counts in the FallbackDispatcher drop/double-close tests - P1: appenders, sender contexts and fallback dispatchers built by test fixtures are closed after each test Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GfdGp7eUrjJKBvcJUx3q2
Report of the defect analysis at 6c4f2b8 (0 Critical, 1 High, 4 Medium, 8 Low, 3 systemic patterns); every finding carries its status line referencing the fix commit 1c8b048 - 12 fixed, finding 9 resolved by documentation, patterns P2/P3 deliberately left with rationale. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GfdGp7eUrjJKBvcJUx3q2
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.
Remediation of
docs/assessment/CODE_ANALYSIS-2026-09-07T19-09-00.md(0 Critical, 1 High, 4 Medium, 8 Low, 3 systemic patterns), per the review workflow: fix commit1c8b048first, then the report with per-finding status lines.Fixed
SendCallbackwitherrorReported; new producer double + tests, mutation-checked).FallbackDispatcher.close()lets the worker drain for the whole shutdown budget before interrupting (was effectively 200 ms).stop()keeps the fallback appender attached,start()restarts it and re-arms the one-shot error report.DiversionClaiminstead of the wholePendingSend(payload copy); README documents the heap bound under a slow broker.acks; fallback worker carries the reentry guard; reconfiguration rebind gap documented; assertion-less and>=tests replaced; test fixtures close what they start.Deliberately left
mvn verify(offline, incl. ktlint): 264 tests green.🤖 Generated with Claude Code
https://claude.ai/code/session_015GfdGp7eUrjJKBvcJUx3q2