Skip to content

fix: deliver complete Goal narrative without generated Todo duplication - #7069

Merged
huangruiteng merged 1 commit into
mainfrom
codex/goal-intent-context-20261022
Oct 22, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/goal-intent-context-20261022

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

A Goal document with explicitly generated Todo sections currently stays a separate full-document read even after canonical task context has arrived. This delivers every byte outside those generated sections through the shared context owner, preserving arbitrary narrative, original requirements and final stops. The full-file SHA-256 and each excluded region’s role, line interval and SHA-256 retain provenance. No Goal file or canonical task is rewritten.

The filesystem adapter reuses the existing strict writer parser; TypeScript owns fulfillment. Unmarked/mixed documents keep the full progressive read. Broken markers, unexpected narrative inside generated regions, missing files, invalid UTF-8 and malformed lineage fail closed. Existing Host fixtures now initialize canonical authority through their explicit fixture conversion helper, preserving the retirement of ordinary unmigrated reads.

Validation on rebased head d1934a3768a38d9170afdca3c67211a68ad0b0e6 (base 9dfbea7eb5cb48557719ecaa7fa2c882b6f43103): 30 focused Python tests, including the current unconsumed Goal-body transport and acceptance tests, and 21 TypeScript tests passed. Standard premerge passed all direct checks and 18 selected checks. The rebase preserves metadata-only internal transport for unmarked/mixed sources introduced in #7062 and the current acceptance owner; only strictly marked sources carry consumed narrative. The branch has one signed-off commit above the verified target main.

Earlier-head qualification on 86094ab1f2ab7c6adc20c89763116887636dd93f included full typecheck, Ruff, semantic advisory and an isolated non-editable wheel with 14 File/SQLite cases and signed DSH input checks (203 modules from that installation). Those historical results are retained as earlier-head evidence, not a rerun of the new package. New-head packaged qualification and exact-head review remain pending.

This qualifies source delivery and a packaged protocol consumer. Installed App/Lark adoption, model decisions and total Turn cost remain unqualified. The unchanged cumulative acceptance and broader convergence work remain open. No new UI, capability, setting or execution authority is introduced.


Goal 文档中显式生成的 Todo 区域已由 canonical 任务上下文负责,但此前仍需额外读取整份混合文档。本次通过共享上下文 owner 原样交付生成区块以外的全部文字,保留任意正文、原始要求和末尾停止条件,同时携带完整文件与分离区域的摘要、角色和行区间。源文件和任务权威记录不变。

复用原 writer 的严格归属解析;未标记或混合格式仍完整读取,错误归属和来源失效明确拒绝。修复既有 Host 测试的显式 canonical 初始化,不恢复已退役的未迁移 Goal 普通读取。rebase 后 d1934a3 的 30 项 Python、21 项 TypeScript 及 18 项预合并检查通过,保留 #7062 对未标记来源仅传路径和修订的行为。旧头的完整类型检查与隔离安装包 14 项结果保留为历史证据;新头包资格、精确评审、安装态 App/Lark、模型实际采用和完整 Turn 成本仍待验收,不能用这项局部交付关闭整体目标。

@mergify

mergify Bot commented Oct 22, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 22, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent force-pushed the codex/goal-intent-context-20261022 branch from 86094ab to d1934a3 Compare October 22, 2026 16:10
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 22, 2026

@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 | reasoning_effort=max

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

动机

接续长任务的 Agent 和宿主,需要同时拿到原 Goal 要求、当前任务及停止条件。

带大段生成历史和任意末尾停止条件的同一 Goal,基线仍保留整文件补读;当前头传递全部非生成原文和完整来源摘要,并保留 canonical 任务全文;未标记或混合来源保留既有metadata-only内部传输和完整补读。

File/SQLite 原生 guard 和签名 DSH 协议输入均保留任意正文、CRLF、当前任务及末尾停止条件;损坏来源拒绝,恢复后可继续。

不重写 Goal 或 canonical 记录,不改变 claim、租约、结算或模型执行权限,也不截断任意长正文。

安装态 App/Lark 采用、真实模型决策和完整 Turn 成本仍未证明;本次只资格共享上下文与实际协议消费者。

改动思路

复用原 writer 的严格区域归属,Python 只读来源并产生字节补集,TypeScript 决定必读是否已满足;宿主继续消费同一签名上下文。

本 PR 交付完整非生成 Goal 原文到普通 guard 和签名宿主;不是完成 M7.4 的全部收敛、安装采用或长程效果。

固定完整原文、生成历史、任意标题/代码fence和尾部停止条件,通过File/SQLite真实CLI、签名envelope及实际DSH子进程;额外独立字面CRLF/20000段原文oracle逐字节和手工行号/hash核对。

这是默认 Goal 必读对象的明确改变:严格生成区由canonical任务上下文负责,完整非生成正文内联;不能称整文档字节等价或只改格式。未标记/混合仍全文补读。

具体改动

