@bongos/core 1.19.983 → 1.19.984

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 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.19.983",
6
- "core_contract": "1.19.983",
7
- "source_commit": "4467844d664c49be006efc5773c4e89db5570e04",
5
+ "core_version": "1.19.984",
6
+ "core_contract": "1.19.984",
7
+ "source_commit": "b25c4e8c52129a3c0710d5f8e3c34336fbce056e",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-09-23T17:36:18.826Z",
9
+ "built_at": "2026-09-23T18:10:46.744Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 518,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 2933,
20
- "tree_sha256": "1a1bc09e1ab049a305355706c782395970ccc646d28c9520f91e300c6a19e4b7",
20
+ "tree_sha256": "859af3630cbdafa3a20f7080579d49e9b45d4b33dda7298c2484900c697b1afa",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2712,7 +2712,7 @@
2712
2712
  {
2713
2713
  "path": "docs/module-api-changelog.md",
2714
2714
  "mode": "0000644",
2715
- "sha256": "8577eca196f0ebd60e4cdc548dd0ea63f1783d0e5b4b6eba53d531632fc74332"
2715
+ "sha256": "c77d5612257b8efc9a4e87537512485f46ddde94cb2709c49d739243cd2cffb3"
2716
2716
  },
2717
2717
  {
2718
2718
  "path": "docs/modules-contract.md",
@@ -5517,7 +5517,7 @@
5517
5517
  {
5518
5518
  "path": "modules/ideas/blockers.js",
5519
5519
  "mode": "0000644",
5520
- "sha256": "d3feb342ef22f8a3952c249c7d09a2fa1c9d01ac45f4306f4084e2572df5c203"
5520
+ "sha256": "e372a43f0aeff5a83075d83d2db2733b1be6e7e28dc4631901772af82914c9a6"
5521
5521
  },
5522
5522
  {
5523
5523
  "path": "modules/ideas/completeness.js",
@@ -5637,7 +5637,7 @@
5637
5637
  {
5638
5638
  "path": "modules/ideas/routes/blockers.js",
5639
5639
  "mode": "0000644",
5640
- "sha256": "61c7692449f16ce103762d703f2eb5b0412cf1ba393d9a4d3724a14830747ab5"
5640
+ "sha256": "551b485b7d7ed9d6e8f28b0baea7154ffe9e9cee093c296a2097d585923340c7"
5641
5641
  },
5642
5642
  {
5643
5643
  "path": "modules/ideas/routes/inbox.js",
@@ -8157,12 +8157,12 @@
8157
8157
  {
8158
8158
  "path": "package-lock.json",
8159
8159
  "mode": "0000644",
8160
- "sha256": "c61ad7f26668f4a68ae527fd54d8b5b7857f585c5cc912c9d928f01a61554ba1"
8160
+ "sha256": "fcb023f6492a00c6658961aa61c4c6c45ceffc1fa44e31f247560c5da25ba172"
8161
8161
  },
8162
8162
  {
8163
8163
  "path": "package.json",
8164
8164
  "mode": "0000644",
8165
- "sha256": "5123bfe5015cba00f30ba7eb98edc983d5d3be1852fc1a7069b8ca3ce4ed5dca"
8165
+ "sha256": "bfe3f4dd5da3a4007ed4c60941597593a602a47ce324e7b037f0d4fa0e3cad99"
8166
8166
  },
8167
8167
  {
8168
8168
  "path": "public-docs/index.html",
@@ -10187,7 +10187,7 @@
10187
10187
  {
10188
10188
  "path": "src/module-api.js",
10189
10189
  "mode": "0000644",
10190
- "sha256": "dda8fe2a127133ab14ba6ce2c60dd8ad199f6fca76f0971a418759a9a5f4a959"
10190
+ "sha256": "09853cbe41b452b48612612661f45c506d9841baf8a70aefb052b9afaef79162"
10191
10191
  },
10192
10192
  {
10193
10193
  "path": "src/module-loader/catalog.js",
@@ -10692,7 +10692,7 @@
10692
10692
  {
10693
10693
  "path": "tests/blocker_detail_hydration.mjs",
10694
10694
  "mode": "0000644",
10695
- "sha256": "fac81eb7827820e9e9ad03d4024d8fd9372f6a346a6931ac0a77692805ae2d5c"
10695
+ "sha256": "23a71cf97346c258941210aab9e18cade21aa43e73f48395d8f656fddbaf2e91"
10696
10696
  },
10697
10697
  {
10698
10698
  "path": "tests/blocker_link.mjs",
@@ -2440,5 +2440,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
2440
2440
  landed since 1.19.981 with no explicit bump. run 35894422097. (task 1002620)
2441
2441
  1.19.983 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2442
2442
  landed since 1.19.982 with no explicit bump. run 35896466235. (task 1002620)
2443
+ 1.19.984 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2444
+ landed since 1.19.983 with no explicit bump. run 35900593334. (task 1002620)
2443
2445
  ---------------------------------------------------------------------------
2444
2446
  ```
@@ -18,18 +18,33 @@ const BLOCKING_TASK_IDS_SQL = `COALESCE(
18
18
  ARRAY[]::bigint[]
19
19
  ) AS blocking_task_ids`;
20
20
 
21
- async function listOpenBlockers() {
21
+ // Optional { limit, offset } pushes the page into SQL so a small slice (the Home
22
+ // attention inbox reads limit=5 on every load) never scans the whole open set
23
+ // (task 1003986). No options = the full list, as before.
24
+ async function listOpenBlockers({ limit, offset } = {}) {
25
+ const params = [];
26
+ let page = '';
27
+ if (limit != null) {
28
+ params.push(limit, offset || 0);
29
+ page = ' LIMIT $1 OFFSET $2';
30
+ }
22
31
  const { rows } = await pool.query(
23
32
  `SELECT b.id, b.title, b.body_md, b.status, b.created_at,
24
33
  b.source, b.source_ref,
25
34
  ${BLOCKING_TASK_IDS_SQL}
26
35
  FROM blockers b
27
36
  WHERE b.status = 'open'
28
- ORDER BY b.id`
37
+ ORDER BY b.id${page}`,
38
+ params
29
39
  );
30
40
  return rows;
31
41
  }
32
42
 
43
+ async function countOpenBlockers() {
44
+ const { rows } = await pool.query(`SELECT count(*)::int AS n FROM blockers WHERE status = 'open'`);
45
+ return rows[0].n;
46
+ }
47
+
33
48
  async function getBlocker(id) {
34
49
  const { rows } = await pool.query(
35
50
  `SELECT b.id, b.title, b.body_md, b.status, b.created_at, b.resolved_at, b.resolved_by,
@@ -134,6 +149,7 @@ async function linkBlockerToTask({ blockerId, taskId }) {
134
149
 
135
150
  module.exports = {
136
151
  listOpenBlockers,
152
+ countOpenBlockers,
137
153
  getBlocker,
138
154
  createBlocker,
139
155
  resolveBlocker,
@@ -41,9 +41,12 @@ module.exports = function buildBlockersRouter() {
41
41
  // project — cap it via the shared helper (was unbounded). `page` is additive
42
42
  // (readers of .blockers are unchanged); total lets a caller know to page.
43
43
  const { limit, offset } = api.parsePagination(req);
44
- const all = await blockers.listOpenBlockers();
44
+ const [rows, total] = await Promise.all([
45
+ blockers.listOpenBlockers({ limit, offset }),
46
+ blockers.countOpenBlockers(),
47
+ ]);
45
48
  res.set('Cache-Control', 'public, max-age=60');
46
- res.json({ blockers: all.slice(offset, offset + limit), page: api.pageMeta(limit, offset, all.length) });
49
+ res.json({ blockers: rows, page: api.pageMeta(limit, offset, total) });
47
50
  } catch (err) {
48
51
  console.error('[gds] GET /blockers', err);
49
52
  res.fail('list_failed', { status: 500, message: 'internal error' });
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.983",
3
+ "version": "1.19.984",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.983",
9
+ "version": "1.19.984",
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.19.983",
3
+ "version": "1.19.984",
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/src/module-api.js CHANGED
@@ -71,7 +71,7 @@ const { responsibilityFor, ROLE_RESPONSIBILITIES } = require('./role-responsibil
71
71
  // there. scripts/gds/bump-version.js still rewrites the literal below; it appends
72
72
  // the entry to that file. Look for a version's history there, not here.
73
73
  // ---------------------------------------------------------------------------
74
- const CORE_VERSION = '1.19.983'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
74
+ const CORE_VERSION = '1.19.984'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
75
75
 
76
76
  // A namespaced logger so a module's log lines are attributable + consistent.
77
77
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -124,5 +124,19 @@ await test('getBlocker still returns null for an id with no row', async () => {
124
124
  assert.equal(row, null);
125
125
  });
126
126
 
127
+ await test('listOpenBlockers({limit, offset}) pushes LIMIT/OFFSET into SQL (task 1003986)', async () => {
128
+ await blockers.listOpenBlockers({ limit: 5, offset: 10 });
129
+ const q = queries[queries.length - 1];
130
+ assert.match(q.sql, /ORDER BY b\.id LIMIT \$1 OFFSET \$2/);
131
+ assert.deepEqual(q.params, [5, 10]);
132
+ });
133
+
134
+ await test('listOpenBlockers() with no options stays unbounded', async () => {
135
+ await blockers.listOpenBlockers();
136
+ const q = queries[queries.length - 1];
137
+ assert.ok(!/LIMIT/.test(q.sql));
138
+ assert.deepEqual(q.params, []);
139
+ });
140
+
127
141
  console.log(`\n${passed} passed, ${failed} failed`);
128
142
  process.exit(failed ? 1 : 0);