fix(runtime): keep Windows lock records out of route discovery #6658
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 621 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.385
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6658"
general
weight: 0.35
JasonBuildAI
Goal
Close the remaining Windows case of the phantom two-root conflict that
f955e8305fixed for.lock/.ts-effect.lock: a released Windows lock-holder record (or an incident log) beside a root's own global registry must not be read back as machine state, so a Windows machine whose work has settled on one default runtime root stops refusing every implicit-default command (loopx status,update check,usage-ping status).Closes #6657.
What changed
loopx/paths.py:_is_route_observationnow recognizes the documented lock-metadata family beside the root's own global registry —registry.global.json.lock,registry.global.json.lock.holder, the legacyregistry.global.json.lock.holder.json,registry.global.json.lock.incidents.jsonl,registry.global.json.ts-effect.lock— on every platform, so an archive restored on another host cannot re-create the conflict either. Redirected entries, unknown files and real registries keep their authority.tests/test_local_state_migration.py: extendstest_own_registry_locks_do_not_declare_a_second_authorityandtest_observations_and_consumer_locks_do_not_claim_a_second_runtimewith the holder / legacy-holder / incident spellings, and addstest_a_real_lock_round_trip_keeps_the_default_route_fresh, which drives the realexclusive_file_lockproducer — the writer behind Goal configuration — so the producer→consumer contract is pinned instead of hand-placed files.Evidence
Before (pre-fix tree, sandbox with both default roots redirected to a disposable temp tree):
After (this head):
Negative case — the new guards against the unfixed
paths.py(source fix stashed, tests kept):Real-host readback on the reporting machine (read-only, no state written):
status: legacy,selected_runtime_root: %USERPROFILE%\.codex\loopx, andloopx statuswith implicit defaults completes with exit 0. Pre-fix, the same host refused with the two-root conflict message, andloopx usage-ping statusdied with an unhandledValueErrortraceback (both in #6657).Validation
At exact head
5ccf12f2fon Windows 11 (10.0.26100), Python 3.12.12:uv run --extra test python -m pytest tests/test_local_state_migration.py tests/test_file_lock.py tests/test_doctor_installation_scope.py→14 failed, 101 passed, 3 skipped. The 14 failures are host artifacts (symlink privilegeWinError 1314, Windows path-quoting/separator rendering), not new: the pristine run of this file alone gave the identical14 failed, 67 passed, and neitherloopx/paths.pynor this test file changed between that baseline488e4438eand the push baseb2aca67d7(git diff 488e4438e b2aca67d7 -- loopx/paths.py tests/test_local_state_migration.pyis empty). The four new guards are among the passes (-krun: 7 passed; the same run against the unfixed source fails 5, see above).uv run python -m ruff check loopx/paths.py tests/test_local_state_migration.py→ cleanuv run python scripts/generate_semantic_inventory.py --changed-from HEAD(on the working diff) →changed sources: 1 paths, 1 snapshots; supported candidates: 0— no new vocabulary carriersScope
loopx usage-ping statusunhandled-traceback surface (that refusal behavior is a separate defect already carried by another agent's coordination claim); thewindows-powershelllane file selection (#6638 / #6639 owns the workflow).uv.lockstays uncommitted (generated by localuv sync).Checklist
git commit -s)<sub>Drafted with AI assistance at my request, under my direction and review.</sub>