@bongos/core 1.21.166 → 1.21.167
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 +15 -15
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-readings.json +15 -15
- package/modules/hall-ui/public/brand-apply.js +3 -0
- package/modules/hall-ui/public/sky-data.js +4 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +6 -0
- package/src/module-api.js +1 -1
- package/tests/hall_sky.mjs +18 -0
- package/tests/reward_mode_surfacing.mjs +12 -0
package/.bongos-core.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"artifact": "bongos-core",
|
|
3
3
|
"manifest_schema": 1,
|
|
4
4
|
"generator": "scripts/gds/package-core.js",
|
|
5
|
-
"core_version": "1.21.
|
|
6
|
-
"core_contract": "1.21.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.21.167",
|
|
6
|
+
"core_contract": "1.21.167",
|
|
7
|
+
"source_commit": "e087b6d2f41d10e25be31761609651177061850c",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-10-23T15:
|
|
9
|
+
"built_at": "2026-10-23T15:52:17.311Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 609,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
19
|
"file_count": 3814,
|
|
20
|
-
"tree_sha256": "
|
|
20
|
+
"tree_sha256": "ec373f78af61090a42811ad9c6b71df2746b19380a6f2d07249b78f9acda118b",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/ask-for-help/SKILL.md",
|
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
{
|
|
2928
2928
|
"path": "docs/module-api-changelog.md",
|
|
2929
2929
|
"mode": "0000644",
|
|
2930
|
-
"sha256": "
|
|
2930
|
+
"sha256": "e57124018e15636bad9b69617eea091dff6a735c3726ea4d649b569edd700eca"
|
|
2931
2931
|
},
|
|
2932
2932
|
{
|
|
2933
2933
|
"path": "docs/modules-contract.md",
|
|
@@ -3017,7 +3017,7 @@
|
|
|
3017
3017
|
{
|
|
3018
3018
|
"path": "docs/page-readings.json",
|
|
3019
3019
|
"mode": "0000644",
|
|
3020
|
-
"sha256": "
|
|
3020
|
+
"sha256": "b7127988bff3e08f9e11eed84b13afb4e78a579f2d1949be20d9f6ca809555f1"
|
|
3021
3021
|
},
|
|
3022
3022
|
{
|
|
3023
3023
|
"path": "docs/project-context.template.md",
|
|
@@ -5602,7 +5602,7 @@
|
|
|
5602
5602
|
{
|
|
5603
5603
|
"path": "modules/hall-ui/public/brand-apply.js",
|
|
5604
5604
|
"mode": "0000644",
|
|
5605
|
-
"sha256": "
|
|
5605
|
+
"sha256": "0bc95cee336ca3c2f5c6666fe944100f01232c51a9f4d595ebdb410f8c514ed3"
|
|
5606
5606
|
},
|
|
5607
5607
|
{
|
|
5608
5608
|
"path": "modules/hall-ui/public/brand-holes.js",
|
|
@@ -6487,7 +6487,7 @@
|
|
|
6487
6487
|
{
|
|
6488
6488
|
"path": "modules/hall-ui/public/sky-data.js",
|
|
6489
6489
|
"mode": "0000644",
|
|
6490
|
-
"sha256": "
|
|
6490
|
+
"sha256": "7d509c43ab2d09f9b50ff588e86bab7ccdad7d28fafad023a13b1080cc745c37"
|
|
6491
6491
|
},
|
|
6492
6492
|
{
|
|
6493
6493
|
"path": "modules/hall-ui/public/sky-draw.js",
|
|
@@ -10562,12 +10562,12 @@
|
|
|
10562
10562
|
{
|
|
10563
10563
|
"path": "package-lock.json",
|
|
10564
10564
|
"mode": "0000644",
|
|
10565
|
-
"sha256": "
|
|
10565
|
+
"sha256": "a978ed0a7cb1c290424af776e7b3404428938e8ce725c5bb73620a5c35c04be5"
|
|
10566
10566
|
},
|
|
10567
10567
|
{
|
|
10568
10568
|
"path": "package.json",
|
|
10569
10569
|
"mode": "0000644",
|
|
10570
|
-
"sha256": "
|
|
10570
|
+
"sha256": "d9212427ee860ec4fe3cf81e6ddd18f7a78ba0cecb56cd4c60fed7b17760b0c9"
|
|
10571
10571
|
},
|
|
10572
10572
|
{
|
|
10573
10573
|
"path": "public-docs/index.html",
|
|
@@ -10587,7 +10587,7 @@
|
|
|
10587
10587
|
{
|
|
10588
10588
|
"path": "release-notes.json",
|
|
10589
10589
|
"mode": "0000644",
|
|
10590
|
-
"sha256": "
|
|
10590
|
+
"sha256": "eb8492bc0d110844d1ba29976a2c1f76b0d1c27b3fdb74d4057da83a22f70402"
|
|
10591
10591
|
},
|
|
10592
10592
|
{
|
|
10593
10593
|
"path": "scripts/cron/style_guide_audit.sh",
|
|
@@ -12972,7 +12972,7 @@
|
|
|
12972
12972
|
{
|
|
12973
12973
|
"path": "src/module-api.js",
|
|
12974
12974
|
"mode": "0000644",
|
|
12975
|
-
"sha256": "
|
|
12975
|
+
"sha256": "0c289c783bbe51aeacd424697726e7fd832da322852670fba91a3235d06fab4c"
|
|
12976
12976
|
},
|
|
12977
12977
|
{
|
|
12978
12978
|
"path": "src/module-loader/catalog.js",
|
|
@@ -15662,7 +15662,7 @@
|
|
|
15662
15662
|
{
|
|
15663
15663
|
"path": "tests/hall_sky.mjs",
|
|
15664
15664
|
"mode": "0000644",
|
|
15665
|
-
"sha256": "
|
|
15665
|
+
"sha256": "9a7eaea562272b7e06e07ac4251ee15aa4aeaa24180bc711c2dae4dd8a56fd8f"
|
|
15666
15666
|
},
|
|
15667
15667
|
{
|
|
15668
15668
|
"path": "tests/hall_states_regex_escapes.mjs",
|
|
@@ -17802,7 +17802,7 @@
|
|
|
17802
17802
|
{
|
|
17803
17803
|
"path": "tests/reward_mode_surfacing.mjs",
|
|
17804
17804
|
"mode": "0000644",
|
|
17805
|
-
"sha256": "
|
|
17805
|
+
"sha256": "ed3538eb724a939eeb0619d3b61e5bf1b8ac4f389030fb4551c3045840018300"
|
|
17806
17806
|
},
|
|
17807
17807
|
{
|
|
17808
17808
|
"path": "tests/role_responsibilities.mjs",
|
|
@@ -3169,5 +3169,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
3169
3169
|
landed since 1.21.164 with no explicit bump. run 39975834637. (task 1002620)
|
|
3170
3170
|
1.21.166 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
3171
3171
|
landed since 1.21.165 with no explicit bump. run 39979397040. (task 1002620)
|
|
3172
|
+
1.21.167 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
3173
|
+
landed since 1.21.166 with no explicit bump. run 39981870842. (task 1002620)
|
|
3172
3174
|
---------------------------------------------------------------------------
|
|
3173
3175
|
```
|
package/docs/page-readings.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"surface": "builders",
|
|
51
51
|
"title": "Blockers",
|
|
52
52
|
"states_read": ["default"],
|
|
53
|
-
"files_hash": "
|
|
53
|
+
"files_hash": "be570fb08f33cde4",
|
|
54
54
|
"reading_hash": "2b3fd98b7ba1bff6",
|
|
55
55
|
"counts": {"lines":28,"placed":12,"shared":8,"unplaced":8},
|
|
56
56
|
"omitted": {"data":9},
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
"surface": "builders",
|
|
1142
1142
|
"title": "The sky",
|
|
1143
1143
|
"states_read": ["tour","sky","wells","ledger","full","full-back","out"],
|
|
1144
|
-
"files_hash": "
|
|
1144
|
+
"files_hash": "2dce7dcbe58dcf5d",
|
|
1145
1145
|
"reading_hash": "b83eb8c92a23fd3c",
|
|
1146
1146
|
"counts": {"lines":47,"placed":23,"shared":7,"unplaced":17},
|
|
1147
1147
|
"omitted": {"data":8},
|
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
"surface": "builders",
|
|
1202
1202
|
"title": "Goals",
|
|
1203
1203
|
"states_read": ["list","filters","cards","detail","dependencies","out","uat","uat-panel","author"],
|
|
1204
|
-
"files_hash": "
|
|
1204
|
+
"files_hash": "ca38b540196d951b",
|
|
1205
1205
|
"reading_hash": "7aa1a6e1946dc077",
|
|
1206
1206
|
"counts": {"lines":156,"placed":52,"shared":8,"unplaced":96},
|
|
1207
1207
|
"omitted": {"data":268},
|
|
@@ -1326,7 +1326,7 @@
|
|
|
1326
1326
|
{"key":"L0117","section":"Goals","text":"Version","placement":"unplaced"},
|
|
1327
1327
|
{"key":"L0118","section":"Goals","text":"— any —","placement":"placed","file":"modules/hall-ui/public/hall-widgets.js","line":173,"string_id":"729d4ce22b99","occurrences":2},
|
|
1328
1328
|
{"key":"L0119","section":"Goals","text":"Status","placement":"unplaced"},
|
|
1329
|
-
{"key":"L0120","section":"Goals","text":"open","placement":"placed","file":"modules/hall-ui/public/approval-queue.js","line":
|
|
1329
|
+
{"key":"L0120","section":"Goals","text":"open","placement":"placed","file":"modules/hall-ui/public/approval-queue.js","line":164,"string_id":"9a803563c948","occurrences":16},
|
|
1330
1330
|
{"key":"L0121","section":"Goals","text":"Sort","placement":"unplaced"},
|
|
1331
1331
|
{"key":"L0122","section":"Goals","text":"priority (version order)","placement":"unplaced"},
|
|
1332
1332
|
{"key":"L0123","section":"Goals","text":"newest first","placement":"unplaced"},
|
|
@@ -1439,7 +1439,7 @@
|
|
|
1439
1439
|
"surface": "builders",
|
|
1440
1440
|
"title": "Builders' Hall",
|
|
1441
1441
|
"states_read": ["home","standing","standing-karma","out","founding","genesis","decide","demo"],
|
|
1442
|
-
"files_hash": "
|
|
1442
|
+
"files_hash": "eb1e8c3a4621add8",
|
|
1443
1443
|
"reading_hash": "42dbab4f3948fe66",
|
|
1444
1444
|
"counts": {"lines":117,"placed":63,"shared":10,"unplaced":44},
|
|
1445
1445
|
"omitted": {"data":101},
|
|
@@ -1569,7 +1569,7 @@
|
|
|
1569
1569
|
"surface": "builders",
|
|
1570
1570
|
"title": "Idea",
|
|
1571
1571
|
"states_read": ["record","missing"],
|
|
1572
|
-
"files_hash": "
|
|
1572
|
+
"files_hash": "5b7084faad7f4ded",
|
|
1573
1573
|
"reading_hash": "c9f9a84ab844c704",
|
|
1574
1574
|
"counts": {"lines":52,"placed":23,"shared":9,"unplaced":20},
|
|
1575
1575
|
"omitted": {"data":18},
|
|
@@ -1609,7 +1609,7 @@
|
|
|
1609
1609
|
{"key":"L0032","section":"Everything that fell out of it","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232","state":"missing"},
|
|
1610
1610
|
{"key":"L0033","section":"footer","text":"Sign out","placement":"shared","file":"modules/hall-ui/public/shell.js","line":520,"string_id":"1883ad7f07fc","state":"missing","occurrences":2},
|
|
1611
1611
|
{"key":"L0034","section":"Everything that fell out of it","text":"Builders hall · this session","placement":"placed","file":"modules/hall-ui/public/craft-mode.js","line":674,"string_id":"fd1903586e8e","state":"missing"},
|
|
1612
|
-
{"key":"L0035","section":"12A changelog every builder can read","text":"open","placement":"placed","file":"modules/hall-ui/public/approval-queue.js","line":
|
|
1612
|
+
{"key":"L0035","section":"12A changelog every builder can read","text":"open","placement":"placed","file":"modules/hall-ui/public/approval-queue.js","line":164,"string_id":"9a803563c948"},
|
|
1613
1613
|
{"key":"L0036","section":"12A changelog every builder can read","text":"had the thought · {…}","placement":"unplaced"},
|
|
1614
1614
|
{"key":"L0037","section":"12A changelog every builder can read","text":"{…}/100 complete","placement":"placed","file":"modules/hall-ui/public/idea.js","line":87,"string_id":"c43050b62297"},
|
|
1615
1615
|
{"key":"L0038","section":"12A changelog every builder can read","text":"{…} and {…}","placement":"placed","file":"modules/hall-ui/public/profile-nudge.js","line":77,"string_id":"56b00d773232","occurrences":4},
|
|
@@ -1719,7 +1719,7 @@
|
|
|
1719
1719
|
"surface": "builders",
|
|
1720
1720
|
"title": "Modules",
|
|
1721
1721
|
"states_read": ["browse","search-empty","lens","details","out"],
|
|
1722
|
-
"files_hash": "
|
|
1722
|
+
"files_hash": "ce529d9f575606e5",
|
|
1723
1723
|
"reading_hash": "a17f501b72321b7b",
|
|
1724
1724
|
"counts": {"lines":62,"placed":29,"shared":8,"unplaced":25},
|
|
1725
1725
|
"omitted": {"data":106},
|
|
@@ -2325,7 +2325,7 @@
|
|
|
2325
2325
|
"surface": "builders",
|
|
2326
2326
|
"title": "Profile",
|
|
2327
2327
|
"states_read": ["own","works","activity","activity-artist","activity-ideator","other","artist","ideator","out"],
|
|
2328
|
-
"files_hash": "
|
|
2328
|
+
"files_hash": "deca408267a32df9",
|
|
2329
2329
|
"reading_hash": "8088d60a4e93bb91",
|
|
2330
2330
|
"counts": {"lines":196,"placed":70,"shared":8,"unplaced":118},
|
|
2331
2331
|
"omitted": {"data":197},
|
|
@@ -2721,7 +2721,7 @@
|
|
|
2721
2721
|
"surface": "builders",
|
|
2722
2722
|
"title": "Builders",
|
|
2723
2723
|
"states_read": ["roster","artists","search","out"],
|
|
2724
|
-
"files_hash": "
|
|
2724
|
+
"files_hash": "38086c3c20a8cd6d",
|
|
2725
2725
|
"reading_hash": "5c7e507e9600e59c",
|
|
2726
2726
|
"counts": {"lines":47,"placed":13,"shared":8,"unplaced":26},
|
|
2727
2727
|
"omitted": {"data":60},
|
|
@@ -2781,7 +2781,7 @@
|
|
|
2781
2781
|
"surface": "builders",
|
|
2782
2782
|
"title": "Sessions",
|
|
2783
2783
|
"states_read": ["ledger","out"],
|
|
2784
|
-
"files_hash": "
|
|
2784
|
+
"files_hash": "b5f59d12801a60d9",
|
|
2785
2785
|
"reading_hash": "5c18aaed7f2e8e0f",
|
|
2786
2786
|
"counts": {"lines":331,"placed":21,"shared":8,"unplaced":302},
|
|
2787
2787
|
"omitted": {"data":303},
|
|
@@ -4021,7 +4021,7 @@
|
|
|
4021
4021
|
"surface": "builders",
|
|
4022
4022
|
"title": "Task",
|
|
4023
4023
|
"states_read": ["record","from-goal","missing"],
|
|
4024
|
-
"files_hash": "
|
|
4024
|
+
"files_hash": "8200eeef7a793659",
|
|
4025
4025
|
"reading_hash": "3e80d092af1d7e2c",
|
|
4026
4026
|
"counts": {"lines":132,"placed":35,"shared":10,"unplaced":87},
|
|
4027
4027
|
"omitted": {"data":75},
|
|
@@ -4166,7 +4166,7 @@
|
|
|
4166
4166
|
"surface": "builders",
|
|
4167
4167
|
"title": "Your thinking",
|
|
4168
4168
|
"states_read": ["tour","sky","list","simple","full-idea","full","full-list","full-back","out"],
|
|
4169
|
-
"files_hash": "
|
|
4169
|
+
"files_hash": "f8061c0641b23730",
|
|
4170
4170
|
"reading_hash": "532805c03c3a8a4c",
|
|
4171
4171
|
"counts": {"lines":48,"placed":23,"shared":7,"unplaced":18},
|
|
4172
4172
|
"omitted": {"data":8},
|
|
@@ -4263,7 +4263,7 @@
|
|
|
4263
4263
|
"surface": "builders",
|
|
4264
4264
|
"title": "Watch",
|
|
4265
4265
|
"states_read": ["board","out","operations","security"],
|
|
4266
|
-
"files_hash": "
|
|
4266
|
+
"files_hash": "c3baec6343c9867a",
|
|
4267
4267
|
"reading_hash": "d698ac62c904aa65",
|
|
4268
4268
|
"counts": {"lines":88,"placed":38,"shared":8,"unplaced":42},
|
|
4269
4269
|
"omitted": {"data":166},
|
|
@@ -4364,7 +4364,7 @@
|
|
|
4364
4364
|
"surface": "builders",
|
|
4365
4365
|
"title": "Tasks",
|
|
4366
4366
|
"states_read": ["ready","in-progress","backlog","completed","filters-open","out","founding"],
|
|
4367
|
-
"files_hash": "
|
|
4367
|
+
"files_hash": "2c4ec39162b32427",
|
|
4368
4368
|
"reading_hash": "a425c7a090d8bf03",
|
|
4369
4369
|
"counts": {"lines":125,"placed":54,"shared":8,"unplaced":63},
|
|
4370
4370
|
"omitted": {"data":316},
|
|
@@ -100,8 +100,11 @@
|
|
|
100
100
|
var s = task && task.status;
|
|
101
101
|
return s === 'confirmed' || s === 'shipped';
|
|
102
102
|
}
|
|
103
|
+
// task 1004782 — an abandoned (or merged-away) task earns nothing and is
|
|
104
|
+
// owed nothing, so it is worth 0 wherever a total adds it up.
|
|
103
105
|
function taskCreditValue(task) {
|
|
104
106
|
if (!task) return null;
|
|
107
|
+
if (task.status === 'abandoned' || task.merged_into_task_id != null) return 0;
|
|
105
108
|
if (taskSettled(task)) {
|
|
106
109
|
var awarded = Number(task.credits_awarded);
|
|
107
110
|
// Settled with a real ledger payout → show it. If a settled task has no
|
|
@@ -147,7 +147,10 @@
|
|
|
147
147
|
id: String(g.goal_id), title: g.title || 'A private goal', subtitle: g.subtitle || null, version: g.version_id, status: g.status,
|
|
148
148
|
taskTotal: Number(g.task_total) || 0, taskDone: Number(g.task_done) || 0, createdAt: g.created_at || null,
|
|
149
149
|
crit: (g.criteria || []).map((c) => ({ id: String(c.id), text: c.criterion_md || '', satisfied: c.satisfied === true, tasks: (c.task_ids || []).map(String), pendingReview: c.pending_review === true, uat: c.uat_state || null, uatLabel: uatLabel(c.uat_state), backendOnly: c.backend_only === true })),
|
|
150
|
-
|
|
150
|
+
// task 1004782 — abandoned (or merged-away) work carries no credits: it is listed, at zero, and never adds to a
|
|
151
|
+
// well's mass or a ring. A merged-away task is always abandoned (tasks.merged_into_task_id is CHECK-constrained to
|
|
152
|
+
// abandoned rows), so the status test covers both; /sky does not send the pointer.
|
|
153
|
+
tasks: (g.tasks || []).map((t) => ({ id: String(t.id), title: t.title || 'a task', status: t.status, credits: t.status === 'abandoned' || t.credits_reward == null ? 0 : Number(t.credits_reward), createdAt: t.created_on || null, sourceRef: t.idea_id != null ? String(t.idea_id) : null })),
|
|
151
154
|
};
|
|
152
155
|
}
|
|
153
156
|
const taskRow = (t) => ({ id: String(t.task_id ?? t.id), title: t.title || 'a task', status: t.status, goalId: t.goal_id != null ? String(t.goal_id) : null, origin: t.origin || null });
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.167",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bongos/core",
|
|
9
|
-
"version": "1.21.
|
|
9
|
+
"version": "1.21.167",
|
|
10
10
|
"license": "AGPL-3.0-or-later",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"express": "^4.21.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.167",
|
|
4
4
|
"description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"main": "src/platform-server.js",
|
package/release-notes.json
CHANGED
|
@@ -10050,5 +10050,11 @@
|
|
|
10050
10050
|
"id": "1004786",
|
|
10051
10051
|
"text": "Settings no longer shows a broken image-generation key card on projects without the art tools. Before, builders were told their free art coverage had ended and to add a key, but the card could never load, so there was nowhere"
|
|
10052
10052
|
}
|
|
10053
|
+
],
|
|
10054
|
+
"1.21.167": [
|
|
10055
|
+
{
|
|
10056
|
+
"id": "1004782",
|
|
10057
|
+
"text": "Goals no longer count abandoned work in their credit totals. Will goal drops by 241 credits of dropped tasks; across the project about 20,000 credits of abandoned estimates stop inflating goal sizes in the sky map and goal pag"
|
|
10058
|
+
}
|
|
10053
10059
|
]
|
|
10054
10060
|
}
|
package/src/module-api.js
CHANGED
|
@@ -75,7 +75,7 @@ const { responsibilityFor, ROLE_RESPONSIBILITIES } = require('./role-responsibil
|
|
|
75
75
|
// MAJOR (see allowBoxScope below): passes the request through untouched.
|
|
76
76
|
function deprecatedNoopMiddleware(_req, _res, next) { next(); }
|
|
77
77
|
|
|
78
|
-
const CORE_VERSION = '1.21.
|
|
78
|
+
const CORE_VERSION = '1.21.167'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
|
|
79
79
|
|
|
80
80
|
// A namespaced logger so a module's log lines are attributable + consistent.
|
|
81
81
|
// Usage: const log = api.logger('discord'); log.info('mounted');
|
package/tests/hall_sky.mjs
CHANGED
|
@@ -216,6 +216,24 @@ await test('the rings are the criteria, closing as each is satisfied and thick w
|
|
|
216
216
|
assert.equal(g.tasks.find((t) => t.id === '500').sourceRef, '10', 'and which thought it was born of');
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
+
await test('abandoned work is listed at zero and adds nothing to a well or its ring (task 1004782)', async () => {
|
|
220
|
+
const base = well();
|
|
221
|
+
const p = await boot({ sky: sky([well({
|
|
222
|
+
criteria: [{ ...base.criteria[0], task_ids: ['500', '504'] }, { ...base.criteria[1], task_ids: ['501', '502', '503'] }],
|
|
223
|
+
tasks: [
|
|
224
|
+
...base.tasks,
|
|
225
|
+
{ id: '503', title: 'A dropped task', status: 'abandoned', credits_reward: 500, created_on: '2026-08-03', idea_id: null },
|
|
226
|
+
// merged away: the DB only allows merged_into_task_id on an abandoned row, so this is its whole shape
|
|
227
|
+
{ id: '504', title: 'A task folded into 500', status: 'abandoned', merged_into_task_id: '500', credits_reward: 90, created_on: '2026-08-04', idea_id: null },
|
|
228
|
+
],
|
|
229
|
+
})]) });
|
|
230
|
+
const g = p.S().goalById.get('7');
|
|
231
|
+
assert.equal(g.tasks.find((t) => t.id === '503').credits, 0, 'still listed, at zero');
|
|
232
|
+
assert.equal(g.tasks.find((t) => t.id === '504').credits, 0, 'a merged-away task is listed at zero too');
|
|
233
|
+
assert.equal(g.credits, 130, 'the well\'s mass is the live work only (60 + 40 + 30)');
|
|
234
|
+
same(g.crit.map((c) => c.credits), [60, 70], 'and the ring it sat on is not thickened by it');
|
|
235
|
+
});
|
|
236
|
+
|
|
219
237
|
await test('a private goal keeps its structure and none of its prose', async () => {
|
|
220
238
|
const p = await boot({ sky: sky([well({ goal_id: '8', title: null, subtitle: null, criteria: [{ id: '80', criterion_id: 'c1', criterion_md: null, satisfied: false, pending_review: false, task_ids: [] }], tasks: [{ id: '800', title: null, status: 'ready', credits_reward: 10, created_on: '2026-08-01', idea_id: null }] })]) });
|
|
221
239
|
const g = p.S().goalById.get('8');
|
|
@@ -164,5 +164,17 @@ test('hall: the tooltip names the mode and what actually pays', () => {
|
|
|
164
164
|
assert.match(note, /guide, not a payout/i);
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
+
// task 1004782 — abandoned and merged-away tasks are worth 0 wherever a total
|
|
168
|
+
// adds them up, on every reward mode.
|
|
169
|
+
test('hall: an abandoned or merged-away task is worth 0, whatever its estimate', () => {
|
|
170
|
+
for (const mode of [CPO, PAYS, undefined]) {
|
|
171
|
+
const B = loadBrandApply(mode);
|
|
172
|
+
assert.equal(B.taskCreditValue({ status: 'abandoned', credits_reward: 60 }), 0);
|
|
173
|
+
assert.equal(B.taskCreditValue({ status: 'abandoned', credits_reward: 60, credits_awarded: 12 }), 0);
|
|
174
|
+
assert.equal(B.taskCreditValue({ status: 'ready', credits_reward: 60, merged_into_task_id: 9 }), 0);
|
|
175
|
+
assert.equal(B.taskCreditValue(READY_TASK), 60, 'live work keeps its value');
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
167
179
|
console.log(`\nreward_mode_surfacing: ${passed} passed, ${failed} failed`);
|
|
168
180
|
process.exit(failed ? 1 : 0);
|