Repository navigation
test(gateway): consolidate startup owner coverage - #118448
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 12:16 AM ET / 04:16 UTC. ClawSweeper reviewWhat this changesThe PR groups repeated Gateway startup tests under owner-focused suites, removes two redundant standalone startup cases, and reduces repeated real Gateway boots while retaining readiness, SecretRef, plugin quarantine, and HTTP-bind coverage. Merge readinessKeep open for normal maintainer handling. This is a coherent, test-only Gateway startup-shard consolidation with source-backed retained owner assertions and terminal proof in the PR body; current main still has the separate startup test entries, so the work is neither obsolete nor implemented there. Priority: P3 Review scores
Verification
How this fits togetherGateway startup turns configuration, secrets, plugins, and post-attach services into a ready HTTP gateway. These tests exercise that boot path and verify that optional-owner failures degrade only their owning capability while required ingress authentication and readiness remain correctly enforced. flowchart LR
A[Gateway startup configuration] --> B[Secret and plugin preparation]
B --> C[Startup owner decisions]
C --> D[HTTP listener and readiness]
C --> E[Degraded owner diagnostics]
D --> F[Gateway startup test suites]
E --> F
Decision needed
Why: The patch appears correct and preserves the tested boundaries, but the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests -518. Total -517 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one owner-focused startup suite per real Gateway boundary, retain direct assertions for readiness and owner-specific degradation, and merge after the current head passes its remaining gates. Do we have a high-confidence way to reproduce the issue? Not applicable as a user-facing bug report. The PR body provides a high-confidence after-change test path: the exact startup-core group reports 157/157 passing, alongside the focused SecretRef owner suites. Is this the best way to solve the issue? Yes. Importing support-only assertion suites through the tests that own their startup boundary matches the non-isolated Gateway-server runner and avoids repeated full Gateway bootstrap without introducing a second runtime path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 128361397aa7. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
Summary
Root cause
The startup-core shard repeatedly paid for full Gateway bootstrap and for the custom non-isolated runner's complete evaluated-module reset after each file. Several real-server cases re-proved owner mappings already covered by the SecretRef owner suites.
The removed model-runtime event-loop case was especially misleading: it started an independent HTTP server, blocked
startGatewaySidecarson a Promise, and proved that Node could still answer that unrelated socket. Provider catalog and startup ordering remain covered by the prepared-model-runtime, post-attach, and startup orchestration owner suites.Coverage retained
Test count changes from 167 to 157: six repeated optional-owner boots became one combined boundary, the active web-secret boot joined that boundary, the inactive-web behavior remains in the direct web-tools owner suite, two quarantine boots became one mixed boundary, and the independent-HTTP event-loop case was removed.
Performance
Paired on the same ready dependency install at base
4b50c56fecbb9b8936f2b4ab43db22f70229354c:After rebasing onto current
main, the exact 9-entry startup-core group passed 157/157 in 139.77s.Proof
git diff --check: cleanorigin/main: cleanCore test typechecking reaches two pre-existing errors outside this change in
packages/terminal-core/src/ansi.tsandui/src/app-session-route-paths.ts; it reports no changed-file errors.