feat(feature-flags): migrate 3 env-flags to AppConfig-backed runtime flags #19249
ci.yml
on: pull_request
Detect Version
0s
Test and Build
/
Test and Build
1m 42s
Migrate Dev DB
/
Apply Database Migrations
Check Docs Changes
Matrix: Build ARM64 (GHCR Only)
Matrix: Build Dev ECR
Matrix: Build AMD64
Matrix: Create GHCR Manifests
Process Docs
/
Process Documentation Embeddings
Create GitHub Release
Annotations
10 errors and 6 warnings
|
lib/core/config/feature-flags.test.ts > isFeatureEnabled > admin clause (lazy resolution) > uses the isAdmin override without querying:
apps/sim/lib/core/config/feature-flags.test.ts#L143
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ lib/core/config/feature-flags.test.ts:143:67
|
|
lib/core/config/feature-flags.test.ts > isFeatureEnabled > admin clause (lazy resolution) > resolves admin from userId when admins is the deciding clause:
apps/sim/lib/core/config/feature-flags.test.ts#L134
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ lib/core/config/feature-flags.test.ts:134:52
|
|
lib/core/config/feature-flags.test.ts > isFeatureEnabled > matches the orgId allowlist:
apps/sim/lib/core/config/feature-flags.test.ts#L126
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ lib/core/config/feature-flags.test.ts:126:49
|
|
lib/core/config/feature-flags.test.ts > isFeatureEnabled > matches the userId allowlist:
apps/sim/lib/core/config/feature-flags.test.ts#L119
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ lib/core/config/feature-flags.test.ts:119:50
|
|
lib/core/config/feature-flags.test.ts > isFeatureEnabled > matches the global enabled clause:
apps/sim/lib/core/config/feature-flags.test.ts#L114
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ lib/core/config/feature-flags.test.ts:114:32
|
|
lib/core/config/feature-flags.test.ts > getFeatureFlags > degrades gracefully on a malformed document:
apps/sim/lib/core/config/feature-flags.test.ts#L95
AssertionError: expected {} to deeply equal { flags: {} }
- Expected
+ Received
- {
- "flags": {},
- }
+ {}
❯ lib/core/config/feature-flags.test.ts:95:37
|
|
lib/core/config/feature-flags.test.ts > getFeatureFlags > falls back to the secret-derived document when the fetch yields null:
apps/sim/lib/core/config/feature-flags.ts#L92
Error: [vitest] No "isTruthy" export is defined on the "@/lib/core/config/env" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@/lib/core/config/env"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ fallbackFlags lib/core/config/feature-flags.ts:92:30
❯ Module.getFeatureFlags lib/core/config/feature-flags.ts:174:19
❯ lib/core/config/feature-flags.test.ts:90:12
|
|
lib/core/config/feature-flags.test.ts > getFeatureFlags > reads the feature-flags profile and normalizes the payload when enabled:
apps/sim/lib/core/config/feature-flags.test.ts#L78
AssertionError: expected undefined to deeply equal { enabled: true }
- Expected:
{
"enabled": true,
}
+ Received:
undefined
❯ lib/core/config/feature-flags.test.ts:78:21
|
|
lib/core/config/feature-flags.test.ts > getFeatureFlags > derives flags from fallback secrets (empty registry → empty) when AppConfig is disabled, without fetching:
apps/sim/lib/core/config/feature-flags.ts#L92
Error: [vitest] No "isTruthy" export is defined on the "@/lib/core/config/env" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("@/lib/core/config/env"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ fallbackFlags lib/core/config/feature-flags.ts:92:30
❯ Module.getFeatureFlags lib/core/config/feature-flags.ts:163:35
❯ lib/core/config/feature-flags.test.ts:64:18
|
|
Test and Build / Test and Build
sim#test: command (/home/runner/_work/sim/sim/apps/sim) /home/runner/.bun/bin/bun run test exited (1)
|
|
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
|
|
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
|
|
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
|
|
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
|
|
Test and Build / Test and Build
Skipping sticky disk commit due to previous step failures
|
|
Test and Build / Test and Build
Found 2 failed/cancelled steps in previous workflow steps
|