Commit 6aa38e8
authored
fix(e2e): use isolated gateway state for inference switch (#9216)
<!-- markdownlint-disable MD041 -->
## Summary
The OpenClaw inference-switch E2E target installed OpenShell under an
isolated home but looked for managed gateway state under the test
process's ambient home. Pass the target home to the existing owned
gateway-state verifier so the target uses its recorded Docker-driver
gateway instead of falling through to unavailable user-systemd services.
Failure evidence: E2E run 31895698451, job 95038810397. Ownership was
claimed on #9166 before implementation:
#9166 (comment)
## Related Issue
Related to #9166.
## Changes
- Thread the target home through managed gateway PID and runtime-marker
discovery.
- Store the temporary host-verification resolver under the same isolated
home.
- Pass the OpenClaw inference-switch target's installation home while
preserving the existing default for other callers.
- Add support coverage proving target-home managed state is selected
without probing the user service.
## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Quality Gates
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: this corrects internal E2E
fixture state discovery and changes no supported command, configuration,
API, policy, default, error, or runtime behavior.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: independent Codex
Desktop security review at commit under review `d47cc72d8` passed all
nine required categories with no finding; the three reviewed file blobs
are unchanged at latest PR commit `87a58c462`.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:
## Documentation Writer Review
- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: At commit under review `87a58c462`, the complete diff
against base `de29c02a1` changes only internal E2E fixtures and tests.
It passes the isolated test home to the existing owned gateway-state
verifier and stores verifier artifacts under that home; it does not
change supported product behavior or a user-visible surface.
- Agent: Codex Desktop (`/root/openclaw_docs_review`)
<!-- docs-review-head-sha: 87a58c4 -->
<!-- docs-review-agents-blob-sha: e30afb2 -->
## DGX Station Hardware Evidence
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:
## Verification
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — at latest PR commit `87a58c462`, `npx
vitest run --project e2e-support
test/e2e/support/compatible-anthropic-switch.test.ts`: 11 passed, 1
Linux-only skipped on macOS.
- [ ] Applicable broad gate passed — not applicable to this three-file
internal E2E fixture correction; `npm run validate:pr`, CLI typecheck,
Oxfmt, Oxlint, repository checks, semantic-phase coverage,
size/conditional checks, and `git diff --check` passed after merging
main `de29c02a1`.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
---
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Expanded end-to-end coverage for gateway behavior across custom home
directories.
* Improved validation of gateway process ownership, executable
resolution, and state-directory handling.
* Strengthened host-verification setup and cleanup checks across managed
and active service scenarios.
* Updated provider-switching tests to verify behavior in isolated
environments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>1 parent de29c02 commit 6aa38e8
3 files changed
Lines changed: 45 additions & 19 deletions
File tree
- test/e2e
- fixtures
- live
- support
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
222 | 223 | | |
223 | | - | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | | - | |
| 1096 | + | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
| |||
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
102 | | - | |
103 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
104 | 125 | | |
105 | 126 | | |
106 | | - | |
| 127 | + | |
| 128 | + | |
107 | 129 | | |
108 | 130 | | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 136 | + | |
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
124 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
125 | 146 | | |
126 | 147 | | |
127 | 148 | | |
| |||
133 | 154 | | |
134 | 155 | | |
135 | 156 | | |
136 | | - | |
| 157 | + | |
137 | 158 | | |
138 | 159 | | |
139 | 160 | | |
| |||
153 | 174 | | |
154 | 175 | | |
155 | 176 | | |
156 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
157 | 182 | | |
158 | 183 | | |
159 | 184 | | |
| |||
0 commit comments