@bongos/core 1.19.813 → 1.19.815
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 +74 -39
- package/clients/bongos-client/bongos-client.global.js +1 -1
- package/clients/bongos-client/index.cjs +1 -1
- package/clients/bongos-client/index.d.ts +2 -3
- package/clients/bongos-client/index.mjs +1 -1
- package/docs/adr/0297-a-tasks-creator-may-retire-it.md +128 -0
- package/docs/adr/README.md +1 -0
- package/docs/api/openapi.json +5 -28
- package/docs/api-reference.md +2 -2
- package/docs/canonical-permissions.md +30 -1
- package/docs/copy-inventory.md +49 -45
- package/docs/copy-registry.json +86 -50
- package/docs/module-api-changelog.md +4 -0
- package/modules/agents/lib/validate.js +1 -1
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +1 -1
- package/modules/discord/discord-channels.js +80 -5
- package/modules/discord/routes/discord.js +14 -2
- package/modules/government/catalog.js +28 -1
- package/modules/government/migrations/government_015_task_abandon_own.sql +64 -0
- package/modules/hall-ui/public/task.js +50 -1
- package/modules/ideas/inbox.js +29 -1
- package/modules/lifecycle/abandon-authz.js +132 -0
- package/modules/lifecycle/cascade.js +134 -19
- package/modules/lifecycle/db-ship.js +59 -5
- package/modules/lifecycle/routes/abandon-handler.js +151 -0
- package/modules/lifecycle/routes/lifecycle.js +18 -0
- package/modules/lifecycle/routes/tasks.js +26 -38
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/bongos/route-rank-check.js +12 -1
- package/src/module-api.js +1 -1
- package/tests/abandon_creator_authz.mjs +176 -0
- package/tests/abandon_route.mjs +276 -0
- package/tests/abandon_task.mjs +145 -3
- package/tests/agents_validate.mjs +33 -2
- package/tests/discord_channels.mjs +166 -0
- package/tests/government_ownership_scope.mjs +13 -7
- package/tests/idea_cascade.mjs +211 -0
- package/tests/task_goal_required.mjs +15 -3
package/docs/copy-registry.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"generator": "scripts/gds/copy-inventory.js",
|
|
4
4
|
"goal": 1000074,
|
|
5
5
|
"counts": {
|
|
6
|
-
"strings":
|
|
7
|
-
"unique_ids":
|
|
8
|
-
"certain":
|
|
6
|
+
"strings": 1860,
|
|
7
|
+
"unique_ids": 1614,
|
|
8
|
+
"certain": 1860,
|
|
9
9
|
"heuristic": 0,
|
|
10
10
|
"duplicate_ids": 170
|
|
11
11
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"builders-hall": {
|
|
14
14
|
"at": "modules/hall-ui/public",
|
|
15
15
|
"files": 86,
|
|
16
|
-
"strings":
|
|
16
|
+
"strings": 1370
|
|
17
17
|
},
|
|
18
18
|
"status-dashboard": {
|
|
19
19
|
"at": "modules/status-ui/public",
|
|
@@ -270,9 +270,9 @@
|
|
|
270
270
|
"occurrences": 4,
|
|
271
271
|
"at": [
|
|
272
272
|
"modules/hall-ui/public/task.js:494",
|
|
273
|
-
"modules/hall-ui/public/task.js:
|
|
274
|
-
"modules/hall-ui/public/task.js:
|
|
275
|
-
"modules/hall-ui/public/task.js:
|
|
273
|
+
"modules/hall-ui/public/task.js:530",
|
|
274
|
+
"modules/hall-ui/public/task.js:959",
|
|
275
|
+
"modules/hall-ui/public/task.js:971"
|
|
276
276
|
]
|
|
277
277
|
},
|
|
278
278
|
{
|
|
@@ -348,8 +348,8 @@
|
|
|
348
348
|
"text": "Copy prompt",
|
|
349
349
|
"occurrences": 3,
|
|
350
350
|
"at": [
|
|
351
|
-
"modules/hall-ui/public/task.js:
|
|
352
|
-
"modules/hall-ui/public/task.js:
|
|
351
|
+
"modules/hall-ui/public/task.js:791",
|
|
352
|
+
"modules/hall-ui/public/task.js:812",
|
|
353
353
|
"modules/hall-ui/public/work.js:599"
|
|
354
354
|
]
|
|
355
355
|
},
|
|
@@ -721,7 +721,7 @@
|
|
|
721
721
|
"occurrences": 2,
|
|
722
722
|
"at": [
|
|
723
723
|
"modules/hall-ui/public/project-settings.js:242",
|
|
724
|
-
"modules/hall-ui/public/task.js:
|
|
724
|
+
"modules/hall-ui/public/task.js:978"
|
|
725
725
|
]
|
|
726
726
|
},
|
|
727
727
|
{
|
|
@@ -2154,7 +2154,7 @@
|
|
|
2154
2154
|
"surface": "builders-hall",
|
|
2155
2155
|
"text": "A dependency keeps this task out of the claimable queue until that one ships. Remove one with the × beside it under “Blocked by”.",
|
|
2156
2156
|
"file": "modules/hall-ui/public/task.js",
|
|
2157
|
-
"line":
|
|
2157
|
+
"line": 607,
|
|
2158
2158
|
"origin": "js-markup",
|
|
2159
2159
|
"confidence": "certain"
|
|
2160
2160
|
},
|
|
@@ -2271,7 +2271,7 @@
|
|
|
2271
2271
|
"surface": "builders-hall",
|
|
2272
2272
|
"text": "A shipped task cannot be retired — it is immutable history now.",
|
|
2273
2273
|
"file": "modules/hall-ui/public/task.js",
|
|
2274
|
-
"line":
|
|
2274
|
+
"line": 747,
|
|
2275
2275
|
"origin": "js-markup",
|
|
2276
2276
|
"confidence": "certain"
|
|
2277
2277
|
},
|
|
@@ -2316,7 +2316,7 @@
|
|
|
2316
2316
|
"surface": "builders-hall",
|
|
2317
2317
|
"text": "A task cannot wait for itself.",
|
|
2318
2318
|
"file": "modules/hall-ui/public/task.js",
|
|
2319
|
-
"line":
|
|
2319
|
+
"line": 886,
|
|
2320
2320
|
"origin": "js-notice",
|
|
2321
2321
|
"confidence": "certain"
|
|
2322
2322
|
},
|
|
@@ -2415,7 +2415,7 @@
|
|
|
2415
2415
|
"surface": "builders-hall",
|
|
2416
2416
|
"text": "Add dependency",
|
|
2417
2417
|
"file": "modules/hall-ui/public/task.js",
|
|
2418
|
-
"line":
|
|
2418
|
+
"line": 607,
|
|
2419
2419
|
"origin": "js-markup",
|
|
2420
2420
|
"confidence": "certain"
|
|
2421
2421
|
},
|
|
@@ -2811,7 +2811,7 @@
|
|
|
2811
2811
|
"surface": "builders-hall",
|
|
2812
2812
|
"text": "Awaiting the grader, or a confirmation, before it can ship.",
|
|
2813
2813
|
"file": "modules/hall-ui/public/task.js",
|
|
2814
|
-
"line":
|
|
2814
|
+
"line": 710,
|
|
2815
2815
|
"origin": "js-markup",
|
|
2816
2816
|
"confidence": "certain"
|
|
2817
2817
|
},
|
|
@@ -3234,7 +3234,7 @@
|
|
|
3234
3234
|
"surface": "builders-hall",
|
|
3235
3235
|
"text": "Choose a goal first.",
|
|
3236
3236
|
"file": "modules/hall-ui/public/task.js",
|
|
3237
|
-
"line":
|
|
3237
|
+
"line": 934,
|
|
3238
3238
|
"origin": "js-notice",
|
|
3239
3239
|
"confidence": "certain"
|
|
3240
3240
|
},
|
|
@@ -3540,7 +3540,7 @@
|
|
|
3540
3540
|
"surface": "builders-hall",
|
|
3541
3541
|
"text": "Confirm that verification for #{…} actually passed?",
|
|
3542
3542
|
"file": "modules/hall-ui/public/task.js",
|
|
3543
|
-
"line":
|
|
3543
|
+
"line": 827,
|
|
3544
3544
|
"origin": "js-notice",
|
|
3545
3545
|
"confidence": "certain"
|
|
3546
3546
|
},
|
|
@@ -3675,7 +3675,7 @@
|
|
|
3675
3675
|
"surface": "builders-hall",
|
|
3676
3676
|
"text": "Copy prompt",
|
|
3677
3677
|
"file": "modules/hall-ui/public/task.js",
|
|
3678
|
-
"line":
|
|
3678
|
+
"line": 791,
|
|
3679
3679
|
"origin": "js-markup",
|
|
3680
3680
|
"confidence": "certain"
|
|
3681
3681
|
},
|
|
@@ -3684,7 +3684,7 @@
|
|
|
3684
3684
|
"surface": "builders-hall",
|
|
3685
3685
|
"text": "Copy prompt",
|
|
3686
3686
|
"file": "modules/hall-ui/public/task.js",
|
|
3687
|
-
"line":
|
|
3687
|
+
"line": 812,
|
|
3688
3688
|
"origin": "js-text-assign",
|
|
3689
3689
|
"confidence": "certain"
|
|
3690
3690
|
},
|
|
@@ -3918,7 +3918,7 @@
|
|
|
3918
3918
|
"surface": "builders-hall",
|
|
3919
3919
|
"text": "Could not load",
|
|
3920
3920
|
"file": "modules/hall-ui/public/task.js",
|
|
3921
|
-
"line":
|
|
3921
|
+
"line": 978,
|
|
3922
3922
|
"origin": "js-text-assign",
|
|
3923
3923
|
"confidence": "certain"
|
|
3924
3924
|
},
|
|
@@ -4062,7 +4062,7 @@
|
|
|
4062
4062
|
"surface": "builders-hall",
|
|
4063
4063
|
"text": "Could not load {…}",
|
|
4064
4064
|
"file": "modules/hall-ui/public/task.js",
|
|
4065
|
-
"line":
|
|
4065
|
+
"line": 971,
|
|
4066
4066
|
"origin": "js-markup",
|
|
4067
4067
|
"confidence": "certain"
|
|
4068
4068
|
},
|
|
@@ -4917,7 +4917,7 @@
|
|
|
4917
4917
|
"surface": "builders-hall",
|
|
4918
4918
|
"text": "Enter the id of the task this one should wait for.",
|
|
4919
4919
|
"file": "modules/hall-ui/public/task.js",
|
|
4920
|
-
"line":
|
|
4920
|
+
"line": 883,
|
|
4921
4921
|
"origin": "js-notice",
|
|
4922
4922
|
"confidence": "certain"
|
|
4923
4923
|
},
|
|
@@ -6231,7 +6231,7 @@
|
|
|
6231
6231
|
"surface": "builders-hall",
|
|
6232
6232
|
"text": "Last claimed by",
|
|
6233
6233
|
"file": "modules/hall-ui/public/task.js",
|
|
6234
|
-
"line":
|
|
6234
|
+
"line": 652,
|
|
6235
6235
|
"origin": "js-markup",
|
|
6236
6236
|
"confidence": "certain"
|
|
6237
6237
|
},
|
|
@@ -6753,7 +6753,7 @@
|
|
|
6753
6753
|
"surface": "builders-hall",
|
|
6754
6754
|
"text": "Move to goal",
|
|
6755
6755
|
"file": "modules/hall-ui/public/task.js",
|
|
6756
|
-
"line":
|
|
6756
|
+
"line": 577,
|
|
6757
6757
|
"origin": "js-markup",
|
|
6758
6758
|
"confidence": "certain"
|
|
6759
6759
|
},
|
|
@@ -7059,7 +7059,7 @@
|
|
|
7059
7059
|
"surface": "builders-hall",
|
|
7060
7060
|
"text": "No open goals in this version",
|
|
7061
7061
|
"file": "modules/hall-ui/public/task.js",
|
|
7062
|
-
"line":
|
|
7062
|
+
"line": 576,
|
|
7063
7063
|
"origin": "js-markup",
|
|
7064
7064
|
"confidence": "certain"
|
|
7065
7065
|
},
|
|
@@ -7212,7 +7212,7 @@
|
|
|
7212
7212
|
"surface": "builders-hall",
|
|
7213
7213
|
"text": "Not found",
|
|
7214
7214
|
"file": "modules/hall-ui/public/task.js",
|
|
7215
|
-
"line":
|
|
7215
|
+
"line": 966,
|
|
7216
7216
|
"origin": "js-text-assign",
|
|
7217
7217
|
"confidence": "certain"
|
|
7218
7218
|
},
|
|
@@ -7842,7 +7842,7 @@
|
|
|
7842
7842
|
"surface": "builders-hall",
|
|
7843
7843
|
"text": "Pick a priority first.",
|
|
7844
7844
|
"file": "modules/hall-ui/public/task.js",
|
|
7845
|
-
"line":
|
|
7845
|
+
"line": 868,
|
|
7846
7846
|
"origin": "js-notice",
|
|
7847
7847
|
"confidence": "certain"
|
|
7848
7848
|
},
|
|
@@ -7968,7 +7968,7 @@
|
|
|
7968
7968
|
"surface": "builders-hall",
|
|
7969
7969
|
"text": "Priority is already {…}.",
|
|
7970
7970
|
"file": "modules/hall-ui/public/task.js",
|
|
7971
|
-
"line":
|
|
7971
|
+
"line": 871,
|
|
7972
7972
|
"origin": "js-notice",
|
|
7973
7973
|
"confidence": "certain"
|
|
7974
7974
|
},
|
|
@@ -8715,7 +8715,7 @@
|
|
|
8715
8715
|
"surface": "builders-hall",
|
|
8716
8716
|
"text": "Retire task {…}? It leaves the claimable queue. Promote restores it to the backlog.",
|
|
8717
8717
|
"file": "modules/hall-ui/public/task.js",
|
|
8718
|
-
"line":
|
|
8718
|
+
"line": 921,
|
|
8719
8719
|
"origin": "js-notice",
|
|
8720
8720
|
"confidence": "certain"
|
|
8721
8721
|
},
|
|
@@ -8733,7 +8733,7 @@
|
|
|
8733
8733
|
"surface": "builders-hall",
|
|
8734
8734
|
"text": "Retire this task",
|
|
8735
8735
|
"file": "modules/hall-ui/public/task.js",
|
|
8736
|
-
"line":
|
|
8736
|
+
"line": 775,
|
|
8737
8737
|
"origin": "js-markup",
|
|
8738
8738
|
"confidence": "certain"
|
|
8739
8739
|
},
|
|
@@ -8742,7 +8742,7 @@
|
|
|
8742
8742
|
"surface": "builders-hall",
|
|
8743
8743
|
"text": "Retire this task…",
|
|
8744
8744
|
"file": "modules/hall-ui/public/task.js",
|
|
8745
|
-
"line":
|
|
8745
|
+
"line": 786,
|
|
8746
8746
|
"origin": "js-markup",
|
|
8747
8747
|
"confidence": "certain"
|
|
8748
8748
|
},
|
|
@@ -8850,7 +8850,7 @@
|
|
|
8850
8850
|
"surface": "builders-hall",
|
|
8851
8851
|
"text": "Say why it is being retired — the reason goes in the record.",
|
|
8852
8852
|
"file": "modules/hall-ui/public/task.js",
|
|
8853
|
-
"line":
|
|
8853
|
+
"line": 920,
|
|
8854
8854
|
"origin": "js-notice",
|
|
8855
8855
|
"confidence": "certain"
|
|
8856
8856
|
},
|
|
@@ -9093,7 +9093,7 @@
|
|
|
9093
9093
|
"surface": "builders-hall",
|
|
9094
9094
|
"text": "Set priority",
|
|
9095
9095
|
"file": "modules/hall-ui/public/task.js",
|
|
9096
|
-
"line":
|
|
9096
|
+
"line": 607,
|
|
9097
9097
|
"origin": "js-markup",
|
|
9098
9098
|
"confidence": "certain"
|
|
9099
9099
|
},
|
|
@@ -9174,7 +9174,7 @@
|
|
|
9174
9174
|
"surface": "builders-hall",
|
|
9175
9175
|
"text": "Ship it",
|
|
9176
9176
|
"file": "modules/hall-ui/public/task.js",
|
|
9177
|
-
"line":
|
|
9177
|
+
"line": 706,
|
|
9178
9178
|
"origin": "js-markup",
|
|
9179
9179
|
"confidence": "certain"
|
|
9180
9180
|
},
|
|
@@ -9192,7 +9192,7 @@
|
|
|
9192
9192
|
"surface": "builders-hall",
|
|
9193
9193
|
"text": "Shipped {…}{…}, {…}.",
|
|
9194
9194
|
"file": "modules/hall-ui/public/task.js",
|
|
9195
|
-
"line":
|
|
9195
|
+
"line": 687,
|
|
9196
9196
|
"origin": "js-markup",
|
|
9197
9197
|
"confidence": "certain"
|
|
9198
9198
|
},
|
|
@@ -9408,7 +9408,7 @@
|
|
|
9408
9408
|
"surface": "builders-hall",
|
|
9409
9409
|
"text": "Someone is holding a claim on this task. It has to be released before the task can be retired.",
|
|
9410
9410
|
"file": "modules/hall-ui/public/task.js",
|
|
9411
|
-
"line":
|
|
9411
|
+
"line": 749,
|
|
9412
9412
|
"origin": "js-markup",
|
|
9413
9413
|
"confidence": "certain"
|
|
9414
9414
|
},
|
|
@@ -9660,7 +9660,7 @@
|
|
|
9660
9660
|
"surface": "builders-hall",
|
|
9661
9661
|
"text": "Task {…}",
|
|
9662
9662
|
"file": "modules/hall-ui/public/task.js",
|
|
9663
|
-
"line":
|
|
9663
|
+
"line": 530,
|
|
9664
9664
|
"origin": "js-markup",
|
|
9665
9665
|
"confidence": "certain"
|
|
9666
9666
|
},
|
|
@@ -9669,7 +9669,7 @@
|
|
|
9669
9669
|
"surface": "builders-hall",
|
|
9670
9670
|
"text": "Task {…}",
|
|
9671
9671
|
"file": "modules/hall-ui/public/task.js",
|
|
9672
|
-
"line":
|
|
9672
|
+
"line": 959,
|
|
9673
9673
|
"origin": "js-markup",
|
|
9674
9674
|
"confidence": "certain"
|
|
9675
9675
|
},
|
|
@@ -9678,7 +9678,7 @@
|
|
|
9678
9678
|
"surface": "builders-hall",
|
|
9679
9679
|
"text": "Task {…}",
|
|
9680
9680
|
"file": "modules/hall-ui/public/task.js",
|
|
9681
|
-
"line":
|
|
9681
|
+
"line": 971,
|
|
9682
9682
|
"origin": "js-markup",
|
|
9683
9683
|
"confidence": "certain"
|
|
9684
9684
|
},
|
|
@@ -9714,7 +9714,7 @@
|
|
|
9714
9714
|
"surface": "builders-hall",
|
|
9715
9715
|
"text": "Tasks in the ledger are numbered separately from GitHub pull requests, so this may be a PR number rather than a task. The work board lists everything that does exist.",
|
|
9716
9716
|
"file": "modules/hall-ui/public/task.js",
|
|
9717
|
-
"line":
|
|
9717
|
+
"line": 959,
|
|
9718
9718
|
"origin": "js-markup",
|
|
9719
9719
|
"confidence": "certain"
|
|
9720
9720
|
},
|
|
@@ -10119,7 +10119,7 @@
|
|
|
10119
10119
|
"surface": "builders-hall",
|
|
10120
10120
|
"text": "The reason is recorded in the audit log. This is recoverable: a retired task can be restored to the backlog with Promote.",
|
|
10121
10121
|
"file": "modules/hall-ui/public/task.js",
|
|
10122
|
-
"line":
|
|
10122
|
+
"line": 775,
|
|
10123
10123
|
"origin": "js-markup",
|
|
10124
10124
|
"confidence": "certain"
|
|
10125
10125
|
},
|
|
@@ -10299,7 +10299,7 @@
|
|
|
10299
10299
|
"surface": "builders-hall",
|
|
10300
10300
|
"text": "The task feed did not answer. Nothing on the record has changed, only the read failed. Try again in a moment, or go back.",
|
|
10301
10301
|
"file": "modules/hall-ui/public/task.js",
|
|
10302
|
-
"line":
|
|
10302
|
+
"line": 971,
|
|
10303
10303
|
"origin": "js-markup",
|
|
10304
10304
|
"confidence": "certain"
|
|
10305
10305
|
},
|
|
@@ -10650,7 +10650,7 @@
|
|
|
10650
10650
|
"surface": "builders-hall",
|
|
10651
10651
|
"text": "This task has shipped and its credits have landed. Neither Ship it nor Confirm is available.",
|
|
10652
10652
|
"file": "modules/hall-ui/public/task.js",
|
|
10653
|
-
"line":
|
|
10653
|
+
"line": 715,
|
|
10654
10654
|
"origin": "js-markup",
|
|
10655
10655
|
"confidence": "certain"
|
|
10656
10656
|
},
|
|
@@ -10659,7 +10659,7 @@
|
|
|
10659
10659
|
"surface": "builders-hall",
|
|
10660
10660
|
"text": "This task is already retired. Promote restores it to the backlog.",
|
|
10661
10661
|
"file": "modules/hall-ui/public/task.js",
|
|
10662
|
-
"line":
|
|
10662
|
+
"line": 751,
|
|
10663
10663
|
"origin": "js-markup",
|
|
10664
10664
|
"confidence": "certain"
|
|
10665
10665
|
},
|
|
@@ -10884,7 +10884,7 @@
|
|
|
10884
10884
|
"surface": "builders-hall",
|
|
10885
10885
|
"text": "Wait for task",
|
|
10886
10886
|
"file": "modules/hall-ui/public/task.js",
|
|
10887
|
-
"line":
|
|
10887
|
+
"line": 607,
|
|
10888
10888
|
"origin": "js-markup",
|
|
10889
10889
|
"confidence": "certain"
|
|
10890
10890
|
},
|
|
@@ -11217,7 +11217,7 @@
|
|
|
11217
11217
|
"surface": "builders-hall",
|
|
11218
11218
|
"text": "Why retire this task?",
|
|
11219
11219
|
"file": "modules/hall-ui/public/task.js",
|
|
11220
|
-
"line":
|
|
11220
|
+
"line": 775,
|
|
11221
11221
|
"origin": "js-markup",
|
|
11222
11222
|
"confidence": "certain"
|
|
11223
11223
|
},
|
|
@@ -11392,6 +11392,42 @@
|
|
|
11392
11392
|
"origin": "js-notice",
|
|
11393
11393
|
"confidence": "certain"
|
|
11394
11394
|
},
|
|
11395
|
+
{
|
|
11396
|
+
"id": "bcf33947aff6",
|
|
11397
|
+
"surface": "builders-hall",
|
|
11398
|
+
"text": "You created this task and it is already retired.",
|
|
11399
|
+
"file": "modules/hall-ui/public/task.js",
|
|
11400
|
+
"line": 767,
|
|
11401
|
+
"origin": "js-markup",
|
|
11402
|
+
"confidence": "certain"
|
|
11403
|
+
},
|
|
11404
|
+
{
|
|
11405
|
+
"id": "23c68db6db4e",
|
|
11406
|
+
"surface": "builders-hall",
|
|
11407
|
+
"text": "You created this task, but it has already moved past planning. Retiring it now is a change to the record, so it needs a Metic.",
|
|
11408
|
+
"file": "modules/hall-ui/public/task.js",
|
|
11409
|
+
"line": 772,
|
|
11410
|
+
"origin": "js-markup",
|
|
11411
|
+
"confidence": "certain"
|
|
11412
|
+
},
|
|
11413
|
+
{
|
|
11414
|
+
"id": "cf0c107a39fc",
|
|
11415
|
+
"surface": "builders-hall",
|
|
11416
|
+
"text": "You created this task, but it has shipped. Shipped work is immutable history — nobody can retire it, whatever their rank.",
|
|
11417
|
+
"file": "modules/hall-ui/public/task.js",
|
|
11418
|
+
"line": 765,
|
|
11419
|
+
"origin": "js-markup",
|
|
11420
|
+
"confidence": "certain"
|
|
11421
|
+
},
|
|
11422
|
+
{
|
|
11423
|
+
"id": "b91183c02c63",
|
|
11424
|
+
"surface": "builders-hall",
|
|
11425
|
+
"text": "You created this task, but someone is holding a claim on it. Once that is released you can retire it yourself.",
|
|
11426
|
+
"file": "modules/hall-ui/public/task.js",
|
|
11427
|
+
"line": 770,
|
|
11428
|
+
"origin": "js-markup",
|
|
11429
|
+
"confidence": "certain"
|
|
11430
|
+
},
|
|
11395
11431
|
{
|
|
11396
11432
|
"id": "da274462bb30",
|
|
11397
11433
|
"surface": "builders-hall",
|
|
@@ -12126,7 +12162,7 @@
|
|
|
12126
12162
|
"surface": "builders-hall",
|
|
12127
12163
|
"text": "e.g. superseded by task 1002891",
|
|
12128
12164
|
"file": "modules/hall-ui/public/task.js",
|
|
12129
|
-
"line":
|
|
12165
|
+
"line": 775,
|
|
12130
12166
|
"origin": "js-markup",
|
|
12131
12167
|
"confidence": "certain"
|
|
12132
12168
|
},
|
|
@@ -12936,7 +12972,7 @@
|
|
|
12936
12972
|
"surface": "builders-hall",
|
|
12937
12973
|
"text": "task id",
|
|
12938
12974
|
"file": "modules/hall-ui/public/task.js",
|
|
12939
|
-
"line":
|
|
12975
|
+
"line": 607,
|
|
12940
12976
|
"origin": "js-markup",
|
|
12941
12977
|
"confidence": "certain"
|
|
12942
12978
|
},
|
|
@@ -13737,7 +13773,7 @@
|
|
|
13737
13773
|
"surface": "builders-hall",
|
|
13738
13774
|
"text": "{…}, no such task",
|
|
13739
13775
|
"file": "modules/hall-ui/public/task.js",
|
|
13740
|
-
"line":
|
|
13776
|
+
"line": 959,
|
|
13741
13777
|
"origin": "js-markup",
|
|
13742
13778
|
"confidence": "certain"
|
|
13743
13779
|
},
|
|
@@ -13782,7 +13818,7 @@
|
|
|
13782
13818
|
"surface": "builders-hall",
|
|
13783
13819
|
"text": "{…}{…} · {…}",
|
|
13784
13820
|
"file": "modules/hall-ui/public/task.js",
|
|
13785
|
-
"line":
|
|
13821
|
+
"line": 649,
|
|
13786
13822
|
"origin": "js-markup",
|
|
13787
13823
|
"confidence": "certain"
|
|
13788
13824
|
},
|
|
@@ -2100,5 +2100,9 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
2100
2100
|
landed since 1.19.811 with no explicit bump. run 35191850392. (task 1002620)
|
|
2101
2101
|
1.19.813 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2102
2102
|
landed since 1.19.812 with no explicit bump. run 35193306517. (task 1002620)
|
|
2103
|
+
1.19.814 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2104
|
+
landed since 1.19.813 with no explicit bump. run 35194334679. (task 1002620)
|
|
2105
|
+
1.19.815 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2106
|
+
landed since 1.19.814 with no explicit bump. run 35197139985. (task 1002620)
|
|
2103
2107
|
---------------------------------------------------------------------------
|
|
2104
2108
|
```
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
// The WIRED event set for v1. Widening this is a deliberate act that must land
|
|
47
47
|
// together with something that actually dispatches the new event.
|
|
48
|
-
const EVENT_CATALOG = Object.freeze(['task.shipped']);
|
|
48
|
+
const EVENT_CATALOG = Object.freeze(['task.shipped', 'idea.graded.full']);
|
|
49
49
|
|
|
50
50
|
// Mirrors agents_definitions_trigger_type_chk. 'event' consumes the catalog above;
|
|
51
51
|
// 'on-demand' is the historian shape (a builder asks, the agent answers).
|
|
@@ -898,7 +898,7 @@ function createClient(opts = {}) {
|
|
|
898
898
|
getTasksId: (args) => request("GET", "/tasks/{id}", { hasBody: false }, args),
|
|
899
899
|
// PATCH /tasks/{id} — rank: metic+archon — PATCH /tasks/:id
|
|
900
900
|
patchTasksId: (args) => request("PATCH", "/tasks/{id}", { hasBody: true }, args),
|
|
901
|
-
// POST /tasks/{id}/abandon — rank:
|
|
901
|
+
// POST /tasks/{id}/abandon — rank: any-builder — POST /tasks/:id/abandon
|
|
902
902
|
postTasksIdAbandon: (args) => request("POST", "/tasks/{id}/abandon", { hasBody: true }, args),
|
|
903
903
|
// POST /tasks/{id}/attest-gate — rank: any-builder — POST /tasks/:id/attest-gate
|
|
904
904
|
postTasksIdAttestGate: (args) => request("POST", "/tasks/{id}/attest-gate", { hasBody: true }, args),
|
|
@@ -40,7 +40,46 @@ const VIEW_CHANNEL = 1024n;
|
|
|
40
40
|
// `view: "<rank>"` grants that rank and everyone above it.
|
|
41
41
|
const RANK_LADDER = ['xenos', 'thetes', 'metic', 'archon'];
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
// WHERE channels.json LIVES (task 1003973). The layout file describes ONE
|
|
44
|
+
// guild's channels, names and topics — instance identity, which ADR 0062 §7
|
|
45
|
+
// puts on the HOST side of the core/host cut. So it is NOT published in the
|
|
46
|
+
// neutral core, and resolving it against the core package (as this module used
|
|
47
|
+
// to) means that on a deployed instance — where the module lives under
|
|
48
|
+
// node_modules/@bongos/core/modules/discord/ — the file is simply not there and
|
|
49
|
+
// every plan/apply died as a bare 500.
|
|
50
|
+
//
|
|
51
|
+
// Resolution order, first hit wins:
|
|
52
|
+
// 1. <instance root>/docs/discord/channels.json (ADR 0108's instance-root
|
|
53
|
+
// injection: <PREFIX>_INSTANCE_ROOT env, a bongos.config.json pointer, or
|
|
54
|
+
// process.cwd()) — each instance reads its OWN layout.
|
|
55
|
+
// 2. <core root>/docs/discord/channels.json — the historical path, kept so a
|
|
56
|
+
// core checkout that is not the instance root still resolves.
|
|
57
|
+
// In a single checkout (the live instance today) instance root === core root, so
|
|
58
|
+
// this is byte-identical to the old constant.
|
|
59
|
+
const CORE_CONFIG_PATH = path.resolve(__dirname, '..', '..', 'docs', 'discord', 'channels.json');
|
|
60
|
+
|
|
61
|
+
function instanceConfigPath() {
|
|
62
|
+
// Through the published doorway (ADR 0083), which is where resolveInstanceRoot
|
|
63
|
+
// lives — the same core/host resolution the government pack already uses.
|
|
64
|
+
try {
|
|
65
|
+
const root = require('../../src/module-api').resolveInstanceRoot();
|
|
66
|
+
return path.resolve(root, 'docs', 'discord', 'channels.json');
|
|
67
|
+
} catch (e) { return null; }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// The path channels.json is actually read from, or the instance-root candidate
|
|
71
|
+
// when neither exists (so the error names where the operator should put it).
|
|
72
|
+
function resolveConfigPath() {
|
|
73
|
+
const inst = instanceConfigPath();
|
|
74
|
+
for (const c of [inst, CORE_CONFIG_PATH]) {
|
|
75
|
+
if (c && fs.existsSync(c)) return c;
|
|
76
|
+
}
|
|
77
|
+
return inst || CORE_CONFIG_PATH;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Back-compat alias for the old export. Callers that want the live answer use
|
|
81
|
+
// resolveConfigPath(); this stays the core-package path it always named.
|
|
82
|
+
const CONFIG_PATH = CORE_CONFIG_PATH;
|
|
44
83
|
|
|
45
84
|
// ---------------------------------------------------------------------------
|
|
46
85
|
// PURE helpers (no Discord, no IO) — the load-bearing, fully-tested logic.
|
|
@@ -340,11 +379,41 @@ function planChannelReconcile(snapshot, config, ctx) {
|
|
|
340
379
|
// IO + Discord REST (impure) — invoked by the bot sweep and the Archon command.
|
|
341
380
|
// ---------------------------------------------------------------------------
|
|
342
381
|
|
|
343
|
-
|
|
344
|
-
|
|
382
|
+
// Throws a TAGGED error when the layout file is absent (code CONFIG_NOT_FOUND,
|
|
383
|
+
// carrying the path it looked at) so the callers below can report 'channels.json
|
|
384
|
+
// not readable at <path>' instead of collapsing into a bare 500 — the silent
|
|
385
|
+
// failure half of task 1003973.
|
|
386
|
+
function loadConfig(configPath) {
|
|
387
|
+
const p = configPath || resolveConfigPath();
|
|
388
|
+
let raw;
|
|
389
|
+
try {
|
|
390
|
+
raw = fs.readFileSync(p, 'utf8');
|
|
391
|
+
} catch (e) {
|
|
392
|
+
if (e && e.code === 'ENOENT') {
|
|
393
|
+
const err = new Error(`channels.json not readable at ${p}`);
|
|
394
|
+
err.code = 'CONFIG_NOT_FOUND';
|
|
395
|
+
err.configPath = p;
|
|
396
|
+
throw err;
|
|
397
|
+
}
|
|
398
|
+
throw e;
|
|
399
|
+
}
|
|
345
400
|
return JSON.parse(raw);
|
|
346
401
|
}
|
|
347
402
|
|
|
403
|
+
// Run a deps.loadConfig() that may be missing its file, and turn the tagged
|
|
404
|
+
// CONFIG_NOT_FOUND into the same {ok:false, reason} shape the no_guild /
|
|
405
|
+
// no_token paths already use, so every caller reports it the same way.
|
|
406
|
+
function tryLoadConfig(deps) {
|
|
407
|
+
try {
|
|
408
|
+
return { config: deps.loadConfig() };
|
|
409
|
+
} catch (err) {
|
|
410
|
+
if (err && err.code === 'CONFIG_NOT_FOUND') {
|
|
411
|
+
return { fail: { ok: false, reason: 'no_config', configPath: err.configPath, detail: err.message } };
|
|
412
|
+
}
|
|
413
|
+
throw err;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
348
417
|
// The managing bot's own user id, used to grant it an explicit VIEW overwrite on
|
|
349
418
|
// any channel it restricts so it never locks itself out. Best-effort: returns
|
|
350
419
|
// null if the client/user isn't resolvable (then the self-lockout guard is a
|
|
@@ -407,7 +476,9 @@ async function discordRest(token, method, urlPath, body) {
|
|
|
407
476
|
function computePlan(deps = realDeps) {
|
|
408
477
|
const guild = deps.getGuild();
|
|
409
478
|
if (!guild) return { ok: false, reason: 'no_guild', ops: [], warnings: [] };
|
|
410
|
-
const
|
|
479
|
+
const loaded = tryLoadConfig(deps);
|
|
480
|
+
if (loaded.fail) return { ...loaded.fail, ops: [], warnings: [] };
|
|
481
|
+
const config = loaded.config;
|
|
411
482
|
const roleMap = deps.loadRoleMap();
|
|
412
483
|
const ctx = { everyoneId: String(guild.id), roleMap, botId: botIdFromGuild(guild) };
|
|
413
484
|
const snapshot = snapshotFromGuild(guild);
|
|
@@ -435,7 +506,9 @@ async function reconcileChannels(deps = realDeps) {
|
|
|
435
506
|
const token = deps.loadBotToken();
|
|
436
507
|
if (!token) return { ok: false, reason: 'no_token', applied: 0, failed: 0 };
|
|
437
508
|
|
|
438
|
-
const
|
|
509
|
+
const loaded = tryLoadConfig(deps);
|
|
510
|
+
if (loaded.fail) return { ...loaded.fail, applied: 0, failed: 0 };
|
|
511
|
+
const config = loaded.config;
|
|
439
512
|
const roleMap = deps.loadRoleMap();
|
|
440
513
|
const ctx = { everyoneId: String(guild.id), roleMap, botId: botIdFromGuild(guild) };
|
|
441
514
|
const snapshot = snapshotFromGuild(guild);
|
|
@@ -509,11 +582,13 @@ module.exports = {
|
|
|
509
582
|
planChannelReconcile,
|
|
510
583
|
// io
|
|
511
584
|
loadConfig,
|
|
585
|
+
resolveConfigPath,
|
|
512
586
|
snapshotFromGuild,
|
|
513
587
|
computePlan,
|
|
514
588
|
computeSnapshotConfig,
|
|
515
589
|
reconcileChannels,
|
|
516
590
|
CONFIG_PATH,
|
|
591
|
+
CORE_CONFIG_PATH,
|
|
517
592
|
VIEW_CHANNEL,
|
|
518
593
|
RANK_LADDER,
|
|
519
594
|
};
|
|
@@ -79,6 +79,18 @@ function registerSeams() {
|
|
|
79
79
|
console.log('[discord] role-sync (non-blocking):', e && e.message)));
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// A !ok result from the channels module is either 'the bot is not connected'
|
|
83
|
+
// or 'the layout file is not where I looked'. The second used to surface as a
|
|
84
|
+
// bare 500 with the reason only in the server log, which made a missing
|
|
85
|
+
// channels.json indistinguishable from a bot outage (task 1003973) — so it gets
|
|
86
|
+
// its own code and names the path it tried.
|
|
87
|
+
function failFor(res, r) {
|
|
88
|
+
if (r.reason === 'no_config') {
|
|
89
|
+
return res.fail('config_not_found', 503, { reason: r.reason, detail: r.detail, config_path: r.configPath });
|
|
90
|
+
}
|
|
91
|
+
return res.fail('bot_unavailable', 503, { reason: r.reason });
|
|
92
|
+
}
|
|
93
|
+
|
|
82
94
|
module.exports = function buildDiscordRouter() {
|
|
83
95
|
registerSeams();
|
|
84
96
|
const router = express.Router();
|
|
@@ -92,7 +104,7 @@ module.exports = function buildDiscordRouter() {
|
|
|
92
104
|
const channels = require('../discord-channels');
|
|
93
105
|
const plan = channels.computePlan();
|
|
94
106
|
if (!plan.ok) {
|
|
95
|
-
return res
|
|
107
|
+
return failFor(res, plan);
|
|
96
108
|
}
|
|
97
109
|
return res.json({ ok: true, guild_id: plan.guildId, op_count: plan.ops.length, ops: plan.ops, warnings: plan.warnings });
|
|
98
110
|
} catch (err) {
|
|
@@ -131,7 +143,7 @@ module.exports = function buildDiscordRouter() {
|
|
|
131
143
|
const channels = require('../discord-channels');
|
|
132
144
|
const result = await channels.reconcileChannels();
|
|
133
145
|
if (!result.ok) {
|
|
134
|
-
return res
|
|
146
|
+
return failFor(res, result);
|
|
135
147
|
}
|
|
136
148
|
return res.json({ ok: true, applied: result.applied, failed: result.failed, total: result.total, warnings: result.warnings });
|
|
137
149
|
} catch (err) {
|