Skip to content

Commit 302a10b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into codex/semantic-vocabulary-m2-final
Signed-off-by: song <liusongstep@gmail.com> # Conflicts: # docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md # docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md # docs/reference/glossary.md # examples/semantic-vocabulary-drift-smoke.py # loopx/control_plane/turn_driver/driver.py # loopx/control_plane/turn_driver/loop_controller.py # loopx/semantics/inventory_v0.json # loopx/semantics/production.py # loopx/semantics/vocabulary_v0.json # tests/architecture/test_semantic_production.py # tests/architecture/test_semantic_vocabulary_drift.py
2 parents 459b82f + 1b64934 commit 302a10b

170 files changed

Lines changed: 14920 additions & 1727 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.

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Vite bundles may retain whitespace-only lines inside generated template literals.
22
loopx/web/chat/assets/*.js whitespace=-blank-at-eol
3+
4+
# Preserve the immutable archive's bytes even with core.autocrlf=true.
5+
benchmark/deepswe-gptxhigh-v1/** text eol=lf

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ goals/**/ACTIVE_GOAL_STATE.md
3737
goals/**/ACTIVE_GOAL_STATE.md.lock
3838
/runtime/
3939
logs/
40+
41+
# Legacy semantic census reports are derived locally, never repository authority.
42+
/loopx/semantics/inventory_v0.json

‎AGENTS.md‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,22 @@ broader actor lifecycle or authority model than the implementation provides.
222222

223223
## Engineering Quality And Right-Sized Scope
224224

225+
### Source-Checkout Python Entry Points
226+
227+
Run source development and validation from the intended worktree root with
228+
`uv run --extra test python ...` or `uv run --extra test loopx ...`. Use
229+
`uv sync --extra test` to prepare the project environment. An explicitly
230+
activated compatible environment with the checkout installed remains valid.
231+
Check `sys.executable` and `loopx.__file__` when interpreter or source provenance
232+
is uncertain; a global `loopx` may point to another release snapshot.
233+
234+
Keep Python subprocesses on the selected interpreter (`sys.executable`), and
235+
keep bootstrap interpreter discovery, supported-version declarations, CI
236+
version coverage, and version-specific fixtures intact. Do not replace those
237+
with a nested `uv run`, rewrite historical execution receipts, or commit a
238+
generated `uv.lock` as part of an unrelated change. See the testing and quality
239+
guide for the validation layers and the source-checkout environment boundary.
240+
225241
### Refactor Real-Path Validation
226242

227243
Before delivering a refactor, validate the affected production entrypoint and
@@ -456,6 +472,10 @@ Use this classification when cleaning or reviewing benchmark-related changes:
456472
provider-neutral capability contract.
457473
- Keep benchmark-native runners, adapters, ledgers, scoring reducers, and dated
458474
experiment packets outside the active product surface. Historical versions
459-
belong under `deprecate/benchmark-legacy/` and are not part of active CI.
475+
follow the canonical archive placement rules in `benchmark/README.md`:
476+
retired implementations and dated packets belong under
477+
`deprecate/benchmark-legacy/`; explicitly identified immutable experiment
478+
snapshots may remain under `benchmark/` only under that document's conditions.
479+
Neither category is part of active CI benchmark execution.
460480
- Add a new active benchmark smoke only when it protects a stable toolkit
461481
behavior; experiment-specific validation belongs with the research workspace.

‎apps/desktop/loopx-control-plane/README.md‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,21 @@ The bundled runtime owns the CLI, HTTP APIs and workspace assets. A runtime-only
4242
CLI update cannot patch native startup or updater bugs; those require an App
4343
update. The App update workflow packages both layers from one Git revision.
4444

