Skip to content

Commit 7923396

Browse files
committed
Merge remote-tracking branch 'upstream/main' into codex/fix-project-uninstall-shared-state-20261011
Signed-off-by: Duang777 <duangjl007@gmail.com>
2 parents f77d698 + 2510aeb commit 7923396

51 files changed

Lines changed: 2570 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎benchmark/LHTB/scripts/preflight.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
EXPECTED_AGENT = "benchmark.runtime.harbor:BenchmarkCodex"
2828

2929

30+
def cli_supports_replan_count(help_text: str, option: str, count: int) -> bool:
31+
"""Check the resolved cadence against the current CLI's advertised choices."""
32+
choices = re.search(rf"(?<![\w-]){re.escape(option)}\s+\{{([0-9, ]+)\}}", help_text)
33+
return choices is not None and count in {
34+
int(value.strip()) for value in choices[1].split(",")
35+
}
36+
37+
3038
def command(argv: list[str], timeout: int = 30) -> tuple[int, str]:
3139
try:
3240
result = subprocess.run(
@@ -222,7 +230,7 @@ def check(label: str, passed: bool, detail: str) -> None:
222230
field, option, count = candidate._replan_configuration()
223231
check(
224232
"resolved replan cadence CLI",
225-
rc == 0 and f"{option} {{1,2,3,4,5}}" in help_text,
233+
rc == 0 and cli_supports_replan_count(help_text, option, count),
226234
f"{field}={count}",
227235
)
228236
replan_receipt = candidate._replan_receipt()
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""The preflight accepts only cadence values supported by the owning CLI."""
2+
from __future__ import annotations
3+
4+
import subprocess
5+
import sys
6+
7+
import pytest
8+
9+
from benchmark.LHTB.scripts.preflight import cli_supports_replan_count
10+
from benchmark.runtime.codex import DEFAULT_REPLAN_AFTER_TURNS
11+
12+
13+
@pytest.mark.parametrize("help_text,option,count,expected", [
14+
("--execution-replan-after-turns {1,2,3,4,5,6}", "--execution-replan-after-turns", 6, True),
15+
("--execution-replan-after-turns {1,2,3,4,5,6}", "--execution-replan-after-turns", 3, True),
16+
("--execution-replan-after-turns {1,2,3,4,5}", "--execution-replan-after-turns", 6, False),
17+
("--execution-replan-after-todos {1,2,3,4,5}", "--execution-replan-after-todos", 3, True),
18+
("--execution-replan-after-todos {1,2,3,4,5}", "--execution-replan-after-todos", 6, False),
19+
("--execution-replan-after-turns\n {1,2,3,4,5,6}", "--execution-replan-after-turns", 6, True),
20+
("--execution-replan-after-turns-extra {1,2,3,4,5,6}", "--execution-replan-after-turns", 6, False),
21+
("--execution-replan-after-turns {1,2,3,4,5,6}", "--execution-replan-after-todos", 3, False),
22+
])
23+
def test_resolved_cadence_uses_its_own_cli_choices(help_text, option, count, expected):
24+
assert cli_supports_replan_count(help_text, option, count) is expected
25+
26+
27+
def test_current_cli_accepts_the_benchmark_default():
28+
help_result = subprocess.run(
29+
[sys.executable, "-m", "loopx.cli", "configure-goal", "--help"],
30+
capture_output=True, text=True, check=True, timeout=30,
31+
)
32+
assert cli_supports_replan_count(
33+
help_result.stdout, "--execution-replan-after-turns", DEFAULT_REPLAN_AFTER_TURNS,
34+
)

‎docs/architecture/rfcs/README.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ failure leaves the generated files untouched.
101101
- [LoopX Overall Roadmap v0](loopx-overall-roadmap-v0.md)
102102
([中文版](loopx-overall-roadmap-v0.zh-CN.md))
103103
- **Delivery on `main`:** Planning and audit evidence, not runtime promotion.
104-
- **Current boundary:** Maps all 30 pre-existing primary RFCs and important
104+
- **Current boundary:** Maps every primary RFC and important
105105
non-RFC domains into 13 streams, G0–G5 product milestones and R1–R7 core
106106
execution cards. Covers product, multi-LoopX-Agent collaboration/handoff,
107107
kernel, hosts, memory, cost, security, operations, research, releases,
@@ -422,6 +422,15 @@ failure leaves the generated files untouched.
422422
Lark operation cards. Direct Goal workspace navigation and Overview compose
423423
bounded graph/acceptance readback, source navigation and snapshot export. General cross-channel disclosure,
424424
living documents and governed amendment/settlement review remain open.
425+
- [Goal Workspace Surface v0](goal-workspace-surface-v0.md)
426+
([中文版](goal-workspace-surface-v0.zh-CN.md))
427+
- **Delivery on `main`:** Proposal only; Overview, Tasks, Chat, Files, the W1
428+
map, usage, acceptance readback and lifecycle stop ship as separate regions.
429+
- **Current boundary:** Owns one Goal page's composition and the display
430+
semantics of its vitals: persistent masthead with scoped Stop, window- and
431+
coverage-labeled figures, work grouped by owner, all-work rail, shared
432+
selection and since-last-look delta. M1 requires first-screen preview
433+
approval. No new authority, Todo field, lifetime usage or Lark parity.
425434
- [Live Team Workspace v0](live-team-workspace-v0.md)
426435
([中文版](live-team-workspace-v0.zh-CN.md))
427436
- **Delivery on `main`:** Design proposal only; no live team-stream qualification.

‎docs/architecture/rfcs/STATUS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ appendix may keep dated history, but no dated log heading may precede it.
1818

1919
[中文版](STATUS.zh-CN.md) is the semantic mirror of this file.
2020

21-
## Accepted (43)
21+
## Accepted (44)
2222

2323
| RFC | Header status | Supersedes / closes | Ledger |
2424
| --- | --- | --- | --- |
@@ -42,6 +42,7 @@ appendix may keep dated history, but no dated log heading may precede it.
4242
| [Goal Instance Identity and Orphan Recovery (v0)](goal-instance-identity-and-orphan-recovery-v0.md) | Accepted | none | — |
4343
| [RFC: Goal-scoped Capability Portfolio and Connector Lifecycle (v0)](goal-scoped-capability-portfolio-v0.md) | Accepted | none | — |
4444
| [RFC: Per-Goal Usage, Token, and Cost Surfacing v0](goal-usage-token-cost-v0.md) | Accepted | none | — |
45+
| [RFC: Goal Workspace Surface v0](goal-workspace-surface-v0.md) | Accepted | none | — |
4546
| [DSH / Pi: L1 Observation and Managed Runtime Selection](harness-selection-dsh-pi-v0.md) | Accepted | none | — |
4647
| [RFC: Hierarchical Agent Stride Control v0](hierarchical-agent-stride-control-v0.md) | Accepted | none | — |
4748
| [RFC: Human Attention Wishlist v0](human-attention-wishlist-v0.md) | Accepted | none | — |

‎docs/architecture/rfcs/STATUS.zh-CN.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
[English](STATUS.md) 与本文互为语义镜像。
1717

18-
## 已接受 (43)
18+
## 已接受 (44)
1919

2020
| RFC | 头部状态 | 替代 / 关闭 | Ledger |
2121
| --- | --- | --- | --- |
@@ -39,6 +39,7 @@
3939
| [Goal 实例身份与孤儿状态恢复(v0)](goal-instance-identity-and-orphan-recovery-v0.zh-CN.md) | 已接受 | 无 | — |
4040
| [RFC:Goal 级能力组合与 Connector 生命周期(v0)](goal-scoped-capability-portfolio-v0.zh-CN.md) | 已接受 | 无 | — |
4141
| [RFC: Per-Goal Usage, Token, and Cost Surfacing v0](goal-usage-token-cost-v0.md) | 已接受 | none | — |
42+
| [RFC:Goal 工作区页面 v0](goal-workspace-surface-v0.zh-CN.md) | 已接受 | 无 | — |
4243
| [DSH / Pi:L1 观察与 Managed Runtime 选型](harness-selection-dsh-pi-v0.zh-CN.md) | 已接受 | 无 | — |
4344
| [RFC:长程 Agent 分层步幅控制 v0](hierarchical-agent-stride-control-v0.zh-CN.md) | 已接受 | 无 | — |
4445
| [RFC:Human Attention Wishlist v0](human-attention-wishlist-v0.zh-CN.md) | 已接受 | 无 | — |
176 KB
Loading
172 KB
Loading
110 KB
Loading

‎docs/architecture/rfcs/goal-usage-token-cost-v0.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ The slice must prove:
191191
4. Whether to add a dedicated `/usage.json` endpoint or continue surfacing
192192
through the existing status payload (this RFC assumes the latter).
193193
5. The duration capture anchor — which run boundary events delimit wall-time.
194+
6. Lifetime and coverage. The [Goal workspace](goal-workspace-surface-v0.md)
195+
vitals show window-labeled cost and Agent time (its D2/D4). Should this owner
196+
add an aggregate since Goal creation, with retention disclosure, and an
197+
explicit field for measured versus observed runtimes? Until then consumers
198+
must not sum windows into a lifetime figure or render absent cost as zero.
194199

195200
## Public References
196201

0 commit comments

Comments
 (0)