Skip to content

test(runtime): run two long Gateway cases beside the runtime image startup file - #3016

Merged
freeqaz merged 2 commits into
mainfrom
test-deslop-1020
Oct 20, 2026
Merged

freeqaz merged 2 commits into
mainfrom
test-deslop-1020

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Image Runtime Startup is one of the longest CI Required jobs (median 163 s over the 41 main runs from 10-19 18:00Z to 10-20 04:18Z). Its test window is set by one file: runtime-image-startup.test.mjs runs its 14 cases one after another and took a median 86.7 s, while the lane's other three files took 29.2 s, 19.6 s and 3.9 s at fileConcurrency: 3. The lane's test window was 86.7 s, the length of that one file.

Change

  • Move two of its longest cases, verbatim, to the new tests/integration/runtime-image-gateway-workspace.test.mjs in the same lane, so CI runs them beside it:
    • runtime image Gateway hot-loads its workspace node binding without restarting OpenClaw (CI median 16.0 s)
    • runtime image spawns custom-provider subagents with intact native model IDs in the remote workspace (11.6 s)
  • The two log helpers the hot-load case shares with the startup file (gatewayLogDiagnostic, assertGatewayLogEntry) move verbatim to tests/helpers/runtime-image-startup.mjs; only assertGatewayLogEntry is exported. The four imports only the subagent case used move with it.
  • images-runtime-startup.json lists the new file in parallelFiles, and its two expectedTests move with the cases. runtimeImageSmokeTests in scripts/ci/container-release.mjs (the release smoke list that container-release.test.mjs pins to the lane files), deploy/runtime/README.md and docs/testing/docker.md name the new file.
  • No assertion, fixture, timeout or setup changed. Each case still starts its own Gateway container with its own temporary configuration directory and removes both in t.after, so running the two files side by side cannot leak state between cases.
  • This lane has no file-durations.json rows, so its files start in listed order. That order already puts the longest file first.

Split chosen to avoid other open work: the Git broker case and its helpers stay put, because ci-prepare.test.mjs names this file as the seccomp helper's known caller. The OpenShell policy case and the shared Codex case stay too: open PRs #2633 and #906 edit them.

Verification

Expected CI time (per-test CI medians, 21 main runs): the startup file goes from 86.7 s to about 60.7 s. The new file takes about 27.6 s, and the other three files fit beside them, so the lane's test window drops from about 87 s to about 61 s. The job should go from about 163 s to about 137 s.

Local runs (podman, runtime image built from 166def5, host shared with other jobs):

  • main: the startup file took 199.6 s.
  • This branch: both files together took 148.0 s.
  • The same 13 of 14 cases passed on both sides. The 14th, routes sandboxed Git through stock Codex and the repository broker, fails on both sides on this host: podman's network DNS can't reach its in-network fixture (curl: (35) ... unrelated.oce.svc:443). That's known from docs/testing (rootless podman), and CI runs it.

Mutants (11, product code the cases run in the container): each was applied to main and to this branch, and the full files ran on both. Each mutant failed the same cases on both sides.

Mutant Where Failed by (same on main and this branch)
ws_node_phase runtime-entrypoints: workspace-node phase renamed hot-loads workspace node binding
drop_gateway_tool runtime-entrypoints: gateway dropped from Gateway-local Codex tools hot-loads workspace node binding
stub_url runtime-entrypoints: Codex provider stub URL hot-loads workspace node binding
triggers_kept runtime-entrypoints: cron triggers left enabled hot-loads workspace node binding
flush_kept runtime-entrypoints: memory flush left enabled hot-loads workspace node binding
log_level_kept runtime-entrypoints: inherited OPENCLAW_LOG_LEVEL kept publishes dedicated assets
required_profile runtime-entrypoints: worker placement profile name validates dedicated native configuration
device_provider runtime-entrypoints: worker placement provider validates dedicated native configuration
no_runtime_assets runtime-entrypoints: runtime assets not initialized publishes dedicated assets
subagent_ref codex-model-configuration: model selection loses its provider spawns custom-provider subagents
subagent_row_id codex-model-configuration: catalog row id loses its provider survives on both

PINS_PLACEHOLDER

Review: internal review found no blockers; its wording nit (the header no longer calls both cases dedicated) is applied in the second commit, a comment-only change after the runs above.

Other checks:

  • node scripts/ci/run-tests.mjs audit reports no issues.
  • container-release.test.mjs passes 22/22, including the runtime release smoke runs every Image Runtime Startup file.
  • eslint and prettier are clean on the touched files.

Open PRs touching these files (git merge-tree, against main and against this head):

