Skip to content

Commit ab8da27

Browse files
authored
fix(release): finish retirement and repair stale CI contracts (#5179)
* refactor(status): remove the retired Todo event facade export Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> * test(release): align snapshot response and capability map contracts Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> --------- Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Co-authored-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
1 parent 1cfe434 commit ab8da27

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

‎loopx/capabilities/decision_context/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ change touches.
104104
| `sources.py` | Provider-neutral source contracts: specs, items, scans, exact reads, source manifest |
105105
| `runtime.py` | Thin orchestration from profile to providers to evidence assembly and advisory recall |
106106
| `assembler.py` | Deterministic authority rebase, advisory recall assembly, `decision_source_coverage_v0` |
107+
| `freshness.py` | Per-source freshness reports and capture host health projection |
107108
| `packets.py` | Public-safe evidence, proposal, review and outcome packets |
108109
| `review_settlement.py` | Owner-gated or quiet settlement of one assembly |
109110
| `cursor_commit.py` | Validated private cursor commit after settlement |

‎loopx/capabilities/decision_context/README.zh-CN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ exact-read 完整度和未覆盖的 P0 source 投影为公开安全的回执。`
9595
| `review_settlement.py` | 对单次 assembly 做 owner 把关或 quiet settlement |
9696
| `cursor_commit.py` | settlement 校验通过后提交私有 cursor |
9797
| `private_state.py` | 私有 cursor 与 pending settlement 的文件读写 |
98+
| `freshness.py` | 逐来源 freshness 报告与 capture host 健康投影 |
9899
| `outcome_feedback.py` | 从 outcome 回流到 Reward Memory 的审计反馈 |
99100
| `capture.py` | opt-in 的 source-reference capture 与 `capture-status` |
100101
| `capture_recovery.py` | 保留引用的 capture 诊断与恢复 |

‎loopx/control_plane/status/active_state_projection.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
)
2323

2424

25-
STATE_EVENT_LOG_BASENAME = "events.jsonl"
2625
SECTION_HEADING_PATTERN = re.compile(r"^##+\s+(.+?)\s*$")
2726
BACKLOG_HYGIENE_SECTION_HEADINGS = ("Next Action", "Operating Lessons")
2827
BACKLOG_HYGIENE_BULLET_PATTERN = re.compile(r"^\s*(?:[-*]|\d+[.)])\s+(.+?)\s*$")
@@ -31,10 +30,6 @@
3130
)
3231

3332

34-
35-
36-
37-
3833
def active_state_sections(state_text: str, headings: tuple[str, ...]) -> dict[str, list[str]]:
3934
return _active_state_sections(
4035
state_text,

‎loopx/status.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
StatusCollectionContext,
2525
collect_status as _collect_status_read_model,
2626
)
27-
from .control_plane.status.active_state_projection import (
28-
STATE_EVENT_LOG_BASENAME as STATE_EVENT_LOG_BASENAME,
29-
)
3027
from .control_plane.status.contract_projection import (
3128
STATUS_CONTRACT_RELOAD_HINT as STATUS_CONTRACT_RELOAD_HINT,
3229
)
@@ -261,7 +258,6 @@
261258
"MONITOR_DISPLAY_STOP_CONDITION": "loopx.control_plane.status.monitor_display_projection",
262259
"MONITOR_DISPLAY_FALLBACK_ACTION": "loopx.control_plane.status.monitor_display_projection",
263260
"STATUS_CONTRACT_RELOAD_HINT": "loopx.control_plane.status.contract_projection",
264-
"STATE_EVENT_LOG_BASENAME": "loopx.control_plane.status.active_state_projection",
265261
"PLANNED_CONTROLLER_OPT_IN_RECOMMENDED_ACTION": "loopx.control_plane.status.goal_attention_projection",
266262
# Refs #4447: the connected-adapter sets were defined here and in both status
267263
# projections that pass them to the same injected read-model parameters. The

‎tests/control_plane/test_canonical_snapshot_integration.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
from loopx.control_plane.coordination.runtime_shadow import (
1919
build_todo_runtime_shadow_projection,
2020
)
21-
from loopx.control_plane.effect_runtime import MAX_RESPONSE_BYTES, effect_runtime_result
21+
from loopx.control_plane.effect_runtime import (
22+
MAX_RESPONSE_BYTES,
23+
EffectRuntimeResponseAmbiguous,
24+
effect_runtime_result,
25+
)
2226
from loopx.control_plane.todos import provider_projection
2327

2428
REPO = Path(__file__).resolve().parents[2]
@@ -109,7 +113,7 @@ def test_real_rpc_keeps_budget_and_cli_recovers_complete_display(
109113
runtime, state, registry, projection = wide_goal
110114
runtime_pid = effect_runtime_result("runtime.ping", {})["pid"]
111115
# Same stored workload: old one-shot endpoint really crosses the fixed budget.
112-
with pytest.raises(RuntimeError) as oversized:
116+
with pytest.raises(EffectRuntimeResponseAmbiguous) as oversized:
113117
effect_runtime_result(
114118
"coordination.local_authority.todo_list",
115119
{
@@ -120,7 +124,9 @@ def test_real_rpc_keeps_budget_and_cli_recovers_complete_display(
120124
},
121125
timeout=15,
122126
)
123-
assert "response is oversized" in str(oversized.value.__cause__)
127+
# The server caps a post-dispatch response by closing the connection. The
128+
# caller cannot classify that lost response as a safe rejection or retry.
129+
assert oversized.value.diagnostic_code == "runtime_response_ambiguous"
124130
measured = []
125131

126132
def capture(method, payload, **kwargs):

0 commit comments

Comments
 (0)