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(opencode): consolidate session prompt tests into Effect style by kitlangton · Pull Request #23710 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Merge old Promise-style test/session/prompt.test.ts into prompt-effect.test.ts and rename back to prompt.test.ts.
  • The old file predated the testEffect / provideTmpdirServer helpers and duplicated Bun.serve + Instance.provide scaffolding — exactly the pattern test/AGENTS.md calls out as deprecated.
  • All 9 tests migrated (missing-file handling, # in filename, empty-assistant-turn regression, cancel mid-stream, agent variant, 3× agent/command not-found). 35 + 9 = 44 tests, all passing.

Notes

  • Cancel mid-stream test swaps the hand-rolled hanging ReadableStream for llm.hang + llm.wait(1).
  • The empty-turn regression drops Bun.serve + alibaba provider stub in favor of provideTmpdirServer + llm.text.
  • Agent variant test adds variants: { xhigh: {}, high: {} } to the test-model config so variant resolution actually matches (equivalent of the gpt-5.2 variants the original relied on).
  • Agent/command resolution errors switched from Effect.runPromise(...).then((), (e) => e) to .pipe(Effect.exit) + Cause.squash.

Test plan

  • bun typecheck (packages/opencode) ✓
  • bun run test test/session/prompt.test.ts → 44 pass, 0 fail

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
test(opencode): consolidate session prompt tests into Effect style
0c9e637
Merge the old Promise-style prompt.test.ts into prompt-effect.test.ts and
rename to prompt.test.ts. The old file predated testEffect/provideTmpdirServer
and duplicated Bun.serve + Instance.provide scaffolding for 9 tests covering
missing files, special characters, regression cases, agent variants, and
agent/command resolution errors.
@github-actions github-actions Bot added contributor Vouched labels Apr 21, 2026
@kitlangton
kitlangton enabled auto-merge (squash) April 21, 2026 15:49
@kitlangton
kitlangton merged commit 9579429 into dev Apr 21, 2026
13 checks passed

Uh oh!

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

@kitlangton
kitlangton deleted the kit/prompt-test-merge branch April 21, 2026 15:54
@tesdal tesdal mentioned this pull request Apr 23, 2026
test(opencode): prompt.test.ts flaky since #23710 — 3s timeout vs. SIGTERM→exit race #24060
Closed
Donwulff added a commit to Donwulff/opencode that referenced this pull request Apr 27, 2026
@Donwulff
fix: complete merge of upstream barrel removal (anomalyco#24554)
ebd51aa
Six files kept fork's barrel-style imports after upstream's
remove-module-barrels PR; the merge also missed PR anomalyco#23710's rename of
prompt-effect.test.ts -> prompt.test.ts (with ~360 lines of
consolidated tests).

Imports redirected to direct paths in config/config.ts,
provenance/index.ts, provider/models.ts, tool/webfetch.ts,
tool/websearch.ts, util/fetch.ts. Test file renamed to upstream's
canonical name with consolidated content; fork's Auth.defaultLayer
addition re-applied.
@yeighta yeighta mentioned this pull request May 1, 2026
Sync upstream v1.14.31 (catch-up sprint #2) #25250
Closed
3 of 5 tasks
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@kitlangton
test(opencode): consolidate session prompt tests into Effect style (a…
aa5e91a
…nomalyco#23710)
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
@kitlangton
test(opencode): consolidate session prompt tests into Effect style (a…
7ace116
…nomalyco#23710)
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@kitlangton
test(opencode): consolidate session prompt tests into Effect style (#…
2ecd6d5
…23710)
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 Vouched

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.