GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: repair 19 pre-existing V2 test failures by kitlangton · Pull Request #45826 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Why

The full local V2 suites expose 19 failures that predate the Effect rc.112 upgrade: 15 in AI, one in HTTPAPI Codegen, and three in Server. The exact clean rc.111 baseline at a065ad4ba76abf98e1836f61934d14c2a5aa3429 reproduced the same failure names and semantic assertion output; this branch reproduces them again at 38bffc9db1 before applying the repair.

Intentional protocol changes left some tests and request snapshots stale. The OAuth tests also occupied only one localhost address family, allowing Bun's callback listener to bind the other without exercising cancellation or fallback.

What Changes

Cases Before After
Responses executor (2) Text deltas had no preceding output item Add the canonical response.output_item.added frame required by #44575; retain HTTP fallback, full-consumption commit, malformed-frame, early-stop, and interruption assertions
Provider entrypoints (2) Mantle default expected Chat; Anthropic endpoint expected a static path Assert Mantle's Responses default and distinct Chat alias (#45394); render the dynamic compatible endpoint and assert the exact non-beta URL (#44583)
Anthropic recordings (5) Non-beta URLs; PDFs omitted the filename-derived title Migrate request URLs to ?beta=true (#44583), and PDF titles to verification.pdf (#44593)
OpenRouter recordings (2) Older generic Chat body defaults Match the native route's max_completion_tokens, store: false, usage inclusion, and tool strict: false fields (#44710)
OpenRouter reasoning (4) Reasoning-only assistant content expected null Expect "" per #41210 and explicitly unset scalar aliases; retain exact signed, opaque, duplicate, and distinct reasoning details and scalar omission checks
Anonymous Promise types (1) Expected redundant parentheses from reference expansion Assert both directly inlined anonymous object fields and no synthetic exported alias; current SchemaRepresentation keeps anonymous non-recursive types inline
OAuth callback ports (3) A single hostname listener could leave one loopback family free Occupy both 127.0.0.1 and ::1, await listening readiness, and await scoped teardown; keep cancellation, preferred-port recovery, fallback-port selection, and exact dual-port error assertions

The seven cassettes are request-only migrations performed offline, not new provider recordings. All ten recorded responses, request headers, metadata, timestamps, and signed continuation payloads remain unchanged. Exact request matching remains enabled.

Scope

Test-only repair of the identified 19 failures. No production behavior, TestLLM implementation, skip policy, timeout budgets, or fixture framework changes. Catalog refresh is explicitly disabled in the affected Server fetch fixture.

Verification

Tests ran from package directories using the existing Core isolation runner, with an empty credential environment, ephemeral HOME/XDG/config directories, RECORD=false, and a macOS OS sandbox allowing only loopback outbound connections. The sandbox was separately checked to allow a local HTTP server and reject an external connection. The models-fetch environment flag is CLI-only, so the affected direct Server fixture additionally uses models.fetch: false.

# packages/ai: full suite
env -i PATH="$PATH" RECORD=false OPENCODE_DISABLE_MODELS_FETCH=true \
  sandbox-exec -p '(version 1)(allow default)(deny network-outbound)(allow network-outbound (remote ip "localhost:*"))' \
  bun run ../core/script/test.ts --timeout 30000

# packages/ai: affected files
env -i PATH="$PATH" RECORD=false OPENCODE_DISABLE_MODELS_FETCH=true \
  sandbox-exec -p '(version 1)(allow default)(deny network-outbound)(allow network-outbound (remote ip "localhost:*"))' \
  bun run ../core/script/test.ts --timeout 30000 test/executor.test.ts test/provider-package.test.ts test/provider/anthropic-messages-cache.recorded.test.ts test/provider/openai-chat-reasoning.recorded.test.ts test/provider/pdf.recorded.test.ts test/provider/golden.recorded.test.ts test/provider/openrouter.test.ts

# Run separately from packages/server and packages/httpapi-codegen: full suites
env -i PATH="$PATH" RECORD=false OPENCODE_DISABLE_MODELS_FETCH=true \
  sandbox-exec -p '(version 1)(allow default)(deny network-outbound)(allow network-outbound (remote ip "localhost:*"))' \
  bun run ../core/script/test.ts

# Run separately from packages/ai, packages/server, and packages/httpapi-codegen
bun typecheck

git diff --check
  • Full AI: 806 passed, 25 existing skips, 0 failed, 831 tests across 53 files. Before: 791 passed, 25 skipped, 15 failed.
  • Focused AI: 100 passed, 24 existing skips, 0 failed, 124 tests across seven files.
  • Full HTTPAPI Codegen: 94 passed, 0 failed. Before: 93 passed, one failed.
  • Focused Server fetch: 10 passed, 0 failed. Before: seven passed, three failed.
  • Full Server: 38 passed, two existing PTY skips, 0 failed, 40 tests across 16 files. The PTY skips require a missing binary and are outside this repair.
  • All three package typechecks and Prettier checks passed. Oxlint reports no errors and four existing warnings on unchanged assertions/control flow.
  • The normal push hook passed all 33 repository typecheck tasks with no cache hits or bypasses.
  • A deep cassette comparison confirms only the intended request fields changed, including preservation of nested reasoning continuation metadata.
  • The three original OAuth cases also passed five consecutive fresh-process, isolated, loopback-only runs (15/15 case executions) with the existing timeout budget.

Normal CI is green at head c9c7f12dc80ef1513c3d49e659e8cbdacb218e3e: all ten PR checks passed, including Linux/Windows unit and app e2e jobs, service-worker verification, repository typechecking, compiled/Node service lifecycle checks, packed workerd SDK verification, and generated client/documentation checks where configured. Test workflow: https://github.com/anomalyco/opencode/actions/runs/33140207206.

CI coverage limitation: the current turbo.json does not register @opencode-ai/ai#test, @opencode-ai/server#test, or @opencode-ai/httpapi-codegen#test. The completed unit logs contain no test execution for those three packages, so the direct local full-suite results above establish the 19 fixes; green CI must not be interpreted as having run them. Registering additional CI test tasks is a separate follow-up, not folded into this repair.

Local replay verifies request construction and parser/continuation coverage; it does not claim fresh live-provider acceptance. No paid provider calls or live elected OpenCode server were used. The earlier upgrade PR's green CI is not evidence that every failing local case ran there.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kitlangton
test: repair stale V2 baseline coverage
c9c7f12
Align fixtures with canonical Responses item lifecycles, Mantle Responses aliases, Anthropic beta URLs and PDF titles, and current OpenRouter request defaults. Preserve recorded responses and exact reasoning continuation coverage.

Occupy both literal loopback families in OAuth callback tests so localhost cannot bind the unoccupied family. Match directly inlined anonymous Promise wire types without redundant parentheses.
@github-actions github-actions Bot added the contributor label Aug 28, 2026
@kitlangton kitlangton mentioned this pull request Aug 28, 2026
feat(ai): add first-class TestLLM controls #45828
Merged
@kitlangton
kitlangton merged commit 201536f into v2 Aug 28, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the fix-baseline-tests branch August 28, 2026 14:40
This was referenced Aug 28, 2026
test(ci): register omitted V2 unit suites #45970
Merged
fix(core): pull pending registry changes on read #45822
Closed
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
@kitlangton
test: repair stale V2 baseline coverage (anomalyco#45826)
b73fb19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

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.

1 participant

@kitlangton
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.