test(features): keep the two-feature fixture off the removable sample (09-01)
The fixture relied on reference-feature and its context, so sample removal failed on it. It now installs two synthetic features in its own context, and the invalidation flatMaps get the same explicit element types as the other composers (frozen empty arrays exposed the same union inference failure). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1b38659fce
commit
bcf8752f24
@@ -45,25 +45,38 @@ export const REST_PROFILE_BINDINGS_VALID = validateRestProfileBindings(
|
||||
API_OPERATIONS,
|
||||
Object.freeze({ PRIMARY_API: Object.freeze(["omit"] as const) }),
|
||||
);
|
||||
// 09-01. Element types are spelled out for the same reason as in
|
||||
// installed-feature-adapters.ts: flatMap over the installed-contract union
|
||||
// otherwise returns the member arrays unflattened.
|
||||
type InstalledInvalidation =
|
||||
(typeof INSTALLED_FEATURE_CONTRACTS)[number]["invalidation"];
|
||||
type InstalledTopicVersion =
|
||||
(typeof INSTALLED_FEATURE_CONTRACTS)[number]["topicVersions"][number];
|
||||
|
||||
export const INVALIDATION_REGISTRY = Object.freeze({
|
||||
topics: Object.freeze(
|
||||
INSTALLED_FEATURE_CONTRACTS.flatMap(
|
||||
(contract) => contract.invalidation.topics,
|
||||
(contract): readonly InstalledInvalidation["topics"][number][] =>
|
||||
contract.invalidation.topics,
|
||||
),
|
||||
),
|
||||
namespaces: Object.freeze(
|
||||
INSTALLED_FEATURE_CONTRACTS.flatMap(
|
||||
(contract) => contract.invalidation.namespaces,
|
||||
(contract): readonly InstalledInvalidation["namespaces"][number][] =>
|
||||
contract.invalidation.namespaces,
|
||||
),
|
||||
),
|
||||
edges: Object.freeze(
|
||||
INSTALLED_FEATURE_CONTRACTS.flatMap(
|
||||
(contract) => contract.invalidation.edges,
|
||||
(contract): readonly InstalledInvalidation["edges"][number][] =>
|
||||
contract.invalidation.edges,
|
||||
),
|
||||
),
|
||||
});
|
||||
export const INVALIDATION_TOPIC_VERSIONS = Object.freeze(
|
||||
INSTALLED_FEATURE_CONTRACTS.flatMap((contract) => contract.topicVersions),
|
||||
INSTALLED_FEATURE_CONTRACTS.flatMap(
|
||||
(contract): readonly InstalledTopicVersion[] => contract.topicVersions,
|
||||
),
|
||||
);
|
||||
export const SCHEMA_REGISTRY = composeSchemaRegistry([
|
||||
PLATFORM_SCHEMA_REGISTRY,
|
||||
|
||||
Reference in New Issue
Block a user