@mc-and-his-agents/loom-installer 0.1.23 → 0.1.25
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 +62 -62
- package/payload/plugin/loom/skills/shared/scripts/fact_chain_support.py +10 -1
- package/payload/plugin/loom/skills/shared/scripts/loom_check.py +170 -9
- package/payload/plugin/loom/skills/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-adopt/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-adopt/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-adopt/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-handoff/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-handoff/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-handoff/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-init/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-init/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-init/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-merge-ready/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-pre-review/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-pre-review/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-pre-review/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-resume/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-resume/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-resume/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-retire/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-retire/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-retire/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-review/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-review/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-review/.loom-runtime/shared/scripts/loom_flow.py +128 -16
- package/payload/skills/loom-spec-review/.loom-runtime/shared/scripts/fact_chain_support.py +10 -1
- package/payload/skills/loom-spec-review/.loom-runtime/shared/scripts/loom_check.py +170 -9
- package/payload/skills/loom-spec-review/.loom-runtime/shared/scripts/loom_flow.py +128 -16
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": "b3b72c7a74674319f0a7432487fc0e3cbf012b4f",
|
|
6
6
|
"source_ref": "main",
|
|
7
|
-
"built_at": "2026-04-26T23:
|
|
7
|
+
"built_at": "2026-04-26T23:56:30+08:00",
|
|
8
8
|
"runtime": {
|
|
9
9
|
"python_minimum": "3.10",
|
|
10
10
|
"python_recommended": "3.11+"
|
|
@@ -618,8 +618,8 @@
|
|
|
618
618
|
},
|
|
619
619
|
{
|
|
620
620
|
"path": "plugin/loom/skills/shared/scripts/fact_chain_support.py",
|
|
621
|
-
"bytes":
|
|
622
|
-
"sha256": "
|
|
621
|
+
"bytes": 19933,
|
|
622
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
623
623
|
},
|
|
624
624
|
{
|
|
625
625
|
"path": "plugin/loom/skills/shared/scripts/governance_surface.py",
|
|
@@ -628,13 +628,13 @@
|
|
|
628
628
|
},
|
|
629
629
|
{
|
|
630
630
|
"path": "plugin/loom/skills/shared/scripts/loom_check.py",
|
|
631
|
-
"bytes":
|
|
632
|
-
"sha256": "
|
|
631
|
+
"bytes": 287428,
|
|
632
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
"path": "plugin/loom/skills/shared/scripts/loom_flow.py",
|
|
636
|
-
"bytes":
|
|
637
|
-
"sha256": "
|
|
636
|
+
"bytes": 296151,
|
|
637
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
638
638
|
},
|
|
639
639
|
{
|
|
640
640
|
"path": "plugin/loom/skills/shared/scripts/loom_init.py",
|
|
@@ -1203,8 +1203,8 @@
|
|
|
1203
1203
|
},
|
|
1204
1204
|
{
|
|
1205
1205
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
1206
|
-
"bytes":
|
|
1207
|
-
"sha256": "
|
|
1206
|
+
"bytes": 19933,
|
|
1207
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
1208
1208
|
},
|
|
1209
1209
|
{
|
|
1210
1210
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -1213,13 +1213,13 @@
|
|
|
1213
1213
|
},
|
|
1214
1214
|
{
|
|
1215
1215
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/loom_check.py",
|
|
1216
|
-
"bytes":
|
|
1217
|
-
"sha256": "
|
|
1216
|
+
"bytes": 287428,
|
|
1217
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
1218
1218
|
},
|
|
1219
1219
|
{
|
|
1220
1220
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/loom_flow.py",
|
|
1221
|
-
"bytes":
|
|
1222
|
-
"sha256": "
|
|
1221
|
+
"bytes": 296151,
|
|
1222
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
1223
1223
|
},
|
|
1224
1224
|
{
|
|
1225
1225
|
"path": "skills/loom-adopt/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -1818,8 +1818,8 @@
|
|
|
1818
1818
|
},
|
|
1819
1819
|
{
|
|
1820
1820
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
1821
|
-
"bytes":
|
|
1822
|
-
"sha256": "
|
|
1821
|
+
"bytes": 19933,
|
|
1822
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
1823
1823
|
},
|
|
1824
1824
|
{
|
|
1825
1825
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -1828,13 +1828,13 @@
|
|
|
1828
1828
|
},
|
|
1829
1829
|
{
|
|
1830
1830
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/loom_check.py",
|
|
1831
|
-
"bytes":
|
|
1832
|
-
"sha256": "
|
|
1831
|
+
"bytes": 287428,
|
|
1832
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
1833
1833
|
},
|
|
1834
1834
|
{
|
|
1835
1835
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/loom_flow.py",
|
|
1836
|
-
"bytes":
|
|
1837
|
-
"sha256": "
|
|
1836
|
+
"bytes": 296151,
|
|
1837
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
1838
1838
|
},
|
|
1839
1839
|
{
|
|
1840
1840
|
"path": "skills/loom-handoff/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -2433,8 +2433,8 @@
|
|
|
2433
2433
|
},
|
|
2434
2434
|
{
|
|
2435
2435
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
2436
|
-
"bytes":
|
|
2437
|
-
"sha256": "
|
|
2436
|
+
"bytes": 19933,
|
|
2437
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
2438
2438
|
},
|
|
2439
2439
|
{
|
|
2440
2440
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -2443,13 +2443,13 @@
|
|
|
2443
2443
|
},
|
|
2444
2444
|
{
|
|
2445
2445
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/loom_check.py",
|
|
2446
|
-
"bytes":
|
|
2447
|
-
"sha256": "
|
|
2446
|
+
"bytes": 287428,
|
|
2447
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
2448
2448
|
},
|
|
2449
2449
|
{
|
|
2450
2450
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/loom_flow.py",
|
|
2451
|
-
"bytes":
|
|
2452
|
-
"sha256": "
|
|
2451
|
+
"bytes": 296151,
|
|
2452
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
2453
2453
|
},
|
|
2454
2454
|
{
|
|
2455
2455
|
"path": "skills/loom-init/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -3053,8 +3053,8 @@
|
|
|
3053
3053
|
},
|
|
3054
3054
|
{
|
|
3055
3055
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
3056
|
-
"bytes":
|
|
3057
|
-
"sha256": "
|
|
3056
|
+
"bytes": 19933,
|
|
3057
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
3058
3058
|
},
|
|
3059
3059
|
{
|
|
3060
3060
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -3063,13 +3063,13 @@
|
|
|
3063
3063
|
},
|
|
3064
3064
|
{
|
|
3065
3065
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_check.py",
|
|
3066
|
-
"bytes":
|
|
3067
|
-
"sha256": "
|
|
3066
|
+
"bytes": 287428,
|
|
3067
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
3068
3068
|
},
|
|
3069
3069
|
{
|
|
3070
3070
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_flow.py",
|
|
3071
|
-
"bytes":
|
|
3072
|
-
"sha256": "
|
|
3071
|
+
"bytes": 296151,
|
|
3072
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
3073
3073
|
},
|
|
3074
3074
|
{
|
|
3075
3075
|
"path": "skills/loom-merge-ready/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -3668,8 +3668,8 @@
|
|
|
3668
3668
|
},
|
|
3669
3669
|
{
|
|
3670
3670
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
3671
|
-
"bytes":
|
|
3672
|
-
"sha256": "
|
|
3671
|
+
"bytes": 19933,
|
|
3672
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
3673
3673
|
},
|
|
3674
3674
|
{
|
|
3675
3675
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -3678,13 +3678,13 @@
|
|
|
3678
3678
|
},
|
|
3679
3679
|
{
|
|
3680
3680
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
3681
|
-
"bytes":
|
|
3682
|
-
"sha256": "
|
|
3681
|
+
"bytes": 287428,
|
|
3682
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
3683
3683
|
},
|
|
3684
3684
|
{
|
|
3685
3685
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
3686
|
-
"bytes":
|
|
3687
|
-
"sha256": "
|
|
3686
|
+
"bytes": 296151,
|
|
3687
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
3688
3688
|
},
|
|
3689
3689
|
{
|
|
3690
3690
|
"path": "skills/loom-pre-review/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -4283,8 +4283,8 @@
|
|
|
4283
4283
|
},
|
|
4284
4284
|
{
|
|
4285
4285
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
4286
|
-
"bytes":
|
|
4287
|
-
"sha256": "
|
|
4286
|
+
"bytes": 19933,
|
|
4287
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
4288
4288
|
},
|
|
4289
4289
|
{
|
|
4290
4290
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -4293,13 +4293,13 @@
|
|
|
4293
4293
|
},
|
|
4294
4294
|
{
|
|
4295
4295
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/loom_check.py",
|
|
4296
|
-
"bytes":
|
|
4297
|
-
"sha256": "
|
|
4296
|
+
"bytes": 287428,
|
|
4297
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
4298
4298
|
},
|
|
4299
4299
|
{
|
|
4300
4300
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/loom_flow.py",
|
|
4301
|
-
"bytes":
|
|
4302
|
-
"sha256": "
|
|
4301
|
+
"bytes": 296151,
|
|
4302
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
4303
4303
|
},
|
|
4304
4304
|
{
|
|
4305
4305
|
"path": "skills/loom-resume/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -4898,8 +4898,8 @@
|
|
|
4898
4898
|
},
|
|
4899
4899
|
{
|
|
4900
4900
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
4901
|
-
"bytes":
|
|
4902
|
-
"sha256": "
|
|
4901
|
+
"bytes": 19933,
|
|
4902
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
4903
4903
|
},
|
|
4904
4904
|
{
|
|
4905
4905
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -4908,13 +4908,13 @@
|
|
|
4908
4908
|
},
|
|
4909
4909
|
{
|
|
4910
4910
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/loom_check.py",
|
|
4911
|
-
"bytes":
|
|
4912
|
-
"sha256": "
|
|
4911
|
+
"bytes": 287428,
|
|
4912
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
4913
4913
|
},
|
|
4914
4914
|
{
|
|
4915
4915
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/loom_flow.py",
|
|
4916
|
-
"bytes":
|
|
4917
|
-
"sha256": "
|
|
4916
|
+
"bytes": 296151,
|
|
4917
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
4918
4918
|
},
|
|
4919
4919
|
{
|
|
4920
4920
|
"path": "skills/loom-retire/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -5513,8 +5513,8 @@
|
|
|
5513
5513
|
},
|
|
5514
5514
|
{
|
|
5515
5515
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
5516
|
-
"bytes":
|
|
5517
|
-
"sha256": "
|
|
5516
|
+
"bytes": 19933,
|
|
5517
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
5518
5518
|
},
|
|
5519
5519
|
{
|
|
5520
5520
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -5523,13 +5523,13 @@
|
|
|
5523
5523
|
},
|
|
5524
5524
|
{
|
|
5525
5525
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
5526
|
-
"bytes":
|
|
5527
|
-
"sha256": "
|
|
5526
|
+
"bytes": 287428,
|
|
5527
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
5528
5528
|
},
|
|
5529
5529
|
{
|
|
5530
5530
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
5531
|
-
"bytes":
|
|
5532
|
-
"sha256": "
|
|
5531
|
+
"bytes": 296151,
|
|
5532
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
5533
5533
|
},
|
|
5534
5534
|
{
|
|
5535
5535
|
"path": "skills/loom-review/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -6128,8 +6128,8 @@
|
|
|
6128
6128
|
},
|
|
6129
6129
|
{
|
|
6130
6130
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/fact_chain_support.py",
|
|
6131
|
-
"bytes":
|
|
6132
|
-
"sha256": "
|
|
6131
|
+
"bytes": 19933,
|
|
6132
|
+
"sha256": "0e215e1c83443c8688c984241a8008e5b419f68b8838eecbcfb695857e212923"
|
|
6133
6133
|
},
|
|
6134
6134
|
{
|
|
6135
6135
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/governance_surface.py",
|
|
@@ -6138,13 +6138,13 @@
|
|
|
6138
6138
|
},
|
|
6139
6139
|
{
|
|
6140
6140
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/loom_check.py",
|
|
6141
|
-
"bytes":
|
|
6142
|
-
"sha256": "
|
|
6141
|
+
"bytes": 287428,
|
|
6142
|
+
"sha256": "48bf635cb9fb4f28b38309a81ecb67a48b489d72f83c4907d972230481848ddb"
|
|
6143
6143
|
},
|
|
6144
6144
|
{
|
|
6145
6145
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/loom_flow.py",
|
|
6146
|
-
"bytes":
|
|
6147
|
-
"sha256": "
|
|
6146
|
+
"bytes": 296151,
|
|
6147
|
+
"sha256": "f74afa96460de82ef279ec78a0468906ca1db26b867a4fc810025164ae8f7146"
|
|
6148
6148
|
},
|
|
6149
6149
|
{
|
|
6150
6150
|
"path": "skills/loom-spec-review/.loom-runtime/shared/scripts/loom_init.py",
|
|
@@ -131,6 +131,7 @@ def parse_key_value_section(
|
|
|
131
131
|
return {}, [f"{relative_path}: missing section `{section_name}`"]
|
|
132
132
|
|
|
133
133
|
values: dict[str, str] = {}
|
|
134
|
+
seen: dict[str, str] = {}
|
|
134
135
|
for raw_line in lines:
|
|
135
136
|
stripped = raw_line.strip()
|
|
136
137
|
if not stripped:
|
|
@@ -143,7 +144,15 @@ def parse_key_value_section(
|
|
|
143
144
|
if label not in field_map:
|
|
144
145
|
errors.append(f"{relative_path}: unexpected field `{label}` in `{section_name}`")
|
|
145
146
|
continue
|
|
146
|
-
|
|
147
|
+
canonical = field_map[label]
|
|
148
|
+
if canonical in seen:
|
|
149
|
+
errors.append(
|
|
150
|
+
f"{relative_path}: duplicate field `{label}` in `{section_name}` "
|
|
151
|
+
f"(canonical `{canonical}` already set by `{seen[canonical]}`)"
|
|
152
|
+
)
|
|
153
|
+
continue
|
|
154
|
+
seen[canonical] = label
|
|
155
|
+
values[canonical] = _clean_value(match.group(2))
|
|
147
156
|
|
|
148
157
|
for label, canonical in field_map.items():
|
|
149
158
|
if canonical not in values:
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
import re
|
|
7
|
+
import hashlib
|
|
7
8
|
import shutil
|
|
8
9
|
import subprocess
|
|
9
10
|
import sys
|
|
@@ -1071,6 +1072,14 @@ def require_shadow_parity_payload(
|
|
|
1071
1072
|
locator = surface_payload.get("locator")
|
|
1072
1073
|
if not isinstance(locator, str) or not locator:
|
|
1073
1074
|
failures.append(Failure(category, f"{context} reports[{index}] `{surface_key}.locator` must be non-empty"))
|
|
1075
|
+
if surface_payload.get("status") == "readable":
|
|
1076
|
+
source_files = surface_payload.get("source_files")
|
|
1077
|
+
source_sha256 = surface_payload.get("source_sha256")
|
|
1078
|
+
if not isinstance(source_files, list) or not source_files:
|
|
1079
|
+
failures.append(Failure(category, f"{context} reports[{index}] `{surface_key}.source_files` must be non-empty for readable evidence"))
|
|
1080
|
+
source_files = []
|
|
1081
|
+
if not isinstance(source_sha256, dict) or set(source_sha256) != set(source_files):
|
|
1082
|
+
failures.append(Failure(category, f"{context} reports[{index}] `{surface_key}.source_sha256` must match source_files exactly"))
|
|
1074
1083
|
|
|
1075
1084
|
|
|
1076
1085
|
def require_host_lifecycle_payload(
|
|
@@ -2202,6 +2211,43 @@ def check_demo_fact_chain(root: Path) -> list[Failure]:
|
|
|
2202
2211
|
failures.append(Failure("demo-fact-chain", detail))
|
|
2203
2212
|
if report and report.get("fact_chain", {}).get("entry_points", {}).get("status_surface") != ".loom/status/current.md":
|
|
2204
2213
|
failures.append(Failure("demo-fact-chain", "demo fact chain must point status_surface to `.loom/status/current.md`"))
|
|
2214
|
+
with tempfile.TemporaryDirectory(prefix="loom-check-metadata-spoof-") as tmp:
|
|
2215
|
+
spoof_target = Path(tmp) / "new-project"
|
|
2216
|
+
shutil.copytree(target, spoof_target)
|
|
2217
|
+
work_item_path = spoof_target / ".loom/work-items/INIT-0001.md"
|
|
2218
|
+
work_item_text = work_item_path.read_text(encoding="utf-8")
|
|
2219
|
+
work_item_path.write_text(
|
|
2220
|
+
work_item_text.replace(
|
|
2221
|
+
"- Goal: Bootstrap the first executable Loom path for this repository\n",
|
|
2222
|
+
"- Goal: wrong spoofed goal\n- Goal: Bootstrap the first executable Loom path for this repository\n",
|
|
2223
|
+
1,
|
|
2224
|
+
),
|
|
2225
|
+
encoding="utf-8",
|
|
2226
|
+
)
|
|
2227
|
+
_, spoof_errors = inspect_fact_chain(spoof_target)
|
|
2228
|
+
if not any("duplicate field `Goal`" in error for error in spoof_errors):
|
|
2229
|
+
failures.append(Failure("demo-fact-chain", "fact-chain parser must reject duplicate canonical metadata fields"))
|
|
2230
|
+
|
|
2231
|
+
runtime_spoof_target = Path(tmp) / "runtime-spoof"
|
|
2232
|
+
shutil.copytree(target, runtime_spoof_target)
|
|
2233
|
+
status_path = runtime_spoof_target / ".loom/status/current.md"
|
|
2234
|
+
status_text = status_path.read_text(encoding="utf-8")
|
|
2235
|
+
status_path.write_text(
|
|
2236
|
+
status_text.replace(
|
|
2237
|
+
"- Run Entry: not_applicable\n",
|
|
2238
|
+
"- Run Entry: wrong-spoofed-run\n- Run Entry: not_applicable\n",
|
|
2239
|
+
1,
|
|
2240
|
+
),
|
|
2241
|
+
encoding="utf-8",
|
|
2242
|
+
)
|
|
2243
|
+
payload, error = load_command_json(
|
|
2244
|
+
root,
|
|
2245
|
+
["python3", "tools/loom_flow.py", "fact-chain", "--target", str(runtime_spoof_target)],
|
|
2246
|
+
)
|
|
2247
|
+
if error:
|
|
2248
|
+
failures.append(Failure("demo-fact-chain", f"`flow fact-chain` metadata spoof sample failed unexpectedly: {error}"))
|
|
2249
|
+
elif payload.get("result") != "block":
|
|
2250
|
+
failures.append(Failure("demo-fact-chain", "`flow fact-chain` must not legacy-fallback past duplicate Runtime Evidence fields"))
|
|
2205
2251
|
return failures
|
|
2206
2252
|
|
|
2207
2253
|
|
|
@@ -5472,6 +5518,29 @@ def check_repo_interop_contracts(root: Path) -> list[Failure]:
|
|
|
5472
5518
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
5473
5519
|
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
5474
5520
|
|
|
5521
|
+
def sha256_file(path: Path) -> str:
|
|
5522
|
+
digest = hashlib.sha256()
|
|
5523
|
+
with path.open("rb") as handle:
|
|
5524
|
+
for chunk in iter(lambda: handle.read(1024 * 1024), b""):
|
|
5525
|
+
digest.update(chunk)
|
|
5526
|
+
return digest.hexdigest()
|
|
5527
|
+
|
|
5528
|
+
def write_shadow_evidence(target: Path, evidence: str, value_key: str, value: str, source: str) -> None:
|
|
5529
|
+
source_path = target / source
|
|
5530
|
+
source_path.parent.mkdir(parents=True, exist_ok=True)
|
|
5531
|
+
if not source_path.exists():
|
|
5532
|
+
write_json(source_path, {"value": value})
|
|
5533
|
+
write_json(
|
|
5534
|
+
target / evidence,
|
|
5535
|
+
{
|
|
5536
|
+
value_key: value,
|
|
5537
|
+
"source_files": [source],
|
|
5538
|
+
"source_sha256": {
|
|
5539
|
+
source: sha256_file(source_path),
|
|
5540
|
+
},
|
|
5541
|
+
},
|
|
5542
|
+
)
|
|
5543
|
+
|
|
5475
5544
|
def install_interop(
|
|
5476
5545
|
target: Path,
|
|
5477
5546
|
*,
|
|
@@ -5484,17 +5553,21 @@ def check_repo_interop_contracts(root: Path) -> list[Failure]:
|
|
|
5484
5553
|
(target / ".loom" / "shadow").mkdir(parents=True, exist_ok=True)
|
|
5485
5554
|
(target / "native" / "status").mkdir(parents=True, exist_ok=True)
|
|
5486
5555
|
for relative, payload in {
|
|
5487
|
-
".loom/shadow/admission-loom.json": {"result": "pass"},
|
|
5488
|
-
".loom/shadow/admission-repo.json": {"result": "pass"},
|
|
5489
|
-
".loom/shadow/review-loom.json": {"decision": "allow"},
|
|
5490
|
-
".loom/shadow/review-repo.json": {"decision": "allow"},
|
|
5491
|
-
".loom/shadow/merge-ready-loom.json": {"status": "pass"},
|
|
5492
|
-
".loom/shadow/merge-ready-repo.json": {"status": "pass"},
|
|
5493
|
-
".loom/shadow/closeout-loom.json": {"status": "done"},
|
|
5494
|
-
".loom/shadow/closeout-repo.json": {"status": "done"},
|
|
5495
5556
|
"host/guardian-review.json": {"verdict": "allow"},
|
|
5557
|
+
"native/status/admission.json": {"result": "pass"},
|
|
5558
|
+
"native/status/review.json": {"decision": "allow"},
|
|
5559
|
+
"native/status/merge-ready.json": {"status": "pass"},
|
|
5560
|
+
"native/status/closeout.json": {"status": "done"},
|
|
5496
5561
|
}.items():
|
|
5497
5562
|
write_json(target / relative, payload)
|
|
5563
|
+
write_shadow_evidence(target, ".loom/shadow/admission-loom.json", "result", "pass", ".loom/status/current.md")
|
|
5564
|
+
write_shadow_evidence(target, ".loom/shadow/admission-repo.json", "result", "pass", "native/status/admission.json")
|
|
5565
|
+
write_shadow_evidence(target, ".loom/shadow/review-loom.json", "decision", "allow", "host/guardian-review.json")
|
|
5566
|
+
write_shadow_evidence(target, ".loom/shadow/review-repo.json", "decision", "allow", "native/status/review.json")
|
|
5567
|
+
write_shadow_evidence(target, ".loom/shadow/merge-ready-loom.json", "status", "pass", "host/guardian-review.json")
|
|
5568
|
+
write_shadow_evidence(target, ".loom/shadow/merge-ready-repo.json", "status", "pass", "native/status/merge-ready.json")
|
|
5569
|
+
write_shadow_evidence(target, ".loom/shadow/closeout-loom.json", "status", "done", ".loom/status/current.md")
|
|
5570
|
+
write_shadow_evidence(target, ".loom/shadow/closeout-repo.json", "status", "done", "native/status/closeout.json")
|
|
5498
5571
|
if interop is not None:
|
|
5499
5572
|
write_json(companion_dir / "interop.json", interop)
|
|
5500
5573
|
|
|
@@ -5641,7 +5714,8 @@ def check_repo_interop_contracts(root: Path) -> list[Failure]:
|
|
|
5641
5714
|
|
|
5642
5715
|
mismatch_target = base / "mismatch"
|
|
5643
5716
|
shutil.copytree(present_target, mismatch_target)
|
|
5644
|
-
write_json(mismatch_target / "
|
|
5717
|
+
write_json(mismatch_target / "native/status/review.json", {"decision": "block"})
|
|
5718
|
+
write_shadow_evidence(mismatch_target, ".loom/shadow/review-repo.json", "decision", "block", "native/status/review.json")
|
|
5645
5719
|
mismatch_payload, error = load_command_json(
|
|
5646
5720
|
root,
|
|
5647
5721
|
["python3", "tools/loom_flow.py", "shadow-parity", "--target", str(mismatch_target), "--surface", "review"],
|
|
@@ -5716,6 +5790,93 @@ def check_repo_interop_contracts(root: Path) -> list[Failure]:
|
|
|
5716
5790
|
if blocking_unreadable_payload.get("result") != "block":
|
|
5717
5791
|
failures.append(Failure("repo-interop", "`shadow-parity --blocking` must block unreadable surfaces"))
|
|
5718
5792
|
|
|
5793
|
+
missing_hash_target = base / "missing-hash"
|
|
5794
|
+
shutil.copytree(present_target, missing_hash_target)
|
|
5795
|
+
write_json(
|
|
5796
|
+
missing_hash_target / ".loom/shadow/review-repo.json",
|
|
5797
|
+
{
|
|
5798
|
+
"decision": "allow",
|
|
5799
|
+
"source_files": ["native/status/review.json"],
|
|
5800
|
+
},
|
|
5801
|
+
)
|
|
5802
|
+
missing_hash_payload, error = load_command_json(
|
|
5803
|
+
root,
|
|
5804
|
+
["python3", "tools/loom_flow.py", "shadow-parity", "--target", str(missing_hash_target), "--surface", "review"],
|
|
5805
|
+
)
|
|
5806
|
+
if error:
|
|
5807
|
+
failures.append(Failure("repo-interop", f"`shadow-parity` missing hash sample failed: {error}"))
|
|
5808
|
+
else:
|
|
5809
|
+
require_shadow_parity_payload(
|
|
5810
|
+
failures,
|
|
5811
|
+
category="repo-interop",
|
|
5812
|
+
context="`shadow-parity` missing hash sample",
|
|
5813
|
+
payload=missing_hash_payload,
|
|
5814
|
+
expected_reports=1,
|
|
5815
|
+
)
|
|
5816
|
+
reports = missing_hash_payload.get("reports")
|
|
5817
|
+
if not isinstance(reports, list) or not reports or reports[0].get("result") != "unreadable":
|
|
5818
|
+
failures.append(Failure("repo-interop", "`shadow-parity` missing hash sample must report `unreadable`"))
|
|
5819
|
+
|
|
5820
|
+
partial_hash_target = base / "partial-hash"
|
|
5821
|
+
shutil.copytree(present_target, partial_hash_target)
|
|
5822
|
+
write_json(
|
|
5823
|
+
partial_hash_target / ".loom/shadow/review-repo.json",
|
|
5824
|
+
{
|
|
5825
|
+
"decision": "allow",
|
|
5826
|
+
"source_files": ["native/status/review.json", "host/guardian-review.json"],
|
|
5827
|
+
"source_sha256": {
|
|
5828
|
+
"native/status/review.json": sha256_file(partial_hash_target / "native/status/review.json"),
|
|
5829
|
+
},
|
|
5830
|
+
},
|
|
5831
|
+
)
|
|
5832
|
+
partial_hash_payload, error = load_command_json(
|
|
5833
|
+
root,
|
|
5834
|
+
["python3", "tools/loom_flow.py", "shadow-parity", "--target", str(partial_hash_target), "--surface", "review"],
|
|
5835
|
+
)
|
|
5836
|
+
if error:
|
|
5837
|
+
failures.append(Failure("repo-interop", f"`shadow-parity` partial hash sample failed: {error}"))
|
|
5838
|
+
else:
|
|
5839
|
+
reports = partial_hash_payload.get("reports")
|
|
5840
|
+
if not isinstance(reports, list) or not reports or reports[0].get("result") != "unreadable":
|
|
5841
|
+
failures.append(Failure("repo-interop", "`shadow-parity` partial hash sample must report `unreadable`"))
|
|
5842
|
+
|
|
5843
|
+
hash_drift_target = base / "hash-drift"
|
|
5844
|
+
shutil.copytree(present_target, hash_drift_target)
|
|
5845
|
+
write_json(hash_drift_target / "native/status/review.json", {"decision": "changed-after-evidence"})
|
|
5846
|
+
hash_drift_payload, error = load_command_json(
|
|
5847
|
+
root,
|
|
5848
|
+
["python3", "tools/loom_flow.py", "shadow-parity", "--target", str(hash_drift_target), "--surface", "review"],
|
|
5849
|
+
)
|
|
5850
|
+
if error:
|
|
5851
|
+
failures.append(Failure("repo-interop", f"`shadow-parity` hash drift sample failed: {error}"))
|
|
5852
|
+
else:
|
|
5853
|
+
reports = hash_drift_payload.get("reports")
|
|
5854
|
+
if not isinstance(reports, list) or not reports or reports[0].get("result") != "unreadable":
|
|
5855
|
+
failures.append(Failure("repo-interop", "`shadow-parity` hash drift sample must report `unreadable`"))
|
|
5856
|
+
|
|
5857
|
+
rogue_target = base / "rogue"
|
|
5858
|
+
shutil.copytree(present_target, rogue_target)
|
|
5859
|
+
write_json(
|
|
5860
|
+
rogue_target / ".loom/shadow/rogue.json",
|
|
5861
|
+
{
|
|
5862
|
+
"result": "pass",
|
|
5863
|
+
"source_files": ["native/status/review.json"],
|
|
5864
|
+
"source_sha256": {
|
|
5865
|
+
"native/status/review.json": sha256_file(rogue_target / "native/status/review.json"),
|
|
5866
|
+
},
|
|
5867
|
+
},
|
|
5868
|
+
)
|
|
5869
|
+
rogue_payload, error = load_command_json(
|
|
5870
|
+
root,
|
|
5871
|
+
["python3", "tools/loom_flow.py", "shadow-parity", "--target", str(rogue_target), "--surface", "review"],
|
|
5872
|
+
)
|
|
5873
|
+
if error:
|
|
5874
|
+
failures.append(Failure("repo-interop", f"`shadow-parity` rogue evidence sample failed: {error}"))
|
|
5875
|
+
else:
|
|
5876
|
+
reports = rogue_payload.get("reports")
|
|
5877
|
+
if not isinstance(reports, list) or not reports or reports[0].get("result") != "unreadable":
|
|
5878
|
+
failures.append(Failure("repo-interop", "`shadow-parity` rogue evidence sample must report `unreadable`"))
|
|
5879
|
+
|
|
5719
5880
|
return failures
|
|
5720
5881
|
|
|
5721
5882
|
|