@bongos/core 1.19.775 → 1.19.776

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.775",
6
- "core_contract": "1.19.775",
7
- "source_commit": "02a65922112e4360b309af219912dfbaae134134",
5
+ "core_version": "1.19.776",
6
+ "core_contract": "1.19.776",
7
+ "source_commit": "c0b7c8b7cbf3c7bc785585da449da6ea57197c32",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-09-16T18:20:46.880Z",
9
+ "built_at": "2026-09-16T18:38:32.418Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 486,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 2662,
20
- "tree_sha256": "98ff660bb87b9156a0e2535a91c5edf19a13b27736ca5c2a95982ce6e64f0ba4",
20
+ "tree_sha256": "c7dff0b9c97a50075315c645e421fe4fac5bfa6d21bf5c6cdfaea55e04dccd5c",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -1957,7 +1957,7 @@
1957
1957
  {
1958
1958
  "path": "docs/adr/0290-disconnect-is-the-owner-initiated-exception-to-address-retention.md",
1959
1959
  "mode": "0000644",
1960
- "sha256": "a9558eccfabc69b85388c0aa7e7f1604d9dd7fa946c1761155cb8077d4c58d72"
1960
+ "sha256": "37ab80018f5d9e6fdb35271be80ca07f10e6e593ef33b9a7a0a30fe9ea8c5fb3"
1961
1961
  },
