@bongos/core 1.19.66 → 1.19.67

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.66",
6
- "core_contract": "1.19.66",
7
- "source_commit": "b7a4a393e851903e595719125e64e6c5abafceb4",
5
+ "core_version": "1.19.67",
6
+ "core_contract": "1.19.67",
7
+ "source_commit": "cd54b1b3803fb68412c34eabaf969761c6b22728",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-12T13:10:03.862Z",
9
+ "built_at": "2026-08-12T14:13:54.700Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 292,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 1535,
20
- "tree_sha256": "de43bd7bdf0e7964a2f861fc87f75fa4bd1ae0e1110f12b37486ce766c33c2a3",
20
+ "tree_sha256": "6689b03f0138061c04be8b757cd0a1a13b43f4c64e6d766df97906e306378cf9",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -187,7 +187,7 @@
187
187
  {
188
188
  "path": ".claude/skills/new-project/SKILL.md",
189
189
  "mode": "0000644",
190
- "sha256": "4bde7c3a6792e3df0490277095afb061435b921b3b7934d6519e3b3115095710"
190
+ "sha256": "55b86978a60e33eefe024d7c7d521e4093b82235eeb7e5d4a145fbb0e4db0b06"
191
191
  },
192
192
  {
193
193
  "path": ".claude/skills/otb-character-review/SKILL.md",
@@ -1312,12 +1312,12 @@
1312
1312
  {
1313
1313
  "path": "docs/api-reference.md",
1314
1314
  "mode": "0000644",
1315
- "sha256": "a30007778606ce90b8e31470d926047a372c72b93022f54023937cfd4c5b5fc0"
1315
+ "sha256": "1a4562c2e0575f8505a22851c63f1cc3ecfd485ae5de6e725810786f692e6457"
1316
1316
  },
1317
1317
  {
1318
1318
  "path": "docs/api/openapi.json",
1319
1319
  "mode": "0000644",
1320
- "sha256": "0e7646ee148453ef5d6d51b3434253b76f35628ee6c36681dbf6e7b27dd20c6f"
1320
+ "sha256": "9a551d5c62209f2c1b935194cc37e86ca5c44b317901499da84126e3868df1fa"
1321
1321
  },
1322
1322
  {
1323
1323
  "path": "docs/architecture.md",
@@ -3737,7 +3737,7 @@
3737
3737
  {
3738
3738
  "path": "modules/provisioning/onboard-plan.js",
3739
3739
  "mode": "0000644",
3740
- "sha256": "edee29c46f4f106ac08b9b048769182a1d63390a5621bbb6a83361e64a000a4e"
3740
+ "sha256": "19224b44f22a18db651cfefa87c90c250e911dc1b1d00b76ed7c9361b505c037"
3741
3741
  },
3742
3742
  {
3743
3743
  "path": "modules/provisioning/provisioning.js",
@@ -3752,7 +3752,7 @@
3752
3752
  {
3753
3753
  "path": "modules/provisioning/routes/provisioning.js",
3754
3754
  "mode": "0000644",
3755
- "sha256": "a490a4b4b607a302533bac6fedbc39a0153d57e35a086bcc20079fbefc6815e5"
3755
+ "sha256": "a8e2fa66eb19d119e117b80ca49832bec240cb71d167719e2a86f0032823b506"
3756
3756
  },
3757
3757
  {
3758
3758
  "path": "modules/provisioning/tests/provisioning.mjs",
@@ -4042,12 +4042,12 @@
4042
4042
  {
4043
4043
  "path": "package-lock.json",
4044
4044
  "mode": "0000644",
4045
- "sha256": "c143dc9d0d61ff73fc5d95421a08b76dd695932c371b2c75f6383a4dfa50e641"
4045
+ "sha256": "2e4247ac977969f19efdfa6e7e4c111f131e8e6200e393b7e19393d65b57d6ae"
4046
4046
  },
4047
4047
  {
4048
4048
  "path": "package.json",
4049
4049
  "mode": "0000644",
4050
- "sha256": "cadc0c2dd9db11ec051eddb312cfbb7433a7e3cd88bfaa18ea98180351d8032a"
4050
+ "sha256": "a840fe8d34e5195d246bfb20de03cf4864bec50d21ba5d3abe4eb17f8ed47275"
4051
4051
  },
4052
4052
  {
4053
4053
  "path": "public-docs/index.html",
@@ -4292,7 +4292,7 @@
4292
4292
  {
4293
4293
  "path": "public-landing/create.html",
4294
4294
  "mode": "0000644",
4295
- "sha256": "0333bd3cea25e22fc6ad70097a4a57e1fa779b6d47156b551782a06846f76c0b"
4295
+ "sha256": "a90e1cfe70592338dd9e3bb733a5655f8b772594f74a09b0b2a3075ff90c5487"
4296
4296
  },
4297
4297
  {
4298
4298
  "path": "public-landing/gate/README.md",
@@ -4977,7 +4977,7 @@
4977
4977
  {
4978
4978
  "path": "scripts/gds/onboard.js",
4979
4979
  "mode": "0000644",
4980
- "sha256": "c1f8299289e917a04f685d72dbced1778f5888aac53bb7ffe4bed7f9ad453b42"
4980
+ "sha256": "11472bb450751330e865cbd8f6dba0276005f120db6438e058cd148dbeb580fb"
4981
4981
  },
4982
4982
  {
4983
4983
  "path": "scripts/gds/onboarding-analyze.js",
@@ -5672,7 +5672,7 @@
5672
5672
  {
5673
5673
  "path": "src/module-api.js",
5674
5674
  "mode": "0000644",
5675
- "sha256": "8dd5e994caef229a93a1ef8fd90e20e24ff9bd7a3ed9ba27bffe5732cfdf5960"
5675
+ "sha256": "7f872cf877475c7b89a389c016abb6cdcdbc34a7847b8bf882dd67e8dc49048c"
5676
5676
  },
5677
5677
  {
5678
5678
  "path": "src/module-loader/loader.js",
@@ -7037,7 +7037,7 @@
7037
7037
  {
7038
7038
  "path": "tests/onboard.mjs",
7039
7039
  "mode": "0000644",
7040
- "sha256": "61f445855391bfc0e4ab44f8a3f03e074d911e75ed7dbae31293f38314cd3d2e"
7040
+ "sha256": "93125254eed5a46e933484062942e43966e3cac898e642d546cd467da635223f"
7041
7041
  },
7042
7042
  {
7043
7043
  "path": "tests/onboarding_gate.mjs",
@@ -7167,7 +7167,7 @@
7167
7167
  {
7168
7168
  "path": "tests/provisioning_onboard_mode.mjs",
7169
7169
  "mode": "0000644",
7170
- "sha256": "9a41d64fba3a8cc8ffdbccb0aea363ca6ccb63909cfeefd4bd0b05ebab052403"
7170
+ "sha256": "7749df454ac3cca7c7e5ea1acc94ead15d1c9f87b38fe2028a1c93c8adf31bcf"
7171
7171
  },
7172
7172
  {
7173
7173
  "path": "tests/provisioning_teardown_intent.mjs",
@@ -99,6 +99,13 @@ Confirm the owner is **Archon** (their profile / the hall roster). If `auth_conf
99
99
 
100
100
  Fill the instance **look** — theme / palette / fonts in `config/branding.json` (see `docs/branding-fill-prompt.md`). The identity strings were set at init; this is the visual layer. "Brand with your own LLM."
101
101
 
102
+ ### 9. Enter your builders hall
103
+
104
+ The hall is the point of everything above — end there, not at brand (task 1002703):
105
+
106
+ - **With a domain:** open `https://<domain>/builders` — that's the project's home.
107
+ - **No domain yet:** run `bongos dev` in the repo checkout — it stands the instance up locally and serves the hall on the owner's machine ([ADR 0149](../../../docs/adr/<redacted>.md)).
108
+
102
109
  ## Done-when
103
110
 
104
111
  A new owner has gone zero → live: their own standalone repo on a pinned core, provisioned with no hand-editing of servers, the four human-only steps done UI-first + verified, and they are signed in as the founding Archon on their own domain. That is goal 35's `project-creation-flow` criterion.
@@ -8733,7 +8733,7 @@
8733
8733
  "provisioning"
8734
8734
  ],
8735
8735
  "summary": "GET /provisioning/onboard-plan",
8736
- "description": "GET /provisioning/onboard-plan?mode=greenfield|adopt — the CANONICAL onboarding step sequence (task 2085; goal 35 / criterion 165: \"the canonical step sequence is the source of truth; skill/CLI/hall are forms over it\"). The branded /create page + the hall wizard fetch it so their human-steps checklist can't drift from the CLI's (scripts/gds/onboard.js reads the same modules/provisioning/onboard-plan.js). rank: public — the signed-out /create landing page reads it; it is the same public runbook the /new-project skill documents (no write, no secret).\n\n**Rank:** `public` — No authentication — any caller.",
8736
+ "description": "GET /provisioning/onboard-plan?mode=greenfield|adopt&domain=<host> — the CANONICAL onboarding step sequence (task 2085; goal 35 / criterion 165: \"the canonical step sequence is the source of truth; skill/CLI/hall are forms over it\"). The branded /create page + the hall wizard fetch it so their human-steps checklist can't drift from the CLI's (scripts/gds/onboard.js reads the same modules/provisioning/onboard-plan.js). `domain` relabels the terminal enter-hall step with the instance's own hall address (task 1002703); a non-hostname is dropped — clients render these labels, so unvalidated input must never be echoed back. rank: public — the signed-out /create landing page reads it; it is the same public runbook the /new-project skill documents (no write, no secret).\n\n**Rank:** `public` — No authentication — any caller.",
8737
8737
  "x-rank": "public",
8738
8738
  "x-source": "modules/provisioning/routes/provisioning.js",
8739
8739
  "responses": {
@@ -374,7 +374,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
374
374
  | POST | `/api/bongos/provisioning/instances/:id/force-teardown` | `metic+archon` | — | POST /provisioning/instances/:id/force-teardown — Archon tears down ANY instance. |
375
375
  | POST | `/api/bongos/provisioning/instances/:id/github-app` | `any-builder` | `account` | POST /provisioning/instances/:id/github-app — mint a GitHub-App-Manifest onboarding link for the caller's OWN instance (task 2080, ADR 01… |
376
376
  | POST | `/api/bongos/provisioning/instances/:id/teardown` | `any-builder` | — | POST /provisioning/instances/:id/teardown — request teardown of the caller's OWN instance. |
377
- | GET | `/api/bongos/provisioning/onboard-plan` | `public` | — | GET /provisioning/onboard-plan?mode=greenfield\|adopt — the CANONICAL onboarding step sequence (task 2085; goal 35 / criterion 165: "the c… |
377
+ | GET | `/api/bongos/provisioning/onboard-plan` | `public` | — | GET /provisioning/onboard-plan?mode=greenfield\|adopt&domain=<host> — the CANONICAL onboarding step sequence (task 2085; goal 35 / criteri… |
378
378
  | GET | `/api/bongos/provisioning/tls-check` | `public` | — | GET /provisioning/tls-check?domain=<host> — the Caddy on-demand-TLS ALLOW-LIST (ADR 0111 §4, task P4 task 1945). |
379
379
 
380
380
  ## `public` (18)
@@ -11,13 +11,19 @@
11
11
  //
12
12
  // Each step: { key, kind: 'auto' | 'human', label }. `kind: 'human'` marks the
13
13
  // irreducibly-manual owner actions (create the GitHub repo, wire GitHub sign-in, first
14
- // sign-in) that every form renders UI-first; `kind: 'auto'` steps the flow performs.
15
- // The sequence branches at exactly ONE leg — scaffold — into greenfield (`bongos init`,
16
- // a fresh empty repo) vs brownfield (`bongos init --adopt`, LAYER onto an existing repo;
17
- // ADR 0121 §Decision 1 / task 2046). Every other leg is identical, so `mode` only
18
- // relabels the github-repo / init / scaffold steps.
19
- function onboardPlan(mode = 'greenfield') {
14
+ // sign-in, enter the hall) that every form renders UI-first; `kind: 'auto'` steps the
15
+ // flow performs. The sequence branches at exactly ONE leg — scaffold — into greenfield
16
+ // (`bongos init`, a fresh empty repo) vs brownfield (`bongos init --adopt`, LAYER onto
17
+ // an existing repo; ADR 0121 §Decision 1 / task 2046). Every other leg is identical, so
18
+ // `mode` only relabels the github-repo / init / scaffold steps.
19
+ //
20
+ // `opts.domain` (task 1002703): the terminal enter-hall step names the instance's own
21
+ // hall address when the renderer knows the domain, and falls back to the `bongos dev`
22
+ // local-hall one-liner when it doesn't — the hall is the point of creating a project,
23
+ // so the sequence must end there, not at brand.
24
+ function onboardPlan(mode = 'greenfield', opts = {}) {
20
25
  const adopt = mode === 'adopt';
26
+ const domain = typeof opts.domain === 'string' && opts.domain.trim() ? opts.domain.trim() : null;
21
27
  return [
22
28
  { key: 'name-address', kind: 'auto', label: 'Decide name + address (interview)' },
23
29
  { key: 'github-repo', kind: 'human', label: adopt ? 'Use your EXISTING GitHub repository' : 'Create the empty GitHub repository' },
@@ -31,6 +37,9 @@ function onboardPlan(mode = 'greenfield') {
31
37
  { key: 'first-sign-in', kind: 'human', label: 'First sign-in (seats the founding Archon)' },
32
38
  { key: 'verify', kind: 'auto', label: 'Verify /healthz auth_configured' },
33
39
  { key: 'brand', kind: 'auto', label: 'Brand the instance look' },
40
+ { key: 'enter-hall', kind: 'human', label: domain
41
+ ? `Enter your builders hall — https://${domain}/builders`
42
+ : 'Enter your builders hall — run `bongos dev` for the local hall (no domain attached yet)' },
34
43
  ];
35
44
  }
36
45
 
@@ -609,16 +609,20 @@ module.exports = function provisioningRoutes() {
609
609
  res.json({ module: 'provisioning', ok: true, coreVersion: api.CORE_VERSION });
610
610
  });
611
611
 
612
- // GET /provisioning/onboard-plan?mode=greenfield|adopt — the CANONICAL onboarding
613
- // step sequence (task 2085; goal 35 / criterion 165: "the canonical step sequence is
614
- // the source of truth; skill/CLI/hall are forms over it"). The branded /create page +
615
- // the hall wizard fetch it so their human-steps checklist can't drift from the CLI's
616
- // (scripts/gds/onboard.js reads the same modules/provisioning/onboard-plan.js).
612
+ // GET /provisioning/onboard-plan?mode=greenfield|adopt&domain=<host> — the CANONICAL
613
+ // onboarding step sequence (task 2085; goal 35 / criterion 165: "the canonical step
614
+ // sequence is the source of truth; skill/CLI/hall are forms over it"). The branded
615
+ // /create page + the hall wizard fetch it so their human-steps checklist can't drift
616
+ // from the CLI's (scripts/gds/onboard.js reads the same
617
+ // modules/provisioning/onboard-plan.js). `domain` relabels the terminal enter-hall
618
+ // step with the instance's own hall address (task 1002703); a non-hostname is dropped
619
+ // — clients render these labels, so unvalidated input must never be echoed back.
617
620
  // rank: public — the signed-out /create landing page reads it; it is the same public
618
621
  // runbook the /new-project skill documents (no write, no secret).
619
622
  router.get('/provisioning/onboard-plan', (req, res) => {
620
623
  const mode = req.query.mode === 'adopt' ? 'adopt' : 'greenfield';
621
- res.json({ mode, steps: onboardPlan(mode) });
624
+ const domain = provisioning.normalizeHostname(req.query.domain) || null;
625
+ res.json({ mode, steps: onboardPlan(mode, { domain }) });
622
626
  });
623
627
 
624
628
  // GET /provisioning/tls-check?domain=<host> — the Caddy on-demand-TLS ALLOW-LIST
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.66",
3
+ "version": "1.19.67",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.66",
9
+ "version": "1.19.67",
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.66",
3
+ "version": "1.19.67",
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",
@@ -1019,6 +1019,9 @@ input[type=text].bad{border-color:var(--err);}
1019
1019
  steps.push('<li data-onboard-step="first-sign-in"><b>First sign-in</b><p>Open <code style="font-family:var(--font-mono)">' + esc(oa.homepageUrl) + '</code> and sign in with GitHub once. That seats you as the owner — the founding Archon.</p></li>');
1020
1020
  steps.push('<li><b>Verify</b><p><code style="font-family:var(--font-mono)">' + esc(oa.homepageUrl) + '/healthz</code> should report <code style="font-family:var(--font-mono)">auth_configured: true</code>. Then the hall is yours.</p></li>');
1021
1021
  }
1022
+ steps.push(state.domain
1023
+ ? '<li data-onboard-step="enter-hall"><b>Enter your builders hall</b><p>Your project’s home — open <a href="https://' + esc(state.domain) + '/builders" target="_blank" rel="noopener"><code style="font-family:var(--font-mono)">' + esc(state.domain) + '/builders</code></a> and start building.</p></li>'
1024
+ : '<li data-onboard-step="enter-hall"><b>Enter your builders hall</b><p>No address yet — run <code style="font-family:var(--font-mono)">bongos dev</code> in your repo checkout to start the local hall on your machine.</p></li>');
1022
1025
  $('humanSteps').innerHTML = steps.join('');
1023
1026
  $('humanSteps').addEventListener('click', function (ev) {
1024
1027
  var t = ev.target.closest('.copy');
@@ -199,6 +199,15 @@ async function run() {
199
199
 
200
200
  // Step 10 — brand
201
201
  log('\n⑨ Brand the instance look — fill theme/palette/fonts in config/branding.json (docs/branding-fill-prompt.md).');
202
+
203
+ // Step 11 — enter the builders hall (task 1002703): the point of all of the above.
204
+ // With a domain the hall lives on the instance; without one, `bongos dev` runs it locally.
205
+ if (a.domain) {
206
+ log(`\n⑩ Enter your builders hall — open https://${a.domain}/builders. That's your project's home.`);
207
+ } else {
208
+ log('\n⑩ Enter your builders hall — no domain yet, so run `bongos dev` in your repo checkout:');
209
+ log(' it stands the instance up locally and serves the hall on your machine.');
210
+ }
202
211
  log('\n✓ onboard walkthrough complete. Your standalone instance is live and owned.\n');
203
212
  } finally {
204
213
  rl.close();
package/src/module-api.js CHANGED
@@ -559,8 +559,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
559
559
  // landed since 1.19.64 with no explicit bump. run 31562193292. (task 1002620)
560
560
  // 1.19.66 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
561
561
  // landed since 1.19.65 with no explicit bump. run 31599966075. (task 1002620)
562
+ // 1.19.67 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
563
+ // landed since 1.19.66 with no explicit bump. run 31605591253. (task 1002620)
562
564
  // ---------------------------------------------------------------------------
563
- const CORE_VERSION = '1.19.66'; // CI auto-patch carrier (ADR 0161); see changelog above
565
+ const CORE_VERSION = '1.19.67'; // CI auto-patch carrier (ADR 0161); see changelog above
564
566
 
565
567
  // A namespaced logger so a module's log lines are attributable + consistent.
566
568
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
package/tests/onboard.mjs CHANGED
@@ -7,14 +7,15 @@ import { createRequire } from 'node:module';
7
7
  const require = createRequire(import.meta.url);
8
8
  const ob = require('../scripts/gds/onboard.js');
9
9
 
10
- test('onboardPlan is the canonical sequence: name+address first, brand last, four legs automated around the human steps', () => {
10
+ test('onboardPlan is the canonical sequence: name+address first, the builders hall last, four legs automated around the human steps', () => {
11
11
  const plan = ob.onboardPlan();
12
12
  const keys = plan.map((s) => s.key);
13
13
  assert.equal(keys[0], 'name-address');
14
- assert.equal(keys[keys.length - 1], 'brand');
14
+ assert.equal(keys[keys.length - 1], 'enter-hall');
15
+ assert.equal(keys[keys.length - 2], 'brand');
15
16
  // the irreducibly-human steps (must be UI-first prompts)
16
17
  const human = plan.filter((s) => s.kind === 'human').map((s) => s.key);
17
- assert.deepEqual(human, ['github-repo', 'oauth-app', 'first-sign-in']);
18
+ assert.deepEqual(human, ['github-repo', 'oauth-app', 'first-sign-in', 'enter-hall']);
18
19
  // the DNS preflight comes BEFORE provision (task 1980: before the address step)
19
20
  assert.ok(keys.indexOf('dns-preflight') < keys.indexOf('provision'), 'dns preflight precedes provision');
20
21
  // OAuth secret placement comes after the OAuth app + before first sign-in
@@ -52,6 +53,46 @@ test('onboardPlan lists seed-first-version as an explicit AUTO step right after
52
53
  assert.ok(ob.onboardPlan('adopt').some((s) => s.key === 'seed-version'), 'adopt gets it too');
53
54
  });
54
55
 
56
+ test('onboardPlan ends at the builders hall, terminal label branching on domain (task 1002703)', () => {
57
+ // The hall is the entire point of creating a project, yet the sequence used to stop
58
+ // at brand — owners only learned about `bongos dev` or their hall URL by being told
59
+ // (idea 1000693). One terminal step in the ONE source reaches every render surface.
60
+ for (const mode of ['greenfield', 'adopt']) {
61
+ const dflt = ob.onboardPlan(mode);
62
+ const last = dflt[dflt.length - 1];
63
+ assert.equal(last.key, 'enter-hall', `${mode}: the plan ends at the hall`);
64
+ assert.equal(last.kind, 'human', 'entering the hall is the owner\'s own action');
65
+ assert.match(last.label, /bongos dev/, 'no domain → the local-hall one-liner');
66
+
67
+ const withDomain = ob.onboardPlan(mode, { domain: 'mercury.example.com' });
68
+ const lastD = withDomain[withDomain.length - 1];
69
+ assert.equal(lastD.key, 'enter-hall');
70
+ assert.match(lastD.label, /https:\/\/mercury\.example\.com\/builders/, 'domain → the instance\'s hall address');
71
+ assert.doesNotMatch(lastD.label, /bongos dev/, 'with a domain the local fallback is noise');
72
+ // only the terminal label branches — the skeleton is identical
73
+ assert.deepEqual(withDomain.map((s) => s.key), dflt.map((s) => s.key));
74
+ }
75
+ // a blank / whitespace domain is "no domain"
76
+ const blank = ob.onboardPlan('greenfield', { domain: ' ' });
77
+ assert.match(blank[blank.length - 1].label, /bongos dev/);
78
+ });
79
+
80
+ test('every render surface carries the terminal hall step (task 1002703)', () => {
81
+ // The human-steps drift guard below pins the TAG; this pins the CONTENT — each
82
+ // surface must point at the hall (domain branch) and at `bongos dev` (local branch).
83
+ const { readFileSync } = require('node:fs');
84
+ const path = require('node:path');
85
+ const read = (rel) => readFileSync(path.join(import.meta.dirname, '..', rel), 'utf8');
86
+ const cli = read('scripts/gds/onboard.js');
87
+ assert.match(cli, /builders hall/i, 'the CLI walkthrough ends at the hall');
88
+ assert.match(cli, /bongos dev/, 'the CLI offers the local-hall one-liner when no domain');
89
+ const createHtml = read('public-landing/create.html');
90
+ const enterHall = createHtml.match(/data-onboard-step="enter-hall"[^]*?<\/li>/g) || [];
91
+ assert.ok(enterHall.length >= 1, '/create tags the enter-hall step');
92
+ assert.match(enterHall.join(''), /\/builders/, '/create points at the hall address');
93
+ assert.match(enterHall.join(''), /bongos dev/, '/create offers the local hall when no domain');
94
+ });
95
+
55
96
  test('oauthAppInstructions pins the apex callback + homepage and points at ACCOUNT Developer settings', () => {
56
97
  const oa = ob.oauthAppInstructions('mercury.example.com');
57
98
  assert.equal(oa.homepageUrl, 'https://mercury.example.com');
@@ -162,6 +162,32 @@ await ta('POST /instances: an unknown onboard_mode is REFUSED (never silently co
162
162
  assert.deepEqual(res.body.error.valid, ['greenfield', 'adopt']);
163
163
  });
164
164
 
165
+ function get(path) {
166
+ return new Promise((resolve, reject) => {
167
+ http.get(`${base}${path}`, (res) => {
168
+ let d = '';
169
+ res.on('data', (c) => { d += c; });
170
+ res.on('end', () => { let j = null; try { j = JSON.parse(d); } catch { /* non-JSON */ } resolve({ status: res.statusCode, body: j, raw: d }); });
171
+ }).on('error', reject);
172
+ });
173
+ }
174
+
175
+ await ta('GET /onboard-plan: ?domain= relabels the terminal enter-hall step; garbage is ignored, never echoed (task 1002703)', async () => {
176
+ const bare = await get('/provisioning/onboard-plan');
177
+ assert.equal(bare.status, 200);
178
+ const bareLast = bare.body.steps[bare.body.steps.length - 1];
179
+ assert.equal(bareLast.key, 'enter-hall');
180
+ assert.match(bareLast.label, /bongos dev/, 'no domain → the local-hall one-liner');
181
+ const dom = await get('/provisioning/onboard-plan?domain=mercury.example.com');
182
+ const domLast = dom.body.steps[dom.body.steps.length - 1];
183
+ assert.match(domLast.label, /https:\/\/mercury\.example\.com\/builders/, 'domain → that instance\'s hall');
184
+ // clients render these labels — a non-hostname must be dropped, not reflected back
185
+ const bad = await get('/provisioning/onboard-plan?domain=' + encodeURIComponent('<script>alert(1)</script>'));
186
+ const badLast = bad.body.steps[bad.body.steps.length - 1];
187
+ assert.match(badLast.label, /bongos dev/);
188
+ assert.ok(!badLast.label.includes('<script>'), 'unvalidated input never reaches the label');
189
+ });
190
+
165
191
  await ta('POST /instances: adopt WITHOUT target_ref is refused — there is no repo to layer onto', async () => {
166
192
  // Without target_ref the runner would fall back to greenfield behavior on a row labelled
167
193
  // adopt. Refuse at the door rather than store a lie.