docs: add rpc cli smoke runbook
This commit is contained in:
@@ -44,6 +44,8 @@ implementation plans are kept for context, not as active instructions.
|
|||||||
|
|
||||||
- [`wf_cli.md`](wf_cli.md): workflow platform CLI commands, output formats,
|
- [`wf_cli.md`](wf_cli.md): workflow platform CLI commands, output formats,
|
||||||
lifecycle flow, and common diagnostics.
|
lifecycle flow, and common diagnostics.
|
||||||
|
- [`runbooks/rpc-cli-smoke.md`](runbooks/rpc-cli-smoke.md): bounded
|
||||||
|
end-to-end smoke test for `wf-rpc-server` plus remote `wf` CLI.
|
||||||
|
|
||||||
## MCP Platform
|
## MCP Platform
|
||||||
|
|
||||||
|
|||||||
@@ -40,11 +40,13 @@ clear operator feedback before adding more architecture.
|
|||||||
- Completed: `wf draft delete <workspace_id> --confirm` exposes existing draft
|
- Completed: `wf draft delete <workspace_id> --confirm` exposes existing draft
|
||||||
workspace deletion as a safe CLI command. Implementation:
|
workspace deletion as a safe CLI command. Implementation:
|
||||||
[`wf draft delete CLI/RPC`](historical/superpowers/plans/2026-06-09-wf-draft-delete-cli-rpc.md).
|
[`wf draft delete CLI/RPC`](historical/superpowers/plans/2026-06-09-wf-draft-delete-cli-rpc.md).
|
||||||
|
- Completed: bounded RPC CLI smoke runbook with cleanup commands:
|
||||||
|
[`RPC CLI smoke runbook`](runbooks/rpc-cli-smoke.md).
|
||||||
- Next docs/ergonomics cleanup: explain raw MCP content-block envelopes returned
|
- Next docs/ergonomics cleanup: explain raw MCP content-block envelopes returned
|
||||||
by `cap call`, and only add a text-unwrapping CLI option if the safe behavior
|
by `cap call`, and only add a text-unwrapping CLI option if the safe behavior
|
||||||
is explicitly defined.
|
is explicitly defined.
|
||||||
- Future smoke automation: turn the manual RPC CLI smoke sequence into a small
|
- Future smoke automation: turn the manual RPC CLI smoke runbook into a small
|
||||||
runbook or script once the cleanup commands exist.
|
script once the command sequence stabilizes.
|
||||||
- Keep status read-only; do not mutate registry, auth, config, or stores.
|
- Keep status read-only; do not mutate registry, auth, config, or stores.
|
||||||
|
|
||||||
## Priority 2: Durable Run/Resume Hardening
|
## Priority 2: Durable Run/Resume Hardening
|
||||||
|
|||||||
@@ -0,0 +1,138 @@
|
|||||||
|
# RPC CLI Smoke Runbook
|
||||||
|
|
||||||
|
Use this runbook to verify the product path:
|
||||||
|
|
||||||
|
```text
|
||||||
|
wf CLI -> wf_transport_rpc_http -> wf_server -> wf_api -> wf_core / stores / sources
|
||||||
|
```
|
||||||
|
|
||||||
|
This is a bounded smoke test, not a load test. Keep outputs compact and avoid
|
||||||
|
dumping raw upstream MCP resource payloads into terminal logs or agent context.
|
||||||
|
Some MCP servers can return huge base64 image/resource blocks.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Start the server in another terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf-rpc-server --config wf.config.json --host 127.0.0.1 --port 8765
|
||||||
|
```
|
||||||
|
|
||||||
|
This runbook assumes `wf.config.json` has:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"target": {
|
||||||
|
"kind": "rpc_http",
|
||||||
|
"url": "http://127.0.0.1:8765/rpc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also keep local config unchanged and pass
|
||||||
|
`--url http://127.0.0.1:8765/rpc` on every `wf` command.
|
||||||
|
|
||||||
|
## Output Safety Rules
|
||||||
|
|
||||||
|
- Prefer `--format compact` or `--format ids` for list commands.
|
||||||
|
- Do not call arbitrary resource-heavy MCP capabilities during smoke.
|
||||||
|
- Do not inspect or print raw MCP resources unless the URI is known to be small.
|
||||||
|
- Keep trace reads bounded with `--limit`.
|
||||||
|
- If a command returns a huge `content`/`resource`/base64 field, stop and add a
|
||||||
|
safer CLI output mode before repeating it.
|
||||||
|
|
||||||
|
## 1. Server Status
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json status
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- `target.mode` is `remote`.
|
||||||
|
- Source/capability counts are nonzero for an MCP-backed server.
|
||||||
|
- Errors, if any, are compact CLI errors unless `--verbose` is used.
|
||||||
|
|
||||||
|
## 2. Bounded Discovery
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json source list --format compact
|
||||||
|
uv run wf --config wf.config.json cap list --source wf.std --format ids
|
||||||
|
uv run wf --config wf.config.json cap inspect wf.std.constant
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- `source list` includes `wf.std`.
|
||||||
|
- `cap list --source wf.std --format ids` returns bounded identifiers.
|
||||||
|
- `cap inspect wf.std.constant` shows the capability contract.
|
||||||
|
|
||||||
|
## 3. Direct Capability Call
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json cap call wf.std.constant --input '{"value":"smoke"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- `outcome` is `ok`.
|
||||||
|
- Output is small and machine-readable.
|
||||||
|
|
||||||
|
Avoid using arbitrary MCP tools here unless their output shape is known. MCP
|
||||||
|
content-block envelopes can be large and should not be treated like compact
|
||||||
|
workflow output.
|
||||||
|
|
||||||
|
## 4. Draft -> Artifact -> Deployment -> Run
|
||||||
|
|
||||||
|
Use unique ids so repeated runs do not collide:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json draft create-from-capability smoke_ws wf.std.constant --name smoke_constant --title "Smoke Constant"
|
||||||
|
uv run wf --config wf.config.json draft validate smoke_ws
|
||||||
|
uv run wf --config wf.config.json draft save smoke_ws --artifact smoke_artifact --version 1 --title "Smoke Artifact" --outcome ok --binding wf.std=wf.std
|
||||||
|
uv run wf --config wf.config.json deploy save smoke_deploy --artifact smoke_artifact --version 1 --binding wf.std=wf.std
|
||||||
|
uv run wf --config wf.config.json deploy validate smoke_deploy
|
||||||
|
uv run wf --config wf.config.json run start smoke_deploy --input '{"value":"from workflow"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- Draft validation is `valid`.
|
||||||
|
- Deployment validation is runnable.
|
||||||
|
- Run result has `outcome: "ok"`.
|
||||||
|
- Capture the returned `run_id` for the trace step.
|
||||||
|
|
||||||
|
## 5. Inspect And Bounded Trace
|
||||||
|
|
||||||
|
Replace `run_...` with the id returned by `run start`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json run inspect run_...
|
||||||
|
uv run wf --config wf.config.json run trace run_... --from 0 --limit 10
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- Inspect returns the run summary and output.
|
||||||
|
- Trace returns a bounded number of frames.
|
||||||
|
|
||||||
|
## 6. Cleanup
|
||||||
|
|
||||||
|
Delete in dependency order: deployment first, then artifact, then draft.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run wf --config wf.config.json deploy delete smoke_deploy
|
||||||
|
uv run wf --config wf.config.json artifact delete smoke_artifact 1 --confirm
|
||||||
|
uv run wf --config wf.config.json draft delete smoke_ws --confirm
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected:
|
||||||
|
|
||||||
|
- Deployment delete succeeds.
|
||||||
|
- Artifact delete returns `deleted: true`.
|
||||||
|
- Draft delete returns `deleted: true`.
|
||||||
|
|
||||||
|
If artifact delete returns `deleted: false` with `blocked_by_deployments`, delete
|
||||||
|
the listed deployments and retry.
|
||||||
@@ -75,6 +75,10 @@ wf --url http://127.0.0.1:8765/rpc cap list
|
|||||||
wf --url http://127.0.0.1:8765/rpc admin registry list
|
wf --url http://127.0.0.1:8765/rpc admin registry list
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For a bounded end-to-end product check, use the
|
||||||
|
[`RPC CLI smoke runbook`](runbooks/rpc-cli-smoke.md). It keeps list/trace output
|
||||||
|
small and avoids dumping arbitrary MCP resource payloads.
|
||||||
|
|
||||||
`--mcp-config` owns the server's workflow stores, MCP connections, and source
|
`--mcp-config` owns the server's workflow stores, MCP connections, and source
|
||||||
registry. `--store-root` is for the local/static server path and cannot be
|
registry. `--store-root` is for the local/static server path and cannot be
|
||||||
combined with `--mcp-config`.
|
combined with `--mcp-config`.
|
||||||
@@ -176,6 +180,11 @@ target selection as the rest of the CLI and returns a normalized outcome,
|
|||||||
output, source id, and diagnostics. Use it to confirm payload shape and upstream
|
output, source id, and diagnostics. Use it to confirm payload shape and upstream
|
||||||
source reachability before spending time on a draft workspace.
|
source reachability before spending time on a draft workspace.
|
||||||
|
|
||||||
|
Be careful with raw MCP capabilities: some tools/resources can return large
|
||||||
|
content-block envelopes, including base64 payloads. Prefer known-small smoke
|
||||||
|
capabilities such as `wf.std.constant` unless you explicitly need to test a
|
||||||
|
specific upstream source.
|
||||||
|
|
||||||
## Draft Workspaces
|
## Draft Workspaces
|
||||||
|
|
||||||
Create a draft from a capability:
|
Create a draft from a capability:
|
||||||
|
|||||||
Reference in New Issue
Block a user