1962
1962
  {
1963
1963
  "path": "docs/adr/README.md",
@@ -2527,7 +2527,7 @@
2527
2527
  {
2528
2528
  "path": "docs/module-api-changelog.md",
2529
2529
  "mode": "0000644",
2530
- "sha256": "0868d9c27813842952237812a33990e846e6d8019be740290ee1ac49f3b19e0a"
2530
+ "sha256": "7112a78b80e84df9950cdde4bc399b4c82f54138c044c1291b37c884def9f5f0"
2531
2531
  },
2532
2532
  {
2533
2533
  "path": "docs/modules-contract.md",
@@ -7627,12 +7627,12 @@
7627
7627
  {
7628
7628
  "path": "package-lock.json",
7629
7629
  "mode": "0000644",
7630
- "sha256": "6be6f24971120806165359b15deb4042a43de963b54a09c1c25108383a11197c"
7630
+ "sha256": "02c6bd2ec2e4afdc61d69e399a42ee98e762d908c69a3b84c9d27e8823b1f6cf"
7631
7631
  },
7632
7632
  {
7633
7633
  "path": "package.json",
7634
7634
  "mode": "0000644",
7635
- "sha256": "14e4c485f0795f8138ff062f0e1bf92740ddc2349117f8ef0d35570f4a9b672e"
7635
+ "sha256": "2a771101f553f4e0207b498d8172bcef587e9115fbb3ff301539851f282e99ba"
7636
7636
  },
7637
7637
  {
7638
7638
  "path": "public-docs/index.html",
@@ -7987,7 +7987,7 @@
7987
7987
  {
7988
7988
  "path": "scripts/gds/db-backup-nightly.sh",
7989
7989
  "mode": "0000644",
7990
- "sha256": "ff4785dbde6a5c52036ce4c4aacca317c62e725f49d3e32201909ec444d85d44"
7990
+ "sha256": "93f0b743b90a0cfdc91806ecb10da20456b98c0fac0f2b8eb3d690bccf79e532"
7991
7991
  },
7992
7992
  {
7993
7993
  "path": "scripts/gds/db-backup-offsite.sh",
@@ -8487,7 +8487,7 @@
8487
8487
  {
8488
8488
  "path": "scripts/gds/provision-disconnect.js",
8489
8489
  "mode": "0000644",
8490
- "sha256": "c849ceda1769145879cb8da61186a39beb1ea48bfe1cd3eb0406eb668052aadb"
8490
+ "sha256": "81cdd20b43aa1fc8b39a4fa06aada292aa00e84724feb803ba96bf15ce92cca9"
8491
8491
  },
8492
8492
  {
8493
8493
  "path": "scripts/gds/provision-net.js",
@@ -9492,7 +9492,7 @@
9492
9492
  {
9493
9493
  "path": "src/module-api.js",
9494
9494
  "mode": "0000644",
9495
- "sha256": "885acafa5a2527e8ede987295a14a562feaa93dc6c9bdc2e2284e6d5d98c2999"
9495
+ "sha256": "74ef2cad88c2d19fb73139455608b8e200f22f7e835c925910f6e28b3590c2a0"
9496
9496
  },
9497
9497
  {
9498
9498
  "path": "src/module-loader/catalog.js",
@@ -10357,7 +10357,7 @@
10357
10357
  {
10358
10358
  "path": "tests/db_backup_nightly.mjs",
10359
10359
  "mode": "0000644",
10360
- "sha256": "020dc551d105cc4a29e0f9c750a03cd14a91511d3edc47eb6719a1e430461936"
10360
+ "sha256": "cb731d19610530cc07457271aed57d5e04bec3d42bf85f246601b6cbdd02b3fd"
10361
10361
  },
10362
10362
  {
10363
10363
  "path": "tests/dead_deps.mjs",
@@ -35,6 +35,6 @@ A failed erase or catalog step returns a retryable `{ ok:false }`; a teardown th
35
35
  - The manage page's copy changed with the capability. The teardown truth now ends "Taking it offline erases nothing." rather than "Nothing here erases a project.", and the fold points at the new card instead of admitting the capability is missing.
36
36
  - The `project.catalog` port has three verbs. `tests/catalog_only_client.mjs` still pins the list.
37
37
  - If the runner dies mid-disconnect, the reconcile sweep re-enqueues a *teardown* for a `tearing_down` row, not a disconnect. The project is left offline, with its row, and the owner presses Disconnect again. This is accepted rather than giving the reconcile a memory of intent.
38
- - The nightly prune's `<db>-*.sql.gz` glob can still reach a longer-named sibling's dumps older than 30 days. It is filed as its own row, not fixed here.
38
+ - The nightly prune's `<db>-*.sql.gz` glob could still reach a longer-named sibling's dumps older than 30 days. It was filed as its own row and fixed in [task 1003948](https://cloudbongos.com/builders#/task/1003948): the prune and its retained count now match the same exact filename.
39
39
 
40
40
  Proofs: `tests/provisioning_disconnect.mjs` (queue + route), `tests/provision_disconnect.mjs` (runner order, shapes, failure, guards), `tests/project_catalog_forget.mjs` (claim rules), `tests/hub_disconnect_ui.mjs` + the kit probe (the card).
@@ -2024,5 +2024,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
2024
2024
  landed since 1.19.773 with no explicit bump. run 35132992149. (task 1002620)
2025
2025
  1.19.775 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2026
2026
  landed since 1.19.774 with no explicit bump. run 35133750943. (task 1002620)
2027
+ 1.19.776 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2028
+ landed since 1.19.775 with no explicit bump. run 35135604764. (task 1002620)
2027
2029
  ---------------------------------------------------------------------------
2028
2030
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.775",
3
+ "version": "1.19.776",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.775",
9
+ "version": "1.19.776",
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.775",
3
+ "version": "1.19.776",
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",
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Runs as user `lars` via the gds-db-backup.timer systemd unit (see
5
5
  # scripts/gds/gds-db-backup.timer + .service in this repo). Output lands
6
- # in /var/backups/gds/ as YYYY-MM-DD-HHMMSS.sql.gz (UTC timestamp), and
6
+ # in /var/backups/gds/ as <db>-YYYY-MM-DDTHHMMSSZ.sql.gz (UTC timestamp), and
7
7
  # files older than 30 days are pruned.
8
8
  #
9
9
  # Authentication: peer auth via the local Unix socket — the invoking unix
@@ -59,6 +59,10 @@ RETENTION_DAYS="${GDS_BACKUP_RETENTION_DAYS:-30}"
59
59
  # Timestamp format. UTC so dumps sort sanely regardless of TZ.
60
60
  TS=$(date -u +"%Y-%m-%dT%H%M%SZ")
61
61
  OUT="${BACKUP_DIR}/${DB_NAME}-${TS}.sql.gz"
62
+ # Exactly the name above. Every project's unit shares BACKUP_DIR, so a looser
63
+ # `${DB_NAME}-*` would let `test` prune and count `test-nk`'s dumps (task 1003948).
64
+ D='[0-9]'
65
+ DUMP_GLOB="${DB_NAME}-${D}${D}${D}${D}-${D}${D}-${D}${D}T${D}${D}${D}${D}${D}${D}Z.sql.gz"
62
66
 
63
67
  # ---- preconditions ----------------------------------------------------------
64
68
 
@@ -173,7 +177,7 @@ fi
173
177
  # Done AFTER the new dump lands so a streak of failed runs can't erase
174
178
  # everything: we never delete on a day we didn't successfully dump.
175
179
  PRUNED=$(find "$BACKUP_DIR" -maxdepth 1 -type f \
176
- -name "${DB_NAME}-*.sql.gz" \
180
+ -name "$DUMP_GLOB" \
177
181
  -mtime +"${RETENTION_DAYS}" \
178
182
  -print -delete | wc -l)
179
183
 
@@ -183,5 +187,5 @@ fi
183
187
 
184
188
  # ---- emit a one-line summary for journald + monitoring ---------------------
185
189
 
186
- REMAINING=$(find "$BACKUP_DIR" -maxdepth 1 -type f -name "${DB_NAME}-*.sql.gz" | wc -l)
190
+ REMAINING=$(find "$BACKUP_DIR" -maxdepth 1 -type f -name "$DUMP_GLOB" | wc -l)
187
191
  echo "[$(date -u +%FT%TZ)] gds-db-backup: ok · ${REMAINING} dump(s) retained · ${BYTES} bytes latest"
@@ -28,8 +28,8 @@ const { catalogOriginForInstance, ownerGithubIdForInstance } = require('../../mo
28
28
  const { deleteInstance } = require('../../modules/provisioning/disconnect.js');
29
29
 
30
30
  // The dump filename db-backup-nightly.sh writes — <db>-YYYY-MM-DDTHHMMSSZ.sql.gz — matched
31
- // EXACTLY. The nightly prune's own `<db>-*.sql.gz` would let a project named `test` erase
32
- // `test-nk`'s dumps, which is harmless for a 30-day prune and unacceptable for an erase. PURE.
31
+ // EXACTLY, as the nightly prune's DUMP_GLOB does (task 1003948): a looser `<db>-*.sql.gz` would
32
+ // let a project named `test` erase `test-nk`'s dumps. PURE.
33
33
  function dumpGlob(inst) {
34
34
  const d = '[0-9]';
35
35
  return `${dbName(inst)}-${d.repeat(4)}-${d.repeat(2)}-${d.repeat(2)}T${d.repeat(6)}Z.sql.gz`;
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.775'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
74
+ const CORE_VERSION = '1.19.776'; // 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');
@@ -29,12 +29,19 @@ const ENV = 'gds_backup_'.toUpperCase();
29
29
  // A fake pg_dump: a plain-format dump of `rows` rows, closed the way pg_dump closes one
30
30
  // (including the \unrestrict line patched servers append) unless it is `cut` short, and
31
31
  // exiting `exitCode`.
32
- function runBackup({ rows = 40, cut = false, exitCode = 0, env = {} } = {}) {
32
+ // `seed` pre-places dumps in the shared dir as [filename, ageInDays].
33
+ function runBackup({ rows = 40, cut = false, exitCode = 0, env = {}, seed = [] } = {}) {
33
34
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'db-backup-'));
34
35
  const bin = path.join(tmp, 'bin');
35
36
  const dir = path.join(tmp, 'backups');
36
37
  fs.mkdirSync(bin);
37
38
  fs.mkdirSync(dir);
39
+ for (const [name, ageDays] of seed) {
40
+ const f = path.join(dir, name);
41
+ fs.writeFileSync(f, '');
42
+ const t = new Date(Date.now() - ageDays * 86400000);
43
+ fs.utimesSync(f, t, t);
44
+ }
38
45
  const body = Array.from({ length: rows }, (_, i) => `INSERT INTO public.t VALUES (${i});`).join('\n');
39
46
  const close = cut ? '' : '\n--\n-- PostgreSQL database dump complete\n--\n\n\\unrestrict abc123\n';
40
47
  fs.writeFileSync(path.join(bin, 'pg_dump'),
@@ -73,6 +80,19 @@ test('an explicit operator size floor is still enforced', { skip }, () => {
73
80
  assert.match(r.stderr, /floor/);
74
81
  });
75
82
 
83
+ test('the prune and the count reach only this database\'s own dumps, never a longer-named sibling\'s (task 1003948)', { skip }, () => {
84
+ const r = runBackup({ seed: [
85
+ ['smallproj-2026-01-01T000000Z.sql.gz', 40],
86
+ ['smallproj-nk-2026-01-01T000000Z.sql.gz', 40],
87
+ ['smallproj-2-2026-09-01T000000Z.sql.gz', 2],
88
+ ] });
89
+ assert.equal(r.status, 0, r.stderr);
90
+ assert.ok(!r.dumps.includes('smallproj-2026-01-01T000000Z.sql.gz'), 'its own expired dump is pruned');
91
+ assert.ok(r.dumps.includes('smallproj-nk-2026-01-01T000000Z.sql.gz'), 'a sibling\'s expired dump is left for the sibling\'s own unit');
92
+ assert.match(r.stdout, /pruned 1 dump\(s\)/);
93
+ assert.match(r.stdout, /ok · 1 dump\(s\) retained/, 'the count is this database\'s dumps only');
94
+ });
95
+
76
96
  test('no fixed size floor is baked in for every instance', () => {
77
97
  const src = fs.readFileSync(SCRIPT, 'utf8');
78
98
  assert.doesNotMatch(src, new RegExp(`${ENV}MIN_BYTES:-[1-9]`), 'a default floor fails every database smaller than it');