Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
6dce03a
feat(goal-channel): compose revision-guarded local room work
LIHUA919 Sep 28, 2026
cce2d81
test(goal-channel): qualify claim and recovery on local stores
LIHUA919 Sep 28, 2026
09fc4d7
docs(goal-channel): record room work usage and qualification boundary
LIHUA919 Sep 28, 2026
5d331c3
fix(goal-channel): refresh census and scope the work schema name
LIHUA919 Sep 28, 2026
6738119
feat(goal-channel): add scoped room claim offers and callback recovery
LIHUA919 Sep 28, 2026
b6caaae
test(goal-channel): qualify authenticated callbacks and native dispatch
LIHUA919 Sep 28, 2026
81bc6bc
docs(goal-channel): document one-operation room claim grants
LIHUA919 Sep 28, 2026
bb2ff7a
Merge latest main into room claim composition
LIHUA919 Sep 28, 2026
a7627a2
fix(goal-channel): refuse unqualified exact-instance room grants
LIHUA919 Sep 28, 2026
a986785
Merge remote-tracking branch 'origin/main' into codex/im-ov-room-claim
LIHUA919 Sep 28, 2026
0eb0310
feat(goal-channel): restore private scoped context with authority rea…
LIHUA919 Sep 28, 2026
11ca722
test(goal-channel): qualify read-only reconnect and reference boundaries
LIHUA919 Sep 28, 2026
5c3ac84
docs(goal-channel): describe private context restore and remaining qu…
LIHUA919 Sep 28, 2026
2a77521
Merge current main and upstream build qualification repair
LIHUA919 Sep 28, 2026
742672c
fix(goal-channel): omit stale observations after restore scope failure
LIHUA919 Sep 29, 2026
9036ba8
fix(coordination): reject unqualified GoalRef on legacy claim contracts
LIHUA919 Sep 29, 2026
c46eaa3
fix(goal-channel): repair offer encoding and recall validation seam
LIHUA919 Sep 29, 2026
47ec7e1
test(goal-channel): qualify independent source CLI claim processes
LIHUA919 Sep 29, 2026
87ac097
docs(goal-channel): clarify local qualification and lifetime ownership
LIHUA919 Sep 29, 2026
2100830
Merge origin/main into codex/im-ov-room-claim
LIHUA919 Sep 30, 2026
86db3d3
Merge origin/main into codex/im-ov-room-claim
LIHUA919 Oct 2, 2026
a23d368
Merge origin/main into codex/im-ov-room-claim
LIHUA919 Oct 3, 2026
61b3ed7
Merge origin/main into codex/im-ov-room-claim
LIHUA919 Oct 10, 2026
784e41b
Merge origin/main into codex/im-ov-room-claim
LIHUA919 Oct 11, 2026
b9b1eb9
Merge main into goal-channel scoped claims
LIHUA919 Oct 12, 2026
41c6005
Merge main to adopt interrupted Python CI diagnostics
LIHUA919 Oct 13, 2026
ff80d2f
Merge main and retire the obsolete registry I/O snapshot
LIHUA919 Oct 14, 2026
53ef47e
Merge latest Windows runtime retirement diagnostics
LIHUA919 Oct 14, 2026
b443d3d
test(digest): pin the direction authority consumer
songoow Oct 14, 2026
1adf3b8
Merge main and preserve room-work qualification
LIHUA919 Oct 14, 2026
a5c8a87
Merge browser fixture recovery and shared Lark transport
LIHUA919 Oct 14, 2026
1717319
test(browser): reuse scoped backend forwarding for replan cadence
LIHUA919 Oct 14, 2026
72b1988
test(browser): bind cadence companions to the selected package
LIHUA919 Oct 14, 2026
bef0df3
Merge current browser forwarding and Chat startup composition
LIHUA919 Oct 15, 2026
21ff4ce
Merge latest main into PR #6431 for current CI validation
songoow Oct 15, 2026
4b07062
feat(goal-channel): expose scoped room work in the packaged workspace
LIHUA919 Oct 15, 2026
763ea5e
test(goal-channel): qualify packaged claim recovery and scope guards
LIHUA919 Oct 15, 2026
6ea1172
docs(goal-channel): describe packaged room work and qualification limits
LIHUA919 Oct 15, 2026
e5a7361
fix(tests): keep room-work fixture imports and cleanup lint clean
LIHUA919 Oct 15, 2026
842ae12
fix(goal-channel): pin callback offer binding through claim admission
LIHUA919 Oct 15, 2026
47d2b10
Merge main for the verified legacy extension status repair
LIHUA919 Oct 15, 2026
991e9a1
Merge existing PR #6431 digest consumer repair into qualification branch
LIHUA919 Oct 15, 2026
8b6592a
Merge main with the accepted digest and extension lifecycle repairs
LIHUA919 Oct 15, 2026
081c207
Merge main for existing browser and validation prerequisite repairs
LIHUA919 Oct 15, 2026
b7b2e1c
fix(coordination): retain room source guards through canonical claim
LIHUA919 Oct 15, 2026
59cdd8b
refactor(presentation): place room work HTTP in its existing owner
LIHUA919 Oct 15, 2026
57d2139
docs(goal-channel): specify retained source scope at claim commit
LIHUA919 Oct 15, 2026
5438893
Merge main to adopt existing packaged CI sharding and architecture re…
LIHUA919 Oct 16, 2026
5130165
test(dashboard): end in-flight scenario routes quietly before closing…
songoow Oct 15, 2026
a633264
Merge pinned CI base to align teardown dependency and ancestry
LIHUA919 Oct 16, 2026
59ca55c
Merge current canonical write retirement and CI owners
LIHUA919 Oct 16, 2026
e090982
test(coordination): qualify guarded claims after canonical write reti…
LIHUA919 Oct 16, 2026
bcc8774
docs(goal-channel): distinguish Goal identity compatibility from owne…
LIHUA919 Oct 16, 2026
ab9b07e
test(workspace): honor explicit views after the Overview default change
LIHUA919 Oct 16, 2026
b89ec43
test(workspace): use the existing conversation route literal
LIHUA919 Oct 16, 2026
ff6eb5e
test(workspace): await the exact settings return-focus effect
LIHUA919 Oct 16, 2026
7be069e
test(workspace): scope blocked readback to its accessible task row
LIHUA919 Oct 16, 2026
c61b4d2
test(workspace): enter the blocked drawer fixture through Tasks directly
LIHUA919 Oct 16, 2026
443e79e
test(workspace): scope attention actions to the active Tasks surface
LIHUA919 Oct 16, 2026
747d4c9
test(workspace): retain the native action receipt on its Tasks route
LIHUA919 Oct 16, 2026
24e94ec
Merge current main and shared workspace CI fixes
LIHUA919 Oct 16, 2026
9eddf0f
test(workspace): preserve acceptance observation provenance
songoow Oct 16, 2026
0777c11
Merge current main before room resume qualification
LIHUA919 Oct 16, 2026
a6ef9c0
fix(goal-channel): preserve native resume binding and seal room reads
LIHUA919 Oct 17, 2026
e52e422
docs(goal-channel): describe bound reconnect and room read freshness
LIHUA919 Oct 17, 2026
74501b7
Merge current projection carriers and shared qualification fixes
LIHUA919 Oct 17, 2026
e4213b0
Merge current main qualification for room work proposal
LIHUA919 Oct 18, 2026
b3e7097
test(room-work): qualify companion reads and current viewport evidence
LIHUA919 Oct 18, 2026
52685b0
Merge current main for room claim expiry qualification
LIHUA919 Oct 18, 2026
a8dac55
fix(room-claim): enforce offer expiry at canonical admission
LIHUA919 Oct 18, 2026
c0106fa
Merge upstream/main into codex/im-ov-room-claim
LIHUA919 Nov 19, 2026
82346a0
Withdraw the Room work frontend from this proposal
LIHUA919 Nov 19, 2026
97e4424
Follow the renumbered guarded/timed claim schemas in tests
LIHUA919 Nov 19, 2026
d7c7c28
Add real-clock offer-expiry crossing regressions
LIHUA919 Nov 19, 2026
37500cc
Bind claim delivery identity to the accepted operation
LIHUA919 Nov 19, 2026
97c2798
Keep the committed receipt on the originating callback card
LIHUA919 Nov 19, 2026
8307eab
Stop dead recovery records from starving valid receipts
LIHUA919 Nov 19, 2026
60d59d6
Rotate the recovery budget so a failing prefix cannot monopolize it
LIHUA919 Nov 19, 2026
d783ab1
Isolate the recovery rotation cursor per collector delivery scope
LIHUA919 Nov 19, 2026
59f2ca9
Match the original Card 2.0 schema on every room card update
LIHUA919 Nov 19, 2026
e8e6742
Render dynamic identifiers literally in the Markdown result card
LIHUA919 Nov 20, 2026
ea489bc
Merge current main; resolve claim-v3 semantically and defer the room …
LIHUA919 Nov 24, 2026
7b40f5d
Keep the claim-owner guards with owner-level regressions
LIHUA919 Nov 24, 2026
e1615ae
Merge current main e116109c5
LIHUA919 Nov 24, 2026
756e35d
Run the SQLite-labelled claim-guard cases on actual SQLite
LIHUA919 Nov 24, 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
29 changes: 29 additions & 0 deletions docs/architecture/rfcs/agent-im-openviking-collaboration-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,35 @@ Measure outcome quality rather than message volume:
- false acceptance or rejection of controlled transitions;
- verified goal outcomes produced after handoff.

