Skip to content

Keep the browser tests passing when example.com changes its copy - #90

Merged
jerelvelarde merged 1 commit into
mainfrom
jerel/fix-example-com-assertions
Sep 29, 2026
Merged

jerelvelarde merged 1 commit into
mainfrom
jerel/fix-example-com-assertions

Conversation

@jerelvelarde

Copy link
Copy Markdown
Collaborator

The problem

The browser and browser-container jobs now fail on every pull request, including ones that touch no code (#86 only adds render.yaml and README text). Re-running does not help.

example.com replaced its body. The page title is still "Example Domain", but the heading is gone and the text is now a notice in several languages about not using the domain for testing. apps/worker/tests/lifecycle.test.ts and apps/worker/tests/docker.test.ts both asserted that the page text contains "Example Domain", so both fail on content we do not control.

The approach

Keep the title assertions, which still hold, and replace the two body-text matches with a check that the read returned non-empty text. The tests are about the worker opening, reading and restoring a page, not about example.com's copy, so the read still has to return real text for them to pass.

This is the smallest change that makes CI trustworthy again today. It still depends on a public site staying up and keeping its title.

What is not covered

  • The tests still load example.com over the network. The durable fix is for each test to serve its own small local page, which removes the network and the dependence on someone else's copy. That is a separate follow-up.
  • There is nothing to record: this changes test assertions only, with no product surface.

Verification

  • pnpm test:browser (the lifecycle test against real Chromium) passes locally: 1 pass, 0 fail. Before this change it failed at lifecycle.test.ts:50 in CI.
  • biome check apps/worker/tests is clean.
  • docker.test.ts needs the worker image, so the browser-container job on this PR is its check.

@jerelvelarde
jerelvelarde merged commit 9f4fe3b into main Sep 29, 2026
7 checks passed
sunshaoan0808 pushed a commit to sunshaoan0808/openmuse that referenced this pull request Sep 30, 2026
…ilotKit#90)

Stop the browser tests failing on example.com's changed body text
sunshaoan0808 pushed a commit to sunshaoan0808/openmuse that referenced this pull request Sep 30, 2026
上游 5 个提交:JEV(CopilotKit#42)、无 scheme worker 地址(CopilotKit#92)、web 输入框焦点(CopilotKit#89)、
worker 测试健壮性(CopilotKit#90)、render 蓝图(CopilotKit#86)。

冲突解决(4 文件 9 块)与本地适配:
- conversation.ts:以上游 JEV 结构(runInternal/choices 分支/noteEvidence)为基座,
  换回我们的中性工具层(forAgUi + chatTools),并把 noteEvidence 改成经 ChatToolContext 回调;
  prompt 用我们的 chatInstructions() + JEV 段 + computerInstructions;恢复 maxSteps=10 与
  sample 分支的 threadId 注入
- agent.ts:保留我们的 mastra 引擎分支,两处 ConversationAgent 注入 sharedJevAdapter()
- chat.tsx:我们的卡片(搜索/浏览器操作/审批)与 JEV 卡片并存,去重 delegate_task 渲染器
- config.ts:去掉 cherry-pick 造成的 browserWorkerUrl 重复定义
- mastra-engine.ts:JEV 工具与指令补到 mastra 路径(上游只挂自带引擎,我们线上跑 mastra)
- jev/tools.ts:抽出 presentChoicesSpec 中性规格,两条引擎共用同一份校验逻辑

验证:pnpm test 321/321 通过(含上游 JEV 全部测试)
Wiltermoodj pushed a commit to Wiltermoodj/openmuse that referenced this pull request Oct 4, 2026
…ilotKit#90)

Stop the browser tests failing on example.com's changed body text

(cherry picked from commit 9f4fe3b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants