@bongos/core 1.20.26 → 1.20.28
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 +117 -47
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +2 -0
- package/clients/bongos-client/index.cjs +2 -0
- package/clients/bongos-client/index.d.ts +5 -1
- package/clients/bongos-client/index.mjs +2 -0
- package/docs/adr/0335-an-invite-is-a-pre-approved-row-on-the-projects-own-instance.md +1 -1
- package/docs/adr/0353-a-hub-invite-is-a-notice-of-the-projects-own-invite.md +2 -2
- package/docs/adr/0355-a-soft-limit-is-a-rule-with-a-reason-and-nobody-enforces-it.md +30 -0
- package/docs/adr/0356-a-recruit-invite-expires-30-days-after-it-is-sent-read-time.md +46 -0
- package/docs/adr/README.md +2 -0
- package/docs/api/openapi.json +105 -5
- package/docs/api-reference.md +3 -2
- package/docs/copy-inventory.md +37 -36
- package/docs/copy-registry.json +52 -43
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-readings.json +70 -68
- package/migrations/core_266_access_requests_invited_login_idx.sql +31 -0
- package/modules/government/board.js +64 -7
- package/modules/government/charter.js +232 -0
- package/modules/government/routes/government.js +62 -0
- package/modules/hall-ui/public/government.js +11 -0
- package/modules/hall-ui/public/watch.js +9 -3
- package/modules/onboarding/routes/access-requests.js +43 -20
- package/modules/platform-identity/migrations/platform_identity_028_purge_pre_notice_invites.sql +65 -0
- package/modules/platform-identity/platform-identity.js +12 -8
- package/modules/platform-identity/tests/platform-identity.mjs +4 -2
- package/modules/provisioning/planet-physics.js +154 -0
- package/modules/provisioning/provisioning.js +29 -9
- package/modules/provisioning/routes/body-validators.js +25 -7
- package/modules/provisioning/routes/provisioning.js +8 -3
- package/modules/provisioning/screening.js +62 -0
- package/modules/provisioning/soft-limits.js +146 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +24 -0
- package/scripts/gds/fitness.js +4 -0
- package/scripts/gds/login.js +6 -0
- package/scripts/gds/run-unit-tests.js +8 -0
- package/src/bongos/db-kernel.js +6 -3
- package/src/bongos/invite-expiry.js +47 -0
- package/src/bongos/route-rank-check.js +3 -0
- package/src/module-api.js +10 -1
- package/tests/access_requests_invite.mjs +2 -1
- package/tests/application_lifecycle.mjs +164 -5
- package/tests/bongos_login.mjs +2 -0
- package/tests/government_charter_forms.mjs +283 -0
- package/tests/hub_invite_notices.mjs +5 -2
- package/tests/invite_expiry.mjs +37 -0
- package/tests/invite_expiry_db.mjs +196 -0
- package/tests/module_api.mjs +1 -0
- package/tests/pending_invite_purge_db.mjs +129 -0
- package/tests/project_admin_console_model.mjs +12 -5
- package/tests/provisioning_planet_physics.mjs +377 -0
package/docs/page-readings.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"adr": "0341 D3",
|
|
6
6
|
"reread": "node scripts/gds/page-reader.js --stale",
|
|
7
7
|
"how": ["Generated by node scripts/gds/page-reader.js (BV2.TW04, task 1004315; ADR 0341 D3). Do not hand-edit.","One entry per page of docs/page-inventory.json. Lines are in page order: the default state first, and a line only another state shows sits where that state shows it, with its state named.","placement: placed = a docs/copy-registry.json row renders it (file, line, string_id); shared = shell text every page of the surface carries (top bar, sidebar, footer), with its row when the registry has one; unplaced = the registry cannot place it (a rewrite becomes an engineer task, ADR 0341 D4).","text keeps {…} where the registry row has a hole, or where a value the page read from its API was filled in. A string that is only such data is counted under omitted.data, not listed.","reading_hash is over the non-shared lines (key, section, text); files_hash is over the page's inventory files. --check compares files_hash only and never opens a browser.","Rendered through the hall-preview harness (hall) and the ui-design kit stub (landing, status), at 1280x800 with the clock pinned, so a reading is the fixture world's page."],
|
|
8
|
-
"counts": {"pages":39,"lines":
|
|
8
|
+
"counts": {"pages":39,"lines":3797,"placed":1278,"shared":254,"unplaced":2265,"omitted_data":2054},
|
|
9
9
|
"pages": [
|
|
10
10
|
{
|
|
11
11
|
"id": "builders:atlas",
|
|
@@ -1156,9 +1156,9 @@
|
|
|
1156
1156
|
"surface": "builders",
|
|
1157
1157
|
"title": "Government",
|
|
1158
1158
|
"states_read": ["constitution","out","permissions","board","constitution-tab"],
|
|
1159
|
-
"files_hash": "
|
|
1160
|
-
"reading_hash": "
|
|
1161
|
-
"counts": {"lines":
|
|
1159
|
+
"files_hash": "5181c9903bdea83f",
|
|
1160
|
+
"reading_hash": "f7f7466cabdf5569",
|
|
1161
|
+
"counts": {"lines":71,"placed":24,"shared":5,"unplaced":42},
|
|
1162
1162
|
"omitted": {"data":10},
|
|
1163
1163
|
"notes": ["board: an action failed (page.click: Timeout 6000ms exceeded.); read as it stood"],
|
|
1164
1164
|
"lines": [
|
|
@@ -1167,11 +1167,11 @@
|
|
|
1167
1167
|
{"key":"L0003","section":"top bar","text":"Jump to…","placement":"shared","file":"modules/hall-ui/public/shell.js","line":487,"string_id":"eba610d25523"},
|
|
1168
1168
|
{"key":"L0004","section":"top bar","text":"Ctrl K","placement":"shared"},
|
|
1169
1169
|
{"key":"L0005","section":"Government","text":"Government","placement":"unplaced"},
|
|
1170
|
-
{"key":"L0006","section":"Government","text":"How this project is governed.","placement":"placed","file":"modules/hall-ui/public/government.js","line":
|
|
1170
|
+
{"key":"L0006","section":"Government","text":"How this project is governed.","placement":"placed","file":"modules/hall-ui/public/government.js","line":931,"string_id":"b536897de6a3"},
|
|
1171
1171
|
{"key":"L0007","section":"Government","text":"Permissions","placement":"unplaced"},
|
|
1172
1172
|
{"key":"L0008","section":"Government","text":"Constitution","placement":"unplaced"},
|
|
1173
|
-
{"key":"L0009","section":"{…}s only","text":"{…}s only","placement":"placed","file":"modules/hall-ui/public/government.js","line":
|
|
1174
|
-
{"key":"L0010","section":"{…}s only","text":"Permissions is the Archon administration surface. The Constitution and the Board Room are yours to read.","placement":"placed","file":"modules/hall-ui/public/government.js","line":
|
|
1173
|
+
{"key":"L0009","section":"{…}s only","text":"{…}s only","placement":"placed","file":"modules/hall-ui/public/government.js","line":907,"string_id":"1e275ee0299c","state":"permissions"},
|
|
1174
|
+
{"key":"L0010","section":"{…}s only","text":"Permissions is the Archon administration surface. The Constitution and the Board Room are yours to read.","placement":"placed","file":"modules/hall-ui/public/government.js","line":907,"string_id":"e1e10dc5e357","state":"permissions"},
|
|
1175
1175
|
{"key":"L0011","section":"footer","text":"Sign out","placement":"shared","file":"modules/hall-ui/public/shell.js","line":464,"string_id":"1883ad7f07fc","state":"permissions","occurrences":2},
|
|
1176
1176
|
{"key":"L0012","section":"Constitution","text":"Constitution","placement":"unplaced"},
|
|
1177
1177
|
{"key":"L0013","section":"Constitution","text":"Three dials, all settings rather than code:","placement":"placed","file":"modules/hall-ui/public/government.html","line":55,"string_id":"2ad5823d2cd7"},
|
|
@@ -1179,58 +1179,60 @@
|
|
|
1179
1179
|
{"key":"L0015","section":"Constitution","text":"what counts as passing","placement":"placed","file":"modules/hall-ui/public/government.html","line":55,"string_id":"17705daf7b85"},
|
|
1180
1180
|
{"key":"L0016","section":"Constitution","text":", and","placement":"placed","file":"modules/hall-ui/public/government.html","line":55,"string_id":"37964829d693"},
|
|
1181
1181
|
{"key":"L0017","section":"Constitution","text":"how long a vote stays open","placement":"placed","file":"modules/hall-ui/public/government.html","line":55,"string_id":"7d5cbe3d81e4"},
|
|
1182
|
-
{"key":"L0018","section":"Constitution","text":"
|
|
1183
|
-
{"key":"L0019","section":"Constitution","text":"
|
|
1184
|
-
{"key":"L0020","section":"Constitution","text":"
|
|
1185
|
-
{"key":"L0021","section":"Constitution","text":"
|
|
1186
|
-
{"key":"L0022","section":"Constitution","text":"
|
|
1187
|
-
{"key":"L0023","section":"Constitution","text":"
|
|
1188
|
-
{"key":"L0024","section":"Constitution","text":"
|
|
1189
|
-
{"key":"L0025","section":"Constitution","text":"
|
|
1190
|
-
{"key":"L0026","section":"Constitution","text":"
|
|
1191
|
-
{"key":"L0027","section":"Constitution","text":"
|
|
1192
|
-
{"key":"L0028","section":"Constitution","text":"
|
|
1193
|
-
{"key":"L0029","section":"Constitution","text":"
|
|
1194
|
-
{"key":"L0030","section":"Constitution","text":"
|
|
1195
|
-
{"key":"L0031","section":"Constitution","text":"
|
|
1196
|
-
{"key":"L0032","section":"Constitution","text":"
|
|
1197
|
-
{"key":"L0033","section":"
|
|
1198
|
-
{"key":"L0034","section":"
|
|
1199
|
-
{"key":"L0035","section":"How it has changed","text":"
|
|
1200
|
-
{"key":"L0036","section":"How it has changed","text":"
|
|
1201
|
-
{"key":"L0037","section":"How it has changed","text":"
|
|
1202
|
-
{"key":"L0038","section":"How it has changed","text":"
|
|
1203
|
-
{"key":"L0039","section":"How it has changed","text":"
|
|
1204
|
-
{"key":"L0040","section":"How it has changed","text":"decided by
|
|
1205
|
-
{"key":"L0041","section":"
|
|
1206
|
-
{"key":"L0042","section":"
|
|
1207
|
-
{"key":"L0043","section":"Charter library","text":"
|
|
1208
|
-
{"key":"L0044","section":"Charter library","text":"
|
|
1209
|
-
{"key":"L0045","section":"Charter library","text":"
|
|
1210
|
-
{"key":"L0046","section":"Charter library","text":"
|
|
1211
|
-
{"key":"L0047","section":"Charter library","text":"{…}
|
|
1212
|
-
{"key":"L0048","section":"Charter library","text":"
|
|
1213
|
-
{"key":"L0049","section":"Charter library","text":"
|
|
1214
|
-
{"key":"L0050","section":"Charter library","text":"
|
|
1215
|
-
{"key":"L0051","section":"Charter library","text":"
|
|
1216
|
-
{"key":"L0052","section":"Charter library","text":"
|
|
1217
|
-
{"key":"L0053","section":"Charter library","text":"
|
|
1218
|
-
{"key":"L0054","section":"Charter library","text":"
|
|
1219
|
-
{"key":"L0055","section":"Charter library","text":"
|
|
1220
|
-
{"key":"L0056","section":"Charter library","text":"
|
|
1221
|
-
{"key":"L0057","section":"Charter library","text":"
|
|
1222
|
-
{"key":"L0058","section":"Charter library","text":"
|
|
1223
|
-
{"key":"L0059","section":"Charter library","text":"
|
|
1224
|
-
{"key":"L0060","section":"Charter library","text":"
|
|
1225
|
-
{"key":"L0061","section":"Charter library","text":"
|
|
1226
|
-
{"key":"L0062","section":"Charter library","text":"
|
|
1227
|
-
{"key":"L0063","section":"Charter library","text":"
|
|
1228
|
-
{"key":"L0064","section":"Charter library","text":"
|
|
1229
|
-
{"key":"L0065","section":"Charter library","text":"
|
|
1230
|
-
{"key":"L0066","section":"Charter library","text":"
|
|
1231
|
-
{"key":"L0067","section":"Charter library","text":"
|
|
1232
|
-
{"key":"L0068","section":"Charter library","text":"
|
|
1233
|
-
{"key":"L0069","section":"Charter library","text":"
|
|
1182
|
+
{"key":"L0018","section":"Constitution","text":"{…} of {…}","placement":"placed","file":"modules/hall-ui/public/sky-panel.js","line":120,"string_id":"73c1372b43d9"},
|
|
1183
|
+
{"key":"L0019","section":"Constitution","text":"Not available from this server yet.","placement":"unplaced"},
|
|
1184
|
+
{"key":"L0020","section":"Constitution","text":"Who sits on the board","placement":"unplaced"},
|
|
1185
|
+
{"key":"L0021","section":"Constitution","text":"Every {…} builder at","placement":"unplaced"},
|
|
1186
|
+
{"key":"L0022","section":"Constitution","text":"or above","placement":"placed","file":"modules/hall-ui/public/government.js","line":564,"string_id":"c38db02adb61"},
|
|
1187
|
+
{"key":"L0023","section":"Constitution","text":"sits on the board — that is","placement":"unplaced"},
|
|
1188
|
+
{"key":"L0024","section":"Constitution","text":"and","placement":"placed","file":"modules/hall-ui/public/deploy.js","line":375,"string_id":"084748fd85b4"},
|
|
1189
|
+
{"key":"L0025","section":"Constitution","text":". Membership follows the rank, live.","placement":"unplaced"},
|
|
1190
|
+
{"key":"L0026","section":"Constitution","text":"What counts as passing","placement":"unplaced"},
|
|
1191
|
+
{"key":"L0027","section":"Constitution","text":"Items pass by","placement":"unplaced"},
|
|
1192
|
+
{"key":"L0028","section":"Constitution","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232","occurrences":2},
|
|
1193
|
+
{"key":"L0029","section":"Constitution","text":"How long a sitting runs","placement":"unplaced"},
|
|
1194
|
+
{"key":"L0030","section":"Constitution","text":"A sitting runs","placement":"unplaced"},
|
|
1195
|
+
{"key":"L0031","section":"Constitution","text":"1 day","placement":"unplaced"},
|
|
1196
|
+
{"key":"L0032","section":"Constitution","text":", closing early the moment every member has voted. An unvoted window nulls that member's vote — absence never blocks.","placement":"unplaced"},
|
|
1197
|
+
{"key":"L0033","section":"Constitution","text":"As configuration:","placement":"placed","file":"modules/hall-ui/public/government.js","line":839,"string_id":"5fcfdf8975cf"},
|
|
1198
|
+
{"key":"L0034","section":"Constitution","text":"{\"membership\":\"{…}\",\"pass_rule\":\"{…}\",\"window_minutes\":1440,\"close_early_on_{…}_turnout\":true}","placement":"unplaced"},
|
|
1199
|
+
{"key":"L0035","section":"How it has changed","text":"How it has changed","placement":"placed","file":"modules/hall-ui/public/government.js","line":850,"string_id":"fb7489e8b67c"},
|
|
1200
|
+
{"key":"L0036","section":"How it has changed","text":"Every closed amendment sitting, ratified and returned alike, with the rule it was decided under.","placement":"placed","file":"modules/hall-ui/public/government.js","line":850,"string_id":"a97b064db76f"},
|
|
1201
|
+
{"key":"L0037","section":"How it has changed","text":"{…} proposed","placement":"placed","file":"modules/hall-ui/public/government.js","line":705,"string_id":"154bc518bab4","occurrences":2},
|
|
1202
|
+
{"key":"L0038","section":"How it has changed","text":"{\"membership\":\"{…}\",\"pass_rule\":\"{…}\",\"window_minutes\":1440,\"close_early_on_{…}_turnout\":true}","placement":"unplaced"},
|
|
1203
|
+
{"key":"L0039","section":"How it has changed","text":"ratified","placement":"unplaced"},
|
|
1204
|
+
{"key":"L0040","section":"How it has changed","text":"decided by first ratifier","placement":"unplaced"},
|
|
1205
|
+
{"key":"L0041","section":"How it has changed","text":"{\"membership\":\"{…}\",\"pass_rule\":\"{…}\",\"window_minutes\":120,\"close_early_on_{…}_turnout\":true}","placement":"unplaced"},
|
|
1206
|
+
{"key":"L0042","section":"How it has changed","text":"decided by {…}","placement":"unplaced"},
|
|
1207
|
+
{"key":"L0043","section":"Charter library","text":"Charter library","placement":"placed","file":"modules/hall-ui/public/government.js","line":809,"string_id":"e6982a9ff948"},
|
|
1208
|
+
{"key":"L0044","section":"Charter library","text":"The seven government structures, for getting a team up to speed before deciding when to flip a switch.","placement":"placed","file":"modules/hall-ui/public/government.js","line":809,"string_id":"af664a644b13"},
|
|
1209
|
+
{"key":"L0045","section":"Charter library","text":"Selectable today","placement":"placed","file":"modules/hall-ui/public/government.js","line":809,"string_id":"ae43a132699b"},
|
|
1210
|
+
{"key":"L0046","section":"Charter library","text":"means expressible through the real configuration — a rank-based membership plus a pass rule — with no new code. This project has","placement":"placed","file":"modules/hall-ui/public/government.js","line":809,"string_id":"5c3fdd34cd02"},
|
|
1211
|
+
{"key":"L0047","section":"Charter library","text":"{…} builders:","placement":"unplaced"},
|
|
1212
|
+
{"key":"L0048","section":"Charter library","text":"Monarchy / BDFL","placement":"unplaced"},
|
|
1213
|
+
{"key":"L0049","section":"Charter library","text":"{…} project{…}","placement":"placed","file":"modules/hall-ui/public/fleet.js","line":39,"string_id":"771bef3d31b5","occurrences":2},
|
|
1214
|
+
{"key":"L0050","section":"Charter library","text":"selectable today","placement":"unplaced","occurrences":4},
|
|
1215
|
+
{"key":"L0051","section":"Charter library","text":"as configuration: {…}","placement":"placed","file":"modules/hall-ui/public/government.js","line":795,"string_id":"d7c511423bc0","occurrences":4},
|
|
1216
|
+
{"key":"L0052","section":"Charter library","text":"Timocratic Republic","placement":"unplaced"},
|
|
1217
|
+
{"key":"L0053","section":"Charter library","text":"Standing accrues to those actively building: the franchise follows earned rank, not headcount.","placement":"unplaced"},
|
|
1218
|
+
{"key":"L0054","section":"Charter library","text":"Direct Democracy","placement":"unplaced"},
|
|
1219
|
+
{"key":"L0055","section":"Charter library","text":"Every builder sits on the board. Consent keeps it unblockable: silence passes, one reasoned objection returns.","placement":"unplaced"},
|
|
1220
|
+
{"key":"L0056","section":"Charter library","text":"Presidential","placement":"unplaced"},
|
|
1221
|
+
{"key":"L0057","section":"Charter library","text":"An ELECTED executive with a fixed term. Needs election machinery this system does not have yet — documented for later.","placement":"unplaced"},
|
|
1222
|
+
{"key":"L0058","section":"Charter library","text":"documented for later","placement":"unplaced","occurrences":3},
|
|
1223
|
+
{"key":"L0059","section":"Charter library","text":"Cooperative","placement":"unplaced"},
|
|
1224
|
+
{"key":"L0060","section":"Charter library","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232"},
|
|
1225
|
+
{"key":"L0061","section":"Charter library","text":"Federation","placement":"unplaced"},
|
|
1226
|
+
{"key":"L0062","section":"Charter library","text":"Multiple chambers or sub-projects, each self-governing, coordinating through a compact. The >150 shape — documented for later.","placement":"unplaced"},
|
|
1227
|
+
{"key":"L0063","section":"Charter library","text":"Foundation","placement":"unplaced"},
|
|
1228
|
+
{"key":"L0064","section":"Charter library","text":"A written charter carried by a small appointed council. Expressible today by governing through a custom rank.","placement":"unplaced"},
|
|
1229
|
+
{"key":"L0065","section":"Charter library","text":"Trajectories","placement":"unplaced"},
|
|
1230
|
+
{"key":"L0066","section":"Charter library","text":"The constitution stays as founded until deliberately amended — no automatic movement.","placement":"unplaced"},
|
|
1231
|
+
{"key":"L0067","section":"Charter library","text":"Laddered","placement":"unplaced"},
|
|
1232
|
+
{"key":"L0068","section":"Charter library","text":"Steps up the developmental ladder as the team crosses each headcount threshold.","placement":"unplaced"},
|
|
1233
|
+
{"key":"L0069","section":"Charter library","text":"Scheduled","placement":"unplaced"},
|
|
1234
|
+
{"key":"L0070","section":"Charter library","text":"Pre-commits the dates or milestones at which each step happens, decided in advance.","placement":"unplaced"},
|
|
1235
|
+
{"key":"L0071","section":"Charter library","text":"The developmental ladder: {…}. Formality is adopted only where informal coordination breaks.","placement":"placed","file":"modules/hall-ui/public/government.js","line":816,"string_id":"bac12faf3328"}
|
|
1234
1236
|
]
|
|
1235
1237
|
},
|
|
1236
1238
|
{
|
|
@@ -2978,7 +2980,7 @@
|
|
|
2978
2980
|
"surface": "builders",
|
|
2979
2981
|
"title": "Watch",
|
|
2980
2982
|
"states_read": ["board","out","operations","security"],
|
|
2981
|
-
"files_hash": "
|
|
2983
|
+
"files_hash": "4b89e8960b706953",
|
|
2982
2984
|
"reading_hash": "de49e347cca76e41",
|
|
2983
2985
|
"counts": {"lines":156,"placed":44,"shared":5,"unplaced":107},
|
|
2984
2986
|
"omitted": {"data":123},
|
|
@@ -2989,7 +2991,7 @@
|
|
|
2989
2991
|
{"key":"L0003","section":"top bar","text":"Jump to…","placement":"shared","file":"modules/hall-ui/public/shell.js","line":487,"string_id":"eba610d25523"},
|
|
2990
2992
|
{"key":"L0004","section":"top bar","text":"Ctrl K","placement":"shared"},
|
|
2991
2993
|
{"key":"L0005","section":"Watch","text":"Watch","placement":"unplaced"},
|
|
2992
|
-
{"key":"L0006","section":"Watch","text":"System oversight: people, operations and security.","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
2994
|
+
{"key":"L0006","section":"Watch","text":"System oversight: people, operations and security.","placement":"placed","file":"modules/hall-ui/public/watch.js","line":1364,"string_id":"4894b1d9b0de"},
|
|
2993
2995
|
{"key":"L0007","section":"Watch","text":"Access requests","placement":"placed","file":"modules/hall-ui/public/watch.html","line":46,"string_id":"996edffc1966"},
|
|
2994
2996
|
{"key":"L0008","section":"Watch","text":"pending, on the People tab","placement":"placed","file":"modules/hall-ui/public/watch.html","line":46,"string_id":"2fb1dad96280"},
|
|
2995
2997
|
{"key":"L0009","section":"Watch","text":"Security reports","placement":"placed","file":"modules/hall-ui/public/watch.html","line":47,"string_id":"ab8af800f2bb"},
|
|
@@ -3027,7 +3029,7 @@
|
|
|
3027
3029
|
{"key":"L0041","section":"Security","text":"Requester","placement":"unplaced","state":"security"},
|
|
3028
3030
|
{"key":"L0042","section":"Security","text":"Rationale","placement":"unplaced","state":"security"},
|
|
3029
3031
|
{"key":"L0043","section":"Security","text":"Reward","placement":"unplaced","state":"security"},
|
|
3030
|
-
{"key":"L0044","section":"Security","text":"Asked","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3032
|
+
{"key":"L0044","section":"Security","text":"Asked","placement":"placed","file":"modules/hall-ui/public/watch.js","line":517,"string_id":"b2656d0b2402","state":"security"},
|
|
3031
3033
|
{"key":"L0045","section":"Security","text":"Decide","placement":"unplaced","state":"security"},
|
|
3032
3034
|
{"key":"L0046","section":"Security","text":"Approve","placement":"unplaced","state":"security"},
|
|
3033
3035
|
{"key":"L0047","section":"Security","text":"Deny","placement":"unplaced","state":"security"},
|
|
@@ -3059,7 +3061,7 @@
|
|
|
3059
3061
|
{"key":"L0073","section":"Sessions","text":"Earned","placement":"unplaced","state":"operations"},
|
|
3060
3062
|
{"key":"L0074","section":"Sessions","text":"Duration","placement":"unplaced","state":"operations"},
|
|
3061
3063
|
{"key":"L0075","section":"Sessions","text":"Uploaded","placement":"unplaced","state":"operations"},
|
|
3062
|
-
{"key":"L0076","section":"Sessions","text":"task {…}","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3064
|
+
{"key":"L0076","section":"Sessions","text":"task {…}","placement":"placed","file":"modules/hall-ui/public/watch.js","line":1271,"string_id":"4d8ee7d68974","state":"operations","occurrences":5},
|
|
3063
3065
|
{"key":"L0077","section":"Sessions","text":"412.0k","placement":"unplaced","state":"operations"},
|
|
3064
3066
|
{"key":"L0078","section":"Sessions","text":"1h 31m","placement":"unplaced","state":"operations"},
|
|
3065
3067
|
{"key":"L0079","section":"Sessions","text":"1.2M","placement":"unplaced","state":"operations"},
|
|
@@ -3080,8 +3082,8 @@
|
|
|
3080
3082
|
{"key":"L0094","section":"Repo health","text":"Dead Files","placement":"unplaced","state":"operations"},
|
|
3081
3083
|
{"key":"L0095","section":"Repo health","text":"Stale Branches","placement":"unplaced","state":"operations"},
|
|
3082
3084
|
{"key":"L0096","section":"Repo health","text":"Confirmed Unshipped","placement":"unplaced","state":"operations"},
|
|
3083
|
-
{"key":"L0097","section":"Repo health","text":"Over the last {…} days","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3084
|
-
{"key":"L0098","section":"Repo health","text":"Read it as a table","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3085
|
+
{"key":"L0097","section":"Repo health","text":"Over the last {…} days","placement":"placed","file":"modules/hall-ui/public/watch.js","line":1188,"string_id":"d89d1923ecf9","state":"operations"},
|
|
3086
|
+
{"key":"L0098","section":"Repo health","text":"Read it as a table","placement":"placed","file":"modules/hall-ui/public/watch.js","line":1161,"string_id":"b03e17693dcd","state":"operations","occurrences":4},
|
|
3085
3087
|
{"key":"L0099","section":"Repo health","text":"{…} of {…}","placement":"placed","file":"modules/hall-ui/public/sky-panel.js","line":120,"string_id":"73c1372b43d9","state":"operations"},
|
|
3086
3088
|
{"key":"L0100","section":"Repo health","text":"Dead exports","placement":"unplaced","state":"operations"},
|
|
3087
3089
|
{"key":"L0101","section":"Repo health","text":"Exported symbols nothing imports — the knip scan, run daily. 0 – 3 across 28 snapshots.","placement":"unplaced","state":"operations"},
|
|
@@ -3109,7 +3111,7 @@
|
|
|
3109
3111
|
{"key":"L0123","section":"Access requests","text":"Admitted","placement":"unplaced"},
|
|
3110
3112
|
{"key":"L0124","section":"Access requests","text":"Declined","placement":"unplaced"},
|
|
3111
3113
|
{"key":"L0125","section":"Access requests","text":"Name unvouched","placement":"placed","file":"modules/hall-ui/public/watch.js","line":397,"string_id":"5e8199266a8a","occurrences":2},
|
|
3112
|
-
{"key":"L0126","section":"Access requests","text":"Asked {…}","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3114
|
+
{"key":"L0126","section":"Access requests","text":"Asked {…}","placement":"placed","file":"modules/hall-ui/public/watch.js","line":517,"string_id":"b2656d0b2402","occurrences":2},
|
|
3113
3115
|
{"key":"L0127","section":"Access requests","text":"Dismiss","placement":"unplaced","occurrences":2},
|
|
3114
3116
|
{"key":"L0128","section":"Roster","text":"Roster","placement":"unplaced"},
|
|
3115
3117
|
{"key":"L0129","section":"Roster","text":"Every builder in {{worldName}} — rank, {{currency}}, karma, and active claims.","placement":"placed","file":"modules/hall-ui/public/watch.html","line":69,"string_id":"8690c6424585"},
|
|
@@ -3122,9 +3124,9 @@
|
|
|
3122
3124
|
{"key":"L0136","section":"Roster","text":"Action","placement":"unplaced"},
|
|
3123
3125
|
{"key":"L0137","section":"Roster","text":"Offboard","placement":"unplaced","occurrences":3},
|
|
3124
3126
|
{"key":"L0138","section":"Roster","text":"stale","placement":"unplaced"},
|
|
3125
|
-
{"key":"L0139","section":"Roster","text":"That's you","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3127
|
+
{"key":"L0139","section":"Roster","text":"That's you","placement":"placed","file":"modules/hall-ui/public/watch.js","line":832,"string_id":"6e5a324b2972"},
|
|
3126
3128
|
{"key":"L0140","section":"Roster","text":"Reactivate","placement":"unplaced"},
|
|
3127
|
-
{"key":"L0141","section":"Roster","text":"Your own row carries no controls. Nobody can change their own rank or standing — that guard is what stops the last {…} locking everyone out — so another {…} does it.","placement":"placed","file":"modules/hall-ui/public/watch.js","line":
|
|
3129
|
+
{"key":"L0141","section":"Roster","text":"Your own row carries no controls. Nobody can change their own rank or standing — that guard is what stops the last {…} locking everyone out — so another {…} does it.","placement":"placed","file":"modules/hall-ui/public/watch.js","line":864,"string_id":"5e0ec4cd1cfe"},
|
|
3128
3130
|
{"key":"L0142","section":"Reviews by builder","text":"Reviews by builder","placement":"placed","file":"modules/hall-ui/public/watch.html","line":75,"string_id":"4e062d4f8d69"},
|
|
3129
3131
|
{"key":"L0143","section":"Reviews by builder","text":"How each builder's shipped work has been graded over the past thirty days.","placement":"placed","file":"modules/hall-ui/public/watch.html","line":76,"string_id":"0bab9286ea38"},
|
|
3130
3132
|
{"key":"L0144","section":"Reviews by builder","text":"Builder","placement":"unplaced"},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
-- core_266 — index the invited rows by login (task 1002969, the owner's go-ahead
|
|
2
|
+
-- on a grader finding)
|
|
3
|
+
--
|
|
4
|
+
-- access_requests had two indexes, both partial on status = 'pending' (060). Every
|
|
5
|
+
-- read of an INVITED row therefore scanned the table:
|
|
6
|
+
--
|
|
7
|
+
-- the sign-in gate hasInvitedAccessRequest / accessStateByLogin
|
|
8
|
+
-- (lower(github_login) = lower($1) AND status = 'invited')
|
|
9
|
+
-- the standing invite the onboarding routes' STANDING_INVITE_SQL: re-invite,
|
|
10
|
+
-- rescind-clears-notice, the public POST's already-approved check
|
|
11
|
+
-- the outstanding list GET /access-requests/invites (status = 'invited', windowed
|
|
12
|
+
-- by lower(github_login) since the invite expiry, ADR 0356)
|
|
13
|
+
--
|
|
14
|
+
-- Invite and approved rows are kept as history, so the scan grew with the table's
|
|
15
|
+
-- lifetime rather than with one login's rows. One partial index on the expression
|
|
16
|
+
-- every one of those reads already uses serves them all, and it stays small:
|
|
17
|
+
-- it holds invited rows only.
|
|
18
|
+
--
|
|
19
|
+
-- Additive and idempotent: an index only, no column, constraint or data. Safe to
|
|
20
|
+
-- run forward against a live database, and an older release running against it
|
|
21
|
+
-- just has an unused index. Rollback is DROP INDEX.
|
|
22
|
+
|
|
23
|
+
CREATE INDEX IF NOT EXISTS idx_access_requests_invited_login
|
|
24
|
+
ON access_requests (lower(github_login))
|
|
25
|
+
WHERE status = 'invited';
|
|
26
|
+
|
|
27
|
+
COMMENT ON INDEX idx_access_requests_invited_login IS
|
|
28
|
+
'Every read of an invited row: the sign-in gate (hasInvitedAccessRequest), the standing-invite probe, and the outstanding-invite list (ADR 0356). 060''s indexes are partial on pending and cannot serve them.';
|
|
29
|
+
|
|
30
|
+
INSERT INTO schema_migrations (version) VALUES ('core_266_access_requests_invited_login_idx')
|
|
31
|
+
ON CONFLICT DO NOTHING;
|
|
@@ -57,6 +57,9 @@ const {
|
|
|
57
57
|
// describeMembership renders a predicate in the words the proposer was thinking
|
|
58
58
|
// in ("metic and above"), for the disenfranchisement refusal (task 1003094).
|
|
59
59
|
const { describeMembership } = require('./membership-predicate');
|
|
60
|
+
// The genesis charter + legislation vocabulary (task 1004427): the real form
|
|
61
|
+
// and variable names, and the name a constitution reads as.
|
|
62
|
+
const charter = require('./charter');
|
|
60
63
|
|
|
61
64
|
// ADR 0175 §5: the completeness bar a Full Idea must clear to reach the board.
|
|
62
65
|
// Held equal to economy's IDEA_FULL_PASS_BAR by test — see the header.
|
|
@@ -812,6 +815,56 @@ async function proposeAmendment({
|
|
|
812
815
|
return { ok: true, amendment, item };
|
|
813
816
|
}
|
|
814
817
|
|
|
818
|
+
// ── the genesis charter + legislation choice (task 1004427, spec D10) ───────
|
|
819
|
+
//
|
|
820
|
+
// A founder picks a form of government (the charter stage) and fine-tunes its
|
|
821
|
+
// settings (the legislation stage). Both land HERE and nowhere else: the choice
|
|
822
|
+
// is built into a whole constitution on top of the live one (charter.js) and
|
|
823
|
+
// filed as an ordinary AMENDMENT — validated strictly, decided under the
|
|
824
|
+
// constitution in force, and applied by the close like any amendment. Under
|
|
825
|
+
// the monarchy default the founder's one yes applies it; under any other form
|
|
826
|
+
// it is a real sitting. There is no second write path to the constitution, and
|
|
827
|
+
// the disenfranchisement guard applies exactly as it does to a hand-written
|
|
828
|
+
// proposal (a founder choosing a council they do not sit on is asked to
|
|
829
|
+
// acknowledge it).
|
|
830
|
+
//
|
|
831
|
+
// Returns proposeAmendment's shape plus `reads_as` (the form the PROPOSED
|
|
832
|
+
// constitution will read as, or Custom), or a named refusal:
|
|
833
|
+
// charter.buildCharterProposal's reasons | 'unknown_council_rank' | 'no_change'
|
|
834
|
+
// | any proposeAmendment refusal.
|
|
835
|
+
async function proposeCharter({
|
|
836
|
+
form, franchise, councilRank, passRule, windowMinutes,
|
|
837
|
+
rationaleMd = null, proposedBy, acknowledgeSelfRemoval = false,
|
|
838
|
+
} = {}) {
|
|
839
|
+
const { board: live } = loadGovernmentConfig();
|
|
840
|
+
const built = charter.buildCharterProposal(live, { form, franchise, councilRank, passRule, windowMinutes });
|
|
841
|
+
if (!built.ok) return built;
|
|
842
|
+
const v = validateProposedConstitution(built.proposal);
|
|
843
|
+
if (!v.ok) return { ok: false, ...v };
|
|
844
|
+
if (proposedBy == null || proposedBy === '') return { ok: false, reason: 'missing_proposer' };
|
|
845
|
+
// A council is a custom rank, which is a DB row this module's pure half
|
|
846
|
+
// cannot see. A council that does not exist would seat nobody — fail-closed,
|
|
847
|
+
// but a sitting nobody can ever vote on — so it is refused before filing.
|
|
848
|
+
if (charter.readCharter(v.proposal).franchise === 'council') {
|
|
849
|
+
const key = v.proposal.membership.slice('rank:'.length);
|
|
850
|
+
if (!(await db.getRankByKey(key))) return { ok: false, reason: 'unknown_council_rank', rank_key: key };
|
|
851
|
+
}
|
|
852
|
+
const unchanged = ['membership', 'pass_rule', 'window_minutes', 'close_early_on_full_turnout']
|
|
853
|
+
.every((k) => v.proposal[k] === live[k]);
|
|
854
|
+
if (unchanged) return { ok: false, reason: 'no_change' };
|
|
855
|
+
|
|
856
|
+
const readsAs = charter.readCharter(v.proposal);
|
|
857
|
+
const out = await proposeAmendment({
|
|
858
|
+
proposal: v.proposal,
|
|
859
|
+
// The record says in words what was chosen, so the amendment history reads
|
|
860
|
+
// "Charter: Direct Democracy" rather than a bare JSON block.
|
|
861
|
+
rationaleMd: rationaleMd || `Charter: ${readsAs.name}. ${readsAs.explanation}`,
|
|
862
|
+
proposedBy,
|
|
863
|
+
acknowledgeSelfRemoval,
|
|
864
|
+
});
|
|
865
|
+
return out.ok ? { ...out, reads_as: readsAs } : out;
|
|
866
|
+
}
|
|
867
|
+
|
|
815
868
|
// ── the board's third subject: closing a genesis stage (task 1004429) ───────
|
|
816
869
|
//
|
|
817
870
|
// Spec decision D7 (docs/specs/bongos-v2-project-startup.md): a new project is
|
|
@@ -860,13 +913,12 @@ const stageByNumber = (n) => GENESIS_STAGES.find((s) => s.number === Number(n))
|
|
|
860
913
|
// The pass rules, said in words for the founding band. Keyed by exactly
|
|
861
914
|
// config.js PASS_RULES (held equal by tests/government_board_genesis_stage.mjs,
|
|
862
915
|
// so a fifth rule cannot land without its words); an unknown rule in an old
|
|
863
|
-
// snapshot says so rather than guessing.
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
});
|
|
916
|
+
// snapshot says so rather than guessing. The sentences are written ONCE, as the
|
|
917
|
+
// pass-rule explanations in charter.js (task 1004427), so the legislation stage
|
|
918
|
+
// and the founding band can never describe one rule two ways.
|
|
919
|
+
const PASS_RULE_WORDS = Object.freeze(Object.fromEntries(
|
|
920
|
+
charter.PASS_RULE_OPTIONS.map((o) => [o.key, o.explanation]),
|
|
921
|
+
));
|
|
870
922
|
|
|
871
923
|
// Put a finished stage to the board. Returns, never throws for a refusal:
|
|
872
924
|
// { opened: true, item, stage }
|
|
@@ -1199,6 +1251,10 @@ async function constitutionView({ historyLimit = 50 } = {}) {
|
|
|
1199
1251
|
// last passed one is not a shape this system has, and the honest failure
|
|
1200
1252
|
// there is a missed warning rather than a wrong one.
|
|
1201
1253
|
divergence: constitutionDivergence(live, history),
|
|
1254
|
+
// The genesis charter + legislation stages' payload (task 1004427): every
|
|
1255
|
+
// form and variable by its real name with its plain explanation, and the
|
|
1256
|
+
// form the constitution in force reads as (or Custom). Pure — no query.
|
|
1257
|
+
charter: charter.charterView(live),
|
|
1202
1258
|
// THE CLOCK ADVICE THE AMENDMENT FORM NEEDS (task 1003733, ADR 0267 §3).
|
|
1203
1259
|
// A proposer choosing a pass rule has to choose a window in the same breath
|
|
1204
1260
|
// — a constitution is ratified whole, never by diff — and the two choices
|
|
@@ -1338,6 +1394,7 @@ async function pendingVotesFor(builderId) {
|
|
|
1338
1394
|
module.exports = {
|
|
1339
1395
|
GENESIS_STAGES,
|
|
1340
1396
|
PASS_RULE_WORDS,
|
|
1397
|
+
proposeCharter,
|
|
1341
1398
|
openGenesisStageClose,
|
|
1342
1399
|
genesisStageStatus,
|
|
1343
1400
|
pendingVotesFor,
|