Repository navigation
test(cleanup): 删除文档措辞同步与常量钉死类测试 - #2058
Merged
Merged
Conversation
- 删除 3 个文档措辞同步测试:逐句钉 docs-site / docs 文案,甚至断言另一个测试文件里存在某个用例标题。它们既不能让文档跟着代码走(钉的是文档字面量,不是代码里的值),也证明不了任何行为。 - 删除二十余处内部可调常量的钉死断言(重试延迟、tick 周期、请求体上限、默认音色、合约版本号、命令总数等),以及只返回常量的 dashboardSessionActionTimeoutMs 钉死测试。这些断言只是把字面量再抄一遍,调参即红。 - 改写 2 处为契约断言:回复卡默认颜色必须落在飞书官方色板内(标题模板色与 text_tag 色两套);OpenCode 没有 ready 提示符,首条消息前的静默等待必须大于 0。均做过变异验证:改坏 src 后变红,还原后变绿。 - 保留:外部协议值(bracketed paste 序列、飞书事件名与 emoji 类型、/proc/stat 字段下标、外部 CLI argv、桌面壳入口 URL)、常量之间的关系断言、fail-closed 默认值、生成物漂移检查、slash 命令文档覆盖检查(两侧都取自真实数据),以及 CI/发版配置护栏(守的都是有记录的真实发版事故,发版流水线只在打 tag 时才跑)。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 20, 2026 13:16
评审指出上一提交误删了两处外部值,并有一处改写过弱: - 恢复 `PROVIDER_TTL_MS['feishu-im'] = 1h`:它是飞书按消息 uuid 去重的窗口,durable outbox 用它判定重试是否仍在去重窗口内,属于外部协议值而非内部可调参数;补注释说明。 - 恢复 `DEFAULT_SAMI_SPEAKER`:它是第三方 SAMI 服务的音色 id,写错只会在运行时合成失败。 - OpenCode 首条静默等待的断言从「大于 0」收紧为「大于 IdleDetector 的默认静默窗口(2s)」:不超过默认窗口时检测器根本不采用加长窗口。变异验证:把 4_000 改成 2_000 后变红。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 20, 2026
Resolve conflicts for deepcoldy#2035: additive union with newer master routes (deferred-topic + link-refs), adopt deepcoldy#2040 sandbox tree rename, align final-output render snapshot, and drop the source-text-pinned test removed by deepcoldy#2057/deepcoldy#2058. Tree equals reviewed rebase.
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 21, 2026
Earlier stack-of-merges both reintroduced tests removed by deepcoldy#2057/deepcoldy#2058 (git add -A picked up stray untracked files) and dropped deepcoldy#1620 Orca files. Reset the tree to the reviewed linear rebase result (base db667c6): zero resurrected deleted tests, all master Orca files present, link-ref core byte-identical, resolve/register/deferred-topic/ chat-manager all in the narrow untrusted-auth aperture.
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 21, 2026
Supersedes the earlier stack-of-merges which had both resurrected deepcoldy#2057/deepcoldy#2058-deleted tests and dropped deepcoldy#1620 Orca files. Tree now equals the reviewed linear rebase on f894190: zero resurrected deleted tests, all current-master files retained, link-refs/resolve in the narrow aperture with real-server and set-invariant tests.
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 21, 2026
Tree equals the reviewed linear rebase (67072e1ef) on 7d0a0d7: zero deepcoldy#2057/deepcoldy#2058-deleted test resurrections, all current-master files (including deepcoldy#1620 Orca and deepcoldy#1841) retained, link-refs/register+resolve both in routeHasNarrowUntrustedAuth with real-server/set-invariant tests.
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 21, 2026
Merge current master (7d0a0d7) with the reviewed LinkRef result tree 49e8dd5 (zero deepcoldy#2057/deepcoldy#2058 test resurrections, all master Orca/card/ tmux files retained, link-refs/register+resolve in the narrow untrusted aperture). This makes current master a parent so GitHub three-way merge uses master itself as the base; content is byte-identical to the reviewed clean linear rebase and no existing branch history is rewritten.
|
🚀 Released in v3.48.0 |
deepcoldy
added a commit
to Kerminate/botmux
that referenced
this pull request
Oct 21, 2026
Bring the branch to current master (e9d0f8b, deepcoldy#1758/deepcoldy#2074/deepcoldy#1005/deepcoldy#2016); content is the clean merge with the reviewed LinkRef tree: link-ref register+resolve in the narrow aperture, zero deepcoldy#2057/deepcoldy#2058 resurrections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
改了什么
清理两类「为写测试而写」的用例:
agent-workbench-evidence-doc-sync、message-quota-doc-sync、quota-fallback-doc-sync)。它们逐句钉 docs-site / docs 的文案,其中一个甚至断言另一个测试文件里存在某个用例标题。钉的是文档字面量,不是代码里的值:代码改了默认值,这类测试照样绿,所以它们既不能让文档跟着代码走,也证明不了行为。expect(SOME_TIMEOUT_MS).toBe(60_000)这类断言,涉及重试延迟、tick 周期、请求体上限、默认音色、合约版本号、命令总数等。还删除了dashboard-session-action-timeout.test.ts,它只是在钉一个返回常量的函数。这些断言只是把字面量再抄一遍,调参就红。另外改写 2 处为契约断言,都做过变异验证(改坏 src 后变红,还原后变绿):
text_tag色是两套不同的色板,飞书会拒收不在色板里的颜色。保留,不动:
/proc/stat字段下标、外部 CLI 的 argv、桌面壳入口 URL。ci-musl-gate、ci-glibc-baseline-gate、release-*):守的都是有记录的真实发版事故,而发版流水线只在打 tag 时才跑,PR 阶段没有别的检查手段。影响面
只改
test/,不改src/。不碰 #2057 正在处理的测试文件,两者合并无冲突(已本地模拟)。测试验证
npx vitest run --project unit <改动过的 23 个测试文件>:23 个文件、1019 个用例全部通过。src/adapters/cli/opencode.ts的firstPromptQuiescenceMs改成 0 → 新用例变红。src/im/lark/reply-card-style.ts的result色改成色板外的值 → 新用例变红。评审后修订(cf3220d1d)
PROVIDER_TTL_MS['feishu-im'] = 1h的钉死:它是飞书按消息 uuid 去重的窗口,属于外部协议值,上一提交误判成了内部常量。DEFAULT_SAMI_SPEAKER的钉死:第三方 SAMI 服务的音色 id。🤖 Generated with Claude Code