Repository navigation
fix(dsh): read local scheduler cadence from scheduler hint detail - #8609
huangruiteng merged 1 commit into
Conversation
The Driver looked for the local-scheduler backoff under scheduler_hint.unchanged_poll.local_scheduler, but the CLI emits the cadence under scheduler_hint.cold_path_detail.local_scheduler (the Driver already requests it with --include-detail scheduler) and the unchanged-poll limit under unchanged_poll.limits.local_scheduler. Every non-running decision therefore produced a wait without a delay, so the Driver never scheduled a re-evaluation and stayed silent until an external event. Read the cadence and limit from their actual fields and cap the delay with recheck_after_seconds when present. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: xiaobaifly7 <196511160+xiaobaifly7@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 ee5226a9bcb14e047bd6372ed4dbabd5d661bf0d。
动机 / Motivation
已激活 DSH LoopX Session,处于依赖或定时等待的操作者。DSH 已经向 Core 请求 scheduler detail,等待分支却读取 compact unchanged_poll 下不存在的 cadence 对象,导致已激活 Session 没有下一次定时重查。同一真实 CLI 返回的 resume_at 等待以 45 秒进入定时器。基线没有定时器,当前提交发出一次匹配的 timer。Core 仍决定何时可工作。同一真实 CLI 返回的 resume_at 等待以 45 秒进入定时器。基线没有定时器,当前提交发出一次匹配的 timer。Core 仍决定何时可工作。实际使用本机原生 CLI 和源码 Driver,Session 与时钟由测试提供。正式 DSH 安装、真实模型调用和托管 CI 未验证。
改动思路 / Approach
保留现有 wait plan 和同一 Session 的 timer。Core 发布等待、上限和 reset token。Driver 在已有等待分支采用这些字段。 继续从同一份 quota 决策读取 scheduler detail。上限使用 compact projection,回看时间取已有间隔和 Core 截止时间中的较短值。
具体改动 / Changes
关键代码讲解
以 docs/status-data-contract.md 的 scheduler hint 为准。LOCAL-DETAIL、BOUNDED-DEADLINE 和 LIMIT-RESET-STOP 的行为均已核对。 等待分支 读取 detail 和 limit。 核对了最低支持版本 v1.2.4 的生产者,已发出这两处字段。真实定时等待使用现有 Core 路径产生的原 JSON。原生等待建议为一分钟,deadline 为 45 秒。Driver 把后者交给现有 timer,随后仍需重新查 quota 才可提交 heartbeat。没有 local detail 的 Stop 不会走计数和调度。计数由同一 reset token 串联,读到新 token 后从首档开始。
对主干的风险 / Risks
用同一份真实 CLI 结果驱动基线和当前源码。基线没有定时器,新提交按 45 秒设置。实际 Stop 在两边都没有 timer,也没有发起 heartbeat。有限次重查、reset 和重新准入由 Driver 套件覆盖。
语义与 CI 对齐
97 项 Driver 测试通过,两个原生输入的配对探针通过。TS host/test 类型检查、diff、DCO 与双语检查通过。本机 macOS 全包测试在精确基线通过 293 项,当前 head 通过 299 项。作者报告的 Windows 全包失败未在本机复跑。实际使用本机原生 CLI 和源码 Driver,Session 与时钟由测试提供。正式 DSH 安装、真实模型调用和托管 CI 未验证。
我的整体评价 / Verdict
同意当前 head 的等待路径修复,现有 Session 和 Core 准入边界核验通过。本次评审覆盖现有宿主与 CLI 行为。实际使用本机原生 CLI 和源码 Driver,Session 与时钟由测试提供。正式 DSH 安装、真实模型调用和托管 CI 未验证。
English verdict: APPROVE. The Driver consumes the published scheduler detail and compact limit. A real deferred decision schedules its 45-second recheck, while Stop remains idle.
Goal And Delivered Outcome
readQuota()requests--include-detail scheduler, butschedulerWait()looked for cadence underunchanged_poll.local_scheduler. Supported CLIs put it undercold_path_detail.local_scheduler, so wait decisions produced no timer and could remain idle until an external event.recheck_after_secondscaps the wait. A freshshould_run=truedecision still queues the canonical heartbeat.main; no issue closure is claimed.Author Declaration
Implemented against
loopx/control_plane/scheduler/hint.ts(loopDetails()and thescheduler_hint_v0/scheduler_hint_detail_v0projection),docs/status-data-contract.mdscheduler hint contract, andpackages/dsh-loopx-plugin/README.mdDriver retry boundary, at82867e40597771ab36eaf3ca367657c646f9903e.cold_path_detail.local_schedulerschedulerWait()insrc/driver.tsunchanged_poll.limits.local_scheduler;nullmeans no unchanged-poll capschedulerWait()reset_policy.reset_tokenchangeschedulerWait()and existing Driver statecold_path_detail.local_scheduler.recheck_after_secondsschedulerWait()buildPlan()/evaluate()MINIMUM_LOOPX_VERSIONis 1.2.4, so no compatibility branch for the olderunchanged_poll.local_schedulerobject was added. The schema and supported version floor remain unchanged.Scope And Continuation
schedulerWait()owner.Validation
ee5226a9bc(the single commit in this PR).packages/dsh-loopx-pluginunless stated otherwise.pnpm test -- --reporter=verbosewith the updated CLI-shaped fixtures reported 276 passed / 23 failed. Nine failures were Driver scheduling cases, including the new wait-receipt regression.pnpm typecheck: host, client and test TypeScript configurations passed.pnpm test tests/driver.spec.ts: 97 passed. Covers recommended delay, progression, final unchanged read, compact limits, reset, recheck bounds and runnable admission.pnpm test: 285 passed / 14 failed, 10 files passed / 5 files failed. All 14 failure names also occurred before the production fix; no new failure names appeared.git diff --checkfrom the repository root. No RFC pair or shared semantic vocabulary changed.The unchanged full-suite failures are:
tests/admission-closeout.integration.spec.tstests/cli.spec.tstests/init-command.spec.tstests/native-operation.test.tstests/observer.spec.tsFrontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A. No authority store, migration, provider routing, compatibility projection, or shared-authority RFC claim changes.
Boundary Checklist
Signed-off-bytrailer.🤖 Generated with Claude Code