Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The change affects how selected scheduled checks start across agent-created routines. Fix Continue for interrupted gated checks before merging. Findings
Fix with agent prompt### Issue 1
apps/desktop/src/main/scheduler-host/runner.ts:883-887
A check created with `silentWhenIdle=true` and a passing `preRunHook` cannot continue after an app restart. When the user clicks Continue, `fire()` clears `preRunHook` but keeps `programChangeGate=true`. This condition then skips the run instead of continuing its existing task.
The engine also marks the original run as `skipped`, clears its `sessionId`, and sets its cost to zero even though it already started. Exempt `ctx.resumeSessionId` from this gate and add a regression test for continuing a gated check.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1b2b40c1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
维护者确认请求(自动审查流程)本 PR 命中维护者确认门,需要维护者确认后才能继续自动审查与合并:
改动摘要:Agent 新建的检查( 请维护者直接在本 PR 上 Approve 确认(Approve 即视为确认通过,流程会继续自动审查与合并);如需修改,请 Request Changes 并说明,作者改完后重新审查。 详细说明见关联讨论 issue。 讨论 issue:#8286 |
|
Follow-up on b4e5ca5, after merging current main (conflict was only Review fixes:
Local checks, not GitHub CI:
CI on this head has not finished. Product gate #8286 is unchanged and still needs a maintainer Approve. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4e5ca5272
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Agent-created checks no longer start a model just to decide that nothing changed. A pre-run hook exit 0 or a plugin allow is the signal to run; modelDetectsChange keeps the old poll-with-model path for research checks. Existing schedules, reminders, and the desktop form are unchanged. Signed-off-by: elfcv <cnxpfcv@gmail.com>
Resume clears the pre-run hook but must not reapply the no-signal gate, otherwise Continue skips a check that already started. A gated check bound to a deleted or service-owned archived target now pauses before the skip, instead of staying active and accumulating empty runs. Signed-off-by: elfcv <cnxpfcv@gmail.com>
b4e5ca5 to
0fa2d40
Compare
|
Rebased onto current main. The program-change-gate migration is now Local checks before push, not GitHub CI:
CI is rerunning on this head. Still needs a maintainer Approve on the PR; the author cannot self-approve. |
A peer that supports remote create but predates the program change gate drops `programChangeGate`, so a check promised to skip the model without a program signal would start the model (and spend tokens) on every run. The host now declares `supportsScheduleProgramChangeGate` in maker:get-capabilities, and the scheduler transport refuses a create with `programChangeGate: true` with REMOTE_UNSUPPORTED before the write when the peer lacks it. `programChangeGate: false` (the model detects change) behaves the same on old and new peers and needs no capability; cross-device schedule_update already refuses modelDetectsChange. Also bring the DB-tier storage test (manual tier, not run by unit CI) up to the new column: its hand-written schedules table and round-trip fixture lacked program_change_gate, so every insert failed. Signed-off-by: elfcv <cnxpfcv@gmail.com>
Main now owns migration 0144 (preserve_existing_pr_associations), so the program-change-gate column is regenerated with drizzle-kit as 0145_round_baron_zemo against main's migration chain. The SQL is unchanged. Assisted-by: Cindy (https://cindy.app) Signed-off-by: elfcv <cnxpfcv@gmail.com>
|
Merged current main again ( Local: The review finding about promotion to a project automation is fixed in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2e3cc2ace
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Main now owns migration 0145, so the program-change-gate column is regenerated with drizzle-kit as 0146_handy_quentin_quire. The SQL is unchanged. Assisted-by: Cindy (https://cindy.app) Signed-off-by: elfcv <cnxpfcv@gmail.com>
Promoting a gated check to a project automation rebuilt it from the project file, which had no programChangeGate field, so the check was stored with the gate off and started the model on every run. The project file now carries the gate (written only when on), the loader reads it, compares it and validates it, and editing a project automation in the form keeps the saved value. Files without the field still default to off. Assisted-by: Cindy (https://cindy.app) Signed-off-by: elfcv <cnxpfcv@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dced01893
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * 见 Schedule.programChangeGate。仅 Agent 检查创建入口在未显式 modelDetectsChange 时设 true。 | ||
| * 桌面表单、提醒和已有任务不设。 | ||
| */ | ||
| programChangeGate?: boolean; |
There was a problem hiding this comment.
把 silentWhenIdle=true、programChangeGate=true 且无 hook/插件的项目检查复制或降级为个人自动任务时,SchedulerPage.tsx:489–492,515–516 都会调用 scheduleToUserCreateInput(),但该转换(scheduleFormLogic.ts:675–698)没有携带这两个字段。定向运行生产转换确认,重建输入确实缺少两项;此路径直接走 IPC schedule.create,不会经过 MCP 新增的默认门控逻辑,因此落库后门变为 false,原本无信号时零 token 的检查会重新每轮启动模型,降级路径还会删除原调度。请同步这个反向转换,保留已有门控和静默状态。
Useful? React with 👍 / 👎.
这次改了什么
摘要
Agent 新建的检查任务,没变化就不要再启动模型。以前
silentWhenIdle=true只是不播报,模型仍会每次被叫醒去判断有没有变化。现在这类新建检查默认带程序变化门:没有脚本exit 0或插件放行,就不建会话、不启动模型,run 记 skipped。上网检索这类必须由模型发现变化的检查,创建时显式设modelDetectsChange=true,仍走原来的「启动模型、无变化不播报」。变更类型
fix缺陷修复范围
schedule_create对检查默认写入programChangeGate;runner 在没有程序信号时跳过模型;schedule_update可用modelDetectsChange开关这道门;SQLite 列program_change_gate(默认 false);产品规则一句。silentWhenIdle的创建仍会启动模型。create.ts、cindy_schedulerMcpServer.test.ts、bot-routines.md有重叠改动,建议 fix(scheduler): 检查类定时任务默认复用同一会话 #8270 先合、本 PR 随后 rebase;与 fix(scheduler): 派发前撤回的提示直接删除,并定期清掉历史软隐藏 #7828 只在scheduler-host/runner.ts相邻,无语义依赖,任意顺序。UI 变化
不涉及。
怎么验证的
自动验证
测试价值:最小失败输入是
{ silentWhenIdle: true }的schedule_create,读回programChangeGate=true;以及 runner 对带门、无 hook、无插件的检查直接 skipped,createSession未被调用。对照锁住modelDetectsChange=true、提醒、有 hook、有插件、把检查改回提醒这几条不误伤。手工验证
不涉及。没有启动 Desktop,也没有改真实定时任务。
未执行的验证
tsc --noEmit在本机 8GB 堆上 OOM。失败点是堆上限,不是类型报错。定向 vitest 已编译并跑过改动文件。风险
风险分类
schedule_create/schedule_update说明。影响与回滚
schedule_create新建、且silentWhenIdle=true、未设modelDetectsChange=true的 agent 检查。已有任务列默认 false。提醒、脚本任务、桌面表单不受影响。跨电脑schedule_update不接受modelDetectsChange。modelDetectsChange=true关掉。提交前检查