@bongos/core 1.19.731 → 1.19.732
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 +19 -14
- package/docs/module-api-changelog.md +2 -0
- package/docs/onboarding/diagrams/04-architecture.mmd +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/diagram-facts.js +31 -21
- package/scripts/gds/gen-diagrams.js +1 -1
- package/src/module-api.js +1 -1
- package/tests/diagram_repo_slug.mjs +142 -0
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.
|
|
6
|
-
"core_contract": "1.19.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.19.732",
|
|
6
|
+
"core_contract": "1.19.732",
|
|
7
|
+
"source_commit": "05f95d3811b50b7da27f822578bed1bdaa6c678d",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-09-13T15:
|
|
9
|
+
"built_at": "2026-09-13T15:41:18.185Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 477,
|
|
13
13
|
"agent_docs_stubbed": 24,
|
|
14
|
-
"functional_verbatim":
|
|
14
|
+
"functional_verbatim": 2102,
|
|
15
15
|
"rules": 3,
|
|
16
16
|
"gate_literals": 3,
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
|
-
"file_count":
|
|
20
|
-
"tree_sha256": "
|
|
19
|
+
"file_count": 2603,
|
|
20
|
+
"tree_sha256": "ff43e4e917e23173177aea01ebf8266b85bab2ff188f67ab26f5577a47c3ffe3",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/ask-for-help/SKILL.md",
|
|
@@ -2482,7 +2482,7 @@
|
|
|
2482
2482
|
{
|
|
2483
2483
|
"path": "docs/module-api-changelog.md",
|
|
2484
2484
|
"mode": "0000644",
|
|
2485
|
-
"sha256": "
|
|
2485
|
+
"sha256": "6a3d0cfd51a5e932d65a8634f52f4a61e62f3501453b104e2ab5d2086860d9e1"
|
|
2486
2486
|
},
|
|
2487
2487
|
{
|
|
2488
2488
|
"path": "docs/modules-contract.md",
|
|
@@ -2512,7 +2512,7 @@
|
|
|
2512
2512
|
{
|
|
2513
2513
|
"path": "docs/onboarding/diagrams/04-architecture.mmd",
|
|
2514
2514
|
"mode": "0000644",
|
|
2515
|
-
"sha256": "
|
|
2515
|
+
"sha256": "ee949090b1df91be015dabbcaa175bd2f81f3089714cf5f712ad2b0b053f4714"
|
|
2516
2516
|
},
|
|
2517
2517
|
{
|
|
2518
2518
|
"path": "docs/onboarding/diagrams/05-versioning.mmd",
|
|
@@ -7512,12 +7512,12 @@
|
|
|
7512
7512
|
{
|
|
7513
7513
|
"path": "package-lock.json",
|
|
7514
7514
|
"mode": "0000644",
|
|
7515
|
-
"sha256": "
|
|
7515
|
+
"sha256": "dc33512a9aebd07ee5a82a6aff3d969080aa4c7f465a2f64b65f534502043f25"
|
|
7516
7516
|
},
|
|
7517
7517
|
{
|
|
7518
7518
|
"path": "package.json",
|
|
7519
7519
|
"mode": "0000644",
|
|
7520
|
-
"sha256": "
|
|
7520
|
+
"sha256": "05b4e628ace671cc392fad7a333da1d0eea15d7f33350dd08f6bf4d21b48e972"
|
|
7521
7521
|
},
|
|
7522
7522
|
{
|
|
7523
7523
|
"path": "public-docs/index.html",
|
|
@@ -7907,7 +7907,7 @@
|
|
|
7907
7907
|
{
|
|
7908
7908
|
"path": "scripts/gds/diagram-facts.js",
|
|
7909
7909
|
"mode": "0000644",
|
|
7910
|
-
"sha256": "
|
|
7910
|
+
"sha256": "3ba594a6d475bb94be7edf5277cd60d5537bf1ab66f92f9d47eeb5138c56341f"
|
|
7911
7911
|
},
|
|
7912
7912
|
{
|
|
7913
7913
|
"path": "scripts/gds/discipline-modes.json",
|
|
@@ -8057,7 +8057,7 @@
|
|
|
8057
8057
|
{
|
|
8058
8058
|
"path": "scripts/gds/gen-diagrams.js",
|
|
8059
8059
|
"mode": "0000644",
|
|
8060
|
-
"sha256": "
|
|
8060
|
+
"sha256": "7cb78cd9796df68b6d7e1e4677cd778690f60583ba3ddc2fc23048f2ff75e4ba"
|
|
8061
8061
|
},
|
|
8062
8062
|
{
|
|
8063
8063
|
"path": "scripts/gds/gen-file-map.js",
|
|
@@ -9317,7 +9317,7 @@
|
|
|
9317
9317
|
{
|
|
9318
9318
|
"path": "src/module-api.js",
|
|
9319
9319
|
"mode": "0000644",
|
|
9320
|
-
"sha256": "
|
|
9320
|
+
"sha256": "bd79c2971dd8196fe95345a663188120141c97b5b797147c81a48bad1c9ccc0e"
|
|
9321
9321
|
},
|
|
9322
9322
|
{
|
|
9323
9323
|
"path": "src/module-loader/catalog.js",
|
|
@@ -10249,6 +10249,11 @@
|
|
|
10249
10249
|
"mode": "0000644",
|
|
10250
10250
|
"sha256": "36a3bad951c6bfb4ee7b9230a5e6114095bb3b94f1f0019ec5c61c5168dee537"
|
|
10251
10251
|
},
|
|
10252
|
+
{
|
|
10253
|
+
"path": "tests/diagram_repo_slug.mjs",
|
|
10254
|
+
"mode": "0000644",
|
|
10255
|
+
"sha256": "5132322b103e6ea5a3a04b1509eba987e4988cd749751b17b5d31d813ec508d5"
|
|
10256
|
+
},
|
|
10252
10257
|
{
|
|
10253
10258
|
"path": "tests/diff_derived_signals.mjs",
|
|
10254
10259
|
"mode": "0000644",
|
|
@@ -1936,5 +1936,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
1936
1936
|
landed since 1.19.729 with no explicit bump. run 34765502139. (task 1002620)
|
|
1937
1937
|
1.19.731 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
1938
1938
|
landed since 1.19.730 with no explicit bump. run 34766029928. (task 1002620)
|
|
1939
|
+
1.19.732 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
1940
|
+
landed since 1.19.731 with no explicit bump. run 34766314699. (task 1002620)
|
|
1939
1941
|
---------------------------------------------------------------------------
|
|
1940
1942
|
```
|
|
@@ -28,7 +28,7 @@ flowchart TB
|
|
|
28
28
|
DEPLOY["auto-pull deploy (ADR 0129)\na timer pulls THIS instance repo every ~2 min →\nnpm ci if the pin changed → migrate → regenerate docs → restart → healthz"]
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
subgraph GH["GITHUB — the instance's own repo
|
|
31
|
+
subgraph GH["GITHUB — the instance's own repo"]
|
|
32
32
|
MAIN["branch-protected main\n(no direct push; PR + required checks only)\nholds config + the pinned @bongos/core — NOT the platform source"]
|
|
33
33
|
end
|
|
34
34
|
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.732",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bongos/core",
|
|
9
|
-
"version": "1.19.
|
|
9
|
+
"version": "1.19.732",
|
|
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.
|
|
3
|
+
"version": "1.19.732",
|
|
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",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
|
|
21
21
|
const fs = require('node:fs');
|
|
22
22
|
const path = require('node:path');
|
|
23
|
-
const { execFileSync } = require('node:child_process');
|
|
24
23
|
|
|
25
24
|
// --- comment stripping (so rank/status literals in prose don't read as wiring) ---
|
|
26
25
|
// Line-based on purpose: a regex block-comment strip over concatenated files can
|
|
@@ -232,25 +231,36 @@ function seededAchievementCount(migs) {
|
|
|
232
231
|
return ids.size;
|
|
233
232
|
}
|
|
234
233
|
|
|
235
|
-
// Repo slug ("
|
|
236
|
-
//
|
|
237
|
-
// (
|
|
238
|
-
//
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
234
|
+
// Repo slug ("github.com/owner/repo") for 04's REPO node.
|
|
235
|
+
//
|
|
236
|
+
// Sourced from the BRANDING CONTRACT (`repo: { owner, name }`), never from the
|
|
237
|
+
// git `origin` remote. Reading git was the original design (task #357) and it
|
|
238
|
+
// did satisfy the rule it was written for — keep builder identity out of
|
|
239
|
+
// implementation code (audit-authorship.sh) — but it only moved the identity
|
|
240
|
+
// from the source into the GENERATED file, which is committed AND published.
|
|
241
|
+
// The portable core carries no branding.json, so `origin` there is always some
|
|
242
|
+
// real person's fork and every regeneration wrote that login into
|
|
243
|
+
// docs/onboarding/diagrams/04-architecture.mmd and shipped it in the core
|
|
244
|
+
// package. That is task 1003911: the one leak the task 1003869 sweep could not
|
|
245
|
+
// hold, because a generator puts it back the moment anyone regenerates.
|
|
246
|
+
//
|
|
247
|
+
// Branding fails to neutral by construction, which is the whole point: an unset
|
|
248
|
+
// `repo` yields the placeholder, so the portable core renders a placeholder and
|
|
249
|
+
// a host instance that declares its own repo renders its own. Every other
|
|
250
|
+
// identity string in these diagrams already follows exactly this rule — see
|
|
251
|
+
// `brand()` in gen-diagrams.js, whose header states it for the currency, the
|
|
252
|
+
// world/product name and the public host.
|
|
253
|
+
function repoSlug() {
|
|
254
|
+
let b = {};
|
|
255
|
+
try { b = require('../../src/branding').branding() || {}; } catch (_) { /* fail-to-neutral */ }
|
|
256
|
+
const r = (b && b.repo) || {};
|
|
257
|
+
const owner = typeof r.owner === 'string' ? r.owner.trim() : '';
|
|
258
|
+
const name = typeof r.name === 'string' ? r.name.trim() : '';
|
|
259
|
+
// Both halves or neither — a half-filled pack must not render "owner/".
|
|
260
|
+
// null, not a placeholder string: the CALLER owns the prose, so a neutral
|
|
261
|
+
// instance can drop the clause entirely instead of rendering a parenthetical
|
|
262
|
+
// that restates the label it sits inside.
|
|
263
|
+
return owner && name ? `github.com/${owner}/${name}` : null;
|
|
254
264
|
}
|
|
255
265
|
|
|
256
266
|
// An instance that IMPORTED the origin backlog renumbers the origin tasks by a
|
|
@@ -315,7 +325,7 @@ async function conceptualFacts({ repo, migs, api }) {
|
|
|
315
325
|
taskStatus: status,
|
|
316
326
|
taskLabels: { ...ALL_TASK_IDS },
|
|
317
327
|
achievementsSeeded: seededAchievementCount(migs),
|
|
318
|
-
repoSlug: repoSlug(
|
|
328
|
+
repoSlug: repoSlug(),
|
|
319
329
|
};
|
|
320
330
|
}
|
|
321
331
|
|
|
@@ -444,7 +444,7 @@ function architectureMmd(f) {
|
|
|
444
444
|
' DEPLOY["auto-pull deploy (ADR 0129)\\na timer pulls THIS instance repo every ~2 min →\\nnpm ci if the pin changed → migrate → regenerate docs → restart → healthz"]',
|
|
445
445
|
' end',
|
|
446
446
|
'',
|
|
447
|
-
` subgraph GH["GITHUB — the instance's own repo (${c.repoSlug})"]`,
|
|
447
|
+
` subgraph GH["GITHUB — the instance's own repo${c.repoSlug ? ` (${c.repoSlug})` : ''}"]`,
|
|
448
448
|
' MAIN["branch-protected main\\n(no direct push; PR + required checks only)\\nholds config + the pinned @bongos/core — NOT the platform source"]',
|
|
449
449
|
' end',
|
|
450
450
|
'',
|
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.
|
|
74
|
+
const CORE_VERSION = '1.19.732'; // 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,142 @@
|
|
|
1
|
+
// tests/diagram_repo_slug.mjs
|
|
2
|
+
//
|
|
3
|
+
// Task 1003911 — the onboarding architecture diagram must not carry the live
|
|
4
|
+
// instance's GitHub owner into published output.
|
|
5
|
+
//
|
|
6
|
+
// The bug: diagram-facts.repoSlug() derived the slug from the git `origin`
|
|
7
|
+
// remote. That satisfied the rule it was written for (no builder identity
|
|
8
|
+
// hardcoded in implementation code — audit-authorship.sh) but only moved the
|
|
9
|
+
// identity from the SOURCE into the GENERATED file, which is committed and
|
|
10
|
+
// shipped in the core package. Because it is a generator, hand-sweeping the
|
|
11
|
+
// .mmd achieved nothing: the next regeneration put the owner login straight
|
|
12
|
+
// back, which is how it survived the task 1003869 sweep and failed the leak
|
|
13
|
+
// scan on landed main.
|
|
14
|
+
//
|
|
15
|
+
// The fix routes the slug through the branding contract (`repo: {owner,name}`),
|
|
16
|
+
// which fails to neutral by construction — the same rule the currency, the
|
|
17
|
+
// world/product name and the public host already follow.
|
|
18
|
+
//
|
|
19
|
+
// NOTE ON METHOD: this file never writes a real owner login down. It reads the
|
|
20
|
+
// live `origin` at run time and asserts the output does not contain it. That is
|
|
21
|
+
// the self-leak invariant mirror-redact.js holds about itself, and the trap this
|
|
22
|
+
// sweep fell into twice — a test that pins "X must not leak" by spelling X out
|
|
23
|
+
// puts X back into the very tree it is guarding.
|
|
24
|
+
//
|
|
25
|
+
// Run: node tests/diagram_repo_slug.mjs
|
|
26
|
+
|
|
27
|
+
import { strict as assert } from 'node:assert';
|
|
28
|
+
import { execFileSync } from 'node:child_process';
|
|
29
|
+
import fs from 'node:fs';
|
|
30
|
+
import os from 'node:os';
|
|
31
|
+
import path from 'node:path';
|
|
32
|
+
|
|
33
|
+
let passed = 0;
|
|
34
|
+
let failed = 0;
|
|
35
|
+
function test(name, fn) {
|
|
36
|
+
try {
|
|
37
|
+
fn();
|
|
38
|
+
passed++;
|
|
39
|
+
console.log(` ok ${name}`);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
failed++;
|
|
42
|
+
console.log(` FAIL ${name}`);
|
|
43
|
+
console.log(` ${err.message}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const REPO = process.cwd();
|
|
48
|
+
|
|
49
|
+
// branding() memoizes on first call, so each pack needs its own process.
|
|
50
|
+
function slugWith(pack) {
|
|
51
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'repo-slug-'));
|
|
52
|
+
const file = path.join(tmp, 'branding.json');
|
|
53
|
+
fs.writeFileSync(file, JSON.stringify(pack));
|
|
54
|
+
try {
|
|
55
|
+
const out = execFileSync(
|
|
56
|
+
process.execPath,
|
|
57
|
+
['-e', 'process.stdout.write(JSON.stringify(require("./scripts/gds/diagram-facts.js").repoSlug()))'],
|
|
58
|
+
{ cwd: REPO, encoding: 'utf8', env: { ...process.env, BONGOS_BRANDING_FILE: file } },
|
|
59
|
+
);
|
|
60
|
+
return JSON.parse(out);
|
|
61
|
+
} finally {
|
|
62
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// The live owner, read at run time and never written down. If there is no
|
|
67
|
+
// origin remote (a CI checkout without one), the guards that need it skip.
|
|
68
|
+
function liveOwner() {
|
|
69
|
+
try {
|
|
70
|
+
const url = execFileSync('git', ['-C', REPO, 'remote', 'get-url', 'origin'], {
|
|
71
|
+
encoding: 'utf8',
|
|
72
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
73
|
+
}).trim();
|
|
74
|
+
const m = url.match(/[:/]([^/:]+)\/[^/]+?(?:\.git)?$/);
|
|
75
|
+
return m ? m[1] : null;
|
|
76
|
+
} catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ---- the branding contract drives it, and fails to neutral ----
|
|
82
|
+
|
|
83
|
+
test('an unset repo yields null, so the caller can drop the clause entirely', () => {
|
|
84
|
+
assert.equal(slugWith({ repo: { owner: '', name: '' } }), null);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test('a pack with no repo key at all is still neutral, not a crash', () => {
|
|
88
|
+
assert.equal(slugWith({}), null);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('a declared repo renders that instance own slug', () => {
|
|
92
|
+
assert.equal(slugWith({ repo: { owner: 'octocat', name: 'hello-world' } }), 'github.com/octocat/hello-world');
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('a half-filled pack renders nothing, never a dangling owner/', () => {
|
|
96
|
+
assert.equal(slugWith({ repo: { owner: 'octocat', name: '' } }), null);
|
|
97
|
+
assert.equal(slugWith({ repo: { owner: '', name: 'hello-world' } }), null);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('whitespace is not a declaration', () => {
|
|
101
|
+
assert.equal(slugWith({ repo: { owner: ' ', name: ' ' } }), null);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// ---- the regression guard: reverting to git-derivation must FAIL here ----
|
|
105
|
+
//
|
|
106
|
+
// Every assertion above passes if repoSlug() goes back to reading `origin`,
|
|
107
|
+
// because those packs are neutral and a git fallback would only fire when the
|
|
108
|
+
// pack is empty. This is the one that catches it.
|
|
109
|
+
|
|
110
|
+
test('a neutral pack does NOT fall back to the git origin owner', () => {
|
|
111
|
+
const owner = liveOwner();
|
|
112
|
+
if (!owner) return; // no remote in this checkout; nothing to leak
|
|
113
|
+
const got = slugWith({ repo: { owner: '', name: '' } });
|
|
114
|
+
assert.equal(got, null, 'neutral branding must render no slug at all');
|
|
115
|
+
assert.doesNotMatch(String(got), new RegExp(owner, 'i'), 'the git origin owner reached the diagram facts');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test('a declared repo wins over the git origin, it is not merely a fallback', () => {
|
|
119
|
+
const owner = liveOwner();
|
|
120
|
+
if (!owner) return;
|
|
121
|
+
const got = slugWith({ repo: { owner: 'octocat', name: 'hello-world' } });
|
|
122
|
+
assert.equal(got, 'github.com/octocat/hello-world');
|
|
123
|
+
assert.doesNotMatch(got, new RegExp(owner, 'i'));
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// ---- the committed artifact, which is what actually ships ----
|
|
127
|
+
|
|
128
|
+
test('the committed 04-architecture.mmd carries no owner login', () => {
|
|
129
|
+
const owner = liveOwner();
|
|
130
|
+
if (!owner) return;
|
|
131
|
+
const mmd = path.join(REPO, 'docs/onboarding/diagrams/04-architecture.mmd');
|
|
132
|
+
if (!fs.existsSync(mmd)) return;
|
|
133
|
+
const text = fs.readFileSync(mmd, 'utf8');
|
|
134
|
+
assert.doesNotMatch(
|
|
135
|
+
text,
|
|
136
|
+
new RegExp(owner, 'i'),
|
|
137
|
+
'the published diagram names the live owner — regenerate it after fixing the generator',
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
console.log(`\ndiagram_repo_slug: ${passed} passed, ${failed} failed`);
|
|
142
|
+
process.exit(failed ? 1 : 0);
|