Repository navigation
improve(tests): cover Gateway fixture edits without duplicate setup - #141580
Conversation
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).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 5:50 PM ET / 21:50 UTC. ClawSweeper reviewWhat this changesStrengthen 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 Review scores
Verification
How this fits togetherGateway 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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +73. Total +73 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready on 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 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.tsnode scripts/check-changed.mjs --stagedNine 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). |
|
Merged via squash.
|
) 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).
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.listresponses 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.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.listresult 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.