@bongos/core 1.19.672 → 1.19.673

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,22 +2,22 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.19.672",
6
- "core_contract": "1.19.672",
7
- "source_commit": "72bde195eed5440b4cad741c01a811727d96a4d4",
5
+ "core_version": "1.19.673",
6
+ "core_contract": "1.19.673",
7
+ "source_commit": "9798ad8423cf89ef3bad579911f1f5ca8505e800",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-09-11T17:51:22.900Z",
9
+ "built_at": "2026-09-11T18:16:55.232Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 474,
13
13
  "agent_docs_stubbed": 24,
14
- "functional_verbatim": 2120,
14
+ "functional_verbatim": 2121,
15
15
  "rules": 3,
16
16
  "gate_literals": 3,
17
17
  "gate": "passed"
18
18
  },
19
- "file_count": 2618,
20
- "tree_sha256": "8fafd38c0b191dd28e39e21d624b758762e3316f76c64b203860de48e6539679",
19
+ "file_count": 2619,
20
+ "tree_sha256": "3be80c1f6787508e21f11f1b391ce342ad0c0e3b570a6360bd00d3e5b5cfa417",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2792,7 +2792,7 @@
2792
2792
  {
2793
2793
  "path": "docs/module-api-changelog.md",
2794
2794
  "mode": "0000644",
2795
- "sha256": "84eeb3cde0e92fb5bf32038fc8cd5abd7f5cc059c71cf0273a50873fc1325abe"
2795
+ "sha256": "e1eb4883d1a25ac4b5b90ba00150f280c004569abeba0f9c0c4099982e587c6e"
2796
2796
  },
