feat: add guarded portal canary release
Memind CI / Test, build, and release guards (push) Failing after 2m14s
Memind CI / Test, build, and release guards (push) Failing after 2m14s
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const RUNTIME_ROLES = new Set(['stable', 'candidate']);
|
||||
|
||||
export function resolvePortalRuntimeRole(env = process.env) {
|
||||
const configured = String(env.MEMIND_RUNTIME_ROLE ?? '').trim().toLowerCase();
|
||||
return RUNTIME_ROLES.has(configured) ? configured : 'stable';
|
||||
}
|
||||
|
||||
export function isPassiveCanaryRuntime(env = process.env) {
|
||||
return (
|
||||
resolvePortalRuntimeRole(env) === 'candidate'
|
||||
&& String(env.MEMIND_CANARY_PASSIVE_RUNTIME ?? '1').trim() !== '0'
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user