Skip to content

fix(todos): default blocking work to P0 - #6604

Merged
loopx-agent merged 2 commits into
mainfrom
codex/semantic-todo-priority-default-20261016
Oct 16, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/semantic-todo-priority-default-20261016

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Reproduced control-plane authoring gap: a newly created Todo could declare itself blocking while remaining at the ordinary omitted-priority default.
  • Goal/source and gap: Make a machine-declared blocker visible to scheduling without guessing urgency from Todo prose.
  • Observable before → after, with the validation row that proves it: omitted priority always became P1 → user_gate, blocker, and status=blocked creations become P0; ordinary work remains P1. Focused authoring and monitor-successor rows below cover the behavior.
  • Issue/task and intended base: Self-contained repair against main.

Author Declaration

  • Written by: model_agent (OpenAI Codex, GPT-6 family)

Implemented against

  • Specification and revision: docs/project-agent-todo-contract.md, Priority intent and monitor-successor rules at de41d2d310ccb9d259200d81d6182a32824ca556.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Fresh machine-declared blocking work defaults to P0 implemented planTodoCreationPriority python3 -m pytest -q tests/control_plane/test_todo_priority_authoring.py
Ordinary work defaults to P1; explicit priority, legacy prefix, and clear remain authoritative implemented planTodoCreationPriority node --test tests/control_plane_ts/todo_priority.test.ts
Monitor successors use their own task class and do not inherit monitor priority implemented monitorSuccessorPriorities, requireProviderSuccessorPriority monitor successor focused suites
Historical Todos and receipts are not re-ranked implemented creation-only default after receipt lookup full control-plane regression suite
  • Self-check before submission: Reviewed all changed paths and the exact staged diff; ran focused, aggregate, type, contract, and public-boundary checks. No real backend run was needed because this changes deterministic Todo planning and receipt verification.

Scope And Continuation

  • Completed scope and remaining work: Complete within this scope. The change assigns defaults only when the control plane already has structured blocking semantics; it does not infer urgency from text or rewrite existing Todos.
  • Slice boundary / successor: N/A; rollout and merge remain maintainer decisions.

Validation

  • Tested revision: f25af9995
  • Run state: finished
  • Input classes: synthetic, public_fixture
Check kind Result Public-safe evidence / limitation
unit passed Todo priority TypeScript focused coverage: 36 passed.
integration passed Todo priority CLI authoring: 2 passed, including user_gate, blocker, and status=blocked.
integration passed Monitor successor validation: 17 passed; related control-plane Python selection: 97 passed.
regression_parity passed Full TypeScript control plane: 4,758 passed, 0 failed, 44 skipped.
static passed npm run typecheck:control-plane; git diff --check.
static passed loopx check: 0 errors; public-boundary scan passed. Six unrelated pre-existing Goal projection warnings remained.
  • Coverage and gaps: The canonical creation path, CLI entrypoint, monitor successor planning/readback, explicit overrides, compatibility prefixes, and receipt preservation are covered. No external provider or UI path is changed.
  • Hosted CI limitation: the exact head currently inherits shared failures from its clean base. The packaged managed-results scenario fails with the same 2 !== 1 assertion on de41d2d31, and the Python workflow also hits the shared storage/result-smoke regressions tracked by #6607 and the focused browser repair #6609. This PR changes no dashboard, storage, browser-smoke, packaging, or workflow files; keep those repairs independent and rebase after the shared fix lands.

See validation disclosure guidance.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A
  • Craft review: N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: Core control-plane hardening.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A; this is fresh Todo priority defaulting and does not claim shared Goal Authority migration progress.
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

Signed-off-by: huangruiteng <huangrt01@163.com>

@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

Exact head: f25af99952bd61a3f8d02d27538b0a05ce86f51d

动机

通过现有 Todo 创建命令或 monitor 后继,把明确阻塞项加入工作队列的维护者和 Agent。

原有创建入口在省略优先级时统一产生 P1,结构化阻塞项也与普通任务同级。提案有意把新建 user_gate、blocker 或 status=blocked 的默认值改成 P0,同时保留显式优先级、旧前缀、清空及历史回执的原有含义。

同一组隔离 File、SQLite 调用在 base 新建阻塞项为 P1,当前源码和普通 wheel、sdist 安装后均为 P0;普通任务与仅在正文提及 P0 的任务仍为 P1。显式 P2、前缀 P3、清空和重放都保持原意,另一 Agent 的 gate 不会阻止本 Agent 的独立任务。

本次只改变新建项的默认排序意图,不授予执行、领取、预算或跨 Agent 管理权限,不批量迁移历史记录,也不增加新前端配置;浏览器交互和 PostgreSQL 集成没有在本次执行。

