# Disposable CLI verification / 一次性 CLI 复核

Evidence recorded 2026-09-05 UTC: **n8n 2.37.10, Node v24.20.0, macOS arm64**, internal JavaScript task runner. The website and native policy tests remain on Node 22. This is not a production install recipe: the tested n8n version warns that non-container operation is deprecated. Use [official deployment guidance](https://docs.n8n.io/deploy/host-n8n/install-options/install-with-docker) for operational deployment.

## Preconditions

- Separately authorize a local test and use an already installed, trusted, version-pinned n8n executable with its required Node version. Do not install into this website, change global Node, start someone else's Docker daemon or reuse a real n8n data directory.
- Review the three-node JSON before running it. Only the shipped synthetic fixtures are authorized here. No credentials, model, destination, schedule or external-write nodes.
- Keep HOME unchanged. Use a newly created private directory for `N8N_USER_FOLDER`; n8n creates its `.n8n` inside it. Do not read/publish generated config or encryption keys. Temporary paths isolate data, not malicious code.
- Start from an environment with no inherited application credentials or Node preload options. Disable diagnostics, version notifications, personalization, templates and automatic license renewal. These settings are **not a network sandbox**.
- Use unused loopback-only broker ports. On conflict, stop; do not kill processes by port. Stop only processes you started, and retain or separately review the exact temporary directory rather than using a cleanup glob or `$HOME`.

## Commands used and the ID distinction

The ordinary command `n8n import:workflow --input=workflow.json` failed in this version with a missing workflow ID. The `--separate` importer generates a fresh ID for each ID-free file. The successful input directory contained **exactly one unchanged copy** of `workflow.json` — not `fixtures.json` or the oracle. Do not add a reusable fixed ID: imports with existing IDs can overwrite workflows.

The following command contract assumes the isolated environment above is already configured and `n8n` refers to the approved n8n 2.37.10 installation:

```sh
n8n --version
# INPUT_DIR contains only the unchanged workflow.json.
n8n import:workflow --separate --input="$INPUT_DIR"
n8n export:workflow --all --output="$EXPORT_FILE"
# Inspect the export BEFORE execution; set WORKFLOW_ID from its sole record.
n8n execute --id="$WORKFLOW_ID" --rawOutput > "$PRIVATE_EXECUTION_LOG" 2>&1
```

The recorded check used a whitelist child environment, `N8N_USER_FOLDER` beneath its disposable directory, `N8N_HOST`/`N8N_LISTEN_ADDRESS=127.0.0.1`, internal runners and a loopback broker. It imposed a 180-second parent timeout and retained only owned process IDs. It did not run these commands against an existing account or production service. These placeholders are not a complete environment setup; do not paste them into an unisolated shell.

## Acceptance, not merely exit zero

1. Import and export must exit successfully. The export must contain exactly one workflow, with nodes, connections and original settings equal to the input; no credentials, `active: false`, `activeVersionId: null`.
2. Extract the final execution object from the CLI log; initialization diagnostics may surround the JSON even with `--rawOutput`. Require `finished: true`, `status: "success"`, no result error, and last node `Review Only - Never Send`.
3. Extract `data.resultData.runData["Review Only - Never Send"]` final run → `data.main[0]`. Compare **all fields of all 12 items**, including `pairedItem`, to `expected-output.json` in order. Do not compare only a count or screenshot.
4. Require 2 `draft_for_review`, 1 `needs_information`, 3 `policy_review`, 6 `invalid_input`, and every item `requiresHumanReview: true`, `sendAllowed: false`.
5. Save only the synthetic final array as `runtime-output.json`; record versions, UTC time, input/oracle/output SHA-256 and limitations in `runtime-evidence.json`. Never copy the n8n config, database, environment or full execution log into the public repository. Rerun real execution if the workflow changes; a recomputed hash is not a rerun.

The checked output matched exactly. The native test suite subsequently checks that the **stored evidence** still corresponds to these files; that test does not launch n8n or independently attest an execution.

## What did not pass / 未验证部分

The editor HTTP root returned 404 despite a ready CLI server in this npm installation. **No graphical import, editor execution or version-independent UI compatibility was established.** The owned editor process was stopped. A missing Python-runner virtual environment was reported; only JavaScript was exercised. No owner signup, external credentials, model, email, CRM, real customer record, human approval or business result was used.

中文：成功的是独立临时实例中的官方 `--separate` 导入、导出与 CLI 实际执行。输入文件未改动，由导入器生成新 ID；12 条输出及配对逐字段等于独立预期。单文件 CLI 导入失败和 GUI 404 都保留为边界，不能写成通用兼容证明。所有结果仍是合成草稿，不能发送，也不表示任何人已经审核。

## Official references

- [Server CLI commands](https://docs.n8n.io/hosting/cli-commands/)
- [Deployment environment variables](https://docs.n8n.io/hosting/configuration/environment-variables/deployment/)
- [Task-runner environment variables](https://docs.n8n.io/hosting/configuration/environment-variables/task-runners/)
- [Code node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)

The `--separate` ID behavior was also inspected in the **installed 2.37.10** importer, not assumed for every n8n version. Documentation describes interfaces; the retained versioned execution establishes this bounded result.
