Skip to content

C1: converge complete Turn decisions and inspection callers - #7430

Draft
loopx-agent wants to merge 86 commits into
mainfrom
codex/controller-decision-composition
Draft

loopx-agent wants to merge 86 commits into
mainfrom
codex/controller-decision-composition

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Problem and current behavior

Quota, Turn and heartbeat callers previously composed overlapping decision/context inputs. This C1 candidate composes one complete executable source before capture through the existing TypeScript owner, with Python retaining source/IO transport. Fresh executable input uses loopx_turn_envelope_v1 and the existing numeric-identity/edit codec; signed executor projections must agree with that source on identity, authority, action and settlement before dispatch. Historical journals retain their original reader, bytes, Turn keys and settlement identity.

The candidate integrates main 1b81d782a18991e579d41fc7d9e7a904d4f01eb2, including the native full/delta cost comparison and first-read entrypoint. Current head is d598e5e9e12d52b5171bc7af3e21bb75bb719d9a; its final commit migrates CLI test consumers, with product code unchanged from the preceding integration. Native context delivery remains opt-in; this does not promote two-session operation or install a running product.

Draft is retained for concrete unfinished implementation: crowded/default and complete quota presentation still fail the existing output budgets, and remaining complete-contract callers/readers require migration. Review or CI waiting is not the reason for Draft.

Delivered change

  • Complete composition precedes capture. The original host-poll receipt is attached once; source and action-projection lineage, integrity and authority are validated before host dispatch and settlement.
  • Acceptance, authoring, Vision and task sharing use the existing TypeScript exact numeric identity and edit transport. Native planning/encoding share the existing context_delivery transaction; displaced duplicate algorithms and the standalone planner RPC are removed.
  • Default turn plan stops printing a second complete contract beside its inspection envelope. boundary.inspection_only=true prevents promoting that projection to a source-less host request, including after transaction/session fields are restored.
  • Existing structured consumers of --include-transaction-detail retain their complete source and session/transaction input. Actual run-once and its owning backend retain the complete contract. Selected action, boundaries and writeback routes remain in default inspection.
  • Mainline reader integration preserves same-capture full recovery, first-read navigation, selection/digest-bound continuation and total emitted-reference/page-cost comparison. It does not establish model retention or comprehension.
  • Remaining CLI test consumers now read the same complete version, preserve full Todo/Goal-boundary/Vision diagnostics, and independently follow same-summary references. Cross-invocation comparisons validate each original source before excluding receipt-dependent hashes. The former envelope alias test verifies its original complete host binding without executing a second admission as recovery. This is consumer qualification, not a new runtime optimization.

The same existing one-Todo/one-Agent/one-run fixture measured 35,945 → 11,330 characters for default plan; original main is 10,559 and the original 14,000 ceiling is unchanged. The candidate remains larger than original quota/plan baselines in other paths; a local byte reduction is not task effectiveness or complete-cost evidence.

Validation and failures

All execution here uses public/synthetic fixtures or deterministic loopback inference. No external model, paid/scientific run, live install, merge or CI query/manual trigger is part of this update.

Check Evidence and boundary
File/SQLite default/detail inspection plus complete Codex preview 8 passed; default rejection and actual complete-source consumption are both exercised
Real CLI/Host capture and recovery 54 passed; original captured input, source changes, negative lineage/refusal and adapter paths
Exact-head Python complete decision / real Host capture / driver / executor 384 passed at e95467d840cabca299d3754cf5c1fd2cc7760acc, 221.11 s
Integrated decision/first-reader/cost/driver/executor suite 356 passed before the final mainline host-binding extraction; reader/TypeScript inputs unchanged by that extraction
Full TypeScript owners/consumers 5,810 passed / 77 skipped, zero failures/cancellations, 308.48 s; final mainline merge changes no TypeScript source/test inputs
Exact-head quick premerge Passed; this does not waive the separately reproduced output failures below or grant merge authority
Bilingual RFC, public-boundary scan and DCO Paired staged/exact-head checks pass; 106 changed paths classified/scanned, no private-pattern finding or untracked artifact; both integration commits signed
Complete source and real Host refusal/recovery consumers 117 passed, 116.48 s, on the unchanged product source used by the current head
Complete CLI output module 5 failed / 35 passed / 1 skipped, 25.38 s, at the current head; all five budget failures remain author delivery holds
Latest test-only change Ruff, diff checks, explicit-path public scan, staged/exact-head bilingual checks and DCO pass; no runtime source or budget constant changed

