@bongos/core 1.21.101 → 1.21.102

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.21.101",
6
- "core_contract": "1.21.101",
7
- "source_commit": "7858ffa1199248ca5c40837b5f21f0e8ef19d47f",
5
+ "core_version": "1.21.102",
6
+ "core_contract": "1.21.102",
7
+ "source_commit": "f552db78c82ef1ca4418a9de313e150bb29ce4b1",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-10-09T13:00:03.202Z",
9
+ "built_at": "2026-10-09T13:15:03.097Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 592,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 3640,
20
- "tree_sha256": "02e0d13b4633dbacbe287ad2057cb25994404d346b87f7f87f013d0f367ee8c2",
20
+ "tree_sha256": "834d88c63001764c8ed72f393a6c49d3d123469f268cf129a13cab0b342e5ebe",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2872,7 +2872,7 @@
2872
2872
  {
2873
2873
  "path": "docs/module-api-changelog.md",
2874
2874
  "mode": "0000644",
2875
- "sha256": "cf3cee3fb9bea331857c69de667438a0c83137849f262712af3de7172e701e26"
2875
+ "sha256": "b44e9230778cf7b2aafd8d7971fb862c00ab3c8c667da525dc83ceb6238a0908"
2876
2876
  },
2877
2877
  {
2878
2878
  "path": "docs/modules-contract.md",
@@ -10132,12 +10132,12 @@
10132
10132
  {
10133
10133
  "path": "package-lock.json",
10134
10134
  "mode": "0000644",
10135
- "sha256": "dd270ec93485ddb27786d87ba9eb34a588c39492310114df6c22efb4a99ee447"
10135
+ "sha256": "4abc8512ca8578d3a43a7d915574dc473061e2e77cd20e3902c5478af77a671f"
10136
10136
  },
10137
10137
  {
10138
10138
  "path": "package.json",
10139
10139
  "mode": "0000644",
10140
- "sha256": "888c5c97454286a61cc39bbe0c14547d92765fa057195303f3f3352410edcfa6"
10140
+ "sha256": "7b6b52ae08358107e824752af2427b6efaa33d7ea5bcf9a0b464584eef6708a5"
10141
10141
  },
10142
10142
  {
10143
10143
  "path": "public-docs/index.html",
@@ -10157,7 +10157,7 @@
10157
10157
  {
10158
10158
  "path": "release-notes.json",
10159
10159
  "mode": "0000644",
10160
- "sha256": "d1156f6a018933ff1c6f4f4481a4089ac754815318468fa5ce6bdd880105bbdb"
10160
+ "sha256": "947800c2b145b25a07f38bdfc1274ba9316de0b1bccc35e43de3ea2ddc44f7a3"
10161
10161
  },
10162
10162
  {
10163
10163
  "path": "scripts/cron/style_guide_audit.sh",
@@ -12432,7 +12432,7 @@
12432
12432
  {
12433
12433
  "path": "src/module-api.js",
12434
12434
  "mode": "0000644",
12435
- "sha256": "515c7e51fc93bf9b5fe62e46252650d733818c4e9fd6e7ab3e310fbd6593564a"
12435
+ "sha256": "090a1a041a5e03ddfd2bb4c93ff9e28407a1cb662da2492e3741450900282f44"
12436
12436
  },
12437
12437
  {
12438
12438
  "path": "src/module-loader/catalog.js",
@@ -14752,7 +14752,7 @@
14752
14752
  {
14753
14753
  "path": "tests/guilds_db.mjs",
14754
14754
  "mode": "0000644",
14755
- "sha256": "8d8847a10fb1930a1c64acd66efb372acef0e742b0b5d804a994d003759f5248"
14755
+ "sha256": "e964c8a42a1703eb4b9edb45ad16d99340fcb08c5d28b0cbc24f5e94313f5b61"
14756
14756
  },
14757
14757
  {
14758
14758
  "path": "tests/hall_approval_queue.mjs",
@@ -3039,5 +3039,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
3039
3039
  landed since 1.21.99 with no explicit bump. run 37931583687. (task 1002620)
3040
3040
  1.21.101 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3041
3041
  landed since 1.21.100 with no explicit bump. run 37933684016. (task 1002620)
3042
+ 1.21.102 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3043
+ landed since 1.21.101 with no explicit bump. run 37935415352. (task 1002620)
3042
3044
  ---------------------------------------------------------------------------
3043
3045
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.21.101",
3
+ "version": "1.21.102",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.21.101",
9
+ "version": "1.21.102",
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.101",
3
+ "version": "1.21.102",
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",
@@ -9444,5 +9444,11 @@
9444
9444
  "id": "1004582",
9445
9445
  "text": "Cleaning up a finished worktree no longer crashes on Linux and Mac machines. It used to stop halfway and leave the old workspace registered; now it removes the shortcut to the shared packages safely and carries on."
9446
9446
  }
9447
+ ],
9448
+ "1.21.102": [
9449
+ {
9450
+ "id": "1004588",
9451
+ "text": "The guilds test now sets up everything it needs on a brand-new database, so it runs all the way through instead of stopping early. It also checks, without needing a database, that its setup keeps up with the tables the guild c"
9452
+ }
9447
9453
  ]
9448
9454
  }
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.101'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
78
+ const CORE_VERSION = '1.21.102'; // 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');
@@ -28,6 +28,56 @@ const here = dirname(fileURLToPath(import.meta.url));
28
28
  const MIG_DIR = join(here, '..', 'modules', 'platform-identity', 'migrations');
29
29
  const migrationSql = (f) => readFileSync(join(MIG_DIR, f), 'utf8');
30
30
 
31
+ // The migrations this domain reads, all idempotent: accounts + consent,
32
+ // handles, privacy, terms, connections (addressing), guilds, and the stored
33
+ // guild totals getPublicGuild joins (027 — missing until task 1004588, so a
34
+ // fresh Postgres died on "relation platform_identity_guild_totals does not
35
+ // exist" before most assertions ran). 030 (engagements) is not read by guilds.js.
36
+ const SETUP_MIGRATIONS = [
37
+ 'platform_identity_001_tables.sql', 'platform_identity_007_profile_consent.sql',
38
+ 'platform_identity_008_handle.sql', 'platform_identity_012_account_privacy.sql',
39
+ 'platform_identity_015_connections.sql', 'platform_identity_019_terms_acceptance.sql',
40
+ 'platform_identity_025_guilds.sql', 'platform_identity_027_guild_totals.sql',
41
+ ];
42
+
43
+ // DB-FREE GUARD, run before the Postgres probe so it holds even where this file
44
+ // skips (task 1004588). Every platform_identity_ table guilds.js reads or
45
+ // writes — itself, plus the bodies of the functions it imports from ./guild-*
46
+ // siblings — must be CREATEd by a setup migration; otherwise a fresh DB fails
47
+ // mid-run, and a shared dev DB that already has the table hides it. Scoped to
48
+ // the imported FUNCTIONS on purpose: guild-totals.js also holds the poller,
49
+ // whose tables this test never exercises. A scan that finds nothing fails.
50
+ {
51
+ const MOD_DIR = join(here, '..', 'modules', 'platform-identity');
52
+ const guildsSrc = readFileSync(join(MOD_DIR, 'guilds.js'), 'utf8');
53
+ const sources = [['guilds.js', guildsSrc]];
54
+ const reqRe = /const\s*\{([^}]+)\}\s*=\s*require\(\s*'\.\/(guild-[a-z-]+)(?:\.js)?'\s*\)/g;
55
+ for (const [, names, file] of guildsSrc.matchAll(reqRe)) {
56
+ const src = readFileSync(join(MOD_DIR, `${file}.js`), 'utf8');
57
+ for (const name of names.split(',').map((n) => n.trim()).filter(Boolean)) {
58
+ const start = src.search(new RegExp(`\\n(?:async\\s+)?function\\s+${name}\\b`));
59
+ assert.ok(start >= 0, `guard scan found function ${name} in ${file}.js`);
60
+ const rest = src.slice(start + 1);
61
+ const end = rest.search(/\n(?:async\s+)?function\s|\nmodule\.exports/);
62
+ sources.push([`${file}.js:${name}`, end < 0 ? rest : rest.slice(0, end)]);
63
+ }
64
+ }
65
+ const used = new Set();
66
+ const useRe = /\b(?:FROM|JOIN|INTO|UPDATE)\s+(platform_identity_[a-z0-9_]+)/gi;
67
+ for (const [, src] of sources) for (const m of src.matchAll(useRe)) used.add(m[1]);
68
+ const created = new Set();
69
+ const createRe = /CREATE TABLE IF NOT EXISTS\s+(platform_identity_[a-z0-9_]+)/gi;
70
+ for (const f of SETUP_MIGRATIONS) for (const m of migrationSql(f).matchAll(createRe)) created.add(m[1]);
71
+ const scanned = sources.map(([n]) => n);
72
+ assert.ok(scanned.includes('guild-totals.js:readGuildTotals'), `guard scan followed guilds.js's imports: ${scanned.join(', ')}`);
73
+ for (const t of ['platform_identity_guilds', 'platform_identity_guild_totals']) {
74
+ assert.ok(used.has(t), `guard scan saw ${t} (found: ${[...used].join(', ')})`);
75
+ }
76
+ const missing = [...used].filter((t) => !created.has(t));
77
+ assert.deepEqual(missing, [], `SETUP_MIGRATIONS creates no table for: ${missing.join(', ')}`);
78
+ console.log(` ok setup migrations create every table guilds.js uses (${used.size} tables; ${scanned.join(' + ')})`);
79
+ }
80
+
31
81
  const pool = new Pool({ connectionString: process.env.DATABASE_URL || undefined });
32
82
  try {
33
83
  await pool.query('SELECT 1');
@@ -74,14 +124,8 @@ const openRows = async (slug, gid) => (await q(
74
124
  const pendingId = async (slug, gid) => (await openRows(slug, gid)).find((r) => r.status === 'pending')?.id;
75
125
 
76
126
  try {
77
- // The migrations this domain reads, all idempotent: accounts + consent,
78
- // handles, privacy, terms, connections (addressing), and guilds.
79
- for (const f of [
80
- 'platform_identity_001_tables.sql', 'platform_identity_007_profile_consent.sql',
81
- 'platform_identity_008_handle.sql', 'platform_identity_012_account_privacy.sql',
82
- 'platform_identity_015_connections.sql', 'platform_identity_019_terms_acceptance.sql',
83
- 'platform_identity_025_guilds.sql',
84
- ]) await q(migrationSql(f));
127
+ // The migrations this domain reads — see SETUP_MIGRATIONS above.
128
+ for (const f of SETUP_MIGRATIONS) await q(migrationSql(f));
85
129
  await q(migrationSql('platform_identity_025_guilds.sql')); // re-runnable
86
130
  await cleanup();
87
131