@bongos/core 1.19.23 → 1.19.24

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.23",
6
- "core_contract": "1.19.23",
7
- "source_commit": "fcdc2c0100a2b96183b34980f7c33572b67c7d1f",
5
+ "core_version": "1.19.24",
6
+ "core_contract": "1.19.24",
7
+ "source_commit": "e17b55346ce6c5a5b0e7c17be12fd87f49805bfa",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-11T01:44:34.493Z",
9
+ "built_at": "2026-08-11T01:49:44.456Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 285,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 1510,
20
- "tree_sha256": "80499ca716f5acc869706f3832aba22ffa0facdf31abd6eca71baec9b273d628",
20
+ "tree_sha256": "238b6875fb5bfeb460a7d827d8b671f23f910870fdfffaa09977138b1537865c",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -4002,12 +4002,12 @@
4002
4002
  {
4003
4003
  "path": "package-lock.json",
4004
4004
  "mode": "0000644",
4005
- "sha256": "969211290cee8ccee357109c325ff4741c8cce3319d520b22506126099beea7e"
4005
+ "sha256": "642ec17a7c466b31700ea4759e0f3f3f1622f016bd5ce39122ac50ae1b393449"
4006
4006
  },
4007
4007
  {
4008
4008
  "path": "package.json",
4009
4009
  "mode": "0000644",
4010
- "sha256": "b00d5423d5019e305bb488af793202ccb4d3089da6c129851e32f85ea4219904"
4010
+ "sha256": "00411692affd964ada475f325a9e810cd2d351d5b168500d32759a70ef2af627"
4011
4011
  },
