@bongos/core 1.24.72 → 1.24.73

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.
Files changed (33) hide show
  1. package/.bongos-core.json +55 -35
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +2 -0
  4. package/clients/bongos-client/index.cjs +2 -0
  5. package/clients/bongos-client/index.d.ts +2 -0
  6. package/clients/bongos-client/index.mjs +2 -0
  7. package/docs/api/openapi.json +36 -2
  8. package/docs/api-reference.md +3 -2
  9. package/docs/copy-inventory.md +4 -4
  10. package/docs/copy-registry.json +4 -4
  11. package/docs/module-api-changelog.md +2 -0
  12. package/docs/page-readings.json +6 -6
  13. package/modules/government/board.js +19 -7
  14. package/modules/government/config.js +21 -9
  15. package/modules/government/constitution.js +224 -0
  16. package/modules/government/db.js +28 -0
  17. package/modules/government/migrations/government_037_constitution.sql +33 -0
  18. package/modules/government/module.json +2 -1
  19. package/modules/government/pollers/constitution-restore.js +45 -0
  20. package/modules/government/routes/government.js +7 -7
  21. package/modules/hall-ui/public/board-room.js +7 -3
  22. package/modules/hall-ui/public/street-card.js +2 -0
  23. package/package-lock.json +2 -2
  24. package/package.json +1 -1
  25. package/release-notes.json +6 -0
  26. package/scripts/bongos/government-walk.js +7 -0
  27. package/src/bongos/route-rank-check.js +4 -0
  28. package/src/module-api.js +1 -1
  29. package/tests/genesis_government.mjs +11 -0
  30. package/tests/government_board_amendment.mjs +10 -0
  31. package/tests/government_charter_forms.mjs +10 -0
  32. package/tests/government_constitution_durable.mjs +304 -0
  33. package/tests/government_seed.mjs +1 -0
package/.bongos-core.json CHANGED
@@ -2,22 +2,22 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/bongos/package-core.js",
5
- "core_version": "1.24.72",
6
- "core_contract": "1.24.72",
7
- "source_commit": "3e5491a20ca207638089acef9ac3dc6be663ed34",
5
+ "core_version": "1.24.73",
6
+ "core_contract": "1.24.73",
7
+ "source_commit": "d6e8bf3b69ccabcdd8b199ea2057b6de3d365019",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-11-09T22:22:00.760Z",
9
+ "built_at": "2026-11-09T22:31:45.279Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 638,
13
13
  "agent_docs_stubbed": 32,
14
- "functional_verbatim": 3908,
14
+ "functional_verbatim": 3912,
15
15
  "rules": 3,
16
16
  "gate_literals": 3,
17
17
  "gate": "passed"
18
18
  },
19
- "file_count": 4579,
20
- "tree_sha256": "7ca68db25b4b25d5f2bde46c96c878decb202c1f2d6d6d6cc0a92fa7b4a6b056",
19
+ "file_count": 4583,
20
+ "tree_sha256": "fff59aedbdeb7743a31976c9a7cf1975c6fcd6ab7ec48fd481c96bff8d0c913b",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -332,12 +332,12 @@
332
332
  {
333
333
  "path": "clients/bongos-client/README.md",
334
334
  "mode": "0000644",
335
- "sha256": "6669b8bc0f8302da25638519d1dd8d139260c0132c7a5a16747d63cd21d3383d"
335
+ "sha256": "3d9e7c4316d2a75319841e91a44387572d56bdb3505ca41d4df90ff774630a18"
336
336
  },
337
337
  {
338
338
  "path": "clients/bongos-client/bongos-client.global.js",
339
339
  "mode": "0000644",
340
- "sha256": "41d196d2203252be03a416fb271a9d88a61615e0a1d9babad0802e7e85151b44"
340
+ "sha256": "03c191583a91f0080d4ce7639101fdf2e9cd39234ce2dc5ad047b222f190496e"
341
341
  },
