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
6 changes: 6 additions & 0 deletions packages/loopx-jev/tests/test_closed_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def _find(payload, key: str):
def sequence(tmp_path):
project, runtime, registry = _write_fixture(tmp_path / "fixture")
_initialize_fixture_authority(project, runtime)
# This sequence isolates the external-review obligation from structured Stride decisions.
configure_goal(registry_path=registry, goal_id=GOAL_ID,
execution_stride_strategy="off", execute=True)
work = tmp_path / "delivery"
work.mkdir()
git(work, "init", "-q")
Expand Down Expand Up @@ -383,6 +386,9 @@ def test_retried_turn_claim_is_rejected_by_real_refresh_writeback(tmp_path):

project, runtime, registry = _write_fixture(tmp_path / "retry-fixture")
_initialize_fixture_authority(project, runtime)
# Exercise duplicate claims independently of the optional Stride decision.
configure_goal(registry_path=registry, goal_id=GOAL_ID,
execution_stride_strategy="off", execute=True)
first = run(1, turn="t1", agent=AGENT_ID)
typed_retry = run(2, turn="t2", agent=AGENT_ID)
untyped_retry = run(3, turn="t2", agent=AGENT_ID)
Expand Down
8 changes: 8 additions & 0 deletions packages/loopx-jev/tests/test_identity_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ def test_unattributed_newer_result_cannot_hide_existing_obligation(tmp_path, unb
assert any(item.get("required") and any(t.get("kind") == "external_progress_review_drift" for t in item.get("triggers", []))
for item in _find(json.loads(process.stdout), "autonomous_replan_obligation") if isinstance(item, dict))
before = index.read_bytes()
# The inherited Stride policy still refuses a missing structured decision.
with pytest.raises(ValueError, match=r"enabled stride review requires agent_vision\.stride_decision"):
_refresh(project, runtime, registry, autonomous_replan_recorded=True,
progress_observation=rows[0]["progress_observation"])
assert index.read_bytes() == before
# Isolate the external-review identity rule without weakening that default gate.
configure_goal(registry_path=registry, goal_id=GOAL_ID,
execution_stride_strategy="off", execute=True)
with pytest.raises(ValueError, match="already claimed in the obligation window"):
_refresh(project, runtime, registry, autonomous_replan_recorded=True,
progress_observation=rows[0]["progress_observation"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,16 @@ def test_grouped_monitor_materialization_is_one_per_bucket_and_retires_empty_buc
assert retired["write_performed"] is True
final_state = state.read_text(encoding="utf-8")
assert "status=done" in final_state
assert (
"evidence=Issue-fix%20PR%20lifecycle%20bucket%20"
"github-pr-state-huangruiteng--loopx-checks-pending%20is%20empty."
) in final_state
# Full evidence belongs to the authority; the bounded projection may link it.
retired_monitors = _monitor_todos(registry, project)
assert len(retired_monitors) == 1
retired_monitor = retired_monitors[0]
assert retired_monitor["status"] == "done"
assert retired_monitor["no_followup"] is True
assert retired_monitor["evidence"] == (
"Issue-fix PR lifecycle bucket "
"github-pr-state-huangruiteng--loopx-checks-pending is empty."
)

upsert_issue_fix_pr_lifecycle_ledger_jsonl(ledger, _packet(103))
reopened = materialize_issue_fix_grouped_monitors(
Expand All @@ -208,6 +214,10 @@ def test_grouped_monitor_materialization_is_one_per_bucket_and_retires_empty_buc
assert reopened_state.count("task_class=continuous_monitor") == 1
assert "status=open" in reopened_state
assert "no_followup=true" not in reopened_state
reopened_monitor = _monitor_todos(registry, project)[0]
assert reopened_monitor["todo_id"] == retired_monitor["todo_id"]
assert reopened_monitor["status"] == "open"
assert not reopened_monitor.get("no_followup", False)
assert reopened["projection_delivery"] in {"delivered", "current"}


Expand Down
Loading