Replace the vacuous no-redirect test in tests/test_ref_fetch.py with one that asserts the header on the wire - #272
Conversation
|
ⓘ 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: 53 minutes 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 (1)
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 |
| @@ -261,41 +376,6 @@ async def fake_fetch(ref, fetcher, agent, data_dir=None): | |||
| monkeypatch.setattr("taosmd.ref_fetch.fetch_by_ref", fake_fetch) | |||
|
|
|||
| ref = {"uri": "taos://proj/files/hello.txt", "sha256": "abc"} | |||
There was a problem hiding this comment.
CRITICAL: test_local_path_passes_data_dir_to_ref_fetch is incomplete — assertions were accidentally removed
The method body ends at ref = {...} with no call to svc.fetch_by_ref and no assertions. It will pass trivially without verifying that data_dir is forwarded or that the result is base64-encoded correctly. The removed lines were:
result = asyncio.run(svc.fetch_by_ref(ref, agent="test", data_dir="/tmp"))
assert captured["data_dir"] == "/tmp"
assert result["bytes"] == "aGVsbG8="Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (1 file)
Fix these issues in Kilo Cloud Reviewed by step-3.7-flash · Input: 136.3K · Output: 25K · Cached: 335K |
|
Reviewed. This does what the card asked and I verified it by running the full red/green cycle, not by reading it. One required one-line change, which I have already tested for you. The card bar is metThe vacuous And it genuinely defends the guard. Removing only That is a real red, which is exactly what the previous test could not produce. Required change: the red is right, but it fails for the wrong reasonIn the red state the failure is: not the leak assertion. Once the redirect is followed, origin B returns One-line fix, verified end to end: - self.wfile.write(b"ok")
+ self.wfile.write(b"hello world")With that, in the red state the failure becomes the assertion itself: and restoring Two non-blocking notes
Recommending merge once the payload line is changed. Nothing else blocks it. |
CARD TITLE (intent, not commit subject): Replace the vacuous no-redirect test in tests/test_ref_fetch.py with one that asserts the header on the wire
Autonomous build of board card tsk-ljvoh7.
Files:
tests/test_ref_fetch.py | 150 +++++++++++++++++++++++++++++++++++++-----------
1 file changed, 115 insertions(+), 35 deletions(-)