feat: add guarded portal canary release
Memind CI / Test, build, and release guards (push) Failing after 2m14s

This commit is contained in:
john
2026-07-26 19:51:44 +08:00
parent 058d646b32
commit 286069449b
33 changed files with 2161 additions and 53 deletions
+13
View File
@@ -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'
);
}