Repository navigation
Assert the Planted Registration Defects Are Reported - #1851
Conversation
test_an_entry_with_a_defect_is_not_also_reported_absent planted a SessionEnd type defect and a PreToolUse matcher defect but asserted only that neither was misreported as absent, so it passed unchanged if registration_problems stopped reporting either defect entirely, the strictly worse regression. Assert each planted defect's own problem text, matching the sibling tests' standard. Closes on promotion: #1640 Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 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 |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a focused test strengthening that matches the current registration_problems() messaging behavior and introduces no functional or behavioral risk outside test coverage.
Review effort: Lite
Findings: None
What changed in this PR
This PR tightens TestRegistration.test_an_entry_with_a_defect_is_not_also_reported_absent so it not only verifies that planted defects are not misreported as “absent”, but also verifies that the planted defects are actually reported by install.registration_problems, preventing silent-regression gaps.
Changes:
- Add assertions that
registration_problems()output includes the specific problem text for the plantedSessionEndtype: "prompt"defect. - Add assertions that
registration_problems()output includes the specific problem text for the plantedPreToolUsematcher: "Edit"defect. - Keep the existing assertions that neither defect is incorrectly reported as “is not registered” or “never runs”.
| File | Description |
|---|---|
| host-setup/agent-safety/claude/test_install.py | Strengthens a regression test by asserting the planted registration defects are positively reported, not only “not misreported absent”. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…and Overnight Fixes to Main (#1850) Promotes `develop` to `main`. ## Carried - #1846: exits `repo-config/configure.sh` early, writing nothing, for a repository whose registry `status` is `archived`. - #1848: fails the validator's C# unit test step when the run wrote no non-empty Cobertura report, clearing `./coverage` first. It declines #1134's `ref` input with evidence, since a bare checkout already validates `github.sha`, and D1.2 now says so. #1134's third gap moved to #1800. - #1851: asserts that the two planted registration defects are themselves reported. - #1854, #1858: correct #1846's test docstrings, which claimed the script makes no `gh` call before the archived check in cases where it does. Raised by Copilot on this pull request. - #1856: passes `--repo` on documented handoff commands and guards handoff reads against a full page, per #1847. - #1859, #1863: fall back to the default search path when `PATH` is unset in #1848's and #1846's test harnesses. Raised by Copilot on this pull request. - #1861: scopes `VerifyReferenceAotCompatibility` to an AOT publish in `dotnet-codestyle`, per #1857. - #1867: establishes the `PATH` order `tool_shadow_path` names, per #1644. - #1870: makes the installer's dirty-checkout tests independent of the real checkout's state, per #1641. - #1873: pins and decodes git's quoting in `repo_gate.py`'s `ls-files` read, per #1580 and #1872. - #1878: folds typographic punctuation in `pr_review.py reply --match`, per #1299. - #1883: routes `configure.sh`'s `ruleset_id()` through `jqr`, per #1253. - #1885: states the pin comment as the release tag and defines `$/`, per #1805. - #1888: distinguishes `./` from `$/` resolution in the pin rule's prose, per #1886. - #1893: drops the issue reference from `repo-config/README.md`'s archived-exemption note, which Copilot flagged on six rounds of this pull request. - #1895: describes IL3058 in `dotnet-codestyle` as a referenced assembly lacking `IsAotCompatible` metadata set to `true`, and drops the unversioned package examples. Raised by CodeRabbit on this pull request. Callers that pin a hub release get the new C# check on their next pin bump. A test project that runs `dotnet test --coverage` without writing a report now fails its step rather than passing silently. Closes #1134 Closes #1847 Closes #1857 Closes #1644 Closes #1641 Closes #1580 Closes #1872 Closes #1299 Closes #1253 Closes #1805 Closes #1886 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Backlog counts and rankings now consistently exclude handoff issues, including those also marked blocked. * Repository configuration commands now exit without writing when a repository is archived. * Review-thread matching handles typographic punctuation, and no-match responses report the unresolved-thread count. * Tool setup handles PATH entries more precisely, and repository checks report unusual file paths without crashing. * **Reliability** * Validation now fails when C# or Python tests produce no coverage report. * Agent setup can use an explicit dirty-checkout override. * Workflow and repository guidance clarifies reference resolution, release-tag pinning, and AOT configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
test_an_entry_with_a_defect_is_not_also_reported_absentplanted a SessionEndtype: "prompt"defect and a PreToolUsematcher: "Edit"defect, then asserted only that neither was misreported as absent (no problem saying "is not registered" or "never runs"). It never asserted the two planted defects were themselves reported, so it would keep passing unchanged ifregistration_problemsstopped reporting either defect entirely, the strictly worse regression its sibling tests already guard against.registration_problems' output, matching the exact stringsregistration_problemsraises for each shape.Proved locally: making
registration_problemssilently stop reporting either planted defect (commenting out theSessionEnd"does not run the deployed one" append, then separately the PreToolUse "so that group never fires" report) makes this test fail; reverting the mutation makes it pass again. Fulltest_install.pysuite (65 tests) passes.Closes on promotion: #1640
Test plan
python3 -m unittest test_install.TestRegistration.test_an_entry_with_a_defect_is_not_also_reported_absent -vpython3 -m unittest test_install -v(65 tests, all pass)registration_problemsbehavior fails the test🤖 Generated with Claude Code