Skip to content

fix(presentation): expect the settled machine stride default in the smoke - #7967

Closed
gcl-coder wants to merge 1 commit into
loopx-project:mainfrom
gcl-coder:fix/stride-machine-default-smoke
Closed

gcl-coder wants to merge 1 commit into
loopx-project:mainfrom
gcl-coder:fix/stride-machine-default-smoke

Conversation

@gcl-coder

Copy link
Copy Markdown
Contributor

问题

dashboard-browser、chat-bundle-browser 和 build 三条 lane 现在停在同一个断言上:

Error: Stride must default off

来源是 examples/personal-workspace-browser/replan-cadence.mjs:86:

if (await strategy.inputValue() !== "off") throw new Error("Stride must default off");

它断言「本机设置 → 能力中心 → Goal 复盘与步幅 → 步幅策略」在一份全新的机器配置上必须显示 off。

但产品现在的默认值是 evidence_conditioned_v1:

python -c "from loopx.capabilities.todo_replan_cadence.machine_defaults import default_replan_cadence_configuration as d; print(d())"
{'count_unit': 'effective_turns', 'count': 6, 'planning_horizon_goal': True, 'stride_strategy': 'evidence_conditioned_v1'}

同一份默认值也在 tests/capabilities/test_machine_configuration_goal_defaults.py 里被钉住(stride_strategy == "evidence_conditioned_v1"),能力目录的描述也写着 "Evidence-conditioned stride is enabled by default"。

也就是说:默认值改成「开启」时,这条 smoke 的期望值没有跟着改,三行 lane 因此长期变红。

改动

只改这一条期望值,并给出与新语义一致的失败文案:

      // A fresh machine configuration settles the inherited stride strategy;
      // the earlier opt-in default is no longer the product default.
      if (await strategy.inputValue() !== "evidence_conditioned_v1")
        throw new Error("Machine stride default is not evidence-conditioned");

场景里其余的 "off" 断言都是显式 opt-out(Goal 级关闭、legacy 配置的既有含义),语义没变,一律不动:

  • goalCadence.current 只存 {stride_strategy: "off"} —— 显式 Goal 关闭;
  • replanCadenceEditorValue 对 legacy 缺省字段仍映射为 off —— 迁移前的既有含义;
  • 第 257 行断言机器策略仍为 evidence_conditioned_v1 —— 与新默认一致。

验证

  • node --check examples/personal-workspace-browser/replan-cadence.mjs → 通过;
  • 默认值来源:default_replan_cadence_configuration() 输出见上;同一断言由 tests/capabilities/test_machine_configuration_goal_defaults.py 覆盖;
  • 浏览器 lane 需要 Playwright + chromium,本机没装,端到端由 dashboard-browser / chat-bundle-browser / build 三条 lane 验证;本次只把期望值对齐到已生效的产品默认值。

范围

一行断言 + 一行文案。不改产品默认值、不改前端渲染、不改 legacy 迁移语义,不改 stride 的执行权限。

…moke

The replan-cadence browser smoke still required a fresh machine
configuration to render stride strategy `off`. The settled capability
default is `evidence_conditioned_v1`: that is what
`default_replan_cadence_configuration()` returns, what
`tests/capabilities/test_machine_configuration_goal_defaults.py` pins,
and what the capability catalog describes as enabled by default.

Because the expectation kept the earlier opt-in default, the
`dashboard-browser`, `chat-bundle-browser` and `build` lanes failed on
`Stride must default off` while the product behaved as intended.

Require the settled strategy instead. The remaining `off` assertions in
the scenario are explicit opt-outs and the legacy-migration meaning, so
they stay unchanged.

Validation: node --check examples/personal-workspace-browser/
replan-cadence.mjs. The browser lanes need Playwright and chromium, so
the end-to-end run stays with the hosted dashboard lanes.

Scope: one assertion, no product default, rendering or migration change.
Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
@mergify

mergify Bot commented Nov 3, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @gcl-coder.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 3, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

动机 / Motivation

维护 dashboard-browser、chat-bundle-browser 和 build 验收场景的开发者。
产品继承默认已经启用 evidence-conditioned Stride,原 smoke 却在新机器设置的首个检查要求 off,导致场景不能继续。
当前修改对齐了首处默认值;同一场景清除 Goal 与机器覆盖后仍要求 off,因此尚未完成恢复这条 smoke 的目标。
不修改产品策略默认值、既有显式 off、旧配置含义或执行权限;不声称已经跑通完整浏览器 lane。

改动思路 / Approach