45-
On macOS, opening the App now automatically prepares its bundled runtime when
46-
the default CLI is missing or has a different source revision. This changes
47-
the previous startup behavior, which stopped at a manual repair gate. It can
48-
replace a separately updated default CLI with the App's matching snapshot;
49-
use an App update to move the paired installation forward. Automatic startup
50-
does not download another App or choose another update channel. Explicit
51-
`LOOPX_BIN` overrides are retained and are never replaced automatically: a
52-
mismatched override must be corrected by its owner.
45+
On macOS, opening the App prepares its bundled runtime automatically only when
46+
no default CLI runtime is installed: with nothing to replace, a fresh machine
47+
still bootstraps in one launch. When a *different* runtime is already selected,
48+
the first screen asks the operator instead of replacing it, because that
49+
default CLI may be the newer layer. The two choices are **Update App and
50+
runtime** (check this App's channel, then install the signed App and its
51+
matching snapshot together) and **Use this App's runtime** (install the
52+
snapshot this App carries, which aligns the CLI to the App's revision and can
53+
move it backwards). Services stay stopped until one of them is chosen, so an
54+
App that lags the CLI can no longer silently downgrade the CLI on open. Neither
55+
choice downloads another App on its own or selects another update channel, and
56+
both leave Goal data untouched. A channel with no newer build says so and
57+
leaves the CLI choice standing. Explicit `LOOPX_BIN` overrides are retained and
58+
are never replaced automatically: a mismatched override must be corrected by
59+
its owner.
5360

5461
The installer and App-owned services use the same bounded tool search,
5562
including standard Homebrew locations on macOS, without loading interactive

‎apps/desktop/loopx-control-plane/src-tauri/src/lib.rs‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ fn maintenance_origin(url: &Url) -> String {
2727
// echo verbatim into the boot surface, where it names the recovery panel's
2828
// actionable diagnostics instead of a misleading fixed message.
2929
fn boot_failure_message(error: &str) -> String {
30+
// The pairing decision is not a failure: the window is waiting for the
31+
// operator to choose between updating the App and aligning the CLI.
32+
if error == "runtime_pairing_required" {
33+
return "本机 LoopX 运行时与 App 自带的运行时不一致,请在上方选择「更新 App 与运行时」或「回退 CLI 到本 App 版本」后继续。"
34+
.to_string();
35+
}
3036
let is_stable_code = !error.is_empty()
3137
&& error.chars().all(|character| {
3238
character.is_ascii_lowercase() || character.is_ascii_digit() || character == '_'
@@ -219,9 +225,16 @@ mod tests {
219225
assert!(style.contains("@keyframes mark-breathe"));
220226
assert!(style.contains("prefers-reduced-motion: reduce"));
221227
assert!(style.contains("main[data-state=\"error\"] .progress::after"));
228+
assert!(style.contains("main[data-state=\"decision\"] .progress"));
222229
assert!(style.contains("--warning: #f5a623"));
223230
assert!(script.contains("desktop_update_status"));
224231
assert!(script.contains("window.loopxBootRetrying"));
232+
// The first screen must offer both operator choices, not a repair path
233+
// that silently replaces the CLI runtime.
234+
assert!(html.contains("id=\"pairing-align\""));
235+
assert!(html.contains("回退 CLI"));
236+
assert!(script.contains("runtime_pairing_required"));
237+
assert!(script.contains("\"align_runtime\""));
225238
// The boot surface must derive its error projection from the polled
226239
// snapshot itself and name the known fresh-Mac installer failure.
227240
assert!(script.contains("runtime_install_exit_2"));
@@ -231,6 +244,12 @@ mod tests {
231244
#[test]
232245
fn boot_failure_message_appends_stable_codes_only() {
233246
use super::boot_failure_message;
247+
// The pairing decision names both operator choices instead of the
248+
// generic startup failure text.
249+
let pairing = boot_failure_message("runtime_pairing_required");
250+
assert!(pairing.contains("更新 App 与运行时"));
251+
assert!(pairing.contains("回退 CLI 到本 App 版本"));
252+
assert!(!pairing.contains("错误码"));
234253
assert_eq!(
235254
boot_failure_message("runtime_install_exit_2"),
236255
"本地服务暂时无法启动,请检查安装或端口占用。(错误码 runtime_install_exit_2,详见恢复与更新面板)"

0 commit comments

Comments
 (0)