Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ from host submission and from each other.

### Real-host qualification

`examples/peer-handoff-live-smoke.py` is an explicit opt-in qualification of the
`examples/peer-handoff-live-qualification.py` is an explicit opt-in qualification of the
existing Codex app-server adapter and the same request/return CLI. It creates
two synthetic host threads in the selected authenticated home, a disposable
Goal/registry/runtime, and a bounded artifact pinned to the checkout head and
Expand All @@ -263,9 +263,15 @@ SHA-256. It does not resume a user thread or create replacement child workers.
From the source checkout:

```bash
uv run --extra test python examples/peer-handoff-live-smoke.py --execute-real-host
uv run --extra test python examples/peer-handoff-live-qualification.py --execute-real-host
```

The qualification filename keeps this paid host run outside the automatically
discovered `*-smoke.py` fleet. Ordinary offline coverage remains in
`tests/test_peer_collaboration.py` and `tests/control_plane/test_peer_host_route.py`;
neither default CI nor the public smoke fleet
authorizes model calls or host thread creation.

On Windows select `--codex-bin codex.cmd` if the installed launcher needs it.
The command consumes model quota and leaves the host's own test-thread records
in that home; no authentication or session records are copied between homes.
Expand Down
1 change: 1 addition & 0 deletions examples/capability-extension-registry-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def run_cli(runtime_root: Path, *args: str) -> dict[str, object]:
"performance-diagnosis",
"reliability-diagnostics",
"progress-review-sentinel",
"goal-capability-organization",
]
assert all(item["provider_id"] == "loopx-core" for item in builtin_capabilities)
value_summary = next(
Expand Down
22 changes: 19 additions & 3 deletions examples/control_plane/todo-first-open-summary-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
sys.path.insert(0, str(REPO_ROOT))

from loopx.quota import build_quota_should_run, render_quota_should_run_markdown # noqa: E402
from loopx.control_plane.scheduler.execution_context import ( # noqa: E402
GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
from loopx.control_plane.todos.active_state_todo_parser import ( # noqa: E402
parse_active_state_todos as parse_active_state_todos_read_model,
)
Expand Down Expand Up @@ -230,6 +233,7 @@ def assert_blocked_priority_fallback_notice_visible() -> None:
build_blocked_priority_fallback_status_payload(),
goal_id=GOAL_ID,
agent_id="codex-main-control",
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
assert decision["should_run"] is True, decision
fallback = decision["blocked_priority_fallback"]
Expand Down Expand Up @@ -359,7 +363,10 @@ def assert_claimed_frontstage_lanes_visible() -> None:
]
},
}
decision = build_quota_should_run(status_payload, goal_id=GOAL_ID, agent_id="codex-side-bypass")
decision = build_quota_should_run(
status_payload, goal_id=GOAL_ID, agent_id="codex-side-bypass",
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
summary = decision["agent_todo_summary"]
assert [item["index"] for item in summary["unclaimed_priority_open_items"]] == [1, 2], summary
assert summary["payload_compaction"]["compacted_lanes"]["unclaimed_priority_open_items"] == {
Expand Down Expand Up @@ -527,6 +534,7 @@ def assert_claimed_markdown_todos_survive_visibility_lanes() -> None:
status_payload,
goal_id=GOAL_ID,
agent_id="codex-side-bypass",
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
summary = decision["agent_todo_summary"]
assert [item["todo_id"] for item in summary["current_agent_claimed_open_items"]] == [
Expand Down Expand Up @@ -636,19 +644,24 @@ def assert_claimed_advancement_lanes_preserve_claimants() -> None:
status_payload,
goal_id=GOAL_ID,
agent_id="codex-main-control",
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
primary_summary = primary_decision["agent_todo_summary"]
assert primary_summary["first_executable_items"][0]["todo_id"] == "todo_primary_1", primary_summary
assert primary_summary["claim_scope"]["agent_model"] == "peer_v1", primary_summary
assert "agent_role" not in primary_summary["claim_scope"], primary_summary
assert primary_summary["claim_scope"]["other_agent_claimed_items"][0]["todo_id"] == "todo_side_tui", primary_summary
assert "Primary claimed advancement item 1" in primary_decision["recommended_action"], primary_decision
# Twenty claimed primary tasks require the shipped long-chain replan before
# ordinary delivery. The quota read model must still preserve their owners.
assert primary_decision["decision"] == "autonomous_replan_required", primary_decision
assert primary_decision["normal_delivery_allowed"] is False, primary_decision
assert "state_action_projection_warning" not in primary_decision, primary_decision

decision = build_quota_should_run(
status_payload,
goal_id=GOAL_ID,
agent_id="codex-side-bypass",
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
summary = decision["agent_todo_summary"]
current_agent_advancement_ids = [
Expand Down Expand Up @@ -768,7 +781,10 @@ def main() -> int:
]
},
}
decision = build_quota_should_run(status_payload, goal_id=GOAL_ID)
decision = build_quota_should_run(
status_payload, goal_id=GOAL_ID,
scheduler_execution_context=GENERIC_CLI_OUTER_CONTROLLER_SCHEDULER_CONTEXT,
)
assert decision["should_run"] is True, decision
agent_summary = decision["agent_todo_summary"]
assert agent_summary["open_count"] == 4, decision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
import tempfile
from pathlib import Path

from loopx.chat_agent import CodexChatAgentSession
from loopx.control_plane.effect_runtime import restart_effect_runtime
REPO_ROOT = Path(__file__).resolve().parents[1]
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))

from loopx.chat_agent import CodexChatAgentSession # noqa: E402
from loopx.control_plane.effect_runtime import restart_effect_runtime # noqa: E402


def tool(name, description, properties=None):
Expand Down
6 changes: 6 additions & 0 deletions examples/project/configure-goal-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def main() -> int:
assert catalog["disclosure_policy"]["first_run_configuration_required"] is False
features = {item["feature_id"]: item for item in catalog["features"]}
assert set(features) == {
"goal_capability_organization",
"todo_replan_cadence",
"local_authority_shadow",
"coordination_runtime_shadow",
Expand All @@ -303,6 +304,11 @@ def main() -> int:
"pull_request_review",
"periodic_report",
}
improvement = features["goal_capability_organization"]
assert improvement["default"] == {
"mode": "off", "discovery_budget_minutes": 5, "max_trials": 1,
}, improvement
assert "current" not in improvement, improvement
assert features["pull_request_review"]["availability"] == "supported"
assert features["progress_review"]["availability"] == "supported_opt_in"
assert features["progress_review"]["default"]["mode"] == "off"
Expand Down
Loading