You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No routes exist for credential entry/status; the Company Compute connect path (validate → save → status, one round trip) has no server surface.
Approach
A connections module in the fork server registered beside the existing amicode route block: submit-credential (POST body; Company Compute card first) runs the probe classification and writes through the #162 seam, returning terminal status in the same round trip; status (GET) renders through a redacting whitelist parser with a validating overlay; disconnect and revalidate round out the lifecycle; mutation routes refuse to serve on non-loopback binds. Auth enforced per #163. Demoable via curl under standalone serve. Code lands in the vendored fork (opencode repo).
Acceptance Criteria
A valid key POSTed → credential written via the seam + connected returned in the same round trip (stubbed solve service).
Probe classification honored: authorizer-rejection class → invalid, nothing written; server-error/network class → unreachable, nothing written; auth-passed classes → valid (the parent's probe contract).
The status route can never emit secret material: a poison test seeds a token into every status input and asserts absence from the response.
Disconnect clears the credential and status becomes needs-key; revalidate refreshes the validation timestamp without the secret riding the request.
When the server is bound beyond loopback, mutation routes refuse with a distinct error (simulated bind config).
The full lifecycle passes under standalone serve — route-level tests with no extension host involved.
Testing Decisions
Fork server route tests in the existing httpapi test idiom; a local stub stands in for the solve service; reuses #162's store test doubles — extends #162's test surface for write-path assertions.
Key Decisions
Probe target is the fake-task status route (parent contract: authorizer rejects bad keys before the handler; good keys reach the handler's not-found/forbidden).
Secrets ride POST bodies only — never query params, never URLs.
Status lifecycle states per the parent's data contract (including validating in-flight).
Source
Part of #159 · ADR 0002 (PR #158) · Blocked by: #162, #163 · Lands in: opencode fork
Important
Problem
No routes exist for credential entry/status; the Company Compute connect path (validate → save → status, one round trip) has no server surface.
Approach
A connections module in the fork server registered beside the existing amicode route block: submit-credential (POST body; Company Compute card first) runs the probe classification and writes through the #162 seam, returning terminal status in the same round trip; status (GET) renders through a redacting whitelist parser with a validating overlay; disconnect and revalidate round out the lifecycle; mutation routes refuse to serve on non-loopback binds. Auth enforced per #163. Demoable via curl under standalone serve. Code lands in the vendored fork (opencode repo).
Acceptance Criteria
connectedreturned in the same round trip (stubbed solve service).invalid, nothing written; server-error/network class →unreachable, nothing written; auth-passed classes → valid (the parent's probe contract).needs-key; revalidate refreshes the validation timestamp without the secret riding the request.Testing Decisions
Fork server route tests in the existing httpapi test idiom; a local stub stands in for the solve service; reuses #162's store test doubles — extends #162's test surface for write-path assertions.
Key Decisions
validatingin-flight).Source
Part of #159 · ADR 0002 (PR #158) · Blocked by: #162, #163 · Lands in: opencode fork