Fix http.vera example: add main function#358
Conversation
The example had no main function and used IO.println (does not exist). Added main that calls fetch_title and prints the result via IO.print. Fixed README code block to use correct signature. Co-Authored-By: Claude <noreply@anthropic.invalid>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughREADME HTTP example updated: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
=======================================
Coverage 91.22% 91.22%
=======================================
Files 48 48
Lines 18429 18429
Branches 215 215
=======================================
Hits 16811 16811
Misses 1614 1614
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/test_verifier.py (1)
1590-1591:⚠️ Potential issue | 🟡 MinorUpdate stale tier-count docstring to match current expectations.
Line 1591 still states
145 T1 / 15 T3, but Lines 1601-1603 assert163 / 18 / 181. Please synchronise the docstring with the asserted values to avoid misleading future debugging.As per coding guidelines `tests/**/*.py`: These are pytest test files. Review for correctness and coverage gaps.Suggested patch
- """All examples together: 145 T1 / 15 T3 without module resolution.""" + """All examples together: 163 T1 / 18 T3 (181 total) without module resolution."""🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_verifier.py` around lines 1590 - 1591, The docstring on test_overall_tier_counts is stale ("145 T1 / 15 T3") and should be updated to match the current assertions (the values asserted as 163 / 18 / 181); locate the test_overall_tier_counts function and replace the docstring text to reflect the asserted counts (e.g., "All examples together: 163 T1 / 18 T3 / 181 total" or equivalent wording that matches the 163 / 18 / 181 assertions).
🤖 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 `@tests/test_verifier.py`:
- Around line 1590-1591: The docstring on test_overall_tier_counts is stale
("145 T1 / 15 T3") and should be updated to match the current assertions (the
values asserted as 163 / 18 / 181); locate the test_overall_tier_counts function
and replace the docstring text to reflect the asserted counts (e.g., "All
examples together: 163 T1 / 18 T3 / 181 total" or equivalent wording that
matches the 163 / 18 / 181 assertions).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 712bd45a-73d3-4688-803a-37357c676a7d
⛔ Files ignored due to path filters (1)
examples/http.verais excluded by!**/*.vera
📒 Files selected for processing (4)
README.mdscripts/check_readme_examples.pytests/test_readme.pytests/test_verifier.py
Index table showing what each example demonstrates and how to run it. Examples with main run directly; others use --fn to call exports. Co-Authored-By: Claude <noreply@anthropic.invalid>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/README.md`:
- Around line 23-77: The README tables list inline commands that are not
currently validated; extend the validation by adding a new check (or enhancing
check_readme_examples.py) to parse examples/README.md table cells, extract
commands (look for "vera run <path> [--fn <name>]"), and verify referenced files
exist and that if a --fn is provided the target .vera file exports/contains that
function (reuse/extend functions like parse_table_commands, extract_command,
verify_file_exists, and verify_fn_flag or create
validate_readme_table_commands). Wire this new validator into CI (same job that
runs check_examples.py/check_readme_examples.py) so failures in
examples/README.md break the build.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d6d9fd86-238b-43d5-924a-be99a6cd6174
📒 Files selected for processing (1)
examples/README.md
Co-Authored-By: Claude <noreply@anthropic.invalid>
Summary
mainfunction —vera runfailedIO.printlnwhich does not exist (correct:IO.print)Test plan
vera check examples/http.verapassesvera verify examples/http.verapasses🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Known Bugs and Limitations
Examples
Tests
Chores