feat(deploy): register normalized identity transition
This commit is contained in:
@@ -698,6 +698,67 @@ ENGINE_MCP_EXECUTION_PLAN_MODULE_OWNERSHIP_TARGET_SHA256 = {
|
||||
ENGINE_MCP_EXECUTION_PLAN_MODULE_OWNERSHIP_NEW_PATHS = (
|
||||
ENGINE_MCP_EXECUTION_PLAN_MODULE_OWNERSHIP_DESCRIPTOR_REL,
|
||||
)
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_DESCRIPTOR_REL = (
|
||||
"nodedc-source/server/deployTransitions/normalizedIdentitySearchV1.json"
|
||||
)
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_ARTIFACT_ENTRIES = (
|
||||
"nodedc-source/server/routes/n8n.js",
|
||||
"nodedc-source/server/routes/engineAgentGateway.js",
|
||||
"nodedc-source/server/l2ExecutionPlan/compiler.js",
|
||||
"nodedc-source/server/assets/execution-plans/v1/catalog.json",
|
||||
"nodedc-source/server/assets/provider-packages/v1/catalog.json",
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_DESCRIPTOR_REL,
|
||||
ENGINE_NODE_INTELLIGENCE_DESCRIPTOR_REL,
|
||||
)
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_PREDECESSOR_SHA256 = {
|
||||
"nodedc-source/server/routes/n8n.js":
|
||||
"391fc81228fdacd6efc6c0868991a3485f71869708e49ac15819db6ccce1bfce",
|
||||
"nodedc-source/server/routes/engineAgentGateway.js":
|
||||
"17c5f502b3ceacc45278eef7418d08e1e55a8b3e46e00942e559d25566fdba41",
|
||||
"nodedc-source/server/l2ExecutionPlan/compiler.js":
|
||||
"4854a62fb44cb3dd715f2cb8728740575453a666f5c31abe9d41bc2562be5e95",
|
||||
"nodedc-source/server/assets/execution-plans/v1/catalog.json":
|
||||
"2e70b607b4a347592ce2f4732f6da0781ac94ec4829ac336021cb501fdafe9aa",
|
||||
"nodedc-source/server/assets/provider-packages/v1/catalog.json":
|
||||
"2fce1c623a8acf9c01a43463e6d38eda71ad28379a2d91b2ca40f31f8dccf3c6",
|
||||
ENGINE_NODE_INTELLIGENCE_DESCRIPTOR_REL:
|
||||
"4cdeb85ebb2e43f088f095f75b7fc31aabd8ab81c8ac96ded4aafd7dbd8e30bd",
|
||||
}
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_FOUNDATION_SHA256 = {
|
||||
"nodedc-source/server/l2ExecutionPlan/catalog.js":
|
||||
"c35b4c7ad9319aabbf1366a11ff52a6e99d961893bafdfcb4e84fc5f24fc04be",
|
||||
"nodedc-source/server/l2ExecutionPlan/materializer.js":
|
||||
"dabf0073520049d7a04d1962b29e591ae092b87b287a50534ad2d98b03ae683c",
|
||||
ENGINE_MCP_EXECUTION_PROFILE_DECODER_DESCRIPTOR_REL:
|
||||
"93e431902e9bcd3b828a82ed6b42b48d939051f21bf8824dafcf2addac8a711c",
|
||||
ENGINE_MCP_TELEMETRY_CATALOG_DESCRIPTOR_REL:
|
||||
"b25ab8b6e6ad8ac24614c4630cc3635abe453464466d5a72238b05e48a24d882",
|
||||
ENGINE_MCP_EXECUTION_PLAN_MATERIALIZATION_DESCRIPTOR_REL:
|
||||
"52c0152cff49c251be5581a9209d2e63ba710c16e815bdd6ece24f7c9dd7e480",
|
||||
ENGINE_MCP_EXECUTION_PLAN_TELEMETRY_RUNTIME_DESCRIPTOR_REL:
|
||||
"68b275efb6303284336d8b637c966c24d891a4bd0b3fec4fb83247359929ef79",
|
||||
ENGINE_MCP_EXECUTION_PLAN_MODULE_OWNERSHIP_DESCRIPTOR_REL:
|
||||
"d187d539a219fec453e06c55c3f5486ef66059371b4ae9b145266307b2af9889",
|
||||
}
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256 = {
|
||||
"nodedc-source/server/routes/n8n.js":
|
||||
"a2bc69c72f68e57ed27120d0c88f4ffe6310bbf0c4360c8b0dba0953ccaaf522",
|
||||
"nodedc-source/server/routes/engineAgentGateway.js":
|
||||
"4a9524fd954320277042c783b7b19cbb2172f075f27652c0eebfd743ffc47872",
|
||||
"nodedc-source/server/l2ExecutionPlan/compiler.js":
|
||||
"01958d541c778002d33e3aead0cfe02df2084eb7222ce941cc7149d73a10f135",
|
||||
"nodedc-source/server/assets/execution-plans/v1/catalog.json":
|
||||
"2b8e5ee3d73d16f3cd6e34d1f7394946a6270a17b0e9e6511f12921ba2561fd3",
|
||||
"nodedc-source/server/assets/provider-packages/v1/catalog.json":
|
||||
"fe5256fd2ba295819daecc8d2acae34687e807978a6730dfa20703cb3bab0c1b",
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_DESCRIPTOR_REL:
|
||||
"41738185fe103642912b0aa1c29c51860970c38f9f916cc3725e79e258b9ea7e",
|
||||
ENGINE_NODE_INTELLIGENCE_DESCRIPTOR_REL:
|
||||
"3e7aeb1d28eb291461f79cd656ece6488bc6d372124088e92f53bf89c3373f61",
|
||||
}
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_NEW_PATHS = (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_DESCRIPTOR_REL,
|
||||
)
|
||||
ENGINE_AGENT_FULL_GRANT_MIGRATION_ARTIFACT_ENTRIES = (
|
||||
ENGINE_AGENT_FULL_GRANT_MIGRATION_STORE_REL,
|
||||
)
|
||||
@@ -3398,6 +3459,7 @@ def validate_engine_node_intelligence_transition(payload_dir, entries):
|
||||
"const ENGINE_AGENT_MCP_VERSION = '0.8.0'",
|
||||
"const ENGINE_AGENT_MCP_VERSION = '0.9.0'",
|
||||
"const ENGINE_AGENT_MCP_VERSION = '0.10.0'",
|
||||
"const ENGINE_AGENT_MCP_VERSION = '0.11.0'",
|
||||
)
|
||||
):
|
||||
die("Engine node-intelligence gateway MCP version is not registered")
|
||||
@@ -4679,6 +4741,50 @@ process.stdout.write('engine-mcp-execution-plan-module-ownership:0.10.0:module-s
|
||||
}
|
||||
|
||||
|
||||
def accept_engine_mcp_normalized_identity_search_runtime():
|
||||
root = component_root("engine")
|
||||
validate_engine_mcp_normalized_identity_search_slice(
|
||||
root,
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_ARTIFACT_ENTRIES,
|
||||
)
|
||||
live = run_engine_backend_probe(
|
||||
(
|
||||
"node",
|
||||
"--input-type=module",
|
||||
"-e",
|
||||
"""
|
||||
const fs=await import('node:fs/promises');
|
||||
const gateway=await import('file:///app/server/routes/engineAgentGateway.js');
|
||||
const executionCatalog=JSON.parse(await fs.readFile('/app/server/assets/execution-plans/v1/catalog.json','utf8'));
|
||||
const securityCatalog=JSON.parse(await fs.readFile('/app/server/assets/provider-packages/v1/catalog.json','utf8'));
|
||||
const route=await fs.readFile('/app/server/routes/n8n.js','utf8');
|
||||
const compiler=await fs.readFile('/app/server/l2ExecutionPlan/compiler.js','utf8');
|
||||
const tool=gateway.engineAgentTools.find((item)=>item.name==='engine_find_normalized_subjects');
|
||||
const packageV11=executionCatalog.packages?.find((item)=>item.id==='gelios.provider.v11');
|
||||
const securityV11=securityCatalog.packages?.find((item)=>item.id==='gelios.provider.v11');
|
||||
const identityProfile=packageV11?.profiles?.find((item)=>item.dataProductId==='fleet.units.identity.current.v1');
|
||||
const identityCapability=securityV11?.capabilities?.find((item)=>item.id==='gelios.units.identity.read');
|
||||
if(gateway.ENGINE_AGENT_MCP_VERSION!=='0.11.0'||!tool?.inputSchema?.properties?.boundingBox||!tool?.inputSchema?.properties?.fields||!route.includes('normalizedFactsOnly: true')||!route.includes('rawExecutionDataIncluded: false')||!route.includes('commandSurfaceIncluded: false')||!compiler.includes('boundedStringList')||!compiler.includes('boundedNamedValues')||/gelios|robot2b/i.test(compiler)||executionCatalog.runtime?.compilerVersions?.join(',')!=='1.1.0,1.2.0,1.3.0,1.4.0'||packageV11?.contractDigest!=='sha256:4bf211d9ed6cfd227df444d49d8c5ce77a24389ed2ba3d159d53d83e0d4738d9'||!identityProfile||identityCapability?.classification!=='read'||identityCapability?.dataProductIds?.join(',')!=='fleet.units.identity.current.v1')process.exit(2);
|
||||
process.stdout.write('engine-mcp-normalized-identity-search:0.11.0:canonical-facts:full-admin-identifiers:read-only:v1');
|
||||
""".strip(),
|
||||
),
|
||||
"Engine MCP normalized identity search",
|
||||
container_id=engine_backend_container_id(),
|
||||
)
|
||||
expected = (
|
||||
"engine-mcp-normalized-identity-search:"
|
||||
"0.11.0:canonical-facts:full-admin-identifiers:read-only:v1"
|
||||
)
|
||||
if live != expected:
|
||||
die("Engine MCP normalized identity search live acceptance mismatch")
|
||||
return {
|
||||
"target_sha256": dict(
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256
|
||||
),
|
||||
"live": live,
|
||||
}
|
||||
|
||||
|
||||
def validate_no_lifecycle_scripts(payload_dir, label):
|
||||
forbidden = ("preinstall", "install", "postinstall", "prepare", "prepack", "postpack")
|
||||
for package_path in payload_dir.rglob("package.json"):
|
||||
@@ -5816,6 +5922,188 @@ def validate_engine_mcp_execution_plan_module_ownership_slice(
|
||||
)
|
||||
|
||||
|
||||
def validate_engine_mcp_normalized_identity_search_slice(payload_dir, entries):
|
||||
if tuple(entries) != ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_ARTIFACT_ENTRIES:
|
||||
die(
|
||||
"Engine MCP normalized identity search files.txt exact set/order "
|
||||
"mismatch"
|
||||
)
|
||||
for rel, expected_sha256 in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256.items()
|
||||
):
|
||||
path = payload_dir / rel
|
||||
try:
|
||||
path_stat = path.lstat()
|
||||
except FileNotFoundError:
|
||||
die(f"Engine MCP normalized identity search target is missing: {rel}")
|
||||
if (
|
||||
stat.S_ISLNK(path_stat.st_mode)
|
||||
or not stat.S_ISREG(path_stat.st_mode)
|
||||
or sha256_file(path) != expected_sha256
|
||||
):
|
||||
die(
|
||||
"Engine MCP normalized identity search target sha256 mismatch: "
|
||||
f"{rel}"
|
||||
)
|
||||
|
||||
descriptor = read_strict_json(
|
||||
payload_dir / ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_DESCRIPTOR_REL,
|
||||
"Engine MCP normalized identity search descriptor",
|
||||
max_bytes=32 * 1024,
|
||||
)
|
||||
expected_descriptor = {
|
||||
"schemaVersion": "nodedc.engine.deploy-transition/v1",
|
||||
"id": "engine-mcp-normalized-identity-search-v1",
|
||||
"component": "engine",
|
||||
"scope": "external-mcp-readonly-identity-discovery",
|
||||
"mcpVersion": "0.11.0",
|
||||
"sourcePaths": [
|
||||
"nodedc-source/server/routes/n8n.js",
|
||||
"nodedc-source/server/routes/engineAgentGateway.js",
|
||||
"nodedc-source/server/l2ExecutionPlan/compiler.js",
|
||||
"nodedc-source/server/assets/execution-plans/v1/catalog.json",
|
||||
"nodedc-source/server/assets/provider-packages/v1/catalog.json",
|
||||
],
|
||||
"normalizedFactSearch": {
|
||||
"tool": "engine_find_normalized_subjects",
|
||||
"authority": "granted-execution-normalized-facts",
|
||||
"matchModes": ["exact", "prefix", "contains"],
|
||||
"queryScopes": ["canonical-fields", "point-bounding-box"],
|
||||
"fullAdministrativeIdentifiers": True,
|
||||
"rawExecutionData": False,
|
||||
"rawProviderPayload": False,
|
||||
"commandSurface": False,
|
||||
},
|
||||
"executionPlanRuntime": {
|
||||
"compilerVersionAdded": "1.4.0",
|
||||
"legacyCompilerVersionsPreserved": ["1.1.0", "1.2.0", "1.3.0"],
|
||||
"derivationKindsAdded": [
|
||||
"bounded_string_list",
|
||||
"bounded_named_values",
|
||||
],
|
||||
"providerSpecificLogicInEngine": False,
|
||||
},
|
||||
"providerPackageTrust": {
|
||||
"addedPackageId": "gelios.provider.v11",
|
||||
"addedPackageDigest":
|
||||
"sha256:4bf211d9ed6cfd227df444d49d8c5ce77a24389ed2ba3d159d53d83e0d4738d9",
|
||||
"identityCapabilityId": "gelios.units.identity.read",
|
||||
"identityDataProductId": "fleet.units.identity.current.v1",
|
||||
"legacyPackagesPreserved": True,
|
||||
},
|
||||
"reverseGeocodingChanged": False,
|
||||
"embeddedCodexChanged": False,
|
||||
}
|
||||
if descriptor != expected_descriptor:
|
||||
die("Engine MCP normalized identity search descriptor contract mismatch")
|
||||
|
||||
gateway_source = (
|
||||
payload_dir / ENGINE_NODE_INTELLIGENCE_GATEWAY_REL
|
||||
).read_text(encoding="utf-8")
|
||||
route_source = (
|
||||
payload_dir / "nodedc-source/server/routes/n8n.js"
|
||||
).read_text(encoding="utf-8")
|
||||
compiler_source = (
|
||||
payload_dir / "nodedc-source/server/l2ExecutionPlan/compiler.js"
|
||||
).read_text(encoding="utf-8")
|
||||
for marker in (
|
||||
"engine_find_normalized_subjects",
|
||||
"const ENGINE_AGENT_MCP_VERSION = '0.11.0'",
|
||||
):
|
||||
if marker not in gateway_source:
|
||||
die(
|
||||
"Engine MCP normalized identity search gateway marker missing: "
|
||||
f"{marker}"
|
||||
)
|
||||
for marker in (
|
||||
"normalized-fact-search",
|
||||
"normalizedFactsOnly: true",
|
||||
"rawExecutionDataIncluded: false",
|
||||
"commandSurfaceIncluded: false",
|
||||
):
|
||||
if marker not in route_source:
|
||||
die(
|
||||
"Engine MCP normalized identity search route marker missing: "
|
||||
f"{marker}"
|
||||
)
|
||||
for marker in ("boundedStringList", "boundedNamedValues", "'1.4.0'"):
|
||||
if marker not in compiler_source:
|
||||
die(
|
||||
"Engine MCP normalized identity search compiler marker missing: "
|
||||
f"{marker}"
|
||||
)
|
||||
if re.search(r"gelios|robot2b", compiler_source, re.IGNORECASE):
|
||||
die("Engine MCP normalized identity search contains provider hardcode")
|
||||
|
||||
execution_catalog = read_strict_json(
|
||||
payload_dir
|
||||
/ "nodedc-source/server/assets/execution-plans/v1/catalog.json",
|
||||
"Engine execution plan catalog",
|
||||
max_bytes=1024 * 1024,
|
||||
)
|
||||
package_by_id = {
|
||||
package.get("id"): package
|
||||
for package in execution_catalog.get("packages", [])
|
||||
if isinstance(package, dict)
|
||||
}
|
||||
gelios_v11 = package_by_id.get("gelios.provider.v11", {})
|
||||
if (
|
||||
execution_catalog.get("runtime", {}).get("compilerVersions")
|
||||
!= ["1.1.0", "1.2.0", "1.3.0", "1.4.0"]
|
||||
or gelios_v11.get("contractDigest")
|
||||
!= "sha256:4bf211d9ed6cfd227df444d49d8c5ce77a24389ed2ba3d159d53d83e0d4738d9"
|
||||
or not any(
|
||||
profile.get("dataProductId") == "fleet.units.identity.current.v1"
|
||||
for profile in gelios_v11.get("profiles", [])
|
||||
if isinstance(profile, dict)
|
||||
)
|
||||
):
|
||||
die("Engine MCP normalized identity search execution catalog mismatch")
|
||||
|
||||
security_catalog = read_strict_json(
|
||||
payload_dir
|
||||
/ "nodedc-source/server/assets/provider-packages/v1/catalog.json",
|
||||
"Engine provider security catalog",
|
||||
max_bytes=512 * 1024,
|
||||
)
|
||||
security_package = next(
|
||||
(
|
||||
package
|
||||
for package in security_catalog.get("packages", [])
|
||||
if isinstance(package, dict)
|
||||
and package.get("id") == "gelios.provider.v11"
|
||||
),
|
||||
{},
|
||||
)
|
||||
capabilities = security_package.get("capabilities", [])
|
||||
if (
|
||||
len(capabilities) != 1
|
||||
or capabilities[0].get("id") != "gelios.units.identity.read"
|
||||
or capabilities[0].get("classification") != "read"
|
||||
or capabilities[0].get("dataProductIds")
|
||||
!= ["fleet.units.identity.current.v1"]
|
||||
):
|
||||
die("Engine MCP normalized identity search security catalog mismatch")
|
||||
|
||||
node_intelligence_descriptor = read_engine_node_intelligence_descriptor(
|
||||
payload_dir / ENGINE_NODE_INTELLIGENCE_DESCRIPTOR_REL,
|
||||
"Engine MCP normalized identity search node-intelligence descriptor",
|
||||
)
|
||||
if (
|
||||
node_intelligence_descriptor.get("action") != "activate"
|
||||
or node_intelligence_descriptor.get("releaseId")
|
||||
!= ENGINE_NODE_INTELLIGENCE_RELEASE_ID
|
||||
or node_intelligence_descriptor.get("source", {}).get("gatewaySha256")
|
||||
!= ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256[
|
||||
ENGINE_NODE_INTELLIGENCE_GATEWAY_REL
|
||||
]
|
||||
):
|
||||
die(
|
||||
"Engine MCP normalized identity search node-intelligence "
|
||||
"attestation contract mismatch"
|
||||
)
|
||||
|
||||
|
||||
def validate_engine_agent_full_grant_migration_slice(payload_dir, entries):
|
||||
if tuple(entries) != ENGINE_AGENT_FULL_GRANT_MIGRATION_ARTIFACT_ENTRIES:
|
||||
die("Engine agent full grant migration files.txt exact set/order mismatch")
|
||||
@@ -6247,6 +6535,10 @@ def load_artifact(artifact, work_dir):
|
||||
manifest["component"],
|
||||
entries,
|
||||
)
|
||||
and not is_engine_mcp_normalized_identity_search_slice(
|
||||
manifest["component"],
|
||||
entries,
|
||||
)
|
||||
and not is_engine_provider_authority_diagnostics_slice(
|
||||
manifest["component"],
|
||||
entries,
|
||||
@@ -6304,6 +6596,14 @@ def load_artifact(artifact, work_dir):
|
||||
payload_dir,
|
||||
entries,
|
||||
)
|
||||
if is_engine_mcp_normalized_identity_search_slice(
|
||||
manifest["component"],
|
||||
entries,
|
||||
):
|
||||
validate_engine_mcp_normalized_identity_search_slice(
|
||||
payload_dir,
|
||||
entries,
|
||||
)
|
||||
if is_engine_provider_security_catalog_slice(manifest["component"], entries):
|
||||
validate_engine_provider_security_catalog_payload(payload_dir, entries)
|
||||
if touches_engine_credential_sink(manifest["component"], entries):
|
||||
@@ -6337,6 +6637,10 @@ def load_artifact(artifact, work_dir):
|
||||
manifest["component"],
|
||||
entries,
|
||||
)
|
||||
and not is_engine_mcp_normalized_identity_search_slice(
|
||||
manifest["component"],
|
||||
entries,
|
||||
)
|
||||
and (
|
||||
touches_engine_data_product_publish_grant(entries)
|
||||
or ENGINE_DATA_PRODUCT_PUBLISH_GRANT_OVERRIDE_REL in entries
|
||||
@@ -6558,6 +6862,15 @@ def is_engine_mcp_execution_plan_module_ownership_slice(component, entries):
|
||||
)
|
||||
|
||||
|
||||
def is_engine_mcp_normalized_identity_search_slice(component, entries):
|
||||
return (
|
||||
component == "engine"
|
||||
and entries is not None
|
||||
and tuple(entries)
|
||||
== ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_ARTIFACT_ENTRIES
|
||||
)
|
||||
|
||||
|
||||
def is_engine_agent_full_grant_migration_slice(component, entries):
|
||||
return (
|
||||
component == "engine"
|
||||
@@ -7313,6 +7626,83 @@ def preflight_engine_mcp_execution_plan_module_ownership_predecessor():
|
||||
}
|
||||
|
||||
|
||||
def preflight_engine_mcp_normalized_identity_search_predecessor():
|
||||
root = component_root("engine")
|
||||
actual = {}
|
||||
for rel, expected_sha256 in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_PREDECESSOR_SHA256.items()
|
||||
):
|
||||
path = root / rel
|
||||
try:
|
||||
path_stat = path.lstat()
|
||||
except FileNotFoundError:
|
||||
die(
|
||||
"Engine MCP normalized identity search predecessor is "
|
||||
f"missing: {rel}"
|
||||
)
|
||||
if stat.S_ISLNK(path_stat.st_mode) or not stat.S_ISREG(path_stat.st_mode):
|
||||
die(
|
||||
"Engine MCP normalized identity search predecessor is "
|
||||
f"unsafe: {rel}"
|
||||
)
|
||||
actual_sha256 = sha256_file(path)
|
||||
if actual_sha256 != expected_sha256:
|
||||
die(
|
||||
"Engine MCP normalized identity search predecessor drift "
|
||||
f"detected: path={rel} expected={expected_sha256} "
|
||||
f"actual={actual_sha256}"
|
||||
)
|
||||
actual[rel] = actual_sha256
|
||||
|
||||
foundation = {}
|
||||
for rel, expected_sha256 in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_FOUNDATION_SHA256.items()
|
||||
):
|
||||
path = root / rel
|
||||
try:
|
||||
path_stat = path.lstat()
|
||||
except FileNotFoundError:
|
||||
die(
|
||||
"Engine MCP normalized identity search foundation is "
|
||||
f"missing: {rel}"
|
||||
)
|
||||
if (
|
||||
stat.S_ISLNK(path_stat.st_mode)
|
||||
or not stat.S_ISREG(path_stat.st_mode)
|
||||
or sha256_file(path) != expected_sha256
|
||||
):
|
||||
die(
|
||||
"Engine MCP normalized identity search foundation drift "
|
||||
f"detected: {rel}"
|
||||
)
|
||||
foundation[rel] = expected_sha256
|
||||
|
||||
for rel in ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_NEW_PATHS:
|
||||
path = root / rel
|
||||
if path.exists() or path.is_symlink():
|
||||
die(
|
||||
"Engine MCP normalized identity search new path already "
|
||||
f"exists: {rel}"
|
||||
)
|
||||
|
||||
backend = preflight_engine_credential_backend_runtime()
|
||||
if backend["mode"] != "verified-derived-retry":
|
||||
die(
|
||||
"Engine MCP normalized identity search requires the active "
|
||||
"immutable backend"
|
||||
)
|
||||
return {
|
||||
"mode": "classified-aspects-v1-to-normalized-identity-search-v1",
|
||||
"predecessor_sha256": actual,
|
||||
"foundation_sha256": foundation,
|
||||
"target_sha256": dict(
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256
|
||||
),
|
||||
"new_paths": tuple(ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_NEW_PATHS),
|
||||
"backend_mode": backend["mode"],
|
||||
}
|
||||
|
||||
|
||||
def preflight_engine_agent_full_grant_migration_predecessor():
|
||||
root = component_root("engine")
|
||||
store_path = root / ENGINE_AGENT_FULL_GRANT_MIGRATION_STORE_REL
|
||||
@@ -7371,6 +7761,7 @@ def component_services(component, entries=None):
|
||||
or is_engine_mcp_execution_plan_materialization_slice(component, entries)
|
||||
or is_engine_mcp_execution_plan_telemetry_runtime_slice(component, entries)
|
||||
or is_engine_mcp_execution_plan_module_ownership_slice(component, entries)
|
||||
or is_engine_mcp_normalized_identity_search_slice(component, entries)
|
||||
or is_engine_provider_security_catalog_slice(component, entries)
|
||||
):
|
||||
# This slice updates only the existing Engine backend control plane.
|
||||
@@ -9584,6 +9975,7 @@ def plan_artifact(artifact):
|
||||
mcp_execution_plan_materialization_preflight = None
|
||||
mcp_execution_plan_telemetry_runtime_preflight = None
|
||||
mcp_execution_plan_module_ownership_preflight = None
|
||||
mcp_normalized_identity_search_preflight = None
|
||||
provider_catalog_preflight = None
|
||||
with tempfile.TemporaryDirectory(prefix="plan-", dir=TMP_DIR) as tmp:
|
||||
manifest, entries, payload_dir = load_artifact(artifact, Path(tmp))
|
||||
@@ -9670,6 +10062,13 @@ def plan_artifact(artifact):
|
||||
mcp_execution_plan_module_ownership_preflight = (
|
||||
preflight_engine_mcp_execution_plan_module_ownership_predecessor()
|
||||
)
|
||||
if is_engine_mcp_normalized_identity_search_slice(
|
||||
manifest["component"],
|
||||
entries,
|
||||
):
|
||||
mcp_normalized_identity_search_preflight = (
|
||||
preflight_engine_mcp_normalized_identity_search_predecessor()
|
||||
)
|
||||
if is_engine_provider_security_catalog_slice(manifest["component"], entries):
|
||||
provider_catalog_preflight = preflight_engine_provider_security_catalog_predecessor()
|
||||
|
||||
@@ -9730,6 +10129,12 @@ def plan_artifact(artifact):
|
||||
entries,
|
||||
)
|
||||
)
|
||||
touches_mcp_normalized_identity_search = (
|
||||
is_engine_mcp_normalized_identity_search_slice(
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
)
|
||||
touches_agent_grant_migration = is_engine_agent_full_grant_migration_slice(
|
||||
component,
|
||||
entries,
|
||||
@@ -9750,6 +10155,7 @@ def plan_artifact(artifact):
|
||||
or touches_mcp_execution_plan_materialization
|
||||
or touches_mcp_execution_plan_telemetry_runtime
|
||||
or touches_mcp_execution_plan_module_ownership
|
||||
or touches_mcp_normalized_identity_search
|
||||
or touches_agent_grant_migration
|
||||
):
|
||||
credential_backend_preflight = preflight_engine_credential_backend_runtime()
|
||||
@@ -9830,6 +10236,14 @@ def plan_artifact(artifact):
|
||||
"Engine MCP execution plan module ownership requires the "
|
||||
"active immutable credential backend"
|
||||
)
|
||||
if touches_mcp_normalized_identity_search:
|
||||
if mcp_normalized_identity_search_preflight is None:
|
||||
die("Engine MCP normalized identity search preflight is missing")
|
||||
if credential_backend_preflight["mode"] != "verified-derived-retry":
|
||||
die(
|
||||
"Engine MCP normalized identity search requires the active "
|
||||
"immutable credential backend"
|
||||
)
|
||||
if touches_agent_grant_migration:
|
||||
agent_grant_migration_predecessor_sha256 = (
|
||||
preflight_engine_agent_full_grant_migration_predecessor()
|
||||
@@ -10419,6 +10833,80 @@ def plan_artifact(artifact):
|
||||
print("credentials=preserved")
|
||||
print("mcp_nginx=untouched")
|
||||
print("embedded_ai_workspace=untouched")
|
||||
if mcp_normalized_identity_search_preflight:
|
||||
print(
|
||||
"engine_mcp_identity_transition="
|
||||
f"{mcp_normalized_identity_search_preflight['mode']}"
|
||||
)
|
||||
print("engine_mcp_version=0.11.0")
|
||||
print("engine_mcp_surface=external-codex")
|
||||
print("engine_mcp_tool=engine_find_normalized_subjects")
|
||||
print("engine_mcp_identity_values=full-authorized-admin")
|
||||
print("engine_mcp_search_authority=canonical-normalized-facts")
|
||||
print("engine_mcp_raw_execution_data_included=no")
|
||||
print("engine_mcp_raw_provider_payload_included=no")
|
||||
print("engine_mcp_command_surface_included=no")
|
||||
print("engine_mcp_compiler_added=1.4.0")
|
||||
print("engine_mcp_legacy_compilers=1.1.0,1.2.0,1.3.0:preserved")
|
||||
print("engine_provider_package_added=gelios.provider.v11")
|
||||
print("engine_data_product_added=fleet.units.identity.current.v1")
|
||||
print("node_intelligence_descriptor=attested-gateway-successor")
|
||||
print("node_intelligence_release=2.33.2-974a9fb3492f")
|
||||
print("node_intelligence_image=preserved")
|
||||
for foundation_path, foundation_sha256 in (
|
||||
mcp_normalized_identity_search_preflight[
|
||||
"foundation_sha256"
|
||||
].items()
|
||||
):
|
||||
print(
|
||||
"engine_mcp_normalized_identity_search_foundation_sha256"
|
||||
f"[{foundation_path}]={foundation_sha256}"
|
||||
)
|
||||
for changed_path in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_ARTIFACT_ENTRIES
|
||||
):
|
||||
print(
|
||||
"engine_mcp_normalized_identity_search_changed_path="
|
||||
f"{changed_path}"
|
||||
)
|
||||
if changed_path in mcp_normalized_identity_search_preflight[
|
||||
"predecessor_sha256"
|
||||
]:
|
||||
print(
|
||||
"engine_mcp_normalized_identity_search_predecessor_sha256"
|
||||
f"[{changed_path}]="
|
||||
f"{mcp_normalized_identity_search_preflight['predecessor_sha256'][changed_path]}"
|
||||
)
|
||||
elif changed_path in mcp_normalized_identity_search_preflight[
|
||||
"new_paths"
|
||||
]:
|
||||
print(
|
||||
"engine_mcp_normalized_identity_search_predecessor_state"
|
||||
f"[{changed_path}]=absent"
|
||||
)
|
||||
else:
|
||||
die(
|
||||
"Engine MCP normalized identity search plan has no "
|
||||
f"predecessor state: {changed_path}"
|
||||
)
|
||||
print(
|
||||
"engine_mcp_normalized_identity_search_target_sha256"
|
||||
f"[{changed_path}]="
|
||||
f"{mcp_normalized_identity_search_preflight['target_sha256'][changed_path]}"
|
||||
)
|
||||
print(
|
||||
"backend_current_barrier="
|
||||
f"{mcp_normalized_identity_search_preflight['backend_mode']}"
|
||||
)
|
||||
print("backend_force_recreate=yes")
|
||||
print("backend_pull=never")
|
||||
print("l2_graph=untouched")
|
||||
print("n8n_l1=untouched")
|
||||
print("engine_ui=untouched")
|
||||
print("engine_databases=untouched")
|
||||
print("credentials=preserved")
|
||||
print("mcp_nginx=untouched")
|
||||
print("embedded_ai_workspace=untouched")
|
||||
if transition_descriptor:
|
||||
print(f"n8n_transition={transition_descriptor['action']}")
|
||||
print(f"n8n_version={transition_descriptor['n8nVersion']}")
|
||||
@@ -11549,6 +12037,10 @@ def component_healthchecks(component, entries=None, services=None):
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
or is_engine_mcp_normalized_identity_search_slice(
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
or is_engine_agent_full_grant_migration_slice(component, entries)
|
||||
or is_engine_mcp_control_plane_slice(component, entries)
|
||||
or is_engine_mcp_ontology_sdk_slice(component, entries)
|
||||
@@ -11984,6 +12476,12 @@ def run_healthchecks(component, entries=None, services=None):
|
||||
entries,
|
||||
)
|
||||
)
|
||||
touches_mcp_normalized_identity_search = (
|
||||
is_engine_mcp_normalized_identity_search_slice(
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
)
|
||||
touches_agent_grant_migration = is_engine_agent_full_grant_migration_slice(
|
||||
component,
|
||||
entries,
|
||||
@@ -12005,6 +12503,7 @@ def run_healthchecks(component, entries=None, services=None):
|
||||
or touches_mcp_execution_plan_materialization
|
||||
or touches_mcp_execution_plan_telemetry_runtime
|
||||
or touches_mcp_execution_plan_module_ownership
|
||||
or touches_mcp_normalized_identity_search
|
||||
or touches_agent_grant_migration
|
||||
or touches_mcp_control_plane
|
||||
or touches_mcp_ontology_sdk
|
||||
@@ -12030,6 +12529,7 @@ def run_healthchecks(component, entries=None, services=None):
|
||||
or touches_mcp_execution_plan_materialization
|
||||
or touches_mcp_execution_plan_telemetry_runtime
|
||||
or touches_mcp_execution_plan_module_ownership
|
||||
or touches_mcp_normalized_identity_search
|
||||
or touches_agent_grant_migration
|
||||
or touches_mcp_control_plane
|
||||
or touches_mcp_ontology_sdk
|
||||
@@ -12301,6 +12801,48 @@ def run_healthchecks(component, entries=None, services=None):
|
||||
"Engine MCP execution plan module ownership installed state "
|
||||
"is neither target nor rollback predecessor"
|
||||
)
|
||||
if touches_mcp_normalized_identity_search:
|
||||
root = component_root("engine")
|
||||
target_state = all(
|
||||
(root / rel).is_file()
|
||||
and not (root / rel).is_symlink()
|
||||
and sha256_file(root / rel) == expected
|
||||
for rel, expected in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_TARGET_SHA256.items()
|
||||
)
|
||||
) and all(
|
||||
(root / rel).is_file()
|
||||
and not (root / rel).is_symlink()
|
||||
and sha256_file(root / rel) == expected
|
||||
for rel, expected in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_FOUNDATION_SHA256.items()
|
||||
)
|
||||
)
|
||||
predecessor_state = all(
|
||||
(root / rel).is_file()
|
||||
and not (root / rel).is_symlink()
|
||||
and sha256_file(root / rel) == expected
|
||||
for rel, expected in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_PREDECESSOR_SHA256.items()
|
||||
)
|
||||
) and all(
|
||||
(root / rel).is_file()
|
||||
and not (root / rel).is_symlink()
|
||||
and sha256_file(root / rel) == expected
|
||||
for rel, expected in (
|
||||
ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_FOUNDATION_SHA256.items()
|
||||
)
|
||||
) and all(
|
||||
not (root / rel).exists() and not (root / rel).is_symlink()
|
||||
for rel in ENGINE_MCP_NORMALIZED_IDENTITY_SEARCH_NEW_PATHS
|
||||
)
|
||||
if target_state:
|
||||
accept_engine_mcp_normalized_identity_search_runtime()
|
||||
elif not predecessor_state:
|
||||
die(
|
||||
"Engine MCP normalized identity search installed state is "
|
||||
"neither target nor rollback predecessor"
|
||||
)
|
||||
container_name = COMPONENTS[component].get("health_container")
|
||||
if container_name:
|
||||
healthcheck_container(container_name)
|
||||
@@ -12466,6 +13008,22 @@ def apply_artifact(artifact):
|
||||
"Engine MCP execution plan module ownership "
|
||||
"requires the active immutable credential backend"
|
||||
)
|
||||
if is_engine_mcp_normalized_identity_search_slice(
|
||||
component,
|
||||
entries,
|
||||
):
|
||||
preflight_engine_mcp_normalized_identity_search_predecessor()
|
||||
identity_search_backend_preflight = (
|
||||
preflight_engine_credential_backend_runtime()
|
||||
)
|
||||
if (
|
||||
identity_search_backend_preflight["mode"]
|
||||
!= "verified-derived-retry"
|
||||
):
|
||||
die(
|
||||
"Engine MCP normalized identity search requires "
|
||||
"the active immutable credential backend"
|
||||
)
|
||||
if is_engine_agent_full_grant_migration_slice(component, entries):
|
||||
preflight_engine_agent_full_grant_migration_predecessor()
|
||||
migration_backend_preflight = preflight_engine_credential_backend_runtime()
|
||||
@@ -12735,6 +13293,10 @@ def apply_artifact(artifact):
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
or is_engine_mcp_normalized_identity_search_slice(
|
||||
component,
|
||||
entries,
|
||||
)
|
||||
or is_engine_agent_full_grant_migration_slice(component, entries)
|
||||
or is_engine_mcp_control_plane_slice(component, entries)
|
||||
or is_engine_mcp_ontology_sdk_slice(component, entries)
|
||||
|
||||
Reference in New Issue
Block a user