fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s

This commit is contained in:
john
2026-07-26 14:32:01 +08:00
parent d3141a3e91
commit b1577a16e9
61 changed files with 6017 additions and 89 deletions
+16 -14
View File
@@ -185,21 +185,23 @@ export async function bootstrapPortalAgentServices({
const wordFilterService =
createWordFilterServiceFn(pool);
const relayBootstrapTask = llmProviderService
.ensureBootstrapRelay()
.then((result) => {
if (result.created) {
logger.log(
`LLM relay bootstrap created: ${relayBootstrap.name}`,
const relayBootstrapTask = env.H5_RELAY_BOOTSTRAP_DISABLED === '1'
? Promise.resolve({ ok: true, created: false, skipped: true })
: llmProviderService
.ensureBootstrapRelay()
.then((result) => {
if (result.created) {
logger.log(
`LLM relay bootstrap created: ${relayBootstrap.name}`,
);
}
})
.catch((error) => {
logger.warn(
'LLM relay bootstrap skipped:',
error instanceof Error ? error.message : error,
);
}
})
.catch((error) => {
logger.warn(
'LLM relay bootstrap skipped:',
error instanceof Error ? error.message : error,
);
});
});
void relayBootstrapTask;
const providerSyncTask = llmProviderService
@@ -410,3 +410,17 @@ test('keeps disabled experience null and reports background LLM failures', async
),
);
});
test('can disable relay bootstrap for backend-LLM-only isolated runs', async () => {
const setup = createSetup({
env: {
EXPERIENCE_PG_URL: 'postgres://experience',
H5_RELAY_BOOTSTRAP_DISABLED: '1',
},
});
const result = await bootstrapPortalAgentServices(setup.options);
await Promise.all([result.relayBootstrapTask, result.providerSyncTask]);
assert.equal(result.relayBootstrapTask instanceof Promise, true);
assert.equal(setup.calls.some(([name]) => name === 'relay-bootstrap'), false);
assert.equal(setup.calls.some(([name]) => name === 'provider-sync'), true);
});