@bongos/core 1.21.137 → 1.21.139

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.137",
6
- "core_contract": "1.21.137",
7
- "source_commit": "c86eb51909d157098d89f465fc59e049fa7d1e58",
5
+ "core_version": "1.21.139",
6
+ "core_contract": "1.21.139",
7
+ "source_commit": "9c3b6a3669e6d8122345fde40f98189a34d6809d",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-10-16T01:50:11.654Z",
9
+ "built_at": "2026-10-16T15:50:00.989Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 608,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 3793,
20
- "tree_sha256": "8d4bf55e04fe47b2dec6621adc95f663ff1324a9e0ed6740af8800eccc2626e1",
20
+ "tree_sha256": "442b7a9383f6629ccb8a89fca8867a4ced006e1d7e334673b517e6f11c9eea5c",
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": "5ea7a7e2b29d2b955b5cd63a3e7824b8ad061869ba333d80cfcca4743a69e623"
2930
+ "sha256": "bdd801f3f3af2b93f31a37b2f2eb1b9ac3b394ab8ef980400e6aaa2ae8e5c476"
2931
2931
  },
2932
2932
  {
2933
2933
  "path": "docs/modules-contract.md",
@@ -8972,12 +8972,12 @@
8972
8972
  {
8973
8973
  "path": "modules/provisioning/tests/liveness.mjs",
8974
8974
  "mode": "0000644",
8975
- "sha256": "f4adaf4dacf05b31f7848c62fafafc3f0498e276b2f4fe4d04f18ee5b27fd969"
8975
+ "sha256": "df0d0d2a55b014921aba7095340d4faa37ef24ddc51d61b62fedb101f07ab41c"
8976
8976
  },
8977
8977
  {
8978
8978
  "path": "modules/provisioning/tests/provisioning.mjs",
8979
8979
  "mode": "0000644",
8980
- "sha256": "9e7600697815b92d96cb325a3e9a6a5771e30566cfabe08b4a9db3ee1688b29c"
8980
+ "sha256": "31d4ecf950b8fecd34d305c4744a1ac5335a009933a4a2e7ac15ad8947c874d5"
8981
8981
  },
8982
8982
  {
8983
8983
  "path": "modules/provisioning/ui/.gitkeep",
@@ -10532,12 +10532,12 @@
10532
10532
  {
10533
10533
  "path": "package-lock.json",
10534
10534
  "mode": "0000644",
10535
- "sha256": "5d3f851dfffdd8dbe16087aac434d8a61c1ea2b787fea127e96826403dab0d88"
10535
+ "sha256": "6c35ef513a1c02f3f73e27af737b43d8d444be0c810bbbab5400d408562b1d24"
10536
10536
  },
10537
10537
  {
10538
10538
  "path": "package.json",
10539
10539
  "mode": "0000644",
10540
- "sha256": "829d826c6156f982b406a867b1da02ebe7ec434bf891b9983673611665d7adba"
10540
+ "sha256": "cbb5b48ee0147aeb0e05c4cf38add512a7df4efed3b521bd3e069d99102f9cb7"
10541
10541
  },
10542
10542
  {
10543
10543
  "path": "public-docs/index.html",
@@ -10557,7 +10557,7 @@
10557
10557
  {
10558
10558
  "path": "release-notes.json",
10559
10559
  "mode": "0000644",
10560
- "sha256": "4897187dcf8923c5d1844383a8d40b2c936539fc95ed163bb5317626445a740f"
10560
+ "sha256": "8d3cfe743193bd2308275eb71e3bee00e0467d19861ea18413605f796af9ab0f"
10561
10561
  },
10562
10562
  {
10563
10563
  "path": "scripts/cron/style_guide_audit.sh",
@@ -11842,7 +11842,7 @@
11842
11842
  {
11843
11843
  "path": "scripts/gds/run-unit-tests.js",
11844
11844
  "mode": "0000644",
11845
- "sha256": "213d8e4199ab429e64d0c65f4eda42a9d0cb4c64baa1424f793e223af3e66308"
11845
+ "sha256": "d2808e1b6cb79433d4b82dba0672bf63aec48d341d9efad63f4fcd435a26112b"
11846
11846
  },
11847
11847
  {
11848
11848
  "path": "scripts/gds/runner-drift.js",
@@ -12922,7 +12922,7 @@
12922
12922
  {
12923
12923
  "path": "src/module-api.js",
12924
12924
  "mode": "0000644",
12925
- "sha256": "625f9f01ac46bee06958b614342e87158b4051716ac67e0a3b4f35117f9a300a"
12925
+ "sha256": "6751283b546731a5e4ce9df1826bc81ec8c71d7df3784b23692c38fd079bb979"
12926
12926
  },
12927
12927
  {
12928
12928
  "path": "src/module-loader/catalog.js",
@@ -3111,5 +3111,9 @@ is load-bearing: the script throws rather than guess if it is missing, and
3111
3111
  landed since 1.21.135 with no explicit bump. run 38824385358. (task 1002620)
3112
3112
  1.21.137 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3113
3113
  landed since 1.21.136 with no explicit bump. run 38837186601. (task 1002620)
3114
+ 1.21.138 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3115
+ landed since 1.21.137 with no explicit bump. run 38920999785. (task 1002620)
3116
+ 1.21.139 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3117
+ landed since 1.21.138 with no explicit bump. run 38927010049. (task 1002620)
3114
3118
  ---------------------------------------------------------------------------
3115
3119
  ```
@@ -394,10 +394,17 @@ provisioning.enqueueIntent = async (_db, id, action) => {
394
394
  return { intent: { id: 9, action, state: 'pending' }, created: true };
395
395
  };
396
396
  provisioning.recordEvent = async () => {};
397
+ // The instance read also carries the GitHub-App leg and its checklist; create looks up
398
+ // the slug first, and a "Try again" is a re-request of the row that already exists.
399
+ provisioning.getLatestOAuthManifestForInstance = async () => null;
400
+ provisioning.getInstanceBySlug = async () => (createResult ? { ...createResult.instance } : null);
401
+ require('../github-setup.js').githubSetupFacts = async () => ({});
397
402
 
398
403
  const api = require('../../../src/module-api.js');
399
404
  api.requireBuilder = (req, _res, next) => { req.builder = { id: 7, github_login: 'owner' }; next(); };
400
405
  api.requirePermission = () => (_req, _res, next) => next();
406
+ // Any read the stubs above miss fails here by name, never by dialling a real Postgres.
407
+ Object.defineProperty(api, 'pool', { value: { query: async (sql) => { throw new Error(`liveness.mjs: unstubbed query: ${sql}`); } } });
401
408
 
402
409
  const express = require('express');
403
410
  const provisioningRoutes = require('../routes/provisioning.js');
@@ -9,7 +9,6 @@
9
9
 
10
10
  import { strict as assert } from 'node:assert';
11
11
  import { createRequire } from 'node:module';
12
- import { readFileSync } from 'node:fs';
13
12
 
14
13
  const require = createRequire(import.meta.url);
15
14
  const P = require('../provisioning.js');
@@ -178,19 +177,6 @@ t('every non-dedicated shape is $0 — it co-tenants on infrastructure already p
178
177
  }
179
178
  });
180
179
 
181
- t('the estimate and the RUNNER agree on the default — they cannot import each other', () => {
182
- // provision.js sits in a generator's executed closure (tests/executed_closure.mjs
183
- // pins its size), so it cannot require this module for the constant. This pin is
184
- // what stops the two literals drifting apart again.
185
- const runner = readFileSync(new URL('../../../scripts/gds/provision.js', import.meta.url), 'utf8');
186
- const m = runner.match(/size:\s*inst\.tier\s*\|\|\s*'([^']+)'/);
187
- assert.ok(m, "provision.js no longer spells its default as `inst.tier || '<size>'` — re-pin this");
188
- assert.equal(m[1], P.DEFAULT_DEDICATED_TIER,
189
- 'the runner creates a different size than the ledger prices — the 1003692 bug, returning');
190
- assert.ok(P.DEFAULT_DEDICATED_TIER in { 's-1vcpu-1gb': 1, 's-1vcpu-2gb': 1, 's-2vcpu-2gb': 1, 's-2vcpu-4gb': 1, 's-4vcpu-8gb': 1 },
191
- 'the default tier must be one the price table knows, or the fix silently returns 0 again');
192
- });
193
-
194
180
  console.log('\nGitHub App Manifest — pure builders (task 2080, ADR 0133):');
195
181
 
196
182
  t('githubAppName prefers the DOMAIN (unique + reads on the consent screen)', () => {
@@ -309,27 +295,27 @@ await ta('recordDnsNote / clearErrorNote are NARROW single-column updates — no
309
295
  console.log('\nPer-project settings (task 1003040):');
310
296
 
311
297
  t('effectiveSettings: defaults for a bare/empty row = today\'s behavior; stored keys overlay; junk falls back', () => {
312
- assert.deepEqual(P.effectiveSettings(null), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' });
313
- assert.deepEqual(P.effectiveSettings({}), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' });
314
- assert.deepEqual(P.effectiveSettings({ settings: {} }), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' });
298
+ assert.deepEqual(P.effectiveSettings(null), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' });
299
+ assert.deepEqual(P.effectiveSettings({}), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' });
300
+ assert.deepEqual(P.effectiveSettings({ settings: {} }), { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' });
315
301
  assert.deepEqual(
316
302
  P.effectiveSettings({ settings: { platform_visibility: 'gated' } }),
317
- { platform_visibility: 'gated', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' },
303
+ { platform_visibility: 'gated', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' },
318
304
  'a stored key overlays only itself'
319
305
  );
320
306
  assert.deepEqual(
321
307
  P.effectiveSettings({ settings: { platform_visibility: 'bogus', joinability: 'invite_only', future_key: 'x', visibility: 'unlisted', join_grant: 'everything' } }),
322
- { platform_visibility: 'public', joinability: 'invite_only', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' },
308
+ { platform_visibility: 'public', joinability: 'invite_only', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' },
323
309
  'off-vocabulary values fall back to the default; unknown keys never leak out'
324
310
  );
325
311
  assert.deepEqual(P.effectiveSettings({ settings: ['not', 'an', 'object'] }),
326
- { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' }, 'a non-object settings value reads as defaults');
312
+ { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' }, 'a non-object settings value reads as defaults');
327
313
  // the join door reads back like any other policy key (task 1002324)
328
314
  assert.deepEqual(P.effectiveSettings({ settings: { visibility: 'stealth' } }),
329
- { platform_visibility: 'public', joinability: 'apply', visibility: 'stealth', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none' }, 'a stored door overlays only itself');
315
+ { platform_visibility: 'public', joinability: 'apply', visibility: 'stealth', join_grant: 'full', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' }, 'a stored door overlays only itself');
330
316
  // what a public join grants is a policy key like any other (task 1002331)
331
317
  assert.deepEqual(P.effectiveSettings({ settings: { join_grant: 'view' } }),
332
- { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'view', artist_gate: 'strict', spend_payer: 'none' }, 'the grant overlays only itself');
318
+ { platform_visibility: 'public', joinability: 'apply', visibility: 'public', join_grant: 'view', artist_gate: 'strict', spend_payer: 'none', look: 'own', night_tint: 'on' }, 'the grant overlays only itself');
333
319
  });
334
320
 
335
321
  t('SETTINGS_VOCAB / DEFAULT_SETTINGS: every default is on its own vocabulary (lockstep guard)', () => {
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.21.137",
3
+ "version": "1.21.139",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.21.137",
9
+ "version": "1.21.139",
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.137",
3
+ "version": "1.21.139",
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",
@@ -9824,5 +9824,17 @@
9824
9824
  "id": "1004746",
9825
9825
  "text": "Builders can now register, list, rename and remove a hardware security card from Settings."
9826
9826
  }
9827
+ ],
9828
+ "1.21.138": [
9829
+ {
9830
+ "id": "1004751",
9831
+ "text": "A provisioning test that had quietly been failing since August passes again, and it can no longer reach a real database by accident."
9832
+ }
9833
+ ],
9834
+ "1.21.139": [
9835
+ {
9836
+ "id": "1004752",
9837
+ "text": "Provisioning's own tests now run in the automated checks, so they can't quietly break again."
9838
+ }
9827
9839
  ]
9828
9840
  }
@@ -19,9 +19,9 @@
19
19
  // Module-owned tests (ADR 0107 / task 1768): a contributed module may ALSO ship
20
20
  // its own DB-free tests at modules/<key>/tests/*.mjs. These are discovered by
21
21
  // directory the same way the loader discovers modules/*/module.json (no
22
- // allowlist to maintain here either) and gated by isModuleEnabled(key) — a
23
- // module this instance doesn't enable contributes no tests to this gate, same
24
- // as the curated MODULE_TESTS/MODULE_DISABLED mechanism above.
22
+ // allowlist to maintain here either). main() runs every module's tests whether or
23
+ // not this instance enables it (a default:false module still ships in the repo);
24
+ // discoverModuleTests() keeps the isEnabled gate for callers that inject one.
25
25
 
26
26
  const fs = require('node:fs');
27
27
  const path = require('node:path');
@@ -534,9 +534,11 @@ function main() {
534
534
  .sort();
535
535
 
536
536
  // Module-owned tests are DB-free unit tests — only the default gate runs them.
537
+ // Run every module's tests, enabled here or not: the code ships in the repo either way, and
538
+ // a default:false module (provisioning) otherwise goes unexercised and rots unseen.
537
539
  const { included: moduleTests, skippedDisabled: moduleTestsSkipped } = integrationMode
538
540
  ? { included: [], skippedDisabled: [] }
539
- : discoverModuleTests();
541
+ : discoverModuleTests({ isEnabled: () => true });
540
542
 
541
543
  if (integrationMode) {
542
544
  console.log(`run-unit-tests --integration: ${files.length} integration-smoke test file(s) (${files.join(', ') || 'none found'}); per-test budget ${INTEGRATION_TIMEOUT_MS / 1000}s`);
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.137'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
78
+ const CORE_VERSION = '1.21.139'; // 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');