feat(provider): publish full unit identity product

This commit is contained in:
Codex
2026-07-24 11:42:41 +03:00
parent 8cc917508e
commit abebb9fac6
13 changed files with 801 additions and 32 deletions
@@ -14,26 +14,26 @@ import {
validateL2ExecutionPlan,
} from "../src/index.mjs";
import {
geliosProviderPackageV10,
geliosTelemetryFieldRegistryV3,
} from "../providers/gelios/v10/index.mjs";
geliosProviderPackageV11,
geliosTelemetryFieldRegistryV4,
} from "../providers/gelios/v11/index.mjs";
const positionsConnection = instantiateL2Connection(geliosProviderPackageV10, {
const positionsConnection = instantiateL2Connection(geliosProviderPackageV11, {
tenantId: "tenant-compiler-fixture",
connectionId: "gelios-compiler-fixture",
collectionProfileId: "gelios.positions.current.realtime.v7",
providerCredentialRef: "ndc-credref:provider-compiler-fixture-0001",
});
const positionsPlan = compileL2ExecutionPlan(
geliosProviderPackageV10,
geliosProviderPackageV11,
positionsConnection,
{ telemetryFieldRegistry: geliosTelemetryFieldRegistryV3 },
{ telemetryFieldRegistry: geliosTelemetryFieldRegistryV4 },
);
assert.equal(positionsPlan.schemaVersion, L2_EXECUTION_PLAN_SCHEMA_VERSION);
assert.equal(L2_EXECUTION_PLAN_COMPILER_VERSION, "1.3.0");
assert.deepEqual(L2_EXECUTION_PLAN_SUPPORTED_COMPILER_VERSIONS, ["1.1.0", "1.2.0", "1.3.0"]);
assert.equal(positionsPlan.compilerVersion, "1.3.0");
assert.equal(L2_EXECUTION_PLAN_COMPILER_VERSION, "1.4.0");
assert.deepEqual(L2_EXECUTION_PLAN_SUPPORTED_COMPILER_VERSIONS, ["1.1.0", "1.2.0", "1.3.0", "1.4.0"]);
assert.equal(positionsPlan.compilerVersion, "1.4.0");
assert.deepEqual(validateL2ExecutionPlan(positionsPlan), { ok: true, errors: [] });
assert.match(positionsPlan.executionPlanDigest, /^sha256:[a-f0-9]{64}$/);
assert.match(positionsPlan.artifacts.packageDigest, /^sha256:[a-f0-9]{64}$/);
@@ -123,9 +123,9 @@ assert.equal(Object.isFrozen(positionsPlan.steps), true);
assert.equal(Object.isFrozen(positionsPlan.graphBlueprint), true);
const clonedPlan = compileL2ExecutionPlan(
structuredClone(geliosProviderPackageV10),
structuredClone(geliosProviderPackageV11),
structuredClone(positionsConnection),
{ telemetryFieldRegistry: structuredClone(geliosTelemetryFieldRegistryV3) },
{ telemetryFieldRegistry: structuredClone(geliosTelemetryFieldRegistryV4) },
);
assert.equal(clonedPlan.executionPlanDigest, positionsPlan.executionPlanDigest);
@@ -151,34 +151,34 @@ assert.equal(
);
assert.throws(
() => compileL2ExecutionPlan(geliosProviderPackageV10, positionsConnection),
() => compileL2ExecutionPlan(geliosProviderPackageV11, positionsConnection),
/telemetry_registry_required/,
);
const profileConnection = instantiateL2Connection(geliosProviderPackageV10, {
const profileConnection = instantiateL2Connection(geliosProviderPackageV11, {
tenantId: "tenant-compiler-fixture",
connectionId: "gelios-profile-compiler-fixture",
collectionProfileId: "gelios.units.profile.cold.v1",
providerCredentialRef: "ndc-credref:provider-compiler-fixture-0001",
});
const profilePlan = compileL2ExecutionPlan(geliosProviderPackageV10, profileConnection);
const profilePlan = compileL2ExecutionPlan(geliosProviderPackageV11, profileConnection);
assert.deepEqual(validateL2ExecutionPlan(profilePlan), { ok: true, errors: [] });
assert.equal(profilePlan.artifacts.telemetryRegistryDigest, undefined);
assert.notEqual(profilePlan.executionPlanDigest, positionsPlan.executionPlanDigest);
assert.deepEqual(profilePlan.graphBlueprint.runtime.mappingRuntime.derivationKinds, []);
for (const collectionProfile of geliosProviderPackageV10.collectionProfiles) {
const connection = instantiateL2Connection(geliosProviderPackageV10, {
for (const collectionProfile of geliosProviderPackageV11.collectionProfiles) {
const connection = instantiateL2Connection(geliosProviderPackageV11, {
tenantId: "tenant-all-profiles-fixture",
connectionId: `connection-${collectionProfile.id.replaceAll(".", "-")}`,
collectionProfileId: collectionProfile.id,
providerCredentialRef: "ndc-credref:provider-all-profiles-fixture",
});
const plan = compileL2ExecutionPlan(
geliosProviderPackageV10,
geliosProviderPackageV11,
connection,
collectionProfile.dataProductId === "fleet.positions.current.v5"
? { telemetryFieldRegistry: geliosTelemetryFieldRegistryV3 }
? { telemetryFieldRegistry: geliosTelemetryFieldRegistryV4 }
: {},
);
assert.deepEqual(validateL2ExecutionPlan(plan), { ok: true, errors: [] });
@@ -188,16 +188,16 @@ for (const collectionProfile of geliosProviderPackageV10.collectionProfiles) {
assert.equal(plan.graphBlueprint.edges.length, plan.steps.length + expectedEntrypoints - 2);
}
const secondConnection = instantiateL2Connection(geliosProviderPackageV10, {
const secondConnection = instantiateL2Connection(geliosProviderPackageV11, {
tenantId: "tenant-compiler-fixture",
connectionId: "gelios-compiler-fixture-two",
collectionProfileId: "gelios.positions.current.realtime.v7",
providerCredentialRef: "ndc-credref:provider-compiler-fixture-0002",
});
const secondPlan = compileL2ExecutionPlan(
geliosProviderPackageV10,
geliosProviderPackageV11,
secondConnection,
{ telemetryFieldRegistry: geliosTelemetryFieldRegistryV3 },
{ telemetryFieldRegistry: geliosTelemetryFieldRegistryV4 },
);
assert.notEqual(secondPlan.executionPlanDigest, positionsPlan.executionPlanDigest);