Skip to content

fix: avoid foreign-listener race in Gateway acquisition proof - #166883

Merged
RomneyDa merged 1 commit into
release/2026.9.9from
fix/release-gateway-owned-reservation-20261007
Oct 8, 2026
Merged

RomneyDa merged 1 commit into
release/2026.9.9from
fix/release-gateway-owned-reservation-20261007

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 8, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: release validation can report an absent Gateway as reachable when an unrelated listener takes its released TCP port.

User Impact

No production behavior changes. The release proof now checks the fixture's owned reservation and retained cooperative port claims, rather than treating every listener on that port as the fixture's Gateway.

Why This Change Was Made

The original assertion failed in Full Release Validation run 37706290335, job 113081546328. A controlled real competing listener reproduces the same busy/free assertion failure after the fixture correctly closes its reservation. This change observes that exact server and exercises a competing listener through stop and cleanup; both port claims remain checked independently.

Evidence

  • Controlled original assertion fails with a real foreign listener.
  • Focused acquisition suite: 17 passed, 1 existing Linux-only skip; 251 ms test time, 18.19 s wall.
  • Port-owner sibling suite: 20 passed. Combined runner: 36.98 s wall.
  • Fresh independent review: no actionable findings; no production seam, retry, timer extension, or relaxed claim assertion.
  • Required changed-path checks are running; hosted CI and ClawSweeper pending.
  • Original 55-file shard replay was interrupted before the Gateway case; it is not claimed as passing proof.

This is release-only publication first; the same assertion exists on main and a main PR will follow.

@RomneyDa RomneyDa added the release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) label Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@RomneyDa
RomneyDa marked this pull request as ready for review October 8, 2026 01:56
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 10:02 PM ET / October 8, 2026, 02:02 UTC.

ClawSweeper review

What this changes

The PR checks closure of the fixture’s own reserved server and retains port-claim coverage while a real competing listener occupies the released port.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported; available validation is reported in-process fixture evidence rather than independently inspected shipped-entry-point proof.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The MEMBER-authored, test-only PR is outside the external-contributor proof gate; its body reports the changed fixture running with a real competing TCP listener and passing focused suites. No production or stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The release-validation assertion can fail despite correct fixture cleanup. The focused correction preserves the existing contract and adds a meaningful competing-listener case without production changes.

Merge readiness

✅ Ready for maintainer review

This PR makes a useful, focused repair to release-validation coverage, with no actionable patch defect found. Current main retains the vulnerable assertion, and the MEMBER author requires maintainer judgment rather than automatic closure.

Priority: P3
Reviewed head: 18faa0350598508edeea6c01479a3f926218972a

Before merge

None.

Findings

None.

Agent review details

How this fits together

OpenClaw’s test-instance helper reserves ports and creates isolated Gateway fixtures for automated validation. This acquisition test checks that an absent Gateway releases its listener while retaining cooperative port ownership until cleanup.

flowchart TD
  A[Acquire isolated test instance] --> B[Reserve listener and two port claims]
  B --> C[Release idle listener]
  C --> D[Bind competing listener]
  D --> E[Check owned server is closed]
  E --> F[Check both claims remain held]
  F --> G[Clean up and reacquire claims]
Loading

Technical review

Best possible solution:

Keep listener identity and cooperative port ownership as separate assertions, retaining the real competing-listener scenario without changing production behavior.

Do we have a high-confidence way to reproduce the issue?

Yes, the source establishes a precise fixture failure: after the reservation closes, a foreign TCP listener makes the original free-port assertion fail. The contributor reports a controlled reproduction; this review did not execute tests.

Is this the best way to solve the issue?

Yes, observing the actual reserved server is a narrow repair that preserves the original listener-release contract and both independent port-claim assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 109bd4791099.

Provenance checked

Testing

Proof path: in-process harness. Added test files: 1.

Security

None.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests +32. Total +32 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 37 5 +32
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 37 5 +32

Labels

Label changes:

  • add P3: This is a focused test-reliability repair with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused test-reliability repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

@RomneyDa
RomneyDa merged commit bd0b97d into release/2026.9.9 Oct 8, 2026
124 of 125 checks passed
@RomneyDa
RomneyDa deleted the fix/release-gateway-owned-reservation-20261007 branch October 8, 2026 02:11
RomneyDa added a commit that referenced this pull request Oct 8, 2026
Forward-port the test-only fix from #166883 onto main. Observe the fixture-owned reservation while preserving cooperative port claims and real competing-listener coverage.

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…aw#166930)

Forward-port the test-only fix from openclaw#166883 onto main. Observe the fixture-owned reservation while preserving cooperative port claims and real competing-listener coverage.

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
NerQuiLes pushed a commit to Xtampa-AI/openclaw that referenced this pull request Oct 11, 2026
Audit all 253 September-only commits against da0cbcc. Port only
applicable fixes and final companions, preserving October owners and
shipped upgrade contracts. Exclude September-specific waivers, schema
rollback, dependency changes, and credential-absence pass conditions.

