Skip to content

improve(tests): cover Gateway fixture edits without duplicate setup - #141580

Merged
steipete merged 1 commit into
mainfrom
steipete/native-gateway-fixture-publication
Sep 7, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/native-gateway-fixture-publication

Conversation

@steipete

@steipete steipete commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Related: #132180 (split node-session completion and execution follow-ups). This is the Gateway test-fixture coverage slice only; the original remains open for the other changes.

What Problem This Solves

Gateway integration tests must expose one current runtime configuration to both mocked and real readers, without overwriting authored configuration. Existing coverage checks publication across RPC, reply preparation, and session writes, but does not distinguish several default-precedence, in-place edit, removal, and external-file-refresh regressions.

Why This Change Was Made

Extend the existing atomic-writer cases and one connected RPC sequence rather than duplicating a pending-request matrix. The connected sequence now subsumes the standalone health-request fixture, including immediate real-reader visibility, exact workspace entries, and an explicit roster without an injected main agent.

User Impact

No product behavior changes. Developers get stronger fixture-isolation regression coverage with less duplication than the original proposal. Runtime-only overrides stay runtime-only, deleted overrides reveal authored values, and actual agents.list responses reflect the published roster.

Production/test-support delta: 0. Tests: +108/-35, net +73, compared with the original slice's net +129. No product configuration keys, defaults, storage APIs, schemas, migrations, or dependencies change; all configuration and state are synthetic test fixtures.

Evidence

On candidate tree 00525c5fe0beb8066033e4f7101586d5f8b95f52, all 16 tests across both files passed in 17.878 seconds, followed by the complete staged changed-scope gate in 171.067 seconds.

node scripts/run-vitest.mjs src/gateway/test-helpers.server-env.test.ts src/gateway/test-helpers.server-rpc.test.ts
node scripts/check-changed.mjs --staged

Nine temporary fault controls failed at the intended assertions: authored-roster shadowing, reversed default precedence, persisted runtime overrides, identity-only caching, sticky deleted defaults, sticky removed rosters, stale authored-file reads, delayed publication, and dropped workspace fields. The last two specifically validated the consolidated replacement before the final healthy run. All controls are removed.

The connected test uses the existing suite-owned Gateway and checks real configuration immediately after RPC admission starts, then verifies the actual agents.list result and unchanged authored file. Existing queued-session-write and three-boundary publication coverage remains intact. This is isolated Gateway fixture proof, not a live-provider or production rollout claim.

Fresh isolated Codex review returned scoped-clean at P0 across both partitions in 34.869 seconds, with no findings; this is not an all-severity clean verdict. Exact-head CI 34163083655 passed on 1565e7052b0b81feb915acee9a784be9b197fbe7.

Extend existing atomic-writer and connected RPC tests for default
precedence, in-place edits, removal, authored-file refresh, and runtime-only
overrides. Subsume the standalone pending-health fixture with immediate
workspace/roster checks and actual agents.list responses.

Nine named fault controls protect the intended boundaries. All 16 focused
tests, changed checks, and independent P0 review pass. No production,
test-support, configuration, or storage contract changes.

Related: #132180 (split node-session completion and execution follow-ups).
@clawsweeper

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

@steipete
steipete marked this pull request as ready for review September 7, 2026 21:25
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Sep 7, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 5:50 PM ET / 21:50 UTC.

ClawSweeper review

What this changes

Strengthen Gateway test-fixture coverage for configuration edits, removals, default precedence, and file preservation while reusing an existing connected server.

Merge readiness

✅ Ready for maintainer review

Keep open: this adds useful, distinct fixture coverage that current main lacks. No actionable correctness or security findings remain, and the prior review identified no blockers.

Priority: P3
Reviewed head: 1565e7052b0b81feb915acee9a784be9b197fbe7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, useful coverage with reported fault-control validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored test-only change is exempt from contributor runtime proof; reported validation exercises fixture publication through a suite-owned Gateway and actual agents.list responses, without claiming live-provider behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored test-only change is exempt from contributor runtime proof; reported validation exercises fixture publication through a suite-owned Gateway and actual agents.list responses, without claiming live-provider behavior.
Evidence reviewed 7 items Introduced scope and source identity: The verified merge-base-to-head delta changes only the two test files. The checked-out head has tree 00525c5fe0beb8066033e4f7101586d5f8b95f52, matching the contributor's reported validation tree.
Connected replacement preserves observable coverage: The added sequence checks configuration immediately after RPC admission, exact workspace-bearing rosters without implicit main insertion, actual agents.list responses, in-place edits, deleted overrides, external file refresh, and unchanged authored configuration. Existing queued-write and three-boundary cases remain.
Publication and fixture lifecycle: rpcReq publishes configuration synchronously before awaited work. Suite hooks reset mutable overrides between cases, while the connected-server helper reuses its authenticated client. Configuration composition preserves authored defaults beneath fixture overrides.
Findings None None.
Security None None.

How this fits together

Gateway integration tests combine authored configuration with temporary fixture overrides. The shared fixture publishes that configuration to real and mocked readers before requests reach Gateway handlers.

