Skip to content

Docs sweep for Map/Set collections — closes #62#339

Merged
aallan merged 2 commits into
mainfrom
docs/collections-sweep
Mar 24, 2026
Merged

Docs sweep for Map/Set collections — closes #62#339
aallan merged 2 commits into
mainfrom
docs/collections-sweep

Conversation

@aallan

@aallan aallan commented Mar 24, 2026

Copy link
Copy Markdown
Owner

Summary

PR 3/3 for #62. Documentation sweep and consistency fixes after Map (PR 1) and Set (PR 2) landed.

  • New example: examples/collections.vera — word-frequency analysis demonstrating Map and Set operations
  • Spec fix: Remove stale "future collections" language from §9.1
  • SKILL.md: Add Map<K, V> and Set<T> to composite types listing; add common mistake for standalone map_new()/set_new() without type context
  • README: Update version to v0.0.96, add Map/Set to Ch 9 description
  • CONTRIBUTING.md: Remove hardcoded counts, reference TESTING.md as single source of truth
  • Count updates: Example counts 25→26 across CLAUDE.md, TESTING.md, AGENTS.md; test counts updated
  • Version bump: v0.0.95 → v0.0.96

Closes #62

Test plan

  • All 21 pre-commit hooks pass
  • vera check + vera verify pass on new example
  • All validation scripts pass (doc counts, version sync, site assets, conformance, examples, spec/skill/readme blocks)
  • CI passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated docs for v0.0.96: formalised Map and Set in the standard library, added guidance and common-mistake examples for Map/Set initialisation, adjusted roadmap and changelog entries, and raised example program counts to 26 with corresponding validation guidance.
  • Tests

    • Updated test expectations and validation script documentation to reflect the increased example/conformance totals and revised verification counts.
  • Chores

    • Project version bumped to 0.0.96.

Fix stale "future collections" language in spec. Update README version
and Ch 9 description. Add Map/Set to SKILL.md composite types and
common mistakes. Add examples/collections.vera (word-frequency
analysis). Remove hardcoded counts from CONTRIBUTING.md. Update
example/test counts across docs (25→26). Bump to v0.0.96.

Closes #62

Co-Authored-By: Claude <noreply@anthropic.invalid>
@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Version bump to v0.0.96 with documentation and test updates reflecting completed Map/Set collections, a new collections example, updated example/conformance counts, adjusted allowlist entries for SKILL.md code blocks, and small test expectation updates.

Changes

Cohort / File(s) Summary
Version & Release Metadata
pyproject.toml, vera/__init__.py, CHANGELOG.md
Bumped project version to 0.0.96; added released section 0.0.96 and updated compare link references.
Standard Library & Language Spec
spec/09-standard-library.md, README.md, SKILL.md
Documented Map<K,V> and Set<T> as implemented collections; SKILL.md adds composite-type docs and guidance for correct map_new()/set_new() usage.
Docs: Counts & Status
AGENTS.md, CLAUDE.md, CONTRIBUTING.md, ROADMAP.md, TESTING.md
Updated example counts (25→26 everywhere), updated conformance suite count references to 58 where present, marked roadmap item for Map/Set as completed, and removed some hard-coded counts in CONTRIBUTING.
Tests
tests/test_verifier.py
Adjusted expected aggregated verification counts (Tier 1: 137→145, Tier 3 runtime: 7→15, total: 144→160).
Validation Scripts
scripts/check_skill_examples.py, scripts/check_conformance.py, scripts/check_examples.py
Updated ALLOWLIST line numbers to match SKILL.md reflow and added two new allowlist entries for map/set examples; adjusted documented example/conformance totals in script comments or docs references.
Other
AGENTS.md, CLAUDE.md (docs duplicated)
Minor prose and command examples updated to reflect new totals and verification invariants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

compiler, tests, spec, ci, docs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Docs sweep for Map/Set collections — closes #62' accurately reflects the primary change: comprehensive documentation updates across multiple files following Map/Set implementation.
Linked Issues check ✅ Passed The PR implements Map and Set documentation/examples per #62, though Decimal (also in #62) is not addressed—but the PR scope explicitly covers only the Map/Set documentation sweep phase.
Out of Scope Changes check ✅ Passed All changes are scoped to documentation, version bumps, test fixture updates, and one new example—all directly supporting the Map/Set documentation objectives of #62.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/collections-sweep

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.43%. Comparing base (f22b840) to head (578c637).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
+ Coverage   95.42%   95.43%   +0.01%     
==========================================
  Files          45       45              
  Lines       15892    15892              