Adapt retained ACP archive receipts without reopening retired custody;
retain SDK1.30.1 issuer fencing and explicit re-registration; exclude
standalone worker copies from beta.2 updater compatibility bridges.
Report settled Doctor release failures before the no-config early return.

Sources below are whole backports or scoped repair selections:

fix(discord): keep health inspection from blocking Gateway connections (openclaw#166736)
Source-commit: dc26366

fix: avoid foreign-listener race in Gateway acquisition proof (openclaw#166883)
Source-commit: bd0b97d

fix(ci): admit workspace package tests in Windows replay (openclaw#166895)
Source-commit: 9bc88a6

fix(release): restore beta.2 updater inventory and Podman control (openclaw#166872)
Source-commit: e203c64

fix(copilot): plugin tool calls fail from the second turn of a session (openclaw#164598)
Source-commit: c6e5ae8

fix(test): await WhatsApp inbound drain (openclaw#165842)
Source-commit: 05170cd

fix(qa-lab): keep SUT CLI in isolated launcher
Source-commit: 6681bcd

test(qa-lab): assert resolved companion CLI cwd
Source-commit: a60b458

fix(release): accept candidate-owned child evidence (openclaw#165357)
Source-commit: 500c95a

fix(acp): migrate metadata from retained sessions
Source-commit: 16398dc

fix(release): isolate first-hop service containment (openclaw#164898)
Source-commit: 85124fe

fix(release): isolate upgrade survivor scenarios (openclaw#165007)
Source-commit: aad828f

test(release): expect isolated survivor scenarios (openclaw#165009)
Source-commit: 02e7f91

fix(release): split restart auth validation (openclaw#165048)
Source-commit: 6160d9f

test: serialize PowerShell completion process suites (openclaw#166229)
Source-commit: 320e52b

fix(update): settle only this Doctor's commands in managed custody (openclaw#164868)
Source-commit: bdb44e2

fix(claude-cli): replies hang until the run times out when a background agent runs Bash (openclaw#165596)
Source-commit: 889611b

fix(whatsapp): synchronize shutdown test with durable admission (openclaw#166531)
Source-commit: 1f576e4

fix: prevent heartbeat live replies from abbreviating markers (openclaw#166777)
Source-commit: c4ed37e

fix(ci): keep full release validation within measured budgets (openclaw#166774)
Source-commit: 471f950

improve(ci): reuse Watch cache and expose shared scan build progress (openclaw#166498)
Source-commit: 66d898f

fix(e2e): normalize registry helper image modes (openclaw#163188)
Source-commit: 1a09bec

fix: MiniMax live validation misses Code Mode file reads (openclaw#163619)
Source-commit: fc23bc8

fix(test): read canonical ACP upgrade metadata
Source-commit: 46c8dd2

fix(qa): remove unavailable Telegram emoji fixture (openclaw#164956)
Source-commit: e785c56

fix(release): reconcile full validation regressions (openclaw#166200)
Source-commit: a3e349e

fix(release): unblock stable validation evidence (openclaw#166315)
Source-commit: 5ac0f82

fix(release): unblock 2026.9.9 full qualification (openclaw#166341)
Source-commit: 8aa6d7c

test(irc): await owned monitor signals (openclaw#163180)
Source-commit: 429ea8c

fix(release): unblock 2026.9.9 full validation (round 4) (openclaw#166485)
Source-commit: ccb390b

fix(release): repair Doctor teardown and FRV evidence recovery
Source-commit: 5d7fa8e

fix(release): bound FRV job reads and normalize ghost evidence
Source-commit: 1854d41

test(release): align priority fixture with bounded job pages
Source-commit: 4fd4fcc

fix(test): keep MCP validation connected after automatic pairing approval (openclaw#166849)
Source-commit: 0979efd

fix(release): address 2026.9.9 validation failures and retain diagnostics (openclaw#166962)
Source-commit: a024875

fix(release): repair fleet and CLI validation fixtures (openclaw#166977)
Source-commit: b899f42

fix: keep 2026.9.9 upgrades on state schema 19 (openclaw#166959)
Source-commit: bcfc888

fix(ui): keep passive chat viewers following incoming turns
Source-commit: 6d9689d

fix(doctor): commit transcript archive migration progress per batch and honor interruption (openclaw#165837)
Source-commit: 3a085ea

fix(doctor): restore release repair settlement
Source-commit: fab3a66

fix(release): reconcile FRV backports
Source-commit: 0c01cc6

fix(ui): refresh end geometry during interaction (openclaw#166239)
Source-commit: 5b71763

fix(ui): preserve follow intent across content growth (openclaw#166258)
Source-commit: ffcdd4d

fix(ui): gate content follow on height changes (openclaw#166301)
Source-commit: 4964263

fix(release): preserve gateway fixture close callback (openclaw#166348)
Source-commit: 64ad20a

test(ui): await collaborator smooth follow (openclaw#166285)
Source-commit: 90abf6a

Co-authored-by: Eric Curtin <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Abdel Gomez-Perez <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant