47 lines
2.1 KiB
Markdown
47 lines
2.1 KiB
Markdown
# Named native scenario format
|
|
|
|
Scenario files use these top-level fields:
|
|
|
|
```yaml
|
|
name:
|
|
purpose:
|
|
preconditions:
|
|
build_lane:
|
|
package:
|
|
binary:
|
|
fixture:
|
|
steps:
|
|
assertions:
|
|
evidence:
|
|
cleanup:
|
|
invalidates:
|
|
```
|
|
|
|
`package` and `binary` are optional and default to `editor`. Focused tools such as the UI gallery
|
|
can therefore use the same exact-window evidence and cleanup workflow without launching a project.
|
|
|
|
Keep steps deterministic and phrased as user actions. Assertions describe visible behavior, state transitions, persistence, and failure recovery. Evidence names the target window/crop and expected files. Cleanup must identify every spawned process and fixture mutation.
|
|
|
|
The runner exposes the scenario instead of pretending manual interactions are automated:
|
|
|
|
```bash
|
|
bash scripts/codex/native_qa.sh plan <scenario>
|
|
bash scripts/codex/native_qa.sh launch <scenario>
|
|
bash scripts/codex/native_qa.sh attach <scenario> <existing-editor-pid>
|
|
bash scripts/codex/native_qa.sh capture <scenario> <runner-pid>
|
|
bash scripts/codex/native_qa.sh record <scenario> <assertion-index> pass|fail [note]
|
|
bash scripts/codex/native_qa.sh status <scenario>
|
|
bash scripts/codex/native_qa.sh close <scenario> <runner-pid>
|
|
bash scripts/codex/native_qa.sh restore <scenario> --dry-run
|
|
bash scripts/codex/native_qa.sh restore <scenario> --apply
|
|
```
|
|
|
|
`launch` snapshots a workspace-contained regular-file fixture before the editor starts; `attach`
|
|
does the same while reusing an existing editor and never closes that user-owned process. `restore --apply`
|
|
prints and flushes the baseline/current hash plan, refuses to run while the recorded process
|
|
is alive, validates the snapshot hash, and restores atomically. A scenario is accepted only when all
|
|
named assertions are recorded as passing and the required evidence exists; visual interaction remains
|
|
user-controlled unless explicitly delegated.
|
|
|
|
Recurring scenario families include Content Browser item/empty-space menus, multi-selection, destination-first import, move/reference repair, duplicate/undo/derived cleanup, material-slot assignment/inheritance, DefaultGrid Forward/Solari, and package launch.
|