Skip to content

feat: discover repeatable Tasks in their original managed Session - #7669

Merged
huangruiteng merged 2 commits into
mainfrom
codex/session-task-source-discovery-20261029
Oct 29, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/session-task-source-discovery-20261029

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Clients configuring a managed Session’s existing repeating Task calendar currently have to locate a completed Task ID themselves. Add an opt-in calendar_task_sources=true view on the existing native-Turn inspection endpoint, using canonical completed history and the execution owner’s original-Agent and independent-validator checks. Archived sources remain discoverable; generated periods and ineligible work are excluded. Repeated reads leave scheduling, model execution and delivery untouched, and damaged source declarations remain explicit failures.

This is a backend prerequisite for the existing recurring-task frontend work. Guided selection, arbitrary natural-language task creation and the unified Agent journey remain unfinished; the current JSON configuration transaction continues to own preview/apply. No rendered UI changed.

Validation on b4b6b836385f6db036b9589e131ad361e6d6330e:

  • Final six File/SQLite HTTP/native Task cases pass, including archive readback, ambiguous/foreign selectors, malformed/unreadable validation and recovery without execution. Six cases also pass in an isolated wheel: all 1,896 product files match that wheel, the three changed product files match Git, and all 1,206 loaded LoopX modules come from the installation.
  • The two new discovery scenarios fail against immutable base 33d9ecd9 because that endpoint lacks the catalog. Default inspection equals the base response in two real File/SQLite fixture comparisons.
  • The full calendar suite passed 63 cases and adjacent managed-Turn/configuration suites passed 66 before the final narrow relocation of catalog IO error handling; the final six source/installed cases cover that relocation. Model responses are synthetic; these checks do not qualify live intent recognition or a production install.
  • Ruff, bilingual diff validation and standard premerge pass: six direct checks and eleven selected checks. The initial stale-bundle build rejection was repaired by the standard frontend build. An initial HTTP-module ceiling failure was resolved by moving catalog IO handling into its existing owner; no ceiling was raised.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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 · max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

为已绑定 Agent 设置重复任务的调用方,需要先知道可用的已完成 Task 引用。旧接口只显示执行状态,调用方还要自行查找原 Task;新接口一次只读查询返回同一 Agent 可用的原引用,再沿现有预览和保存入口配置。已在真实 HTTP、File/SQLite 和隔离安装包中核验:发现引用、保存日历、到期执行、原会话完整结果读回及归档后再次发现。本 PR 只交付后端发现前置,不完成自然语言创建任务、引导式配置或统一 Agent 界面,也不证明正式安装采用和真实模型理解。现有 recurring-task frontend 工作仍需把自然语言准备、任务选择、日历编辑及暂停和结果查看接入同一份配置。

改动思路 / Approach

来源资格继续归原 SessionCalendarTasks 所有,TypeScript 原生 Todo 读取负责完整快照,IO 错误也在能力层收口;HTTP 只解码显式选择,不承载第二套规则。当前 PR 边界是可实际调用、可单独回退的只读来源目录;既有前端责任方继续完整会话旅程。不增加一个独立目录或在 UI 复制筛选条件:原生 Todo 读取负责完整已完成历史,原能力负责来源资格和验收声明。选择成功也不会自动保存配置。故障只影响这次可选读取,恢复原记录后再次读取即可;没有第二执行器或自动重放。

具体改动 / Changes

规范依据为 docs/product/periodic-reports.md,固定读取版本 33d9ecd9fd29bce4986da6c9e9a6b758a24f91b3。existing-source 复用“已完成、原 Agent、独立 argv 验收”的原条款;same-session-result 沿现有到期 Task、原生提交和原会话完整结果核验;retained-uncertainty 保留失败和未知效果,不盲目重跑。frontend-nl-boundary 明确留在既有前端工作中,本 PR 不将它宣告完成。新增段落用于说明发现接口,不作为自证的新验收标准。

关键代码讲解

  1. source_task 与共享资格检查 保留原配置和执行调用者。已完成状态、原 Agent、有限推进任务、原验收摘要及日历窗口排除条件只有一个责任方,旧错误正文也做了同夹具对照。
  2. source_options 从原生完整历史派生引用,包含归档项;不读取热列表来猜成员,也不复制命令到新配置。声明损坏和 IO 失败明确拒绝,不返回伪造空列表。
  3. native-turn 原入口 只接受一次明确 true/false 选择,拒绝冲突和外来目标。未启用时输出与旧版相等;启用后仅增加这个视图。后续预览、保存、到期执行仍分别由原机制重查来源。

对主干的风险 / Risks

最容易漏掉的风险不是一个合法来源能读出,而是大目录或归档后静默丢失来源,以及不完整读取被解释成“没有任务”。最终版本在真实 File/SQLite 中把 501 个其它 Agent 的已完成项放在原来源之前,原来源仍完整可见;新建任务在 open 时不出现,经过原生执行和独立验收后才出现。故意破坏原生记录顺序被明确拒绝,依法恢复后读回原引用,读取本身没有追加模型执行。

PASS:最终 6 项源码与 6 项隔离 wheel HTTP/原生 Task 场景;2 项不可变旧版默认输出及完整来源错误对照;2 项大目录、外来和后续来源核验。安装包 1,896 文件一致、1,206 已加载模块无源码逃逸。完整日历 63 项和相邻 66 项在最后只读 IO 错误归属整理前通过,整理后由上述最终针对性用例覆盖。模型响应是合成的,不代表真实语义理解。

最初的 stale bundle 拒绝通过标准构建恢复;最初 HTTP 模块 2031 行超过 2026 上限,通过将 IO 错误处理收回能力层降为 2025 行,未抬阈值。最终 Ruff、双语检查和标准预合并的 6 个直接检查、11 个选中检查全部通过。私有大目录夹具初稿的对象形状、排序和读模型摘要错误均保留,恢复使用真实读模型构造后通过,未改变产品断言或限制。远端 CI 按当前契约不查询。

语义与 CI 对齐

复用既有 Task、完成历史和校验语义;新值仅是可选读取投影。没有新的持久化事实、默认执行策略、跨 Goal 授权或工作义务。原合法和拒绝路径的结果及错误正文相等;新增读取明确不构成执行权限。大目录查询仍需本地 IO,一个损坏的合格声明会使该目录读取失败,但不会冻结普通检查或其它已知来源的原配置入口。

我的整体评价 / Verdict

作为既有周期任务工作的前置,这是可实际消费和独立回退的增量。长期执行与原会话结果路径保持,当前人机界面也保持;改善的是调用方准备原引用的能力,不是已经完成自然语言体验。已检查现有会话和能力设置入口及全部五文件差异;本次没有渲染层变化,视觉评审不适用。自然语言和引导式配置界面、真实模型效果及正式运行时采用不在本次验收范围。兼容边界采用一个当前合同和可选字段,未添加版本分支;继续复用原责任方已是较小实现。后续完整界面由既有责任方接续,本次批准不关闭父目标或替代正式安装验收。

English verdict: APPROVE — the opt-in source view reuses the original execution boundary, preserves existing callers, and passes real canonical and installed-path checks within its declared prerequisite scope.

@huangruiteng
huangruiteng merged commit cc0ed3e into main Oct 29, 2026
11 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants