Connection and compaction fixture preconditions
连接与压缩测试夹具的前置条件
A reconnect label can appear while its hover color is still transitioning. Compaction pressure can select an initial instruction that is smaller than the required checkpoint framing. Neither observation alone establishes the state its test needs to assert.
English
Problem
A reconnect label can appear while its hover color is still transitioning. Compaction pressure can select an initial instruction that is smaller than the required checkpoint framing. Neither observation alone establishes the state its test needs to assert.
Decision
The connection recovery test reads the warning color tokens from an independent element, then polls the indicator's computed foreground and background until both equal those tokens. Browser CSS transitions use a different clock from the mocked JavaScript retry timers. This follows the fixture completion decision: an intermediate visual state cannot satisfy the final assertion.
The compaction smoke completes each file-reading turn before submitting the next. Each file contains 200 repetitions of its numbered sentence (4,600 characters). The 8,000-token synthetic context window triggers compaction at 50% usage, leaving a 4,000-token pressure threshold. In a fixture measurement, one completed read used 2,738 request tokens, including 1,274 tokens outside the conversation surface. A failing calibration run selected about 60 tokens of initial instruction but produced a 475-token framed checkpoint; the runtime correctly rejected that larger replacement. Separate completed turns prevent all four reads from becoming one retained tool group. Failure output includes the recorded compaction errors, while the test still requires a summary, replaced history, and a final answer.
Alternatives considered
Sleep or disable browser transitions. A fixed delay does not observe completion; disabling transitions removes the production behavior involved in the failure.
Raise timeouts or accept a nonshrinking checkpoint. More time cannot make a short instruction larger than checkpoint framing. The runtime's nonshrinking rejection remains required.
Only enlarge the synthetic context window. A model can still batch the reads into one retained tool group, leaving no substantial older group to summarize.
Consequences
Product behavior, CSS, compaction acceptance rules, recorded snapshots, retries, and test deadlines remain unchanged. The live-provider smoke uses additional explicit turns to establish older history; the browser fixture observes animation completion through the same exact color assertions.
中文
Problem
重连标签可能在悬停颜色仍处于过渡期间出现。压缩压力可能选中比检查点必需格式还短的初始指令。仅凭其中任一观察,都无法确定测试要断言的状态已经成立。
Decision
连接恢复测试 从独立元素读取警告颜色 token,再轮询指示器计算后的前景色与背景色,直到两者都等于相应 token。浏览器 CSS 过渡与被模拟的 JavaScript 重试计时器使用不同的时钟。这遵循夹具完成条件决策:中间视觉状态不能满足最终断言。
压缩冒烟测试 完成每一轮文件读取后才提交下一轮。每个文件将包含编号的句子重复 200 次,共 4,600 个字符。8,000 token 的合成上下文窗口在用量达到 50% 时触发压缩,因此压力阈值为 4,000 token。一次夹具测量中,完成一次读取后的请求用了 2,738 token,其中 1,274 token 位于对话 surface 之外。一次失败的校准运行选中了约 60 token 的初始指令,却生成了包含格式在内的 475 token 检查点;运行时正确拒绝了这个更大的替换。分开的已完成轮次避免四次读取全部成为一个被保留的工具组。失败输出包含已记录的压缩错误,同时测试仍要求产生摘要、替换历史并给出最终回答。
Alternatives considered
等待固定时长或禁用浏览器过渡。 固定延迟不能观察完成状态;禁用过渡则移除了失败所涉及的生产行为。
增大超时或接受未缩小的检查点。 更多时间不能使短指令大于检查点格式。运行时仍必须拒绝未缩小的检查点。
只增大合成上下文窗口。 模型仍可能将读取合并到一个被保留的工具组,使更早的历史中没有足够内容可供摘要。
Consequences
产品行为、CSS、压缩接受规则、已记录快照、重试次数与测试截止时间保持不变。真实提供方冒烟测试通过额外的显式轮次建立较旧历史;浏览器夹具通过相同的精确颜色断言观察动画完成。