独立判定依据:https://github.com/loopx-project/loopx/blob/de41d2d310ccb9d259200d81d6182a32824ca556/docs/project-agent-todo-contract.md;revision de41d2d310ccb9d259200d81d6182a32824ca556。按 Priority intent 的排序意图、显式声明、普通编辑、独立后继与默认值条款,以及 Default change and compatibility 的旧回执与清空条款核对。

改动思路

新规则是创建意图的局部扩展,应复用已有 priority planner。现有 task_class/status 已是类型化值,不能从正文猜阻塞;monitor 必须按每个新后继自身的角色和分类计算,而不是继承父 monitor 的排序。

当前 PR 交付同一 TypeScript 创建规则在 canonical Todo、monitor 后继与回执校验中的一致默认值及兼容验证;普通编辑、执行资格、历史迁移和 UI 配置保持各自已有维护边界,不为默认排序新增第二套策略源。

具体改动

planTodoCreationPriority() 留在现有 TypeScript todos/priority.ts:仅按已注册的 task_class=user_gate|blocker 或 status=blocked 选择创建默认值,再调用原 planTodoPriority() 处理显式参数、前缀、冲突和清空。新增常量复用已有 TodoPriority 的 P0 值,不增加状态词表,不从文本包含“阻塞”或 P0 推断紧急程度。

createCandidate() 接收规范化后的分类和状态;canonical create 在构造新候选前仍先查询旧 operation receipt。monitorSuccessorPriorities() 按每个后继自身的角色、task_class 和显式参数计算,普通后继不继承父 monitor 的 P0。validateSuccessorReceipts() 复用同一创建规则核对新后继,保留旧回执的兼容顺序。Python 两处改动仅更新既有 CLI help;两份文档明确披露默认值变化。四份测试覆盖 priority planner、monitor batch 与 File/SQLite 的公开命令路径。

独立 source 验证:四组 Python 文件 head 32/base 28 项通过,四组 TypeScript 文件两侧各 15 项通过。普通构建 Chat assets 后生成 wheel、sdist,分别装入新环境,核对六个变更产品文件与 source/archive/install 字节相同。base、head、wheel、sdist 各完成 42 次真实 CLI 调用,覆盖两种 provider,且普通 Chat preview/apply 继续产生 P1。base 三种结构化阻塞新项为 P1,head 和两个安装包为 P0;普通正文出现 P0 不改变 P1,显式 P2 与前缀 P3 均保留,冲突拒绝且状态文件未变,清空后无优先级。

再将 base 创建过的 P1 gate 回执交给 head、wheel、sdist 重放,已编辑为 P4 或明确清空的当前记录都保留;这一跨版本对照和 blocked P0 的执行资格拒绝共完成 28 次真实 CLI 调用。Agent-b gate 出现后 Agent-a 的独立普通任务仍可运行。typecheck、语义 advisory 后完整语义检查通过;premerge 5 项 direct、19 项 selected,无 blocking failure。

对主干的风险

这是常开行为变化:调用方省略优先级时,新的结构化阻塞项会更靠前;它不能被描述成单纯文案修订。旧版文档确实写所有新项默认 P1,本评审独立判断该改动,并没有用改后的文档反过来证明旧规范要求 P0。Priority intent 中的原有资格、能力、claim、quota 和 gate 边界仍须遵守;实测 blocked P0 拒绝、其他 Agent gate 不扩大阻塞范围。

没有历史批量升优先级或 provider promotion,旧 receipt 查找及显式清空仍决定重放结果。现有 Chat 创建只作者普通任务,继续 P1;现有 reviewed priority 编辑仍是用户显式操作入口。这里验证了打包后的真实 Chat service 与 canonical 命令读回,没有把它说成浏览器交互验收,也未声称本机共享安装已升级。PostgreSQL 存储未变,本次未跑其集成。实际两侧 ratchet 只有相同 DSH 既有 oversized function,失败全文和因果文件字节一致,保留为 inherited advisory。

我的整体评价

APPROVE。默认紧急程度来自既有结构化 owner,相关创建与回执验证复用同一 TypeScript 规则;显式意图、历史操作和执行权限没有被默认排序覆盖。当前 slice 的源码、普通安装包、实际 provider 及负例均有独立证据,未发现阻断问题。

未来改动可维护性复核:本提案已以小型共享创建函数减少多个 caller 的默认值重复,进一步迁移或抽象无需扩大本 PR。评审结论不授予合并、部署或共享 CLI 升级权限。

English verdict: APPROVE - f25af99952bd61a3f8d02d27538b0a05ce86f51d; fresh structured blockers default to P0 through one typed owner; explicit intent and historic replay survive real File/SQLite source and wheel/sdist checks, with blocked eligibility retained.

@loopx-agent
loopx-agent merged commit a7da3af into main Oct 16, 2026
5 of 8 checks passed
@loopx-agent
loopx-agent deleted the codex/semantic-todo-priority-default-20261016 branch October 16, 2026 16:17
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