342
342
  {
343
343
  "path": "clients/bongos-client/examples/hello-world.mjs",
@@ -347,17 +347,17 @@
347
347
  {
348
348
  "path": "clients/bongos-client/index.cjs",
349
349
  "mode": "0000644",
350
- "sha256": "5b76a04d9fba93c2900a1484cf997825804c4708c43228a6dbc541d3ea2c82f2"
350
+ "sha256": "26bb239e64f5480e06297a2b81bed5039cce7c9d2aa84466fa6c48848b52d6f9"
351
351
  },
352
352
  {
353
353
  "path": "clients/bongos-client/index.d.ts",
354
354
  "mode": "0000644",
355
- "sha256": "6d1fb838c88cc18ecc3d707920d38bff0a3b0390bd45499ed438f91658efc92c"
355
+ "sha256": "73279c122774ff8aa14fb10ab3c354606e656ab24ed4b01b5deb8a59fd6ba995"
356
356
  },
357
357
  {
358
358
  "path": "clients/bongos-client/index.mjs",
359
359
  "mode": "0000644",
360
- "sha256": "25a84c2dfa874511575d8aca0f9102fb7c63c3e9ad7195907bd63f7d24e6a112"
360
+ "sha256": "2279facf87867b3bb522ca99d5fadd8e212f40c120dfc583491358ef97bf7728"
361
361
  },
362
362
  {
363
363
  "path": "clients/bongos-client/package.json",
@@ -2462,12 +2462,12 @@
2462
2462
  {
2463
2463
  "path": "docs/api-reference.md",
2464
2464
  "mode": "0000644",
2465
- "sha256": "349d9ab67b126f0415285109bc80ee0099ef8aa5ca435a28b14f361ff8671282"
2465
+ "sha256": "4a563b87dbe8c974763e920431e9c6fec4c67ab9be4d6b8347e04660ec5a4825"
2466
2466
  },
2467
2467
  {
2468
2468
  "path": "docs/api/openapi.json",
2469
2469
  "mode": "0000644",
2470
- "sha256": "c9a5331ff4b4473ff3176e3221fbe36e815376be79d6b7eb24851780ddc6843c"
2470
+ "sha256": "c1a219ca2fb09e5488269d97f7dfa7785c1929bf8f71a421f7d7dacb11ffa131"
2471
2471
  },
2472
2472
  {
2473
2473
  "path": "docs/architecture.md",
@@ -2492,12 +2492,12 @@
2492
2492
  {
2493
2493
  "path": "docs/copy-inventory.md",
2494
2494
  "mode": "0000644",
2495
- "sha256": "73c9d6e7637bed0c5451c3127a67f65210665d9fc430a8e34290faecb39a15c8"
2495
+ "sha256": "f26f7b6fae417c4fa944194fa0da9cd6e0703ff092260413c339fa6f48e8a69d"
2496
2496
  },
2497
2497
  {
2498
2498
  "path": "docs/copy-registry.json",
2499
2499
  "mode": "0000644",
2500
- "sha256": "d6ead2b50a53579c4537279c5e950509d19e819fb9d92dcd641a012c2bba2af8"
2500
+ "sha256": "93d1350b2759c38e8f4b0e1d2e26f4bab9ec74e5964d34c1d37b5b5be3152780"
2501
2501
  },
2502
2502
  {
2503
2503
  "path": "docs/design/apex-pass-2-direction.md",
@@ -3007,7 +3007,7 @@
3007
3007
  {
3008
3008
  "path": "docs/module-api-changelog.md",
3009
3009
  "mode": "0000644",
3010
- "sha256": "ba8f12960f6b91d2e317dffda9c3df903abdd2123914558253df108b12378d26"
3010
+ "sha256": "970680b1d4106d9633bbbc35712b6ae6b17d24760f54e279ab12b4d6bfa8da0c"
3011
3011
  },
3012
3012
  {
3013
3013
  "path": "docs/modules-contract.md",
@@ -3097,7 +3097,7 @@
3097
3097
  {
3098
3098
  "path": "docs/page-readings.json",
3099
3099
  "mode": "0000644",
3100
- "sha256": "0bd47cc8f024af2284c1b4b0b994df2065b94e40e06c8e62f80ceb7de7ac8cd7"
3100
+ "sha256": "7880c8b8931859603ef57aa5f55af2b4b7e7c8c6aa5661ae78d92920b64b93f7"
3101
3101
  },
3102
3102
  {
3103
3103
  "path": "docs/project-context.template.md",
@@ -5432,7 +5432,7 @@
5432
5432
  {
5433
5433
  "path": "modules/government/board.js",
5434
5434
  "mode": "0000644",
5435
- "sha256": "e113eb5d915cbeb96e805f6afd2f37cc00d38963e3e9895531c3bede822fa6b4"
5435
+ "sha256": "261a349be2bb554e000c26ab04e33e72a0c244b1f76fb0271341166a390f9924"
5436
5436
  },
5437
5437
  {
5438
5438
  "path": "modules/government/build-rights.js",
@@ -5457,7 +5457,12 @@
5457
5457
  {
5458
5458
  "path": "modules/government/config.js",
5459
5459
  "mode": "0000644",
5460
- "sha256": "0110e6a9421696632fa749291547045c60ace60255d55f35a88accd61dcf5c80"
5460
+ "sha256": "e739c0b097b2079df4e202c843054aeff5be6dad72f318ebd2cdefc93e03a531"
5461
+ },
5462
+ {
5463
+ "path": "modules/government/constitution.js",
5464
+ "mode": "0000644",
5465
+ "sha256": "7d3d362b19baa43fa704b747ddc70259e8129d4413e91972b6a8ad13df859389"
5461
5466
  },
5462
5467
  {
5463
5468
  "path": "modules/government/counts.js",
@@ -5467,7 +5472,7 @@
5467
5472
  {
5468
5473
  "path": "modules/government/db.js",
5469
5474
  "mode": "0000644",
5470
- "sha256": "4007bc6bcaf69c3e139effb9800517c4ef3a63745ab9d3aff76e3cfea649d693"
5475
+ "sha256": "ae3f0f06ce140184a22a25b4883fb2fa0620cb4e03259af84a580ba0bf9306cf"
5471
5476
  },
5472
5477
  {
5473
5478
  "path": "modules/government/decision-board.js",
@@ -5729,16 +5734,26 @@
5729
5734
  "mode": "0000644",
5730
5735
  "sha256": "76f264f74a0b4a76658c2ebc717d008253e03ed4439bd4bd3e9856a1dcc2cb80"
5731
5736
  },
5737
+ {
5738
+ "path": "modules/government/migrations/government_037_constitution.sql",
5739
+ "mode": "0000644",
5740
+ "sha256": "f09c9f6492a9607266bbaa0d235f2aaa9779500408c20abc7b0049df22592993"
5741
+ },
5732
5742
  {
5733
5743
  "path": "modules/government/module.json",
5734
5744
  "mode": "0000644",
5735
- "sha256": "347deb8a039efcf580c116fc22d41fba52d38c37b94c3f8b6a303c0a1b74931c"
5745
+ "sha256": "ff83f8b0fc445b4903745a11c7264fcfcf529f0f5910c30329e43ee3c7e615ea"
5736
5746
  },
5737
5747
  {
5738
5748
  "path": "modules/government/pollers/board-expiry.js",
5739
5749
  "mode": "0000644",
5740
5750
  "sha256": "7c4e8e06310b34f089e4605ea088902a1461ee0be131c994353230ea7ba9558c"
5741
5751
  },
5752
+ {
5753
+ "path": "modules/government/pollers/constitution-restore.js",
5754
+ "mode": "0000644",
5755
+ "sha256": "9190567ecbf18bf2a2d8ccc9ea3432e1fe630fbc1c7aa9a7785e3162b2a43bf6"
5756
+ },
5742
5757
  {
5743
5758
  "path": "modules/government/pollers/treasury-borrow.js",
5744
5759
  "mode": "0000644",
@@ -5777,7 +5792,7 @@
5777
5792
  {
5778
5793
  "path": "modules/government/routes/government.js",
5779
5794
  "mode": "0000644",
5780
- "sha256": "9dfc5f2abf311dad88ba9e7689fef2efe5083bfcefdb0071e6112d6cb10b9ae8"
5795
+ "sha256": "fe2dbd8f6056757b7734c0a093779db83dc43fa386ba1dc29a04f6d3efaf7b1b"
5781
5796
  },
5782
5797
  {
5783
5798
  "path": "modules/government/routes/rank-sync.js",
@@ -6072,7 +6087,7 @@
6072
6087
  {
6073
6088
  "path": "modules/hall-ui/public/board-room.js",
6074
6089
  "mode": "0000644",
6075
- "sha256": "b9b9882c202ee29d45d7ebe2c353185b0ae1a71d2ecb9ca332336bcb78154f5c"
6090
+ "sha256": "9d0e498f19139d151374ae0ee7ee8931fa0bb2d407e198fc48b06be5bc753fb0"
6076
6091
  },
6077
6092
  {
6078
6093
  "path": "modules/hall-ui/public/board-room.states.json",
@@ -7112,7 +7127,7 @@
7112
7127
  {
7113
7128
  "path": "modules/hall-ui/public/street-card.js",
7114
7129
  "mode": "0000644",
7115
- "sha256": "3574a16ed8d8c1c0022b17dda6be23c64c58f02b1842c4a0ad12736aed6171d1"
7130
+ "sha256": "6e85c029ac6a77ea21ac7598daf9c95c3fb3cf69dee67a23ce03b14b38c71a9c"
7116
7131
  },
7117
7132
  {
7118
7133
  "path": "modules/hall-ui/public/street-card.states.json",
@@ -11902,12 +11917,12 @@
11902
11917
  {
11903
11918
  "path": "package-lock.json",
11904
11919
  "mode": "0000644",
11905
- "sha256": "c837cb8ba518a3f43a9db5a9889000de93adc27d79f22b27a4a05d5a0270c4a2"
11920
+ "sha256": "6118476d80adc0ee697ee0f13d2330caa2bd13b834ccd7b341b287f06fb2780a"
11906
11921
  },
11907
11922
  {
11908
11923
  "path": "package.json",
11909
11924
  "mode": "0000644",
11910
- "sha256": "e0291e3e2e4813dabea4503b0ac50270def70fe05b2544bddf39300d977178e4"
11925
+ "sha256": "98da8400a3d5ca5048a0ac7cfa144fb266e2edf6e69844b3f74dc52ba8d4c6ff"
11911
11926
  },
11912
11927
  {
11913
11928
  "path": "public-docs/index.html",
@@ -11927,7 +11942,7 @@
11927
11942
  {
11928
11943
  "path": "release-notes.json",
11929
11944
  "mode": "0000644",
11930
- "sha256": "e9c11f7e7f249c0c3618b5f21a87a7fb2b0379c5b787f0a74444896978ee33f4"
11945
+ "sha256": "4364920c375ea2db8349d8faa80f7fd920065a9924e86ccce1065fe325b45586"
11931
11946
  },
11932
11947
  {
11933
11948
  "path": "scripts/bongos/CLAUDE.md",
@@ -12587,7 +12602,7 @@
12587
12602
  {
12588
12603
  "path": "scripts/bongos/government-walk.js",
12589
12604
  "mode": "0000644",
12590
- "sha256": "fbb0b38adb0f56d5d41c5e4ffa5dee6508b7b43bd45b09958f8e4b4886b4446c"
12605
+ "sha256": "2447ccaae2dbdfbbf88feb170bfdcfdaf3ff7b0a6e45060941fa78a4b39be7c2"
12591
12606
  },
12592
12607
  {
12593
12608
  "path": "scripts/bongos/grade-correlation-audit.js",
@@ -15647,7 +15662,7 @@
15647
15662
  {
15648
15663
  "path": "src/bongos/route-rank-check.js",
15649
15664
  "mode": "0000644",
15650
- "sha256": "b97745764e8390de8618037763915f99cb13e308574a98c9cf20003b21053c1f"
15665
+ "sha256": "c25614561abc45b7ab1f9e014e9b1ff7ee027d4928618a50d2f3d13d0b7a3773"
15651
15666
  },
15652
15667
  {
15653
15668
  "path": "src/bongos/routes.js",
@@ -15882,7 +15897,7 @@
15882
15897
  {
15883
15898
  "path": "src/module-api.js",
15884
15899
  "mode": "0000644",
15885
- "sha256": "4d0c12b5487bf6a2ebfc3ec5dfe8e86f0b495f29215e7b0aa0d236734aa90ec0"
15900
+ "sha256": "5cb486686696e02124f0ac2cb55bae2b8e38d48175e0a06bf3780be8b6118aa0"
15886
15901
  },
15887
15902
  {
15888
15903
  "path": "src/module-loader/catalog.js",
@@ -17872,7 +17887,7 @@
17872
17887
  {
17873
17888
  "path": "tests/genesis_government.mjs",
17874
17889
  "mode": "0000644",
17875
- "sha256": "23c71c4621243fbbc1de0001b3dc9f45de00e28fbbad81269ed73569d7e938bc"
17890
+ "sha256": "57e84dbbf4c9bcdb0fbc928d5a11bc91ab03cd9be5330d9fa8ccc9163725feb7"
17876
17891
  },
17877
17892
  {
17878
17893
  "path": "tests/genesis_home.mjs",
@@ -18247,7 +18262,7 @@
18247
18262
  {
18248
18263
  "path": "tests/government_board_amendment.mjs",
18249
18264
  "mode": "0000644",
18250
- "sha256": "c119e3095fd3c260fdea47ff79d2135a77d2a55cc089842667e0b4167a41b91a"
18265
+ "sha256": "a176338146f9e8683bf17cfb942ff8350db5394d8a2ece8bd61f5ae4e07af243"
18251
18266
  },
18252
18267
  {
18253
18268
  "path": "tests/government_board_close.mjs",
@@ -18342,7 +18357,7 @@
18342
18357
  {
18343
18358
  "path": "tests/government_charter_forms.mjs",
18344
18359
  "mode": "0000644",
18345
- "sha256": "0e6e006ad15a39e34b22793be7c6987a8602690f48b65998da04358fd8be3449"
18360
+ "sha256": "817ec9970a718eea5fc3e4c6edf04962bdb03532efb3f0366979d4b2aef50927"
18346
18361
  },
18347
18362
  {
18348
18363
  "path": "tests/government_charter_library.mjs",
@@ -18369,6 +18384,11 @@
18369
18384
  "mode": "0000644",
18370
18385
  "sha256": "280bc5906ac8075495cd3b1fe10e4082291cf4497b166f6acbdec291a8fd6698"
18371
18386
  },
18387
+ {
18388
+ "path": "tests/government_constitution_durable.mjs",
18389
+ "mode": "0000644",
18390
+ "sha256": "388f8a1f40f37c38e7d8bcb1509165663a9691d272ae40488bf054b1392fa3d8"
18391
+ },
18372
18392
  {
18373
18393
  "path": "tests/government_constitution_view.mjs",
18374
18394
  "mode": "0000644",
@@ -18482,7 +18502,7 @@
18482
18502
  {
18483
18503
  "path": "tests/government_seed.mjs",
18484
18504
  "mode": "0000644",
18485
- "sha256": "52cbded8e3e5eba04edc62facf4998b684a23db0080e8804a9754a7c01229300"
18505
+ "sha256": "32e5559d53732662f8a2ab8f36a36c1633b62d1171ac148fe7e6a313ccfecf1b"
18486
18506
  },
18487
18507
  {
18488
18508
  "path": "tests/government_session_scope.mjs",
@@ -5,7 +5,7 @@ A **generated**, zero-dependency typed client for the Bongos API — produced fr
5
5
  by hand; it regenerates when the spec changes, so it can never drift from the routes.
6
6
 
7
7
  - API version: **v1** (served at `/api/bongos/v1`)
8
- - 685 operations across 85 resource groups
8
+ - 686 operations across 85 resource groups
9
9
 
10
10
  ## Use it from your project
11
11
 
@@ -611,6 +611,8 @@ function createClient(opts = {}) {
611
611
  postGovernmentBuildouts: (args) => request("POST", "/government/buildouts", { hasBody: true }, args),
612
612
  // GET /government/constitution — rank: any-builder — GET /government/constitution
613
613
  getGovernmentConstitution: (args) => request("GET", "/government/constitution", { hasBody: false }, args),
614
+ // POST /government/constitution/reapply — rank: archon — POST /government/constitution/reapply
615
+ postGovernmentConstitutionReapply: (args) => request("POST", "/government/constitution/reapply", { hasBody: true }, args),
614
616
  // GET /government/counts — rank: any-builder — GET /government/counts
615
617
  getGovernmentCounts: (args) => request("GET", "/government/counts", { hasBody: false }, args),
616
618
  // GET /government/docket — rank: any-builder — GET /government/docket
@@ -610,6 +610,8 @@ function createClient(opts = {}) {
610
610
  postGovernmentBuildouts: (args) => request("POST", "/government/buildouts", { hasBody: true }, args),
611
611
  // GET /government/constitution — rank: any-builder — GET /government/constitution
612
612
  getGovernmentConstitution: (args) => request("GET", "/government/constitution", { hasBody: false }, args),
613
+ // POST /government/constitution/reapply — rank: archon — POST /government/constitution/reapply
614
+ postGovernmentConstitutionReapply: (args) => request("POST", "/government/constitution/reapply", { hasBody: true }, args),
613
615
  // GET /government/counts — rank: any-builder — GET /government/counts
614
616
  getGovernmentCounts: (args) => request("GET", "/government/counts", { hasBody: false }, args),
615
617
  // GET /government/docket — rank: any-builder — GET /government/docket
@@ -1267,6 +1267,8 @@ export interface BongosClient {
1267
1267
  postGovernmentBuildouts(args: RequestArgs & { body: PostGovernmentBuildoutsRequest }): Promise<PostGovernmentBuildoutsResponse>;
1268
1268
  /** GET /government/constitution — rank: any-builder */
1269
1269
  getGovernmentConstitution(args?: RequestArgs): Promise<ApiResponse>;
1270
+ /** POST /government/constitution/reapply — rank: archon */
1271
+ postGovernmentConstitutionReapply(args?: RequestArgs): Promise<ApiResponse>;
1270
1272
  /** GET /government/counts — rank: any-builder */
1271
1273
  getGovernmentCounts(args?: RequestArgs): Promise<ApiResponse>;
1272
1274
  /** GET /government/docket — rank: any-builder */
@@ -607,6 +607,8 @@ export function createClient(opts = {}) {
607
607
  postGovernmentBuildouts: (args) => request("POST", "/government/buildouts", { hasBody: true }, args),
608
608
  // GET /government/constitution — rank: any-builder — GET /government/constitution
609
609
  getGovernmentConstitution: (args) => request("GET", "/government/constitution", { hasBody: false }, args),
610
+ // POST /government/constitution/reapply — rank: archon — POST /government/constitution/reapply
611
+ postGovernmentConstitutionReapply: (args) => request("POST", "/government/constitution/reapply", { hasBody: true }, args),
610
612
  // GET /government/counts — rank: any-builder — GET /government/counts
611
613
  getGovernmentCounts: (args) => request("GET", "/government/counts", { hasBody: false }, args),
612
614
  // GET /government/docket — rank: any-builder — GET /government/docket
@@ -10879,7 +10879,7 @@
10879
10879
  "government"
10880
10880
  ],
10881
10881
  "summary": "GET /government/constitution",
10882
- "description": "board.vote.cast — the Constitution view (R18 of goal 1000069): the live board block plus the full amendment history, passed and returned alike. Same atom as the room — reading the rule you vote under is part of casting, and the section teaches (criterion C5). The live value resolves fresh per request, so an amendment applied a moment ago reads back immediately (the same instant-effect posture as everything else here).\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).\n\n**Permissions:** `board.vote.cast` (all required).",
10882
+ "description": "board.vote.cast — the Constitution view (R18 of goal 1000069): the live board block plus the full amendment history, passed and returned alike. Same atom as the room — reading the rule you vote under is part of casting, and the section teaches (criterion C5). The live value resolves fresh per request, so an amendment applied a moment ago reads back at once.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).\n\n**Permissions:** `board.vote.cast` (all required).",
10883
10883
  "x-rank": "any-builder",
10884
10884
  "x-source": "modules/government/routes/government.js",
10885
10885
  "x-permissions": [
@@ -10906,6 +10906,40 @@
10906
10906
  ]
10907
10907
  }
10908
10908
  },
10909
+ "/government/constitution/reapply": {
10910
+ "post": {
10911
+ "operationId": "post_government_constitution_reapply",
10912
+ "tags": [
10913
+ "government"
10914
+ ],
10915
+ "summary": "POST /government/constitution/reapply",
10916
+ "description": "government.manage — re-apply the newest PASSED amendment (task 1005140; constitution.js).\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `government.manage` (all required).",
10917
+ "x-rank": "archon",
10918
+ "x-source": "modules/government/routes/government.js",
10919
+ "x-permissions": [
10920
+ "government.manage"
10921
+ ],
10922
+ "responses": {
10923
+ "200": {
10924
+ "description": "Success."
10925
+ },
10926
+ "400": {
10927
+ "$ref": "#/components/responses/BadRequest"
10928
+ },
10929
+ "401": {
10930
+ "$ref": "#/components/responses/Unauthorized"
10931
+ },
10932
+ "403": {
10933
+ "$ref": "#/components/responses/Forbidden"
10934
+ }
10935
+ },
10936
+ "security": [
10937
+ {
10938
+ "builderSession": []
10939
+ }
10940
+ ]
10941
+ }
10942
+ },
10909
10943
  "/government/counts": {
10910
10944
  "get": {
10911
10945
  "operationId": "get_government_counts",
@@ -43022,7 +43056,7 @@
43022
43056
  "description": "A required dependency/feature is not configured or is temporarily down."
43023
43057
  }
43024
43058
  },
43025
- "x-endpoint-count": 685,
43059
+ "x-endpoint-count": 686,
43026
43060
  "x-schema-count": 723,
43027
43061
  "x-undocumented-bodies": 12,
43028
43062
  "x-response-schemas": 459,
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Bongos API reference
4
4
 
5
- > **Generated from the live route files** — the route file is authoritative. 685 endpoints across 117 route files.
5
+ > **Generated from the live route files** — the route file is authoritative. 686 endpoints across 117 route files.
6
6
  > Machine-readable spec: [`docs/api/openapi.json`](api/openapi.json) (OpenAPI 3.1). Rendered docs site: **`/docs`** (e.g. `cloudbongos.com/docs`).
7
7
 
8
8
  Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust-boundary-server-enforced-permissions.md)): `public` < `any-builder` < `metic+archon` < `archon`.
@@ -377,7 +377,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
377
377
  | GET | `/api/bongos/goals/rollups` | `any-builder` | — | GET /goals/rollups?version= — one small row per goal: readiness counters, the last-activity timestamp, the craft set, and the next claima… |
378
378
  | GET | `/api/bongos/goals/suggestions` | `any-builder` | — | GET /goals/suggestions — "which goal should this draft live in?", answered before anything is created (task 1003062 / R07). |
379
379
 
380
- ## `government` (41)
380
+ ## `government` (42)
381
381
 
382
382
  | Method | Path | Rank | Body | Description |
383
383
  |---|---|---|---|---|
@@ -406,6 +406,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
406
406
  | POST | `/api/bongos/government/board/presets` | `metic+archon` | `preset` | board.item.open — SWITCH the project's strictness preset (task 1004715). |
407
407
  | POST | `/api/bongos/government/buildouts` | `any-builder` | `building`, `capsule`, `name`, `line` | board.vote.cast — a Lead's BUILD-OUT (task 1004711, ADR 0378): a committee room, a new floor, an annex, or growing the building into a di… |
408
408
  | GET | `/api/bongos/government/constitution` | `any-builder` | — | board.vote.cast — the Constitution view (R18 of goal 1000069): the live board block plus the full amendment history, passed and returned … |
409
+ | POST | `/api/bongos/government/constitution/reapply` | `archon` | — | government.manage — re-apply the newest PASSED amendment (task 1005140; constitution.js). |
409
410
  | GET | `/api/bongos/government/counts` | `any-builder` | — | board.vote.cast — the government's COUNTS in one read (task 1004716): what is on the viewer ("to do"), what waits on others, what is to d… |
410
411
  | GET | `/api/bongos/government/docket` | `any-builder` | — | |
411
412
  | GET | `/api/bongos/government/laws` | `any-builder` | — | board.vote.cast — the law book (task 1004706): every law in force, oldest first, each with who passed it (the government it was decided u… |
@@ -427,7 +427,7 @@ Identical copy within one surface. Sometimes right (a repeated button), sometime
427
427
  | `e65b392144ac` | certain | Could not set up storage. Try again. | `modules/hall-ui/public/settings.js:853` |
428
428
  | `d4601887a058` | certain | Could not sign out everywhere: {…} | `modules/hall-ui/public/settings-sessions.js:110` |
429
429
  | `3db890b074a7` | certain | Could not update visibility just now. | `modules/hall-ui/public/goals-render.js:1365` |
430
- | `278e8281c82f` | certain | Could not vote: {…} | `modules/hall-ui/public/board-room.js:423` |
430
+ | `278e8281c82f` | certain | Could not vote: {…} | `modules/hall-ui/public/board-room.js:427` |
431
431
  | `a48e9f098392` | certain | Could not {…} just now. | `modules/hall-ui/public/goals-render.js:1351` |
432
432
  | `cb09ee26014f` | certain | Could not {…}: {…} | `modules/hall-ui/public/government.js:360` |
433
433
  | `f53f7aaa189f` | certain | Couldn’t load this goal’s task dependencies right now. | `modules/hall-ui/public/goal-forest-render.js:120` |
@@ -1321,7 +1321,7 @@ Identical copy within one surface. Sometimes right (a repeated button), sometime
1321
1321
  | `b12e1438a8e8` | certain | That review could not be opened. It may have been removed, or you may not have access. | `modules/hall-ui/public/studio.js:1203` |
1322
1322
  | `da217056b514` | certain | That’s you | `modules/hall-ui/public/roster.js:203` |
1323
1323
  | `788f267e4e39` | certain | The Autobongos controls are for the {…}. | `modules/hall-ui/public/gate.js:74` |
1324
- | `c5e6bdd32fe3` | certain | The Board Room is open to the builders this project’s constitution seats on its board. | `modules/hall-ui/public/board-room.js:559` |
1324
+ | `c5e6bdd32fe3` | certain | The Board Room is open to the builders this project’s constitution seats on its board. | `modules/hall-ui/public/board-room.js:563` |
1325
1325
  | `6e93ef49d63f` | certain | The adversarial panel. Each worker reports pass, concerns or fail on its own; the gating workers must all pass | `modules/hall-ui/public/task.js:439` |
1326
1326
  | `89c7bd971440` | certain | The approved pages could not be read just now. | `modules/hall-ui/public/profile.js:782` |
1327
1327
  | `600b90074021` | certain | The art pipeline draws tiles and sprites with Google AI Studio (Gemini). Needed only if you generate art — you | `modules/hall-ui/public/settings.html:245` |
@@ -1638,7 +1638,7 @@ Identical copy within one surface. Sometimes right (a repeated button), sometime
1638
1638
  | `da274462bb30` | certain | You have no open asks. | `modules/hall-ui/public/collab.html:83` |
1639
1639
  | `6b759151f722` | certain | You have reached the end. The button below is now active. | `modules/hall-ui/public/primer.js:384` |
1640
1640
  | `044387a6f90c` | certain | You haven’t joined any open goals. | `modules/hall-ui/public/goals.js:100` |
1641
- | `819dfb951611` | certain | You {…}. | `modules/hall-ui/public/board-room.js:471` |
1641
+ | `819dfb951611` | certain | You {…}. | `modules/hall-ui/public/board-room.js:475` |
1642
1642
  | `8e1915b19274` | certain | You're in the {…} server with your rank role. | `modules/hall-ui/public/settings.js:530` |
1643
1643
  | `56cfdcc60079` | certain | You're not signed in yet. Sign in to manage your connections, your keys and the way the hall behaves. | `modules/hall-ui/public/settings.html:44` |
1644
1644
  | `56efb277e77f` | certain | Your AI balance | `modules/hall-ui/public/ai-studio.js:582` |
@@ -2042,7 +2042,7 @@ Identical copy within one surface. Sometimes right (a repeated button), sometime
2042
2042
  | `23872e0af7a4` | certain | {…} · Optional. Without one, generations run on ours and are charged to your balance. | `modules/hall-ui/public/settings-ai-keys.js:45` |
2043
2043
  | `b3757ba3bb46` | certain | {…} · Stored encrypted; never shown again after saving. | `modules/hall-ui/public/settings.js:731` |
2044
2044
  | `a6e4ed98fbea` | certain | {…} · revoke it any time under Active sessions. | `modules/hall-ui/public/settings.js:637` |
2045
- | `d73256fbc395` | certain | {…} · who votes, and how it {…} | `modules/hall-ui/public/board-room.js:480` |
2045
+ | `d73256fbc395` | certain | {…} · who votes, and how it {…} | `modules/hall-ui/public/board-room.js:484` |
2046
2046
  | `1ac723849449` | certain | {…} · {…}{…} | `modules/hall-ui/public/notes-panel.js:39` |
2047
2047
  | `1ac723849449` | certain | {…} · {…}{…} | `modules/hall-ui/public/sky-interaction.js:33` |
2048
2048
  | `ddd2bfc1fb60` | certain | {…} — how to use it | `modules/hall-ui/public/modules.js:662` |
@@ -6167,7 +6167,7 @@
6167
6167
  "surface": "builders-hall",
6168
6168
  "text": "Could not vote: {…}",
6169
6169
  "file": "modules/hall-ui/public/board-room.js",
6170
- "line": 423,
6170
+ "line": 427,
6171
6171
  "origin": "js-notice",
6172
6172
  "confidence": "certain"
6173
6173
  },
@@ -14213,7 +14213,7 @@
14213
14213
  "surface": "builders-hall",
14214
14214
  "text": "The Board Room is open to the builders this project’s constitution seats on its board.",
14215
14215
  "file": "modules/hall-ui/public/board-room.js",
14216
- "line": 559,
14216
+ "line": 563,
14217
14217
  "origin": "js-text-assign",
14218
14218
  "confidence": "certain"
14219
14219
  },
@@ -17066,7 +17066,7 @@
17066
17066
  "surface": "builders-hall",
17067
17067
  "text": "You {…}.",
17068
17068
  "file": "modules/hall-ui/public/board-room.js",
17069
- "line": 471,
17069
+ "line": 475,
17070
17070
  "origin": "js-markup",
17071
17071
  "confidence": "certain"
17072
17072
  },
@@ -20702,7 +20702,7 @@
20702
20702
  "surface": "builders-hall",
20703
20703
  "text": "{…} · who votes, and how it {…}",
20704
20704
  "file": "modules/hall-ui/public/board-room.js",
20705
- "line": 480,
20705
+ "line": 484,
20706
20706
  "origin": "js-markup",
20707
20707
  "confidence": "certain"
20708
20708
  },
@@ -3396,5 +3396,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
3396
3396
  landed since 1.24.70 with no explicit bump. run 42702183401. (task 1002620)
3397
3397
  1.24.72 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3398
3398
  landed since 1.24.71 with no explicit bump. run 42710989094. (task 1002620)
3399
+ 1.24.73 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3400
+ landed since 1.24.72 with no explicit bump. run 42712461933. (task 1002620)
3399
3401
  ---------------------------------------------------------------------------
3400
3402
  ```
@@ -215,7 +215,7 @@
215
215
  "surface": "builders",
216
216
  "title": "Board Room",
217
217
  "states_read": ["room","out","sitting-meta","objection-form"],
218
- "files_hash": "016178799cf60cb4",
218
+ "files_hash": "8190cdce5bd59db4",
219
219
  "reading_hash": "020553cb2a438d56",
220
220
  "counts": {"lines":51,"placed":18,"shared":9,"unplaced":24},
221
221
  "omitted": {"data":15},
@@ -246,18 +246,18 @@
246
246
  {"key":"L0023","section":"{…} Full Idea","text":"Scope it as best as you can here","placement":"unplaced"},
247
247
  {"key":"L0024","section":"{…} Full Idea","text":"What should an {…} or {…} know prior to building","placement":"unplaced"},
248
248
  {"key":"L0025","section":"{…} Full Idea","text":"How is this long term justified in the project","placement":"unplaced"},
249
- {"key":"L0026","section":"{…} Full Idea","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":480,"string_id":"d73256fbc395","occurrences":9},
249
+ {"key":"L0026","section":"{…} Full Idea","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":484,"string_id":"d73256fbc395","occurrences":9},
250
250
  {"key":"L0027","section":"Constitutional amendment amendment","text":"Constitutional amendment","placement":"unplaced","occurrences":3},
251
251
  {"key":"L0028","section":"Constitutional amendment amendment","text":"amendment","placement":"unplaced","occurrences":3},
252
252
  {"key":"L0029","section":"Constitutional amendment amendment","text":"open","placement":"placed","file":"modules/hall-ui/public/approval-queue.js","line":173,"string_id":"9a803563c948"},
253
253
  {"key":"L0030","section":"Constitutional amendment amendment","text":"no clock — waits for a {…} yes","placement":"unplaced"},
254
254
  {"key":"L0031","section":"Constitutional amendment amendment","text":"Proposes","placement":"unplaced","occurrences":3},
255
- {"key":"L0032","section":"Constitutional amendment amendment","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":480,"string_id":"d73256fbc395","occurrences":3},
255
+ {"key":"L0032","section":"Constitutional amendment amendment","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":484,"string_id":"d73256fbc395","occurrences":3},
256
256
  {"key":"L0033","section":"Constitutional amendment amendment","text":"Closed sittings","placement":"unplaced"},
257
257
  {"key":"L0034","section":"{…} Full Idea","text":"passed","placement":"placed","file":"modules/hall-ui/public/government.js","line":679,"string_id":"da5368d10f85","occurrences":8},
258
258
  {"key":"L0035","section":"{…} and {…}","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232","occurrences":5},
259
259
  {"key":"L0036","section":"{…} and {…}","text":"Full Idea","placement":"unplaced","occurrences":5},
260
- {"key":"L0037","section":"{…} and {…}","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":480,"string_id":"d73256fbc395","occurrences":5},
260
+ {"key":"L0037","section":"{…} and {…}","text":"{…} · who votes, and how it {…}","placement":"placed","file":"modules/hall-ui/public/board-room.js","line":484,"string_id":"d73256fbc395","occurrences":5},
261
261
  {"key":"L0038","section":"Constitutional amendment amendment","text":"passed","placement":"placed","file":"modules/hall-ui/public/government.js","line":679,"string_id":"da5368d10f85","occurrences":2},
262
262
  {"key":"L0039","section":"Constitutional amendment amendment","text":"{\"{…}_{…}\":\"{…}\",\"membership\":\"{…}\",\"window_minutes\":1440,\"close_early_on_{…}_turnout\":true}","placement":"unplaced","occurrences":2},
263
263
  {"key":"L0040","section":"Constitutional amendment amendment","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232","occurrences":2},
@@ -279,7 +279,7 @@
279
279
  "surface": "builders",
280
280
  "title": "The city",
281
281
  "states_read": ["city","fullscreen","switched","focus","pins","living","card","card-ask"],
282
- "files_hash": "61386477fb128d7f",
282
+ "files_hash": "a5d54bcdf64345ee",
283
283
  "reading_hash": "11234462e18a0037",
284
284
  "counts": {"lines":44,"placed":10,"shared":9,"unplaced":25},
285
285
  "omitted": {"data":18},
@@ -2599,7 +2599,7 @@
2599
2599
  "surface": "builders",
2600
2600
  "title": "The street",
2601
2601
  "states_read": ["street","fullscreen","card","switched","focus","here","inside-rules","inside-disputes","inside-people","inside-planning","inside-automation","inside-review","inside-release","inside-treasury","floor","amend","district","desk","desk-facts","desk-quiet","desk-people-builders","desk-people-tier","desk-disputes","desk-automation-goals","desk-release-core","desk-rules","desk-rules-category","desk-planning-priorities","desk-planning-ideas","desk-planning-blockers","pins","pins-pager","living","deck","deck-treasury","sitting","object","voted","admission","settled","blocker","blocker-more","report","report-more","core","core-more","recheck","recheck-more","idea","idea-more","queue","queue-more","automation","automation-more"],
2602
- "files_hash": "54383081a21db0f9",
2602
+ "files_hash": "6d4dbf9fec6f23e6",
2603
2603
  "reading_hash": "8e9e3422f6b72884",
2604
2604
  "counts": {"lines":460,"placed":65,"shared":9,"unplaced":386},
2605
2605
  "omitted": {"data":433},
@@ -47,6 +47,9 @@ const db = require('./db');
47
47
  // file (the reward-port delegation lesson: a destructured binding is frozen at
48
48
  // load and un-patchable).
49
49
  const governmentConfig = require('./config');
50
+ // The durable half of applying a passed amendment (task 1005140), required as a
51
+ // namespace for the same reason.
52
+ const constitutionStore = require('./constitution');
50
53
  const {
51
54
  loadGovernmentConfig, PASS_RULES, MAX_WINDOW_MINUTES,
52
55
  RECOMMENDED_WINDOW_MINUTES, CLOCK_SAFE_PASS_RULES, isClockSafe,
@@ -668,17 +671,25 @@ async function closeItem(item, { cause = 'vote' } = {}) {
668
671
  // close commits (the board's decision is the durable record), loudly on
669
672
  // failure, never silently absorbed. The apply is re-drivable from the passed
670
673
  // item + amendment rows. A returned amendment applies nothing.
674
+ //
675
+ // Task 1005140: the ROW is written first (a container's file does not survive
676
+ // a restart), then this process's file, and then both are READ BACK. An
677
+ // amendment that did not take comes back as `constitution_not_applied`, which
678
+ // the vote route hands to the page the voter is standing on.
671
679
  let appliedConstitution = null;
680
+ let constitutionNotApplied = null;
672
681
  // A rules or laws amendment changes its own table, never the board block.
673
682
  if (outcome === 'passed' && closed.subject_type === 'constitutional_amendment' && !rulesAmendment && !lawsAmendment) {
674
- try {
675
- if (amendment) {
676
- appliedConstitution = governmentConfig.applyBoardAmendment(amendment.proposed);
677
- } else {
678
- console.error(`[government] passed amendment item ${closed.id} names amendment ${closed.subject_id}, which does not exist — NOT applied`);
683
+ if (amendment) {
684
+ const out = await constitutionStore.recordRatified(amendment.proposed, { itemId: closed.id });
685
+ appliedConstitution = out.applied;
686
+ constitutionNotApplied = out.failure;
687
+ if (out.failure) {
688
+ console.error(`[government] amendment ${closed.subject_id} ratified but NOT in force (re-apply with POST /government/constitution/reapply): ${JSON.stringify(out.failure.problems)}`);
679
689
  }
680
- } catch (applyErr) {
681
- console.error(`[government] amendment ${closed.subject_id} ratified but NOT applied (re-drivable from the passed item): ${applyErr && applyErr.message}`);
690
+ } else {
691
+ console.error(`[government] passed amendment item ${closed.id} names amendment ${closed.subject_id}, which does not exist — NOT applied`);
692
+ constitutionNotApplied = Object.freeze({ should: null, problems: [{ where: 'database', reason: 'the amendment row does not exist' }] });
682
693
  }
683
694
  }
684
695
 
@@ -713,6 +724,7 @@ async function closeItem(item, { cause = 'vote' } = {}) {
713
724
  closed: true, item: closed, outcome, cause, author_karma: authorKarma,
714
725
  ...(credit ? { credit } : {}),
715
726
  ...(appliedConstitution ? { applied_constitution: appliedConstitution } : {}),
727
+ ...(constitutionNotApplied ? { constitution_not_applied: constitutionNotApplied } : {}),
716
728
  ...(appliedDecisionRules ? { applied_decision_rules: appliedDecisionRules } : {}),
717
729
  ...(appliedLaws ? { applied_laws: appliedLaws } : {}),
718
730
  ...(acted ? { acted: acted.result } : {}),