Repository navigation
fix(test): repair the two backend tests main went red on - #17907
bolichen97 wants to merge 2 commits into
Conversation
#16728 added a bare ThreadingHTTPServer((host, port), ...) stub in test_per_tool_mcp_deny_single_binary.py after #17450's ratchet recorded 15 sites, so test_bare_http_server_constructions_match_the_ recorded_count fails on main with 16. Give that stub the server_bind override the ratchet asks for: the count stays 15 and the stub skips the host lookup that can stall a bind. Part of #17900
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS One stale Inventory (2 items) — 2 justifiedIntent: get main's two red backend tests (#17900) passing again, each with its meaning intact. This is a FIX. The workflow's
Checks behind the verdict:
[FIRST-PRINCIPLES-REVIEWED] 946052d Description read[DESCRIPTION-READ] 9bd1f7986e864fe4d3f8b3136830d9eb12ceaa68247f9bf4b87b7e7daf113b47 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 946052d Description read[DESCRIPTION-READ] c356a238f834ac7089c9f3b4c2845375be3d6c9983e4e32847603a0cb77ca272 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check [DESIGN-REVIEWED] 946052d Description read[DESCRIPTION-READ] b2002cd7d5158f5860a6e8216bf9335ec1d82107f0fb794101bdcaa76ea3be8a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Goal widened at the maintainer's request: this PR now also drops the stale |
|
Main has two reds:
We are backing #17909, which carries both fixes and keeps the ratchet at 15. This PR stays open until #17909 merges. |
|
Superseded by #17909, which fixed both main-red tests and has merged; main now passes test_session_control_doc and test_http_server_bind_ratchet. Closing; the branch is kept. |
Problem / Motivation
Goal: Main's two red backend tests (#17900) pass again, each keeping its meaning.
Two backend tests fail on
main:test/test_http_server_bind_ratchet.py::test_bare_http_server_constructions_match_the_recorded_countfinds 16 bareHTTPServer((host, port), ...)constructions against a recorded 15.test/test_session_control_doc.py::test_every_tabulated_refusal_code_is_one_the_source_raisessays the page listsremote_target_unsupported, whichsession_control.pyno longer raises.Why it matters
Every PR's Backend Tests (Linux and Windows) go red on these two tests, so no PR can show a clean CI run. Fixing only one leaves the PR red on the other.
Not a goal
What changed (motivation → approach → change)
#17450 landed after two changes it had not seen, so two tests went red on main.
ThreadingHTTPServerstub intest/test_per_tool_mcp_deny_single_binary.py, a 16th site against a recorded 15server_bindoverride the ratchet's docstring prescribes (no host lookup), so the count stays 15remote_target_unsupportedwithrelay_archive_read_only, but the refusal table in the session-control help page (docs/session-control.mdin the package) still lists the old coderelay_archive_read_onlyBackwards compatibility
Compatible: one test stub and one doc row change; no product code changes.
Reader: kiro_crew docs/session-control.md refusal table -- chat (agent help page) -- the removed code has not been raised since #17662, so no caller can get it;
test_every_tabulated_refusal_code_is_one_the_source_raisespins the table to the source.Tests
No new tests: the two red tests are the regression check. On main they fail (
2 failed, 10 passed). On this branchtest_session_control_doc.pyandtest_http_server_bind_ratchet.pygive12 passed, andtest_per_tool_mcp_deny_single_binary.pypasses with its 4 real-adapter cases skipped (they need an installed opencode binary). The flake-pattern ratchet passes.Manual verification
N/A — unit coverage sufficient: the two tests that went red are the check.
Screenshots / video
N/A — no frontend file changed.
Related Issues
Closes #17900
Pattern harvest
Rule candidate: review-prompt
Pattern: a long-running PR that adds an exact-count guard should rebase and re-run it right before merge, since sibling merges move the count.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)