Skip to content

test(gateway): await admission before fixture clients connect - #181571

Merged
vincentkoc merged 1 commit into
mainfrom
fix/gateway-startup-admission-completion
Oct 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/gateway-startup-admission-completion

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Four real Gateway fixtures connect after startupSettled but before public connection admission opens. This produces UNAVAILABLE/startup-sidecars failures in scheduled CI, including run39932927548/job120345797211.

Await the existing /startupz helper before the first raw client handshake in the portal, placement scopes, session row baselines and worker startup fixtures. Preserve production startup ordering, shared harness defaults and timeout limits.

Validation: 5 focused files / 10 tests passed, including the unchanged projection-warm ordering tests; changed Gateway test graph typecheck and focused lint passed; independent P0–P2 review clean; formatting and git diff --check passed.

@clawsweeper

clawsweeper Bot commented Oct 23, 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.

@vincentkoc vincentkoc self-assigned this Oct 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Oct 23, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 23, 2026 10:42
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes four Gateway fixtures await public startup admission before connecting their clients.

Example: The worker-placement fixture creates session startup-placement-local after Gateway startup settles.

  • Before: Its initial connection can receive UNAVAILABLE with reason startup-sidecars while recovery still holds admission.
  • After: The fixture waits for /startupz to report started before connecting and exercising session RPCs.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct fixture repair supported by source and reported integration runs; validation remains harness-level evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes only test setup; its reported focused Gateway runs support the fixture repair without changing shipped behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Scheduled CI can reject fixture clients during setup before reaching the intended Gateway behavior assertions.
Reason: The maintainer-authored change follows an established fixture repair and preserves the intentionally separate production startup and admission contracts.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs a concrete fixture readiness mismatch still present on main, with no actionable introduced defects found.

Priority: P2
Reviewed head: 086d199294fe80aed728b3ef18ee586a5f3f6643

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported focused passing run does not include a base-to-head failing replay; shipped-entry-point proof is not required for this maintainer-authored, test-only repair.
Agent review details

How this fits together

Gateway integration fixtures start isolated servers, authenticate WebSocket clients, and exercise placement, portal, and session-event contracts; the existing HTTP startup probe exposes admission readiness.

flowchart LR
  A[Gateway fixture] --> B[Start isolated server]
  B --> C[Deferred recovery]
  C --> D[Startup probe reports started]
  D --> E[Connect WebSocket client]
  E --> F[Exercise existing RPC assertions]
Loading

Technical review

Best possible solution:

Use the existing public admission helper at these fixture connection boundaries while preserving production recovery ordering.

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

Source and the merged sibling repair establish that startupSettled can precede connection admission; this review ran no tests under the read-only constraint.

Is this the best way to solve the issue?

The patch is the smallest complete fixture repair: it reuses the existing readiness owner without adding machinery, weakening assertions, or changing shared harness semantics.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit 595af6e adds src/gateway/server.portals.session.test.ts:71 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 595af6e052af; files: src/gateway/server.portals.session.test.ts)

PR surface

Tests +10. Total +10 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 10 0 +10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 10 0 +10

Labels

Label changes:

  • add P2: Repairs Gateway integration fixture failures with limited scope and 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:

  • P2: Repairs Gateway integration fixture failures with limited scope and 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 execution lanes are retired.

Reviewed October 23, 2026, 6:59 AM ET / 10:59 UTC.

@vincentkoc
vincentkoc merged commit 47bd0f3 into main Oct 23, 2026
201 checks passed
@vincentkoc
vincentkoc deleted the fix/gateway-startup-admission-completion branch October 23, 2026 11:06
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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