fix: fail closed backend capabilities and isolate gate smoke

This commit is contained in:
jb
2026-09-19 10:01:23 -04:00
parent 1371995cbe
commit 5b0076cb20
17 changed files with 344 additions and 81 deletions
+3
View File
@@ -3,6 +3,7 @@ import { readFileSync } from 'node:fs';
import {
BASELINE_RELEASE_CAPABILITIES,
capabilityEnabled,
parseBackendCapabilityAllowlist,
parseCapabilityAllowlist,
releaseIdIsImmutable,
} from '../src/lib/server/release-gate';
@@ -23,6 +24,8 @@ describe('deployment rollout gate', () => {
expect(parseCapabilityAllowlist('')).toEqual([]);
expect(() => parseCapabilityAllowlist('asset_search,typo')).toThrow('Unknown deployment capability');
expect(() => parseCapabilityAllowlist('asset_search,')).toThrow('Unknown deployment capability');
expect(parseBackendCapabilityAllowlist('asset_sync')).toEqual(['asset_sync']);
expect(() => parseBackendCapabilityAllowlist(undefined)).toThrow('required in the backend deployment');
});
test('requires a non-placeholder production release identifier', () => {