关键代码讲解

  1. def _source_content(:用既有 find_todo_regions 严格解析显式生成区,按原字节顺序拼接其余文本;全文hash仍包括被排除区域,并记录各段角色、行区间与hash。

  2. function completeGoalNarrative(:对非空、有序、合法角色/行号/hash的来源记录作局部解码;没有完整归属证明的文档不冒充已送达。

  3. export function projectInteractionWorkContext(:完整非生成来源内联后才移除对应补读;混合/未标记保持原补读,错误来源保留补读并使依赖交付不可用。

其余改动已逐项检查:完整来源、故障恢复及签名Host回归,已有Host fixture改用显式canonical初始化;两份RFC与required-work-context同步解释默认交付改变和未资格范围,未复制新的决策owner。

原规范:docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md,不可变修订 9dfbea7eb5cb48557719ecaa7fa2c882b6f43103。以下按变更前规范映射,新增说明不能自行证明实现:

  • Full requirements:implemented。Full Goal intent, authoritative current work and scoped User obligations remain complete; source failure holds dependent delivery. 验证沿上述真实路径,保持当前切片与父目标的边界。
  • Replan / Goal closure:implemented。Retain full replan clauses and evidence route; Todo completion is not Goal completion. 验证沿上述真实路径,保持当前切片与父目标的边界。
  • Settlement / scheduler:implemented。Host effect ownership and exact original settlement remain separate from context projection. 验证沿上述真实路径,保持当前切片与父目标的边界。

对主干的风险

本次旧86094头在发布前变化,因此没有发表旧结论。新头完整8文件302/-42重新判断:两份RFC、TS owner及其测试等5个blob可沿原证据逐项核对;当前Python来源适配器、未标记对照和说明重新读取。主干已接受的#7062语义保留:未标记/混合来源仍只在内部桥接传路径与全文修订,Agent仍须全文补读;只有明确生成归属的来源才传送实际消费的完整非生成原文。重新运行真实消费者、验收、包及类型检查,不继承旧verdict。

不可变基线上的同一冻结14例为8失败/6通过;当前对应14例通过。旧fixture用未迁移普通读取创建canonical的失败改由既有显式fixture转换修复,没有恢复产品已退役的读取路径。

30项Python(当前28来源/真实Host/验收+2未消费正文传输)、21项TS、完整control-plane类型检查和Ruff通过;真实普通2.1.0 wheel的14当前矩阵+2独立字面oracle+2正文传输共18项通过,1146个已加载产品模块全部来自该非editable安装。新base/head同一冻结14例仍为base8失败6通过/head14通过。当前premerge六direct十八selected通过,零manual hold。

最大的风险是把未知文字误当生成内容或错误满足必读。当前只复用原显式writer grammar,不用substring/prose主题猜测;代码fence里的假标题和末尾任意正文均保留,源文件与权威记录无重写。 另外检查当前普通wheel的CRLF字节、20000段未知正文、手工行区间和hash,不以输出变短替代语义。未标记/混合文档的补读、scope/ordering与停止条件保留,签名篡改在真实协议入口拒绝。

普通wheel版本为该精确头的2.1.0;未安装到共享运行时。没有真实模型、App/Lark安装采用或完整成本改善证据;当前远端冲突只作独立合并事项。 没有模型调用,没有共享安装;新头的精确readiness及合并权限仍需单独处理,本轮不观察CI。

我的整体评价

批准这个共享上下文交付增量。long_horizon为preserved,UX为preserved:完整要求与恢复条件到达同一实际消费者,同时减少已归属生成历史的重复全文读取;没有测得总成本或模型理解收益。原writer负责生成归属、TS负责必读满足,边界比另写主题分类器更容易验证和回滚。

复用原 writer 的严格区域归属,Python 只读来源并产生字节补集,TypeScript 决定必读是否已满足;宿主继续消费同一签名上下文。 本 PR 交付完整非生成 Goal 原文到普通 guard 和签名宿主;不是完成 M7.4 的全部收敛、安装采用或长程效果。

视觉判断:已检查本头两处上下文实现、原必读说明、RFC及DSH输入;没有渲染、样式或响应布局改动,因此不要求截图,也不主张视觉改进。

尚未资格:不适用于渲染界面;真实模型理解、安装态采用和整轮成本仍未资格。

保留原权威和原操作身份;不执行合并、安装或额外消息。本结论只绑定 d1934a3768a38d9170afdca3c67211a68ad0b0e6,新head必须重新评审。

English verdict: APPROVE — d1934a3768a38d9170afdca3c67211a68ad0b0e6. Verbatim non-generated Goal context reaches native File/SQLite guards and actual signed DSH protocol input; malformed sources fail and recover. Source/package qualification only; model benefit, installed adoption and total Turn cost remain open.

@huangruiteng
huangruiteng merged commit 6e80ee0 into main Oct 22, 2026
25 of 50 checks passed
@huangruiteng
huangruiteng deleted the codex/goal-intent-context-20261022 branch October 22, 2026 17:11
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