@bongos/core 1.19.186 → 1.19.187
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/.bongos-core.json +78 -73
- package/config/government.neutral.json +6 -6
- package/docs/adr/0172-editable-rank-roles-substrate-axis.md +1 -1
- package/docs/api/openapi.json +8 -8
- package/docs/api-reference.md +7 -7
- package/modules/builder-settings/wandering-prefs.js +13 -13
- package/modules/government/catalog.js +75 -75
- package/modules/government/config.js +43 -33
- package/modules/government/db.js +57 -57
- package/modules/government/protected-surfaces.js +7 -7
- package/modules/government/protected-surfaces.json +4 -4
- package/modules/government/ranks.js +17 -17
- package/modules/government/resolver.js +24 -24
- package/modules/government/routes/government.js +86 -86
- package/modules/government/routes/rank-sync.js +6 -6
- package/modules/government/session-scopes.js +7 -7
- package/modules/government/session-scopes.json +5 -5
- package/modules/hall-ui/public/government.css +1 -1
- package/modules/hall-ui/public/government.html +1 -1
- package/modules/hall-ui/public/government.js +3 -3
- package/modules/lifecycle/claim-eligibility.js +1 -1
- package/modules/lifecycle/db.js +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/fitness.js +138 -0
- package/src/bongos/auth.js +2 -2
- package/src/module-api.js +3 -1
- package/tests/auth_page_gate.mjs +2 -2
- package/tests/{governance_abuse_matrix.mjs → government_abuse_matrix.mjs} +36 -36
- package/tests/{governance_catalog.mjs → government_catalog.mjs} +11 -11
- package/tests/{governance_claim_eligibility.mjs → government_claim_eligibility.mjs} +2 -2
- package/tests/{governance_config.mjs → government_config.mjs} +54 -54
- package/tests/{governance_fold.mjs → government_fold.mjs} +6 -6
- package/tests/{governance_fold_bench.mjs → government_fold_bench.mjs} +3 -3
- package/tests/{governance_live_proof.mjs → government_live_proof.mjs} +5 -5
- package/tests/{governance_ownership_scope.mjs → government_ownership_scope.mjs} +16 -16
- package/tests/{governance_page_gates.mjs → government_page_gates.mjs} +5 -5
- package/tests/{governance_parity.mjs → government_parity.mjs} +3 -3
- package/tests/{governance_principals.mjs → government_principals.mjs} +14 -14
- package/tests/{governance_protected_surfaces.mjs → government_protected_surfaces.mjs} +1 -1
- package/tests/{governance_role_sync.mjs → government_rank_sync.mjs} +2 -2
- package/tests/{governance_require_permission.mjs → government_require_permission.mjs} +1 -1
- package/tests/{governance_resolver.mjs → government_resolver.mjs} +6 -6
- package/tests/{governance_routes.mjs → government_routes.mjs} +32 -32
- package/tests/{governance_seed.mjs → government_seed.mjs} +8 -8
- package/tests/{governance_session_scope.mjs → government_session_scope.mjs} +10 -10
- package/tests/{governance_vanilla_boot.mjs → government_vanilla_boot.mjs} +26 -26
- package/tests/government_vocabulary.mjs +94 -0
- package/tests/hall_page_gate_map.mjs +1 -1
package/.bongos-core.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"artifact": "bongos-core",
|
|
3
3
|
"manifest_schema": 1,
|
|
4
4
|
"generator": "scripts/gds/package-core.js",
|
|
5
|
-
"core_version": "1.19.
|
|
6
|
-
"core_contract": "1.19.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.19.187",
|
|
6
|
+
"core_contract": "1.19.187",
|
|
7
|
+
"source_commit": "403b66bde87b5b97d9aec89a8ab95794d525cb0d",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-08-
|
|
9
|
+
"built_at": "2026-08-16T23:14:43.477Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 308,
|
|
13
13
|
"agent_docs_stubbed": 21,
|
|
14
|
-
"functional_verbatim":
|
|
14
|
+
"functional_verbatim": 1282,
|
|
15
15
|
"rules": 3,
|
|
16
16
|
"gate_literals": 3,
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
|
-
"file_count":
|
|
20
|
-
"tree_sha256": "
|
|
19
|
+
"file_count": 1611,
|
|
20
|
+
"tree_sha256": "3d648b4ac642a80bde4746eaaab7f61fc06cd888117fc17bc66751d8f1e15fc8",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/blocker-review/SKILL.md",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
{
|
|
398
398
|
"path": "config/government.neutral.json",
|
|
399
399
|
"mode": "0000644",
|
|
400
|
-
"sha256": "
|
|
400
|
+
"sha256": "70fe731d06dd9744178a27ec4379ee8c769f9a45d9a585f095b1765433767afc"
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
"path": "config/modules.neutral.json",
|
|
@@ -1337,7 +1337,7 @@
|
|
|
1337
1337
|
{
|
|
1338
1338
|
"path": "docs/adr/0172-editable-rank-roles-substrate-axis.md",
|
|
1339
1339
|
"mode": "0000644",
|
|
1340
|
-
"sha256": "
|
|
1340
|
+
"sha256": "2b813d75d1fb2aa3f9978a6dee7855f963444f1734bed5766ef269dae7637a2c"
|
|
1341
1341
|
},
|
|
1342
1342
|
{
|
|
1343
1343
|
"path": "docs/adr/0172-per-craft-compensation-ideator-credit-lane.md",
|
|
@@ -1362,12 +1362,12 @@
|
|
|
1362
1362
|
{
|
|
1363
1363
|
"path": "docs/api-reference.md",
|
|
1364
1364
|
"mode": "0000644",
|
|
1365
|
-
"sha256": "
|
|
1365
|
+
"sha256": "32c6c5fe14cf8684d353f0c73cde4b09d84ba61eabcb13e75c11bd5b7f9be2b7"
|
|
1366
1366
|
},
|
|
1367
1367
|
{
|
|
1368
1368
|
"path": "docs/api/openapi.json",
|
|
1369
1369
|
"mode": "0000644",
|
|
1370
|
-
"sha256": "
|
|
1370
|
+
"sha256": "7892d449572d19f058c6ac364d5b697e28d76bcd922d25d33b5203f5e1b5b7aa"
|
|
1371
1371
|
},
|
|
1372
1372
|
{
|
|
1373
1373
|
"path": "docs/architecture.md",
|
|
@@ -2452,7 +2452,7 @@
|
|
|
2452
2452
|
{
|
|
2453
2453
|
"path": "modules/builder-settings/wandering-prefs.js",
|
|
2454
2454
|
"mode": "0000644",
|
|
2455
|
-
"sha256": "
|
|
2455
|
+
"sha256": "e84c11a506bcd47b1f9b6be16bcd262d69aa7162f283c41da63687c5dd611845"
|
|
2456
2456
|
},
|
|
2457
2457
|
{
|
|
2458
2458
|
"path": "modules/dev-box/CLAUDE.md",
|
|
@@ -2887,17 +2887,17 @@
|
|
|
2887
2887
|
{
|
|
2888
2888
|
"path": "modules/government/catalog.js",
|
|
2889
2889
|
"mode": "0000644",
|
|
2890
|
-
"sha256": "
|
|
2890
|
+
"sha256": "b7073912e1aea3da33f876999a6beaae028142f0bf7bf66c1f95efc261b41272"
|
|
2891
2891
|
},
|
|
2892
2892
|
{
|
|
2893
2893
|
"path": "modules/government/config.js",
|
|
2894
2894
|
"mode": "0000644",
|
|
2895
|
-
"sha256": "
|
|
2895
|
+
"sha256": "183bca92e8ba897871287aeb58e6f9cfebcf9510b15d6cd9701066ce7c108edd"
|
|
2896
2896
|
},
|
|
2897
2897
|
{
|
|
2898
2898
|
"path": "modules/government/db.js",
|
|
2899
2899
|
"mode": "0000644",
|
|
2900
|
-
"sha256": "
|
|
2900
|
+
"sha256": "0e84802af9d1dd4c139548d4e621fc11896513415abf4e9eadfacbae33c40952"
|
|
2901
2901
|
},
|
|
2902
2902
|
{
|
|
2903
2903
|
"path": "modules/government/migrations/governance_001_tables.sql",
|
|
@@ -2952,42 +2952,42 @@
|
|
|
2952
2952
|
{
|
|
2953
2953
|
"path": "modules/government/protected-surfaces.js",
|
|
2954
2954
|
"mode": "0000644",
|
|
2955
|
-
"sha256": "
|
|
2955
|
+
"sha256": "f2acc38f5d9a361522944334f6db046a96b1d49aa2030f91391ab80752f42274"
|
|
2956
2956
|
},
|
|
2957
2957
|
{
|
|
2958
2958
|
"path": "modules/government/protected-surfaces.json",
|
|
2959
2959
|
"mode": "0000644",
|
|
2960
|
-
"sha256": "
|
|
2960
|
+
"sha256": "6d9a7520b2565b34bf002df016598543101639ccc384d81a622d313ed688acbc"
|
|
2961
2961
|
},
|
|
2962
2962
|
{
|
|
2963
2963
|
"path": "modules/government/ranks.js",
|
|
2964
2964
|
"mode": "0000644",
|
|
2965
|
-
"sha256": "
|
|
2965
|
+
"sha256": "fb0903c3b885a81c99136cc6f080aaf7fc00f86bd1c45c235e37c7c45a462ffc"
|
|
2966
2966
|
},
|
|
2967
2967
|
{
|
|
2968
2968
|
"path": "modules/government/resolver.js",
|
|
2969
2969
|
"mode": "0000644",
|
|
2970
|
-
"sha256": "
|
|
2970
|
+
"sha256": "bc30290bd0726f643f37984e4e537f503b89a3013bc8319d39d3af116dd08d94"
|
|
2971
2971
|
},
|
|
2972
2972
|
{
|
|
2973
2973
|
"path": "modules/government/routes/government.js",
|
|
2974
2974
|
"mode": "0000644",
|
|
2975
|
-
"sha256": "
|
|
2975
|
+
"sha256": "63e80d002e09d05a93238e15491a82dd733baea219814e8f7e2961ecb5373e1f"
|
|
2976
2976
|
},
|
|
2977
2977
|
{
|
|
2978
2978
|
"path": "modules/government/routes/rank-sync.js",
|
|
2979
2979
|
"mode": "0000644",
|
|
2980
|
-
"sha256": "
|
|
2980
|
+
"sha256": "e7fd1b378d48e93b946237261713a5791f7506dfdd7fcef2d843fe0e2ae8b370"
|
|
2981
2981
|
},
|
|
2982
2982
|
{
|
|
2983
2983
|
"path": "modules/government/session-scopes.js",
|
|
2984
2984
|
"mode": "0000644",
|
|
2985
|
-
"sha256": "
|
|
2985
|
+
"sha256": "1452e5a0480e7c3e1692ec210cb4d85f724d7ebb8dcf38048fb3369c483be46b"
|
|
2986
2986
|
},
|
|
2987
2987
|
{
|
|
2988
2988
|
"path": "modules/government/session-scopes.json",
|
|
2989
2989
|
"mode": "0000644",
|
|
2990
|
-
"sha256": "
|
|
2990
|
+
"sha256": "acf5d2391c2228d09c33e6c9a5cfe850dcf8986abb80b30b0c7ff778795938b2"
|
|
2991
2991
|
},
|
|
2992
2992
|
{
|
|
2993
2993
|
"path": "modules/grading/CLAUDE.md",
|
|
@@ -3212,17 +3212,17 @@
|
|
|
3212
3212
|
{
|
|
3213
3213
|
"path": "modules/hall-ui/public/government.css",
|
|
3214
3214
|
"mode": "0000644",
|
|
3215
|
-
"sha256": "
|
|
3215
|
+
"sha256": "5d58516ae9a07e045de49c7d2bad2b024dbea5207f9cf84cb2928ebd995cbd4e"
|
|
3216
3216
|
},
|
|
3217
3217
|
{
|
|
3218
3218
|
"path": "modules/hall-ui/public/government.html",
|
|
3219
3219
|
"mode": "0000644",
|
|
3220
|
-
"sha256": "
|
|
3220
|
+
"sha256": "91c14637adc59dde39f47e51cfd243ddc1796b0a4108491f46aa64e68eea4a0d"
|
|
3221
3221
|
},
|
|
3222
3222
|
{
|
|
3223
3223
|
"path": "modules/hall-ui/public/government.js",
|
|
3224
3224
|
"mode": "0000644",
|
|
3225
|
-
"sha256": "
|
|
3225
|
+
"sha256": "b7504f63fc1086c4367dbd76da7ac96ac4297a23f74456f90c5aebe5e974e034"
|
|
3226
3226
|
},
|
|
3227
3227
|
{
|
|
3228
3228
|
"path": "modules/hall-ui/public/hall-kit.js",
|
|
@@ -3527,7 +3527,7 @@
|
|
|
3527
3527
|
{
|
|
3528
3528
|
"path": "modules/lifecycle/claim-eligibility.js",
|
|
3529
3529
|
"mode": "0000644",
|
|
3530
|
-
"sha256": "
|
|
3530
|
+
"sha256": "0c52ae165d304f0f08ca04c9a288ef7d8ffb07288282dcd7b2d503fced7cd744"
|
|
3531
3531
|
},
|
|
3532
3532
|
{
|
|
3533
3533
|
"path": "modules/lifecycle/conflict-resolve.js",
|
|
@@ -3542,7 +3542,7 @@
|
|
|
3542
3542
|
{
|
|
3543
3543
|
"path": "modules/lifecycle/db.js",
|
|
3544
3544
|
"mode": "0000644",
|
|
3545
|
-
"sha256": "
|
|
3545
|
+
"sha256": "7fa58e9a9c09ba4857d57fe7cc1ed36d827d34f8cc1119ae42dc9dffdd4653b5"
|
|
3546
3546
|
},
|
|
3547
3547
|
{
|
|
3548
3548
|
"path": "modules/lifecycle/done-when.js",
|
|
@@ -4257,12 +4257,12 @@
|
|
|
4257
4257
|
{
|
|
4258
4258
|
"path": "package-lock.json",
|
|
4259
4259
|
"mode": "0000644",
|
|
4260
|
-
"sha256": "
|
|
4260
|
+
"sha256": "436a51acc58194d24659f69a9db624e06296dde02416cc2c3bf2ef2086f35ff4"
|
|
4261
4261
|
},
|
|
4262
4262
|
{
|
|
4263
4263
|
"path": "package.json",
|
|
4264
4264
|
"mode": "0000644",
|
|
4265
|
-
"sha256": "
|
|
4265
|
+
"sha256": "5dfe0314cb6157006b6eeb88e03cb8c2d2d20a6535d1f303903cb336cd06ae86"
|
|
4266
4266
|
},
|
|
4267
4267
|
{
|
|
4268
4268
|
"path": "public-docs/index.html",
|
|
@@ -4887,7 +4887,7 @@
|
|
|
4887
4887
|
{
|
|
4888
4888
|
"path": "scripts/gds/fitness.js",
|
|
4889
4889
|
"mode": "0000644",
|
|
4890
|
-
"sha256": "
|
|
4890
|
+
"sha256": "65648d6d05b73dafc08194e843850b460b738a17b565a69a5234dd817386eea8"
|
|
4891
4891
|
},
|
|
4892
4892
|
{
|
|
4893
4893
|
"path": "scripts/gds/gate-review.js",
|
|
@@ -5627,7 +5627,7 @@
|
|
|
5627
5627
|
{
|
|
5628
5628
|
"path": "src/bongos/auth.js",
|
|
5629
5629
|
"mode": "0000644",
|
|
5630
|
-
"sha256": "
|
|
5630
|
+
"sha256": "8fd6f6ce798ebcde76cd2ac0ccf7129a60555506ce3d2fed818deb1eb331d42b"
|
|
5631
5631
|
},
|
|
5632
5632
|
{
|
|
5633
5633
|
"path": "src/bongos/cascade-dispatch.js",
|
|
@@ -5867,7 +5867,7 @@
|
|
|
5867
5867
|
{
|
|
5868
5868
|
"path": "src/module-api.js",
|
|
5869
5869
|
"mode": "0000644",
|
|
5870
|
-
"sha256": "
|
|
5870
|
+
"sha256": "5034caf71ab288ff969e2ca31c4b80c5c97e62b327711f5de6e6e53e13ce6c13"
|
|
5871
5871
|
},
|
|
5872
5872
|
{
|
|
5873
5873
|
"path": "src/module-loader/catalog.js",
|
|
@@ -6062,7 +6062,7 @@
|
|
|
6062
6062
|
{
|
|
6063
6063
|
"path": "tests/auth_page_gate.mjs",
|
|
6064
6064
|
"mode": "0000644",
|
|
6065
|
-
"sha256": "
|
|
6065
|
+
"sha256": "3ed218eada5e36170217ded839fdc80d1cbad4ec71086d9707f00115d6c622d2"
|
|
6066
6066
|
},
|
|
6067
6067
|
{
|
|
6068
6068
|
"path": "tests/auth_resolve_failure.mjs",
|
|
@@ -6770,99 +6770,104 @@
|
|
|
6770
6770
|
"sha256": "412ca7c0bdc10abc90146b777571bcc7a180e19f0e3d058c6998ac2d33941940"
|
|
6771
6771
|
},
|
|
6772
6772
|
{
|
|
6773
|
-
"path": "tests/
|
|
6773
|
+
"path": "tests/government_abuse_matrix.mjs",
|
|
6774
6774
|
"mode": "0000644",
|
|
6775
|
-
"sha256": "
|
|
6775
|
+
"sha256": "8f5354cbacf15c9b49500f96b265fe52f5c0d4500a4ec7b41b4819a149782893"
|
|
6776
6776
|
},
|
|
6777
6777
|
{
|
|
6778
|
-
"path": "tests/
|
|
6778
|
+
"path": "tests/government_catalog.mjs",
|
|
6779
6779
|
"mode": "0000644",
|
|
6780
|
-
"sha256": "
|
|
6780
|
+
"sha256": "74cfbd482b689df40348af3bdaf050f056e216ff18fdd6add4136d4589b7cd92"
|
|
6781
6781
|
},
|
|
6782
6782
|
{
|
|
6783
|
-
"path": "tests/
|
|
6783
|
+
"path": "tests/government_claim_eligibility.mjs",
|
|
6784
6784
|
"mode": "0000644",
|
|
6785
|
-
"sha256": "
|
|
6785
|
+
"sha256": "2750f75bc0ef7f5286a2abe1d59e49ff2ea6ea300d3c1760dda31ae8ad74dc61"
|
|
6786
6786
|
},
|
|
6787
6787
|
{
|
|
6788
|
-
"path": "tests/
|
|
6788
|
+
"path": "tests/government_config.mjs",
|
|
6789
6789
|
"mode": "0000644",
|
|
6790
|
-
"sha256": "
|
|
6790
|
+
"sha256": "979deef4473243dc86ab13b9284104bce71f6a1ee839acc6c5a6db04770cd62c"
|
|
6791
6791
|
},
|
|
6792
6792
|
{
|
|
6793
|
-
"path": "tests/
|
|
6793
|
+
"path": "tests/government_fold.mjs",
|
|
6794
6794
|
"mode": "0000644",
|
|
6795
|
-
"sha256": "
|
|
6795
|
+
"sha256": "5ea27c3008f17597984c72cf504e8e934a76a3ff76323c94b7ccb65e01c84ead"
|
|
6796
6796
|
},
|
|
6797
6797
|
{
|
|
6798
|
-
"path": "tests/
|
|
6798
|
+
"path": "tests/government_fold_bench.mjs",
|
|
6799
6799
|
"mode": "0000644",
|
|
6800
|
-
"sha256": "
|
|
6800
|
+
"sha256": "52f32270eff1105ca1164398c4a1ef279657573d9bb50c7588bd03981f2354a9"
|
|
6801
6801
|
},
|
|
6802
6802
|
{
|
|
6803
|
-
"path": "tests/
|
|
6803
|
+
"path": "tests/government_live_proof.mjs",
|
|
6804
6804
|
"mode": "0000644",
|
|
6805
|
-
"sha256": "
|
|
6805
|
+
"sha256": "af6423ac87819ff344c8a7804c0eda903a3e8c7633d1e4182e7d4f446d30cec0"
|
|
6806
6806
|
},
|
|
6807
6807
|
{
|
|
6808
|
-
"path": "tests/
|
|
6808
|
+
"path": "tests/government_ownership_scope.mjs",
|
|
6809
6809
|
"mode": "0000644",
|
|
6810
|
-
"sha256": "
|
|
6810
|
+
"sha256": "ad627c69ede0d79a2f38030d762cbd5bcf630cd6b067441f5763f261b829d1ba"
|
|
6811
6811
|
},
|
|
6812
6812
|
{
|
|
6813
|
-
"path": "tests/
|
|
6813
|
+
"path": "tests/government_page_gates.mjs",
|
|
6814
6814
|
"mode": "0000644",
|
|
6815
|
-
"sha256": "
|
|
6815
|
+
"sha256": "a0e02201ecc2ab17fc05dd8e20ce106c90dcffd936aa057f4a44cebe01109e4a"
|
|
6816
6816
|
},
|
|
6817
6817
|
{
|
|
6818
|
-
"path": "tests/
|
|
6818
|
+
"path": "tests/government_parity.mjs",
|
|
6819
6819
|
"mode": "0000644",
|
|
6820
|
-
"sha256": "
|
|
6820
|
+
"sha256": "7e1cc047dc75b9574bd64329974f8d1ae59b474d8719fbaae00314c7b2cc88e5"
|
|
6821
6821
|
},
|
|
6822
6822
|
{
|
|
6823
|
-
"path": "tests/
|
|
6823
|
+
"path": "tests/government_principals.mjs",
|
|
6824
6824
|
"mode": "0000644",
|
|
6825
|
-
"sha256": "
|
|
6825
|
+
"sha256": "c2a7d6b6d644b44ca2248fa0247261a4a548e25bd744fa7e029db550231d9da7"
|
|
6826
6826
|
},
|
|
6827
6827
|
{
|
|
6828
|
-
"path": "tests/
|
|
6828
|
+
"path": "tests/government_protected_surfaces.mjs",
|
|
6829
6829
|
"mode": "0000644",
|
|
6830
|
-
"sha256": "
|
|
6830
|
+
"sha256": "fd05f72404be0d007222793a6ed3a49904239f8bb354cddab6b052d74288b3b1"
|
|
6831
6831
|
},
|
|
6832
6832
|
{
|
|
6833
|
-
"path": "tests/
|
|
6833
|
+
"path": "tests/government_rank_sync.mjs",
|
|
6834
6834
|
"mode": "0000644",
|
|
6835
|
-
"sha256": "
|
|
6835
|
+
"sha256": "83462482dff692a3587edecd0e57e0d7638fa08076329a7591c0cb2222d50e47"
|
|
6836
6836
|
},
|
|
6837
6837
|
{
|
|
6838
|
-
"path": "tests/
|
|
6838
|
+
"path": "tests/government_require_permission.mjs",
|
|
6839
6839
|
"mode": "0000644",
|
|
6840
|
-
"sha256": "
|
|
6840
|
+
"sha256": "36596b8870d2edc60bd810af5e10fa864d7f35e62e358d2dff58ed85b69922c0"
|
|
6841
6841
|
},
|
|
6842
6842
|
{
|
|
6843
|
-
"path": "tests/
|
|
6843
|
+
"path": "tests/government_resolver.mjs",
|
|
6844
6844
|
"mode": "0000644",
|
|
6845
|
-
"sha256": "
|
|
6845
|
+
"sha256": "1e37f1902b59676c1004d4790078ddb39ad6dacd74a5e9ac861982fc33fe2b6d"
|
|
6846
6846
|
},
|
|
6847
6847
|
{
|
|
6848
|
-
"path": "tests/
|
|
6848
|
+
"path": "tests/government_routes.mjs",
|
|
6849
6849
|
"mode": "0000644",
|
|
6850
|
-
"sha256": "
|
|
6850
|
+
"sha256": "099954d8dbfa1fd3d503ee1b4825f9a3f10d5ae1e3694c600dd3f06e6a21a127"
|
|
6851
6851
|
},
|
|
6852
6852
|
{
|
|
6853
|
-
"path": "tests/
|
|
6853
|
+
"path": "tests/government_seed.mjs",
|
|
6854
6854
|
"mode": "0000644",
|
|
6855
|
-
"sha256": "
|
|
6855
|
+
"sha256": "97c9728181f98dcf2daed14a4f87b8acb0fa9fa1d6d55e628eaa06c60c539094"
|
|
6856
6856
|
},
|
|
6857
6857
|
{
|
|
6858
|
-
"path": "tests/
|
|
6858
|
+
"path": "tests/government_session_scope.mjs",
|
|
6859
6859
|
"mode": "0000644",
|
|
6860
|
-
"sha256": "
|
|
6860
|
+
"sha256": "7aea1db75ada98b9e3756695c743516a3aac5f12a71d654adc383ae886c2568c"
|
|
6861
6861
|
},
|
|
6862
6862
|
{
|
|
6863
|
-
"path": "tests/
|
|
6863
|
+
"path": "tests/government_vanilla_boot.mjs",
|
|
6864
6864
|
"mode": "0000644",
|
|
6865
|
-
"sha256": "
|
|
6865
|
+
"sha256": "da3ebb855209f5de20b7d9ec45a9b09a068e251bc644e3090818e5a3f063b356"
|
|
6866
|
+
},
|
|
6867
|
+
{
|
|
6868
|
+
"path": "tests/government_vocabulary.mjs",
|
|
6869
|
+
"mode": "0000644",
|
|
6870
|
+
"sha256": "71bd23242e53b1acd15fddedcb093790a847471c8c55485614d379d29e3065f3"
|
|
6866
6871
|
},
|
|
6867
6872
|
{
|
|
6868
6873
|
"path": "tests/grade_aggregates_unavailable.mjs",
|
|
@@ -6937,7 +6942,7 @@
|
|
|
6937
6942
|
{
|
|
6938
6943
|
"path": "tests/hall_page_gate_map.mjs",
|
|
6939
6944
|
"mode": "0000644",
|
|
6940
|
-
"sha256": "
|
|
6945
|
+
"sha256": "cb23b7a54220c3c53906fed559fb0c8a8e97375aa48dfc3cf64a1af88339e110"
|
|
6941
6946
|
},
|
|
6942
6947
|
{
|
|
6943
6948
|
"path": "tests/hall_palette.mjs",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_note": "Neutral governance starter
|
|
3
|
-
"
|
|
2
|
+
"_note": "Neutral governance starter \u2014 the rank TEMPLATES a fresh instance inherits (BV1.R96, ADR 0151). Resolved by modules/government/config.js with the branding precedence: env override -> config/government.json (instance) -> this file. TEMPLATES AND DEFAULTS ONLY. Live ranks, grants, and per-builder assignments are DB rows (government_ranks / government_rank_permissions / government_builder_ranks), resolved server-side per request by resolver.js \u2014 putting a live grant here would make config a second source of authority truth and break ADR 0016. The four seeded ranks carry label + description only: their grants derive from catalog.js floors and are materialised by governance_002, so config may relabel a seeded rank, never re-grant it. A CUSTOM rank template may propose a `permissions` array, but a `system: true` key or a key the catalog does not define is stripped fail-closed \u2014 a config file is editable by anyone who can write the checkout, so it is not a trust boundary. Carries NO host identity: a vanilla instance boots sane from this file alone (proved by R102). To customise, copy to config/government.json and edit there.",
|
|
3
|
+
"ranks": {
|
|
4
4
|
"xenos": {
|
|
5
5
|
"label": "Xenos",
|
|
6
|
-
"description": "Seeded rank
|
|
6
|
+
"description": "Seeded rank \u2014 the sandboxed entry rank. Own-work + public read."
|
|
7
7
|
},
|
|
8
8
|
"thetes": {
|
|
9
9
|
"label": "Thetes",
|
|
10
|
-
"description": "Seeded rank
|
|
10
|
+
"description": "Seeded rank \u2014 graduated newcomer. Adds the general claim queue."
|
|
11
11
|
},
|
|
12
12
|
"metic": {
|
|
13
13
|
"label": "Metic",
|
|
14
|
-
"description": "Seeded rank
|
|
14
|
+
"description": "Seeded rank \u2014 the trusted working rank. Adds review/triage/authoring."
|
|
15
15
|
},
|
|
16
16
|
"archon": {
|
|
17
17
|
"label": "Archon",
|
|
18
|
-
"description": "Seeded rank
|
|
18
|
+
"description": "Seeded rank \u2014 top authority. Adds the admin + system (non-grantable) powers."
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -13,7 +13,7 @@ The governance tab (BV1.R110/R111) let an Archon build custom roles and toggle t
|
|
|
13
13
|
Three facts made this cheaper and narrower than the read-only rendering suggested:
|
|
14
14
|
|
|
15
15
|
1. **The rank roles' grants were already ordinary rows.** `<redacted>.sql` writes them into `governance_role_permissions` exactly like a custom role's. The immutability was a route-level refusal (`loadMutableRole` → `seeded_role_immutable`) plus a disabled toggle — policy, not structure. Nothing had to be remodelled to make them editable.
|
|
16
|
-
2. **The `system` flag was carrying two different meanings.** ADR 0151 used one boolean for "trust-boundary power," but the twelve `system:true` keys split cleanly in two. Seven are **in-app**: a real route reads them through `requirePermission`, so a grant row genuinely confers them (`builder.rank.set`, `version.close`, `task.confirm.grade_bypass`, `dependency.cross_tier.manage`, `goal.scope.manage`, `governance.manage`, `gate_approval.decide`). Three are **substrate**: `deploy.push_main`, `path.protected.modify`, `infra.ssh` are enforced entirely outside the app by the pre-push hook, `main-audit.js`, the grader pre-pass and credential placement (ADR 0043) — `tests/
|
|
16
|
+
2. **The `system` flag was carrying two different meanings.** ADR 0151 used one boolean for "trust-boundary power," but the twelve `system:true` keys split cleanly in two. Seven are **in-app**: a real route reads them through `requirePermission`, so a grant row genuinely confers them (`builder.rank.set`, `version.close`, `task.confirm.grade_bypass`, `dependency.cross_tier.manage`, `goal.scope.manage`, `governance.manage`, `gate_approval.decide`). Three are **substrate**: `deploy.push_main`, `path.protected.modify`, `infra.ssh` are enforced entirely outside the app by the pre-push hook, `main-audit.js`, the grader pre-pass and credential placement (ADR 0043) — `tests/government_abuse_matrix.mjs` V10 asserts *no route consumes them* at all. Two are **principal** keys, held by an exact `builders.system_role` identity and by no role ever.
|
|
17
17
|
3. **A grant row for a substrate key is inert.** It resolves honestly and admits nothing (abuse matrix V8/V10/V11). So the interesting question was never "is it dangerous to allow" but "would allowing it be *true*" — and it would not be.
|
|
18
18
|
|
|
19
19
|
The owner was presented with the choice and chose to delegate the in-app Archon powers as well as the operational ones, having been told the escalation consequence explicitly.
|
package/docs/api/openapi.json
CHANGED
|
@@ -5108,7 +5108,7 @@
|
|
|
5108
5108
|
"government"
|
|
5109
5109
|
],
|
|
5110
5110
|
"summary": "GET /government/assignments",
|
|
5111
|
-
"description": "government.manage — every builder↔
|
|
5111
|
+
"description": "government.manage — every builder↔rank assignment row.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5112
5112
|
"x-rank": "archon",
|
|
5113
5113
|
"x-source": "modules/government/routes/government.js",
|
|
5114
5114
|
"x-permissions": [
|
|
@@ -5147,7 +5147,7 @@
|
|
|
5147
5147
|
"government"
|
|
5148
5148
|
],
|
|
5149
5149
|
"summary": "POST /government/assignments",
|
|
5150
|
-
"description": "government.manage — assign a CUSTOM
|
|
5150
|
+
"description": "government.manage — assign a CUSTOM rank to a builder. assigned_by is ALWAYS the session builder, never input (the audit trail's \"who did this\" must be the authenticated actor).\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5151
5151
|
"x-rank": "archon",
|
|
5152
5152
|
"x-source": "modules/government/routes/government.js",
|
|
5153
5153
|
"x-permissions": [
|
|
@@ -5192,7 +5192,7 @@
|
|
|
5192
5192
|
"government"
|
|
5193
5193
|
],
|
|
5194
5194
|
"summary": "DELETE /government/assignments/:builderId/:rankKey",
|
|
5195
|
-
"description": "government.manage — remove a custom-
|
|
5195
|
+
"description": "government.manage — remove a custom-rank assignment. Idempotent: `removed` says whether a row went away.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5196
5196
|
"x-rank": "archon",
|
|
5197
5197
|
"x-source": "modules/government/routes/government.js",
|
|
5198
5198
|
"x-permissions": [
|
|
@@ -5256,7 +5256,7 @@
|
|
|
5256
5256
|
"government"
|
|
5257
5257
|
],
|
|
5258
5258
|
"summary": "GET /government/permissions",
|
|
5259
|
-
"description": "government.manage — the permission catalog + principals, straight from code (the catalog is CODE, not a table); no DB read. Principals are read-only by construction. Three flags the tab renders its locks from, and the tab must read all three rather than just `grantable`, because since ADR 0172 grantability depends on WHICH
|
|
5259
|
+
"description": "government.manage — the permission catalog + principals, straight from code (the catalog is CODE, not a table); no DB read. Principals are read-only by construction. Three flags the tab renders its locks from, and the tab must read all three rather than just `grantable`, because since ADR 0172 grantability depends on WHICH rank is selected: • `grantable` — the CUSTOM-rank answer (system:false). Unchanged meaning. • `system` — an in-app Archon power: locked on a custom rank, togglable on a sub-Archon rank. • `substrate` — locked EVERYWHERE, on every rank, forever (ADR 0043).\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5260
5260
|
"x-rank": "archon",
|
|
5261
5261
|
"x-source": "modules/government/routes/government.js",
|
|
5262
5262
|
"x-permissions": [
|
|
@@ -5297,7 +5297,7 @@
|
|
|
5297
5297
|
"government"
|
|
5298
5298
|
],
|
|
5299
5299
|
"summary": "GET /government/ranks",
|
|
5300
|
-
"description": "government.manage — the full
|
|
5300
|
+
"description": "government.manage — the full rank list with each rank's grants.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5301
5301
|
"x-rank": "archon",
|
|
5302
5302
|
"x-source": "modules/government/routes/government.js",
|
|
5303
5303
|
"x-permissions": [
|
|
@@ -5336,7 +5336,7 @@
|
|
|
5336
5336
|
"government"
|
|
5337
5337
|
],
|
|
5338
5338
|
"summary": "POST /government/ranks",
|
|
5339
|
-
"description": "government.manage — create a CUSTOM
|
|
5339
|
+
"description": "government.manage — create a CUSTOM rank (is_system false, no seeded_rank — the seeded four exist only via governance_002). Grants are added one at a time via the toggle below, so creation carries none.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5340
5340
|
"x-rank": "archon",
|
|
5341
5341
|
"x-source": "modules/government/routes/government.js",
|
|
5342
5342
|
"x-permissions": [
|
|
@@ -5388,7 +5388,7 @@
|
|
|
5388
5388
|
"government"
|
|
5389
5389
|
],
|
|
5390
5390
|
"summary": "PUT /government/ranks/:rankKey/permissions/:permissionKey",
|
|
5391
|
-
"description": "government.manage — grant one permission to a
|
|
5391
|
+
"description": "government.manage — grant one permission to a rank (the toggle's ON half). The order of refusals is the authority order: rank exists → rank is not the Archon one → the key exists → the key is grantable TO THIS RANK.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5392
5392
|
"x-rank": "archon",
|
|
5393
5393
|
"x-source": "modules/government/routes/government.js",
|
|
5394
5394
|
"x-permissions": [
|
|
@@ -5514,7 +5514,7 @@
|
|
|
5514
5514
|
"government"
|
|
5515
5515
|
],
|
|
5516
5516
|
"summary": "POST /government/ranks/:rankKey/reset",
|
|
5517
|
-
"description": "government.manage — restore a SEEDED rank
|
|
5517
|
+
"description": "government.manage — restore a SEEDED rank to its catalog default (ADR 0172). The counterweight to making the ranks editable: a rank's grant set is ~60 rows, so an owner who drifts one has no practical way back by clicking, and \"what does Trusted mean by default\" is a question only the catalog can answer. Restores catalog.seedForRank(rank.seeded_rank) — the same derivation governance_002 seeded from, so the answer cannot drift from the floors even after later catalog edits. Deliberately NOT offered for a CUSTOM rank: a custom rank has no catalog default to return to (its \"default\" is the empty set it was created with), so the honest verb there is revoking the grants, which the toggle already does.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
|
|
5518
5518
|
"x-rank": "archon",
|
|
5519
5519
|
"x-source": "modules/government/routes/government.js",
|
|
5520
5520
|
"x-permissions": [
|
package/docs/api-reference.md
CHANGED
|
@@ -218,15 +218,15 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
|
|
|
218
218
|
|
|
219
219
|
| Method | Path | Rank | Body | Description |
|
|
220
220
|
|---|---|---|---|---|
|
|
221
|
-
| GET | `/api/bongos/government/assignments` | `archon` | — | government.manage — every builder↔
|
|
222
|
-
| POST | `/api/bongos/government/assignments` | `archon` | `builder_id`, `rank_key` | government.manage — assign a CUSTOM
|
|
223
|
-
| DELETE | `/api/bongos/government/assignments/:builderId/:rankKey` | `archon` | — | government.manage — remove a custom-
|
|
221
|
+
| GET | `/api/bongos/government/assignments` | `archon` | — | government.manage — every builder↔rank assignment row. |
|
|
222
|
+
| POST | `/api/bongos/government/assignments` | `archon` | `builder_id`, `rank_key` | government.manage — assign a CUSTOM rank to a builder. |
|
|
223
|
+
| DELETE | `/api/bongos/government/assignments/:builderId/:rankKey` | `archon` | — | government.manage — remove a custom-rank assignment. |
|
|
224
224
|
| GET | `/api/bongos/government/permissions` | `archon` | — | government.manage — the permission catalog + principals, straight from code (the catalog is CODE, not a table); no DB read. |
|
|
225
|
-
| GET | `/api/bongos/government/ranks` | `archon` | — | government.manage — the full
|
|
226
|
-
| POST | `/api/bongos/government/ranks` | `archon` | `rank_key`, `label`, `description` | government.manage — create a CUSTOM
|
|
227
|
-
| PUT | `/api/bongos/government/ranks/:rankKey/permissions/:permissionKey` | `archon` | — | government.manage — grant one permission to a
|
|
225
|
+
| GET | `/api/bongos/government/ranks` | `archon` | — | government.manage — the full rank list with each rank's grants. |
|
|
226
|
+
| POST | `/api/bongos/government/ranks` | `archon` | `rank_key`, `label`, `description` | government.manage — create a CUSTOM rank (is_system false, no seeded_rank — the seeded four exist only via governance_002). |
|
|
227
|
+
| PUT | `/api/bongos/government/ranks/:rankKey/permissions/:permissionKey` | `archon` | — | government.manage — grant one permission to a rank (the toggle's ON half). |
|
|
228
228
|
| DELETE | `/api/bongos/government/ranks/:rankKey/permissions/:permissionKey` | `archon` | — | government.manage — revoke a grant (the toggle's OFF half). |
|
|
229
|
-
| POST | `/api/bongos/government/ranks/:rankKey/reset` | `archon` | — | government.manage — restore a SEEDED rank
|
|
229
|
+
| POST | `/api/bongos/government/ranks/:rankKey/reset` | `archon` | — | government.manage — restore a SEEDED rank to its catalog default (ADR 0172). |
|
|
230
230
|
|
|
231
231
|
## `grades` (1)
|
|
232
232
|
|
|
@@ -125,27 +125,27 @@ const LEVEL_CONTRACT = Object.freeze({
|
|
|
125
125
|
// not name carries NO wandering metadata and resolves to the safest floor
|
|
126
126
|
// (Locked), the same fail-closed posture the resolver takes for a rank with no
|
|
127
127
|
// seeded role.
|
|
128
|
-
const
|
|
128
|
+
const RANK_WANDERING = Object.freeze({
|
|
129
129
|
xenos: Object.freeze({ default: 0, ceiling: 0 }),
|
|
130
130
|
thetes: Object.freeze({ default: 1, ceiling: 1 }),
|
|
131
131
|
metic: Object.freeze({ default: 2, ceiling: 3 }),
|
|
132
132
|
archon: Object.freeze({ default: 3, ceiling: 3 }),
|
|
133
133
|
});
|
|
134
|
-
const
|
|
134
|
+
const NO_RANK_WANDERING = Object.freeze({ default: 0, ceiling: 0 });
|
|
135
135
|
|
|
136
|
-
function
|
|
137
|
-
return Object.prototype.hasOwnProperty.call(
|
|
138
|
-
?
|
|
139
|
-
:
|
|
136
|
+
function rankWandering(rankKey) {
|
|
137
|
+
return Object.prototype.hasOwnProperty.call(RANK_WANDERING, rankKey)
|
|
138
|
+
? RANK_WANDERING[rankKey]
|
|
139
|
+
: NO_RANK_WANDERING;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// DERIVED projections of the metadata above, kept because scripts/gds/session-eval.js
|
|
143
143
|
// and the /me payload read them by rank. Deriving them means the two views cannot drift.
|
|
144
144
|
const RANK_DEFAULT = Object.freeze(
|
|
145
|
-
Object.fromEntries(Object.entries(
|
|
145
|
+
Object.fromEntries(Object.entries(RANK_WANDERING).map(([role, meta]) => [role, meta.default])),
|
|
146
146
|
);
|
|
147
147
|
const RANK_MAX = Object.freeze(
|
|
148
|
-
Object.fromEntries(Object.entries(
|
|
148
|
+
Object.fromEntries(Object.entries(RANK_WANDERING).map(([role, meta]) => [role, meta.ceiling])),
|
|
149
149
|
);
|
|
150
150
|
|
|
151
151
|
const TOP_LEVEL = LEVELS.length - 1; // 3
|
|
@@ -160,7 +160,7 @@ for (const key of LEVELS) {
|
|
|
160
160
|
for (let i = 0; i < LEVELS.length; i++) {
|
|
161
161
|
if (LEVEL_META[LEVELS[i]].n !== i) throw new Error(`wandering-prefs: LEVEL_META.${LEVELS[i]}.n must equal its index ${i}`);
|
|
162
162
|
}
|
|
163
|
-
for (const [role, meta] of Object.entries(
|
|
163
|
+
for (const [role, meta] of Object.entries(RANK_WANDERING)) {
|
|
164
164
|
if (!isLevelInt(meta.default)) throw new Error(`wandering-prefs: role '${role}' has a non-level default`);
|
|
165
165
|
if (!isLevelInt(meta.ceiling)) throw new Error(`wandering-prefs: role '${role}' has a non-level ceiling`);
|
|
166
166
|
if (meta.default > meta.ceiling) throw new Error(`wandering-prefs: default > ceiling for role '${role}'`);
|
|
@@ -182,11 +182,11 @@ function levelIndex(key) {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
function defaultLevelForRank(rank) {
|
|
185
|
-
return
|
|
185
|
+
return rankWandering(rank).default;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
function maxLevelForRank(rank) {
|
|
189
|
-
return
|
|
189
|
+
return rankWandering(rank).ceiling;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// The override a builder has stored (the raw 'wandering' key off behavior_prefs),
|
|
@@ -303,8 +303,8 @@ module.exports = {
|
|
|
303
303
|
LEVELS,
|
|
304
304
|
LEVEL_META,
|
|
305
305
|
LEVEL_CONTRACT,
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
RANK_WANDERING,
|
|
307
|
+
rankWandering,
|
|
308
308
|
RANK_DEFAULT,
|
|
309
309
|
RANK_MAX,
|
|
310
310
|
TOP_LEVEL,
|