@bongos/core 1.20.61 → 1.20.63
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 +82 -37
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +2 -0
- package/clients/bongos-client/index.cjs +2 -0
- package/clients/bongos-client/index.d.ts +5 -1
- package/clients/bongos-client/index.mjs +2 -0
- package/docs/adr/0357-the-update-rule-set-on-deploy-is-the-one-the-sweep-follows.md +2 -0
- package/docs/api/openapi.json +96 -3
- package/docs/api-reference.md +4 -3
- package/docs/copy-inventory.md +372 -324
- package/docs/copy-registry.json +881 -417
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-inventory.json +4 -1
- package/docs/page-readings.json +544 -481
- package/docs/recipes/upgrading-the-core.md +32 -1
- package/modules/provisioning/demo.js +176 -0
- package/modules/provisioning/migrations/provisioning_035_demo.sql +26 -0
- package/modules/provisioning/module.json +5 -3
- package/modules/provisioning/pollers/demo-archive.js +61 -0
- package/modules/provisioning/provisioning.js +2 -2
- package/modules/provisioning/routes/demo.js +54 -0
- package/modules/provisioning/routes/provisioning.js +7 -4
- package/modules/public-landing/public/projects-demo.states.json +53 -0
- package/modules/public-landing/public/projects.html +300 -23
- package/modules/public-landing/public/projects.probes.json +3 -3
- package/modules/public-landing/public/projects.states.json +2 -1
- package/modules/ui-design/kit/fixtures/provisioning-instances-demo.json +114 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +20 -0
- package/scripts/gds/provision-core-upgrade.js +16 -1
- package/scripts/gds/update-channel.js +11 -2
- package/scripts/gds/update-sweep.js +717 -0
- package/src/module-api.js +1 -1
- package/tests/core_upgrade_runner.mjs +13 -0
- package/tests/update_channel_db.mjs +13 -6
- package/tests/update_subscription_engine.mjs +5 -5
- package/tests/update_sweep_home.mjs +100 -0
- package/tests/wizard_demo.mjs +264 -0
- package/tests/wizard_front_door.mjs +16 -20
package/release-notes.json
CHANGED
|
@@ -8483,5 +8483,25 @@
|
|
|
8483
8483
|
"id": "1004407",
|
|
8484
8484
|
"text": "The Gate page now shows, for each Autobongos runner, which PC it is on, which Claude account it is spending, which code version it runs (and whether that is behind), and says \"Restarting\" while it relaunches for new code inste"
|
|
8485
8485
|
}
|
|
8486
|
+
],
|
|
8487
|
+
"1.20.62": [
|
|
8488
|
+
{
|
|
8489
|
+
"id": "1004047",
|
|
8490
|
+
"text": "Every live project now runs a version whose update banner works, so each owner sees when an update is waiting."
|
|
8491
|
+
},
|
|
8492
|
+
{
|
|
8493
|
+
"id": "1004420",
|
|
8494
|
+
"text": "\"Try the demo\" now works. A small team picks how many people and how many hours each, writes an idea, and gets a first read of what fits. The demo picks the settings for them (the founder decides, no rewards, all managed, priv"
|
|
8495
|
+
},
|
|
8496
|
+
{
|
|
8497
|
+
"id": "1004307",
|
|
8498
|
+
"text": "The automatic update on cloudbongos.com will now always run the newest version of itself, instead of a copy stuck from August."
|
|
8499
|
+
}
|
|
8500
|
+
],
|
|
8501
|
+
"1.20.63": [
|
|
8502
|
+
{
|
|
8503
|
+
"id": "1004405",
|
|
8504
|
+
"text": "When the Upgrade button refuses a jump to a new release line, it now tells you exactly which setting on /deploy to change, instead of pointing at a setting that didn't exist."
|
|
8505
|
+
}
|
|
8486
8506
|
]
|
|
8487
8507
|
}
|
|
@@ -137,11 +137,26 @@ function targetFault(to, available, installed, channel, channelAllows) {
|
|
|
137
137
|
return `could not read the core version installed at this instance — nothing was changed. An upgrade that cannot say where it is starting from cannot be bounded by the '${channel}' channel.`;
|
|
138
138
|
}
|
|
139
139
|
if (channelAllows && !channelAllows(installed, to, channel)) {
|
|
140
|
-
return `core ${to} is outside this project's '${channel}' update channel — nothing was changed.
|
|
140
|
+
return `core ${to} is outside this project's '${channel}' update channel — nothing was changed. ${channelNextStep(channel)}`;
|
|
141
141
|
}
|
|
142
142
|
return null;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
// The step that gets a channel-refused move through, named by the control a person can
|
|
146
|
+
// actually reach (task 1004405). The old line said "change the channel first" while no
|
|
147
|
+
// channel could be changed; the update rule on /deploy (task 1004445) is that control now,
|
|
148
|
+
// and its labels are the words used here. `minor` is the widest rule, so a move it refuses
|
|
149
|
+
// (a major, a prerelease) has no rule to widen to and is named as the by-hand step it is.
|
|
150
|
+
function channelNextStep(channel) {
|
|
151
|
+
if (channel === 'pinned') {
|
|
152
|
+
return 'Its update rule on /deploy is "Stay put"; change it to "Fixes only" or "Fixes and new releases", then move again.';
|
|
153
|
+
}
|
|
154
|
+
if (channel === 'minor') {
|
|
155
|
+
return 'No update rule moves a project across a major version or onto a prerelease; that move is made by hand with upgrade.js (docs/recipes/upgrading-the-core.md).';
|
|
156
|
+
}
|
|
157
|
+
return 'To take a new release line, set this project\'s update rule on /deploy to "Fixes and new releases" (or press "Allow new releases and move"), then move again.';
|
|
158
|
+
}
|
|
159
|
+
|
|
145
160
|
// The update channel that bounds a move for THIS instance (task 1004445): the row's own
|
|
146
161
|
// `update_channel`, normalised by update-channel.js so anything unknown or absent (a row
|
|
147
162
|
// read before migration provisioning_029) falls back to DEFAULT_CHANNEL. PURE. One helper
|
|
@@ -243,6 +243,14 @@ function loadSubscriptions({ instanceDir = process.cwd(), fsImpl = fs, file = SU
|
|
|
243
243
|
//
|
|
244
244
|
// A failure's reason is a fixed class, never psql's own text: stderr can name a DB user or host,
|
|
245
245
|
// and the reason is printed into the sweep's log.
|
|
246
|
+
//
|
|
247
|
+
// WHICH DATABASE (task 1004307). UPDATE_CHANNEL_DB names it first. That is the one a control-plane
|
|
248
|
+
// unit should set, NOT PGDATABASE: the sweep hands its own env to every upgrade it spawns
|
|
249
|
+
// ({ ...process.env, ...inst.env }), so a unit-level PGDATABASE would reach any tenant whose roster
|
|
250
|
+
// entry names no database of its own, and that tenant's migrate would run against the control
|
|
251
|
+
// plane's database. UPDATE_CHANNEL_DB means nothing to the upgrade, so it cannot leak that way.
|
|
252
|
+
// It takes a bare db name or a connection string, as psql -d does.
|
|
253
|
+
const CHANNEL_DB_ENV = 'UPDATE_CHANNEL_DB';
|
|
246
254
|
const CHANNEL_SOURCE_DEPLOY = 'deploy';
|
|
247
255
|
const CHANNEL_SOURCE_ROSTER = 'roster';
|
|
248
256
|
const DB_CHANNELS_SQL = 'SELECT slug, update_channel FROM provisioning_instances';
|
|
@@ -268,8 +276,8 @@ function channelLine(inst) {
|
|
|
268
276
|
// { ok:false, reason } when there is no database to ask, psql is missing, or the table is absent
|
|
269
277
|
// (an instance with the provisioning module off). The caller falls back to the roster and says why.
|
|
270
278
|
function readDbChannels({ env = process.env, run = spawnSync } = {}) {
|
|
271
|
-
const target = env.DATABASE_URL || env.PGDATABASE;
|
|
272
|
-
if (!target) return { ok: false, reason:
|
|
279
|
+
const target = env[CHANNEL_DB_ENV] || env.DATABASE_URL || env.PGDATABASE;
|
|
280
|
+
if (!target) return { ok: false, reason: `no ${CHANNEL_DB_ENV} (or DATABASE_URL / PGDATABASE) set for the sweep` };
|
|
273
281
|
const r = run('psql', ['-d', target, '-At', '-F', '\t', '-v', 'ON_ERROR_STOP=1', '--no-psqlrc', '-c', DB_CHANNELS_SQL],
|
|
274
282
|
{ encoding: 'utf8', timeout: DB_CHANNELS_TIMEOUT_MS });
|
|
275
283
|
if (!r || r.error) {
|
|
@@ -399,6 +407,7 @@ module.exports = {
|
|
|
399
407
|
parseNpmViewVersions,
|
|
400
408
|
loadSubscriptions,
|
|
401
409
|
readDbChannels,
|
|
410
|
+
CHANNEL_DB_ENV,
|
|
402
411
|
applyDbChannels,
|
|
403
412
|
channelLine,
|
|
404
413
|
psqlFailureClass,
|