@mc-and-his-agents/loom-installer 0.1.50 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/manifest.json +22 -22
- package/payload/plugin/loom/skills/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-adopt/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-handoff/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-init/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-pre-review/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-resume/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-retire/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-review/.loom-runtime/shared/scripts/loom_check.py +99 -1
- package/payload/skills/loom-spec-review/.loom-runtime/shared/scripts/loom_check.py +99 -1
package/package.json
CHANGED
package/payload/manifest.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"schema_version": "loom-installer-payload/v1",
|
|
3
3
|
"loom_version": "0.4.0",
|
|
4
4
|
"source_repository": "https://github.com/MC-and-his-Agents/Loom",
|
|
5
|
-
"source_commit": "
|
|
5
|
+
"source_commit": "25dcc71b214c7243c36a46a126de9239c6a06c00",
|
|
6
6
|
"source_ref": "main",
|
|
7
|
-
"built_at": "2026-04-
|
|
7
|
+
"built_at": "2026-04-28T13:55:40+08:00",
|
|
8
8
|
"runtime": {
|
|
9
9
|
"python_minimum": "3.10",
|
|
10
10
|
"python_recommended": "3.11+"
|
|
@@ -633,8 +633,8 @@
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
"path": "plugin/loom/skills/shared/scripts/loom_check.py",
|
|
636
|
-
"bytes":
|
|
637
|
-
"sha256": "
|
|
636
|
+
"bytes": 370455,
|
|
637
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
638
638
|
},
|
|
639
639
|
{
|
|
640
640
|
"path": "plugin/loom/skills/shared/scripts/loom_flow.py",
|
|
@@ -1223,8 +1223,8 @@
|
|
|
1223
1223
|
},
|
|
1224
1224
|
{
|
|
1225
1225
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/loom_check.py",
|
|
1226
|
-
"bytes":
|
|
1227
|
-
"sha256": "
|
|
1226
|
+
"bytes": 370455,
|
|
1227
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
1228
1228
|
},
|
|
1229
1229
|
{
|
|
1230
1230
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -1843,8 +1843,8 @@
|
|
|
1843
1843
|
},
|
|
1844
1844
|
{
|
|
1845
1845
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/loom_check.py",
|
|
1846
|
-
"bytes":
|
|
1847
|
-
"sha256": "
|
|
1846
|
+
"bytes": 370455,
|
|
1847
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
1848
1848
|
},
|
|
1849
1849
|
{
|
|
1850
1850
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -2463,8 +2463,8 @@
|
|
|
2463
2463
|
},
|
|
2464
2464
|
{
|
|
2465
2465
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/loom_check.py",
|
|
2466
|
-
"bytes":
|
|
2467
|
-
"sha256": "
|
|
2466
|
+
"bytes": 370455,
|
|
2467
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
2468
2468
|
},
|
|
2469
2469
|
{
|
|
2470
2470
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -3088,8 +3088,8 @@
|
|
|
3088
3088
|
},
|
|
3089
3089
|
{
|
|
3090
3090
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_check.py",
|
|
3091
|
-
"bytes":
|
|
3092
|
-
"sha256": "
|
|
3091
|
+
"bytes": 370455,
|
|
3092
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
3093
3093
|
},
|
|
3094
3094
|
{
|
|
3095
3095
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -3708,8 +3708,8 @@
|
|
|
3708
3708
|
},
|
|
3709
3709
|
{
|
|
3710
3710
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
3711
|
-
"bytes":
|
|
3712
|
-
"sha256": "
|
|
3711
|
+
"bytes": 370455,
|
|
3712
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
3713
3713
|
},
|
|
3714
3714
|
{
|
|
3715
3715
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -4328,8 +4328,8 @@
|
|
|
4328
4328
|
},
|
|
4329
4329
|
{
|
|
4330
4330
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/loom_check.py",
|
|
4331
|
-
"bytes":
|
|
4332
|
-
"sha256": "
|
|
4331
|
+
"bytes": 370455,
|
|
4332
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
4333
4333
|
},
|
|
4334
4334
|
{
|
|
4335
4335
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -4948,8 +4948,8 @@
|
|
|
4948
4948
|
},
|
|
4949
4949
|
{
|
|
4950
4950
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/loom_check.py",
|
|
4951
|
-
"bytes":
|
|
4952
|
-
"sha256": "
|
|
4951
|
+
"bytes": 370455,
|
|
4952
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
4953
4953
|
},
|
|
4954
4954
|
{
|
|
4955
4955
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -5568,8 +5568,8 @@
|
|
|
5568
5568
|
},
|
|
5569
5569
|
{
|
|
5570
5570
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
5571
|
-
"bytes":
|
|
5572
|
-
"sha256": "
|
|
5571
|
+
"bytes": 370455,
|
|
5572
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
5573
5573
|
},
|
|
5574
5574
|
{
|
|
5575
5575
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -6188,8 +6188,8 @@
|
|
|
6188
6188
|
},
|
|
6189
6189
|
{
|
|
6190
6190
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
6191
|
-
"bytes":
|
|
6192
|
-
"sha256": "
|
|
6191
|
+
"bytes": 370455,
|
|
6192
|
+
"sha256": "1d60fbb276d1ba43c22823adbd6c570fde5730e23e61167f26c815b729fb0cc8"
|
|
6193
6193
|
},
|
|
6194
6194
|
{
|
|
6195
6195
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
@@ -2410,6 +2410,103 @@ def check_demo_repo_local_cli(root: Path) -> list[Failure]:
|
|
|
2410
2410
|
return failures
|
|
2411
2411
|
|
|
2412
2412
|
|
|
2413
|
+
def check_root_self_adoption_carrier(root: Path) -> list[Failure]:
|
|
2414
|
+
failures: list[Failure] = []
|
|
2415
|
+
carrier_root = root / ".loom"
|
|
2416
|
+
if not carrier_root.exists():
|
|
2417
|
+
return failures
|
|
2418
|
+
|
|
2419
|
+
required_paths = (
|
|
2420
|
+
".loom/bootstrap/manifest.json",
|
|
2421
|
+
".loom/bootstrap/init-result.json",
|
|
2422
|
+
".loom/bin/loom_init.py",
|
|
2423
|
+
".loom/bin/loom_flow.py",
|
|
2424
|
+
".loom/work-items/INIT-0001.md",
|
|
2425
|
+
".loom/progress/INIT-0001.md",
|
|
2426
|
+
".loom/reviews/INIT-0001.json",
|
|
2427
|
+
".loom/status/current.md",
|
|
2428
|
+
)
|
|
2429
|
+
failures.extend(check_required_paths(root, "root-self-adoption", required_paths))
|
|
2430
|
+
|
|
2431
|
+
commands = (
|
|
2432
|
+
(
|
|
2433
|
+
"root verify",
|
|
2434
|
+
["python3", ".loom/bin/loom_init.py", "verify", "--target", "."],
|
|
2435
|
+
"loom-init-verify",
|
|
2436
|
+
{"ok": True},
|
|
2437
|
+
),
|
|
2438
|
+
(
|
|
2439
|
+
"root governance status",
|
|
2440
|
+
["python3", ".loom/bin/loom_flow.py", "governance-profile", "status", "--target", "."],
|
|
2441
|
+
"governance-status",
|
|
2442
|
+
{"result": "pass"},
|
|
2443
|
+
),
|
|
2444
|
+
(
|
|
2445
|
+
"root runtime parity",
|
|
2446
|
+
["python3", ".loom/bin/loom_flow.py", "runtime-parity", "validate", "--target", "."],
|
|
2447
|
+
"runtime-parity",
|
|
2448
|
+
{"result": "pass", "schema_version": "loom-runtime-parity/v1"},
|
|
2449
|
+
),
|
|
2450
|
+
(
|
|
2451
|
+
"root adopt verify",
|
|
2452
|
+
["python3", ".loom/bin/loom_flow.py", "adopt", "verify", "--target", ".", "--item", "INIT-0001"],
|
|
2453
|
+
"adopt-verify",
|
|
2454
|
+
{"result": "pass", "schema_version": "loom-adoption-verify/v1"},
|
|
2455
|
+
),
|
|
2456
|
+
(
|
|
2457
|
+
"root carrier refresh",
|
|
2458
|
+
["python3", ".loom/bin/loom_flow.py", "carrier", "refresh", "--target", ".", "--dry-run"],
|
|
2459
|
+
"carrier-refresh",
|
|
2460
|
+
{"result": "pass", "schema_version": "loom-carrier-refresh/v1"},
|
|
2461
|
+
),
|
|
2462
|
+
)
|
|
2463
|
+
for label, args, kind, expected in commands:
|
|
2464
|
+
payload, error = load_command_json(root, args)
|
|
2465
|
+
if error:
|
|
2466
|
+
failures.append(Failure("root-self-adoption", f"`{label}` failed: {error}"))
|
|
2467
|
+
continue
|
|
2468
|
+
for key, value in expected.items():
|
|
2469
|
+
if payload.get(key) != value:
|
|
2470
|
+
failures.append(Failure("root-self-adoption", f"`{label}` must report `{key}: {value}`"))
|
|
2471
|
+
runtime_payload = payload.get("runtime_state")
|
|
2472
|
+
if kind == "loom-init-verify":
|
|
2473
|
+
runtime_payload = payload.get("runtime_state")
|
|
2474
|
+
if runtime_payload is not None:
|
|
2475
|
+
require_runtime_state_payload(
|
|
2476
|
+
failures,
|
|
2477
|
+
category="root-self-adoption",
|
|
2478
|
+
context=f"`{label}`",
|
|
2479
|
+
payload=runtime_payload,
|
|
2480
|
+
expected_scene="installed-runtime",
|
|
2481
|
+
expected_carrier="bootstrapped-target-runtime",
|
|
2482
|
+
allowed_results={"pass"},
|
|
2483
|
+
)
|
|
2484
|
+
if kind == "governance-status":
|
|
2485
|
+
maturity = payload.get("maturity")
|
|
2486
|
+
if not isinstance(maturity, dict) or maturity.get("current") not in {"light", "standard", "strong"}:
|
|
2487
|
+
failures.append(Failure("root-self-adoption", "`root governance status` must report adopted maturity"))
|
|
2488
|
+
if kind == "runtime-parity":
|
|
2489
|
+
checks = payload.get("checks")
|
|
2490
|
+
names = {check.get("name") for check in checks if isinstance(check, dict)} if isinstance(checks, list) else set()
|
|
2491
|
+
if "shadow_parity_boundary" not in names or "controlled_merge_contract" not in names:
|
|
2492
|
+
failures.append(Failure("root-self-adoption", "`root runtime parity` must cover shadow and controlled merge boundaries"))
|
|
2493
|
+
if kind == "adopt-verify":
|
|
2494
|
+
roundtrip = payload.get("producer_consumer_roundtrip")
|
|
2495
|
+
if not isinstance(roundtrip, dict):
|
|
2496
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must include producer_consumer_roundtrip"))
|
|
2497
|
+
elif roundtrip.get("bypass_check", {}).get("result") != "pass":
|
|
2498
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must prove required section deletion blocks"))
|
|
2499
|
+
if kind == "carrier-refresh":
|
|
2500
|
+
if payload.get("refresh_needed") not in ([], None):
|
|
2501
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must not report runtime provenance drift"))
|
|
2502
|
+
review = payload.get("review")
|
|
2503
|
+
if isinstance(review, dict):
|
|
2504
|
+
head_binding = review.get("head_binding")
|
|
2505
|
+
if isinstance(head_binding, dict) and head_binding.get("status") == "stale":
|
|
2506
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must detect stale review head binding"))
|
|
2507
|
+
return failures
|
|
2508
|
+
|
|
2509
|
+
|
|
2413
2510
|
def check_deep_existing_repo_bootstrap(root: Path) -> list[Failure]:
|
|
2414
2511
|
failures: list[Failure] = []
|
|
2415
2512
|
with tempfile.TemporaryDirectory(prefix="loom-check-deep-existing-") as tmp:
|
|
@@ -7449,6 +7546,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7449
7546
|
failures.extend(check_demo_assets(root))
|
|
7450
7547
|
failures.extend(check_demo_fact_chain(root))
|
|
7451
7548
|
failures.extend(check_demo_repo_local_cli(root))
|
|
7549
|
+
failures.extend(check_root_self_adoption_carrier(root))
|
|
7452
7550
|
failures.extend(check_deep_existing_repo_bootstrap(root))
|
|
7453
7551
|
failures.extend(check_daily_execution_cli(root))
|
|
7454
7552
|
failures.extend(check_repo_companion_interface_contracts(root))
|
|
@@ -7463,7 +7561,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7463
7561
|
|
|
7464
7562
|
|
|
7465
7563
|
def print_report(root: Path, failures: list[Failure]) -> None:
|
|
7466
|
-
categories_checked =
|
|
7564
|
+
categories_checked = 19
|
|
7467
7565
|
if not failures:
|
|
7468
7566
|
print(f"loom_check: OK ({root})")
|
|
7469
7567
|
print(f"checked {categories_checked} surfaces")
|
|
@@ -2410,6 +2410,103 @@ def check_demo_repo_local_cli(root: Path) -> list[Failure]:
|
|
|
2410
2410
|
return failures
|
|
2411
2411
|
|
|
2412
2412
|
|
|
2413
|
+
def check_root_self_adoption_carrier(root: Path) -> list[Failure]:
|
|
2414
|
+
failures: list[Failure] = []
|
|
2415
|
+
carrier_root = root / ".loom"
|
|
2416
|
+
if not carrier_root.exists():
|
|
2417
|
+
return failures
|
|
2418
|
+
|
|
2419
|
+
required_paths = (
|
|
2420
|
+
".loom/bootstrap/manifest.json",
|
|
2421
|
+
".loom/bootstrap/init-result.json",
|
|
2422
|
+
".loom/bin/loom_init.py",
|
|
2423
|
+
".loom/bin/loom_flow.py",
|
|
2424
|
+
".loom/work-items/INIT-0001.md",
|
|
2425
|
+
".loom/progress/INIT-0001.md",
|
|
2426
|
+
".loom/reviews/INIT-0001.json",
|
|
2427
|
+
".loom/status/current.md",
|
|
2428
|
+
)
|
|
2429
|
+
failures.extend(check_required_paths(root, "root-self-adoption", required_paths))
|
|
2430
|
+
|
|
2431
|
+
commands = (
|
|
2432
|
+
(
|
|
2433
|
+
"root verify",
|
|
2434
|
+
["python3", ".loom/bin/loom_init.py", "verify", "--target", "."],
|
|
2435
|
+
"loom-init-verify",
|
|
2436
|
+
{"ok": True},
|
|
2437
|
+
),
|
|
2438
|
+
(
|
|
2439
|
+
"root governance status",
|
|
2440
|
+
["python3", ".loom/bin/loom_flow.py", "governance-profile", "status", "--target", "."],
|
|
2441
|
+
"governance-status",
|
|
2442
|
+
{"result": "pass"},
|
|
2443
|
+
),
|
|
2444
|
+
(
|
|
2445
|
+
"root runtime parity",
|
|
2446
|
+
["python3", ".loom/bin/loom_flow.py", "runtime-parity", "validate", "--target", "."],
|
|
2447
|
+
"runtime-parity",
|
|
2448
|
+
{"result": "pass", "schema_version": "loom-runtime-parity/v1"},
|
|
2449
|
+
),
|
|
2450
|
+
(
|
|
2451
|
+
"root adopt verify",
|
|
2452
|
+
["python3", ".loom/bin/loom_flow.py", "adopt", "verify", "--target", ".", "--item", "INIT-0001"],
|
|
2453
|
+
"adopt-verify",
|
|
2454
|
+
{"result": "pass", "schema_version": "loom-adoption-verify/v1"},
|
|
2455
|
+
),
|
|
2456
|
+
(
|
|
2457
|
+
"root carrier refresh",
|
|
2458
|
+
["python3", ".loom/bin/loom_flow.py", "carrier", "refresh", "--target", ".", "--dry-run"],
|
|
2459
|
+
"carrier-refresh",
|
|
2460
|
+
{"result": "pass", "schema_version": "loom-carrier-refresh/v1"},
|
|
2461
|
+
),
|
|
2462
|
+
)
|
|
2463
|
+
for label, args, kind, expected in commands:
|
|
2464
|
+
payload, error = load_command_json(root, args)
|
|
2465
|
+
if error:
|
|
2466
|
+
failures.append(Failure("root-self-adoption", f"`{label}` failed: {error}"))
|
|
2467
|
+
continue
|
|
2468
|
+
for key, value in expected.items():
|
|
2469
|
+
if payload.get(key) != value:
|
|
2470
|
+
failures.append(Failure("root-self-adoption", f"`{label}` must report `{key}: {value}`"))
|
|
2471
|
+
runtime_payload = payload.get("runtime_state")
|
|
2472
|
+
if kind == "loom-init-verify":
|
|
2473
|
+
runtime_payload = payload.get("runtime_state")
|
|
2474
|
+
if runtime_payload is not None:
|
|
2475
|
+
require_runtime_state_payload(
|
|
2476
|
+
failures,
|
|
2477
|
+
category="root-self-adoption",
|
|
2478
|
+
context=f"`{label}`",
|
|
2479
|
+
payload=runtime_payload,
|
|
2480
|
+
expected_scene="installed-runtime",
|
|
2481
|
+
expected_carrier="bootstrapped-target-runtime",
|
|
2482
|
+
allowed_results={"pass"},
|
|
2483
|
+
)
|
|
2484
|
+
if kind == "governance-status":
|
|
2485
|
+
maturity = payload.get("maturity")
|
|
2486
|
+
if not isinstance(maturity, dict) or maturity.get("current") not in {"light", "standard", "strong"}:
|
|
2487
|
+
failures.append(Failure("root-self-adoption", "`root governance status` must report adopted maturity"))
|
|
2488
|
+
if kind == "runtime-parity":
|
|
2489
|
+
checks = payload.get("checks")
|
|
2490
|
+
names = {check.get("name") for check in checks if isinstance(check, dict)} if isinstance(checks, list) else set()
|
|
2491
|
+
if "shadow_parity_boundary" not in names or "controlled_merge_contract" not in names:
|
|
2492
|
+
failures.append(Failure("root-self-adoption", "`root runtime parity` must cover shadow and controlled merge boundaries"))
|
|
2493
|
+
if kind == "adopt-verify":
|
|
2494
|
+
roundtrip = payload.get("producer_consumer_roundtrip")
|
|
2495
|
+
if not isinstance(roundtrip, dict):
|
|
2496
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must include producer_consumer_roundtrip"))
|
|
2497
|
+
elif roundtrip.get("bypass_check", {}).get("result") != "pass":
|
|
2498
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must prove required section deletion blocks"))
|
|
2499
|
+
if kind == "carrier-refresh":
|
|
2500
|
+
if payload.get("refresh_needed") not in ([], None):
|
|
2501
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must not report runtime provenance drift"))
|
|
2502
|
+
review = payload.get("review")
|
|
2503
|
+
if isinstance(review, dict):
|
|
2504
|
+
head_binding = review.get("head_binding")
|
|
2505
|
+
if isinstance(head_binding, dict) and head_binding.get("status") == "stale":
|
|
2506
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must detect stale review head binding"))
|
|
2507
|
+
return failures
|
|
2508
|
+
|
|
2509
|
+
|
|
2413
2510
|
def check_deep_existing_repo_bootstrap(root: Path) -> list[Failure]:
|
|
2414
2511
|
failures: list[Failure] = []
|
|
2415
2512
|
with tempfile.TemporaryDirectory(prefix="loom-check-deep-existing-") as tmp:
|
|
@@ -7449,6 +7546,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7449
7546
|
failures.extend(check_demo_assets(root))
|
|
7450
7547
|
failures.extend(check_demo_fact_chain(root))
|
|
7451
7548
|
failures.extend(check_demo_repo_local_cli(root))
|
|
7549
|
+
failures.extend(check_root_self_adoption_carrier(root))
|
|
7452
7550
|
failures.extend(check_deep_existing_repo_bootstrap(root))
|
|
7453
7551
|
failures.extend(check_daily_execution_cli(root))
|
|
7454
7552
|
failures.extend(check_repo_companion_interface_contracts(root))
|
|
@@ -7463,7 +7561,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7463
7561
|
|
|
7464
7562
|
|
|
7465
7563
|
def print_report(root: Path, failures: list[Failure]) -> None:
|
|
7466
|
-
categories_checked =
|
|
7564
|
+
categories_checked = 19
|
|
7467
7565
|
if not failures:
|
|
7468
7566
|
print(f"loom_check: OK ({root})")
|
|
7469
7567
|
print(f"checked {categories_checked} surfaces")
|
|
@@ -2410,6 +2410,103 @@ def check_demo_repo_local_cli(root: Path) -> list[Failure]:
|
|
|
2410
2410
|
return failures
|
|
2411
2411
|
|
|
2412
2412
|
|
|
2413
|
+
def check_root_self_adoption_carrier(root: Path) -> list[Failure]:
|
|
2414
|
+
failures: list[Failure] = []
|
|
2415
|
+
carrier_root = root / ".loom"
|
|
2416
|
+
if not carrier_root.exists():
|
|
2417
|
+
return failures
|
|
2418
|
+
|
|
2419
|
+
required_paths = (
|
|
2420
|
+
".loom/bootstrap/manifest.json",
|
|
2421
|
+
".loom/bootstrap/init-result.json",
|
|
2422
|
+
".loom/bin/loom_init.py",
|
|
2423
|
+
".loom/bin/loom_flow.py",
|
|
2424
|
+
".loom/work-items/INIT-0001.md",
|
|
2425
|
+
".loom/progress/INIT-0001.md",
|
|
2426
|
+
".loom/reviews/INIT-0001.json",
|
|
2427
|
+
".loom/status/current.md",
|
|
2428
|
+
)
|
|
2429
|
+
failures.extend(check_required_paths(root, "root-self-adoption", required_paths))
|
|
2430
|
+
|
|
2431
|
+
commands = (
|
|
2432
|
+
(
|
|
2433
|
+
"root verify",
|
|
2434
|
+
["python3", ".loom/bin/loom_init.py", "verify", "--target", "."],
|
|
2435
|
+
"loom-init-verify",
|
|
2436
|
+
{"ok": True},
|
|
2437
|
+
),
|
|
2438
|
+
(
|
|
2439
|
+
"root governance status",
|
|
2440
|
+
["python3", ".loom/bin/loom_flow.py", "governance-profile", "status", "--target", "."],
|
|
2441
|
+
"governance-status",
|
|
2442
|
+
{"result": "pass"},
|
|
2443
|
+
),
|
|
2444
|
+
(
|
|
2445
|
+
"root runtime parity",
|
|
2446
|
+
["python3", ".loom/bin/loom_flow.py", "runtime-parity", "validate", "--target", "."],
|
|
2447
|
+
"runtime-parity",
|
|
2448
|
+
{"result": "pass", "schema_version": "loom-runtime-parity/v1"},
|
|
2449
|
+
),
|
|
2450
|
+
(
|
|
2451
|
+
"root adopt verify",
|
|
2452
|
+
["python3", ".loom/bin/loom_flow.py", "adopt", "verify", "--target", ".", "--item", "INIT-0001"],
|
|
2453
|
+
"adopt-verify",
|
|
2454
|
+
{"result": "pass", "schema_version": "loom-adoption-verify/v1"},
|
|
2455
|
+
),
|
|
2456
|
+
(
|
|
2457
|
+
"root carrier refresh",
|
|
2458
|
+
["python3", ".loom/bin/loom_flow.py", "carrier", "refresh", "--target", ".", "--dry-run"],
|
|
2459
|
+
"carrier-refresh",
|
|
2460
|
+
{"result": "pass", "schema_version": "loom-carrier-refresh/v1"},
|
|
2461
|
+
),
|
|
2462
|
+
)
|
|
2463
|
+
for label, args, kind, expected in commands:
|
|
2464
|
+
payload, error = load_command_json(root, args)
|
|
2465
|
+
if error:
|
|
2466
|
+
failures.append(Failure("root-self-adoption", f"`{label}` failed: {error}"))
|
|
2467
|
+
continue
|
|
2468
|
+
for key, value in expected.items():
|
|
2469
|
+
if payload.get(key) != value:
|
|
2470
|
+
failures.append(Failure("root-self-adoption", f"`{label}` must report `{key}: {value}`"))
|
|
2471
|
+
runtime_payload = payload.get("runtime_state")
|
|
2472
|
+
if kind == "loom-init-verify":
|
|
2473
|
+
runtime_payload = payload.get("runtime_state")
|
|
2474
|
+
if runtime_payload is not None:
|
|
2475
|
+
require_runtime_state_payload(
|
|
2476
|
+
failures,
|
|
2477
|
+
category="root-self-adoption",
|
|
2478
|
+
context=f"`{label}`",
|
|
2479
|
+
payload=runtime_payload,
|
|
2480
|
+
expected_scene="installed-runtime",
|
|
2481
|
+
expected_carrier="bootstrapped-target-runtime",
|
|
2482
|
+
allowed_results={"pass"},
|
|
2483
|
+
)
|
|
2484
|
+
if kind == "governance-status":
|
|
2485
|
+
maturity = payload.get("maturity")
|
|
2486
|
+
if not isinstance(maturity, dict) or maturity.get("current") not in {"light", "standard", "strong"}:
|
|
2487
|
+
failures.append(Failure("root-self-adoption", "`root governance status` must report adopted maturity"))
|
|
2488
|
+
if kind == "runtime-parity":
|
|
2489
|
+
checks = payload.get("checks")
|
|
2490
|
+
names = {check.get("name") for check in checks if isinstance(check, dict)} if isinstance(checks, list) else set()
|
|
2491
|
+
if "shadow_parity_boundary" not in names or "controlled_merge_contract" not in names:
|
|
2492
|
+
failures.append(Failure("root-self-adoption", "`root runtime parity` must cover shadow and controlled merge boundaries"))
|
|
2493
|
+
if kind == "adopt-verify":
|
|
2494
|
+
roundtrip = payload.get("producer_consumer_roundtrip")
|
|
2495
|
+
if not isinstance(roundtrip, dict):
|
|
2496
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must include producer_consumer_roundtrip"))
|
|
2497
|
+
elif roundtrip.get("bypass_check", {}).get("result") != "pass":
|
|
2498
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must prove required section deletion blocks"))
|
|
2499
|
+
if kind == "carrier-refresh":
|
|
2500
|
+
if payload.get("refresh_needed") not in ([], None):
|
|
2501
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must not report runtime provenance drift"))
|
|
2502
|
+
review = payload.get("review")
|
|
2503
|
+
if isinstance(review, dict):
|
|
2504
|
+
head_binding = review.get("head_binding")
|
|
2505
|
+
if isinstance(head_binding, dict) and head_binding.get("status") == "stale":
|
|
2506
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must detect stale review head binding"))
|
|
2507
|
+
return failures
|
|
2508
|
+
|
|
2509
|
+
|
|
2413
2510
|
def check_deep_existing_repo_bootstrap(root: Path) -> list[Failure]:
|
|
2414
2511
|
failures: list[Failure] = []
|
|
2415
2512
|
with tempfile.TemporaryDirectory(prefix="loom-check-deep-existing-") as tmp:
|
|
@@ -7449,6 +7546,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7449
7546
|
failures.extend(check_demo_assets(root))
|
|
7450
7547
|
failures.extend(check_demo_fact_chain(root))
|
|
7451
7548
|
failures.extend(check_demo_repo_local_cli(root))
|
|
7549
|
+
failures.extend(check_root_self_adoption_carrier(root))
|
|
7452
7550
|
failures.extend(check_deep_existing_repo_bootstrap(root))
|
|
7453
7551
|
failures.extend(check_daily_execution_cli(root))
|
|
7454
7552
|
failures.extend(check_repo_companion_interface_contracts(root))
|
|
@@ -7463,7 +7561,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7463
7561
|
|
|
7464
7562
|
|
|
7465
7563
|
def print_report(root: Path, failures: list[Failure]) -> None:
|
|
7466
|
-
categories_checked =
|
|
7564
|
+
categories_checked = 19
|
|
7467
7565
|
if not failures:
|
|
7468
7566
|
print(f"loom_check: OK ({root})")
|
|
7469
7567
|
print(f"checked {categories_checked} surfaces")
|
|
@@ -2410,6 +2410,103 @@ def check_demo_repo_local_cli(root: Path) -> list[Failure]:
|
|
|
2410
2410
|
return failures
|
|
2411
2411
|
|
|
2412
2412
|
|
|
2413
|
+
def check_root_self_adoption_carrier(root: Path) -> list[Failure]:
|
|
2414
|
+
failures: list[Failure] = []
|
|
2415
|
+
carrier_root = root / ".loom"
|
|
2416
|
+
if not carrier_root.exists():
|
|
2417
|
+
return failures
|
|
2418
|
+
|
|
2419
|
+
required_paths = (
|
|
2420
|
+
".loom/bootstrap/manifest.json",
|
|
2421
|
+
".loom/bootstrap/init-result.json",
|
|
2422
|
+
".loom/bin/loom_init.py",
|
|
2423
|
+
".loom/bin/loom_flow.py",
|
|
2424
|
+
".loom/work-items/INIT-0001.md",
|
|
2425
|
+
".loom/progress/INIT-0001.md",
|
|
2426
|
+
".loom/reviews/INIT-0001.json",
|
|
2427
|
+
".loom/status/current.md",
|
|
2428
|
+
)
|
|
2429
|
+
failures.extend(check_required_paths(root, "root-self-adoption", required_paths))
|
|
2430
|
+
|
|
2431
|
+
commands = (
|
|
2432
|
+
(
|
|
2433
|
+
"root verify",
|
|
2434
|
+
["python3", ".loom/bin/loom_init.py", "verify", "--target", "."],
|
|
2435
|
+
"loom-init-verify",
|
|
2436
|
+
{"ok": True},
|
|
2437
|
+
),
|
|
2438
|
+
(
|
|
2439
|
+
"root governance status",
|
|
2440
|
+
["python3", ".loom/bin/loom_flow.py", "governance-profile", "status", "--target", "."],
|
|
2441
|
+
"governance-status",
|
|
2442
|
+
{"result": "pass"},
|
|
2443
|
+
),
|
|
2444
|
+
(
|
|
2445
|
+
"root runtime parity",
|
|
2446
|
+
["python3", ".loom/bin/loom_flow.py", "runtime-parity", "validate", "--target", "."],
|
|
2447
|
+
"runtime-parity",
|
|
2448
|
+
{"result": "pass", "schema_version": "loom-runtime-parity/v1"},
|
|
2449
|
+
),
|
|
2450
|
+
(
|
|
2451
|
+
"root adopt verify",
|
|
2452
|
+
["python3", ".loom/bin/loom_flow.py", "adopt", "verify", "--target", ".", "--item", "INIT-0001"],
|
|
2453
|
+
"adopt-verify",
|
|
2454
|
+
{"result": "pass", "schema_version": "loom-adoption-verify/v1"},
|
|
2455
|
+
),
|
|
2456
|
+
(
|
|
2457
|
+
"root carrier refresh",
|
|
2458
|
+
["python3", ".loom/bin/loom_flow.py", "carrier", "refresh", "--target", ".", "--dry-run"],
|
|
2459
|
+
"carrier-refresh",
|
|
2460
|
+
{"result": "pass", "schema_version": "loom-carrier-refresh/v1"},
|
|
2461
|
+
),
|
|
2462
|
+
)
|
|
2463
|
+
for label, args, kind, expected in commands:
|
|
2464
|
+
payload, error = load_command_json(root, args)
|
|
2465
|
+
if error:
|
|
2466
|
+
failures.append(Failure("root-self-adoption", f"`{label}` failed: {error}"))
|
|
2467
|
+
continue
|
|
2468
|
+
for key, value in expected.items():
|
|
2469
|
+
if payload.get(key) != value:
|
|
2470
|
+
failures.append(Failure("root-self-adoption", f"`{label}` must report `{key}: {value}`"))
|
|
2471
|
+
runtime_payload = payload.get("runtime_state")
|
|
2472
|
+
if kind == "loom-init-verify":
|
|
2473
|
+
runtime_payload = payload.get("runtime_state")
|
|
2474
|
+
if runtime_payload is not None:
|
|
2475
|
+
require_runtime_state_payload(
|
|
2476
|
+
failures,
|
|
2477
|
+
category="root-self-adoption",
|
|
2478
|
+
context=f"`{label}`",
|
|
2479
|
+
payload=runtime_payload,
|
|
2480
|
+
expected_scene="installed-runtime",
|
|
2481
|
+
expected_carrier="bootstrapped-target-runtime",
|
|
2482
|
+
allowed_results={"pass"},
|
|
2483
|
+
)
|
|
2484
|
+
if kind == "governance-status":
|
|
2485
|
+
maturity = payload.get("maturity")
|
|
2486
|
+
if not isinstance(maturity, dict) or maturity.get("current") not in {"light", "standard", "strong"}:
|
|
2487
|
+
failures.append(Failure("root-self-adoption", "`root governance status` must report adopted maturity"))
|
|
2488
|
+
if kind == "runtime-parity":
|
|
2489
|
+
checks = payload.get("checks")
|
|
2490
|
+
names = {check.get("name") for check in checks if isinstance(check, dict)} if isinstance(checks, list) else set()
|
|
2491
|
+
if "shadow_parity_boundary" not in names or "controlled_merge_contract" not in names:
|
|
2492
|
+
failures.append(Failure("root-self-adoption", "`root runtime parity` must cover shadow and controlled merge boundaries"))
|
|
2493
|
+
if kind == "adopt-verify":
|
|
2494
|
+
roundtrip = payload.get("producer_consumer_roundtrip")
|
|
2495
|
+
if not isinstance(roundtrip, dict):
|
|
2496
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must include producer_consumer_roundtrip"))
|
|
2497
|
+
elif roundtrip.get("bypass_check", {}).get("result") != "pass":
|
|
2498
|
+
failures.append(Failure("root-self-adoption", "`root adopt verify` must prove required section deletion blocks"))
|
|
2499
|
+
if kind == "carrier-refresh":
|
|
2500
|
+
if payload.get("refresh_needed") not in ([], None):
|
|
2501
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must not report runtime provenance drift"))
|
|
2502
|
+
review = payload.get("review")
|
|
2503
|
+
if isinstance(review, dict):
|
|
2504
|
+
head_binding = review.get("head_binding")
|
|
2505
|
+
if isinstance(head_binding, dict) and head_binding.get("status") == "stale":
|
|
2506
|
+
failures.append(Failure("root-self-adoption", "`root carrier refresh --dry-run` must detect stale review head binding"))
|
|
2507
|
+
return failures
|
|
2508
|
+
|
|
2509
|
+
|
|
2413
2510
|
def check_deep_existing_repo_bootstrap(root: Path) -> list[Failure]:
|
|
2414
2511
|
failures: list[Failure] = []
|
|
2415
2512
|
with tempfile.TemporaryDirectory(prefix="loom-check-deep-existing-") as tmp:
|
|
@@ -7449,6 +7546,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7449
7546
|
failures.extend(check_demo_assets(root))
|
|
7450
7547
|
failures.extend(check_demo_fact_chain(root))
|
|
7451
7548
|
failures.extend(check_demo_repo_local_cli(root))
|
|
7549
|
+
failures.extend(check_root_self_adoption_carrier(root))
|
|
7452
7550
|
failures.extend(check_deep_existing_repo_bootstrap(root))
|
|
7453
7551
|
failures.extend(check_daily_execution_cli(root))
|
|
7454
7552
|
failures.extend(check_repo_companion_interface_contracts(root))
|
|
@@ -7463,7 +7561,7 @@ def collect_failures(root: Path) -> list[Failure]:
|
|
|
7463
7561
|
|
|
7464
7562
|
|
|
7465
7563
|
def print_report(root: Path, failures: list[Failure]) -> None:
|
|
7466
|
-
categories_checked =
|
|
7564
|
+
categories_checked = 19
|
|
7467
7565
|
if not failures:
|
|
7468
7566
|
print(f"loom_check: OK ({root})")
|
|
7469
7567
|
print(f"checked {categories_checked} surfaces")
|