4012
4012
  {
4013
4013
  "path": "public-docs/index.html",
@@ -5522,7 +5522,7 @@
5522
5522
  {
5523
5523
  "path": "src/bongos/routes/auth.js",
5524
5524
  "mode": "0000644",
5525
- "sha256": "2cacde2aa0984457904c0a29cc0dd0d41e32be89b7b6e401d885662805c3de5e"
5525
+ "sha256": "b1389bf7cb4d53a27d332106ddbcd9327d76521c2330b4763d4ed0919c52f2a5"
5526
5526
  },
5527
5527
  {
5528
5528
  "path": "src/bongos/routes/backup.js",
@@ -5627,7 +5627,7 @@
5627
5627
  {
5628
5628
  "path": "src/module-api.js",
5629
5629
  "mode": "0000644",
5630
- "sha256": "0e4203ec0098beb9a54a4ea56b3c5701cfca5bb02b6676114a9257f5b353aff5"
5630
+ "sha256": "08c66b410a4563d54fa8e8f6c0cf0ab077bf95b902923eb785419e8f261ebe99"
5631
5631
  },
5632
5632
  {
5633
5633
  "path": "src/module-loader/loader.js",
@@ -5797,7 +5797,7 @@
5797
5797
  {
5798
5798
  "path": "tests/auth_error_brand.mjs",
5799
5799
  "mode": "0000644",
5800
- "sha256": "e28bdcf3149d3baa15fdd4d5a44276953abfa3633ff37923f75355be746fc840"
5800
+ "sha256": "e94cdcd827f8e981b62c4f9f403678d5dda0af6e5fb5cbf1cb667b94eb1bfc49"
5801
5801
  },
5802
5802
  {
5803
5803
  "path": "tests/auth_flow_slice1.mjs",
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.23",
3
+ "version": "1.19.24",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.23",
9
+ "version": "1.19.24",
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.23",
3
+ "version": "1.19.24",
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,14 @@ function escapeHtml(s) {
21
21
  // subtitle — replaces the default header sub-line
22
22
  // cta — { href, label } for the primary button (default: retry sign-in)
23
23
  // note — replaces the default troubleshooting footnote
24
+ // The instance's own word for the admitting rank, for per-branch error strings
25
+ // (task 1002616, the 1439 follow-up): core error surfaces never hardcode
26
+ // "Archon" — a non-OTB instance names its own role (branding rankLabels.archon;
27
+ // ADR 0062 §3). Used as "the ${admitterLabel()}", so labels stay grammatical.
28
+ function admitterLabel() {
29
+ try { return branding().rankLabels?.archon || 'owner'; } catch { return 'owner'; }
30
+ }
31
+
24
32
  function renderAuthErrorPage(heading, detail, opts = {}) {
25
33
  // Every fixed string on this page — the tab-title suffix, epigraph, page
26
34
  // heading, sub-line, and retry button — is owned by the instance branding
@@ -500,7 +508,7 @@ module.exports = function buildAuthRouter() {
500
508
  if (!code || !state || state !== expectedState) {
501
509
  return res.status(400).type('text/html').send(renderAuthErrorPage(
502
510
  'State mismatch',
503
- 'The handshake-cookie did not match the state GitHub returned. This usually means the sign-in took too long (cookie expired after 10 minutes) or the request crossed an origin boundary. Start over and the gate will open.',
511
+ 'The handshake-cookie did not match the state GitHub returned. This usually means the sign-in took too long (cookie expired after 10 minutes) or the request crossed an origin boundary. Start over and sign in again.',
504
512
  ));
505
513
  }
506
514
  try {
@@ -584,18 +592,18 @@ module.exports = function buildAuthRouter() {
584
592
  }
585
593
  return res.status(403).type('text/html').send(renderAuthErrorPage(
586
594
  'This account is not approved yet',
587
- 'Signing in with GitHub is only for builders an Archon has already approved. If you are new, request access at the builders’ hall — an Archon will approve you, then this sign-in will let you in. If you were just approved, the Archon may still need to mark you invited; give it a moment and try again.',
595
+ `Signing in with GitHub is only for builders the ${admitterLabel()} has already approved. If you are new, request access at the builders’ hall — once the ${admitterLabel()} approves you, this sign-in will let you in. If you were just approved, it may take a moment to be marked invited; try again shortly.`,
588
596
  {
589
597
  subtitle: 'Sign-in is for approved builders. New here? Request access first.',
590
598
  cta: { href: '/builders', label: 'Go to the hall & request access' },
591
- note: 'Already approved and still blocked? Ask the Archon to confirm your request was marked “invited.”',
599
+ note: `Already approved and still blocked? Ask the ${admitterLabel()} to confirm your request was marked “invited.”`,
592
600
  },
593
601
  ));
594
602
  }
595
603
  console.error('[gds] web/callback', err);
596
604
  res.status(500).type('text/html').send(renderAuthErrorPage(
597
605
  'The handshake threw an error',
598
- `The server tried to exchange the auth code for a session and something went wrong: ${err.message}. Try again; if it persists, the Archon must investigate the server logs.`,
606
+ `The server tried to exchange the auth code for a session and something went wrong: ${err.message}. Try again; if it persists, ask the ${admitterLabel()} to investigate the server logs.`,
599
607
  ));
600
608
  }
601
609
  });
@@ -727,7 +735,7 @@ module.exports = function buildAuthRouter() {
727
735
  console.error('[gds] discord/callback', err);
728
736
  res.status(500).type('text/html').send(renderAuthErrorPage(
729
737
  'The Discord link threw an error',
730
- 'Linking failed unexpectedly. Try again; if it persists, the Archon must check the server logs.',
738
+ `Linking failed unexpectedly. Try again; if it persists, ask the ${admitterLabel()} to check the server logs.`,
731
739
  { cta: { href: '/builders', label: 'Back to the hall' } },
732
740
  ));
733
741
  }
@@ -1061,3 +1069,6 @@ module.exports.reqHost = reqHost;
1061
1069
  // The auth-error page renderer (task 1439): pure over the branding pack, so a
1062
1070
  // test can prove every visible string is brand-owned (no OTB lore baked in).
1063
1071
  module.exports.renderAuthErrorPage = renderAuthErrorPage;
1072
+ // The admitting-rank label for per-branch strings (task 1002616) — exported for
1073
+ // the same reason: the test proves the label is pack-owned, never "Archon".
1074
+ module.exports.admitterLabel = admitterLabel;
package/src/module-api.js CHANGED
@@ -473,8 +473,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
473
473
  // landed since 1.19.21 with no explicit bump. run 31449168428. (task 1002620)
474
474
  // 1.19.23 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
475
475
  // landed since 1.19.22 with no explicit bump. run 31450197816. (task 1002620)
476
+ // 1.19.24 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
477
+ // landed since 1.19.23 with no explicit bump. run 31450459825. (task 1002620)
476
478
  // ---------------------------------------------------------------------------
477
- const CORE_VERSION = '1.19.23'; // CI auto-patch carrier (ADR 0161); see changelog above
479
+ const CORE_VERSION = '1.19.24'; // CI auto-patch carrier (ADR 0161); see changelog above
478
480
 
479
481
  // A namespaced logger so a module's log lines are attributable + consistent.
480
482
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -67,6 +67,33 @@ const escapeHtml = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({
67
67
  '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;',
68
68
  }[c]));
69
69
 
70
+ // ---- task 1002616: the per-branch CALL-SITE strings are lore-free too ----
71
+ // Task 1439 made the TEMPLATE brand-aware but deliberately scoped out the
72
+ // heading/detail arguments each callback error branch passes in. Those still
73
+ // said "an Archon has already approved", "the Archon must investigate", and
74
+ // "the gate will open" — instance lore rendered on every instance.
75
+
76
+ test('call-site strings: no hardcoded Archon/gate lore in the auth error branches (task 1002616)', async () => {
77
+ const { readFileSync } = await import('node:fs');
78
+ const src = readFileSync(new URL('../src/bongos/routes/auth.js', import.meta.url), 'utf8');
79
+ // The four exact leaks, pinned so they cannot return verbatim…
80
+ assert.doesNotMatch(src, /gate will open/, 'state-mismatch branch must not carry gate lore');
81
+ assert.doesNotMatch(src, /an Archon has already approved|an Archon will approve/, 'NOT_APPROVED branch must not hardcode Archon');
82
+ assert.doesNotMatch(src, /Ask the Archon\b/, 'the NOT_APPROVED note must not hardcode Archon');
83
+ assert.doesNotMatch(src, /the Archon must (investigate|check)/, 'the 500 branches must not hardcode Archon');
84
+ // …and the label helper is actually what the branches interpolate.
85
+ assert.match(src, /admitterLabel\(\)/, 'branches resolve the instance label at render time');
86
+ });
87
+
88
+ test('admitterLabel: pack-owned with a neutral fallback (task 1002616)', () => {
89
+ const { admitterLabel } = authMod;
90
+ const label = admitterLabel();
91
+ const pack = loadBranding({ env: {} });
92
+ const expected = pack.rankLabels?.archon || 'owner';
93
+ assert.equal(label, expected, 'the label is the ambient pack’s rankLabels.archon');
94
+ assert.notEqual(label.trim(), '', 'never empty');
95
+ });
96
+
70
97
  test('renderAuthErrorPage interpolates the branding pack, not hardcoded lore', () => {
71
98
  // Whatever pack is ambient in this checkout, the rendered page must carry ITS
72
99
  // authError values and ITS worldName — that is the pack-driven property.