fix: pin native exports to stage execution service

This commit is contained in:
2026-10-20 21:46:42 +01:00
parent 1f867d4827
commit bb98bde4fc
20 changed files with 420 additions and 74 deletions
@@ -0,0 +1,23 @@
# Stage export uses the execution service
V2 stage admission reads the existing local CLI service registration and pins
every `opencode api` subprocess with `--server` and private inherited auth.
Missing registration fails closed; stage execution does not provision a service.
The chat broker's `PIPELINES_OPENCODE_ENDPOINT` and password-file overrides do
not select stage execution or export.
Both agent and tracked generation ownership callbacks retain a private reference
containing the endpoint identity, execution directory, and credential-file path,
not a password. Export and restart interruption resolve that exact file and
refuse an endpoint identity change. Export also checks the recorded directory.
Credentials remain in OpenCode's owner-only service registration, not the run
database or protocol evidence. No export uses the size-truncating V2 CLI fallback.
Historical owners without a reference can read only the existing local service
registration, never the chat override. Their original service identity cannot be
reconstructed if that registration has since changed; an unavailable session
remains failed/pending evidence rather than being recreated or replayed.
Isolated HTTP A/B tests cover endpoint separation, authenticated export,
reference recovery, wrong credentials and changed endpoints. Fake-CLI tests
cover matching endpoint/auth/directory and ownership before prompt admission.