@bongos/core 1.19.324 → 1.19.325

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.324",
6
- "core_contract": "1.19.324",
7
- "source_commit": "7448abdd2e984ab3e1d9acb627bb21e631f198c8",
5
+ "core_version": "1.19.325",
6
+ "core_contract": "1.19.325",
7
+ "source_commit": "9a1a1c67f80e8d01c562568c4565b9c2b4fb9420",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-24T14:18:41.725Z",
9
+ "built_at": "2026-08-24T14:28:39.280Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 324,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 1806,
20
- "tree_sha256": "170e8d01edc7c386adfef5d3c45b916a749225cd999f6e7aef6c65e8c1307c24",
20
+ "tree_sha256": "d455b7b84d748804468edea9e50ab188ef60da26a3538ede625b0766ca673f9b",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -4652,12 +4652,12 @@
4652
4652
  {
4653
4653
  "path": "package-lock.json",
4654
4654
  "mode": "0000644",
4655
- "sha256": "2bee07291c5d8ef2f9a3c4e0c7e10714c8e078d7a0e9bdc2321aecf4af7d9afe"
4655
+ "sha256": "1a460f0c695ba6d590ee9bab9b281626de4747e164ca416098658ae054843ad6"
4656
4656
  },
4657
4657
  {
4658
4658
  "path": "package.json",
4659
4659
  "mode": "0000644",
4660
- "sha256": "f7c47e473b34391b7357c799f632cfb8101bb723099baa3d41b2074deba44e37"
4660
+ "sha256": "7cc398a8e7f341aee2272da252afc4abd5213349ece88962764c6bde65f27f25"
4661
4661
  },
