Skip to content

ci: add test and lint workflows, trigger on main+dev#907

Merged
yanyihan-xiaomi merged 5 commits into
XiaomiMiMo:mainfrom
yanyihan-xiaomi:ci/setup-checks
Jun 17, 2026
Merged

ci: add test and lint workflows, trigger on main+dev#907
yanyihan-xiaomi merged 5 commits into
XiaomiMiMo:mainfrom
yanyihan-xiaomi:ci/setup-checks

Conversation

@yanyihan-xiaomi

@yanyihan-xiaomi yanyihan-xiaomi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary / 概述

  • typecheck.yml: expanded branch triggers from dev-only to main + dev
    分支触发从仅 dev 扩展为 main + dev
  • test.yml: new workflow — unit tests via bun turbo test (Linux, with turbo cache and concurrency control)
    新增单元测试 workflow
  • lint.yml: new workflow — bun lint (oxlint static analysis)
    新增 oxlint 静态检查 workflow
  • turbo.json: fix task name opencode#test@mimo-ai/cli#test (package was renamed but turbo config wasn't updated, causing all 326 opencode tests to be silently skipped)
    修复 turbo 任务名,之前包名改了但 turbo.json 没跟上,导致 326 个测试一直没在跑
  • AGENTS.md: fix outdated default branch info
    修正过时的默认分支信息
  • Issue templates: rename OpenCode → MiMoCode, remove upstream Discord link
    Issue 模板品牌更名
  • src/plugin/mimo.ts: skip openBrowser() in test/CI environments (NODE_ENV=test or CI=true)
    测试/CI 环境跳过打开浏览器,避免阻塞
  • test/cli/tui/thread.test.ts: set trust: true to skip interactive workspace trust prompt in tests
    测试中跳过 workspace trust 交互弹窗

Pre-existing test failures (not introduced by this PR) / 已有测试失败(非本 PR 引入)

Fixing the turbo task name exposed 17 pre-existing test failures that were never caught because opencode#test was silently skipped (package renamed to @mimo-ai/cli but turbo.json not updated).

修复 turbo 任务名后暴露了 17 个已有测试失败。这些失败之前从未被发现,因为包名从 opencode 改成了 @mimo-ai/cli 后 turbo.json 没更新,测试一直被静默跳过。

Category / 类别 Tests / 测试 Root cause / 根因
Config change / 配置变更 model limit 200K (F41) DEFAULT_CONTEXT_WINDOW changed to 1M, test still expects 200K
Config change / 配置变更 MimoFreeAuthPlugin disabled providers Plugin behavior changed, test not updated
Permission logic / 权限逻辑 general agent denies todo tools Todo tool now allowed, test expects deny
Permission logic / 权限逻辑 Tool whitelist rejects bash Whitelist logic changed
Checkpoint refactor / Checkpoint重构 checkpoint started→skipped (×2) Writer now skips in certain scenarios
Checkpoint refactor / Checkpoint重构 insertRebuildBoundary, renderRebuildContext v3 (×3) Output format changed (tasks ledger + memory index)
Cache strategy / 缓存策略 llm.stream cache_control placement Ephemeral marker moved from last tool_result to user text
Retry logic / 重试逻辑 structured-output retry count retryCount changed from 3 to 4
Timeout/race / 超时竞态 subtask metadata (×2) 5s timeout too tight for CI
Incomplete rename / 重命名未完成 actor terminology src/tool/actor.ts still contains taskRegistry
Compose skill dispatch template Prompt missing subagent_type: "general" reference
Actor spawn return-format injection (F21) Message persistence logic changed

These should be addressed in follow-up PRs. / 这些应在后续 PR 中修复。

Test plan / 测试计划

  • bun typecheck passes (0 errors)
  • bun lint passes (0 errors, warnings only)
  • CI typecheck ✅
  • CI lint ✅
  • CI test: 3235 pass, 17 fail (all pre-existing)

- typecheck.yml: expanded branch triggers from dev-only to main+dev
- test.yml: unit tests via turbo (Linux)
- lint.yml: oxlint static analysis
- AGENTS.md: fix outdated default branch info
- bug-report.yml: version field label and id
- config.yml: remove upstream Discord link
The test was passing trust: false which triggers an interactive prompt
that blocks CI. Set trust: true to bypass it.
The MiMo auth plugin's openBrowser() was opening actual browser windows
during test runs, blocking CI and spamming locally. Skip when CI or
NODE_ENV=test is set.
The package was renamed but turbo.json still referenced the old name,
causing the 326 opencode tests to be silently skipped.
@yanyihan-xiaomi yanyihan-xiaomi merged commit e8775a4 into XiaomiMiMo:main Jun 17, 2026
2 of 3 checks passed
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.

1 participant