flowchart LR
  A[Authored configuration] --> C[Fixture configuration publisher]
  B[Temporary test overrides] --> C
  C --> D[Real and mocked readers]
  C --> E[Gateway agent-list request]
  D --> F[Visibility and preservation assertions]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +73. Total +73 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 108 35 +73
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 108 35 +73

Review metrics

None.

Technical review

Best possible solution:

Retain the consolidated boundary tests and existing fixture publisher, keeping runtime overrides separate from authored configuration.

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

Not applicable: this is additional fixture regression coverage, not a claimed current product defect; the contributor reports targeted passing runs and failing fault controls.

Is this the best way to solve the issue?

Yes: extending existing atomic-write cases and one connected RPC sequence protects distinct failure modes without adding a new fixture or production seam.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is focused test-coverage maintenance without product behavior changes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored test-only change is exempt from contributor runtime proof; reported validation exercises fixture publication through a suite-owned Gateway and actual agents.list responses, without claiming live-provider behavior.

Evidence

What I checked:

  • Introduced scope and source identity: The verified merge-base-to-head delta changes only the two test files. The checked-out head has tree 00525c5fe0beb8066033e4f7101586d5f8b95f52, matching the contributor's reported validation tree. (1565e7052b0b)
  • Connected replacement preserves observable coverage: The added sequence checks configuration immediately after RPC admission, exact workspace-bearing rosters without implicit main insertion, actual agents.list responses, in-place edits, deleted overrides, external file refresh, and unchanged authored configuration. Existing queued-write and three-boundary cases remain. (src/gateway/test-helpers.server-rpc.test.ts:123, 1565e7052b0b)
  • Publication and fixture lifecycle: rpcReq publishes configuration synchronously before awaited work. Suite hooks reset mutable overrides between cases, while the connected-server helper reuses its authenticated client. Configuration composition preserves authored defaults beneath fixture overrides. (src/gateway/test-helpers.server.ts:1295, 1565e7052b0b)
  • Current-main necessity: Comparing fetched main with the reviewed head shows the additional test coverage is still absent on main; the configuration publisher and composition helpers have no differences. No merged replacement is established. The local tag containment check lists no tag containing this head. (src/gateway/test-helpers.server-rpc.test.ts:123, b08fbeade507)
  • Validation and review continuity: The supplied body and contributor comment report 16 focused tests passing, the changed-scope gate passing, and nine temporary fault controls failing at their intended assertions. The supplied CI context reports successful changed-test and CI-gate checks. The prior completed review covered this same head and retained no findings or required next step. This read-only review did not execute tests. (1565e7052b0b)
  • Related work remains separate: The body and discussion explicitly identify this as a fixture-coverage slice of fix(nodes): reduce completion delays and clarify execution outcomes #132180, which remains open for other changes. That broader PR's native execution and dependency proof requirements do not apply to this test-only delta. (1565e7052b0b)

Likely related people:

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

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-07T21:34:21.782Z sha 1565e70 :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready on 1565e7052b0b81feb915acee9a784be9b197fbe7, tree 00525c5fe0beb8066033e4f7101586d5f8b95f52.

This consolidates the requested fixture coverage, not a product-runtime fix. The connected sequence preserves immediate real-reader visibility, workspace-bearing explicit rosters without injected main, actual agents.list responses, defaults/edit/removal behavior, and authored-file preservation. Existing queued-writer and three-boundary cases remain; the redundant standalone health setup is removed.

All 16 focused tests passed in 17.878 seconds, followed by the full staged changed-scope gate in 171.067 seconds:

node scripts/run-vitest.mjs src/gateway/test-helpers.server-env.test.ts src/gateway/test-helpers.server-rpc.test.ts
node scripts/check-changed.mjs --staged

Nine temporary fault controls failed at their intended assertions and were removed. Fresh isolated Codex autoreview returned scoped-clean at P0 across two partitions in 34.869 seconds. Exact-head CI 34163083655 passed. The latest ClawSweeper review has no actionable findings or before-merge items.

Production/test-support delta: 0. Tests: +108/-35, net +73, versus the original slice's +129. No product config/default, dependency, schema, migration, storage, native-app, or provider behavior changes. No live-provider or production-rollout claim. The remaining work stays tracked in #132180 (split node-session landing series).

@steipete
steipete merged commit 2a0601f into main Sep 7, 2026
175 checks passed
@steipete
steipete deleted the steipete/native-gateway-fixture-publication branch September 7, 2026 21:53
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 8, 2026
)

Extend existing atomic-writer and connected RPC tests for default
precedence, in-place edits, removal, authored-file refresh, and runtime-only
overrides. Subsume the standalone pending-health fixture with immediate
workspace/roster checks and actual agents.list responses.

Nine named fault controls protect the intended boundaries. All 16 focused
tests, changed checks, and independent P0 review pass. No production,
test-support, configuration, or storage contract changes.

Related: openclaw#132180 (split node-session completion and execution follow-ups).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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