GeezerVison is showing github.com — test(cli): add standalone Meta serve smoke by dezren39 · Pull Request #822 · developing-today-forks/opencode
Conversation
dezren39
commented
Oct 29, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Refs #431
Summary
- Add a Meta Responses regression test for the named response.subscription_usage SSE event and verify terminal usage still yields text and input/output tokens.
- Add bun packages/cli/script/meta-serve-smoke.ts: starts standalone serve, exercises Meta, then checks the openai provider through a local OpenAI-compatible SSE mock. It verifies streamed text, a non-empty saved message, and advancing token counters. --openai-only runs the no-external-provider control.
Evidence / status
- On laptop, current main b5ac11f standalone serve completed two Meta turns. One stored assistant message contained non-empty text and usage (22,209 input / 13 output); the other streamed non-empty text. The reported sandbox hang is therefore not reproduced here.
- Current source rewrites @ai-sdk/openai Meta models to OpenCode's native Meta Responses implementation; the event schema accepts unknown event types and the parser ignores unhandled events. The focused parser test and local OpenAI control pass.
- No production behavior change is included because no failure was observed to fix. This PR is a smoke/regression harness; Standalone serve: meta provider turns hang with zero tokens (embedded build works) #431 remains open pending reproduction in the reported environment.
Checks
- bun test test/provider/meta.test.ts (from packages/ai)
- bun packages/cli/script/meta-serve-smoke.ts --openai-only
- bun run check
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Draft PR not reviewed
Draft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate:
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR doesn't fully meet our contributing guidelines and PR template.
What needs to be fixed:
- PR description is missing required template sections. Please use the PR template.
Please edit this PR description to address the above within 72 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Keeping this as a draft. It is the regression artifact for #431 (Meta response.subscription_usage SSE parser test + packages/cli/script/meta-serve-smoke.ts), not a fix: the hang does not reproduce on current main standalone serve off the sandbox, so there is no production diff to land here.
Why it is not merge-ready: unit (linux) / unit (windows) / e2e (*, app-2) are red on checks unrelated to these two files (check:generated drift, a session-launch test), so the "checks green" merge bar is not met by this branch.
Next: run the smoke script (without --openai-only) against the elected sandbox standalone serve on the installed rev. If that Meta turn completes, #431 closes as no-longer-reproducing and this PR can either land as the recurrence guard or be closed with the script kept on the issue.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · needs work — smoke script is stale against provider-route governance
- Agent: repo-worker-opencode (OpenChamber scheduled lane)
- Session / ID: lane
3fe37e8a-c61b-419c-9e97-769ecd264d5d, queue task 3029
- Action: rebased this branch onto current
main (3cb0dcfa7e, rebase commit 351a37c008) and ran the smoke locally (laptop, META_API_KEY present, api.meta.ai directly reachable).
Result: the OpenAI control passes; the Meta turn exits 1 before any streaming:
{"type":"error","type":"provider.no-route","message":"Model unavailable: meta/muse-wonder-1.0"}
That is not the #431 zero-token hang — it is the newer provider-route governance (#1140 / #1454) rejecting the ad-hoc meta provider block the script injects via OPENCODE_CONFIG_CONTENT. The script cannot exercise the reported path on current main until it registers the model through a provider route (or otherwise satisfies governance).
Next step for whoever resumes: update packages/cli/script/meta-serve-smoke.ts config to declare a provider route containing meta/muse-wonder-1.0, re-run, and use the outcome to settle #431. Server stdout/stderr are currently discarded by the script (stdout: "ignore"); surfacing them on failure is worth doing for diagnosability.
Branch left rebased and clean at 351a37c008; no code changes pushed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Agent note — task 3029 (lane opencode-a): hang not reproduced at current main; Meta leg now blocked on the API key's attestation, needs a Drew-owned credential
Ran the PR #822 smoke on the laptop at current main aa32898362 (branch rebased, pushed at ee471cc6b8; PR stays draft):
- OpenAI control: PASS — streamed text, token counters advanced.
- Governance block is gone: the config-isolation commit already on the branch fixed the
provider.no-route failure from the previous resume — the Meta turn now reaches the provider.
- Meta turn result: standalone serve + CLI run created the session and returned a streamed error event:
provider.auth 403 from api.meta.ai — client_attestation_denied: "This API key is billed to a Muse Code subscription. Muse Code subscriptions cover requests from the Muse Code client only. Use it in Muse Code, or use a pay-as-you-go API key for other clients."
- Also landed on the branch: the smoke's failure path now includes the run's JSON event tail, which is how this error was captured (previously only stderr was shown and the actual error event was discarded).
Verdict on the reported fault: the #431 zero-token hang does not reproduce at current main — the standalone pipeline streams and reports outcomes (including provider errors) correctly, and this same script completed real Meta turns in PR #822's original evidence. What remains is environmental: the laptop's META_API_KEY can no longer be used from this client. BLOCKED on Drew: a pay-as-you-go Meta API key (or a ruling that the attestation-denied key is expected and the Meta leg is wontfix) is needed to run the smoke's Meta leg to a successful turn and close this out.
Task 3029 is blocked (reason class: credential) with this evidence.
🤖 Agent note · blocked (task 3029, lane opencode-a)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The smoke inherited the host user config (and its provider policies), which
filtered the ad-hoc providers out of the catalog: the Meta turn exited with
provider.no-route (Model unavailable) before making any request. Point
OPENCODE_CONFIG_DIR at the run directory, drop OPENCODE_CONFIG and disable
project config so only the injected content applies. Also capture the serve
process output and include its tail when a turn fails, since a failure before
streaming left nothing to diagnose.
|
🤖 Agent note · shepherded to merge (queue task 13483, lane opencode-a)
- Rebased onto current main
5aee3994c8 (head 59ebad016b), clean, mergeable CLEAN; no hard-stop labels; no Codex findings to disposition (no Codex reviews/comments on this PR).
- Targeted test on laptop:
bun test test/provider/meta.test.ts — 5 pass, including the new regression test "Meta Responses ignores subscription usage SSE events and keeps terminal usage".
- Smoke control:
bun packages/cli/script/meta-serve-smoke.ts --openai-only — PASS (streamed text, token counters advanced). Pre-push typecheck: 36 packages successful.
- On the earlier credential block (task 3029): the Meta leg's failure was environmental — the available Meta key is attestation-denied for non-Muse-Code clients — not a fault in this test-only diff. The fixture-based regression test needs no credential and passes; the smoke script remains the harness for a future PAYG key. Merging this PR as the recurrence guard does NOT close Standalone serve: meta provider turns hang with zero tokens (embedded build works) #431 (Refs only); Standalone serve: meta provider turns hang with zero tokens (embedded build works) #431 stays open for reproduction in the reported environment.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|