同一场景的两处产品默认值断言应服从已有配置 owner;保留显式 opt-out 的独立语义,无需改产品或另建测试框架。
当前 PR 的边界是既有 replan-cadence 场景的默认值回归修正,必须覆盖同一场景恢复产品默认的后半段。
最小修复应留在现有场景,不需要改生产默认或增加另一份 smoke。已沿整个场景检查 fresh machine、legacy、显式 Goal off、清除 Goal 覆盖和移除机器配置;“恢复默认”与显式关闭是两种不同输入,不能全局替换所有 off。

具体改动 / Changes

精确 head 72be547b2f76a9c949cf340ddb426c3269432c77,不可变基线 feea5a6e56066eef87889d470d7991922f9f00ec,一文件 +4/-1。独立规范 docs/reference/protocols/goal-vision-replan-contract-v0.md,版本 feea5a6e56066eef87889d470d7991922f9f00ec,Default review cadence 明确:没有 Goal 或已保存机器覆盖时默认 evidence-conditioned;显式 off 和旧 cadence-only 配置保留原义。该准则当前 not_met,首处已改,后半段恢复默认断言未改。

关键内容讲解

  • 首个机器默认检查 现在要求 evidence_conditioned_v1,与真实新机器配置和既有默认测试一致;这部分改动合理。
  • 同场景移除机器配置 在 Goal 已清除覆盖后 preview/apply remove,再确认 source=capability_default、six effective Turns,属于恢复产品默认,不是 legacy 或显式 opt-out。
  • 剩余策略断言 仍要求 englishStrategy 为 off。生产 goalReplanCadenceEditorValue 在 current=null 时直接保留真实 effective 值 evidence_conditioned_v1;该值由同一设置组件作为表单 draft 使用。

对主干的风险 / Risks

[P2] 同步清除覆盖后的产品默认断言。 当前只修首处默认检查,后半段第308行仍以 off 拒绝同一个产品默认。我启动了真实 ChatHTTPServer 的配置 handlers,用隔离存储执行机器 preview/apply、显式 Goal off、清除 Goal 覆盖、移除机器策略,再读取真实 Goal catalog 并调用生产前端转换函数。最终 current=null、source=capability_default、count=6,backend 与前端值均为 evidence_conditioned_v1;剩余 guard 的 off 条件为 false。base/head 相同的产品路径也给出该值,所以这是本次要修的同一默认语义遗漏,不是要求修另一个无关历史失败。

最小修复:同步第308行的产品默认断言,保留显式 Goal off 与 legacy 的负例,并执行完整 LOOPX_PERSONAL_WORKSPACE_SCENARIO=replan-cadence node examples/personal-workspace-browser-smoke.mjs。返回 note 中的 default-off 描述也应准确。这里没有声称实际 DOM 或整条浏览器流程已运行;证据是实际 handler、完整 clear/remove 状态和真实前端转换消费者,非伪造配置返回值。

独立28项机器默认测试、Node syntax 均 PASS。native premerge4direct/6selected 的整体 gate PASS,但保留一项 raw ratchet advisory FAIL;该选择集合没有执行完整浏览器场景,不能覆盖上述遗漏。CQR 应保留这个必要不变量失败,不以语法或 premerge 绿色认证 smoke 已恢复。不读取、等待或轮询远端 CI。

我的整体评价 / Verdict

REQUEST_CHANGES。 当前为 fragmented:同一个用户任务、同一场景的恢复默认路径尚未完整修好。生产行为没有被改,long_horizon=preserved;维护者能否靠这次修正完成整条场景仍为 user_experience=not_yet_proven。现有 smoke 有长期边界保护价值,没有新增重复脚手架或同作者批量 farming 证据;应补齐现有断言,不能删除有效 opt-out/legacy/recovery 覆盖。

已检查变更及其 CLI/配置消费者;没有修改渲染组件、布局或产品控件,视觉评审不适用。
完整浏览器场景与实际 DOM 未运行;真实 HTTP 配置及生产前端转换函数已运行。
剩余第308行仍要求 englishStrategy 为 off;最小修复是对齐该产品默认断言并执行完整 replan-cadence 场景,同时保留 legacy 和显式关闭负例。

English verdict: REQUEST_CHANGES at 72be547b2f76a9c949cf340ddb426c3269432c77. The first default check is corrected, but the same scenario still expects off after removing both overrides. Real HTTP configuration and the production frontend projection return evidence_conditioned_v1. Align the remaining assertion and run the complete scenario; syntax and premerge do not establish that pass.

