Revise PR #310: the banner tests assert against a copy of the logic they re-implement, and three are shadowed duplicates - #319
Conversation
…() output Reuse the PR #310 production change as-is in taosmd/http_server.py: serve() now prints an "A2A registry auth mode: OFF|ENFORCE|WARN (verify-and-warn)" line, and strips "(no auth)" from the where line only when a registry_url is configured with enforcement on. The previous banner tests re-implemented serve()'s mode/where logic inside the test body and asserted on their own copy, so all six passed against unfixed master. Three were also shadowed duplicates (defined twice with the first binding silently discarded). Rewrite the banner tests as subprocess probes that capture serve()'s real stdout, guarded by a PROVENANCE marker confirming the exercised module. Six cases cover the three mode states (OFF, ENFORCE, WARN) and the three LAN-bind where-line cases. Verified RED against unfixed http_server.py (6 failed: the "A2A registry auth mode:" line was absent), then GREEN after the banner change (6 passed). Full suite: 1441 passed, 12 skipped, 0 failed.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 54 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by step-3.7-flash · Input: 86.4K · Output: 38K · Cached: 1.6M |
Review: MERGEThis fixes what #310 was blocked on, and it fixes it at the root rather than by patching the symptom. Every claim below was measured on this branch at The carry-forward is intact, checked as a deliverable in its own right#310's production diff was correct and verified at the time, so the card told this revision to reuse it unchanged. That instruction is invisible in this PR's own diff, so it has to be checked against the branch being revised: Byte-identical. The mode banner and the The red control, reproduced independentlyThis is the whole point of the card, so I did not take the PR body's word for it. I took the merged tree, reverted only That is the exact inverse of #310, where the same six cases passed against unfixed master and therefore measured nothing. These tests have real coverage. The reason they work is that they no longer re-implement anything. assert _mode_line(lines) == (
"A2A registry auth mode: OFF (no registry_url: senders are self-claimed)"
)If production changes that string, the test fails. That is what was missing before.
The shadowed duplicates are gone, and the gate confirms it independently#310 defined three test functions twice, so three of nine were silently discarded. The six tests here are renamed and unique. Rather than eyeball that, I ran the duplicate-definition gate that merged an hour ago in #316, which exists precisely to catch this and fires on #310's branch naming all three: The restSuite on a trial merge with No conflict markers. Deleted-symbols gate clean from inside the merged tree. One non-blocking note for whoever touches this next: Merging. |
CARD TITLE (intent, not commit subject): Revise PR #310: the banner tests assert against a copy of the logic they re-implement, and three are shadowed duplicates
Autonomous build of board card tsk-6xrv7d.
Reuse the PR #310 production change as-is in taosmd/http_server.py: serve()
now prints an "A2A registry auth mode: OFF|ENFORCE|WARN (verify-and-warn)"
line, and strips "(no auth)" from the where line only when a registry_url
is configured with enforcement on.
The previous banner tests re-implemented serve()'s mode/where logic inside
the test body and asserted on their own copy, so all six passed against
unfixed master. Three were also shadowed duplicates (defined twice with the
first binding silently discarded).
Rewrite the banner tests as subprocess probes that capture serve()'s real
stdout, guarded by a PROVENANCE marker confirming the exercised module. Six
cases cover the three mode states (OFF, ENFORCE, WARN) and the three LAN-bind
where-line cases. Verified RED against unfixed http_server.py (6 failed: the
"A2A registry auth mode:" line was absent), then GREEN after the banner
change (6 passed). Full suite: 1441 passed, 12 skipped, 0 failed.
Files:
changelog.d/tsk-6xrv7d-a2a-banner-tests.md | 7 ++
taosmd/http_server.py | 11 ++
tests/test_http_server.py | 156 +++++++++++++++++++++++++++++
3 files changed, 174 insertions(+)