Repository navigation
fix(chat): reject invalid calendar Task input before source lookup - #7681
Conversation
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
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
没有发现阻塞本次范围的缺陷。使用 Goal 设置预览周期 Task 的用户。缺少 Task 来源的同一草稿,修改前得到通用服务器错误,修改后得到明确的 HTTP 400 来源要求;两者均不应执行业务。无效输入在读取 Session 来源前被拒绝,合法与清空配置继续使用原事务。本 PR 不完成 Task 来源选择器、自然语言创建、正式部署或账号自动切换。通用编辑器仍未登记 task 字段,完整界面尚不可用。 准确错误提示减少无效预览,但不代表完整任务功能已经可用。
改动思路 / Approach
输入校验属于既有配置不变量,应复用周期配置 normalizer;Task、唤醒与回传仍由原 native owner 执行。当前边界是 HTTP 错误修复及可复现的隔离场景,完整编辑器由既有产品配置工作接续。 原路径先进入来源 guard,再由写入者校验;缺失来源可能先抛出内部错误。现在复用 pure normalizer 提前拒绝,随后仍走原来源 guard、expected revision、写入与独立读回。没有第二套验证规则、调度器、状态表或自动重试。猜测旧来源会改变显式意图,新建独立 runner 则会割裂已有真实调用路径,这两条替代方案均不合适。
具体改动 / Changes
关键代码讲解
_goal_capability_options保留提前返回的 clear 分支,在周期配置分支复用normalize_configuration。HTTP update 在来源 guard 前调用它,故无效输入不能先进入原 Task 读取或写入。normalize_configuration未改逻辑,仍要求明确来源、日历和原 Session,同时禁止安装命令。这里修复执行顺序,没有建立新权限。- fixture
main使用返回的本地 Session actor,增加 File/SQLite 模式,并停止、恢复既有 wake owner。局部旅程不启动无关 private outbound owner;默认原报告旅程仍保留该消费者。
依据 docs/product/periodic-reports.md 的不可变 revision f2990e3de49d6aa7441e0e0b739f49bfc84aae38:completed-source 已实现,来源须属于原 Agent、已完成且有独立 argv 验证。no-command-install 已实现,八项 HTTP 拒绝及无副作用验证覆盖。existing-goal-transaction 已实现,真实 preview/apply/readback 与两种存储均被调用。goal-settings-editor 延期:原编辑器完备性表述不成立,文档明确指出字段缺失;既有产品配置工作仍须补来源选择与自然语言入口。没有通过改写指南把该缺口变成完成。
对主干的风险 / Risks
最强反例是 normalizer 单元测试通过,但 HTTP 仍先进入来源 guard;另一个反例是 fixture 验证了另一个准备 Session 的结果。实际 HTTP、File/SQLite 原 Task 和原会话读回分别排除了这些问题。基线六个 malformed cases 失败、两个注入控制拒绝;当前安装包八项全部 PASS。合法 default/report/Task/clear 的五组完整响应在每种存储上与基线相同。到期 Task 分别产生一次 42、native commit、正确 actor 与保留历史;wake 停止恢复不重放,暂停保留结果。有限 Task 入口也使用返回的正确 Session。
71 项日历与 44 项相邻测试在 rebase 前运行,四个范围文件之后字节不变。当前 head 又通过 native standard premerge、fresh Chat/wheel build 和安装包回归,1206 个加载模块没有逃回源码目录。初次过期 bundle 拒绝、错误构建 cwd 和早于 wake cache 的观察超时均保留,没有改称首次通过。模型为合成 app-server,HTTP 与存储真实;这些证据不证明完整 Chat 进程重启、真实模型理解或正式部署。按 wait_for_ci=false 未查询或等待 CI;实际 CQR 为 disabled,没有虚构收据。
我的整体评价 / Verdict
这是 justified_increment。long_horizon=preserved:原 Task 生命周期、失败保留及 once-only 恢复仍归既有 owner。user_experience=improved:桌面错误区域直接显示缺少来源的原因,390 像素下完整提示可读;未增加卡片、交互轮次或改写布局。 本次改变的是无需展开的错误区域;JSON 配置作为代表性输入上下文,不增加报告或列表展开状态。 未验证范围:完整来源选择器与自然语言配置未完成;截图不证明正式部署或真实模型理解。 没有新增人工确认轮次;HTTP 调用者可以纠正输入,完整编辑器仍不能产生声明。输入校验属于既有配置不变量,应复用周期配置 normalizer;Task、唤醒与回传仍由原 native owner 执行。当前边界是 HTTP 错误修复及可复现的隔离场景,完整编辑器由既有产品配置工作接续。 生产只复用现有校验,无兼容版本枝、迁移或新状态,额外工作集中在可重用 fixture 与诚实交付说明,成本与复现问题相称。共享语义判断为 reuse_existing,没有新增语义族。批准只针对当前 head 的 API/fixture,父任务保持未完成,合并与安装仍需实际读回。
English verdict: APPROVE — 77ced11; shared early Task validation fixes the reproduced HTTP failure. Native File/SQLite, installed-wheel regressions, parity and exact-head checks pass; full UI and production adoption remain separate.
Goal And Delivered Outcome
A periodic
session-taskrequest with a missing or malformed Task source reached source lookup before configuration validation. Normal Goal settings preview/apply returned HTTP 500 and a generic error, despite the existing normalizer having a precise refusal.task, so the packaged editor still cannot configure the complete Task declaration.f2990e3de; they now return typed HTTP 400 with the existing source requirement. Both command-injection controls remain rejected. Failed requests perform no model work, configuration write, calendar enrollment or conversation mutation.main. This slice does not complete the parent unified Task UI or natural-language creation work.Author Declaration
Implemented against
_goal_capability_options,loopx/chat_goal_configuration_api.pysteward_report_fixture.py --managed-calendar-task file|sqlite--managed-sessionand calendar routes use the returned Session's actorScope And Continuation
The production change reuses the existing configuration normalizer at the HTTP boundary, before the Session source guard. It adds no schema, scheduler, worker, permission or Task authority. The fixture adds real File/SQLite calendar configuration and stopping/restarting its existing wake owner; it also corrects the local Session actor correlation and avoids starting the private outbound owner for local-only journeys.
The independent boundary is malformed-input handling plus an honest reproducible fixture. The existing descriptor/editor still drops or rejects the
taskfield; its product owner must complete that interface and the broader natural-language journey. The guide now records that gap instead of claiming JSON editing is sufficient.Validation
77ced11aa8427b9b79bf0dcf76dd44214ccac213.The 71/44 suites and live fixture work ran before rebasing onto
58205c62a16a9e98ab3319ada3bab5aea74b829d; the four scoped files were byte-identical afterward. The exact-head premerge, wheel HTTP regressions and refreshed screenshots ran after the rebase. The final fixture Session-actor correction was independently exercised for File, SQLite and finite local submission. The initial wheel build refused stale frontend assets; a fresh Chat build and a new wheel succeeded. A first observation timed out before the existing wake cache elapsed; later independent readback proved that original execution completed once, without replay.These checks qualify deterministic storage, scheduling and HTTP mechanics with a synthetic app-server. They do not qualify live-model interpretation, natural production deadlines, full Chat process restart, account switching, or the unfinished complete Task settings/natural-language UI. PostgreSQL is not affected or promoted by this change.
Frontend / Visual Evidence
UI impact: changed error text through the existing renderer; no frontend component or layout change. Synthetic public fixture, before
f2990e3de, after exact head above. No persistent hosted preview; run the documented--managed-calendar-task sqlitefixture for a disposable local preview.After, desktop:
Before, desktop:
After, 390-pixel viewport:
Attention/craft review: the existing error region gives the missing-source reason beside the preview controls. No new cards, colors, visual hierarchy or interaction were introduced. The full source-picker gap remains explicit.
Type of Change
LoopX Area
Technical Direction
Operator surface and IM integration: existing managed local Session Task path.
Shared-authority RFC fixture impact
N/A: no shared-authority migration, runtime routing or compatibility projection changes. File and SQLite are exercised through their existing native owners.
Boundary Checklist