4662
4662
  {
4663
4663
  "path": "public-docs/index.html",
@@ -5182,7 +5182,7 @@
5182
5182
  {
5183
5183
  "path": "scripts/gds/control-manifest.js",
5184
5184
  "mode": "0000644",
5185
- "sha256": "0d5b0c5e4bc15ff914d34849607ad2f01d1843d4dafeafdaf4191c2f365300bb"
5185
+ "sha256": "189caa1e5c263beb5d2c251d924abfe6ea84b7f8b26409a93633c8466bd5801c"
5186
5186
  },
5187
5187
  {
5188
5188
  "path": "scripts/gds/copy-inventory.js",
@@ -5267,7 +5267,7 @@
5267
5267
  {
5268
5268
  "path": "scripts/gds/doc-cli-guard.js",
5269
5269
  "mode": "0000644",
5270
- "sha256": "6f157f0b3a5618bcc2372b6d3a2805ff212013b421720470b443da35aa72cf26"
5270
+ "sha256": "9cf6c8ead8129799d17a18eadedf0423828cb457fa07fd317dcf2853254861e9"
5271
5271
  },
5272
5272
  {
5273
5273
  "path": "scripts/gds/docs-entropy.js",
@@ -6437,7 +6437,7 @@
6437
6437
  {
6438
6438
  "path": "src/module-api.js",
6439
6439
  "mode": "0000644",
6440
- "sha256": "cbeef525ef673bbd61cd645ea63a3cbc5bc7946d9a8f9e7b15457aaae0869220"
6440
+ "sha256": "cc999c875729b68c2b78cf1f16a34184412b4d2b87b82be7b182627d313e9628"
6441
6441
  },
6442
6442
  {
6443
6443
  "path": "src/module-loader/catalog.js",
@@ -6987,7 +6987,7 @@
6987
6987
  {
6988
6988
  "path": "tests/control_manifest.mjs",
6989
6989
  "mode": "0000644",
6990
- "sha256": "2465159282594723a49d03ed2ca9dbb10e95ddb7af96d145c45f7d7c2a8b8cee"
6990
+ "sha256": "46ec55dbdb06b33cbe4b3dff44580cbb90d2daa0b225b810352a887e941e4798"
6991
6991
  },
6992
6992
  {
6993
6993
  "path": "tests/copy_desk_flags_db.mjs",
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.324",
3
+ "version": "1.19.325",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.324",
9
+ "version": "1.19.325",
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.324",
3
+ "version": "1.19.325",
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",
@@ -74,6 +74,47 @@ const CONTROLS = [
74
74
  wiredIn: { file: '.claude/scheduled-tasks/redteam-weekly/SKILL.md', needle: 'redteam-patrol.js' },
75
75
  alsoExists: ['scripts/gds/redteam-patrol.js'],
76
76
  },
77
+
78
+ // ── goal 1000077's four guards (task 1003169 / G05) ──────────────────────
79
+ //
80
+ // Same reasoning as the goal-1000076 controls above, applied to the goal that
81
+ // exists BECAUSE prose documented four failure modes and nothing refused them.
82
+ // A guard that can silently stop existing is not a guard — and these four are
83
+ // exactly the kind that can: three are one line in fitness.js's CHECKS array
84
+ // (delete the line and the check simply never runs, with nothing red), and the
85
+ // fourth is a module the ship pipeline requires.
86
+ //
87
+ // `alsoExists` names each guard's TEST on purpose. A check whose test is gone
88
+ // still runs, but nothing then proves it can still fail — and this session
89
+ // produced three tests that were green for the wrong reason, so an untested
90
+ // guard is a guard on trust.
91
+ {
92
+ label: 'guard: a doc that names a CLI matches the real CLI (G01)',
93
+ file: 'scripts/gds/doc-cli-guard.js',
94
+ wiredIn: { file: 'scripts/gds/fitness.js', needle: 'doc-cli-guard' },
95
+ alsoExists: ['tests/doc_cli_guard.mjs'],
96
+ },
97
+ {
98
+ label: 'guard: no ops script hardcodes a version id (G02)',
99
+ file: 'scripts/gds/version-literal-guard.js',
100
+ wiredIn: { file: 'scripts/gds/fitness.js', needle: 'version-literal-guard' },
101
+ alsoExists: ['tests/version_literals.mjs', 'scripts/gds/version-select.js'],
102
+ },
103
+ {
104
+ label: 'guard: an ops skill declares the machine it needs (G03)',
105
+ file: 'scripts/gds/skill-preflight.js',
106
+ wiredIn: { file: 'scripts/gds/fitness.js', needle: 'skill-preflight' },
107
+ alsoExists: ['tests/skill_preflight.mjs'],
108
+ },
109
+ {
110
+ // Not a fitness check: a module the ship pipeline requires. Wired in
111
+ // ship-flow.js, which is where the carve left the resume path — and where a
112
+ // missing import silently broke every regrade until task 1003166 hit it.
113
+ label: 'guard: a ship cannot lie about how far it got (G04)',
114
+ file: 'scripts/gds/ship-honesty.js',
115
+ wiredIn: { file: 'scripts/gds/ship-flow.js', needle: 'ship-honesty' },
116
+ alsoExists: ['tests/ship_cannot_lie.mjs'],
117
+ },
77
118
  ];
78
119
 
79
120
  // Pure evaluation — exported for the test. deps.exists/deps.read override fs.
@@ -107,7 +148,7 @@ function checkControlsExist() {
107
148
  warnings: [],
108
149
  note: violations.length
109
150
  ? 'a shipped security/quality control disappeared or came unwired — restore it or update control-manifest.js in the same change'
110
- : `all ${CONTROLS.length} goal-1000076 controls present and wired (the assurance-of-assurance the ADR 0022 audit found missing)`,
151
+ : `all ${CONTROLS.length} controls present and wired — goal 1000076's plus goal 1000077's four guards (task 1003169). The assurance-of-assurance the ADR 0022 audit found missing.`,
111
152
  };
112
153
  }
113
154
 
@@ -33,34 +33,9 @@ const { execFileSync } = require('node:child_process');
33
33
 
34
34
  const REPO_ROOT = path.resolve(__dirname, '..', '..');
35
35
 
36
- // ---------------------------------------------------------------------------
37
- // Check 22 — a doc that NAMES a CLI invocation must match the real CLI
38
- // (task 1003165 / G01, goal 1000077).
39
- //
40
- // WHY. Task 1002931 shipped a skill instructing `capture.js --full --fields-file`
41
- // while those flags lived on an unlanded branch. Its test passed, because the test
42
- // pinned the skill's PROSE — it asserted the file said the words, never that the
43
- // words worked. So the skill confidently told agents to run a command that
44
- // silently ignored both flags and filed the wrong thing. That is the whole class:
45
- // AN UNRECOGNISED FLAG IS NOT AN ERROR. `arg('--x')`/`hasFlag('--x')` just return
46
- // null and the command proceeds, so a doc can name a flag that does nothing and
47
- // every test stays green (learning 1000198).
48
- //
49
- // It happened TWICE in one session: the second time, /workspace ran an older
50
- // capture.js and the same documented flags were dropped on the floor again.
51
- //
52
- // WHAT IT CHECKS, deliberately narrow: for every `node scripts/gds/<x>.js` in a
53
- // tracked .md, (a) the script exists, and (b) each `--flag` written next to it is
54
- // parsed by that script. Nothing else — this is not a linter for prose.
55
- //
56
- // STATIC ONLY, NEVER EXECUTED. The task says so and the reason matters: running
57
- // every documented CLI from a fitness check would be slow, would need a session,
58
- // and a command that blocks on a prompt would hang CI forever — the exact failure
59
- // R151's TTY gate exists to prevent.
60
- // Key is `<doc path>::<token>`, where token is either the script path (the whole
61
- // invocation is tolerated) or `--flag` (just that flag). Every entry carries its
62
- // reason on the same line: an unexplained entry is a silent hole, and the point of
63
- // this check is that a doc's claims are checkable.
36
+ // Check 22 in fitness.js's CHECKS. The why, the narrowness and the static-only
37
+ // rule are all in the file header above — not restated here.
38
+
64
39
  const DOC_CLI_ALLOW = new Map([
65
40
  ['.claude/skills/paint/SKILL.md::scripts/gds/art-stage.js',
66
41
  'art-stage.js ships with the art-pipeline HOST module, which publish-manifest.js excludes from core — absent from a core-only checkout by design; the skill says so inline.'],
@@ -120,6 +95,14 @@ function scanDocs(docs, { readDoc, readScript, allow = DOC_CLI_ALLOW } = {}) {
120
95
  if (!srcCache.has(rel)) srcCache.set(rel, readScript(rel));
121
96
  return srcCache.get(rel);
122
97
  };
98
+ // Memoized alongside srcCache: stripLineComments is two regex passes over a
99
+ // whole script, and it was being recomputed for EVERY flag on every invocation
100
+ // of that script. Invariant per file, so compute it once (grader, task 1003165).
101
+ const codeCache = new Map();
102
+ const codeOnly = (rel, src) => {
103
+ if (!codeCache.has(rel)) codeCache.set(rel, stripLineComments(src));
104
+ return codeCache.get(rel);
105
+ };
123
106
 
124
107
  for (const doc of docs) {
125
108
  const text = readDoc(doc);
@@ -156,7 +139,7 @@ function scanDocs(docs, { readDoc, readScript, allow = DOC_CLI_ALLOW } = {}) {
156
139
  // rather than failing is the deliberate choice: a usage banner is the
157
140
  // ONLY place some scripts name a flag they genuinely handle via a helper,
158
141
  // so failing here would resurrect the false positives that sank draft 1.
159
- if (!scriptMentionsFlag(stripLineComments(src), flag)) {
142
+ if (!scriptMentionsFlag(codeOnly(scriptRel, src), flag)) {
160
143
  warnings.push(
161
144
  `${doc} → \`node ${scriptRel} --${flag}\`: ${scriptRel} names \`--${flag}\` only in comments/usage text, `
162
145
  + 'never in code — it may be a flag whose implementation was deleted. Verify it is still handled.'
package/src/module-api.js CHANGED
@@ -1075,8 +1075,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
1075
1075
  // landed since 1.19.322 with no explicit bump. run 32680138776. (task 1002620)
1076
1076
  // 1.19.324 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1077
1077
  // landed since 1.19.323 with no explicit bump. run 32737868129. (task 1002620)
1078
+ // 1.19.325 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1079
+ // landed since 1.19.324 with no explicit bump. run 32738897943. (task 1002620)
1078
1080
  // ---------------------------------------------------------------------------
1079
- const CORE_VERSION = '1.19.324'; // CI auto-patch carrier (ADR 0161); see changelog above
1081
+ const CORE_VERSION = '1.19.325'; // CI auto-patch carrier (ADR 0161); see changelog above
1080
1082
 
1081
1083
  // A namespaced logger so a module's log lines are attributable + consistent.
1082
1084
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -58,3 +58,63 @@ test('all-present + all-wired yields zero violations', () => {
58
58
  const v = cm.evaluate(controls, { exists: () => true, read: () => 'has NEEDLE inside' });
59
59
  assert.deepEqual(v, []);
60
60
  });
61
+
62
+ // ── goal 1000077's four guards (task 1003169 / G05) ────────────────────────
63
+ // The goal exists because prose documented four failure modes and nothing
64
+ // refused them. These assert the guards themselves cannot quietly vanish —
65
+ // three are ONE LINE in fitness.js's CHECKS array, so deleting that line makes
66
+ // the check never run with nothing going red.
67
+
68
+ const GUARD_LABELS = ['G01', 'G02', 'G03', 'G04'];
69
+
70
+ test('all four goal-1000077 guards are in the manifest', () => {
71
+ for (const g of GUARD_LABELS) {
72
+ const row = cm.CONTROLS.find((c) => c.label.includes(`(${g})`));
73
+ assert.ok(row, `${g} has a manifest entry`);
74
+ assert.ok(row.file, `${g} names its file`);
75
+ assert.ok(row.wiredIn && row.wiredIn.file && row.wiredIn.needle, `${g} names where it is wired`);
76
+ assert.ok(Array.isArray(row.alsoExists) && row.alsoExists.some((f) => f.startsWith('tests/')),
77
+ `${g} names its TEST — a check whose test is gone still runs, but nothing proves it can fail`);
78
+ }
79
+ });
80
+
81
+ test('each guard file really exists and is really wired', () => {
82
+ // Not a source-text assertion: run the manifest's own evaluator over the
83
+ // real tree for just these rows.
84
+ const rows = cm.CONTROLS.filter((c) => GUARD_LABELS.some((g) => c.label.includes(`(${g})`)));
85
+ assert.equal(rows.length, 4);
86
+ assert.deepEqual(cm.evaluate(rows), [], 'no violations on the live tree');
87
+ });
88
+
89
+ test('a DELETED guard file is caught', () => {
90
+ const row = cm.CONTROLS.find((c) => c.label.includes('(G01)'));
91
+ const out = cm.evaluate([row], { exists: () => false, read: () => '' });
92
+ assert.equal(out.length, 1);
93
+ assert.match(out[0], /missing/i);
94
+ });
95
+
96
+ test('a guard UNWIRED from fitness.js is caught — the one-line deletion', () => {
97
+ // The realistic rot: someone removes the CHECKS entry and the guard sits on
98
+ // disk, never running, with a green build.
99
+ for (const g of ['G01', 'G02', 'G03']) {
100
+ const row = cm.CONTROLS.find((c) => c.label.includes(`(${g})`));
101
+ const out = cm.evaluate([row], { exists: () => true, read: () => 'const CHECKS = [];' });
102
+ assert.equal(out.length, 1, `${g} must be caught when unwired`);
103
+ }
104
+ });
105
+
106
+ test("G04 is wired via ship-flow, not fitness — it is a module, not a check", () => {
107
+ const row = cm.CONTROLS.find((c) => c.label.includes('(G04)'));
108
+ assert.equal(row.wiredIn.file, 'scripts/gds/ship-flow.js');
109
+ const out = cm.evaluate([row], { exists: () => true, read: () => 'nothing requires it' });
110
+ assert.equal(out.length, 1, 'an unrequired ship-honesty is caught');
111
+ });
112
+
113
+ test('a guard whose TEST vanished is caught', () => {
114
+ const row = cm.CONTROLS.find((c) => c.label.includes('(G02)'));
115
+ const out = cm.evaluate([row], {
116
+ exists: (f) => !String(f).startsWith('tests/'),
117
+ read: () => "require('./version-literal-guard.js')",
118
+ });
119
+ assert.ok(out.length >= 1, 'a missing test is a violation, not a shrug');
120
+ });