Current matched plan measurements against main 62390312506d0087b4bd9433e59ef24c01ea6235 use the unchanged public fixtures and paths:

Fixture Main Candidate Existing character ceiling
Small 10,559 11,330 14,000
Crowded 15,492 24,045 22,500
Crowded with Vision 18,955 27,508 22,500
Multi-agent 10,306 14,847 15,500

Passing an absolute cell does not establish the independent growth/line budget. Complete quota Markdown still emits 30,428 > 10,000 characters. The former envelope-mode budget remains 24,224 > 13,000, and the complete thin prompt with all supported capability/CLI routes remains 4,981 > 4,900. These, the two crowded plan variants, and the matrix growth/line checks remain unresolved. Ten obsolete v0 path/diagnostic/hash assertions were migrated; the earlier 15 failed / 25 passed / 1 skipped observation remains historical evidence, not a budget pass. Resolve the remaining wire/owner cost without dropping full registered Goal material, unknown controls, required clauses, or raising limits to hide failures.

An initial inspection change incorrectly omitted the complete contract even from explicit transaction detail. Its 4 failures/44 dependent setup errors are retained; restoring detailed complete input fixed that regression. They are not baseline failures or passing skips.

Historical evidence keeps its original source/version: 96bba8f Python 1,870 passed / 53 skipped; TypeScript 5,757 passed / 76 skipped; earlier 0.163 native16 and isolated-wheel10 checks at 5a8453e4b. These do not qualify the current 0.166 native host or installed App. Earlier 25,862 > 13,000 and 102,680 → 344,010-byte cost failures remain failures.

Remaining C1 acceptance

  1. Complete the remaining carrier/caller presentation and budget repair, preserving full required semantics and original single-session quota as the primary baseline.
  2. Finish the supported-reader/compatibility exit inventory and real refusal/recovery/rollback qualification. Optional MemT exact-lifetime and SDK/PostgreSQL gaps remain explicit.
  3. Qualify actual decisions, accepted task outcomes and complete costs under comparable conditions. State survival, reduced output and successful transport alone do not establish adoption or benefit. Two-session evaluation stays separate.

The original bilingual C1 RFC and source-convergence checkpoint remain open. This update grants no default promotion, historical-reader retirement, model benefit or merge readiness. No visual surface/layout change is introduced.

Written by: model_agent; OpenAI GPT-6 (Codex).

@mergify

mergify Bot commented Oct 27, 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 needs-rebase Mergify: the pull request has merge conflicts with its base branch and removed needs-rebase Mergify: the pull request has merge conflicts with its base branch labels Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 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 27, 2026
@loopx-agent loopx-agent changed the title WIP: compose one complete Turn contract before capture WIP: unify captured Turn inputs and scoped outcome delivery Oct 27, 2026
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 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 27, 2026
@loopx-agent
loopx-agent force-pushed the codex/controller-decision-composition branch from a4e077f to 307d000 Compare October 27, 2026 19:45
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 27, 2026
@loopx-agent
loopx-agent force-pushed the codex/controller-decision-composition branch 4 times, most recently from 72b88cc to 6e84e81 Compare October 28, 2026 00:11
@loopx-agent loopx-agent changed the title WIP: unify captured Turn inputs and scoped outcome delivery WIP: unify governed Turn inputs and shared decision consumers Oct 28, 2026
@loopx-agent
loopx-agent force-pushed the codex/controller-decision-composition branch from 6e84e81 to 37618d8 Compare October 28, 2026 00:53
@mergify