## Current Delivery Checkpoint

Task [#5198](https://github.com/loopx-project/loopx/issues/5198) tracks composition.
A first implementation stage proposed a canonical room-work Agent CLI with
scoped IM claim-button offers, callbacks, result recovery and a private
reconnect composition. Following the maintainer scope review of 2026-11-20,
that channel workflow is **deferred**: current main already owns delegation,
candidate selection, ordinary claiming, execution preparation, result return
and scoped Turn Recall, and no principal-limited in-room claim interaction is
requested this round. The deferred implementation remains recoverable in the
proposal branch history; reviving it must re-derive its deadline and
source-witness needs onto current main's reviewed managed-claim basis rather
than re-aliasing the v3 wire.

What this proposal currently ships on the shared owner is narrower: the
canonical Todo claim transaction rejects two previously silently-accepted
unauthorized inputs for every caller, with the Lark room surface absent:

- a Todo explicitly bound to another Agent (`bound_agent`) cannot be claimed
by a different Agent; the bound Agent claims normally;
- an explicit `goal_ref` on any claim wire is a machine-checked protocol
failure instead of being silently dropped or implying unimplemented
lifetime binding.

Both are disclosed shared-contract tightenings validated by owner-level
File/SQLite regressions; ordinary unclaimed self-claims and same-key replay
keep their existing semantics. This checkpoint does not claim any
room-channel, multi-host, daemon or live-provider acceptance.

## Open Questions

1. Which LoopX projection fields are stable enough for the first public
Expand Down
6 changes: 6 additions & 0 deletions loopx/control_plane/coordination/local_authority_runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import {
import {
COORDINATION_TODO_CLAIM_RESULT_SCHEMA,
executeCoordinationTodoClaim,
unqualifiedGoalRefClaimFailure,
} from "./todo_claim.ts";
import {
COORDINATION_TODO_CREATE_RESULT_SCHEMA,
Expand Down Expand Up @@ -1048,6 +1049,11 @@ export async function claimLocalCoordinationTodo(
let sourceAuthority = "file_v0";
try {
const input = requireJsonObject(value, "local coordination Todo claim request");
// Wire integrity lives before the field whitelist: an explicit goal_ref
// must be rejected, not silently dropped, on every claim wire version.
const scopeFailure = unqualifiedGoalRefClaimFailure(input);
if (scopeFailure !== null) return {...scopeFailure, source_authority: null,
decision_read_from_provider: false, legacy_fallback_used: false};
const reviewed = input.schema_version === REVIEWED_MANAGED_CLAIM_REQUEST_SCHEMA;
const managed = reviewed || input.schema_version === LOCAL_COORDINATION_TODO_MANAGED_CLAIM_REQUEST_SCHEMA;
if (input.schema_version !== LOCAL_COORDINATION_TODO_CLAIM_REQUEST_SCHEMA &&
Expand Down
12 changes: 12 additions & 0 deletions loopx/control_plane/coordination/todo_claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ function decisionFailure(
};
}

/** The legacy claim contract must never imply unimplemented lifetime binding. */
export function unqualifiedGoalRefClaimFailure(value: object): CoordinationTodoClaimResult | null {
return Object.hasOwn(value, "goal_ref") ? failure("goal_ref_claim_contract_unqualified",
"This claim contract does not bind the head and operation receipt to GoalRef; a qualified lifetime-bound claim owner is required.") : null;
}

function rejectInvalidClaimActor(
input: CoordinationTodoClaimInput,
): ClaimRejection {
Expand Down Expand Up @@ -200,6 +206,10 @@ function rejectIneligibleTodo(
{ requested_role: input.expected_role, todo_role: todo.role },
);
}
if (todo.bound_agent != null && todo.bound_agent !== "" &&
normalizeTodoAgent(todo.bound_agent, "todo.bound_agent") !== input.claimed_by) {
return decisionFailure("bound_agent_mismatch", "Todo is bound to another agent");
}
if (todo.status !== "open") {
return decisionFailure(
"todo_not_open",
Expand Down Expand Up @@ -366,6 +376,8 @@ async function executeClaimAttempt(
): Promise<CoordinationTodoClaimResult> {
let input: CoordinationTodoClaimInput;
try {
const scopeFailure = unqualifiedGoalRefClaimFailure(rawInput);
if (scopeFailure !== null) return scopeFailure;
input = {
...rawInput,
goal_id: requireAuthorityStoreId(rawInput.goal_id, "goal id"),
Expand Down
117 changes: 117 additions & 0 deletions tests/control_plane/test_claim_owner_guards.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
"""Owner-level regressions for the canonical Todo claim guards.

These cases drive the TypeScript claim owner directly through the effect
runtime on disposable real File/SQLite stores. They hold with or without any
Lark room surface: the guards protect every caller of the canonical claim.
"""
import json
from pathlib import Path

import pytest

from canonical_authority_fixture import initialize_canonical_authority, isolate_sqlite_runtime
from loopx.control_plane.coordination.local_authority import read_canonical_todos_if_promoted
from loopx.control_plane.coordination.runtime_shadow import build_todo_runtime_shadow_projection
from loopx.control_plane.effect_runtime import effect_runtime_result

GOAL = "claim-guard-fixture-goal"
TODO = "todo_claim_guard"


PROVIDER_AUTHORITY = {"file": "file_v0", "sqlite": "sqlite_v0"}


@pytest.fixture(params=["file", "sqlite"])
def authority(tmp_path, monkeypatch, request):
isolate_sqlite_runtime(tmp_path, monkeypatch)
provider = request.param
runtime, registry, state = tmp_path / "runtime", tmp_path / ".loopx/registry.json", tmp_path / "state.md"
registry.parent.mkdir()
state.write_text("## Agent Todo\n")
registry.write_text(json.dumps({"common_runtime_root": str(runtime), "goals": [{
"id": GOAL, "repo": str(tmp_path), "state_file": state.name,
"coordination": {"registered_agents": ["agent-a", "agent-b"]}}]}))
yield runtime, registry, state, provider
effect_runtime_result("runtime.shutdown", {}, retry_safe=False)


def _seed(runtime: Path, todos: list[dict], state: Path, provider: str) -> None:
projection = build_todo_runtime_shadow_projection(goal_id=GOAL, todos=todos, handoff_mode="soft_claim")
initialize_canonical_authority(runtime, GOAL, projection, state_path=state, provider=provider)


def _claim(runtime: Path, registry: Path, actor: str, key: str, **extra):
import hashlib
with open(registry, "rb") as handle:
source = {"path": str(registry.resolve()),
"sha256": hashlib.sha256(handle.read()).hexdigest()}
return effect_runtime_result("coordination.local_authority.todo_claim", {
"schema_version": "loopx_local_coordination_todo_claim_request_v1",
"runtime_root": str(runtime), "goal_id": GOAL, "todo_id": TODO,
"role": "agent", "claimed_by": actor, "actor_agent_id": actor,
"registered_agents": ["agent-a", "agent-b"], "registry_source": source,
"operation_id": key, "lease_request": None, "observed_at": "2026-11-23T00:00:00Z",
"dry_run": False, **extra})


def _todo(runtime: Path) -> dict:
snapshot = read_canonical_todos_if_promoted(runtime_root=runtime, goal_id=GOAL)
return next(todo for todo in snapshot["todos"] if todo["todo_id"] == TODO)


def _open_todo(**fields) -> dict:
return {"schema_version": "todo_item_v0", "todo_id": TODO, "role": "agent", "status": "open",
"done": False, "text": "PRIVATE_ORGANIZATIONAL_CONTEXT", "archive_state": "active",
"source_section": "Agent Todo", "index": 1, "task_class": "advancement_task", **fields}


def test_claim_on_todo_bound_to_another_agent_is_rejected_without_side_effects(authority):
runtime, registry, state, provider = authority
_seed(runtime, [_open_todo(bound_agent="agent-b")], state, provider)
rejected = _claim(runtime, registry, "agent-a", "guard-bound-mismatch")
assert rejected["status"] == "failed" and rejected["reason_code"] == "bound_agent_mismatch", rejected
assert rejected["decision_read_from_provider"] is True
assert rejected["source_authority"] == PROVIDER_AUTHORITY[provider], rejected
todo = _todo(runtime)
assert not todo.get("claimed_by")
receipt = effect_runtime_result("coordination.local_authority.operation_receipt", {
"schema_version": "loopx_local_coordination_operation_receipt_request_v0",
"runtime_root": str(runtime), "goal_id": GOAL, "operation_id": "guard-bound-mismatch"})
assert receipt["status"] == "missing", receipt
# The bound agent itself still claims normally.
accepted = _claim(runtime, registry, "agent-b", "guard-bound-owner")
assert accepted["status"] == "applied", accepted
assert accepted["source_authority"] == PROVIDER_AUTHORITY[provider], accepted
assert _todo(runtime)["claimed_by"] == "agent-b"


def test_claim_wires_reject_an_unqualified_goal_ref_before_any_provider_effect(authority):
runtime, registry, state, provider = authority
_seed(runtime, [_open_todo()], state, provider)
for goal_ref in (None, {"goal_id": GOAL, "goal_instance_id": "ginst_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}):
rejected = _claim(runtime, registry, "agent-a", "guard-goal-ref", goal_ref=goal_ref)
assert rejected["status"] == "failed", rejected
assert rejected["reason_code"] == "goal_ref_claim_contract_unqualified", rejected
assert rejected["decision_read_from_provider"] is False
assert rejected["legacy_fallback_used"] is False
assert not _todo(runtime).get("claimed_by")
# Omitting the field keeps the ordinary claim path.
accepted = _claim(runtime, registry, "agent-a", "guard-goal-ref-clean")
assert accepted["status"] == "applied", accepted
assert accepted["source_authority"] == PROVIDER_AUTHORITY[provider], accepted
assert _todo(runtime)["claimed_by"] == "agent-a"


def test_ordinary_unclaimed_self_claim_and_same_key_replay_keep_room_off_parity(authority):
runtime, registry, state, provider = authority
_seed(runtime, [_open_todo()], state, provider)
first = _claim(runtime, registry, "agent-a", "guard-parity-key")
assert first["status"] == "applied" and first.get("claimed_by") == "agent-a", first
assert first["source_authority"] == PROVIDER_AUTHORITY[provider], first
snapshot = read_canonical_todos_if_promoted(runtime_root=runtime, goal_id=GOAL)
assert snapshot["source_authority"] == PROVIDER_AUTHORITY[provider], snapshot
revision = snapshot["provider_revision"]
replay = _claim(runtime, registry, "agent-a", "guard-parity-key")
assert replay["status"] == "replayed", replay
assert replay["source_authority"] == PROVIDER_AUTHORITY[provider], replay
assert read_canonical_todos_if_promoted(runtime_root=runtime, goal_id=GOAL)["provider_revision"] == revision
18 changes: 18 additions & 0 deletions tests/control_plane_ts/goal_ref_claim_compatibility.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import assert from "node:assert/strict";
import test from "node:test";
import type {AuthorityStore} from "../../loopx/control_plane/coordination/authority_store.ts";
import {executeCoordinationTodoClaim} from "../../loopx/control_plane/coordination/todo_claim.ts";

test("GoalRef-bearing legacy claims reject before provider or historical receipt access", async () => {
const store = new Proxy({} as AuthorityStore, {get() {throw new Error("provider must not be accessed");}});
const base = {goal_id: "goal", todo_id: "todo", claimed_by: "agent", actor_agent_id: "agent",
registered_agents: ["agent"], expected_role: "agent", operation_id: "old-operation", dry_run: false,
now: new Date("2026-09-29T00:00:00Z")};
for (const goalRef of [null, "invalid", {goal_id: "goal", goal_instance_id: "ginst_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]) {
const request = {...base, goal_ref: goalRef};
const result = await executeCoordinationTodoClaim(store, request);
assert.equal(result.status, "failed");
assert.equal(result.reason_code, "goal_ref_claim_contract_unqualified");
assert.equal(result.failure_kind, "protocol_failure");
}
});
Loading