Skip to content

fix(ci): record the HTTPServer bind site that merged before the ratchet - #17906

Closed
iamwhatever wants to merge 1 commit into
mainfrom
fix/main-red-session-doc-bind-ratchet
Closed

iamwhatever wants to merge 1 commit into
mainfrom
fix/main-red-session-doc-bind-ratchet

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Turn main's Backend Tests green again by recording the HTTPServer bind count the tree actually has.

test/test_http_server_bind_ratchet.py::test_bare_http_server_constructions_match_the_recorded_count fails on main: 16 sites, recorded 15.

Why it matters

The red lands on every PR based on main (for example #17875 and #17881).

Root cause

A merge race between two PRs that both merged on 2026-10-07:

Commit Merged (PDT) Effect
896b87c6c (#16728, per-tool MCP deny for opencode) 13:04 adds test/test_per_tool_mcp_deny_single_binary.py:627 ThreadingHTTPServer(("127.0.0.1", 0), Handler)
781294256 (#17450, docs audit) 14:25 adds the ratchet with _BASELINE_SITES = 15, counted on a base without #16728

git log -S on each of the 16 scanned sites dates all of them; #16728's site is the only one newer than #17450's base.

What changed

File Change
test/test_http_server_bind_ratchet.py _BASELINE_SITES 15 → 16

Reason the 16th site is recorded rather than converted: it is a loopback (127.0.0.1, port 0) fake OpenAI endpoint in a test, the same shape as the 13 other test sites already counted. The tree has no shared test helper that skips getfqdn (the two server_bind overrides, in plumb_cpu.py and test_decisions_local_runtime_real_spawn.py, are private to their files), so there is nothing to reuse; converting it would mean a new helper, which is out of scope for a main-red fix. The ratchet still fails on a 17th site.

Not a goal

Backwards compatibility

Compatible: test-only constant.

Tests

python3 -m pytest -q -p no:cacheprovider test/test_http_server_bind_ratchet.py test/test_session_control_doc.py: ratchet tests pass; the one remaining failure is the doc test fixed by #17903.

Manual verification

N/A — test-only change.

Related Issues

Part of #17900

Pattern harvest

Not generalizable here: an exact-count ratchet added by a long-lived PR can miss a site that merges in between. The ratchet's own message already names the fix.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

The ratchet counted 15 sites on a base without the opencode MCP-deny test's loopback fake, which merged first; the tree has 16.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision ca41e1d7503f010156b1699dfc10a5505e85c730 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ca41e1d7503f010156b1699dfc10a5505e85c730 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ca41e1d7503f010156b1699dfc10a5505e85c730 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] ca41e1d

Description read

[DESCRIPTION-READ] 46543ca00393da79d8981ce00062fcda020aaa5f21138d27316dd2a8499b92d7

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ca41e1d7503f010156b1699dfc10a5505e85c730 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ca41e1d

Verdict parsed from the review's SHA-scoped output markers for commit ca41e1d7503f010156b1699dfc10a5505e85c730.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ca41e1d7503f010156b1699dfc10a5505e85c730: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ca41e1d7503f010156b1699dfc10a5505e85c730 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ca41e1d

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ca41e1d7503f010156b1699dfc10a5505e85c730: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Main has two reds: test/test_session_control_doc.py::test_every_tabulated_refusal_code_is_one_the_source_raises and test/test_http_server_bind_ratchet.py::test_bare_http_server_constructions_match_the_recorded_count. Each single fix is still red on the other test, so neither can go green by itself:

PR Fixes Red on
#17903 doc row bind ratchet
#17906 bind ratchet (budget 15 → 16) doc test
#17907 bind ratchet (subclass, budget stays 15) doc test
#17909 both (design-tweak _Server.server_bind + doc row) —

We are backing #17909, which carries both fixes and keeps the ratchet at 15. This PR stays open until #17909 merges.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Closing in favour of #17909, which carries this fix together with the other main-red fix (each alone stays red on the other test). Reopen if #17909 is not merged.

@iamwhatever iamwhatever closed this Oct 8, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 8, 2026
@bolichen97
bolichen97 deleted the fix/main-red-session-doc-bind-ratchet branch November 6, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant