@bongos/core 1.19.683 → 1.19.684

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.683",
6
- "core_contract": "1.19.683",
7
- "source_commit": "40eeb484085efb69d5aaa3645233d23854e2bbc1",
5
+ "core_version": "1.19.684",
6
+ "core_contract": "1.19.684",
7
+ "source_commit": "3cf0cdf9f887f9b33631e0bcfb3b7290cd935b06",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-09-12T17:02:13.044Z",
9
+ "built_at": "2026-09-12T20:55:49.945Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 477,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 2626,
20
- "tree_sha256": "aa8a467c8dcd7322882229d5b60da130eb5b67e726e38a0dde2b34d2ce6bfa4a",
20
+ "tree_sha256": "dc96d8a5eb830704ee772fe1cee19ce1c4ec39575c4fafbbfe46012f5a2cd4b9",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2802,7 +2802,7 @@
2802
2802
  {
2803
2803
  "path": "docs/module-api-changelog.md",
2804
2804
  "mode": "0000644",
2805
- "sha256": "abe1e67ec7bd2d5d4bf27a2b5d8b4337fc1d4b7374c1edab6c5392016a83fde3"
2805
+ "sha256": "d441eb881efdcff2c6afedfa6d93799fdd64ac323422f12b54bf2c94df2b8d4a"
2806
2806
  },
