Skip to content

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:

bash
scripts/e2e-demo-simple-project.sh

That script:

  • Creates a fresh temporary standalone workspace under .tmp/e2e-demo-simple/ (isolated from the hpilot repository state).
  • Runs hpilot init inside that workspace.
  • Initializes a Git repository (when available).
  • Prints the exact cd and hpilot commands 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_tasks even when routes have no injections, because required_tasks enforcement 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 Plan stage the adapter is a pass-through; contract artifacts are still emitted for downstream stages.
  • Falls back gracefully when hpilot.yaml is 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.