docs: drop internal CLAUDE.md §N references — state the rule directly#152
Merged
Conversation
Doc comments in seven files referenced internal CLAUDE.md section
numbers (§12, §17, §18) as a shorthand for the rule they were
encoding. Three problems with that:
- Section numbers renumber when CLAUDE.md is reorganized, so the
in-source pointer rots silently.
- The §N reference doesn't tell a reader of the source code what the
rule actually is — they'd have to context-switch out to a separate
doc to find out.
- Builds in an "insider shorthand" that gets in the way when the
comment is the first thing someone reads after a stack trace.
Each reference is now replaced with the rule itself, stated in plain
prose where it's relevant:
- `Result.java` doc: name the protobuf decode bug that motivated the
sealed-result shape and the compile-time guarantee it provides.
- `PipelineDiagnostics.java` doc: describe the burn directly (wrong
envelope size = silent decode failures) without the §12 label.
- `Stream.java` `onFailed` doc: explain when to attach the observer
by symptom ("processed counter rises, sink stays at 0") rather than
pointing at a section.
- `BatchPipelineWrapper.java`: state the rule the dispatch enforces
(uncovered batch positions become synthetic failures so a
misreported BatchResult can't silently mark them processed).
- `KPipeConsumer.java`: spell out the dispatcher-before-offset-manager
shutdown order in terms of what would break if it changed.
- `KPipeReporterThreadTest.java`: drop the §17 reference and cite the
escape-hatches doc directly, since that's the actual gate the test
is pinning against.
- `README.md` ×2: a self-reference "§2 chain" replaced with a phrase
pointing at the prior section by title; a §12 burn description
replaced with the underlying symptom.
External W3C §3.2 traceparent references in tracing tests are kept —
those cite an actual external standard.
No behavior change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #152 +/- ##
============================================
- Coverage 76.52% 76.48% -0.04%
+ Complexity 761 760 -1
============================================
Files 75 75
Lines 2871 2871
Branches 357 357
============================================
- Hits 2197 2196 -1
Misses 503 503
- Partials 171 172 +1 ☔ View full report in Codecov by Harness. |
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.
Summary
Seven source files used internal CLAUDE.md section numbers (§12, §17, §18) as a shorthand for the rule they were encoding. Three problems with that pattern:
Each reference is replaced with the rule itself, stated in plain prose where the reader actually needs it.
Files changed
lib/kpipe-core/.../Result.java— name the protobuf decode bug that motivated the sealed-result shape and the compile-time guarantee it provides.lib/kpipe-core/.../PipelineDiagnostics.java— describe the burn directly (wrong envelope size = silent decode failures) without the §12 label.lib/kpipe-api/.../Stream.java— explain when to attachonFailedby symptom ("processed counter rises, sink stays at 0") rather than pointing at a section.lib/kpipe-consumer/.../BatchPipelineWrapper.java— state the rule the dispatch enforces (uncovered batch positions become synthetic failures so a misreportedBatchResultcan't silently mark them processed).lib/kpipe-consumer/.../KPipeConsumer.java— spell out the dispatcher-before-offset-manager shutdown order in terms of what would break if it changed.lib/kpipe-consumer/.../KPipeReporterThreadTest.java— drop the §17 reference and citedocs/escape-hatches.mddirectly, since that's the actual gate the test is pinning against.README.md×2 — a self-reference "§2 chain" replaced with a phrase pointing at the prior section by title; a §12 burn description replaced with the underlying symptom.Deliberately kept
External
W3C §3.2references in tracing tests stay — those cite an actual external standard, not an internal architecture chapter.Test plan
./gradlew compileJava compileTestJava spotlessCheck— green locally§[0-9]outside the excluded set returns zero matches