@bongos/core 1.19.810 → 1.19.811

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.810",
6
- "core_contract": "1.19.810",
7
- "source_commit": "a3d5dcdde5918a6ce46742502351896701a5a312",
5
+ "core_version": "1.19.811",
6
+ "core_contract": "1.19.811",
7
+ "source_commit": "8dc3b188ab249c84103920e82ce8021dc55487ed",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-09-17T06:04:48.341Z",
9
+ "built_at": "2026-09-17T06:20:04.579Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 487,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 2710,
20
- "tree_sha256": "43e8bede11fa1d3c211405b457b91c73433af719f13cf34869cd9894607688b7",
20
+ "tree_sha256": "7f3e8838baaa79070aa7705d761e9613297767dc1391cbf4f2ba0492339cd9b1",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2532,7 +2532,7 @@
2532
2532
  {
2533
2533
  "path": "docs/module-api-changelog.md",
2534
2534
  "mode": "0000644",
2535
- "sha256": "559a5a32d7f2bbdfc6059b033898244d10bba1abc6881cc9d42388d135c1a164"
2535
+ "sha256": "bb4fbb214534d6224c13b6c6aa283ca18d762fc46482842169505bb7c58d6308"
2536
2536
  },
2537
2537
  {
2538
2538
  "path": "docs/modules-contract.md",
@@ -7727,12 +7727,12 @@
7727
7727
  {
7728
7728
  "path": "package-lock.json",
7729
7729
  "mode": "0000644",
7730
- "sha256": "85db67c033657807d558c218faa46b3a94719479ca312e38fee928ea8e845d2a"
7730
+ "sha256": "d922e9276bdb8d89f5998de6f4b29dbc98d897e5a7acfc11d0ceeb2b11e89178"
7731
7731
  },
7732
7732
  {
7733
7733
  "path": "package.json",
7734
7734
  "mode": "0000644",
7735
- "sha256": "1ea12b0f66807661d162a59b47b20a2e166b5d356f88a766240c8a573cf95859"
7735
+ "sha256": "98f193e8dfee8bab41773622a373d2c19efafa8fb7bdeaf6e2c43f2032651d24"
7736
7736
  },
7737
7737
  {
7738
7738
  "path": "public-docs/index.html",
@@ -9622,7 +9622,7 @@
9622
9622
  {
9623
9623
  "path": "src/module-api.js",
9624
9624
  "mode": "0000644",
9625
- "sha256": "a73a30f63258ab08abe959da6d8f31f8428c30c5d49772350beecb72e9131b2f"
9625
+ "sha256": "7cbce9c1f2bed1a8fe7a8cff1cfee09c702ee66fa719829ff347087bf86fb7bc"
9626
9626
  },
9627
9627
  {
9628
9628
  "path": "src/module-loader/catalog.js",
@@ -10327,7 +10327,7 @@
10327
10327
  {
10328
10328
  "path": "tests/cli_exit_no_abort.mjs",
10329
10329
  "mode": "0000644",
10330
- "sha256": "9772748fe60b831b26c41eab5b12e228d89fb7231065dfbdc527e47207104e36"
10330
+ "sha256": "39b63a76b153426f486240e4c57d4fafb2b5b130fb9853c800d20d9f4e5acdde"
10331
10331
  },
10332
10332
  {
10333
10333
  "path": "tests/cli_lib_formatters.mjs",
@@ -12857,7 +12857,7 @@
12857
12857
  {
12858
12858
  "path": "tests/session_caps.mjs",
12859
12859
  "mode": "0000644",
12860
- "sha256": "72acabf6ffa1721f9b4ec7d2c8f7b1def31b7af4f7b40ac918045201a2b88b61"
12860
+ "sha256": "b08260c077dca811eec663b0f32618ef1a5e28c78a427b907f0c451ee68fc196"
12861
12861
  },
12862
12862
  {
12863
12863
  "path": "tests/session_cost.mjs",
@@ -2094,5 +2094,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
2094
2094
  landed since 1.19.808 with no explicit bump. run 35187322516. (task 1002620)
2095
2095
  1.19.810 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2096
2096
  landed since 1.19.809 with no explicit bump. run 35188253911. (task 1002620)
2097
+ 1.19.811 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2098
+ landed since 1.19.810 with no explicit bump. run 35189324772. (task 1002620)
2097
2099
  ---------------------------------------------------------------------------
2098
2100
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.810",
3
+ "version": "1.19.811",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.810",
9
+ "version": "1.19.811",
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.810",
3
+ "version": "1.19.811",
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.810'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
74
+ const CORE_VERSION = '1.19.811'; // 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');
@@ -493,3 +493,48 @@ test('main-audit.js exits 0 after a SUCCESSFUL roster request — the teardown t
493
493
  proc.kill();
494
494
  }
495
495
  });
496
+
497
+ // ---- tests/session_caps.mjs (task 1003827) ----
498
+ //
499
+ // Not a CLI, but the same abort and the same cure. It printed "9 passed, 0
500
+ // failed" and then died 127 in 4 of 6 runs on Windows + Node 24. run-unit-tests.js
501
+ // reads the exit code, so a suite that fully passed was reported FAILED in most
502
+ // local baselines — which is worse than a plain red, because it teaches builders
503
+ // that a failing name is environmental noise.
504
+ const SESSION_CAPS = path.join(ROOT, 'tests', 'session_caps.mjs');
505
+
506
+ test('session_caps.mjs exits 0 after its server teardown, repeatedly (task 1003827)', () => {
507
+ // Three runs, because the abort was NONDETERMINISTIC — a single clean run
508
+ // proved nothing before the fix and would prove nothing after a regression.
509
+ for (let i = 0; i < 3; i++) {
510
+ const r = spawnSync(process.execPath, [SESSION_CAPS], { encoding: 'utf8', timeout: 60000 });
511
+ assert.notEqual(r.signal, 'SIGTERM', `run ${i + 1} timed out — a leaked handle, which is what removing the hard exit risks`);
512
+ assert.doesNotMatch(r.stderr || '', ABORT_RE, `run ${i + 1} aborted natively:\n${r.stderr}`);
513
+ assert.equal(r.status, 0, `run ${i + 1} exited ${r.status} (127 = the abort); stderr: ${r.stderr}`);
514
+ assert.match(r.stdout || '', /0 failed/, `run ${i + 1} did not report a passing suite`);
515
+ }
516
+ });
517
+
518
+ test('session_caps.mjs sets exitCode rather than calling process.exit (task 1003827)', () => {
519
+ // The deterministic half: the behavioural test above can pass by luck on a
520
+ // platform where the race does not fire, so the shape is pinned directly.
521
+ const src = fs.readFileSync(SESSION_CAPS, 'utf8');
522
+ // Comments stripped first: the fix's own comment explains what it does NOT do
523
+ // and names the call, so a raw scan matches the prose and reds a correct file.
524
+ // (Caught by this test on its first run — the guard found its own false positive.)
525
+ const code = src.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '');
526
+ // Anti-vacuity: prove the pattern MATCHES something before trusting that it
527
+ // matches nothing here. A scanner that silently finds nothing looks identical
528
+ // to a scanner that works — and stripping comments is exactly the kind of step
529
+ // that can blank the haystack.
530
+ const HARD_EXIT = /process\.exit\s*\(/;
531
+ assert.match('process.exit(1)', HARD_EXIT, 'control: the pattern must detect a hard exit');
532
+ assert.ok(src.length > 1000, 'control: the suite was actually read');
533
+ assert.ok(code.length > src.length / 2, 'control: stripping comments did not blank the source');
534
+ assert.match(code, /server\.listen/, 'control: real code survived the strip');
535
+ assert.doesNotMatch(code, HARD_EXIT, 'session_caps.mjs must set process.exitCode and let the loop drain');
536
+ assert.match(code, /process\.exitCode\s*=/, 'and it must still report failure through the exit code');
537
+ // The other half of the cure: a hard exit MASKS leaked handles, so dropping it
538
+ // without releasing the keep-alive sockets trades the crash for a hang.
539
+ assert.match(code, /closeAllConnections/, 'sockets must be released before server.close()');
540
+ });
@@ -221,6 +221,10 @@ try {
221
221
  assert.equal(fixture.upserts.length, 0);
222
222
  });
223
223
  } finally {
224
+ // Drop keep-alive sockets BEFORE close(). fetch()'s global agent holds them
225
+ // open, and server.close() only stops new connections — it waits on the live
226
+ // ones, so without this the process would linger instead of exiting.
227
+ if (typeof server.closeAllConnections === 'function') server.closeAllConnections();
224
228
  await new Promise((resolve) => server.close(resolve));
225
229
  auth.requireBuilder = orig.requireBuilder;
226
230
  db.filterTaskIdsClaimedBy = orig.filterTaskIdsClaimedBy;
@@ -235,4 +239,15 @@ await t('the audit body cap constant is exported and sane', () => {
235
239
  });
236
240
 
237
241
  console.log(`\n${passed} passed, ${failed} failed`);
238
- process.exit(failed === 0 ? 0 : 1);
242
+ // NOT process.exit(). On Windows this suite aborted in roughly two runs of three
243
+ // — "Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c"
244
+ // — exiting 127 AFTER printing "9 passed, 0 failed", because the hard exit tore
245
+ // the loop down while fetch's handles were still closing. run-unit-tests.js reads
246
+ // the exit code, so a fully-passing suite reported FAILED in every Windows
247
+ // baseline, which trains builders to wave off real failures as environmental.
248
+ // Setting the code and letting the loop drain is the same cure scripts/gds/
249
+ // CLAUDE.md documents for the CLI scripts (cliExit) and tests/cli_exit_no_abort.mjs
250
+ // guards for api.js. The closeAllConnections() above is the other half: a hard
251
+ // exit MASKS a leaked handle, so removing it without releasing the sockets would
252
+ // have traded a crash for a hang.
253
+ process.exitCode = failed === 0 ? 0 : 1;