mergify Bot commented Oct 28, 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 28, 2026
@loopx-agent
loopx-agent force-pushed the codex/controller-decision-composition branch from 37618d8 to 6e3cf81 Compare October 28, 2026 08:01
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 30, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify

mergify Bot commented Oct 30, 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 30, 2026

songoow commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Token 优化建议:把验收落到实际消费链与完整成本

针对本 Draft 当前 head 35e4ef22674a2000b22a96241a7cdd7c3ae3ba33 的后续设计建议。本条沿用 PR 已声明的 C1/C2 和 single-session 方向,不把内部 source 合并等同于已交付的 token 收益,也不新增合并阻塞项。

可以优先验证实际 caller 对已有入口的采用。当前 main 21367015cce45294dcf99f54a3211d66f5d842c5 已有同 capture 的批量选读、staged replan reader,以及 settlement_command=refresh-state … --settle-turn;其 Turn envelope 明确要求 settled readback 后不再手动 quota step。建议下一片复用现有 typed settlement owner,验证这些入口是否实际减少调用,而非增加一层结算或把原本合法的分步协议视为错误。当前 stride producer 也已经投递原 explore revision,不能用自动猜测 revision 来缩短恢复。

建议把同来源、同任务状态的 original quota / candidate 对照组织为四条消费者路径:

路径 应证明的行为
冷态选择 目录和必要详情能支持正确选择;小任务也保留 staging 反而更贵的样本
已准入任务继续 同 capture 内批量读取必要字段,避免不必要的根目录再发现;必读约束仍被消费
重规划 原 evidence revision、候选及反证影响实际选择,写回后完成原身份结算
读取中断恢复 使用原 capture/recovery;detail 缺失、截断及来源更新得到明确处理,不通过重新 admission 绕过约束

每条都贯通 entry → review/必要详情 → 实际工作 → writeback → settled readback,保持原 identity、lease/freshness、验证和幂等扣额。原计划中 completion、blocked/no-spend、失败恢复等分支继续适用,不能机械把所有路径替换为组合命令。

成本可复用现有 request usage 计量,记录入口正文、全部工具回执与补读、分页、失败恢复、模型请求数、input/cached/output token、压缩请求,以及到达有效工作的时间。若以后采用 controller/executor 两个会话,两边及交接都计入。单个响应字节下降、少一次 CLI 或内部 source 收敛可以证明局部工程变化;净 token 和费用收益仍需完整请求对照。

语义样本建议显式覆盖:候选正文尾部的决定性约束、显示范围之外的有用替代项、跨 Agent 依赖和反证、未知相关性。未知 scope 回到完整来源;只读目录不证明隐藏正文已读,已选 Todo 也不证明其他候选都无关。验收应检查这些事实是否实际改变选择或约束执行。

验证边界:我在上述 main 运行了三个真实 SQLite 源码 CLI 用例,普通 progress/completion 的组合 refresh/settle 两例通过,staged review/writeback 一例通过;前两例覆盖原 Turn 身份与重放单次扣额,第三例覆盖原 capture/digest、无 registry reader、篡改拒绝和有效语义写回。第三例最后使用 fixture refresh,不能扩大为完整 stride+组合结算资格。它们不是此 Draft 的全量验证,也未运行模型或长程 benchmark。

这是一项非阻塞的消费者采用与验收建议;不改变本 PR 已披露的 Draft 状态和剩余资格缺口。

Reviewer: actor_kind=model_agent; model=GPT-6 Astra Pro; provider=OpenAI; declaration_source=self_reported.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 1, 2026
@loopx-agent loopx-agent changed the title WIP: converge governed work inputs and packaged heartbeat consumers C1: converge complete Turn decisions and inspection callers Nov 1, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

3 participants