2807
2807
  {
2808
2808
  "path": "docs/modules-contract.md",
@@ -7782,12 +7782,12 @@
7782
7782
  {
7783
7783
  "path": "package-lock.json",
7784
7784
  "mode": "0000644",
7785
- "sha256": "81888175ae0227d30c633c8f51a25936418cfdbf1d36c77bdd7c329d41d0c429"
7785
+ "sha256": "130314108dd59672172778afcb5eedb0b8d605a983329a0d0a878ce9c59fa9c9"
7786
7786
  },
7787
7787
  {
7788
7788
  "path": "package.json",
7789
7789
  "mode": "0000644",
7790
- "sha256": "b5cd5f5c6b24980f4b85986be1919f4cb2697c3ba219277d51b1ef07de72343b"
7790
+ "sha256": "d5281482b1e0da7cd0cab8f475fc71345776694e8b457b2f96d241a315902ee4"
7791
7791
  },
7792
7792
  {
7793
7793
  "path": "public-docs/index.html",
@@ -8287,7 +8287,7 @@
8287
8287
  {
8288
8288
  "path": "scripts/gds/gen-api-client.js",
8289
8289
  "mode": "0000644",
8290
- "sha256": "2d8b35709e19b339bc55c57237f2add36fa6bdeb83a9b036faa902b0c4b8e3f9"
8290
+ "sha256": "a023a19001d63b671409efe1afeae400dae96ea50debd6e3a49a7d10dffb55b0"
8291
8291
  },
8292
8292
  {
8293
8293
  "path": "scripts/gds/gen-api-docs.js",
@@ -9547,7 +9547,7 @@
9547
9547
  {
9548
9548
  "path": "src/module-api.js",
9549
9549
  "mode": "0000644",
9550
- "sha256": "2adaf10cbc0a2e65aeaa820f95b2b789c8e66c398c5f56299e9d1f52e82b86a1"
9550
+ "sha256": "927d43875de79a0923fc0997262fd7a0106c6f56626a89ed5ede0c6c74945eec"
9551
9551
  },
9552
9552
  {
9553
9553
  "path": "src/module-loader/catalog.js",
@@ -9667,7 +9667,7 @@
9667
9667
  {
9668
9668
  "path": "tests/api_client.mjs",
9669
9669
  "mode": "0000644",
9670
- "sha256": "fa360a42fa5d11b225afe1b13622f2a27fe43f2b7d0a47c2fef158bc8a11ecb6"
9670
+ "sha256": "c1563c043f34e84aa6c0eec722244b24c51dc1254750fe1a27d3664c327bacd1"
9671
9671
  },
9672
9672
  {
9673
9673
  "path": "tests/api_docs.mjs",
@@ -1825,5 +1825,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
1825
1825
  landed since 1.19.681 with no explicit bump. run 34704993368. (task 1002620)
1826
1826
  1.19.683 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1827
1827
  landed since 1.19.682 with no explicit bump. run 34706984747. (task 1002620)
1828
+ 1.19.684 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1829
+ landed since 1.19.683 with no explicit bump. run 34718471740. (task 1002620)
1828
1830
  ---------------------------------------------------------------------------
1829
1831
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.683",
3
+ "version": "1.19.684",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.683",
9
+ "version": "1.19.684",
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.683",
3
+ "version": "1.19.684",
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",
@@ -21,6 +21,7 @@
21
21
  const fs = require('node:fs');
22
22
  const path = require('node:path');
23
23
  const { resolveDocsRoot } = require('../../src/instance-config');
24
+ const { sameContent } = require('./gen-freshness'); // eol-insensitive freshness (CRLF checkouts)
24
25
 
25
26
  // The client is generated FROM the spec and lives beside it as a per-instance
26
27
  // artifact: both resolve to the DOCS root — the instance repo when a consumer
@@ -516,7 +517,15 @@ function main() {
516
517
  for (const [name, content] of Object.entries(files)) {
517
518
  const dest = path.join(OUT_DIR, name);
518
519
  const existing = fs.existsSync(dest) ? fs.readFileSync(dest, 'utf8') : null;
519
- if (existing !== content) {
520
+ // Freshness is a question about CONTENT, so compare content (task 1003844 — the
521
+ // same defect as 1003619). We render with join('\n') = LF, but a core.autocrlf
522
+ // checkout hands readFileSync back CRLF, so a byte-wise `!==` called the already
523
+ // -correct client STALE on every Windows clone, forever: regenerating writes LF,
524
+ // git restores CRLF, gate red again. Comparing via sameContent cures it for every
525
+ // file here at once, so a seventh generated file can't reintroduce it by missing
526
+ // an eol pin. A missing file reads as null, which never matches a non-empty
527
+ // render — still stale, as before.
528
+ if (!sameContent(existing, content)) {
520
529
  stale = true;
521
530
  if (!check) { fs.mkdirSync(OUT_DIR, { recursive: true }); fs.writeFileSync(dest, content); }
522
531
  }
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.683'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
74
+ const CORE_VERSION = '1.19.684'; // 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');
@@ -11,12 +11,15 @@ import { strict as assert } from 'node:assert';
11
11
  import { test } from 'node:test';
12
12
  import { createRequire } from 'node:module';
13
13
  import fs from 'node:fs';
14
+ import os from 'node:os';
14
15
  import path from 'node:path';
16
+ import { spawnSync } from 'node:child_process';
15
17
  import { fileURLToPath } from 'node:url';
16
18
  import { createClient, ApiError, API_VERSION, DEFAULT_BASE_URL } from '../clients/bongos-client/index.mjs';
17
19
 
18
20
  const require = createRequire(import.meta.url);
19
21
  const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
22
+ const { sameContent } = require(path.join(ROOT, 'scripts', 'gds', 'gen-freshness.js'));
20
23
 
21
24
  function fakeFetch(recorder, response = { ok: true, status: 200, body: { ok: true } }) {
22
25
  return async (url, init) => {
@@ -149,12 +152,21 @@ test('baseUrl:"" is honored (absolute-path passthrough for the hall fetch wrappe
149
152
  assert.deepEqual(res, { status: 200, ok: true, data: { x: 1 } });
150
153
  });
151
154
 
155
+ // The CI-gate twin of `gen-api-client.js --check`, and it carried the SAME defect
156
+ // (task 1003844): a byte-wise assert.equal against a CRLF working copy failed on
157
+ // every Windows checkout, forever — index.d.ts and README.md have no eol pin, so
158
+ // core.autocrlf hands them back CRLF while the generator renders LF. Compare with
159
+ // sameContent for the same reason gen-freshness.js exists; a real content change
160
+ // still fails, which tests/gen_freshness.mjs pins.
152
161
  test('committed client is fresh (regenerate with gen-api-client.js if this fails)', () => {
153
162
  const gen = require('../scripts/gds/gen-api-client.js');
154
163
  const { files } = gen.build();
155
164
  for (const [name, content] of Object.entries(files)) {
156
165
  const onDisk = fs.readFileSync(path.join(ROOT, 'clients/bongos-client', name), 'utf8');
157
- assert.equal(onDisk, content, `clients/bongos-client/${name} is STALE — run node scripts/gds/gen-api-client.js`);
166
+ assert.ok(
167
+ sameContent(onDisk, content),
168
+ `clients/bongos-client/${name} is STALE — run node scripts/gds/gen-api-client.js`,
169
+ );
158
170
  }
159
171
  });
160
172
 
@@ -245,3 +257,49 @@ test('browser-global build exposes window.BongosClient and shapes requests ident
245
257
  assert.equal(rec.init.headers.Authorization, 'Bearer tok');
246
258
  assert.equal(rec.init.body, JSON.stringify({ a: 1 }));
247
259
  });
260
+
261
+ // --- the --check gate itself (task 1003844) ---------------------------------
262
+ //
263
+ // The assertions above compare the client this checkout HAS, so they can only ever
264
+ // see the eol convention this checkout happens to use. The bug lived in the other
265
+ // direction: a Windows clone whose committed client is already correct was told it
266
+ // was STALE, forever. So drive the real CLI against a throwaway docs root where we
267
+ // control the line endings, and pin BOTH halves — the eol-only case must pass, and
268
+ // a genuine edit must still fail, which is what stops an over-broad "fix" (the same
269
+ // pairing tests/gen_freshness.mjs makes for the helper).
270
+ function runGen(root, args = []) {
271
+ return spawnSync(process.execPath, [path.join(ROOT, 'scripts/gds/gen-api-client.js'), ...args], {
272
+ encoding: 'utf8',
273
+ env: { ...process.env, BONGOS_INSTANCE_ROOT: root },
274
+ });
275
+ }
276
+
277
+ test('--check reads a CRLF working copy as fresh, and a real edit as stale (task 1003844)', () => {
278
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'gen-api-client-'));
279
+ try {
280
+ fs.mkdirSync(path.join(root, 'docs', 'api'), { recursive: true });
281
+ fs.copyFileSync(path.join(ROOT, 'docs/api/openapi.json'), path.join(root, 'docs/api/openapi.json'));
282
+
283
+ const wrote = runGen(root);
284
+ assert.equal(wrote.status, 0, `generator failed: ${wrote.stderr}`);
285
+
286
+ // What a core.autocrlf=true checkout hands back for the two files with no eol
287
+ // pin. Nothing about the CONTENT changed, so --check must stay quiet.
288
+ for (const name of ['index.d.ts', 'README.md']) {
289
+ const f = path.join(root, 'clients/bongos-client', name);
290
+ fs.writeFileSync(f, fs.readFileSync(f, 'utf8').replace(/\n/g, '\r\n'));
291
+ }
292
+ const fresh = runGen(root, ['--check']);
293
+ assert.equal(fresh.status, 0, `CRLF must not read as STALE — this is the bug: ${fresh.stderr}`);
294
+ assert.match(fresh.stdout, /is fresh/);
295
+
296
+ // ...and the gate is still a gate.
297
+ const target = path.join(root, 'clients/bongos-client/index.mjs');
298
+ fs.writeFileSync(target, `${fs.readFileSync(target, 'utf8')}\nexport const SMUGGLED = 1;\n`);
299
+ const stale = runGen(root, ['--check']);
300
+ assert.equal(stale.status, 2, 'a real content change must still exit 2');
301
+ assert.match(stale.stderr, /STALE/);
302
+ } finally {
303
+ fs.rmSync(root, { recursive: true, force: true });
304
+ }
305
+ });