@openrig/cli 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon/assets/guidance/openrig-start.md +16 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +12 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +92 -3
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +82 -2
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +24 -1
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-service.js +10 -0
- package/daemon/dist/domain/spec-library-service.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +10 -1
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/specs/agents/design/{agent.yaml → product-designer/agent.yaml} +4 -3
- package/daemon/specs/agents/design/{guidance → product-designer/guidance}/role.md +13 -0
- package/daemon/specs/agents/{impl → development/implementer}/agent.yaml +4 -3
- package/daemon/specs/agents/development/implementer/guidance/role.md +47 -0
- package/daemon/specs/agents/{qa → development/qa}/agent.yaml +3 -2
- package/daemon/specs/agents/development/qa/guidance/role.md +78 -0
- package/daemon/specs/agents/{lead → orchestration/orchestrator}/agent.yaml +4 -3
- package/daemon/specs/agents/{lead → orchestration/orchestrator}/guidance/role.md +18 -0
- package/daemon/specs/agents/{analyst → research/analyst}/agent.yaml +2 -1
- package/daemon/specs/agents/{synthesizer → research/synthesizer}/agent.yaml +2 -1
- package/daemon/specs/agents/{reviewer → review/independent-reviewer}/agent.yaml +4 -3
- package/daemon/specs/agents/{reviewer → review/independent-reviewer}/guidance/role.md +13 -0
- package/daemon/specs/agents/shared/agent.yaml +29 -1
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +468 -0
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +149 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +234 -0
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +210 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +417 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +96 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +256 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +39 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +37 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +40 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +94 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +13 -0
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +14 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +220 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/references/issue-taxonomy.md +109 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
- package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +84 -0
- package/daemon/specs/agents/shared/skills/process/frontend-design/LICENSE.txt +177 -0
- package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +42 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/CREATION-LOG.md +119 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +296 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/defense-in-depth.md +122 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/find-polluter.sh +63 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-academic.md +14 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-1.md +58 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-2.md +68 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-3.md +69 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +371 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
- package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +95 -0
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +139 -0
- package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +116 -0
- package/daemon/specs/{adversarial-review.yaml → rigs/focused/adversarial-review/rig.yaml} +3 -3
- package/daemon/specs/{research-team.yaml → rigs/focused/research-team/rig.yaml} +3 -3
- package/daemon/specs/rigs/launch/demo/CULTURE.md +92 -0
- package/daemon/specs/{product-team.yaml → rigs/launch/demo/rig.yaml} +13 -12
- package/daemon/specs/{implementation-pair.yaml → rigs/launch/implementation-pair/rig.yaml} +5 -5
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +137 -0
- package/daemon/specs/rigs/preview/product-team/rig.yaml +91 -0
- package/dist/client.d.ts +17 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +33 -23
- package/dist/client.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +2 -1
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +5 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +4 -3
- package/dist/commands/up.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +54 -7
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/fetch-with-timeout.d.ts +9 -0
- package/dist/fetch-with-timeout.d.ts.map +1 -0
- package/dist/fetch-with-timeout.js +41 -0
- package/dist/fetch-with-timeout.js.map +1 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +2 -1
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
- package/daemon/specs/agents/impl/guidance/role.md +0 -27
- package/daemon/specs/agents/qa/guidance/role.md +0 -26
- package/daemon/specs/agents/shared/skills/openrig-user/SKILL.md +0 -264
- /package/daemon/specs/agents/{analyst → research/analyst}/guidance/role.md +0 -0
- /package/daemon/specs/agents/{synthesizer → research/synthesizer}/guidance/role.md +0 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: containerized-e2e
|
|
3
|
+
description: Run end-to-end dogfood tests inside Docker containers to simulate real user experiences. Use when you need to verify install paths, control plane functionality, UI rendering, or packaging correctness in a clean environment. Triggers include "containerized test", "Docker dogfood", "clean install test", "e2e in container", or testing that requires a fresh environment without dev-mode shortcuts.
|
|
4
|
+
allowed-tools: Bash(docker:*), Bash(agent-browser:*), Bash(npx agent-browser:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Containerized E2E Testing
|
|
8
|
+
|
|
9
|
+
Run OpenRig (or any npm-installable CLI + web UI project) through end-to-end testing inside Docker containers, simulating real user install and usage scenarios.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- Verifying the npm install path works from a packed tarball
|
|
14
|
+
- Testing control plane functionality without live agent runtimes
|
|
15
|
+
- Checking UI rendering via agent-browser in a clean environment
|
|
16
|
+
- Regression testing after packaging changes
|
|
17
|
+
- Phase boundary acceptance gates
|
|
18
|
+
|
|
19
|
+
## When NOT to Use
|
|
20
|
+
|
|
21
|
+
- Testing live agent behavior (send/capture/broadcast, whoami from inside an agent, transcript capture) — these need real claude-code/codex runtimes on the host
|
|
22
|
+
- Quick feedback during active TDD cycles — too slow for the edit/test loop
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- Docker installed and running
|
|
27
|
+
- The repo builds successfully (`npm run build` for all workspaces)
|
|
28
|
+
- `agent-browser` skill loaded (for UI verification commands)
|
|
29
|
+
|
|
30
|
+
## Testing Personas
|
|
31
|
+
|
|
32
|
+
### Fresh User
|
|
33
|
+
|
|
34
|
+
A brand new user who has never installed OpenRig. Exercises the first-run experience.
|
|
35
|
+
|
|
36
|
+
- Empty `~/.openrig/` directory
|
|
37
|
+
- No existing rigs, snapshots, or specs
|
|
38
|
+
- Tests: install, daemon start, preflight, doctor, first rig up, UI renders
|
|
39
|
+
|
|
40
|
+
### Mature User
|
|
41
|
+
|
|
42
|
+
A user with existing OpenRig state — rigs, snapshots, library additions, transcripts.
|
|
43
|
+
|
|
44
|
+
- Pre-populated `~/.openrig/` via Docker volume persistence
|
|
45
|
+
- Build this state organically: run the fresh-user tests first, and the volume accumulates real state
|
|
46
|
+
- Tests: restore from existing snapshots, expand existing rigs, library with user-added specs, upgrade-path behaviors
|
|
47
|
+
|
|
48
|
+
To set up a mature user volume:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Create a named volume
|
|
52
|
+
docker volume create openrig-mature-user
|
|
53
|
+
|
|
54
|
+
# Run fresh-user tests with the volume mounted
|
|
55
|
+
docker run -it --rm --shm-size=1g \
|
|
56
|
+
-v openrig-mature-user:/root/.openrig \
|
|
57
|
+
-v /tmp/openrig-e2e-artifacts:/artifacts \
|
|
58
|
+
openrig-e2e
|
|
59
|
+
|
|
60
|
+
# The volume now has real state from actual rig commands
|
|
61
|
+
# Subsequent runs with the same volume simulate a mature user
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
|
|
66
|
+
### 1. Build the E2E Image
|
|
67
|
+
|
|
68
|
+
Use the provided build script or do it manually:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Using the build script (recommended)
|
|
72
|
+
bash {SKILL_DIR}/scripts/build-e2e-image.sh /path/to/repo
|
|
73
|
+
|
|
74
|
+
# Or manually:
|
|
75
|
+
cd /path/to/repo
|
|
76
|
+
npm run build --workspace @openrig/daemon
|
|
77
|
+
npm run build --workspace @openrig/ui
|
|
78
|
+
npm run build --workspace @openrig/cli
|
|
79
|
+
bash scripts/build-package.sh
|
|
80
|
+
cd packages/cli && npm pack --pack-destination /tmp/e2e-build
|
|
81
|
+
cp {SKILL_DIR}/scripts/Dockerfile /tmp/e2e-build/
|
|
82
|
+
mv /tmp/e2e-build/openrig-cli-*.tgz /tmp/e2e-build/openrig-cli.tgz
|
|
83
|
+
cd /tmp/e2e-build && docker build -t openrig-e2e:latest .
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 2. Start the Container
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Fresh user (ephemeral state)
|
|
90
|
+
docker run -d --rm --name openrig-e2e \
|
|
91
|
+
--shm-size=1g \
|
|
92
|
+
-v /tmp/openrig-e2e-artifacts:/artifacts \
|
|
93
|
+
openrig-e2e sleep infinity
|
|
94
|
+
|
|
95
|
+
# Mature user (persistent volume)
|
|
96
|
+
docker run -d --rm --name openrig-e2e \
|
|
97
|
+
--shm-size=1g \
|
|
98
|
+
-v openrig-mature-user:/root/.openrig \
|
|
99
|
+
-v /tmp/openrig-e2e-artifacts:/artifacts \
|
|
100
|
+
openrig-e2e sleep infinity
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Important:** Always use `--shm-size=1g` for Chromium stability during browser tests.
|
|
104
|
+
|
|
105
|
+
### 3. Run Tests Inside the Container
|
|
106
|
+
|
|
107
|
+
Execute commands via `docker exec`:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Start the daemon
|
|
111
|
+
docker exec openrig-e2e rig daemon start
|
|
112
|
+
|
|
113
|
+
# Run preflight and doctor
|
|
114
|
+
docker exec openrig-e2e rig preflight --json
|
|
115
|
+
docker exec openrig-e2e rig doctor --json
|
|
116
|
+
|
|
117
|
+
# Copy test specs into the container
|
|
118
|
+
docker cp {SKILL_DIR}/templates/control-plane-test.yaml openrig-e2e:/workspace/
|
|
119
|
+
docker cp {SKILL_DIR}/templates/expansion-pod-fragment.yaml openrig-e2e:/workspace/
|
|
120
|
+
docker cp {SKILL_DIR}/templates/expansion-collision-fragment.yaml openrig-e2e:/workspace/
|
|
121
|
+
|
|
122
|
+
# Launch a rig
|
|
123
|
+
docker exec openrig-e2e rig up /workspace/control-plane-test.yaml --json
|
|
124
|
+
|
|
125
|
+
# Check topology
|
|
126
|
+
docker exec openrig-e2e rig ps --json
|
|
127
|
+
docker exec openrig-e2e rig ps --nodes --json
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 4. Browser Testing Inside the Container
|
|
131
|
+
|
|
132
|
+
agent-browser runs inside the container via `docker exec`:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Open the daemon UI
|
|
136
|
+
docker exec openrig-e2e agent-browser open http://127.0.0.1:7433
|
|
137
|
+
docker exec openrig-e2e agent-browser wait --load networkidle
|
|
138
|
+
|
|
139
|
+
# Inspect interactive elements
|
|
140
|
+
docker exec openrig-e2e agent-browser snapshot -i
|
|
141
|
+
|
|
142
|
+
# Capture screenshots
|
|
143
|
+
docker exec openrig-e2e agent-browser screenshot /artifacts/screenshots/dashboard.png
|
|
144
|
+
docker exec openrig-e2e agent-browser screenshot --annotate /artifacts/screenshots/dashboard-annotated.png
|
|
145
|
+
|
|
146
|
+
# Navigate and verify specific surfaces
|
|
147
|
+
docker exec openrig-e2e agent-browser click @e4 # Open specs drawer (ref from snapshot)
|
|
148
|
+
docker exec openrig-e2e agent-browser wait 1000
|
|
149
|
+
docker exec openrig-e2e agent-browser screenshot /artifacts/screenshots/specs-drawer.png
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**ARM64 note:** The Dockerfile uses Debian's system chromium instead of Chrome for Testing, which is unavailable on Linux ARM64. The environment variables `AGENT_BROWSER_EXECUTABLE_PATH` and `AGENT_BROWSER_ARGS` are set in the image.
|
|
153
|
+
|
|
154
|
+
### 5. Test Scenarios
|
|
155
|
+
|
|
156
|
+
#### Control Plane Lifecycle
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Launch the multi-pod test spec
|
|
160
|
+
docker exec openrig-e2e rig up /workspace/control-plane-test.yaml --json
|
|
161
|
+
RIG_ID=$(docker exec openrig-e2e rig ps --json | jq -r '.[0].rigId')
|
|
162
|
+
|
|
163
|
+
# Verify topology
|
|
164
|
+
docker exec openrig-e2e rig ps --nodes --json
|
|
165
|
+
|
|
166
|
+
# Expand with a new pod
|
|
167
|
+
docker exec openrig-e2e rig expand "$RIG_ID" /workspace/expansion-pod-fragment.yaml --json
|
|
168
|
+
|
|
169
|
+
# Verify expansion
|
|
170
|
+
docker exec openrig-e2e rig ps --nodes --json
|
|
171
|
+
|
|
172
|
+
# Test validation rejection (colliding namespace)
|
|
173
|
+
docker exec openrig-e2e rig expand "$RIG_ID" /workspace/expansion-collision-fragment.yaml --json
|
|
174
|
+
# Should fail with namespace collision error, rig unchanged
|
|
175
|
+
|
|
176
|
+
# Snapshot
|
|
177
|
+
docker exec openrig-e2e rig down "$RIG_ID" --snapshot --json
|
|
178
|
+
|
|
179
|
+
# Restore and verify
|
|
180
|
+
SNAPSHOT_ID=$(docker exec openrig-e2e rig snapshot list "$RIG_ID" | awk 'NR==2 {print $1}')
|
|
181
|
+
docker exec openrig-e2e rig restore "$SNAPSHOT_ID" --rig "$RIG_ID"
|
|
182
|
+
|
|
183
|
+
# Export
|
|
184
|
+
docker exec openrig-e2e rig export "$RIG_ID" -o /artifacts/captures/exported-rig.yaml
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### UI Verification
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# After launching a rig, verify the graph renders
|
|
191
|
+
docker exec openrig-e2e agent-browser open http://127.0.0.1:7433
|
|
192
|
+
docker exec openrig-e2e agent-browser wait --load networkidle
|
|
193
|
+
docker exec openrig-e2e agent-browser snapshot -i
|
|
194
|
+
docker exec openrig-e2e agent-browser screenshot --annotate /artifacts/screenshots/graph-with-rig.png
|
|
195
|
+
|
|
196
|
+
# Open drawers and verify content
|
|
197
|
+
docker exec openrig-e2e agent-browser snapshot -i # Get fresh refs
|
|
198
|
+
# Click through specs drawer, discovery drawer, rig detail, etc.
|
|
199
|
+
# Take screenshots at each step
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 6. Cleanup
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
docker exec openrig-e2e rig daemon stop
|
|
206
|
+
docker exec openrig-e2e agent-browser close
|
|
207
|
+
docker stop openrig-e2e
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 7. Write Report
|
|
211
|
+
|
|
212
|
+
Copy the report template and fill it in:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
cp {SKILL_DIR}/templates/e2e-report-template.md /tmp/openrig-e2e-artifacts/report.md
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Fill in results as tests complete — do not batch findings for the end.
|
|
219
|
+
|
|
220
|
+
## Test Spec Templates
|
|
221
|
+
|
|
222
|
+
| Template | Purpose |
|
|
223
|
+
|----------|---------|
|
|
224
|
+
| `templates/control-plane-test.yaml` | Multi-pod terminal-only rig spec (backend + frontend, 3 nodes, cross-pod edges) |
|
|
225
|
+
| `templates/expansion-pod-fragment.yaml` | Pod fragment for expansion happy path (ops pod with cross-pod edge) |
|
|
226
|
+
| `templates/expansion-collision-fragment.yaml` | Pod fragment that intentionally collides — for validation rejection testing |
|
|
227
|
+
| `templates/e2e-report-template.md` | Structured test report template |
|
|
228
|
+
|
|
229
|
+
## Scripts
|
|
230
|
+
|
|
231
|
+
| Script | Purpose |
|
|
232
|
+
|--------|---------|
|
|
233
|
+
| `scripts/build-e2e-image.sh` | Build the Docker image from the repo (builds packages, packs tarball, builds image) |
|
|
234
|
+
| `scripts/Dockerfile` | The proven Dockerfile — Node 22, tmux, system Chromium, agent-browser, OpenRig CLI |
|
|
235
|
+
|
|
236
|
+
## Limitations
|
|
237
|
+
|
|
238
|
+
- **No live agent runtimes.** The container does not include claude-code or codex. Use `runtime: terminal` specs for control plane testing. Test live agent behavior on the host.
|
|
239
|
+
- **ARM64 browser workaround.** Chrome for Testing is unavailable on Linux ARM64. The Dockerfile uses Debian chromium. This is transparent to agent-browser commands.
|
|
240
|
+
- **No GPU/display.** All browser testing is headless. Screenshots and videos capture what a user would see, but there is no visible browser window.
|
|
241
|
+
|
|
242
|
+
## Combining with Host-Based Dogfood
|
|
243
|
+
|
|
244
|
+
For complete coverage, use both approaches:
|
|
245
|
+
|
|
246
|
+
| What to test | Where | Tool |
|
|
247
|
+
|-------------|-------|------|
|
|
248
|
+
| Install path, packaging | Container | This skill |
|
|
249
|
+
| CLI commands, lifecycle | Container | This skill |
|
|
250
|
+
| UI rendering, drawers | Container | This skill + agent-browser |
|
|
251
|
+
| Validation/error paths | Container | This skill |
|
|
252
|
+
| Live agent startup | Host | QA with /dogfood skill |
|
|
253
|
+
| Communication (send/capture) | Host | QA with live agents |
|
|
254
|
+
| Whoami from inside agent | Host | QA with live agents |
|
|
255
|
+
| Transcript capture | Host | QA with live agents |
|
|
256
|
+
| Chatroom with real participants | Host | QA with live agents |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# OpenRig Containerized E2E Testing Image
|
|
2
|
+
#
|
|
3
|
+
# Provides: Node 22, tmux, agent-browser (with system Chromium), OpenRig CLI
|
|
4
|
+
# Usage:
|
|
5
|
+
# 1. Build the CLI tarball: cd <repo>/packages/cli && npm pack
|
|
6
|
+
# 2. Copy tarball to build context as openrig-cli.tgz
|
|
7
|
+
# 3. docker build -t openrig-e2e .
|
|
8
|
+
# 4. docker run -it --rm --shm-size=1g -v /tmp/e2e-artifacts:/artifacts openrig-e2e
|
|
9
|
+
#
|
|
10
|
+
# ARM64 note: Chrome for Testing is unavailable on Linux ARM64.
|
|
11
|
+
# This image uses Debian's system chromium instead, pointed via
|
|
12
|
+
# AGENT_BROWSER_EXECUTABLE_PATH.
|
|
13
|
+
|
|
14
|
+
FROM node:22-bookworm
|
|
15
|
+
|
|
16
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
17
|
+
ENV AGENT_BROWSER_ARGS=--no-sandbox
|
|
18
|
+
ENV AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
19
|
+
ENV OPENRIG_HOME=/root/.openrig
|
|
20
|
+
|
|
21
|
+
RUN apt-get update \
|
|
22
|
+
&& apt-get install -y --no-install-recommends \
|
|
23
|
+
ca-certificates \
|
|
24
|
+
chromium \
|
|
25
|
+
curl \
|
|
26
|
+
git \
|
|
27
|
+
procps \
|
|
28
|
+
tmux \
|
|
29
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
30
|
+
|
|
31
|
+
RUN npm install -g agent-browser
|
|
32
|
+
|
|
33
|
+
COPY openrig-cli.tgz /tmp/openrig-cli.tgz
|
|
34
|
+
RUN npm install -g /tmp/openrig-cli.tgz \
|
|
35
|
+
&& rm /tmp/openrig-cli.tgz
|
|
36
|
+
|
|
37
|
+
WORKDIR /workspace
|
|
38
|
+
|
|
39
|
+
CMD ["/bin/bash"]
|
package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Build the OpenRig containerized E2E testing image.
|
|
3
|
+
#
|
|
4
|
+
# Usage: ./build-e2e-image.sh [repo-root]
|
|
5
|
+
# repo-root defaults to the current directory.
|
|
6
|
+
#
|
|
7
|
+
# Produces: Docker image tagged openrig-e2e:latest
|
|
8
|
+
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
REPO_ROOT="${1:-.}"
|
|
12
|
+
SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
13
|
+
BUILD_CTX="/tmp/openrig-e2e-build"
|
|
14
|
+
|
|
15
|
+
echo "=== Building OpenRig packages ==="
|
|
16
|
+
cd "$REPO_ROOT"
|
|
17
|
+
npm run build --workspace @openrig/daemon
|
|
18
|
+
npm run build --workspace @openrig/ui
|
|
19
|
+
npm run build --workspace @openrig/cli
|
|
20
|
+
bash scripts/build-package.sh
|
|
21
|
+
|
|
22
|
+
echo "=== Packing CLI tarball ==="
|
|
23
|
+
mkdir -p "$BUILD_CTX"
|
|
24
|
+
cd "$REPO_ROOT/packages/cli"
|
|
25
|
+
npm pack --pack-destination "$BUILD_CTX"
|
|
26
|
+
|
|
27
|
+
echo "=== Preparing Docker build context ==="
|
|
28
|
+
cp "$SKILL_DIR/scripts/Dockerfile" "$BUILD_CTX/Dockerfile"
|
|
29
|
+
# Rename tarball to a stable name
|
|
30
|
+
mv "$BUILD_CTX"/openrig-cli-*.tgz "$BUILD_CTX/openrig-cli.tgz"
|
|
31
|
+
|
|
32
|
+
echo "=== Building Docker image ==="
|
|
33
|
+
cd "$BUILD_CTX"
|
|
34
|
+
docker build -t openrig-e2e:latest .
|
|
35
|
+
|
|
36
|
+
echo "=== Done ==="
|
|
37
|
+
echo "Run: docker run -it --rm --shm-size=1g -v /tmp/openrig-e2e-artifacts:/artifacts openrig-e2e"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
version: "0.2"
|
|
2
|
+
name: control-plane-test
|
|
3
|
+
summary: >
|
|
4
|
+
Multi-pod terminal-only topology for containerized control-plane testing.
|
|
5
|
+
Exercises pods, cross-pod edges, expansion targets, and snapshot/restore
|
|
6
|
+
without requiring live coding runtimes.
|
|
7
|
+
|
|
8
|
+
pods:
|
|
9
|
+
- id: backend
|
|
10
|
+
label: Backend Team
|
|
11
|
+
members:
|
|
12
|
+
- id: api
|
|
13
|
+
runtime: terminal
|
|
14
|
+
agent_ref: "builtin:terminal"
|
|
15
|
+
profile: none
|
|
16
|
+
cwd: /tmp
|
|
17
|
+
- id: db
|
|
18
|
+
runtime: terminal
|
|
19
|
+
agent_ref: "builtin:terminal"
|
|
20
|
+
profile: none
|
|
21
|
+
cwd: /tmp
|
|
22
|
+
edges:
|
|
23
|
+
- kind: delegates_to
|
|
24
|
+
from: api
|
|
25
|
+
to: db
|
|
26
|
+
|
|
27
|
+
- id: frontend
|
|
28
|
+
label: Frontend Team
|
|
29
|
+
members:
|
|
30
|
+
- id: ui
|
|
31
|
+
runtime: terminal
|
|
32
|
+
agent_ref: "builtin:terminal"
|
|
33
|
+
profile: none
|
|
34
|
+
cwd: /tmp
|
|
35
|
+
edges: []
|
|
36
|
+
|
|
37
|
+
edges:
|
|
38
|
+
- kind: delegates_to
|
|
39
|
+
from: frontend.ui
|
|
40
|
+
to: backend.api
|
package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Containerized E2E Test Report
|
|
2
|
+
|
|
3
|
+
Date: {{DATE}}
|
|
4
|
+
Persona: {{PERSONA}}
|
|
5
|
+
Image: openrig-e2e:latest
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
- Tests run: {{TOTAL}}
|
|
10
|
+
- Passed: {{PASSED}}
|
|
11
|
+
- Failed: {{FAILED}}
|
|
12
|
+
- Skipped: {{SKIPPED}}
|
|
13
|
+
|
|
14
|
+
## Environment
|
|
15
|
+
|
|
16
|
+
- Node: {{NODE_VERSION}}
|
|
17
|
+
- tmux: {{TMUX_VERSION}}
|
|
18
|
+
- Chromium: {{CHROMIUM_VERSION}}
|
|
19
|
+
- OpenRig CLI: {{RIG_VERSION}}
|
|
20
|
+
- Platform: {{PLATFORM}}
|
|
21
|
+
|
|
22
|
+
## Test Results
|
|
23
|
+
|
|
24
|
+
### Install & Boot
|
|
25
|
+
|
|
26
|
+
| Test | Result | Notes |
|
|
27
|
+
|------|--------|-------|
|
|
28
|
+
| npm install -g | | |
|
|
29
|
+
| rig daemon start | | |
|
|
30
|
+
| rig preflight | | |
|
|
31
|
+
| rig doctor | | |
|
|
32
|
+
| UI loads in browser | | |
|
|
33
|
+
|
|
34
|
+
### Rig Lifecycle
|
|
35
|
+
|
|
36
|
+
| Test | Result | Notes |
|
|
37
|
+
|------|--------|-------|
|
|
38
|
+
| rig up (terminal-only spec) | | |
|
|
39
|
+
| rig ps / rig ps --nodes | | |
|
|
40
|
+
| Graph renders in browser | | |
|
|
41
|
+
| rig down --snapshot | | |
|
|
42
|
+
| rig restore | | |
|
|
43
|
+
| Restored nodes match | | |
|
|
44
|
+
|
|
45
|
+
### Expansion
|
|
46
|
+
|
|
47
|
+
| Test | Result | Notes |
|
|
48
|
+
|------|--------|-------|
|
|
49
|
+
| rig expand (happy path) | | |
|
|
50
|
+
| Graph updates after expand | | |
|
|
51
|
+
| ps --nodes shows new nodes | | |
|
|
52
|
+
| Expand with collision (rejected) | | |
|
|
53
|
+
| Rig unchanged after rejection | | |
|
|
54
|
+
|
|
55
|
+
### Snapshot/Restore with Expansion
|
|
56
|
+
|
|
57
|
+
| Test | Result | Notes |
|
|
58
|
+
|------|--------|-------|
|
|
59
|
+
| Snapshot captures expanded pods | | |
|
|
60
|
+
| Restore brings back expanded pods | | |
|
|
61
|
+
| Cross-pod edges survive restore | | |
|
|
62
|
+
| Export includes expanded topology | | |
|
|
63
|
+
|
|
64
|
+
### CLI Surface
|
|
65
|
+
|
|
66
|
+
| Test | Result | Notes |
|
|
67
|
+
|------|--------|-------|
|
|
68
|
+
| rig specs ls | | |
|
|
69
|
+
| rig specs show | | |
|
|
70
|
+
| rig config | | |
|
|
71
|
+
| rig whoami (daemon down) | | |
|
|
72
|
+
| rig export | | |
|
|
73
|
+
|
|
74
|
+
### UI Surface (agent-browser)
|
|
75
|
+
|
|
76
|
+
| Test | Result | Notes |
|
|
77
|
+
|------|--------|-------|
|
|
78
|
+
| Dashboard renders | | |
|
|
79
|
+
| Explorer sidebar | | |
|
|
80
|
+
| Specs drawer opens | | |
|
|
81
|
+
| Discovery drawer opens | | |
|
|
82
|
+
| System drawer opens | | |
|
|
83
|
+
| Rig detail drawer | | |
|
|
84
|
+
| Node detail in graph | | |
|
|
85
|
+
|
|
86
|
+
## Bugs Found
|
|
87
|
+
|
|
88
|
+
(Append each bug as discovered — do not batch)
|
|
89
|
+
|
|
90
|
+
## Artifacts
|
|
91
|
+
|
|
92
|
+
- Screenshots: /artifacts/screenshots/
|
|
93
|
+
- Videos: /artifacts/videos/
|
|
94
|
+
- CLI transcript: /artifacts/cli-transcript.txt
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This fragment intentionally collides with the existing 'backend' pod.
|
|
2
|
+
# Use it to verify that expansion validation rejects namespace collisions
|
|
3
|
+
# and leaves the rig unchanged.
|
|
4
|
+
pod:
|
|
5
|
+
id: backend
|
|
6
|
+
label: Colliding Pod
|
|
7
|
+
members:
|
|
8
|
+
- id: worker
|
|
9
|
+
runtime: terminal
|
|
10
|
+
agent_ref: "builtin:terminal"
|
|
11
|
+
profile: none
|
|
12
|
+
cwd: /tmp
|
|
13
|
+
edges: []
|