PR Conflicts against main Conflicts against this head
#2633 (draft, already conflicting) 5 files the same 5, plus 1 hunk in runtime-image-startup.test.mjs: it adds an import next to the 4 imports this PR moves
#906 (already conflicting) 14 docs files the same, nothing new
#3011 (file-durations.json) none none

Risks

Test-only, plus the release smoke file list and two docs lists. When both files start their Gateways at once, the cases share the 8-CPU runner with one more container than before. The lane already runs three files at once, so peak concurrency is unchanged; the cases just overlap for longer.

…artup file

runtime-image-startup.test.mjs runs its cases one after another and sets
Image Runtime Startup's length (about 87 s of a 163 s job). Move the
workspace-node hot-load case and the custom-provider subagent case,
verbatim, to runtime-image-gateway-workspace.test.mjs in the same lane,
so CI runs them beside it. The two log assertion helpers they share move
to tests/helpers/runtime-image-startup.mjs. The release smoke list and
the runtime test docs name the new file.
@freeqaz
freeqaz requested a review from a team as a code owner October 20, 2026 06:31
@clawsweeper

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

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves two Gateway integration cases into a parallel test file and updates their shared helper, CI manifest, release smoke list, and documented commands.

Example: Image Runtime Startup runs with fileConcurrency set to 3.

  • Before: Workspace-node hot-loading and custom-provider subagent cases run sequentially inside runtime-image-startup.test.mjs.
  • After: The same two cases run in runtime-image-gateway-workspace.test.mjs beside the remaining startup cases.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, focused relocation supported by exact-head CI and reported comparative runs; the evidence remains test-oriented.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test relocation is outside the ordinary contributor proof gate; exact-head CI supports preserved execution, while the downloaded console screenshots concern unrelated UI 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: Contributors wait for a long sequential runtime test file before required CI completes.
Reason: The maintainer-authored change follows the established lane-rebalancing approach in #2297 and preserves all moved coverage.

Merge readiness

✅ Ready for maintainer review

This PR is a focused CI optimization that preserves existing runtime coverage and release smoke selection; no actionable defects were found.

Priority: P3
Reviewed head: ab92a0c8f255df59dfed17f1aa8a10b933e061e8

Before merge

None.

Findings

None.

Agent review details

How this fits together

The CI suite manifest feeds the test runner’s file scheduler and required-case accounting; the container release script separately selects the same runtime integration files for image smoke verification.

flowchart TD
  A[CI suite manifest] --> B[Test file scheduler]
  B --> C[Startup cases]
  B --> D[Gateway workspace cases]
  C --> E[Runtime image containers]
  D --> E
  F[Release smoke list] --> D
Loading

Technical review

Best possible solution:

Land the focused file split with the existing assertions, required-case accounting, and release smoke coverage preserved.

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

This is a test scheduling optimization, and source inspection confirms that main still runs both cases within the original sequential file.

Is this the best way to solve the issue?

The split uses the existing parallel scheduler and shared test helper without adding production machinery or weakening required coverage.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway hot-load and custom-provider subagent cases keeps the original intent (459a2b0; 669cf7a: The cases protect workspace-node hot-loading without a Gateway restart and preservation of native model identifiers through custom-provider subagent routing.)
  • Gateway log assertion helpers keeps the original intent (87234e1: Runtime verification added structured log assertions with recent Gateway diagnostics when an expected event is absent.)
  • Parallel startup lane scheduling keeps the original intent (8003dbd: Existing work moved self-contained runtime cases into separate files so otherwise idle runner capacity could shorten the CI critical path.)
  • Release smoke inventory keeps the original intent (test(ci): pin the runtime release smoke list to the startup lanes #1456: The release smoke list must retain runtime coverage when startup lane files are split or rebalanced.)

Security

None.

Evidence

What I checked:

Likely related people:

  • freeqaz: Raw commit 8003dbd adds scripts/ci/test-suites/images-runtime-startup.json:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8003dbdae9ea; files: scripts/ci/test-suites/images-runtime-startup.json)

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves contributor CI scheduling while preserving product behavior and existing coverage.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-20T06:44:46.814Z sha 7164193 :: needs maintainer review before merge. :: none

Reviewed October 20, 2026, 3:04 AM ET / 07:04 UTC (Revision 2).

Only the hot-load case starts a dedicated Gateway; the subagent case uses
the default entrypoint (review nit).
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@freeqaz
freeqaz merged commit 8b01c66 into main Oct 20, 2026
43 of 45 checks passed
@freeqaz
freeqaz deleted the test-deslop-1020 branch October 20, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant