fix(bootstrap): report FEATURE_OVERRIDES keys the build does not declare (09-09)

A misspelt kill-switch key was ignored without a trace, so the feature kept
running. Boot now records feature.override.unknown once per such key, and
release admission lists them as warnings in its record without refusing the
artifact (a shared document may still name another build's features).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-25 23:25:24 +09:00
co-authored by Claude Opus 5.5
parent 69e40f106f
commit b685b616e4
8 changed files with 176 additions and 1 deletions
+11
View File
@@ -56,6 +56,7 @@ import {
import {
activeProductFeatureIds,
resolveProductFeatures,
unknownProductFeatureOverrides,
} from "../contracts/product-features.ts";
import { describeRuntimeCapabilities } from "../contracts/runtime-capabilities.ts";
import {
@@ -442,6 +443,16 @@ export async function createRuntimeAdapters(
const activeFeatureIds = new Set(
activeProductFeatureIds(productFeatureStatuses),
);
for (const key of unknownProductFeatureOverrides(
COMPILED_PRODUCT_FEATURE_IDS,
config.FEATURE_OVERRIDES,
)) {
diagnostics.record({
level: "warn",
eventId: "feature.override.unknown",
context: { feature_override_key: key },
});
}
const productFeatures = Object.freeze({
getSnapshot() {
return productFeatureStatuses;