==========================================
+ Hits        15165    15167       +2     
+ Misses        727      725       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 156-157: The document's conformance program count is inconsistent:
one place states 58 programs ("All 58 conformance programs in
`tests/conformance/`") while the top summary still says 52; update the top
summary (the header/intro count that currently reads 52) to read 58 and scan the
rest of AGENTS.md for any other occurrences of "52" or "58" to make all counts
consistent with the actual number of programs in tests/conformance/.

In `@CLAUDE.md`:
- Around line 96-97: The README/CLAUDE.md contains inconsistent example counts:
the bullet "All 26 examples in `examples/` must pass `vera check` and `vera
verify`" differs from an earlier statement that lists 25 examples; update the
earlier occurrence that mentions "25" so it matches "26" (search for the
sentence or number "25" in CLAUDE.md and change it to "26") ensuring both
statements reference the same example count across the document.

In `@tests/test_verifier.py`:
- Around line 1610-1612: The test's explanatory docstring (starting near the
block that asserts t1 == 145, t3 == 15, total == 160) is out of sync with the
new expected totals; update or trim that narrative so it describes the current
expected values (T1=145, T3=15, total=160) or remove the outdated numeric
example, and ensure any mentions of T1/T3/total within the docstring match the
variables t1, t3, and total used in the assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dfd35bb7-d4e1-4fd3-b05c-f53e630e798e

📥 Commits

Reviewing files that changed from the base of the PR and between f22b840 and cbcdd8d.

⛔ Files ignored due to path filters (5)
  • docs/index.html is excluded by !docs/**
  • docs/index.md is excluded by !docs/**
  • docs/llms-full.txt is excluded by !docs/**
  • docs/llms.txt is excluded by !docs/**
  • examples/collections.vera is excluded by !**/*.vera
📒 Files selected for processing (13)
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • ROADMAP.md
  • SKILL.md
  • TESTING.md
  • pyproject.toml
  • scripts/check_skill_examples.py
  • spec/09-standard-library.md
  • tests/test_verifier.py
  • vera/__init__.py

Comment thread AGENTS.md
Comment thread CLAUDE.md
Comment thread tests/test_verifier.py
Address CodeRabbit review: align conformance count (52→58) in
AGENTS.md line 11, example count (25→26) in CLAUDE.md line 66,
trim stale tier-count docstring in test_verifier.py, update
test_verifier.py line count in TESTING.md, regenerate site assets.

Co-Authored-By: Claude <noreply@anthropic.invalid>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
TESTING.md (1)

201-217: ⚠️ Potential issue | 🟠 Major

Contract coverage figures are stale and internally contradictory.

Line 206 says 7 Tier 3 contracts, but Line 209 says 4 remaining Tier 3 contracts. Also, this section now conflicts with the updated aggregate verifier expectations in tests/test_verifier.py (145 / 15 / 160). Please update this block to a single source-of-truth set of numbers.

💡 Proposed doc fix
-Across all 26 example programs:
+Across all 26 example programs:

 | Metric | Value |
 |--------|-------|
-| **Tier 1 (static)** | 139 contracts — proved automatically by Z3 |
-| **Tier 3 (runtime)** | 7 contracts — verified at runtime via assertion checks |
-| **Total** | 146 contracts (95.2% static) |
+| **Tier 1 (static)** | 145 contracts — proved automatically by Z3 |
+| **Tier 3 (runtime)** | 15 contracts — verified at runtime via assertion checks |
+| **Total** | 160 contracts (90.6% static) |

-The 4 remaining Tier 3 contracts and why they cannot be promoted:
+The remaining Tier 3 contracts and why they cannot be promoted:

As per coding guidelines: “**/*.md: Review Markdown files for factual accuracy against the codebase, broken links, and outdated information.” and “TESTING.md: Validation counts and the phrasing of metrics are treated as authoritative… update those to the current totals.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@TESTING.md` around lines 201 - 217, Update TESTING.md so the aggregate
contract counts are a single source-of-truth and match the expectations in
tests/test_verifier.py (the 145 / 15 / 160 totals referenced in the review),
removing the contradictory “7” vs “4 remaining” wording; adjust the summary
table (Tier 1/Tier 3/Total) to the values from tests/test_verifier.py and then
reconcile the “remaining Tier 3 contracts” list (gc_pressure.vera,
generics.vera, increment.vera and any others) so the count and the enumerated
examples match the new totals and the verifier test file; ensure any phrasing
that implies static vs runtime percentages is updated to reflect the new numbers
and that there is only one authoritative block of metrics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@TESTING.md`:
- Around line 201-217: Update TESTING.md so the aggregate contract counts are a
single source-of-truth and match the expectations in tests/test_verifier.py (the
145 / 15 / 160 totals referenced in the review), removing the contradictory “7”
vs “4 remaining” wording; adjust the summary table (Tier 1/Tier 3/Total) to the
values from tests/test_verifier.py and then reconcile the “remaining Tier 3
contracts” list (gc_pressure.vera, generics.vera, increment.vera and any others)
so the count and the enumerated examples match the new totals and the verifier
test file; ensure any phrasing that implies static vs runtime percentages is
updated to reflect the new numbers and that there is only one authoritative
block of metrics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f93464c7-39f3-4892-8552-58aaf7bdb123

📥 Commits

Reviewing files that changed from the base of the PR and between cbcdd8d and 578c637.

⛔ Files ignored due to path filters (1)
  • docs/llms-full.txt is excluded by !docs/**
📒 Files selected for processing (4)
  • AGENTS.md
  • CLAUDE.md
  • TESTING.md
  • tests/test_verifier.py

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.

Standard library collections (Set, Map, Decimal)

1 participant