fix: integration idempotency suppressed banner#83
Conversation
PR #74 suppresses the CHANGE DETECTION REPORT banner when there are no new/modified types, so the second-run output no longer contains 'New device types: 0'. Update Scenarios G and H to treat a suppressed banner as a valid no-change signal and verify idempotency against the always-printed '0 device types created/updated' summary.
semantic-release bumped only pyproject.toml, leaving uv.lock's project version stale (drifted to 1.6.0 while the project was at 1.6.1). Add 'uv lock' as the build_command and include uv.lock in the release commit via assets so the lockfile stays in sync on every release. Also backfill the current uv.lock to 1.6.1.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughAdds interrogate configuration and hooks, runs docstring checks in CI, updates Semantic Release to include ChangesTooling, CI, Tests, and Docstrings
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/integration/test_import.py`:
- Around line 496-503: The regexes r"0 device types created" and r"0 device
types updated" match substrings like "10 device types created"; update them to
anchor the zero so it won't match multi-digit counts (e.g. use word boundaries):
replace those patterns with r"\b0 device types created\b" and r"\b0 device types
updated\b" in the loop that checks the end-of-run summary.
- Around line 545-551: The regexes used in the post-update idempotency checks
(the re.search calls that inspect result2.stdout after run_importer())
incorrectly match numbers like "10" or "20"; update both checks to assert an
exact zero by using a digit-boundary-aware pattern such as a negative-lookbehind
so you only match a literal "0" (e.g., replace the patterns for "0 device types
created" and "0 device types updated" with a pattern using (?<!\d)0 ... ),
keeping the same calls to run_importer(), result2, and re.search.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 83806f8b-45d4-4af3-9935-67577a1c78ef
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
pyproject.tomltests/integration/test_import.py
Address CodeRabbit review on the end-of-run summary checks: the bare "0 device types created/updated" patterns also matched "10"/"20"/etc. Anchor them with a (?<!\d) lookbehind so only a literal zero passes, in both test_idempotency and test_update_mode. Also configure interrogate ([tool.interrogate]) to measure docstring coverage on first-party source only — excluding the vendored repo/ and test functions (mirrors the ruff D102/D103 ignore for tests/**) and nested helpers. Backfill the few missing docstrings so first-party coverage is 100%.
- Add interrogate to pre-commit and the tests workflow so the docstring floor is actually gated rather than advisory. - Bump interrogate fail-under 80 -> 95 (first-party is at 100%). - Enable branch coverage in coverage.py; suite passes the 96% gate at 96.70% with branches counted.
Summary by CodeRabbit
Chores
Tests
Documentation