Skip to content

WIP: converge governed work inputs and packaged heartbeat consumers - #7430

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

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

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Quota CLI, thin heartbeat and native Turn currently deliver overlapping inputs through different consumers. C1 composes one complete loopx_turn_envelope_v1 source before capture, preserves original work/settlement identity and reuses the TypeScript owners for references, numeric identity and recovery. Python remains the IO adapter. Writer/consumer cutover and old-reader retirement remain unfinished, so this proposal stays Draft.

The latest slice adopts the existing sparse collector and context regressions from #7661, commit 3435ef65854ede411ca494f73da18b168d404362. Context delivery and all complete consumers use that same collector: only integral floats, signed zero and unsafe integers need extra source metadata. No separate complete-path collector, digest, cache or context-selection rule is added. The independent #7654 remains open; #7661 is merged. #7657 is closed without merge, so its journal prerequisite must not be treated as shipped by that PR; reconcile its disposition against current main before cutover. The independent native launch-binding refactor #7682 is merged at 86dfa6f4d358da69242c5e660022ea4c55779458; it reuses the settlement identity boundary without activating this contract or requiring those other prerequisites. The independent full-capture IO slice #7687 removes the unused native full wire copy through the same capture owner, while retaining delta/unwrapped files. Its normal-PR head f327d9d799080ce9f76c2097a8fd359334bd8ce1 also repairs the original 4 KB reference failures through existing recovery list/select access. Source tests pass 307 cases, and seven isolated-wheel App/CLI checks pass; full reader bytes stay unchanged. Final local premerge retains two required-check timeouts, so its quality qualification is still held. C1 cutover and outcome/full-cost acceptance remain open.

The independent acceptance-reference repair #7696, normal PR head 3769a6051011f8abe8c3f42dbb2258333d3fcabf, keeps registered acceptance aliases resolvable when the existing compatibility projector relocates their inline owner. It adds no RPC, source read or schema. Final source validation passes 188 cases and the isolated installed wheel passes 56 cases; the standard local gate still retains one required semantic-scan timeout at 120.713 s. Its quality result is non-passing. A measured standalone late TS relocation was discarded: the same 100-criterion fixture grew projection input 102,680 → 344,010 bytes without changing the 102,189-byte visible output. The paired RFC preserves that negative evidence; integrated C1 should absorb sharing at its source-owning composition boundary. These component checks do not qualify model outcomes or full costs.

Sparse provenance changes the unmerged experimental binding identity. Fresh complete inputs explicitly declare hash_codec=context_source_numbers_v2; a correctly signed earlier context_source_numbers_v1 contract is refused as unsupported through seven complete consumer paths before dependent work. The same old artifact still validates with the pinned e18d46db5 reader, with bytes unchanged. Historical v0 hashes, Turn keys and receipts are unchanged. Outstanding work must not be migrated by re-signing its source. The unmerged candidate composes complete decisions at the default quota and native Turn entrypoints: merging it would change their default executable input. That transition remains inside this unfinished Draft; the existing execution authority is unchanged.

The new paired checkpoint (中文) records the matched controls, historical failure and limits. Two isolated Python 3.14.8 wheels match 1,860 product files to baseline e18d46db5 and runtime b9d1ce184. The final documentation/test commits do not change that product source.

On one immutable source with 1,000 fractional observations, 12 real composition, validation, Host, cold/delta and recovery RPCs emit request JSON 944,548 → 401,456 bytes; response JSON remains 14,345 bytes. Combined component transport falls 958,893 → 415,801 bytes (56.6%). The matched safe-integer control remains unchanged. The independent proportional-cost guard fails on the unchanged baseline and passes on the repair. Four composition-input fingerprints match across arms; an earlier separately generated-source comparison is retained as diagnostic only. This excludes framing, setup, timing, memory, model fees/work and human attention; it is not a whole-Turn or long-horizon benefit claim.

