Skip to content

feat(cat5): component-size distribution and non-trivial summaries#40

Open
jphein wants to merge 1 commit into
M0nkeyFl0wer:mainfrom
techempower-org:feat/cat5-component-shape-summary
Open

feat(cat5): component-size distribution and non-trivial summaries#40
jphein wants to merge 1 commit into
M0nkeyFl0wer:mainfrom
techempower-org:feat/cat5-component-shape-summary

Conversation

@jphein
Copy link
Copy Markdown
Contributor

@jphein jphein commented May 25, 2026

Summary

Closes #17.

  • Adds component_size_distribution: dict[str, int] to GapDetectionReport — histogram buckets "1", "2-5", "6-20", ">20" computed during the existing component iteration
  • Adds non_trivial_components: list[dict] — each entry has "size" and "types" (sorted entity_type list) for components with ≥2 nodes
  • format_report() renders both: distribution as a compact line, non-trivial components as a bulleted list

Test plan

  • test_component_size_distribution — verifies bucket counts match fixture ground truth
  • test_non_trivial_components — verifies list length and structure
  • test_format_report_shows_distribution — verifies rendered output contains bucket labels
  • Existing Cat 5 tests pass unchanged

🫏 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 01:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@M0nkeyFl0wer
Copy link
Copy Markdown
Owner

Ship. The bucket scheme (1, 2-5, 6-20, >20) is well-chosen — log-spaced enough to surface a long tail without exploding into 50 unique counts on a sparse graph — and the per-non-trivial-component type composition is the right next layer of detail. Computed during the existing component iteration so it adds zero structural cost. Clean.

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.

Cat 5 — add per-component shape summary

3 participants