Comment on lines +88 to +89
if (await strategy.inputValue() !== "evidence_conditioned_v1")
throw new Error("Machine stride default is not evidence-conditioned");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 同步清除覆盖后的产品默认断言。 当前只修首处默认检查,后半段第308行仍以 off 拒绝同一个产品默认。我启动了真实 ChatHTTPServer 的配置 handlers,用隔离存储执行机器 preview/apply、显式 Goal off、清除 Goal 覆盖、移除机器策略,再读取真实 Goal catalog 并调用生产前端转换函数。最终 current=null、source=capability_default、count=6,backend 与前端值均为 evidence_conditioned_v1;剩余 guard 的 off 条件为 false。base/head 相同的产品路径也给出该值,所以这是本次要修的同一默认语义遗漏,不是要求修另一个无关历史失败。

@gcl-coder

Copy link
Copy Markdown
Contributor Author

上游已经自行修复了这一条期望值,本 PR 变成重复提案,因此关闭。

依据:本 PR 只改了 examples/personal-workspace-browser/replan-cadence.mjs:86 一处断言,把新机器配置的期望步幅策略从 off 改为 evidence_conditioned_v1。

上游提交 b961f1632(refactor(turn): share selected-work resolution with settlement,#7948)已经做了同一处改动:

-      if (await strategy.inputValue() !== "off") throw new Error("Stride must default off");
+      if (await strategy.inputValue() !== "evidence_conditioned_v1") throw new Error("Stride must default to evidence_conditioned_v1");

两者语义一致,只是错误文案不同。本 PR 的提交 72be547b2 于 2026-11-03 13:17(+0800)创建,上游该提交为 2026-11-03 14:01(+0800),因此上游是后到但先合入的等价修复。

本 PR 没有引入独有覆盖,保留它只会在同一处留下第二份改动和多余说明。关闭后由上游 #7948 的实现统一承担该断言。

旁证:dashboard-browser (1)、chat-bundle-browser (1) 和 build 三条 lane 长期停在 Error: Stride must default off,根因正是这一行期望值落后于产品默认值;上游修好后这三条 lane 应随之恢复。

@gcl-coder gcl-coder closed this Nov 4, 2026
@gcl-coder

Copy link
Copy Markdown
Contributor Author

上游已经自行修复了这一条期望值,本 PR 变成重复提案,因此关闭。

依据:本 PR 只改了 examples/personal-workspace-browser/replan-cadence.mjs:86 一处断言,把新机器配置的期望步幅策略从 off 改为 evidence_conditioned_v1。

上游提交 b961f1632(refactor(turn): share selected-work resolution with settlement,#7948)已经做了同一处改动:

-      if (await strategy.inputValue() !== "off") throw new Error("Stride must default off");
+      if (await strategy.inputValue() !== "evidence_conditioned_v1") throw new Error("Stride must default to evidence_conditioned_v1");

两者语义一致,只是错误文案不同。本 PR 的提交 72be547b2 于 2026-11-03 13:17(+0800)创建,上游该提交为 2026-11-03 14:01(+0800),因此上游是后到但先合入的等价修复。

本 PR 没有引入独有覆盖,保留它只会在同一处留下第二份改动和多余说明。关闭后由上游 #7948 的实现统一承担该断言。

旁证:dashboard-browser (1)、chat-bundle-browser (1) 和 build 三条 lane 长期停在 Error: Stride must default off,根因正是这一行期望值落后于产品默认值;上游修好后这三条 lane 应随之恢复。

1 similar comment
@gcl-coder

Copy link
Copy Markdown
Contributor Author

上游已经自行修复了这一条期望值,本 PR 变成重复提案,因此关闭。

依据:本 PR 只改了 examples/personal-workspace-browser/replan-cadence.mjs:86 一处断言,把新机器配置的期望步幅策略从 off 改为 evidence_conditioned_v1。

上游提交 b961f1632(refactor(turn): share selected-work resolution with settlement,#7948)已经做了同一处改动:

-      if (await strategy.inputValue() !== "off") throw new Error("Stride must default off");
+      if (await strategy.inputValue() !== "evidence_conditioned_v1") throw new Error("Stride must default to evidence_conditioned_v1");

两者语义一致,只是错误文案不同。本 PR 的提交 72be547b2 于 2026-11-03 13:17(+0800)创建,上游该提交为 2026-11-03 14:01(+0800),因此上游是后到但先合入的等价修复。

本 PR 没有引入独有覆盖,保留它只会在同一处留下第二份改动和多余说明。关闭后由上游 #7948 的实现统一承担该断言。

旁证:dashboard-browser (1)、chat-bundle-browser (1) 和 build 三条 lane 长期停在 Error: Stride must default off,根因正是这一行期望值落后于产品默认值;上游修好后这三条 lane 应随之恢复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants