Make Pipelines Docker-only with OpenCode and Pi

Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers.

Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent.

Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
This commit is contained in:
2026-10-11 23:00:25 +01:00
parent c42a19f7d3
commit 05ae530442
131 changed files with 9297 additions and 355 deletions
+42 -2
View File
@@ -55,8 +55,9 @@ inspect <run-id> --json` and the TUI evidence section expose these records.
OpenCode CLI failures include the HTTP status when supplied, process exit code,
and a recognized safe error category (such as session not found or service
unavailable). Arbitrary stderr, provider messages and response bodies are not
copied into the diagnostic. A `/wait` command failure is not evidence that the
agent prompt failed to start, and does not trigger replay of stage work.
copied into the diagnostic. A failed V2 active-session poll (or native V1 `/wait`)
is not evidence that the agent prompt failed to start, and does not trigger replay
of stage work.
Native `StructuredOutputError` is named directly, rather than reduced to a generic
command failure. Native HTTP evidence records the actual HTTP operation/status;
an `exit_code` of -1 there is explicitly marked as not a subprocess exit.
@@ -67,6 +68,45 @@ workaround is read-only CLI `opencode export`. The exported session ID must matc
the requested ID. Nothing is rewritten or removed from the database/history.
Debug receives the original messages plus a note identifying that recovery path.
## Failure diagnostics and confirmed limits
Retained stage failures distinguish two fixed, sanitized categories in the step
diagnostic:
- **FINAL RESULT VALIDATION** for a strictly invalid final result, with the stage
key and the precise parser detail (for example `duplicate JSON field "score"` or
`invalid character 'z' after object key:value pair at byte N`). It states that
completed edits/tool side effects are retained and not undone, and that a full
retry repeats work.
- **HARNESS TRANSPORT** for request, V2 active-session poll and final-readback
failures, including the sanitized `malformed or incomplete` readback message.
A structured-output validation failure is never reported as a harness transport
failure, and vice versa. Neither label includes a provider response body, prompt,
credential or arbitrary model content. Duplicate nested fields are rejected by
strict parsing rather than merged or last-wins, and only a lossless insertion of
missing commas/colons or trailing closers is repaired, so an unknown evidence or
verdict value can never become `success` and admitted tool work is never replayed.
Confirmed ordinary-endpoint failures (2026-10-11): an all-history readback returned
exactly 262144 bytes of incomplete JSON (`invalid agent messages`); a reviewer
result was rejected for a duplicate nested `performance_review` field; and an
onboarding visual-review result failed with `invalid character 'z' after object
key:value pair at byte 3968`, where unsafe lossless repair was correctly rejected.
These are source-level findings covered by mocked `internal/stage` fixtures. An
updated checkout or installed skill is **not** evidence that a user's running
server contains the fix; deploying/restarting is a separate authorized action.
OpenCode V2's published prompt/generate API does not accept a structured-output
field, so a prose `output_contract` does **not** enforce structured output: V2
results are validated locally by strict parsing only, and no unsupported V2 format
field is sent. A review-only fresh execution that could re-derive a failed verdict
without replaying the admitted tool-using stage's edits is a future improvement and
is **not implemented**. Two items remain unresolved and must not be reported
complete: a macOS fixture path-spelling mismatch (`/var/folders` versus
`/private/var/folders` are the same real directory) in
`scripts/test_setup_harness.py`, and onboarding UI visual approval.
## Optional machine-readable restrictions
`tools` enables actions per stage. A stage can narrow edit paths and shell