Real packaged File/SQLite CLI cases retain all 21 source/recovery predicates, immutable capture checks, compaction, corruption refusal/restoration, early-spend refusal and once-only settlement. Actual emitted warm files reconstruct exactly; lost baselines and damaged deltas restore the same full source. In namespace-width-controlled cases, warm files stay 3,839 bytes (File) and 3,847 (SQLite). Cold/observer byte differences are tiny and include varying runtime observations; they are not an attributed codec or model-input saving. The original-quota/C1 engineering comparison in merged #7665 remains pinned to its own revisions. Its counterevidence and the frozen 25,862 > 13,000 failure remain.

The preceding slice removed the unused validate_complete full-source echo in favor of the existing compact host_context check. Its pinned 68,227-byte source still documents one RPC with result JSON 68,504 → 207 bytes, request JSON 108,061 → 108,150, and a 41-byte binding addition. Those historical measurements are separate from this sparse-transport cohort; neither qualifies original-quota accepted outcomes or complete costs.

Validation for this slice:

  • 471 affected Python cases pass at runtime b9d1ce184; after freezing the paired test template, its two transport tests pass again with product source unchanged. The selected TypeScript owner ladder passes 94 cases. TypeScript compilation and Ruff pass.
  • The two explicit Python typing targets pass with silent imports. Default import traversal fails with 5,487 errors in 623 files on both pinned arms, with no new distinct error after line-number normalization. This is not a full typing pass and is distinct from the previous narrower 27-error cohort.
  • Ark Host passes 39 mock-transport protocol fixtures with the selected arkruntime 0.8.0 dependencies. Full optional SDK installation, unavailable MemT tokenizer/runtime dependencies and live provider/model behavior remain unqualified.
  • Bilingual diff, RFC index and documentation governance pass. Final local premerge result for 648104978fdd67176cccdbb765c5bc3f36bf2ca3 against pinned target 8caaf678e52019453ca3e5a2adf363c954ae2642: all seven direct checks and 19 selected checks pass, including the public-boundary scan; the overall Goal-aware gate still fails quality_stale_receipt and requires a new exact-scope reviewed receipt. CI has not been queried or triggered. These local checks do not establish independent review or merge readiness.

The candidate integrates main through 3b4641c4fc0ec314d347f74b05880bb516012049; later target 8caaf678e was fetched and inspected, not merged into the tested runtime. Its later heartbeat/settlement changes need combination qualification before cutover. Quota and thin heartbeat already reuse generic same-capture context-read --list/--select, staged replan retains the original capture, and native selection/planning plus encoding still use two calls. No mandatory outcome-specific reader is introduced.

Remaining C1 acceptance: finish actual writer/consumer cutover and old-reader exit, then compare required information, actual single-session decisions, accepted outcomes and complete costs against original quota under comparable conditions. Optional two-session controller work remains separate. No merge, live installation, release, model experiment or default promotion is part of this update.

@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>
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 29, 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>
(cherry picked from commit 4bb530c)
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

# Conflicts:
#	loopx/control_plane/quota/context_delivery.ts
#	loopx/control_plane/quota/diagnostic_projection.ts
#	loopx/control_plane/quota/turn_envelope.py
#	tests/control_plane_ts/context_source_identity.test.ts
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify

mergify Bot commented Oct 29, 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 29, 2026
…sion-composition

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

# Conflicts:
#	loopx/cli_commands/quota.py
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
(cherry picked from commit 565082c)
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>
…ntroller-decision-composition

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

# Conflicts:
#	docs/architecture/rfcs/STATUS.md
#	docs/architecture/rfcs/STATUS.zh-CN.md
#	docs/architecture/rfcs/controller-executor-unified-contract-v0.md
#	docs/architecture/rfcs/controller-executor-unified-contract-v0.zh-CN.md
#	docs/architecture/rfcs/loopx-overall-roadmap-v0.md
#	docs/architecture/rfcs/loopx-overall-roadmap-v0.zh-CN.md
#	tests/control_plane/test_codex_context_capture.py
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 29, 2026
Adopt the collector and context regressions from PR #7661, commit 3435ef6. Version the changed experimental complete binding explicitly; old all-float bindings require their pinned reader. Add a complete composition/Host/recovery transport-cost regression.

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 29, 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 29, 2026

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

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants