audit(2026-06-24): flag test-debt and rename dedup tax - #689
Merged
Conversation
Appends the 2026-06-24 audit entry (range 1599c9f..09f22d3) to the architecture audit log. Four tax items were found: missing unit tests for helpers in locate.go, lsp/rename.go, and export/export.go, plus duplicated normalizedLabel/refDefBracketBytes between lsp and rename packages. Each item is tracked in a new plan file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DMVDTLs2U9kcVMEyLNZgK
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes plan/2606240211. Adds TestHeadingInfo, TestLocateInAST, TestLinkContainsOffset, TestLinkCloseOffset, TestScanForByte, TestLinkToLocate, TestPiToLocate, TestListItemValue, TestHeadingOnLine, TestFrontMatterListItem, TestFrontMatterParentKey, and TestOffsetAt to internal/index/locate_test.go. Each helper is exercised directly with a byte-slice or AST input, not through Locator.Locate. isGlobPattern gains a "// no test by design" comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DMVDTLs2U9kcVMEyLNZgK
- TestOffsetAt: add col-clamping case (col > line length), exercising the branch at locate.go:639-641 that was previously uncovered - TestPiToLocate_GlobInputSuppressed: new test verifying that a glob pattern in a build directive inputs list does NOT populate DirectiveTargetFile (the !isGlobPattern guard was untested) - TestLinkCloseOffset: add shortcut-reference and full-reference cases using real parsed *ast.Link nodes so the l.Reference != nil branches are exercised directly, not just the nil/inline path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DMVDTLs2U9kcVMEyLNZgK
- Use require.True (not assert.True) before b[off] indexing in TestLinkCloseOffset: assert continues on failure, causing a panic on the immediately following b[-1] index if the offset is -1. - Add third duplicate heading to TestHeadingInfo to exercise the disambiguation counter beyond c==1 (verifies "alpha-2" suffix). - Add bare-dash case to TestListItemValue to document that " -" does not match piListItemRE (contrast with frontMatterListItem). - Remove section-separator comment (CLAUDE.md: no "what" comments). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DMVDTLs2U9kcVMEyLNZgK
Owner
Author
|
🟢 Merge Queue — picked up This PR is in the queue and will be batched with other Next: No action needed — you'll get another comment when CI starts on the batch. View merge queue run. |
Owner
Author
|
🔵 Merge Queue — CI running Merged into batch branch Next: No action needed — you'll be notified when CI completes. |
Owner
Author
|
✅ Merge Queue — merged This PR landed on Next: Done — nothing more to do here. |
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
1599c9f..09f22d3) to the audit loglocate.go,lsp/rename.go, andexport/export.go, plus duplicatednormalizedLabel/refDefBracketBytesbetweenlspandrenamepackagesTest plan
go run ./cmd/mdsmith check .passes (514 files, 0 failures)🤖 Generated with Claude Code
https://claude.ai/code/session_017DMVDTLs2U9kcVMEyLNZgK
Generated by Claude Code