2797
2797
  {
2798
2798
  "path": "docs/modules-contract.md",
@@ -7767,12 +7767,12 @@
7767
7767
  {
7768
7768
  "path": "package-lock.json",
7769
7769
  "mode": "0000644",
7770
- "sha256": "46ab99aa32c6280e6c1bd7af17f26e534c1bcd45a43e873c9f2526ddd856dfae"
7770
+ "sha256": "dfc25c3b8365e868e5119aff5e8447d41b1983dbb9db9c2669e13f9259726629"
7771
7771
  },
7772
7772
  {
7773
7773
  "path": "package.json",
7774
7774
  "mode": "0000644",
7775
- "sha256": "c460db604d8c3d230a2a7af526c3bfe9288d5a9d1a4136d728ad81315b1bd177"
7775
+ "sha256": "98edbd2fab2c33a96eebabd87c3c0c4dbd2f563fda40ca37bc737b186726fade"
7776
7776
  },
7777
7777
  {
7778
7778
  "path": "public-docs/index.html",
@@ -9532,7 +9532,7 @@
9532
9532
  {
9533
9533
  "path": "src/module-api.js",
9534
9534
  "mode": "0000644",
9535
- "sha256": "057af9f0fddf1697d3368c2cddee50970b2319da68b2e73df11a3baa84f1be60"
9535
+ "sha256": "6aaa55e88d207f52ea930ba86d7d292c06326cdcb7c08823dd225df4bff15e2f"
9536
9536
  },
9537
9537
  {
9538
9538
  "path": "src/module-loader/catalog.js",
@@ -13059,6 +13059,11 @@
13059
13059
  "mode": "0000644",
13060
13060
  "sha256": "456b20334164a710f59116d6a6c4b85090dc0e65668284d0a736e6ee1df5dea6"
13061
13061
  },
13062
+ {
13063
+ "path": "tests/wizard_born_first_board.mjs",
13064
+ "mode": "0000644",
13065
+ "sha256": "7a5260e3e09388bc59ea1752f3296cb2a58e7b81a2ebeb723ef916512fc89db7"
13066
+ },
13062
13067
  {
13063
13068
  "path": "tests/wizard_draft_resume.mjs",
13064
13069
  "mode": "0000644",
@@ -1803,5 +1803,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
1803
1803
  landed since 1.19.670 with no explicit bump. run 34627255469. (task 1002620)
1804
1804
  1.19.672 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1805
1805
  landed since 1.19.671 with no explicit bump. run 34629971417. (task 1002620)
1806
+ 1.19.673 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1807
+ landed since 1.19.672 with no explicit bump. run 34632328471. (task 1002620)
1806
1808
  ---------------------------------------------------------------------------
1807
1809
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.672",
3
+ "version": "1.19.673",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.672",
9
+ "version": "1.19.673",
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.672",
3
+ "version": "1.19.673",
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.672'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
74
+ const CORE_VERSION = '1.19.673'; // 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');
@@ -0,0 +1,116 @@
1
+ // tests/wizard_born_first_board.mjs — the CONTRACT between the two halves that decide
2
+ // whether a wizard-born owner lands on a board or on a blank hall (walk finding W4;
3
+ // fixed by task 1003239, pinned here by task 1003508).
4
+ //
5
+ // WHY THIS FILE EXISTS. The fix spans two files that never import each other:
6
+ //
7
+ // scripts/gds/provision-repo.js seedFirstVersionCmd() — seeds the instance's ONE
8
+ // version at standup, status 'building'
9
+ // modules/lifecycle/kickoff-seed.js seedKickoffIfEmpty() — at the founder's first
10
+ // sign-in, files the checklist UNDER that version
11
+ //
12
+ // Each half is already unit-tested alone (tests/provision.mjs, tests/kickoff_seed.mjs).
13
+ // Neither test would notice the coupling breaking — and when it breaks the symptom is
14
+ // SILENT: `seedKickoffIfEmpty` returns `{ skipped: 'no_version' }`, the sign-in that
15
+ // just seated the owner succeeds, and the founder simply sees an empty hall. That is
16
+ // exactly W4, and it is the shape no existing test covers.
17
+ //
18
+ // DB-free: the provisioner half is read as the SQL it emits, the seed half runs against
19
+ // an in-memory pool — the same seam tests/kickoff_seed.mjs uses.
20
+ //
21
+ // Run: node --test tests/wizard_born_first_board.mjs
22
+
23
+ import assert from 'node:assert/strict';
24
+ import { test } from 'node:test';
25
+ import { createRequire } from 'node:module';
26
+
27
+ const require = createRequire(import.meta.url);
28
+ const P = require('../scripts/gds/provision.js');
29
+ const { seedKickoffIfEmpty, FIRST_VERSION_SQL } = require('../modules/lifecycle/kickoff-seed.js');
30
+ const { kickoffChecklist } = require('../modules/lifecycle/kickoff-checklist.js');
31
+ const { kickoffTasks } = require('../scripts/gds/init.js');
32
+
33
+ // The control plane's own fixture shape (mirrors tests/provision.mjs).
34
+ const coTenant = { id: 1, slug: 'mercury', hosting_shape: 'co-tenant', status: 'requested', owner_builder_id: 7, port: 3003, db_name: 'mercury', domain: null };
35
+ const spec = { firstAdmin: 'founder', repo: { owner: 'o', name: 'n' }, domains: { publicOrigin: 'https://p.example' }, modules: [] };
36
+
37
+ function fakePool({ taskCount, versions }) {
38
+ return {
39
+ query: async (sql) => {
40
+ if (/FROM tasks/.test(sql)) return { rows: [{ n: taskCount }] };
41
+ if (/FROM versions/.test(sql)) return { rows: versions };
42
+ throw new Error(`unexpected query: ${sql}`);
43
+ },
44
+ };
45
+ }
46
+
47
+ test('the version the provisioner seeds is the one the first-sign-in seed files under', async () => {
48
+ // Derived from the provisioner itself, never a pinned literal: instanceInitSpec is the
49
+ // single source both the standup seed and the greenfield `bongos init` read.
50
+ const seeded = P.instanceInitSpec(coTenant).version;
51
+ assert.ok(seeded.id, 'the init spec names a starter version');
52
+ assert.ok(
53
+ P.seedFirstVersionCmd(coTenant).includes(`$v$${seeded.id}$v$`),
54
+ 'the standup SQL really inserts that version id'
55
+ );
56
+
57
+ const inserted = [];
58
+ const r = await seedKickoffIfEmpty(
59
+ { builderId: 7 },
60
+ { pool: fakePool({ taskCount: 0, versions: [{ id: seeded.id }] }), spec, createTask: async (row) => { inserted.push(row); return row; } }
61
+ );
62
+
63
+ assert.ok(r.seeded > 0, 'a wizard-born board is NOT empty at first sign-in (walk finding W4)');
64
+ assert.equal(r.versionId, seeded.id, 'filed under the version standup actually created');
65
+ for (const row of inserted) assert.equal(row.versionId, seeded.id);
66
+ });
67
+
68
+ test("the status standup writes is the status the kickoff query prefers ('building')", () => {
69
+ // The coupling neither side's own test can see: seedFirstVersionCmd hard-codes the
70
+ // status literal, FIRST_VERSION_SQL orders on it. Change one and the other silently
71
+ // stops preferring the starter version.
72
+ assert.ok(
73
+ P.seedFirstVersionCmd(coTenant).includes('$v$building$v$'),
74
+ 'standup seeds the starter version as building'
75
+ );
76
+ assert.match(
77
+ FIRST_VERSION_SQL,
78
+ /\(status = 'building'\) DESC/,
79
+ 'the first-sign-in seed prefers a building version — same literal as above'
80
+ );
81
+ });
82
+
83
+ test('a standup that seeded no version strands the founder on an empty hall, silently', async () => {
84
+ // The W4 failure mode itself, asserted at the composition level: no throw, no log the
85
+ // founder can see, sign-in still succeeds — just no board. This is why the bug survived
86
+ // a live walk, and why the two assertions above are worth keeping.
87
+ const inserted = [];
88
+ const r = await seedKickoffIfEmpty(
89
+ { builderId: 7 },
90
+ { pool: fakePool({ taskCount: 0, versions: [] }), spec, createTask: async (row) => inserted.push(row) }
91
+ );
92
+ assert.deepEqual(r, { seeded: 0, skipped: 'no_version' });
93
+ assert.equal(inserted.length, 0);
94
+ });
95
+
96
+ test('both entry points draw the checklist from one spec source', () => {
97
+ // The task's own requirement: "same spec source as `bongos init`'s kickoffTasks()".
98
+ // Pinned as an EQUALITY, not a shape check: init's export must stay a thin wrapper over
99
+ // the shared function, so a forked copy of the checklist inside init.js fails here.
100
+ assert.deepEqual(
101
+ kickoffTasks(spec),
102
+ kickoffChecklist(spec, { provisioned: false }),
103
+ 'init.js kickoffTasks is kickoffChecklist, not a second copy of the list'
104
+ );
105
+
106
+ const viaSeed = kickoffChecklist(spec, { firstSignIn: true });
107
+ assert.ok(viaSeed.length > 0, 'the first-sign-in checklist has steps');
108
+ for (const t of viaSeed) assert.ok(t.title && t.description, 'every step is filable as a task');
109
+
110
+ // ...and the first-sign-in variant drops the steps the wizard already performed, rather
111
+ // than handing the founder a checklist half of which is done (the reason for the flag).
112
+ const seedTitles = new Set(viaSeed.map((t) => t.title));
113
+ for (const done of ['Register a GitHub OAuth app and set its credentials', 'Sign in once as founder to seat the founding owner']) {
114
+ assert.ok(!seedTitles.has(done), `a wizard-born founder is not asked to redo: ${done}`);
115
+ }
116
+ });