Testing hpilot
Audience: Users — Pipeline operators trying the mock harness and testing the daemon.
Use a disposable project to try a pipeline and inspect its results.
OpenCode V2 acceptance
The OpenCode operator guide covers setup. The verification report describes the native and real-provider checks.
Smoke Tests and Demos
Standalone Scaffold Demo
For a quick first run using the standalone simple scaffold, you can use:
scripts/e2e-demo-simple-project.shThat script:
- Creates a fresh temporary standalone workspace under
.tmp/e2e-demo-simple/(isolated from thehpilotrepository state). - Runs
hpilot initinside that workspace. - Initializes a Git repository (when available).
- Prints the exact
cdandhpilotcommands to run.
Mock Adapter (harness: mock)
When harness: mock is set in the active global config, the pipeline uses the built-in mock adapter instead of launching an external harness. The adapter completes every stage with a zero-exit process and:
- Emits contract artifacts for stages that have a contract with field-injection routes (e.g.
Review Plan,Review Code). The status value is the first route key from the loaded config. - Also emits contract artifacts for stages with
contract.required_taskseven when routes have no injections, becauserequired_tasksenforcement needs the artifact. - Does not emit contract artifacts for routing-only stages — stages whose routes all redirect to other stages without injected fields and without
required_tasks. - Does not generate planning artifacts (spec.md, plan.md, tasks.md). Planning artifacts must be provided externally — e.g., pre-written by the smoke test script or seeded in test fixtures. On the
Planstage the adapter is a pass-through; contract artifacts are still emitted for downstream stages. - Falls back gracefully when
hpilot.yamlis absent or malformed, skipping contract artifact emission rather than raising.
Unix daemon verification
Allocate short disposable workspaces with scripts/unix-daemon-review-fixture.sh setup, then use its recorded launch and cleanup handles as documented in Testing and development. Verify that two default workspaces are simultaneously reachable through distinct 0600 sockets while an owned dummy process occupies TCP 8765, and confirm no hpilot TCP listener exists. Repeat command protocol cases with explicit TCP and verify there is exactly one daemon listener in either mode.