Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
daa5e3b
Make the complete work contract the ordinary quota CLI default
loopx-agent Nov 21, 2026
d4174aa
Retire legacy Turn format selectors from current hosts
loopx-agent Nov 21, 2026
de0820c
Exercise staged replan and acceptance through the current source
loopx-agent Nov 21, 2026
5a2a99e
Verify native Goal capture refusal through the handoff option
loopx-agent Nov 21, 2026
7d91cc1
Align C1 cutover qualification, upgrade guidance, and fixtures
loopx-agent Nov 22, 2026
104c2bb
Keep public release qualification separate from the C1 source cutover
loopx-agent Nov 22, 2026
c1c96f5
Use local Effect pipes in generated POSIX Codex App shells
loopx-agent Nov 22, 2026
461b77c
Exercise acceptance read failure on the original C1 turn
loopx-agent Nov 22, 2026
47f6951
Qualify C1 releases and keep saved App loaders working
loopx-agent Nov 22, 2026
af44cd4
Exercise saved context through the default C1 guard
loopx-agent Nov 22, 2026
1c2ebc5
Keep archive updates working across the C1 publication cutover
loopx-agent Nov 22, 2026
9fa0775
Hold automatic main updates until the C1 profile qualifies
loopx-agent Nov 22, 2026
b8d0471
Gate stable Runtime and Desktop publication on C1 adoption
loopx-agent Nov 22, 2026
f7ccb05
Integrate main's vision audit with the default C1 quota entry point
loopx-agent Nov 22, 2026
5b34c45
Merge commit 'cf3e6ec72449d83b9e9a79c0c357333aa071d829' into codex/c1…
loopx-agent Nov 23, 2026
b5eec96
Keep GitHub Latest on the verified LoopX release
loopx-agent Nov 23, 2026
39f2186
Test scheduled waits through the captured thin heartbeat prompt
loopx-agent Nov 23, 2026
f008e28
Merge commit 'f52dec0fe1e59ebbe88558c744aae92f41d0d663' into codex/c1…
loopx-agent Nov 23, 2026
7ba8a45
Test monitor guidance through the captured thin prompt
loopx-agent Nov 23, 2026
4125831
Merge commit '217e59e1299b62d2089c17425b75016f41cce4c3' into codex/c1…
loopx-agent Nov 23, 2026
f74a877
Merge origin/main into codex/c1-default-retire-legacy-20261121
loopx-agent Nov 23, 2026
816c255
fix(checkpoint,tests): accept renderer prequota guard line and drop r…
loopx-agent Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/desktop-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'apps/desktop/**'
- 'scripts/desktop_*'
- 'tests/desktop/**'
- 'loopx/cli_commands/public_default_contract.json'
- 'loopx/cli_commands/update_artifact.py'
- '.github/workflows/desktop-updater.yml'
release:
types: [published]
Expand Down Expand Up @@ -294,13 +296,23 @@ jobs:
# nullglob, Bash passes the unmatched pattern to `gh`, which exits
# before the feed and channel pointer are published.
shopt -s nullglob
channel_action="$(python - <<'PY'
from loopx.cli_commands.update_artifact import PUBLIC_DEFAULT_CONTRACT, public_channel_allows_default
print("promote" if public_channel_allows_default(PUBLIC_DEFAULT_CONTRACT) else "hold")
PY
)"
if [ "$EVENT_NAME" != release ]; then
gh release create "$RELEASE_TAG" --prerelease --target "$SOURCE_REF" --title "Desktop main $SOURCE_REF" --notes "Signed App and matching runtime preview."
gh release create "$RELEASE_TAG" --prerelease --latest=false --target "$SOURCE_REF" --title "Desktop main $SOURCE_REF" --notes "Signed App and matching runtime candidate for exact-revision qualification."
fi
for artifact in dist/updater/*.gz dist/updater/*.sig dist/updater/*.exe; do
gh release upload "$RELEASE_TAG" "$artifact"
done
gh release upload "$RELEASE_TAG" dist/updater/desktop-updater.json --clobber
if [ "$channel_action" != promote ]; then
echo "::notice title=Desktop channel retained::The candidate's default contract is pending public channel qualification."
exit 0
fi
# Channel pointers are independent of repository Latest, which also
# serves separately versioned plugin releases. Advance only after the
# immutable signed assets and feed are completely uploaded.
Expand Down
49 changes: 19 additions & 30 deletions .github/workflows/runtime-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- "tests/test_runtime_snapshot_publication.py"
- "tests/test_update_artifact.py"
- "scripts/install*.sh"
- "loopx/cli_commands/public_default_contract.json"
- "loopx/cli_commands/update*.py"
- "loopx/cli_commands/support_control_update*.py"
- "loopx/self_update*.py"
Expand Down Expand Up @@ -92,48 +93,36 @@ jobs:
set -euo pipefail
# Validate the downloaded qualification before any remote mutation.
# Successful installation alone does not qualify outcome/cost claims.
revision="$(python - <<'PY'
import hashlib
publication="$(python - <<'PY'
import json
from pathlib import Path
import re
import sys
sys.path.insert(0, str(Path.cwd()))
from loopx.cli_commands.update_artifact import validate_default_contract
from loopx.cli_commands.update_artifact import (
public_channel_allows_default, validate_published_manifest, verify_runtime_installation_qualification,
)
root = Path("runtime")
manifest_bytes = (root / "loopx-runtime.json").read_bytes()
manifest = json.loads(manifest_bytes)
manifest = validate_published_manifest(json.loads(manifest_bytes))
revision = manifest["source_revision"]
if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision):
raise SystemExit("Invalid runtime source revision")
qualification = json.loads((root / f"qualification-{revision}.json").read_bytes())
checks = ("ok", "clean_install", "upgrade", "doctor", "skills", "frontend_bundle_contract",
"frontend_http", "no_frontend_build_tools", "license_notices", "activation_failure_restored")
if any(qualification.get(check) is not True for check in checks):
raise SystemExit("Runtime installation qualification is missing or failed")
default_contract = validate_default_contract(manifest.get("default_contract"))
if qualification.get("default_contract") != default_contract:
raise SystemExit("Runtime default-contract qualification is missing or mismatched")
if manifest["channel"] != "main" or any(qualification.get(key) != manifest[key]
for key in ("source_revision", "channel", "sha256")):
raise SystemExit("Runtime qualification does not match the candidate")
archive = root / f"loopx-runtime-{revision}.tar.gz"
with archive.open("rb") as stream:
digest = hashlib.file_digest(stream, "sha256").hexdigest()
if type(manifest["size"]) is not int or type(qualification.get("bytes")) is not int or (
archive.stat().st_size != manifest["size"] or qualification["bytes"] != manifest["size"]
or digest != manifest["sha256"]):
raise SystemExit("Qualified runtime bytes differ from the candidate")
verify_runtime_installation_qualification(manifest, qualification, archive, channel="main")
if (root / f"loopx-runtime-{revision}.json").read_bytes() != manifest_bytes:
raise SystemExit("Immutable runtime metadata differs from the channel candidate")
print(revision)
channel_action = "promote" if public_channel_allows_default(manifest["default_contract"]) else "hold"
print(revision, channel_action)
PY
)"
read -r revision channel_action <<< "$publication"
# Only main revisions may be published, even when the channel is held.
relation="$(gh api "repos/${GITHUB_REPOSITORY}/compare/${revision}...main" --jq .status)"
if [[ "$relation" != ahead && "$relation" != identical ]]; then exit 1; fi
# Keep each immutable snapshot below GitHub's per-release asset cap.
# The existing channel release retains its historical assets and URL.
# These candidates can be tested by exact revision before adoption.
tag="runtime-main-${revision}"
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release create "$tag" --repo "$GITHUB_REPOSITORY" --target "$revision" --prerelease --latest=false --title "Qualified main runtime ${revision}" --notes "Immutable runtime snapshot. Stable users continue with PyPI or the stable runtime."
gh release create "$tag" --repo "$GITHUB_REPOSITORY" --target "$revision" --prerelease --latest=false --title "Main runtime candidate ${revision}" --notes "Immutable runtime snapshot for exact-revision qualification."
fi
actual="$(gh api "repos/${GITHUB_REPOSITORY}/commits/${tag}" --jq .sha)"
if [[ "$actual" != "$revision" ]]; then exit 1; fi
Expand All @@ -148,10 +137,10 @@ jobs:
gh release upload "$tag" "$file" --repo "$GITHUB_REPOSITORY"
fi
done
# Publication is serialized. A qualified ancestor is usable while a
# newer main is still building; never publish a non-main revision.
relation="$(gh api "repos/${GITHUB_REPOSITORY}/compare/${revision}...main" --jq .status)"
if [[ "$relation" != ahead && "$relation" != identical ]]; then exit 1; fi
if [[ "$channel_action" != promote ]]; then
echo "::notice title=Runtime channel retained::The candidate's default contract is pending public channel qualification."
exit 0
fi
if ! gh release view runtime-main --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release create runtime-main --repo "$GITHUB_REPOSITORY" --target "$revision" --prerelease --latest=false --title "Latest qualified main runtime" --notes "Mutable channel metadata points to immutable revision releases. Stable users continue with PyPI or the stable runtime."
fi
Expand Down
21 changes: 8 additions & 13 deletions apps/desktop/loopx-control-plane/src-tauri/src/macos_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use flate2::read::GzDecoder;
use serde_json::Value;
use tauri_plugin_updater::Update;

const ARTIFACT_CONTRACT_POLICY: &str =
const ARTIFACT_DEFAULT_CONTRACTS: &str =
include_str!("../../../../../loopx/cli_commands/public_default_contract.json");

/// Read the publisher's observed contract inside the signature-verified bytes
Expand All @@ -31,8 +31,9 @@ pub(crate) fn qualify_candidate(
}
let invalid = "runtime_bundle_invalid";
let unavailable = "update_platform_unavailable";
let policy: Value = serde_json::from_str(ARTIFACT_CONTRACT_POLICY).map_err(|_| invalid)?;
let supported = policy["readable_contracts"].as_array().ok_or(invalid)?;
let supported: Value = serde_json::from_str(ARTIFACT_DEFAULT_CONTRACTS).map_err(|_| invalid)?;
let current = supported.get("current").ok_or(invalid)?;
let historical = supported.get("historical").ok_or(invalid)?;
let identity_path = Path::new("LoopX.app/Contents/Resources/runtime/identity.json");
let mut archive = tar::Archive::new(GzDecoder::new(Cursor::new(verified_bytes)));
let mut qualified = false;
Expand All @@ -51,7 +52,7 @@ pub(crate) fn qualify_candidate(
.get("default_contract")
.filter(|contract| contract.is_object())
.ok_or(unavailable)?;
if !supported.contains(observed) {
if observed != current && observed != historical {
return Err(unavailable.into());
}
qualified = true;
Expand Down Expand Up @@ -221,15 +222,9 @@ mod tests {
assert!(qualify_candidate("stable", "2.3.0", &bytes).is_ok());
}

for (surface, schema_version) in [
("quota_packet", None),
("complete_turn", Some("loopx_turn_envelope_v1")),
] {
identity["default_contract"] = serde_json::json!({
"surface": surface,
"schema_version": schema_version,
"interaction_schema_version": "loopx_interaction_contract_v0"
});
let qualified: Value = serde_json::from_str(ARTIFACT_DEFAULT_CONTRACTS).unwrap();
for contract in ["historical", "current"] {
identity["default_contract"] = qualified[contract].clone();
fs::write(&identity_path, identity.to_string()).unwrap();
let bytes = archive(&candidate);
crate::prepared_update::save(&cache, "main", version, "unused", &bytes).unwrap();
Expand Down
34 changes: 12 additions & 22 deletions benchmark/edgebench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ effective work Turns** by default. Use `--replan-after-turns N` to set a differe
count (1–6); `--replan-after-turns 3` retains the previous benchmark default.
Use `--replan-after-todos 3` for the previous completed-Todo cadence
as an explicit ablation. The two options are mutually exclusive and require a
heartbeat profile. This default is independent of `--task-entry`, feedback mode,
and `--turn-envelope`. Official, single and native-goal profiles are unchanged.
heartbeat profile. This default is independent of `--task-entry` and feedback mode.
Official, single and native-goal profiles are unchanged.

The shared control plane counts settled work Turns, not tool calls or idle wakes;
other replan reasons may trigger sooner. Both runtime and worker-profile receipts
Expand Down Expand Up @@ -1005,26 +1005,16 @@ review, proposal adoption and task gains require trajectory evidence.

## Quota input and historical Short

Current C1 sources give both heartbeat profiles the complete v1 input by
default. `--complete-turn` explicitly requests the complete contract, including
on supported historical product revisions. Context delivery remains a separate
setting. The [Host protocol](../../docs/reference/protocols/turn-envelope-v0.md#explicit-complete-v1-host-entry--显式完整-v1-host-入口)
documents original captures, readback and settlement.

For a historical Short benchmark arm, use its recorded product and runner
revisions. With `--turn-envelope`, the current worker verifies the selected CLI's
actual v0 response using a read-only preview before starting a model. C1 or an
unavailable preview rejects the request. A `fresh_replan` checkpoint preloads a
different view and is incompatible with Short. Inspect the wake's
`quota_input_contract` eligibility and the actual saved decision before using
a result in a comparison. Include startup and wake costs under the same study
protocol.

中文:当前 C1 的两种 heartbeat profile 默认交付完整 v1,`--complete-turn`
也可在支持的历史产品版本中显式选择完整输入。旧 Short 组应按记录的产品和 runner
版本复现。当前 worker 在启动模型前用只读预演核实 v0,回执
`quota_input_contract` 记录预期、实测版本与资格。C1 或无法核实的来源会拒绝请求。
`fresh_replan` 会预载另一种输入,因此不能与 Short 合用。
Both heartbeat profiles use complete v1. Context delivery remains a separate
setting. See the [Host protocol](../../docs/reference/protocols/turn-envelope-v0.md#complete-v1-host-entry--完整-v1-host-入口)
for original captures, readback and settlement.

Reproduce historical Short and explicit Complete treatments on their recorded
product and runner revisions. Review the original decision, wake receipt and
complete startup and wake costs before using the result in a comparison.

中文:两种 heartbeat profile 默认使用完整 v1,交付传输单独配置。复现历史 Short
或显式 Complete 组时按原产品和 runner 版本执行,并核对原决策、回执和完整成本。

## Close a managed native attempt

Expand Down
13 changes: 2 additions & 11 deletions benchmark/edgebench/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from sforge.harness.run_agent import run_agent
from sforge.harness.task_spec import make_task_spec

from benchmark.runtime.codex import TASK_ENTRIES, turn_envelope_receipt
from benchmark.runtime.codex import TASK_ENTRIES
from loopx.reasoning_effort import REASONING_EFFORTS
from loopx.control_plane.work_items.stride_policy_codec import stride_strategy_options
from benchmark.runtime.sforge import (
Expand Down Expand Up @@ -124,11 +124,6 @@ def main(argv=None):
help="New-run default: native public feedback; blind/best-only are explicit controls")
parser.add_argument("--managed-run-json", type=Path,
help="Opt-in private binding for native terminal proof, consumed by the controller")
turn_view = parser.add_mutually_exclusive_group()
turn_view.add_argument("--turn-envelope", action="store_true",
help="Historical Short envelope treatment; the worker requires a verified v0 quota response")
turn_view.add_argument("--complete-turn", action="store_true",
help="Explicit complete v1 Turn contract with shared exact-Turn settlement; heartbeat workers only")
parser.add_argument("--context-delivery", choices=("off", "on"),
help="Native Codex context delivery: on by default for heartbeat workers; pass off to disable")
parser.add_argument("--execution-observation", choices=("local_probe",),
Expand Down Expand Up @@ -213,8 +208,7 @@ def main(argv=None):
try:
execution = profile_execution(
args.worker, task_entry=args.task_entry,
context_delivery=args.context_delivery, turn_envelope=args.turn_envelope,
complete_turn=args.complete_turn, validation_command=args.validation_command_json,
context_delivery=args.context_delivery, validation_command=args.validation_command_json,
native_child_limit=args.native_child_limit,
)
except ValueError as error:
Expand Down Expand Up @@ -462,8 +456,6 @@ def main(argv=None):
task_objective=task_objective,
task_entry=args.task_entry,
validation_command=execution.validation_command,
turn_envelope=args.turn_envelope,
**({"complete_turn": True} if args.complete_turn else {}),
context_delivery=args.context_delivery,
**({"execution_observation": args.execution_observation}
if args.execution_observation is not None else {}),
Expand Down Expand Up @@ -548,7 +540,6 @@ def main(argv=None):
"loopx_commit": pins[0], "runner_commit": pins[1],
"sforge_source": sforge_source if native_result_scope is not None else active_source_receipt(),
"local_docker_images": local_docker_images,
**turn_envelope_receipt(explicit=args.turn_envelope, complete=args.complete_turn),
**({"context_delivery": "on"} if args.context_delivery != "off" else {}),
**({"execution_observation": args.execution_observation}
if args.execution_observation is not None else {}),
Expand Down
38 changes: 14 additions & 24 deletions benchmark/runtime/RUNTIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,30 +105,22 @@ and scoring. EdgeBench's SForge auto-resume remains a provider-specific part of
its official profile. Use a fresh trial with the option omitted for a
single-pass Codex baseline.

Historical Short trials request `turn_envelope: true` in heartbeat `kwargs`.
Before planning or execution starts a model, the worker previews the selected
product's quota response through the same CLI. Its wake receipt records the
expected and observed versions and eligibility in `quota_input_contract`. C1
sources return v1 and the Short request fails before Host preparation. A
`fresh_replan` checkpoint preloads a distinct view and also prevents a Short
launch. The preview has no Turn identity and creates no admission or capture.
Ordinary and explicit Complete wakes proceed without this Short preview.

Use the recorded product and runner revisions to reproduce a historical
treatment. On a qualified v0 source, an execution wake records
`turn_envelope_source=explicit` once it renders the Short bootstrap. Its
same-invocation full decision remains available through `detail_ref.full_decision`.
The planning prompt has its own input. Include the preview in startup
and wake cost when measuring a new attempt with this runner. Keep captures
private and preserve the settings and receipts of existing attempts.
### Historical heartbeat formats

Historical Short trials used `turn_envelope: true` and verified a v0 guard
response before launching a model. Reproduce them with their recorded product
and runner revisions. Include the original preview in startup and wake cost.
The current runner rejects explicit historical display requests before Host
preparation. Current heartbeat runs use the complete v1 default. Preserve the
original decision, preview eligibility and complete settings of frozen runs.

New native heartbeat trials default to context delivery `on`. Add
`context_delivery: "off"` to the same heartbeat agent `kwargs` to disable it.
An explicit off is pinned into both native tools and worker preflight; it cannot
inherit a machine-wide on. Plain, native-Goal and Turn execution remain off.
Only the existing Codex heartbeat worker accepts `"on"`; booleans, other modes and
scenario names are rejected. This is an experimental transport setting, separate
from `turn_envelope`.
scenario names are rejected. This transport setting preserves the default
complete v1 source.
The existing EdgeBench/SForge entry exposes the same selection through
`--context-delivery off` to disable a heartbeat worker's on default. Existing
running or frozen trials retain their recorded source and treatment; do not
Expand Down Expand Up @@ -248,12 +240,10 @@ Do not modify an active/frozen trial. Set `context_delivery: "off"` for a new tr
to roll back; default runs install no hooks, trust or trace settings. No scorer,
budget, task semantics or launch authority changes with this option.
Checkpoint capture is independent of this display experiment. A `fresh_replan`
declaration may establish a private capture/handoff socket while
`turn_envelope` remains false: the worker keeps the ordinary dispatcher and quota
input, and only an explicit true setting selects the short view. This replaces
the earlier implicit activation by checkpoint handoff. Do not relabel older
receipts or trajectories as feature-off; qualify their actual input separately.
A `fresh_replan` declaration can establish a private capture and handoff socket
with either inline or progressive delivery. Both consume the same complete v1
decision. Interpret old receipts and trajectories according to their recorded
treatment and product revision.

| Mode | Execution/continuation | LoopX skills and state |
| --- | --- | --- |
Expand Down
Loading
Loading