feat(opencode): the OpenCode harness, checked against its goldens

The tool source generated from the schema, the home with its view, the
shared and per-process environments, the permission rules, the commands,
the warm-up under the supervisor, the event stream and the
classification, its patterns as hand-written scanners. The goldens record
the answer for each, a warm-up against a fake opencode included.

A timed-out supervised command now gets SIGTERM, so the supervisor takes
its tree down (SIGKILL 10 s later); any other child gets SIGKILL. :Json
gains DumpCompact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-10-31 08:32:51 +01:00
commit 5253fe3aff
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
10 changed files with 1946 additions and 7 deletions

View file

@ -81,7 +81,9 @@ export namespace Crafter::Review::Process {
// A command run to its end with both outputs captured: stdin from
// `input`, or /dev/null; both outputs read as they come, so neither can
// fill its pipe and stall the child. With a timeout the child is killed
// when it runs out, and timedOut is set.
// when it runs out, and timedOut is set; a supervised command (Supervised)
// gets SIGTERM, so the supervisor takes its tree down, and SIGKILL 10 s
// later if it is still there.
struct Captured {
std::int32_t returnCode = -1;
std::string out;