fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s
Memind CI / Test, build, and release guards (push) Failing after 12m3s
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user