Skip to content

refactor(schema): deduplicate isClaimed — export as schema.IsClaimed (plan 2607191918) - #756

Merged
jeduden merged 5 commits into
mainfrom
claude/youthful-knuth-k9fs54
Jul 25, 2026
Merged

refactor(schema): deduplicate isClaimed — export as schema.IsClaimed (plan 2607191918)#756
jeduden merged 5 commits into
mainfrom
claude/youthful-knuth-k9fs54

Conversation

@jeduden

@jeduden jeduden commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exports IsClaimed from internal/schema/validate.go as the single implementation of the claimed-range set check.
  • Removes the byte-for-byte private isClaimed copy from internal/rules/requiredstructure/rule.go (which already imported internal/schema), replacing the three call sites with schema.IsClaimed.
  • Renames the private isClaimedIsClaimed throughout the schema package (validate.go, matchtree.go, validate_content.go), eliminating the now-redundant forwarding wrapper.
  • Adds TestIsClaimed in internal/schema/validate_coverage_test.go covering the present-index and absent-index branches per the project's Red/Green TDD convention.
  • Trims the doc comment to one line, removing the caller enumeration and refactor-history narration that violated CLAUDE.md's no-caller-reference rule.
  • Removes the double blank line left by the deletion in requiredstructure/rule.go.

Closes plan 2607191918.

Test plan

  • go build ./... passes
  • go test ./internal/schema/... ./internal/rules/requiredstructure/... passes
  • go test ./... passes (no regressions)
  • mdsmith check . passes (0 failures)
  • TestIsClaimed covers present-idx (true) and absent-idx (false) branches

Generated by Claude Code

claude added 5 commits July 20, 2026 00:05
…ructure

Exports schema.IsClaimed from internal/schema/validate.go and removes
the byte-for-byte copy in requiredstructure/rule.go, which already
imported internal/schema. Closes plan 2607191918.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZhZLDQbbu9MyHzgL1Sfjs
Removes the unnecessary wrapper (IsClaimed → isClaimed) by renaming
the private isClaimed to IsClaimed throughout the schema package
(validate.go, matchtree.go, validate_content.go) and deleting the
forwarding stub. Adds TestIsClaimed covering the present/absent
branches per the project's Red/Green TDD convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZhZLDQbbu9MyHzgL1Sfjs
Removes the comment's refactor history and internal caller list, both
of which violate CLAUDE.md's "don't reference callers" rule. Regenerates
the PLAN.md catalog which was out of date.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZhZLDQbbu9MyHzgL1Sfjs
…deletion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZhZLDQbbu9MyHzgL1Sfjs
Follows the project conventions established by setutil.TestContains_Nil,
TestContains_Empty, and TestScopeRunIndicesAcceptsStructSet: nil and
empty-map inputs must return false, and a compile-time assertion pins
the claimed parameter to map[int]struct{} so a silent drift to bool
would fail to compile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZhZLDQbbu9MyHzgL1Sfjs
@jeduden jeduden added the queue Add to a PR to enqueue it label Jul 25, 2026
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.69%. Comparing base (d4af5d5) to head (9d61ee4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
Components Coverage Δ
Go 98.69% <100.00%> (-0.01%) ⬇️
TypeScript 99.54% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeduden jeduden added queue:active Applied automatically when a PR is in an active batch and removed queue Add to a PR to enqueue it labels Jul 25, 2026
@jeduden

jeduden commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

🟢 Merge Queue — picked up

This PR is in the queue and will be batched with other queue-labelled PRs.

Next: No action needed — you'll get another comment when CI starts on the batch. View merge queue run.

@jeduden

jeduden commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

🔵 Merge Queue — CI running

Merged into batch branch merge-queue/batch-754-1785006212 alongside #754, #758, #762, #764. View CI run.

Next: No action needed — you'll be notified when CI completes.

@jeduden

jeduden commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Merge Queue — merged

This PR landed on main via commit 47ace27. CI run that validated the merge.

Next: Done — nothing more to do here.

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.

2 participants