Tests deliberately distinguish three kinds of evidence:
- Contract tests with a simulated vendor: requests, auth substitution, provider selection, text, SSE completion, tool results, failures, truncation, private exports and configuration preservation.
- Actual installed programs with a simulated vendor: pinned Magpie translation and native adapter restoration, plus Claude Code, Codex, OpenClaw and Hermes single-turn runs in temporary homes.
- Actual provider/model/client tests: require an explicitly supplied test key. Fixture success is not evidence that the remote API, model permissions, budget, tool semantics or every client works.
python -m pip install -e . -r requirements-dev.txt
python -m unittest discover -v
ruff check .
ruff format --check .
python -m build
For the actual Magpie engine, install the pinned binary, then set
ITERACONNECT_TEST_MAGPIE_BIN to its absolute path:
itera-connect install-magpie
ITERACONNECT_TEST_MAGPIE_BIN=/absolute/path/to/magpie python -m unittest tests.test_magpie.MagpieTests -v
ITERACONNECT_TEST_NATIVE=1 python -m unittest tests.test_magpie.NativeClientTests -v
No model key is needed for these tests. The opt-in native suite uses existing executables, temporary HOME/XDG/config directories, a synthetic key and a local fixture vendor. No existing user credentials or installed skills are copied. OpenClaw channel delivery is never enabled. Only clients actually installed are executed. An unavailable program is reported as unavailable. Magpie tests verify connection and restoration of Claude Code, Codex, WorkBuddy, OpenClaw and Hermes configs; WorkBuddy application execution is separate evidence; the independent native-settings suite can also run installed Hermes.
Use a dedicated developer key. Fill api_key in ignored agent-connect.local.toml, run
python3 start.py, then click Reload if you edited the file after launch. Select the provider,
model and client, and click Test API. This tests that client's native protocol. Click Native
client test to exercise an installed Claude Code, Codex, OpenClaw or Hermes in an isolated temporary
home using configuration generated by the new independent adapter, without copying user
settings/logins. WorkBuddy explicitly requests manual acceptance in the original app. Hermes 0.23.1 supports automatic JSONL acceptance; the isolated profile gateway is stopped afterward.
tests.test_app covers private settings, no inherited-key fallback, redacted management APIs,
Host/Origin/control-token enforcement, local-fixture probes, independent configuration
preservation, reconnect, exact restoration and protection against later edits. The opt-in
NativeSettingsClientTests reads these new native configs with the installed actual clients.
Use a temporary HOME/config directory and a local fixture vendor; do not connect the UI test instance to daily client settings. The 2026-11-17 UI regression covered:
- Desktop at the normal browser viewport, and a 390 px narrow viewport without horizontal overflow.
- Radio selection using arrow keys, protocol mismatch disabling connection and tests, and its settings link.
- Duplicate provider validation, cancellation, and custom model discovery with no model or saved draft.
- Automatic save/connect for a custom provider, independent text/SSE/tool result cards, and exact restore.
- Clearing stale results when selections change, and copyable manual export with no vendor key.
tests.test_app additionally verifies that successful and failed draft catalog requests preserve
the private file, selected provider and live credentials, and remove temporary credential references.
Screenshot result cards in the README use the simulated vendor; they are not new real-provider evidence.
Frontend development checks (Node is only needed for development):
node --check src/iteraconnect/web/app.js
npx --yes prettier@3.6.2 --check src/iteraconnect/web/index.html src/iteraconnect/web/app.css src/iteraconnect/web/app.js
The advanced CLI uses separate JSON profiles and environment variables, as described in
advanced.md. No keys belong in issues, PRs, screenshots or committed files. Runtime
reports under reports/ and .env files are ignored. The relay's process must receive the key;
setting it only in a second terminal cannot update a running relay's environment.
Start itera-connect up --web, then use the exact authorized model ID from models:
itera-connect models
itera-connect probe --model Auto --via gateway --out reports/gateway.json
itera-connect probe --model Auto --via magpie --protocol chat --protocol responses --protocol anthropic --out reports/magpie.json
itera-connect smoke claude codex openclaw --model Auto --via magpie --out reports/clients.json
Each full probe makes four requests per protocol: one text response, one SSE response, and two
requests for a tool call/result round trip. The default output budget is 256 tokens per request;
--budget adjusts it (32–8192). Reasoning models may need more. Default protocol selection tests
the three conversational protocols advertised by the provider. Pass all three --protocol
arguments explicitly to test conversion from a Chat-only source through Magpie.
The probe never executes arbitrary model tools; its sole tool returns a fixed code. It checks the tool name/arguments and preserves full assistant output, including Messages thinking and signature blocks, in the follow-up request. SSE tests require output and a protocol terminal event and reject errors, incomplete responses and truncated streams.
smoke tests an installed client's actual process, using a temporary config/home and safe
single-turn prompt. It reports passed, failed, not-installed or manual-required.
Skipped/manual clients do not make the aggregate CLI command successful. It suppresses arbitrary
client output in saved reports, which can otherwise contain private context or credentials.
For WorkBuddy, connect from the simple UI, restart the app, start a new task, select
custom-local:iteracompute/<model> and ask for the fixed reply. The advanced Magpie workflow
instead uses iteraconnect-iteracompute/<model>. Then use a disposable workspace and ask
it to create/read a small text file to exercise its real tool loop. Record app version, model,
result and a redacted screenshot. Repeat with WorkBuddy AI if supporting the international build.
For Hermes, install its CLI, connect from the simple UI, start a fresh session, select the connected provider and ask for the reply and a disposable-file tool round trip. Disconnect and confirm its previous provider returns. Automatic Hermes one-turn acceptance uses 0.23.1 stream-json output, disables all CLI toolsets, ignores injected rules and uses a temporary home. It stops the temporary profile gateway afterward. The independent plain-YAML editor and optional Magpie adapters are additionally checked as configuration tests; those alone are not proof of inference.
For CC Switch, open each generated import link in the desktop app, confirm the endpoint and protocol, import, switch to the provider, then execute the relevant native client. WorkBuddy provider links are unsupported upstream and must use Magpie's adapter or the native CC Switch UI. Do not report a generated link alone as a completed desktop integration test.
For each real client, also verify a tool call/result loop, streaming, a permission or bad-key failure, and disconnect/restore behavior. The automated single-turn native smoke is only the first part of acceptance; the API tool round-trip is not a substitute for each client's tool loop.