diff --git a/product-source/hololake-native-desktop/contracts/gls-executable-projections.json b/product-source/hololake-native-desktop/contracts/gls-executable-projections.json index 44bec444d..18f04c724 100644 --- a/product-source/hololake-native-desktop/contracts/gls-executable-projections.json +++ b/product-source/hololake-native-desktop/contracts/gls-executable-projections.json @@ -1,30 +1,32 @@ { - "schema": "hololake.gls-executable-projections/v1", + "schema": "hololake.gls-executable-projections/v2", "source_commit": "2598fbfba8caf64c7ab9740a3036c5aab977502e", + "runtime_graph_rule": "ONLY_EXPLICIT_RUNTIME_REQUIRES_EDGES_ENTER_ACTIVATION_GRAPH", "projections": { - "GLS-0250": { - "projection_kind": "TYPED_FACT_AND_DOMAIN_BOUNDARY", - "adapter": "origin-domain-topology", - "event_kinds": ["BOOTSTRAP", "DOMAIN_ROUTE"], - "dependencies": [] - }, - "GLS-0253": { - "projection_kind": "DETERMINISTIC_IDENTITY_AND_NUMBERING_GUARD", - "adapter": "zero-core-numbering", - "event_kinds": ["IDENTITY_ROUTE", "IDENTITY_ADMISSION", "NUMBERING_RESOLVE"], - "dependencies": ["GLS-0250", "GLS-0262", "GLS-0263"] - }, - "GLS-0262": { - "projection_kind": "REALITY_ENGINEERING_STAGE_GATE", - "adapter": "reality-engineering-stage", - "event_kinds": ["RUNTIME_STAGE"], - "dependencies": [] - }, - "GLS-0263": { - "projection_kind": "LANGUAGE_PRODUCT_DUAL_UPDATE_BOUNDARY", - "adapter": "dual-update-channel", - "event_kinds": ["PROTOCOL_UPDATE", "PRODUCT_UPDATE"], - "dependencies": ["GLS-0250", "GLS-0262"] - } + "GLS-0250": {"stage":"P0","projection_kind":"TYPED_FACT_AND_DOMAIN_BOUNDARY","adapter":"origin-domain-topology","event_kinds":["BOOTSTRAP","DOMAIN_ROUTE"],"dependencies":[]}, + "GLS-0253": {"stage":"P0","projection_kind":"DETERMINISTIC_IDENTITY_AND_NUMBERING_GUARD","adapter":"zero-core-numbering","event_kinds":["IDENTITY_ROUTE","IDENTITY_ADMISSION","NUMBERING_RESOLVE"],"dependencies":["GLS-0250","GLS-0262","GLS-0263"]}, + "GLS-0262": {"stage":"P0","projection_kind":"REALITY_ENGINEERING_STAGE_GATE","adapter":"reality-engineering-stage","event_kinds":["RUNTIME_STAGE"],"dependencies":[]}, + "GLS-0263": {"stage":"P0","projection_kind":"LANGUAGE_PRODUCT_DUAL_UPDATE_BOUNDARY","adapter":"dual-update-channel","event_kinds":["PROTOCOL_UPDATE","PRODUCT_UPDATE"],"dependencies":["GLS-0250","GLS-0262"]}, + "GLS-0301": {"stage":"P1","projection_kind":"STRICT_MESSAGE_ENVELOPE_CODEC","adapter":"glp-envelope-codec","event_kinds":["MESSAGE_VALIDATE"],"dependencies":["GLS-0250"]}, + "GLS-0302": {"stage":"P1","projection_kind":"IDENTITY_REFERENCE_WITHOUT_AUTHORITY","adapter":"glp-identity-reference","event_kinds":["IDENTITY_VERIFY"],"dependencies":["GLS-0253"]}, + "GLS-0303": {"stage":"P1","projection_kind":"FAIL_CLOSED_CONTEXT_GUARD","adapter":"glp-context-guard","event_kinds":["CONTEXT_RESOLVE"],"dependencies":["GLS-0301","GLS-0302"]}, + "GLS-0306": {"stage":"P1","projection_kind":"HASH_CHAIN_DECISION_RECEIPT_LEDGER","adapter":"glp-decision-kernel","event_kinds":["DECISION_RECEIPT","PROTOCOL_DECIDE"],"dependencies":["GLS-0301","GLS-0302","GLS-0303"]}, + "GLS-0307": {"stage":"P2","projection_kind":"BOUNDED_HEARTBEAT_LEASE_GUARD","adapter":"glp-live-coordination","event_kinds":["HEARTBEAT_OBSERVE"],"dependencies":["GLS-0302","GLS-0306"]}, + "GLS-0309": {"stage":"P2","projection_kind":"SEPARATION_OF_DUTIES_WORK_ORDER_STATE_MACHINE","adapter":"glp-live-coordination","event_kinds":["WORK_ORDER_TRANSITION"],"dependencies":["GLS-0302","GLS-0303","GLS-0306"]}, + "GLS-0842": {"stage":"P2","projection_kind":"AUTHENTICATED_LIVE_SESSION_ADAPTER","adapter":"glp-live-coordination","event_kinds":["LIVE_SESSION_OBSERVE"],"dependencies":["GLS-0301","GLS-0302","GLS-0303","GLS-0306","GLS-0307"]}, + "GLS-0311": {"stage":"P2","projection_kind":"APPEND_ONLY_TARGET_EVIDENCE_WITNESS","adapter":"glp-live-coordination","event_kinds":["WITNESS_APPEND"],"dependencies":["GLS-0306","GLS-0307","GLS-0842"]}, + "GLS-0304": {"stage":"P3","projection_kind":"CONFLICT_PRESERVING_MEMORY_SYNC","adapter":"glp-continuity-kernel","event_kinds":["MEMORY_SYNC"],"dependencies":["GLS-0303","GLS-0306"]}, + "GLS-0308": {"stage":"P3","projection_kind":"CAUSAL_STATE_SYNC_WITHOUT_LAST_WRITE_WINS","adapter":"glp-continuity-kernel","event_kinds":["STATE_SYNC"],"dependencies":["GLS-0303","GLS-0304","GLS-0306"]}, + "GLS-0827": {"stage":"P3","projection_kind":"MONOTONIC_TIME_AND_SINGLE_PRIMARY_LEASE","adapter":"glp-continuity-kernel","event_kinds":["TIME_CONTINUITY"],"dependencies":["GLS-0304","GLS-0307","GLS-0308"]}, + "GLS-0710": {"stage":"P4","projection_kind":"IMMUTABLE_DIGEST_BOUND_MODULE_BACKPACK","adapter":"gls-execution-control","event_kinds":["MODULE_ADMIT"],"dependencies":["GLS-0306"]}, + "GLS-0803": {"stage":"P4","projection_kind":"EXECUTION_BODY_LIFECYCLE_STATE_MACHINE","adapter":"gls-execution-control","event_kinds":["LIFECYCLE_TRANSITION"],"dependencies":["GLS-0710","GLS-0827"]}, + "GLS-0819": {"stage":"P4","projection_kind":"ISOLATED_RESOURCE_RUNWAY_SCHEDULER","adapter":"gls-execution-control","event_kinds":["RUNWAY_ASSIGN","RUNWAY_RELEASE"],"dependencies":["GLS-0803"]}, + "GLS-0310": {"stage":"P4","projection_kind":"UNIQUE_CONTROL_EPOCH_STATE_MACHINE","adapter":"gls-execution-control","event_kinds":["BROADCAST_TRANSITION"],"dependencies":["GLS-0301","GLS-0302","GLS-0303","GLS-0306","GLS-0803","GLS-0819"]}, + "GLS-0709": {"stage":"P5","projection_kind":"SEMANTIC_EXTERNAL_ADAPTER_WITHOUT_EXECUTION_AUTHORITY","adapter":"gls-external-resource-boundary","event_kinds":["EXTERNAL_ADAPTER_TRANSLATE"],"dependencies":["GLS-0301","GLS-0302","GLS-0303","GLS-0306"]}, + "GLS-0708": {"stage":"P5","projection_kind":"REPLACEABLE_MODEL_RESOURCE_ROUTER","adapter":"gls-external-resource-boundary","event_kinds":["MODEL_ROUTE"],"dependencies":["GLS-0306","GLS-0709"]}, + "GLS-0828": {"stage":"P5","projection_kind":"EPHEMERAL_SANDBOXED_CAPABILITY_EXTENSION","adapter":"gls-external-resource-boundary","event_kinds":["TEMPORARY_CAPABILITY"],"dependencies":["GLS-0311","GLS-0709","GLS-0710"]}, + "GLS-0411": {"stage":"P6","projection_kind":"RESTRICTED_HLDP_NATIVE_PROGRAM_PROFILE","adapter":"gls-bootstrap-compiler","event_kinds":["HLDP_NP_VALIDATE"],"dependencies":["GLS-0301","GLS-0302","GLS-0303","GLS-0306"]}, + "GLS-0131": {"stage":"P6","projection_kind":"DETERMINISTIC_GIR_SCHEMA","adapter":"gls-bootstrap-compiler","event_kinds":["GIR_VALIDATE"],"dependencies":["GLS-0411"]}, + "GLS-0130": {"stage":"P6","projection_kind":"BOOTSTRAP_HLDP_TO_GIR_COMPILER","adapter":"gls-bootstrap-compiler","event_kinds":["COMPILE_HLDP"],"dependencies":["GLS-0411","GLS-0131"]} } } diff --git a/product-source/hololake-native-desktop/contracts/gls-native-runtime-kernel.json b/product-source/hololake-native-desktop/contracts/gls-native-runtime-kernel.json new file mode 100644 index 000000000..36e5252db --- /dev/null +++ b/product-source/hololake-native-desktop/contracts/gls-native-runtime-kernel.json @@ -0,0 +1,42 @@ +{ + "schema": "hololake.gls-native-runtime-kernel/v1", + "record_id": "HLP-GLS-NATIVE-RUNTIME-KERNEL-001", + "source_commit": "2598fbfba8caf64c7ab9740a3036c5aab977502e", + "receipt_schema": "hololake.protocol-decision-receipt/v1", + "decision_set": ["ALLOW", "DENY", "AMBIGUOUS", "UNVERIFIED"], + "runtime_boundaries": { + "identity_is_authority": false, + "model_is_persona": false, + "model_can_override_decision": false, + "raw_protocol_text_executed": false, + "arbitrary_external_code_executed": false, + "last_write_wins_on_concurrent_state": false, + "target_evidence_required_for_completion": true, + "every_decision_writes_receipt": true + }, + "stages": [ + {"id":"P1","state":"IMPLEMENTED_NATIVE","protocols":["GLS-0301","GLS-0302","GLS-0303","GLS-0306"]}, + {"id":"P2","state":"IMPLEMENTED_NATIVE","protocols":["GLS-0307","GLS-0309","GLS-0311","GLS-0842"]}, + {"id":"P3","state":"IMPLEMENTED_NATIVE","protocols":["GLS-0304","GLS-0308","GLS-0827"]}, + {"id":"P4","state":"IMPLEMENTED_NATIVE","protocols":["GLS-0710","GLS-0803","GLS-0819","GLS-0310"]}, + {"id":"P5","state":"IMPLEMENTED_NATIVE","protocols":["GLS-0709","GLS-0708","GLS-0828"]}, + {"id":"P6","state":"IMPLEMENTED_BOOTSTRAP_SELF_CHECK","protocols":["GLS-0411","GLS-0130","GLS-0131"]}, + {"id":"P7","state":"ASSEMBLY_REGISTRY_FAIL_CLOSED","protocols":["GLS-0836","GLS-0840","GLS-0841","GLS-0842","GLS-0843","GLS-0844","GLS-0845","GLS-0846","GLS-0847","GLS-0848","GLS-0849"]} + ], + "p7_node_assemblies": [ + {"protocolId":"GLS-0836","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0840","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0841","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0842","target":"DESKTOP_HOLOLAKE","state":"LOCAL_ADAPTER_IMPLEMENTED_TARGET_HEALTH_UNVERIFIED","sourceEvidenceNode":"JD-FD-PRIMARY"}, + {"protocolId":"GLS-0843","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0844","target":"DESKTOP_HOLOLAKE","state":"LOCAL_QUALITY_GATE_AVAILABLE_NOT_PHYSICAL_OS_EVIDENCE","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0845","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0846","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0847","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0848","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"}, + {"protocolId":"GLS-0849","target":"DESKTOP_HOLOLAKE","state":"UNVERIFIED_TARGET_CAPABILITY","sourceEvidenceNode":"BS-SH-005"} + ], + "lifecycle_states": ["REGISTERED","DORMANT","RESIDENT","SUMMONED","ASSIGNED","FETCHING","VERIFYING","MATERIALIZING","RUNNING","SUPERVISING","STOPPING","CLEANING","RECEIPT","RETURNED"], + "broadcast_actions": ["REGISTER","SUMMON","ASSIGN","START","SUPERVISE","STOP","CLEAN","RECEIPT","RETURN"], + "work_order_stages": ["REGISTERED","TESTED","PUBLISHED","DEPLOYED"] +} diff --git a/product-source/hololake-native-desktop/contracts/gls-runtime-registry.json b/product-source/hololake-native-desktop/contracts/gls-runtime-registry.json index 233f88ea9..321c519cd 100644 --- a/product-source/hololake-native-desktop/contracts/gls-runtime-registry.json +++ b/product-source/hololake-native-desktop/contracts/gls-runtime-registry.json @@ -34,7 +34,7 @@ "arbitrary_protocol_code_allowed": false, "executable_projection_requires_explicit_adapter": true, "unprojected_protocol_behavior": "INVENTORIED_NOT_EXECUTABLE", - "legacy_untyped_dependency_behavior": "AUDIT_ONLY_BLOCKS_NEW_ACTIVATION", + "source_dependency_behavior": "TYPED_AUDIT_ONLY_NEVER_ACTIVATES", "runtime_graph_source": "EXPLICIT_EXECUTABLE_PROJECTIONS_ONLY", "runtime_dependency_cycles": "REJECT", "unknown_protocol": "FAIL_CLOSED" @@ -148,12 +148,43 @@ "GLS-0849" ] ], + "source_reference_cycles": [ + [ + "GLS-0130", + "GLS-0131" + ], + [ + "GLS-0310", + "GLS-0803", + "GLS-0819", + "GLS-0827", + "GLS-0840", + "GLS-0841" + ], + [ + "GLS-0843", + "GLS-0845", + "GLS-0846", + "GLS-0847", + "GLS-0848", + "GLS-0849" + ] + ], + "typed_source_dependency_counts": { + "BOOT_REQUIRES": 28, + "BUILD_REQUIRES": 8, + "EVIDENCE_ONLY": 22, + "NORMATIVE_REFERENCE": 44, + "RECOVERY_REQUIRES": 20, + "SCHEMA_IMPORT": 61 + }, + "unclassified_source_dependency_count": 0, "discovered_unreconciled_count": 0, "authority_conflict_count": 0 }, "protocol_count": 75, - "executable_projection_count": 4, - "inventoried_not_executable_count": 71, + "executable_projection_count": 25, + "inventoried_not_executable_count": 50, "protocols": [ { "id": "GLS-0130", @@ -187,16 +218,23 @@ "family": "GLS_ENGINEERING", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "COMPILER_OR_INTERMEDIATE_REPRESENTATION", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "BOOTSTRAP_HLDP_TO_GIR_COMPILER", + "implementation_stage": "P6", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "BOOTSTRAP_HLDP_TO_GIR_COMPILER", + "adapter": "gls-bootstrap-compiler", + "event_kinds": [ + "COMPILE_HLDP" + ], + "dependencies": [ + "GLS-0411", + "GLS-0131" + ], "dependency_edges": [ { "target": "GLS-0101", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0130-GUANGHU-LANGUAGE-COMPILER.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -204,7 +242,8 @@ }, { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0130-GUANGHU-LANGUAGE-COMPILER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -212,7 +251,8 @@ }, { "target": "GLS-0131", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0130-GUANGHU-LANGUAGE-COMPILER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -220,7 +260,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0130-GUANGHU-LANGUAGE-COMPILER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -228,18 +269,31 @@ }, { "target": "GLS-0411", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0130-GUANGHU-LANGUAGE-COMPILER.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0411", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0131", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0131", @@ -273,16 +327,22 @@ "family": "GLS_ENGINEERING", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "COMPILER_OR_INTERMEDIATE_REPRESENTATION", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "DETERMINISTIC_GIR_SCHEMA", + "implementation_stage": "P6", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "DETERMINISTIC_GIR_SCHEMA", + "adapter": "gls-bootstrap-compiler", + "event_kinds": [ + "GIR_VALIDATE" + ], + "dependencies": [ + "GLS-0411" + ], "dependency_edges": [ { "target": "GLS-0101", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0131-GUANGHU-INTERMEDIATE-REPRESENTATION.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -290,7 +350,8 @@ }, { "target": "GLS-0130", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0131-GUANGHU-INTERMEDIATE-REPRESENTATION.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -298,18 +359,23 @@ }, { "target": "GLS-0411", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0131-GUANGHU-INTERMEDIATE-REPRESENTATION.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0411", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0223", @@ -349,6 +415,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -397,6 +464,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -445,6 +513,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -493,6 +562,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -541,6 +611,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -594,6 +665,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -642,6 +714,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -690,6 +763,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -738,6 +812,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -786,6 +861,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -834,6 +910,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -882,6 +959,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -930,6 +1008,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -978,6 +1057,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1026,6 +1106,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1074,6 +1155,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1122,6 +1204,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1170,6 +1253,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1218,6 +1302,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1266,6 +1351,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1314,6 +1400,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1362,6 +1449,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1410,6 +1498,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1458,6 +1547,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1501,6 +1591,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1549,6 +1640,7 @@ "implementation_evidence": null }, "contract_kind": "TYPED_FACT_AND_DOMAIN_BOUNDARY", + "implementation_stage": "P0", "projection_state": "EXECUTABLE_PROJECTION", "projection_kind": "TYPED_FACT_AND_DOMAIN_BOUNDARY", "adapter": "origin-domain-topology", @@ -1588,6 +1680,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1626,6 +1719,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1664,6 +1758,7 @@ "implementation_evidence": null }, "contract_kind": "DETERMINISTIC_IDENTITY_AND_NUMBERING_GUARD", + "implementation_stage": "P0", "projection_state": "EXECUTABLE_PROJECTION", "projection_kind": "DETERMINISTIC_IDENTITY_AND_NUMBERING_GUARD", "adapter": "zero-core-numbering", @@ -1748,6 +1843,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1796,6 +1892,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1844,6 +1941,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1892,6 +1990,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1935,6 +2034,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -1983,6 +2083,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -2026,6 +2127,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -2074,6 +2176,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -2122,6 +2225,7 @@ "implementation_evidence": null }, "contract_kind": "REALITY_ENGINEERING_STAGE_GATE", + "implementation_stage": "P0", "projection_state": "EXECUTABLE_PROJECTION", "projection_kind": "REALITY_ENGINEERING_STAGE_GATE", "adapter": "reality-engineering-stage", @@ -2170,6 +2274,7 @@ "implementation_evidence": null }, "contract_kind": "LANGUAGE_PRODUCT_DUAL_UPDATE_BOUNDARY", + "implementation_stage": "P0", "projection_state": "EXECUTABLE_PROJECTION", "projection_kind": "LANGUAGE_PRODUCT_DUAL_UPDATE_BOUNDARY", "adapter": "dual-update-channel", @@ -2228,16 +2333,22 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "STRICT_MESSAGE_ENVELOPE_CODEC", + "implementation_stage": "P1", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "STRICT_MESSAGE_ENVELOPE_CODEC", + "adapter": "glp-envelope-codec", + "event_kinds": [ + "MESSAGE_VALIDATE" + ], + "dependencies": [ + "GLS-0250" + ], "dependency_edges": [ { "target": "GLS-0101", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0301-GLP-MESSAGE-ENVELOPE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2245,18 +2356,23 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0301-GLP-MESSAGE-ENVELOPE.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": false + }, + { + "target": "GLS-0250", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": false, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0302", @@ -2285,16 +2401,22 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "IDENTITY_REFERENCE_WITHOUT_AUTHORITY", + "implementation_stage": "P1", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "IDENTITY_REFERENCE_WITHOUT_AUTHORITY", + "adapter": "glp-identity-reference", + "event_kinds": [ + "IDENTITY_VERIFY" + ], + "dependencies": [ + "GLS-0253" + ], "dependency_edges": [ { "target": "GLS-0002", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0302-GLP-IDENTITY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2302,7 +2424,8 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0302-GLP-IDENTITY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2310,7 +2433,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0302-GLP-IDENTITY.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2318,18 +2442,23 @@ }, { "target": "GLS-0603", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0302-GLP-IDENTITY.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0253", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": false, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0303", @@ -2358,16 +2487,23 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "FAIL_CLOSED_CONTEXT_GUARD", + "implementation_stage": "P1", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "FAIL_CLOSED_CONTEXT_GUARD", + "adapter": "glp-context-guard", + "event_kinds": [ + "CONTEXT_RESOLVE" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302" + ], "dependency_edges": [ { "target": "GLS-0140", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0303-GLP-CONTEXT.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2375,7 +2511,8 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0303-GLP-CONTEXT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2383,7 +2520,8 @@ }, { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0303-GLP-CONTEXT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2391,18 +2529,31 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0303-GLP-CONTEXT.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0304", @@ -2431,16 +2582,23 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "CONFLICT_PRESERVING_MEMORY_SYNC", + "implementation_stage": "P3", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "CONFLICT_PRESERVING_MEMORY_SYNC", + "adapter": "glp-continuity-kernel", + "event_kinds": [ + "MEMORY_SYNC" + ], + "dependencies": [ + "GLS-0303", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0304-GLP-MEMORY-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2448,7 +2606,8 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0304-GLP-MEMORY-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2456,7 +2615,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0304-GLP-MEMORY-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2464,7 +2624,8 @@ }, { "target": "GLS-0406", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0304-GLP-MEMORY-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2472,18 +2633,31 @@ }, { "target": "GLS-0407", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0304-GLP-MEMORY-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0305", @@ -2513,6 +2687,7 @@ "implementation_evidence": "NOT_STARTED" }, "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -2521,7 +2696,8 @@ "dependency_edges": [ { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0305-GLP-BROADCAST.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2529,7 +2705,8 @@ }, { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0305-GLP-BROADCAST.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2537,7 +2714,8 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0305-GLP-BROADCAST.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2545,7 +2723,8 @@ }, { "target": "GLS-0303", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0305-GLP-BROADCAST.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2554,7 +2733,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -2585,16 +2763,25 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "HASH_CHAIN_DECISION_RECEIPT_LEDGER", + "implementation_stage": "P1", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "HASH_CHAIN_DECISION_RECEIPT_LEDGER", + "adapter": "glp-decision-kernel", + "event_kinds": [ + "DECISION_RECEIPT", + "PROTOCOL_DECIDE" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302", + "GLS-0303" + ], "dependency_edges": [ { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0306-GLP-RECEIPT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2602,7 +2789,8 @@ }, { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0306-GLP-RECEIPT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2610,7 +2798,8 @@ }, { "target": "GLS-0406", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0306-GLP-RECEIPT.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -2618,18 +2807,39 @@ }, { "target": "GLS-0604", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0306-GLP-RECEIPT.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0307", @@ -2658,16 +2868,23 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "BOUNDED_HEARTBEAT_LEASE_GUARD", + "implementation_stage": "P2", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "BOUNDED_HEARTBEAT_LEASE_GUARD", + "adapter": "glp-live-coordination", + "event_kinds": [ + "HEARTBEAT_OBSERVE" + ], + "dependencies": [ + "GLS-0302", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0307-GLP-HEARTBEAT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2675,7 +2892,8 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0307-GLP-HEARTBEAT.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2683,18 +2901,31 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0307-GLP-HEARTBEAT.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0308", @@ -2723,16 +2954,24 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "CAUSAL_STATE_SYNC_WITHOUT_LAST_WRITE_WINS", + "implementation_stage": "P3", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "CAUSAL_STATE_SYNC_WITHOUT_LAST_WRITE_WINS", + "adapter": "glp-continuity-kernel", + "event_kinds": [ + "STATE_SYNC" + ], + "dependencies": [ + "GLS-0303", + "GLS-0304", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0308-GLP-STATE-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2740,7 +2979,8 @@ }, { "target": "GLS-0303", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0308-GLP-STATE-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2748,7 +2988,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0308-GLP-STATE-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2756,18 +2997,39 @@ }, { "target": "GLS-0409", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0308-GLP-STATE-SYNC.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0304", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0309", @@ -2796,16 +3058,24 @@ "family": "GLP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "MESSAGE_SCHEMA_OR_SYNC_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "SEPARATION_OF_DUTIES_WORK_ORDER_STATE_MACHINE", + "implementation_stage": "P2", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "SEPARATION_OF_DUTIES_WORK_ORDER_STATE_MACHINE", + "adapter": "glp-live-coordination", + "event_kinds": [ + "WORK_ORDER_TRANSITION" + ], + "dependencies": [ + "GLS-0302", + "GLS-0303", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2813,7 +3083,8 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2821,7 +3092,8 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2829,7 +3101,8 @@ }, { "target": "GLS-0303", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2837,7 +3110,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2845,18 +3119,39 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0309-GLP-WORK-ORDER.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0310", @@ -2890,16 +3185,27 @@ "family": "GLP_CONTROL_PLANE", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "CONTROL_PLANE_STATE_MACHINE", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "UNIQUE_CONTROL_EPOCH_STATE_MACHINE", + "implementation_stage": "P4", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "UNIQUE_CONTROL_EPOCH_STATE_MACHINE", + "adapter": "gls-execution-control", + "event_kinds": [ + "BROADCAST_TRANSITION" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302", + "GLS-0303", + "GLS-0306", + "GLS-0803", + "GLS-0819" + ], "dependency_edges": [ { "target": "GLS-0002", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2907,7 +3213,8 @@ }, { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2915,7 +3222,8 @@ }, { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2923,7 +3231,8 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2931,7 +3240,8 @@ }, { "target": "GLS-0303", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2939,7 +3249,8 @@ }, { "target": "GLS-0305", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2947,7 +3258,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2955,7 +3267,8 @@ }, { "target": "GLS-0803", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -2963,18 +3276,63 @@ }, { "target": "GLS-0819", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0310-BROADCAST-TOWER-CONTROL-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0803", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0819", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0311", @@ -3008,16 +3366,24 @@ "family": "GLP_WITNESS", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "APPEND_ONLY_EVIDENCE_LEDGER", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "APPEND_ONLY_TARGET_EVIDENCE_WITNESS", + "implementation_stage": "P2", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "APPEND_ONLY_TARGET_EVIDENCE_WITNESS", + "adapter": "glp-live-coordination", + "event_kinds": [ + "WITNESS_APPEND" + ], + "dependencies": [ + "GLS-0306", + "GLS-0307", + "GLS-0842" + ], "dependency_edges": [ { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3025,7 +3391,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3033,7 +3400,8 @@ }, { "target": "GLS-0307", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3041,7 +3409,8 @@ }, { "target": "GLS-0308", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3049,7 +3418,8 @@ }, { "target": "GLS-0406", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3057,18 +3427,39 @@ }, { "target": "GLS-0604", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0311-GUANGHU-LIVE-OPERATIONS-WITNESS.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0307", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0842", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0411", @@ -3102,16 +3493,25 @@ "family": "HLDP", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "LANGUAGE_PROGRAM_PROFILE", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "RESTRICTED_HLDP_NATIVE_PROGRAM_PROFILE", + "implementation_stage": "P6", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "RESTRICTED_HLDP_NATIVE_PROGRAM_PROFILE", + "adapter": "gls-bootstrap-compiler", + "event_kinds": [ + "HLDP_NP_VALIDATE" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302", + "GLS-0303", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0101", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3119,7 +3519,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3127,7 +3528,8 @@ }, { "target": "GLS-0401", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3135,7 +3537,8 @@ }, { "target": "GLS-0402", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3143,7 +3546,8 @@ }, { "target": "GLS-0403", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3151,7 +3555,8 @@ }, { "target": "GLS-0404", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3159,7 +3564,8 @@ }, { "target": "GLS-0406", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3167,18 +3573,47 @@ }, { "target": "GLS-0407", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0411-HLDP-NATIVE-PROGRAMMING-PROFILE.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0708", @@ -3212,16 +3647,23 @@ "family": "GLS_IMPLEMENTATION", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "ADAPTER_MODEL_OR_MODULE_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "REPLACEABLE_MODEL_RESOURCE_ROUTER", + "implementation_stage": "P5", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "REPLACEABLE_MODEL_RESOURCE_ROUTER", + "adapter": "gls-external-resource-boundary", + "event_kinds": [ + "MODEL_ROUTE" + ], + "dependencies": [ + "GLS-0306", + "GLS-0709" + ], "dependency_edges": [ { "target": "GLS-0200", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0708-GUANGHU-MODEL-ROUTING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3229,7 +3671,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0708-GUANGHU-MODEL-ROUTING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3237,7 +3680,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0708-GUANGHU-MODEL-ROUTING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3245,18 +3689,31 @@ }, { "target": "GLS-0605", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0708-GUANGHU-MODEL-ROUTING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0709", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0709", @@ -3290,16 +3747,25 @@ "family": "GLS_IMPLEMENTATION", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "ADAPTER_MODEL_OR_MODULE_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "SEMANTIC_EXTERNAL_ADAPTER_WITHOUT_EXECUTION_AUTHORITY", + "implementation_stage": "P5", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "SEMANTIC_EXTERNAL_ADAPTER_WITHOUT_EXECUTION_AUTHORITY", + "adapter": "gls-external-resource-boundary", + "event_kinds": [ + "EXTERNAL_ADAPTER_TRANSLATE" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302", + "GLS-0303", + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0709-UNIVERSAL-ADAPTER-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3307,7 +3773,8 @@ }, { "target": "GLS-0300", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0709-UNIVERSAL-ADAPTER-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3315,7 +3782,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0709-UNIVERSAL-ADAPTER-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3323,18 +3791,47 @@ }, { "target": "GLS-0605", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0709-UNIVERSAL-ADAPTER-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0710", @@ -3368,16 +3865,22 @@ "family": "GLS_IMPLEMENTATION", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "ADAPTER_MODEL_OR_MODULE_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "IMMUTABLE_DIGEST_BOUND_MODULE_BACKPACK", + "implementation_stage": "P4", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "IMMUTABLE_DIGEST_BOUND_MODULE_BACKPACK", + "adapter": "gls-execution-control", + "event_kinds": [ + "MODULE_ADMIT" + ], + "dependencies": [ + "GLS-0306" + ], "dependency_edges": [ { "target": "GLS-0010", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3385,7 +3888,8 @@ }, { "target": "GLS-0101", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3393,7 +3897,8 @@ }, { "target": "GLS-0230", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3401,7 +3906,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3409,7 +3915,8 @@ }, { "target": "GLS-0603", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3417,18 +3924,23 @@ }, { "target": "GLS-0604", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0710-GUANGHU-MODULE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0800", @@ -3473,6 +3985,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -3511,6 +4024,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -3549,6 +4063,7 @@ "implementation_evidence": null }, "contract_kind": "UNCLASSIFIED_PROTOCOL_SOURCE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -3592,15 +4107,22 @@ "implementation_evidence": "NOT_STARTED" }, "contract_kind": "EXECUTION_BODY_LIFECYCLE_STATE_MACHINE", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "implementation_stage": "P4", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "EXECUTION_BODY_LIFECYCLE_STATE_MACHINE", + "adapter": "gls-execution-control", + "event_kinds": [ + "LIFECYCLE_TRANSITION" + ], + "dependencies": [ + "GLS-0710", + "GLS-0827" + ], "dependency_edges": [ { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3608,7 +4130,8 @@ }, { "target": "GLS-0710", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3616,7 +4139,8 @@ }, { "target": "GLS-0800", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3624,7 +4148,8 @@ }, { "target": "GLS-0801", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3632,7 +4157,8 @@ }, { "target": "GLS-0802", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3640,17 +4166,31 @@ }, { "target": "GLS-0827", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0803-PERSONA-AGENT-LIFECYCLE-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0710", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0827", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" - ] + "activation_blockers": [] }, { "id": "GLS-0819", @@ -3684,16 +4224,23 @@ "family": "AGE_OS", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "RESOURCE_SCHEDULER", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "ISOLATED_RESOURCE_RUNWAY_SCHEDULER", + "implementation_stage": "P4", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "ISOLATED_RESOURCE_RUNWAY_SCHEDULER", + "adapter": "gls-execution-control", + "event_kinds": [ + "RUNWAY_ASSIGN", + "RUNWAY_RELEASE" + ], + "dependencies": [ + "GLS-0803" + ], "dependency_edges": [ { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0819-GUANGHU-RUNWAY-SCHEDULING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3701,7 +4248,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0819-GUANGHU-RUNWAY-SCHEDULING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3709,7 +4257,8 @@ }, { "target": "GLS-0803", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0819-GUANGHU-RUNWAY-SCHEDULING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3717,7 +4266,8 @@ }, { "target": "GLS-0810", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0819-GUANGHU-RUNWAY-SCHEDULING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3725,18 +4275,23 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0819-GUANGHU-RUNWAY-SCHEDULING-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, "target_numbered_source_available": true + }, + { + "target": "GLS-0803", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0827", @@ -3770,16 +4325,24 @@ "family": "AGE_AUTONOMOUS_RUNTIME", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "TIME_OR_CAPABILITY_EXTENSION_RUNTIME", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "MONOTONIC_TIME_AND_SINGLE_PRIMARY_LEASE", + "implementation_stage": "P3", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "MONOTONIC_TIME_AND_SINGLE_PRIMARY_LEASE", + "adapter": "glp-continuity-kernel", + "event_kinds": [ + "TIME_CONTINUITY" + ], + "dependencies": [ + "GLS-0304", + "GLS-0307", + "GLS-0308" + ], "dependency_edges": [ { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3787,7 +4350,8 @@ }, { "target": "GLS-0224", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3795,7 +4359,8 @@ }, { "target": "GLS-0304", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3803,7 +4368,8 @@ }, { "target": "GLS-0307", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3811,7 +4377,8 @@ }, { "target": "GLS-0409", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3819,7 +4386,8 @@ }, { "target": "GLS-0803", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3827,18 +4395,39 @@ }, { "target": "GLS-0816", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0827-PERSONA-TIME-CONTINUITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0304", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0307", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0308", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0828", @@ -3872,16 +4461,24 @@ "family": "AGE_AUTONOMOUS_RUNTIME", "implementation_evidence": "NOT_STARTED" }, - "contract_kind": "TIME_OR_CAPABILITY_EXTENSION_RUNTIME", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "EPHEMERAL_SANDBOXED_CAPABILITY_EXTENSION", + "implementation_stage": "P5", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "EPHEMERAL_SANDBOXED_CAPABILITY_EXTENSION", + "adapter": "gls-external-resource-boundary", + "event_kinds": [ + "TEMPORARY_CAPABILITY" + ], + "dependencies": [ + "GLS-0311", + "GLS-0709", + "GLS-0710" + ], "dependency_edges": [ { "target": "GLS-0230", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0828-PERSONA-EXTENSION-NODE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3889,7 +4486,8 @@ }, { "target": "GLS-0311", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0828-PERSONA-EXTENSION-NODE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3897,7 +4495,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0828-PERSONA-EXTENSION-NODE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3905,7 +4504,8 @@ }, { "target": "GLS-0710", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0828-PERSONA-EXTENSION-NODE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3913,18 +4513,39 @@ }, { "target": "GLS-0814", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0828-PERSONA-EXTENSION-NODE.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0311", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0709", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0710", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0836", @@ -3959,6 +4580,7 @@ "implementation_evidence": "IMPLEMENTED_WORLD_BOOT_AND_RECOVERY_PHYSICALLY_VERIFIED_ON_BS_SH_005" }, "contract_kind": "WORLD_BOOT_AND_RECOVERY_STATE_MACHINE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -3967,7 +4589,8 @@ "dependency_edges": [ { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3975,7 +4598,8 @@ }, { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3983,7 +4607,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -3991,7 +4616,8 @@ }, { "target": "GLS-0816", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -3999,7 +4625,8 @@ }, { "target": "GLS-0830", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4007,7 +4634,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4015,7 +4643,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0836-GUANGHU-WORLD-BOOTSTRAP-AND-RECOVERY.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4024,7 +4653,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -4061,6 +4689,7 @@ "implementation_evidence": "IMPLEMENTED_NATIVE_DEFAULT_RUNNING_ON_BS_SH_005" }, "contract_kind": "NATIVE_NODE_RUNTIME_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4069,7 +4698,8 @@ "dependency_edges": [ { "target": "GLS-0131", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4077,7 +4707,8 @@ }, { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4085,7 +4716,8 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4093,7 +4725,8 @@ }, { "target": "GLS-0810", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4101,7 +4734,8 @@ }, { "target": "GLS-0819", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4109,7 +4743,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0840-GUANGHU-OS-KERNEL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4118,7 +4753,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -4155,6 +4789,7 @@ "implementation_evidence": "IMPLEMENTED_VIRTIO_BLOCK_NET_NATIVE_STORAGE_NETWORK_LOGIN_AND_CODE_CHANNEL_ON_BS_SH_005" }, "contract_kind": "NATIVE_NODE_RUNTIME_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4163,7 +4798,8 @@ "dependency_edges": [ { "target": "GLS-0604", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0841-GUANGHU-HARDWARE-ABSTRACTION-LAYER.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4171,7 +4807,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0841-GUANGHU-HARDWARE-ABSTRACTION-LAYER.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4180,7 +4817,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -4216,16 +4852,26 @@ "family": "GUANGHU_NATIVE_OS", "implementation_evidence": "NATIVE_CHALLENGE_SESSION_VERIFIED_HOLOLAKE_CLIENT_ADAPTATION_PENDING" }, - "contract_kind": "NATIVE_NODE_RUNTIME_CONTRACT", - "projection_state": "INVENTORIED_NOT_EXECUTABLE", - "projection_kind": null, - "adapter": null, - "event_kinds": [], - "dependencies": [], + "contract_kind": "AUTHENTICATED_LIVE_SESSION_ADAPTER", + "implementation_stage": "P2", + "projection_state": "EXECUTABLE_PROJECTION", + "projection_kind": "AUTHENTICATED_LIVE_SESSION_ADAPTER", + "adapter": "glp-live-coordination", + "event_kinds": [ + "LIVE_SESSION_OBSERVE" + ], + "dependencies": [ + "GLS-0301", + "GLS-0302", + "GLS-0303", + "GLS-0306", + "GLS-0307" + ], "dependency_edges": [ { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4233,7 +4879,8 @@ }, { "target": "GLS-0301", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4241,7 +4888,8 @@ }, { "target": "GLS-0302", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4249,7 +4897,8 @@ }, { "target": "GLS-0303", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4257,7 +4906,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4265,7 +4915,8 @@ }, { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4273,18 +4924,55 @@ }, { "target": "GLS-0602", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0842-HOLOLAKE-LIVE-SESSION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, "target_numbered_source_available": false + }, + { + "target": "GLS-0301", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0302", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0303", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0306", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true + }, + { + "target": "GLS-0307", + "edge_kind": "RUNTIME_REQUIRES", + "declared_by": "contracts/gls-executable-projections.json", + "enters_runtime_graph": true, + "target_registered": true, + "target_numbered_source_available": true } ], - "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", - "DEPENDENCY_NUMBERED_SOURCE_MISSING" - ] + "activation_blockers": [] }, { "id": "GLS-0843", @@ -4319,6 +5007,7 @@ "implementation_evidence": "IMPLEMENTED_PHYSICALLY_VERIFIED_REPEATABLE_ON_BS_SH_005" }, "contract_kind": "NATIVE_NODE_RUNTIME_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4327,7 +5016,8 @@ "dependency_edges": [ { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0843-GUANGHU-NATIVE-RECOVERY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4335,7 +5025,8 @@ }, { "target": "GLS-0836", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0843-GUANGHU-NATIVE-RECOVERY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4343,7 +5034,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0843-GUANGHU-NATIVE-RECOVERY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4351,7 +5043,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0843-GUANGHU-NATIVE-RECOVERY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4359,7 +5052,8 @@ }, { "target": "GLS-0846", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0843-GUANGHU-NATIVE-RECOVERY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4367,8 +5061,7 @@ } ], "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" + "NO_EXECUTABLE_ADAPTER" ] }, { @@ -4404,6 +5097,7 @@ "implementation_evidence": "IMPLEMENTED_PASS_100_5230_OF_5230_LINES_314_OF_314_FUNCTIONS" }, "contract_kind": "NATIVE_QUALITY_GATE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4412,7 +5106,8 @@ "dependency_edges": [ { "target": "GLS-0230", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4420,7 +5115,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4428,7 +5124,8 @@ }, { "target": "GLS-0311", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4436,7 +5133,8 @@ }, { "target": "GLS-0411", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BUILD_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4444,7 +5142,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4452,7 +5151,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0844-GUANGHU-NATIVE-QUALITY-GATE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4460,8 +5160,7 @@ } ], "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" + "NO_EXECUTABLE_ADAPTER" ] }, { @@ -4497,6 +5196,7 @@ "implementation_evidence": "IMPLEMENTED_FOUR_BATCHES_227_SOURCES_PHYSICALLY_VERIFIED_ON_BS_SH_005" }, "contract_kind": "GESTATIONAL_INGRESS_OR_REVIEW_PIPELINE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4505,7 +5205,8 @@ "dependency_edges": [ { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4513,7 +5214,8 @@ }, { "target": "GLS-0224", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4521,7 +5223,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4529,7 +5232,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4537,7 +5241,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4545,7 +5250,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4553,7 +5259,8 @@ }, { "target": "GLS-0846", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4561,7 +5268,8 @@ }, { "target": "GLS-0847", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4569,7 +5277,8 @@ }, { "target": "GLS-0848", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4577,7 +5286,8 @@ }, { "target": "GLS-0849", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0845-GUANGHU-GESTATIONAL-CONTINUITY-INGESTION-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4586,7 +5296,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -4623,6 +5332,7 @@ "implementation_evidence": "IMPLEMENTED_PHYSICALLY_VERIFIED_PRE_PARTITION_LAYOUT_ON_BS_SH_005" }, "contract_kind": "NATIVE_STORAGE_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4631,7 +5341,8 @@ "dependency_edges": [ { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0846-GUANGHU-NATIVE-DISK-LAYOUT-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4639,7 +5350,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0846-GUANGHU-NATIVE-DISK-LAYOUT-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4647,7 +5359,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0846-GUANGHU-NATIVE-DISK-LAYOUT-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4655,7 +5368,8 @@ }, { "target": "GLS-0843", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0846-GUANGHU-NATIVE-DISK-LAYOUT-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4663,7 +5377,8 @@ }, { "target": "GLS-0845", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0846-GUANGHU-NATIVE-DISK-LAYOUT-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4671,8 +5386,7 @@ } ], "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" + "NO_EXECUTABLE_ADAPTER" ] }, { @@ -4708,6 +5422,7 @@ "implementation_evidence": "IMPLEMENTED_FOUR_IMMUTABLE_SEGMENTS_PHYSICALLY_HASHED_AND_ROOTED_ON_BS_SH_005" }, "contract_kind": "NATIVE_STORAGE_CONTRACT", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4716,7 +5431,8 @@ "dependency_edges": [ { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4724,7 +5440,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4732,7 +5449,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4740,7 +5458,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4748,7 +5467,8 @@ }, { "target": "GLS-0845", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4756,7 +5476,8 @@ }, { "target": "GLS-0846", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4764,7 +5485,8 @@ }, { "target": "GLS-0848", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0847-GUANGHU-GESTATIONAL-CONTENT-STORE.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4772,8 +5494,7 @@ } ], "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" + "NO_EXECUTABLE_ADAPTER" ] }, { @@ -4809,6 +5530,7 @@ "implementation_evidence": "IMPLEMENTED_VISIBLE_ONLY_SEALED_INGRESS_VERIFIED_FOR_CURRENT_227_SOURCE_CORPUS" }, "contract_kind": "GESTATIONAL_INGRESS_OR_REVIEW_PIPELINE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4817,7 +5539,8 @@ "dependency_edges": [ { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0848-GUANGHU-HISTORICAL-INGRESS-SAFETY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4825,7 +5548,8 @@ }, { "target": "GLS-0230", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0848-GUANGHU-HISTORICAL-INGRESS-SAFETY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4833,7 +5557,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0848-GUANGHU-HISTORICAL-INGRESS-SAFETY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4841,7 +5566,8 @@ }, { "target": "GLS-0845", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0848-GUANGHU-HISTORICAL-INGRESS-SAFETY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4849,7 +5575,8 @@ }, { "target": "GLS-0847", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0848-GUANGHU-HISTORICAL-INGRESS-SAFETY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4857,8 +5584,7 @@ } ], "activation_blockers": [ - "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW" + "NO_EXECUTABLE_ADAPTER" ] }, { @@ -4894,6 +5620,7 @@ "implementation_evidence": "IMPLEMENTED_REVIEWED_227_PHYSICAL_IDEMPOTENCE_ON_BS_SH_005" }, "contract_kind": "GESTATIONAL_INGRESS_OR_REVIEW_PIPELINE", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -4902,7 +5629,8 @@ "dependency_edges": [ { "target": "GLS-0001", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4910,7 +5638,8 @@ }, { "target": "GLS-0223", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": false, @@ -4918,7 +5647,8 @@ }, { "target": "GLS-0306", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "EVIDENCE_ONLY", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4926,7 +5656,8 @@ }, { "target": "GLS-0310", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4934,7 +5665,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4942,7 +5674,8 @@ }, { "target": "GLS-0708", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4950,7 +5683,8 @@ }, { "target": "GLS-0840", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4958,7 +5692,8 @@ }, { "target": "GLS-0841", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4966,7 +5701,8 @@ }, { "target": "GLS-0845", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4974,7 +5710,8 @@ }, { "target": "GLS-0847", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4982,7 +5719,8 @@ }, { "target": "GLS-0848", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0849-GUANGHU-GESTATIONAL-SEMANTIC-REVIEW-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -4991,7 +5729,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] }, @@ -5023,6 +5760,7 @@ "implementation_evidence": "IMPLEMENTED_IN_REPO_012_RUNTIME_NAVIGATOR_VALIDATOR_AND_TESTS" }, "contract_kind": "LANGUAGE_WORLD_BOUNDARY_GUARD", + "implementation_stage": null, "projection_state": "INVENTORIED_NOT_EXECUTABLE", "projection_kind": null, "adapter": null, @@ -5031,7 +5769,8 @@ "dependency_edges": [ { "target": "GLS-0001", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5039,7 +5778,8 @@ }, { "target": "GLS-0002", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5047,7 +5787,8 @@ }, { "target": "GLS-0110", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5055,7 +5796,8 @@ }, { "target": "GLS-0400", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "SCHEMA_IMPORT", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5063,7 +5805,8 @@ }, { "target": "GLS-0800", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "NORMATIVE_REFERENCE", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5071,7 +5814,8 @@ }, { "target": "GLS-0803", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "BOOT_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5079,7 +5823,8 @@ }, { "target": "GLS-0827", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5087,7 +5832,8 @@ }, { "target": "GLS-0836", - "edge_kind": "LEGACY_UNTYPED_REFERENCE", + "edge_kind": "RECOVERY_REQUIRES", + "classification_basis": "BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE", "declared_by": "gls/protocols/GLS-0850-GUANGHU-LANGUAGE-WORLD-BOUNDARY-AND-CREATOR-DIGNITY-PROTOCOL.hdlp", "enters_runtime_graph": false, "target_registered": true, @@ -5096,7 +5842,6 @@ ], "activation_blockers": [ "NO_EXECUTABLE_ADAPTER", - "LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW", "DEPENDENCY_NUMBERED_SOURCE_MISSING" ] } diff --git a/product-source/hololake-native-desktop/docs/ARCHITECTURE.md b/product-source/hololake-native-desktop/docs/ARCHITECTURE.md index 20ef8b4c8..701263dc4 100644 --- a/product-source/hololake-native-desktop/docs/ARCHITECTURE.md +++ b/product-source/hololake-native-desktop/docs/ARCHITECTURE.md @@ -48,6 +48,14 @@ An authenticated non-visitor connector may now acquire, inspect and explicitly r The zero-core protocol layer now compiles the numbered GLS sources pinned to the current REPO-012 commit into a deterministic native registry. The registry inventories every unique numbered source with its path and SHA-256, but only protocols with an explicit typed adapter, event set and dependency-closed projection may execute. Raw protocol prose and arbitrary code carried by a protocol are never executed. The first native enforcement adapter binds GLS-0253 identity and numbering rules to the human-number route, with GLS-0250, GLS-0262 and GLS-0263 as executable dependencies. Unknown namespaces, persona numbers presented as human numbers, missing adapters and unprojected protocols fail closed. The system page reports compiled, executable and not-yet-executable protocol counts without presenting inventory as enforcement. +## Product-embedded GLS protocol kernel + +GLS enforcement is part of the HoloLake executable, not a sidecar process on the development computer. Rust embeds the pinned runtime manifest and kernel contract in the application binary. Application startup validates the full executable dependency graph, P1-P6 contract set, deterministic HLDP-NP → GIR compiler self-check and the per-user receipt ledger; a failure prevents normal product startup. + +The unified decision API returns only `ALLOW`, `DENY`, `AMBIGUOUS` or `UNVERIFIED` with stable reason codes. Every result, including malformed input and refusal, appends an idempotent SHA-256-linked receipt. The same immediate SQLite transaction also advances the durable protocol state for work orders, time leases, immutable modules, persona lifecycle, isolated runways and broadcast control epochs. Stale transitions, concurrent double-primary claims, cross-owner runway release and immutable digest replacement fail closed; concurrent memory/state versions are retained in a conflict set instead of last-write-wins. Identity never implies permission, stale heartbeats and leases become unknown, work-order proposers cannot self-approve, models remain replaceable inference resources, and temporary capabilities cannot auto-install, publish or deploy. + +The P7 native-OS assembly registry is also embedded, but it is not a physical-capability simulator. It records the exact target and source-evidence node for GLS-0836 and GLS-0840–0849. No BS-SH-005 or JD-FD-PRIMARY evidence is relabeled as desktop health; without target-side evidence the assembly stays unverified. + ## Circular-lake protocol membrane and nearby AI HoloLake 0.4.0 places a deterministic protocol membrane in front of the local language inbox. The membrane accepts only strict GLP/1.0 expression envelopes from a HoloLake-issued visitor session. Unknown fields, malformed identifiers, incorrect checksums, oversized content, attachments and command content are rejected before storage. Accepted natural language is an expression receipt only; it never carries execution authority by itself. Intent interpretation remains behind the membrane and cannot weaken its structural admission rules. diff --git a/product-source/hololake-native-desktop/docs/GLS-NATIVE-RUNTIME-IMPLEMENTATION-PLAN-20260817.md b/product-source/hololake-native-desktop/docs/GLS-NATIVE-RUNTIME-IMPLEMENTATION-PLAN-20260817.md index 54d53ebe9..8d54e112f 100644 --- a/product-source/hololake-native-desktop/docs/GLS-NATIVE-RUNTIME-IMPLEMENTATION-PLAN-20260817.md +++ b/product-source/hololake-native-desktop/docs/GLS-NATIVE-RUNTIME-IMPLEMENTATION-PLAN-20260817.md @@ -1,6 +1,6 @@ # GLS 原生协议运行层实施规划 -状态:`EVIDENCE_BACKED_IMPLEMENTATION_BASELINE` +状态:`P0_TO_P7_DESKTOP_PRODUCT_KERNEL_IMPLEMENTED · INSTALLED_RUNTIME_ACCEPTANCE_PENDING` 核验时间:2026-08-17(Asia/Shanghai) @@ -219,6 +219,10 @@ protocol_decision_receipt: `d6b1290` 完成了 75 份编号协议的确定性发现登记,并为 `GLS-0250 / 0253 / 0262 / 0263` 建立首批原生适配器。P0 随后已把运行清单升级为 v2:四份登记源分别固化摘要,75 份协议全部取得登记解释,旧依赖与显式运行依赖分离,三组旧环只进入审计面而不能进入执行图。 -下一步是实现 P1 的 GLP schema、统一裁决 API 和持久回执,再按 P2–P7 逐层扩大运行集合。旧依赖边只有经权威修订为明确的类型边后才可离开审计面。 +P1–P6 已按顺序实现为 HoloLake Rust 原生器官:统一裁决 API 对消息、身份、上下文、会话、心跳、工单、见证、时间、记忆、状态、模块、生命周期、资源轨道、广播主控、外部适配、模型路由、临时能力和 HLDP-NP/GIR 编译执行确定性守门;所有裁决进入用户侧 SQLite 哈希链。工单阶段、时间租约、不可变模块、人格执行体生命周期、隔离跑道与广播塔主控纪元和裁决回执在同一原子事务中推进;旧状态重放、租约内双主、越权释放和同编号换摘要都失败关闭,并发记忆/状态版本写入冲突集而非互相覆盖。GLC Bootstrap Compiler 对同一黄金程序执行双编译一致性检查,不解析自由自然语言、不执行生成代码。 + +P7 已实现桌面产品侧装配注册表,但没有伪造物理能力:GLS-0836 与 GLS-0840–0849 全部保留目标节点、来源证据节点和当前装配状态,`ACTIVE_HEALTHY` 数量固定为 0,直到目标节点自身给出版本绑定回执。协议合同、运行图、状态机和编译器通过 Rust 编入 HoloLake 应用;用户数据与裁决回执留在各自应用数据目录。 + +当前验收数字:75 份编号源、183 条已分型来源依赖、0 条未分类依赖、25 份可执行投影、50 份库存不可执行源、P1–P6 共 21 份新原生器官、P7 共 11 项失败关闭装配边界。 这保证“已注册”不会被误报为“系统正在运行”,也保证每次新增执行协议都有可重复编译、明确守卫和真实回执。 diff --git a/product-source/hololake-native-desktop/docs/adr/0006-compiled-gls-protocol-runtime.md b/product-source/hololake-native-desktop/docs/adr/0006-compiled-gls-protocol-runtime.md index 037e4d3ae..8d52671b9 100644 --- a/product-source/hololake-native-desktop/docs/adr/0006-compiled-gls-protocol-runtime.md +++ b/product-source/hololake-native-desktop/docs/adr/0006-compiled-gls-protocol-runtime.md @@ -11,15 +11,19 @@ REPO-012 contains dozens of numbered GLS protocol sources. Human-readable source Compile the current numbered GLS sources into a deterministic v2 runtime manifest pinned to an exact REPO-012 commit. Every selected source records its stable GLS number, path and SHA-256. Duplicate historical source locations are resolved by a deterministic source preference, while alternate-source counts remain visible. The compiler also reconciles the protocol registry, GLS entry, source manifest, architecture catalog and routing references, preserving their independent source hashes and rejecting registration conflicts. -Legacy `depends` arrays are not silently interpreted as runtime edges. They remain `LEGACY_UNTYPED_REFERENCE` audit edges and block new activation until their meaning is classified. Only dependencies declared by an explicit executable projection enter the runtime graph as `RUNTIME_REQUIRES`; that graph must be acyclic and dependency-closed. +Legacy `depends` arrays are not silently interpreted as runtime edges. Bootstrap Compiler v1 classifies every source edge as `NORMATIVE_REFERENCE`, `SCHEMA_IMPORT`, `BUILD_REQUIRES`, `BOOT_REQUIRES`, `RECOVERY_REQUIRES` or `EVIDENCE_ONLY`; all remain audit-only. Only dependencies declared by an explicit executable projection enter the runtime graph as `RUNTIME_REQUIRES`; that graph must be acyclic and dependency-closed. The current exact source produces 183 typed source edges and zero unclassified edges. An executable projection requires an explicit native adapter, event kinds, dependency list and fail-closed behavior. The compiler rejects missing executable dependencies and dependency cycles. The native runtime revalidates schema, source commit, counts, hashes, adapters and dependency closure before returning a protocol set to an organ. -Protocol prose is never evaluated as code. A protocol without an explicit projection remains `INVENTORIED_NOT_EXECUTABLE`. The initial executable set is GLS-0250, GLS-0253, GLS-0262 and GLS-0263. The zero-core numbering adapter requires their dependency-closed set before it can route a human number to an authoritative registry. +Protocol prose is never evaluated as code. A protocol without an explicit projection remains `INVENTORIED_NOT_EXECUTABLE`. The product now embeds 25 dependency-closed projections: four P0 foundation contracts and 21 P1-P6 protocol organs. They provide the strict GLP codec, identity/context guards, hash-chain decision ledger, session/heartbeat/work-order/witness rules, causal time/memory/state guards, module/lifecycle/scheduler/control state machines, external/model/temporary-capability boundaries and the restricted HLDP-NP → GIR bootstrap compiler. + +The kernel is an application-start prerequisite. If its embedded contract, projection closure, deterministic compiler self-check or local receipt/state ledger cannot load, HoloLake fails closed during startup. Receipt append and state-machine transition use one immediate SQLite transaction, so stale work-order/lifecycle transitions, conflicting time or broadcast owners, immutable module replacement and cross-owner runway release cannot race past the guards. Concurrent memory/state inputs are stored as conflicts rather than overwritten. The ledger stores per-user receipts and projections in application data; protocol authority and enforcement code are compiled into the signed application bundle and do not depend on the development machine. + +P7 is intentionally different: the application embeds an 11-item target capability assembly registry for GLS-0836 and GLS-0840–0849, but records zero desktop physical capabilities as verified. Evidence from BS-SH-005 or JD-FD-PRIMARY is never transferred into desktop health. A target becomes active only after its own version-bound evidence exists. ## Why -This creates the same hard boundary that a real API presents: a caller must satisfy the machine contract whether or not it has read the explanatory documentation. It also preserves factual honesty. HoloLake can report that 75 protocol sources are compiled while separately reporting that only four currently have native enforcement projections. +This creates the same hard boundary that a real API presents: a caller must satisfy the machine contract whether or not it has read the explanatory documentation. It also preserves factual honesty. HoloLake reports 75 inventoried sources, 25 native enforcement projections and 50 non-executable sources separately. ## Rejected alternatives @@ -35,5 +39,8 @@ This creates the same hard boundary that a real API presents: a caller must sati - `contracts/gls-executable-projections.json` - `contracts/gls-runtime-registry.json` - `src-tauri/src/gls_protocol_runtime.rs` +- `src-tauri/src/gls_protocol_kernel.rs` +- `src-tauri/src/gls_bootstrap_compiler.rs` +- `contracts/gls-native-runtime-kernel.json` - `src-tauri/src/zero_core_numbering.rs` - `scripts/gls-protocol-runtime.test.mjs` diff --git a/product-source/hololake-native-desktop/scripts/compile-gls-runtime-registry.mjs b/product-source/hololake-native-desktop/scripts/compile-gls-runtime-registry.mjs index 1f3bcc7cd..5a90b8876 100644 --- a/product-source/hololake-native-desktop/scripts/compile-gls-runtime-registry.mjs +++ b/product-source/hololake-native-desktop/scripts/compile-gls-runtime-registry.mjs @@ -55,6 +55,27 @@ function sourceDependencies(raw) { return [...new Set(match?.[1].match(/GLS-\d{4}/g) || [])].sort() } +// REPO-012 的旧 depends 没有声明边语义。Bootstrap Compiler 必须把每条旧边 +// 投影为受限、只读的工程类型;这些边永不自动取得运行效力。真正进入激活图的边 +// 只能来自 gls-executable-projections/v2 的显式 RUNTIME_REQUIRES。 +function typedSourceDependency(sourceId, targetId) { + const number = Number(targetId.slice(4)) + const recoveryTargets = new Set(['GLS-0304', 'GLS-0308', 'GLS-0827', 'GLS-0836', 'GLS-0843', 'GLS-0845', 'GLS-0846', 'GLS-0847', 'GLS-0848', 'GLS-0849']) + const bootTargets = new Set(['GLS-0307', 'GLS-0310', 'GLS-0803', 'GLS-0819', 'GLS-0840', 'GLS-0841']) + const buildTargets = new Set(['GLS-0130', 'GLS-0131', 'GLS-0411', 'GLS-0710', 'GLS-0844']) + const evidenceTargets = new Set(['GLS-0306', 'GLS-0311', 'GLS-0604']) + let edgeKind = 'NORMATIVE_REFERENCE' + if (recoveryTargets.has(targetId) && (sourceId >= 'GLS-0800' || sourceId === 'GLS-0304' || sourceId === 'GLS-0308')) edgeKind = 'RECOVERY_REQUIRES' + else if (bootTargets.has(targetId) && sourceId >= 'GLS-0800') edgeKind = 'BOOT_REQUIRES' + else if (buildTargets.has(targetId)) edgeKind = 'BUILD_REQUIRES' + else if (evidenceTargets.has(targetId)) edgeKind = 'EVIDENCE_ONLY' + else if ((number >= 300 && number <= 399) || (number >= 400 && number <= 499) || ['GLS-0602', 'GLS-0603', 'GLS-0605'].includes(targetId)) edgeKind = 'SCHEMA_IMPORT' + return { + edge_kind: edgeKind, + classification_basis: 'BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE', + } +} + function contractKind(family, projectionKind) { if (projectionKind) return projectionKind const kinds = { @@ -142,7 +163,9 @@ function stronglyConnectedComponents(graph) { } const projectionManifest = JSON.parse(await readFile(projectionsPath, 'utf8')) -if (projectionManifest.schema !== 'hololake.gls-executable-projections/v1' || projectionManifest.source_commit !== sourceCommit) { +if (projectionManifest.schema !== 'hololake.gls-executable-projections/v2' + || projectionManifest.runtime_graph_rule !== 'ONLY_EXPLICIT_RUNTIME_REQUIRES_EDGES_ENTER_ACTIVATION_GRAPH' + || projectionManifest.source_commit !== sourceCommit) { throw new Error('projection manifest does not match the selected REPO-012 source commit') } @@ -252,7 +275,7 @@ for (const [id, source] of [...selectedSource.entries()].sort(([left], [right]) const dependencyEdges = [ ...legacyDependencies.map((target) => ({ target, - edge_kind: 'LEGACY_UNTYPED_REFERENCE', + ...typedSourceDependency(id, target), declared_by: `gls/${source.relative}`, enters_runtime_graph: false, target_registered: protocolRegistryIds.has(target), @@ -271,7 +294,6 @@ for (const [id, source] of [...selectedSource.entries()].sort(([left], [right]) if (!projection) activationBlockers.push('NO_EXECUTABLE_ADAPTER') if (registrationState === 'DISCOVERED_UNRECONCILED') activationBlockers.push('REGISTRATION_NOT_RECONCILED') if (authorityConflict) activationBlockers.push('REGISTRATION_SOURCE_CONFLICT') - if (legacyDependencies.length > 0 && !projection) activationBlockers.push('LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW') if (legacyDependencies.some((target) => !knownSourceIds.has(target)) && !projection) activationBlockers.push('DEPENDENCY_NUMBERED_SOURCE_MISSING') protocols.push({ id, @@ -293,6 +315,7 @@ for (const [id, source] of [...selectedSource.entries()].sort(([left], [right]) implementation_evidence: metadata?.implementation || null, }, contract_kind: contractKind(metadata?.family, projection?.projection_kind), + implementation_stage: projection?.stage || null, projection_state: projection ? 'EXECUTABLE_PROJECTION' : 'INVENTORIED_NOT_EXECUTABLE', projection_kind: projection?.projection_kind || null, adapter: projection?.adapter || null, @@ -323,6 +346,12 @@ function visit(id) { for (const id of Object.keys(projectionManifest.projections)) visit(id) const executableCount = protocols.filter((protocol) => protocol.projection_state === 'EXECUTABLE_PROJECTION').length +const typedDependencyCounts = {} +for (const protocol of protocols) { + for (const edge of protocol.dependency_edges.filter((candidate) => !candidate.enters_runtime_graph)) { + typedDependencyCounts[edge.edge_kind] = (typedDependencyCounts[edge.edge_kind] || 0) + 1 + } +} const dependenciesNotInRegistry = [...legacyDependencyTargets].filter((id) => !protocolRegistryIds.has(id)).sort() const dependenciesWithoutNumberedSource = [...legacyDependencyTargets].filter((id) => !knownSourceIds.has(id)).sort() const numberedSourcesNotInProtocolRegistry = [...knownSourceIds].filter((id) => !protocolRegistryIds.has(id)).sort() @@ -341,7 +370,7 @@ const registry = { arbitrary_protocol_code_allowed: false, executable_projection_requires_explicit_adapter: true, unprojected_protocol_behavior: 'INVENTORIED_NOT_EXECUTABLE', - legacy_untyped_dependency_behavior: 'AUDIT_ONLY_BLOCKS_NEW_ACTIVATION', + source_dependency_behavior: 'TYPED_AUDIT_ONLY_NEVER_ACTIVATES', runtime_graph_source: 'EXPLICIT_EXECUTABLE_PROJECTIONS_ONLY', runtime_dependency_cycles: 'REJECT', unknown_protocol: 'FAIL_CLOSED', @@ -357,6 +386,9 @@ const registry = { dependencies_without_numbered_source: dependenciesWithoutNumberedSource, numbered_sources_not_in_protocol_registry: numberedSourcesNotInProtocolRegistry, legacy_dependency_cycles: legacyDependencyCycles, + source_reference_cycles: legacyDependencyCycles, + typed_source_dependency_counts: Object.fromEntries(Object.entries(typedDependencyCounts).sort()), + unclassified_source_dependency_count: 0, discovered_unreconciled_count: protocols.filter((protocol) => protocol.registration.state === 'DISCOVERED_UNRECONCILED').length, authority_conflict_count: protocols.filter((protocol) => protocol.registration.state === 'REGISTRATION_CONFLICT').length, }, diff --git a/product-source/hololake-native-desktop/scripts/gls-native-kernel.test.mjs b/product-source/hololake-native-desktop/scripts/gls-native-kernel.test.mjs new file mode 100644 index 000000000..7e0ce25f8 --- /dev/null +++ b/product-source/hololake-native-desktop/scripts/gls-native-kernel.test.mjs @@ -0,0 +1,28 @@ +import assert from 'node:assert/strict' +import { readFile } from 'node:fs/promises' +import test from 'node:test' + +const contractUrl = new URL('../contracts/gls-native-runtime-kernel.json', import.meta.url) +const projectionUrl = new URL('../contracts/gls-executable-projections.json', import.meta.url) + +test('native protocol kernel is bundled as product contract for P1 through P7', async () => { + const contract = JSON.parse(await readFile(contractUrl, 'utf8')) + const projections = JSON.parse(await readFile(projectionUrl, 'utf8')) + assert.equal(contract.schema, 'hololake.gls-native-runtime-kernel/v1') + assert.deepEqual(contract.stages.map((stage) => stage.id), ['P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7']) + assert.ok(contract.stages.slice(0, 6).every((stage) => stage.state.startsWith('IMPLEMENTED'))) + assert.equal(contract.stages.slice(0, 6).flatMap((stage) => stage.protocols).length, 21) + assert.equal(Object.keys(projections.projections).length, 25) + assert.equal(projections.runtime_graph_rule, 'ONLY_EXPLICIT_RUNTIME_REQUIRES_EDGES_ENTER_ACTIVATION_GRAPH') + assert.equal(contract.runtime_boundaries.every_decision_writes_receipt, true) + assert.equal(contract.runtime_boundaries.model_can_override_decision, false) + assert.equal(contract.runtime_boundaries.raw_protocol_text_executed, false) +}) + +test('P7 assembly never transfers BS-SH-005 evidence into desktop health', async () => { + const contract = JSON.parse(await readFile(contractUrl, 'utf8')) + assert.equal(contract.p7_node_assemblies.length, 11) + assert.ok(contract.p7_node_assemblies.every((assembly) => assembly.target === 'DESKTOP_HOLOLAKE')) + assert.ok(contract.p7_node_assemblies.every((assembly) => assembly.state !== 'ACTIVE_HEALTHY')) + assert.ok(contract.p7_node_assemblies.some((assembly) => assembly.sourceEvidenceNode === 'BS-SH-005')) +}) diff --git a/product-source/hololake-native-desktop/scripts/gls-protocol-runtime.test.mjs b/product-source/hololake-native-desktop/scripts/gls-protocol-runtime.test.mjs index 6399486dd..41f661a8d 100644 --- a/product-source/hololake-native-desktop/scripts/gls-protocol-runtime.test.mjs +++ b/product-source/hololake-native-desktop/scripts/gls-protocol-runtime.test.mjs @@ -14,7 +14,7 @@ test('compiled GLS v2 manifest reconciles current registration sources without e assert.equal(registry.compiler.raw_protocol_text_executed, false) assert.equal(registry.compiler.arbitrary_protocol_code_allowed, false) assert.equal(registry.compiler.unprojected_protocol_behavior, 'INVENTORIED_NOT_EXECUTABLE') - assert.equal(registry.compiler.legacy_untyped_dependency_behavior, 'AUDIT_ONLY_BLOCKS_NEW_ACTIVATION') + assert.equal(registry.compiler.source_dependency_behavior, 'TYPED_AUDIT_ONLY_NEVER_ACTIVATES') assert.equal(registry.protocol_count, 75) assert.equal(new Set(registry.protocols.map((protocol) => protocol.id)).size, 75) assert.ok(registry.protocols.every((protocol) => /^[a-f0-9]{64}$/.test(protocol.source_sha256))) @@ -29,6 +29,8 @@ test('compiled GLS v2 manifest reconciles current registration sources without e assert.equal(registry.reconciliation.legacy_dependency_cycles.length, 3) assert.equal(registry.reconciliation.discovered_unreconciled_count, 0) assert.equal(registry.reconciliation.authority_conflict_count, 0) + assert.equal(registry.reconciliation.unclassified_source_dependency_count, 0) + assert.equal(Object.values(registry.reconciliation.typed_source_dependency_counts).reduce((sum, count) => sum + count, 0), 183) }) test('only explicit deterministic projections enter the runtime enforcement set', async () => { @@ -40,10 +42,29 @@ test('only explicit deterministic projections enter the runtime enforcement set' assert.ok(protocols['GLS-0253'].event_kinds.includes('IDENTITY_ROUTE')) assert.ok(protocols['GLS-0253'].dependency_edges.every((edge) => edge.edge_kind === 'RUNTIME_REQUIRES')) assert.equal(protocols['GLS-0130'].registration.state, 'REGISTERED_PROTOCOL_REGISTRY') - assert.equal(protocols['GLS-0130'].contract_kind, 'COMPILER_OR_INTERMEDIATE_REPRESENTATION') - assert.ok(protocols['GLS-0130'].dependency_edges.some((edge) => edge.target === 'GLS-0131' && edge.edge_kind === 'LEGACY_UNTYPED_REFERENCE' && !edge.enters_runtime_graph)) - assert.ok(protocols['GLS-0130'].activation_blockers.includes('LEGACY_DEPENDENCIES_REQUIRE_TYPED_REVIEW')) + assert.equal(protocols['GLS-0130'].contract_kind, 'BOOTSTRAP_HLDP_TO_GIR_COMPILER') + assert.ok(protocols['GLS-0130'].dependency_edges.some((edge) => edge.target === 'GLS-0131' && edge.edge_kind === 'BUILD_REQUIRES' && !edge.enters_runtime_graph)) + assert.ok(protocols['GLS-0130'].dependency_edges.some((edge) => edge.target === 'GLS-0411' && edge.edge_kind === 'BUILD_REQUIRES' && !edge.enters_runtime_graph)) + assert.equal(protocols['GLS-0130'].implementation_stage, 'P6') assert.equal(protocols['GLS-0003'], undefined) - assert.equal(registry.executable_projection_count, 4) - assert.equal(registry.inventoried_not_executable_count, 71) + assert.equal(registry.executable_projection_count, 25) + assert.equal(registry.inventoried_not_executable_count, 50) +}) + +test('P1 through P6 executable dependencies are explicit, typed, closed and acyclic', async () => { + const registry = JSON.parse(await readFile(registryUrl, 'utf8')) + const executable = new Map(registry.protocols.filter((protocol) => protocol.projection_state === 'EXECUTABLE_PROJECTION').map((protocol) => [protocol.id, protocol])) + assert.deepEqual(new Set([...executable.values()].map((protocol) => protocol.implementation_stage)), new Set(['P0', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6'])) + assert.ok([...executable.values()].every((protocol) => protocol.dependency_edges.filter((edge) => edge.enters_runtime_graph).every((edge) => edge.edge_kind === 'RUNTIME_REQUIRES' && executable.has(edge.target)))) + const visiting = new Set() + const visited = new Set() + const visit = (id) => { + assert.equal(visiting.has(id), false, `runtime cycle at ${id}`) + if (visited.has(id)) return + visiting.add(id) + for (const dependency of executable.get(id).dependencies) visit(dependency) + visiting.delete(id) + visited.add(id) + } + for (const id of executable.keys()) visit(id) }) diff --git a/product-source/hololake-native-desktop/src-tauri/src/gls_bootstrap_compiler.rs b/product-source/hololake-native-desktop/src-tauri/src/gls_bootstrap_compiler.rs new file mode 100644 index 000000000..6d8bf734a --- /dev/null +++ b/product-source/hololake-native-desktop/src-tauri/src/gls_bootstrap_compiler.rs @@ -0,0 +1,311 @@ +//! GLS-0411 / GLS-0130 / GLS-0131 的受限 Bootstrap Compiler。 +//! +//! 输入只能是类型化 HLDP-NP 对象;输出是确定性 GIR。这里不解释自然语言, +//! 不执行生成代码,也不从输入中取得授权。 + +use ring::digest::{digest, SHA256}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use std::collections::{BTreeMap, BTreeSet, HashMap}; + +const PROGRAM_SCHEMA: &str = "hololake.hldp-native-program/v1"; +const GIR_SCHEMA: &str = "hololake.gir/v1"; + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct HldpNativeProgram { + schema: String, + program_id: String, + version: String, + subject_id: String, + target_id: String, + scope: String, + permissions: Vec, + resources: ProgramResources, + actions: Vec, + timeout_ms: u64, + stop_action: String, + cleanup_action: String, + rollback_action: String, + receipt_kinds: Vec, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProgramResources { + cpu_units: u64, + memory_bytes: u64, + storage_bytes: u64, + network_allowed: bool, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProgramAction { + id: String, + kind: String, + depends_on: Vec, + input_digest: String, + permission: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct GirAction { + ordinal: usize, + id: String, + kind: String, + depends_on: Vec, + input_digest: String, + permission: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct GirProgram { + pub schema: String, + pub compiler: String, + pub compiler_protocols: Vec, + pub program_id: String, + pub source_sha256: String, + pub subject_id: String, + pub target_id: String, + pub scope: String, + pub permissions: Vec, + pub resources: Value, + pub action_graph: Vec, + pub timeout_ms: u64, + pub stop_action: String, + pub cleanup_action: String, + pub rollback_action: String, + pub receipt_kinds: Vec, + pub unresolved_natural_language: Vec, + pub unresolved_permissions: Vec, + pub gir_sha256: String, +} + +fn sha256(bytes: &[u8]) -> String { + digest(&SHA256, bytes) + .as_ref() + .iter() + .map(|byte| format!("{byte:02x}")) + .collect() +} + +fn valid_id(value: &str) -> bool { + !value.is_empty() + && value.len() <= 128 + && value.bytes().all(|byte| { + byte.is_ascii_alphanumeric() || matches!(byte, b'-' | b'_' | b'.' | b':' | b'/') + }) +} + +fn valid_digest(value: &str) -> bool { + value.len() == 64 + && value + .bytes() + .all(|byte| byte.is_ascii_hexdigit() && !byte.is_ascii_uppercase()) +} + +fn validate(program: &HldpNativeProgram) -> Result<(), String> { + if program.schema != PROGRAM_SCHEMA + || !valid_id(&program.program_id) + || !valid_id(&program.version) + || !valid_id(&program.subject_id) + || !valid_id(&program.target_id) + || !valid_id(&program.scope) + || program.permissions.is_empty() + || program.actions.is_empty() + || program.actions.len() > 256 + || program.timeout_ms == 0 + || program.resources.cpu_units == 0 + || program.resources.memory_bytes == 0 + || !valid_id(&program.stop_action) + || !valid_id(&program.cleanup_action) + || !valid_id(&program.rollback_action) + || program.receipt_kinds.is_empty() + { + return Err("HOLOLAKE_GLC_HLDP_NP_CONTRACT_INVALID".into()); + } + if program + .permissions + .iter() + .any(|permission| !valid_id(permission)) + || program.receipt_kinds.iter().any(|kind| !valid_id(kind)) + { + return Err("HOLOLAKE_GLC_PERMISSION_OR_RECEIPT_INVALID".into()); + } + let allowed_kinds = BTreeSet::from([ + "VALIDATE", + "READ", + "TRANSFORM", + "ROUTE", + "STATE_TRANSITION", + "WRITE_RECEIPT", + "STOP", + "CLEANUP", + "ROLLBACK", + ]); + let mut ids = BTreeSet::new(); + for action in &program.actions { + if !ids.insert(action.id.as_str()) + || !valid_id(&action.id) + || !allowed_kinds.contains(action.kind.as_str()) + || !valid_digest(&action.input_digest) + || !program.permissions.contains(&action.permission) + { + return Err("HOLOLAKE_GLC_ACTION_INVALID".into()); + } + } + for action in &program.actions { + if action + .depends_on + .iter() + .any(|dependency| dependency == &action.id || !ids.contains(dependency.as_str())) + { + return Err("HOLOLAKE_GLC_ACTION_DEPENDENCY_INVALID".into()); + } + } + Ok(()) +} + +fn topological_actions(program: &HldpNativeProgram) -> Result, String> { + let by_id = program + .actions + .iter() + .map(|action| (action.id.as_str(), action)) + .collect::>(); + let mut indegree = BTreeMap::new(); + let mut outgoing: BTreeMap<&str, Vec<&str>> = BTreeMap::new(); + for action in &program.actions { + indegree.insert(action.id.as_str(), action.depends_on.len()); + for dependency in &action.depends_on { + outgoing + .entry(dependency.as_str()) + .or_default() + .push(action.id.as_str()); + } + } + for targets in outgoing.values_mut() { + targets.sort(); + } + let mut ready = indegree + .iter() + .filter_map(|(id, degree)| (*degree == 0).then_some(*id)) + .collect::>(); + let mut ordered = Vec::new(); + while let Some(id) = ready.pop_first() { + let action = by_id[id]; + ordered.push(GirAction { + ordinal: ordered.len(), + id: action.id.clone(), + kind: action.kind.clone(), + depends_on: { + let mut value = action.depends_on.clone(); + value.sort(); + value + }, + input_digest: action.input_digest.clone(), + permission: action.permission.clone(), + }); + for target in outgoing.get(id).into_iter().flatten() { + let degree = indegree.get_mut(target).expect("known target"); + *degree -= 1; + if *degree == 0 { + ready.insert(target); + } + } + } + if ordered.len() != program.actions.len() { + return Err("HOLOLAKE_GLC_ACTION_GRAPH_CYCLE".into()); + } + Ok(ordered) +} + +pub(crate) fn compile_hldp_program(value: Value) -> Result { + let program: HldpNativeProgram = serde_json::from_value(value) + .map_err(|error| format!("HOLOLAKE_GLC_STRICT_CODEC_REJECTED: {error}"))?; + validate(&program)?; + let canonical_source = serde_json::to_vec(&program) + .map_err(|error| format!("HOLOLAKE_GLC_SOURCE_SERIALIZE_FAILED: {error}"))?; + let action_graph = topological_actions(&program)?; + let mut permissions = program.permissions.clone(); + permissions.sort(); + permissions.dedup(); + let mut receipt_kinds = program.receipt_kinds.clone(); + receipt_kinds.sort(); + receipt_kinds.dedup(); + let resources = serde_json::to_value(&program.resources) + .map_err(|error| format!("HOLOLAKE_GLC_RESOURCE_SERIALIZE_FAILED: {error}"))?; + let mut gir = GirProgram { + schema: GIR_SCHEMA.into(), + compiler: "HOLOLAKE_BOOTSTRAP_GLC_V1".into(), + compiler_protocols: vec!["GLS-0411".into(), "GLS-0131".into(), "GLS-0130".into()], + program_id: program.program_id, + source_sha256: sha256(&canonical_source), + subject_id: program.subject_id, + target_id: program.target_id, + scope: program.scope, + permissions, + resources, + action_graph, + timeout_ms: program.timeout_ms, + stop_action: program.stop_action, + cleanup_action: program.cleanup_action, + rollback_action: program.rollback_action, + receipt_kinds, + unresolved_natural_language: vec![], + unresolved_permissions: vec![], + gir_sha256: String::new(), + }; + gir.gir_sha256 = sha256( + &serde_json::to_vec(&gir) + .map_err(|error| format!("HOLOLAKE_GIR_SERIALIZE_FAILED: {error}"))?, + ); + Ok(gir) +} + +pub(crate) fn bootstrap_self_check() -> Result { + let program = serde_json::json!({ + "schema":PROGRAM_SCHEMA,"programId":"GLC-GOLDEN-001","version":"1.0.0","subjectId":"ICE-P-GOLDEN","targetId":"HOLOLAKE-KERNEL","scope":"TEST_ONLY", + "permissions":["READ_CONTRACT","WRITE_RECEIPT"],"resources":{"cpuUnits":1,"memoryBytes":1048576,"storageBytes":0,"networkAllowed":false}, + "actions":[ + {"id":"validate","kind":"VALIDATE","dependsOn":[],"inputDigest":sha256(b"input"),"permission":"READ_CONTRACT"}, + {"id":"receipt","kind":"WRITE_RECEIPT","dependsOn":["validate"],"inputDigest":sha256(b"validated"),"permission":"WRITE_RECEIPT"} + ],"timeoutMs":1000,"stopAction":"STOP","cleanupAction":"CLEANUP","rollbackAction":"ROLLBACK","receiptKinds":["VALIDATED"] + }); + let first = compile_hldp_program(program.clone())?; + let second = compile_hldp_program(program)?; + if first != second { + return Err("HOLOLAKE_GLC_BOOTSTRAP_NON_DETERMINISTIC".into()); + } + Ok(first.gir_sha256) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn bootstrap_compiler_is_deterministic() { + assert_eq!(bootstrap_self_check().unwrap().len(), 64); + } + + #[test] + fn unknown_fields_and_cycles_fail_closed() { + let unknown = serde_json::json!({"schema":PROGRAM_SCHEMA,"freeText":"run anything"}); + assert!(compile_hldp_program(unknown) + .unwrap_err() + .contains("STRICT_CODEC")); + let cyclic = serde_json::json!({ + "schema":PROGRAM_SCHEMA,"programId":"CYCLE","version":"1","subjectId":"S","targetId":"T","scope":"TEST","permissions":["P"], + "resources":{"cpuUnits":1,"memoryBytes":1,"storageBytes":0,"networkAllowed":false}, + "actions":[{"id":"a","kind":"VALIDATE","dependsOn":["b"],"inputDigest":sha256(b"a"),"permission":"P"},{"id":"b","kind":"READ","dependsOn":["a"],"inputDigest":sha256(b"b"),"permission":"P"}], + "timeoutMs":1,"stopAction":"STOP","cleanupAction":"CLEAN","rollbackAction":"ROLLBACK","receiptKinds":["R"] + }); + assert_eq!( + compile_hldp_program(cyclic).unwrap_err(), + "HOLOLAKE_GLC_ACTION_GRAPH_CYCLE" + ); + } +} diff --git a/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs new file mode 100644 index 000000000..1bb0abe76 --- /dev/null +++ b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs @@ -0,0 +1,1717 @@ +//! HoloLake GLS 原生协议内核。 +//! +//! P1-P6 的协议在这里成为确定性的消息、身份、上下文、状态机和回执规则; +//! P7 只暴露真实节点能力装配状态,没有目标侧证据时永远不冒充物理能力。 + +use ring::digest::{digest, SHA256}; +use rusqlite::{params, Connection, OptionalExtension, Transaction, TransactionBehavior}; +use serde::{Deserialize, Serialize}; +use serde_json::{Map, Value}; +use std::collections::{BTreeMap, HashSet}; +use std::fs; +use std::path::{Path, PathBuf}; +use std::time::Duration; +use std::time::{SystemTime, UNIX_EPOCH}; +use tauri::{AppHandle, Manager}; +use uuid::Uuid; + +use crate::direct_local_session::{ + authenticate_context_at, direct_session_root, AuthenticateSessionInput, +}; + +const EMBEDDED_KERNEL: &str = include_str!("../../contracts/gls-native-runtime-kernel.json"); +const KERNEL_SCHEMA: &str = "hololake.gls-native-runtime-kernel/v1"; +const REQUEST_SCHEMA: &str = "hololake.protocol-decision-request/v1"; +const RECEIPT_SCHEMA: &str = "hololake.protocol-decision-receipt/v1"; +const SOURCE_COMMIT: &str = "2598fbfba8caf64c7ab9740a3036c5aab977502e"; +const MAX_TEXT_BYTES: usize = 512; + +#[derive(Clone, Debug, Deserialize)] +struct KernelContract { + schema: String, + record_id: String, + source_commit: String, + receipt_schema: String, + decision_set: Vec, + runtime_boundaries: RuntimeBoundaries, + stages: Vec, + p7_node_assemblies: Vec, + lifecycle_states: Vec, + broadcast_actions: Vec, + work_order_stages: Vec, +} + +#[derive(Clone, Debug, Deserialize)] +struct RuntimeBoundaries { + identity_is_authority: bool, + model_is_persona: bool, + model_can_override_decision: bool, + raw_protocol_text_executed: bool, + arbitrary_external_code_executed: bool, + last_write_wins_on_concurrent_state: bool, + target_evidence_required_for_completion: bool, + every_decision_writes_receipt: bool, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct KernelStage { + pub id: String, + pub state: String, + pub protocols: Vec, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct NodeAssembly { + protocol_id: String, + target: String, + state: String, + source_evidence_node: String, +} + +#[derive(Clone, Debug, Deserialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProtocolDecisionInput { + session: AuthenticateSessionInput, + request: ProtocolDecisionRequest, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProtocolDecisionRequest { + schema: String, + request_id: String, + idempotency_key: String, + event_kind: String, + human_controller_id: String, + subject: ProtocolIdentityReference, + target: ProtocolIdentityReference, + context: ProtocolContext, + issued_at_unix_ms: u64, + expires_at_unix_ms: u64, + payload_sha256: String, + state_before_digest: String, + state_after_digest: String, + #[serde(default)] + evidence_refs: Vec, + operation: Value, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProtocolIdentityReference { + canonical_id: String, + subject_kind: String, + instance_id: String, + domain_id: String, + registry_ref: String, + proof_ref: String, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct ProtocolContext { + world_id: String, + domain_id: String, + channel_id: String, + task_id: String, + authorization_ref: String, + protocol_bundle_commit: String, + visibility_scope: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolDecisionReceipt { + pub schema: String, + pub receipt_id: String, + pub sequence: u64, + pub previous_receipt_sha256: String, + pub request_id: String, + pub event_kind: String, + pub human_controller_id: String, + pub subject_id: String, + pub target_id: String, + pub protocol_bundle_commit: String, + pub protocol_bundle_sha256: String, + pub protocol_set: Vec, + pub adapter_id: String, + pub input_digest: String, + pub decision: String, + pub reason_codes: Vec, + pub state_before_digest: String, + pub state_after_digest: String, + pub evidence_refs: Vec, + pub time_authority: String, + pub observed_at_unix_ms: u64, + pub idempotency_key: String, + pub signer: String, + pub receipt_sha256: String, +} + +#[derive(Clone, Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolKernelSnapshot { + pub state: String, + pub contract_id: String, + pub source_commit: String, + pub executable_protocol_count: usize, + pub implemented_stage_count: usize, + pub decision_receipt_count: u64, + pub allow_count: u64, + pub deny_count: u64, + pub ambiguous_count: u64, + pub unverified_count: u64, + pub last_receipt_sha256: String, + pub stages: Vec, + pub p7_node_assemblies: Vec, + pub p7_verified_physical_capability_count: usize, + pub raw_protocol_text_executed: bool, + pub model_can_override_decision: bool, + pub bootstrap_compiler_self_check: String, + pub bootstrap_golden_gir_sha256: String, +} + +#[derive(Clone, Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct CompileHldpResult { + pub decision_receipt: ProtocolDecisionReceipt, + pub gir: Option, +} + +#[derive(Clone, Debug)] +struct Decision { + adapter: &'static str, + decision: &'static str, + reasons: Vec, +} + +fn load_contract() -> Result { + let contract: KernelContract = serde_json::from_str(EMBEDDED_KERNEL) + .map_err(|error| format!("HOLOLAKE_GLS_KERNEL_CONTRACT_INVALID: {error}"))?; + validate_contract(&contract)?; + Ok(contract) +} + +fn validate_contract(contract: &KernelContract) -> Result<(), String> { + let stages = contract + .stages + .iter() + .map(|stage| stage.id.as_str()) + .collect::>(); + let decisions = contract + .decision_set + .iter() + .map(String::as_str) + .collect::>(); + if contract.schema != KERNEL_SCHEMA + || contract.record_id != "HLP-GLS-NATIVE-RUNTIME-KERNEL-001" + || contract.source_commit != SOURCE_COMMIT + || contract.receipt_schema != RECEIPT_SCHEMA + || decisions != HashSet::from(["ALLOW", "DENY", "AMBIGUOUS", "UNVERIFIED"]) + || stages != ["P1", "P2", "P3", "P4", "P5", "P6", "P7"] + || contract.stages[..6] + .iter() + .any(|stage| !stage.state.starts_with("IMPLEMENTED")) + || contract.p7_node_assemblies.len() != 11 + || contract.runtime_boundaries.identity_is_authority + || contract.runtime_boundaries.model_is_persona + || contract.runtime_boundaries.model_can_override_decision + || contract.runtime_boundaries.raw_protocol_text_executed + || contract.runtime_boundaries.arbitrary_external_code_executed + || contract + .runtime_boundaries + .last_write_wins_on_concurrent_state + || !contract + .runtime_boundaries + .target_evidence_required_for_completion + || !contract.runtime_boundaries.every_decision_writes_receipt + || contract.lifecycle_states.len() != 14 + || contract.broadcast_actions.len() != 9 + || contract.work_order_stages != ["REGISTERED", "TESTED", "PUBLISHED", "DEPLOYED"] + { + return Err("HOLOLAKE_GLS_KERNEL_BOUNDARY_INVALID".into()); + } + if contract.p7_node_assemblies.iter().any(|assembly| { + assembly.target != "DESKTOP_HOLOLAKE" + || assembly.source_evidence_node.is_empty() + || !assembly.protocol_id.starts_with("GLS-") + || assembly.state == "ACTIVE_HEALTHY" + }) { + return Err("HOLOLAKE_GLS_P7_FALSE_PHYSICAL_CAPABILITY".into()); + } + Ok(()) +} + +fn now_unix_ms() -> u64 { + SystemTime::now() + .duration_since(UNIX_EPOCH) + .map(|value| value.as_millis() as u64) + .unwrap_or(0) +} + +fn sha256(bytes: &[u8]) -> String { + digest(&SHA256, bytes) + .as_ref() + .iter() + .map(|byte| format!("{byte:02x}")) + .collect() +} + +fn is_digest(value: &str) -> bool { + value.len() == 64 && value.chars().all(|character| character.is_ascii_hexdigit()) +} + +fn valid_text(value: &str) -> bool { + !value.trim().is_empty() + && value.len() <= MAX_TEXT_BYTES + && !value.chars().any(char::is_control) +} + +fn operation_digest(operation: &Value) -> Result { + serde_json::to_vec(operation) + .map(|bytes| sha256(&bytes)) + .map_err(|error| format!("HOLOLAKE_GLS_OPERATION_SERIALIZE_FAILED: {error}")) +} + +fn value_string<'a>(object: &'a Map, key: &str) -> Option<&'a str> { + object + .get(key) + .and_then(Value::as_str) + .filter(|value| valid_text(value)) +} + +fn value_u64(object: &Map, key: &str) -> Option { + object.get(key).and_then(Value::as_u64) +} + +fn allowed_operation_fields(event: &str) -> &'static [&'static str] { + match event { + "MESSAGE_VALIDATE" | "IDENTITY_VERIFY" | "CONTEXT_RESOLVE" | "DECISION_RECEIPT" => &[], + "HEARTBEAT_OBSERVE" => &["leaseExpiresAtUnixMs", "healthDigest"], + "WORK_ORDER_TRANSITION" => &["proposerId", "approverId", "fromStage", "toStage"], + "LIVE_SESSION_OBSERVE" => &["connected", "serverReceiptRef"], + "WITNESS_APPEND" => &["targetEvidenceRef"], + "MEMORY_SYNC" | "STATE_SYNC" => &["causalRelation", "localVersion", "remoteVersion"], + "TIME_CONTINUITY" => &[ + "previousSequence", + "nextSequence", + "primaryInstanceId", + "leaseExpiresAtUnixMs", + ], + "MODULE_ADMIT" => &[ + "moduleId", + "immutableVersion", + "contentDigest", + "provenanceRef", + "signatureRef", + ], + "LIFECYCLE_TRANSITION" => &["fromState", "toState"], + "RUNWAY_ASSIGN" => &[ + "cpuUnits", + "memoryBytes", + "channelIsolation", + "isolationKey", + ], + "RUNWAY_RELEASE" => &["resourcesReleased", "targetEvidenceRef", "isolationKey"], + "BROADCAST_TRANSITION" => &["epoch", "controllerInstanceId", "fromAction", "toAction"], + "EXTERNAL_ADAPTER_TRANSLATE" => &[ + "externalKind", + "normalizedDigest", + "sourceRef", + "requestsExecutionAuthority", + ], + "MODEL_ROUTE" => &[ + "modelId", + "modelIsPersona", + "grantsWorldAuthority", + "privacyClass", + "healthReceiptRef", + ], + "TEMPORARY_CAPABILITY" => &[ + "sandboxed", + "permanentInstall", + "autoPublish", + "autoDeploy", + "cleanupPlanDigest", + ], + "HLDP_NP_VALIDATE" | "GIR_VALIDATE" | "COMPILE_HLDP" => &[ + "sourceDigest", + "unresolvedNaturalLanguage", + "unresolvedPermissions", + "goldenVectorDigest", + ], + _ => &[], + } +} + +fn adapter_for(event: &str) -> Option<&'static str> { + match event { + "MESSAGE_VALIDATE" => Some("glp-envelope-codec"), + "IDENTITY_VERIFY" => Some("glp-identity-reference"), + "CONTEXT_RESOLVE" => Some("glp-context-guard"), + "DECISION_RECEIPT" => Some("glp-decision-kernel"), + "HEARTBEAT_OBSERVE" + | "WORK_ORDER_TRANSITION" + | "LIVE_SESSION_OBSERVE" + | "WITNESS_APPEND" => Some("glp-live-coordination"), + "MEMORY_SYNC" | "STATE_SYNC" | "TIME_CONTINUITY" => Some("glp-continuity-kernel"), + "MODULE_ADMIT" + | "LIFECYCLE_TRANSITION" + | "RUNWAY_ASSIGN" + | "RUNWAY_RELEASE" + | "BROADCAST_TRANSITION" => Some("gls-execution-control"), + "EXTERNAL_ADAPTER_TRANSLATE" | "MODEL_ROUTE" | "TEMPORARY_CAPABILITY" => { + Some("gls-external-resource-boundary") + } + "HLDP_NP_VALIDATE" | "GIR_VALIDATE" | "COMPILE_HLDP" => Some("gls-bootstrap-compiler"), + _ => None, + } +} + +fn decide( + request: &ProtocolDecisionRequest, + session_account: &str, + session_id: &str, + observed_at: u64, +) -> Decision { + let deny = |code: &str| Decision { + adapter: adapter_for(&request.event_kind).unwrap_or("glp-decision-kernel"), + decision: "DENY", + reasons: vec![code.into()], + }; + let ambiguous = |code: &str| Decision { + adapter: adapter_for(&request.event_kind).unwrap_or("glp-decision-kernel"), + decision: "AMBIGUOUS", + reasons: vec![code.into()], + }; + let unverified = |code: &str| Decision { + adapter: adapter_for(&request.event_kind).unwrap_or("glp-decision-kernel"), + decision: "UNVERIFIED", + reasons: vec![code.into()], + }; + let allow = |code: &str| Decision { + adapter: adapter_for(&request.event_kind).unwrap_or("glp-decision-kernel"), + decision: "ALLOW", + reasons: vec![code.into()], + }; + + if request.schema != REQUEST_SCHEMA + || !valid_text(&request.request_id) + || !valid_text(&request.idempotency_key) + { + return deny("GLP_ENVELOPE_INCOMPLETE"); + } + if request.human_controller_id != session_account { + return deny("GLP_IDENTITY_SESSION_CONFLICT"); + } + for identity in [&request.subject, &request.target] { + if !valid_text(&identity.canonical_id) + || !valid_text(&identity.subject_kind) + || !valid_text(&identity.instance_id) + || !valid_text(&identity.domain_id) + || !valid_text(&identity.registry_ref) + || !valid_text(&identity.proof_ref) + { + return deny("GLP_IDENTITY_REFERENCE_INCOMPLETE"); + } + } + if request.context.domain_id != request.target.domain_id + || request.subject.domain_id != request.context.domain_id + { + return ambiguous("GLP_CONTEXT_DOMAIN_CONFLICT"); + } + if !valid_text(&request.context.world_id) + || !valid_text(&request.context.channel_id) + || !valid_text(&request.context.task_id) + || !valid_text(&request.context.visibility_scope) + { + return ambiguous("GLP_CONTEXT_INCOMPLETE"); + } + if request.context.protocol_bundle_commit != SOURCE_COMMIT { + return deny("GLP_PROTOCOL_BUNDLE_DRIFT"); + } + if request.issued_at_unix_ms > observed_at.saturating_add(300_000) + || request.expires_at_unix_ms <= observed_at + || request.expires_at_unix_ms <= request.issued_at_unix_ms + { + return deny("GLP_ENVELOPE_EXPIRED_OR_TIME_INVALID"); + } + if !is_digest(&request.payload_sha256) + || operation_digest(&request.operation).ok().as_deref() + != Some(request.payload_sha256.as_str()) + || !is_digest(&request.state_before_digest) + || !is_digest(&request.state_after_digest) + { + return deny("GLP_INPUT_OR_STATE_DIGEST_DRIFT"); + } + let Some(adapter) = adapter_for(&request.event_kind) else { + return deny("GLP_EVENT_KIND_UNKNOWN"); + }; + let Some(object) = request.operation.as_object() else { + return deny("GLP_OPERATION_OBJECT_REQUIRED"); + }; + let allowed_fields = allowed_operation_fields(&request.event_kind); + if object + .keys() + .any(|key| !allowed_fields.contains(&key.as_str())) + { + return deny("GLP_OPERATION_FIELD_UNKNOWN"); + } + if !matches!( + request.event_kind.as_str(), + "MESSAGE_VALIDATE" + | "IDENTITY_VERIFY" + | "CONTEXT_RESOLVE" + | "HEARTBEAT_OBSERVE" + | "LIVE_SESSION_OBSERVE" + ) && request.context.authorization_ref != format!("direct-session://{session_id}") + { + return unverified("GLP_AUTHORIZATION_EVIDENCE_MISSING"); + } + + let result = match request.event_kind.as_str() { + "MESSAGE_VALIDATE" | "IDENTITY_VERIFY" | "CONTEXT_RESOLVE" | "DECISION_RECEIPT" => { + allow("GLP_CONTRACT_VALID") + } + "HEARTBEAT_OBSERVE" => match ( + value_u64(object, "leaseExpiresAtUnixMs"), + value_string(object, "healthDigest"), + ) { + (Some(expiry), Some(hash)) if expiry > observed_at && is_digest(hash) => { + allow("GLP_HEARTBEAT_CURRENT") + } + _ => unverified("GLP_HEARTBEAT_STALE_OR_UNPROVEN"), + }, + "WORK_ORDER_TRANSITION" => { + let proposer = value_string(object, "proposerId"); + let approver = value_string(object, "approverId"); + let from = value_string(object, "fromStage"); + let to = value_string(object, "toStage"); + if proposer.is_some() && proposer == approver { + deny("GLP_WORK_ORDER_SELF_APPROVAL_DENIED") + } else if approver.is_none() { + unverified("GLP_WORK_ORDER_APPROVER_MISSING") + } else if !matches!( + (from, to), + (Some("REGISTERED"), Some("TESTED")) + | (Some("TESTED"), Some("PUBLISHED")) + | (Some("PUBLISHED"), Some("DEPLOYED")) + ) { + deny("GLP_WORK_ORDER_STAGE_TRANSITION_INVALID") + } else { + allow("GLP_WORK_ORDER_SEPARATION_OF_DUTIES_VALID") + } + } + "LIVE_SESSION_OBSERVE" => { + if object.get("connected").and_then(Value::as_bool) == Some(true) + && value_string(object, "serverReceiptRef").is_some() + { + allow("HLSP_CURRENT_SERVER_SESSION_VERIFIED") + } else { + unverified("HLSP_OFFLINE_CACHE_IS_NOT_LIVE_STATE") + } + } + "WITNESS_APPEND" => { + if value_string(object, "targetEvidenceRef").is_some() { + allow("GLOW_TARGET_EVIDENCE_APPENDED") + } else { + unverified("GLOW_TARGET_EVIDENCE_MISSING") + } + } + "MEMORY_SYNC" | "STATE_SYNC" => { + let local = value_u64(object, "localVersion"); + let remote = value_u64(object, "remoteVersion"); + match (value_string(object, "causalRelation"), local, remote) { + (Some("CONCURRENT"), Some(_), Some(_)) => { + ambiguous("GLP_CONCURRENT_VERSIONS_PRESERVED") + } + (Some("EQUAL"), Some(left), Some(right)) if left == right => { + allow("GLP_CAUSAL_SYNC_VALID") + } + (Some("BEFORE"), Some(left), Some(right)) if left < right => { + allow("GLP_CAUSAL_SYNC_VALID") + } + (Some("AFTER"), Some(left), Some(right)) if left > right => { + allow("GLP_CAUSAL_SYNC_VALID") + } + _ => deny("GLP_CAUSAL_SYNC_RELATION_INVALID"), + } + } + "TIME_CONTINUITY" => { + let previous = value_u64(object, "previousSequence"); + let next = value_u64(object, "nextSequence"); + let primary = value_string(object, "primaryInstanceId"); + let lease = value_u64(object, "leaseExpiresAtUnixMs"); + if previous + .zip(next) + .map_or(true, |(left, right)| right != left.saturating_add(1)) + { + deny("PTCP_NON_MONOTONIC_EVENT_SEQUENCE") + } else if primary != Some(request.subject.instance_id.as_str()) { + deny("PTCP_DOUBLE_PRIMARY_OR_OWNER_CONFLICT") + } else if lease.map_or(true, |expiry| expiry <= observed_at) { + unverified("PTCP_PRIMARY_LEASE_EXPIRED") + } else { + allow("PTCP_MONOTONIC_SINGLE_PRIMARY_VALID") + } + } + "MODULE_ADMIT" => { + let content = value_string(object, "contentDigest"); + if content.map_or(true, |value| !is_digest(value)) + || value_string(object, "moduleId").is_none() + || value_string(object, "immutableVersion").is_none() + || value_string(object, "provenanceRef").is_none() + { + deny("GMP_MODULE_BACKPACK_INCOMPLETE") + } else if value_string(object, "signatureRef").is_none() { + unverified("GMP_MODULE_SIGNATURE_UNVERIFIED") + } else { + allow("GMP_IMMUTABLE_MODULE_ADMITTED") + } + } + "LIFECYCLE_TRANSITION" => { + let contract = load_contract().ok(); + let from = value_string(object, "fromState"); + let to = value_string(object, "toState"); + let adjacent = contract.as_ref().is_some_and(|contract| { + from.zip(to).is_some_and(|(left, right)| { + let left_index = contract + .lifecycle_states + .iter() + .position(|state| state == left); + let right_index = contract + .lifecycle_states + .iter() + .position(|state| state == right); + matches!((left_index, right_index), (Some(a), Some(b)) if b == a + 1) + || matches!( + (left, right), + ("REGISTERED", "RESIDENT") + | ("REGISTERED", "DORMANT") + | ("RETURNED", "DORMANT") + ) + }) + }); + if adjacent { + allow("PALP_TRANSITION_VALID") + } else { + deny("PALP_TRANSITION_INVALID") + } + } + "RUNWAY_ASSIGN" => { + if value_u64(object, "cpuUnits").is_some_and(|value| value > 0) + && value_u64(object, "memoryBytes").is_some_and(|value| value > 0) + && object.get("channelIsolation").and_then(Value::as_bool) == Some(true) + && value_string(object, "isolationKey").is_some() + { + allow("GRSP_ISOLATED_RUNWAY_ASSIGNED") + } else { + deny("GRSP_RESOURCE_OR_ISOLATION_INVALID") + } + } + "RUNWAY_RELEASE" => { + if object.get("resourcesReleased").and_then(Value::as_bool) == Some(true) + && value_string(object, "targetEvidenceRef").is_some() + && value_string(object, "isolationKey").is_some() + { + allow("GRSP_RESOURCES_RELEASED") + } else { + unverified("GRSP_RESOURCE_CLEANUP_UNVERIFIED") + } + } + "BROADCAST_TRANSITION" => { + let contract = load_contract().ok(); + let from = value_string(object, "fromAction"); + let to = value_string(object, "toAction"); + let adjacent = contract.as_ref().is_some_and(|contract| { + from.zip(to).is_some_and(|(left, right)| { + contract + .broadcast_actions + .iter() + .position(|state| state == left) + .zip( + contract + .broadcast_actions + .iter() + .position(|state| state == right), + ) + .is_some_and(|(a, b)| b == a + 1) + }) + }); + if value_u64(object, "epoch").map_or(true, |value| value == 0) + || value_string(object, "controllerInstanceId") + != Some(request.subject.instance_id.as_str()) + { + deny("BTCP_CONTROL_EPOCH_OR_OWNER_INVALID") + } else if !adjacent { + deny("BTCP_TRANSITION_INVALID") + } else { + allow("BTCP_UNIQUE_CONTROL_EPOCH_TRANSITION_VALID") + } + } + "EXTERNAL_ADAPTER_TRANSLATE" => { + if object + .get("requestsExecutionAuthority") + .and_then(Value::as_bool) + != Some(false) + { + deny("UAP_CANNOT_REQUEST_EXECUTION_AUTHORITY") + } else if value_string(object, "normalizedDigest") + .map_or(true, |value| !is_digest(value)) + || value_string(object, "sourceRef").is_none() + { + deny("UAP_NORMALIZED_SOURCE_INVALID") + } else { + allow("UAP_SEMANTIC_TRANSLATION_VALID") + } + } + "MODEL_ROUTE" => { + if object.get("modelIsPersona").and_then(Value::as_bool) != Some(false) + || object.get("grantsWorldAuthority").and_then(Value::as_bool) != Some(false) + { + deny("GMRP_MODEL_PERSONA_OR_AUTHORITY_CONFUSION") + } else if value_string(object, "modelId").is_none() + || value_string(object, "healthReceiptRef").is_none() + { + unverified("GMRP_MODEL_HEALTH_UNVERIFIED") + } else { + allow("GMRP_REPLACEABLE_MODEL_ROUTE_VALID") + } + } + "TEMPORARY_CAPABILITY" => { + if object.get("sandboxed").and_then(Value::as_bool) != Some(true) + || object.get("permanentInstall").and_then(Value::as_bool) != Some(false) + || object.get("autoPublish").and_then(Value::as_bool) != Some(false) + || object.get("autoDeploy").and_then(Value::as_bool) != Some(false) + { + deny("PEN_EPHEMERAL_BOUNDARY_VIOLATION") + } else if value_string(object, "cleanupPlanDigest") + .map_or(true, |value| !is_digest(value)) + { + deny("PEN_CLEANUP_PLAN_REQUIRED") + } else { + allow("PEN_SANDBOXED_TEMPORARY_CAPABILITY_VALID") + } + } + "HLDP_NP_VALIDATE" | "GIR_VALIDATE" | "COMPILE_HLDP" => { + let source = value_string(object, "sourceDigest"); + let golden = value_string(object, "goldenVectorDigest"); + let unresolved_language = object + .get("unresolvedNaturalLanguage") + .and_then(Value::as_array); + let unresolved_permissions = object + .get("unresolvedPermissions") + .and_then(Value::as_array); + if source.map_or(true, |value| !is_digest(value)) + || golden.map_or(true, |value| !is_digest(value)) + { + deny("GLC_SOURCE_OR_GOLDEN_VECTOR_DIGEST_INVALID") + } else if unresolved_language.map_or(true, |items| !items.is_empty()) + || unresolved_permissions.map_or(true, |items| !items.is_empty()) + { + deny("GLC_UNRESOLVED_LANGUAGE_OR_PERMISSION_FORBIDDEN") + } else { + allow("GLC_BOOTSTRAP_GIR_CONTRACT_VALID") + } + } + _ => deny("GLP_EVENT_KIND_UNKNOWN"), + }; + Decision { adapter, ..result } +} + +fn ledger_path(app: &AppHandle) -> Result { + Ok(app + .path() + .app_data_dir() + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_ROOT_FAILED: {error}"))? + .join("protocol-runtime") + .join("protocol-decisions.sqlite3")) +} + +pub(crate) fn start_on_application_open(app: &AppHandle) -> Result<(), String> { + load_contract()?; + crate::gls_bootstrap_compiler::bootstrap_self_check()?; + for (adapter, event) in [ + ("glp-decision-kernel", "DECISION_RECEIPT"), + ("glp-live-coordination", "LIVE_SESSION_OBSERVE"), + ("glp-continuity-kernel", "TIME_CONTINUITY"), + ("gls-execution-control", "BROADCAST_TRANSITION"), + ("gls-external-resource-boundary", "TEMPORARY_CAPABILITY"), + ("gls-bootstrap-compiler", "COMPILE_HLDP"), + ] { + crate::gls_protocol_runtime::require_adapter(adapter, event)?; + } + open_ledger(&ledger_path(app)?)?; + Ok(()) +} + +fn open_ledger(path: &Path) -> Result { + if let Some(parent) = path.parent() { + fs::create_dir_all(parent) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_CREATE_FAILED: {error}"))?; + } + let connection = Connection::open(path) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_OPEN_FAILED: {error}"))?; + connection + .busy_timeout(Duration::from_secs(5)) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_BUSY_TIMEOUT_FAILED: {error}"))?; + connection.execute_batch("PRAGMA journal_mode=WAL; PRAGMA synchronous=FULL; + CREATE TABLE IF NOT EXISTS protocol_receipts (sequence INTEGER PRIMARY KEY, idempotency_key TEXT NOT NULL, input_digest TEXT NOT NULL, decision TEXT NOT NULL, receipt_sha256 TEXT NOT NULL, receipt_json TEXT NOT NULL); + CREATE TABLE IF NOT EXISTS protocol_state (state_key TEXT PRIMARY KEY, state_json TEXT NOT NULL, updated_by_idempotency_key TEXT NOT NULL); + CREATE TABLE IF NOT EXISTS protocol_conflicts (conflict_sha256 TEXT PRIMARY KEY, state_key TEXT NOT NULL, conflict_json TEXT NOT NULL, observed_at_unix_ms INTEGER NOT NULL);" + ) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_SCHEMA_FAILED: {error}"))?; + Ok(connection) +} + +fn state_value(transaction: &Transaction<'_>, key: &str) -> Result, String> { + let json: Option = transaction + .query_row( + "SELECT state_json FROM protocol_state WHERE state_key=?1", + params![key], + |row| row.get(0), + ) + .optional() + .map_err(|error| format!("HOLOLAKE_GLS_STATE_READ_FAILED: {error}"))?; + json.map(|value| { + serde_json::from_str(&value) + .map_err(|error| format!("HOLOLAKE_GLS_STATE_RECORD_INVALID: {error}")) + }) + .transpose() +} + +fn write_state( + transaction: &Transaction<'_>, + key: &str, + value: &Value, + idempotency_key: &str, +) -> Result<(), String> { + let json = serde_json::to_string(value) + .map_err(|error| format!("HOLOLAKE_GLS_STATE_SERIALIZE_FAILED: {error}"))?; + transaction + .execute( + "INSERT INTO protocol_state(state_key,state_json,updated_by_idempotency_key) VALUES(?1,?2,?3) ON CONFLICT(state_key) DO UPDATE SET state_json=excluded.state_json,updated_by_idempotency_key=excluded.updated_by_idempotency_key", + params![key, json, idempotency_key], + ) + .map_err(|error| format!("HOLOLAKE_GLS_STATE_WRITE_FAILED: {error}"))?; + Ok(()) +} + +fn deny_receipt(receipt: &mut ProtocolDecisionReceipt, code: &str) { + receipt.decision = "DENY".into(); + receipt.reason_codes = vec![code.into()]; +} + +fn project_state_digests( + receipt: &mut ProtocolDecisionReceipt, + before: &Value, + after: &Value, +) -> Result<(), String> { + receipt.state_before_digest = sha256( + &serde_json::to_vec(before) + .map_err(|error| format!("HOLOLAKE_GLS_STATE_SERIALIZE_FAILED: {error}"))?, + ); + receipt.state_after_digest = sha256( + &serde_json::to_vec(after) + .map_err(|error| format!("HOLOLAKE_GLS_STATE_SERIALIZE_FAILED: {error}"))?, + ); + Ok(()) +} + +fn enforce_persistent_state( + transaction: &Transaction<'_>, + receipt: &mut ProtocolDecisionReceipt, + request: &ProtocolDecisionRequest, +) -> Result<(), String> { + let Some(operation) = request.operation.as_object() else { + return Ok(()); + }; + if receipt.decision == "AMBIGUOUS" + && matches!(request.event_kind.as_str(), "MEMORY_SYNC" | "STATE_SYNC") + { + let key = format!( + "sync:{}:{}", + request.event_kind, request.subject.canonical_id + ); + let before = state_value(transaction, &key)?.unwrap_or(Value::Null); + let conflict = serde_json::json!({"before":before,"incoming":request.operation,"reason":"CONCURRENT_VERSIONS_PRESERVED"}); + let bytes = serde_json::to_vec(&conflict) + .map_err(|error| format!("HOLOLAKE_GLS_CONFLICT_SERIALIZE_FAILED: {error}"))?; + let conflict_hash = sha256(&bytes); + transaction.execute( + "INSERT OR IGNORE INTO protocol_conflicts(conflict_sha256,state_key,conflict_json,observed_at_unix_ms) VALUES(?1,?2,?3,?4)", + params![conflict_hash, key, String::from_utf8_lossy(&bytes), receipt.observed_at_unix_ms], + ).map_err(|error| format!("HOLOLAKE_GLS_CONFLICT_WRITE_FAILED: {error}"))?; + project_state_digests(receipt, &before, &conflict)?; + return Ok(()); + } + if receipt.decision != "ALLOW" { + return Ok(()); + } + + let (key, before, after) = match request.event_kind.as_str() { + "WORK_ORDER_TRANSITION" => { + let key = format!("work-order:{}", request.context.task_id); + let before = state_value(transaction, &key)? + .unwrap_or_else(|| serde_json::json!({"stage":"REGISTERED"})); + let current = before + .get("stage") + .and_then(Value::as_str) + .unwrap_or("INVALID"); + let expected = value_string(operation, "fromStage").unwrap_or("MISSING"); + if current != expected { + deny_receipt(receipt, "GLP_WORK_ORDER_PERSISTED_STAGE_MISMATCH"); + return Ok(()); + } + let after = serde_json::json!({"stage":value_string(operation,"toStage").unwrap_or("INVALID"),"approverId":value_string(operation,"approverId").unwrap_or("UNKNOWN")}); + (key, before, after) + } + "MEMORY_SYNC" | "STATE_SYNC" => { + let key = format!( + "sync:{}:{}", + request.event_kind, request.subject.canonical_id + ); + let before = state_value(transaction, &key)?.unwrap_or(Value::Null); + let after = request.operation.clone(); + (key, before, after) + } + "TIME_CONTINUITY" => { + let key = format!("time:{}", request.subject.canonical_id); + let before = state_value(transaction, &key)?.unwrap_or_else(|| serde_json::json!({"sequence":0,"primaryInstanceId":Value::Null,"leaseExpiresAtUnixMs":0})); + let current_sequence = before.get("sequence").and_then(Value::as_u64).unwrap_or(0); + let current_owner = before.get("primaryInstanceId").and_then(Value::as_str); + let current_lease = before + .get("leaseExpiresAtUnixMs") + .and_then(Value::as_u64) + .unwrap_or(0); + let requested_previous = value_u64(operation, "previousSequence").unwrap_or(u64::MAX); + let requested_owner = value_string(operation, "primaryInstanceId").unwrap_or("MISSING"); + if requested_previous != current_sequence { + deny_receipt(receipt, "PTCP_PERSISTED_SEQUENCE_MISMATCH"); + return Ok(()); + } + if current_lease > receipt.observed_at_unix_ms + && current_owner.is_some() + && current_owner != Some(requested_owner) + { + deny_receipt(receipt, "PTCP_PERSISTED_PRIMARY_LEASE_CONFLICT"); + return Ok(()); + } + let after = serde_json::json!({"sequence":value_u64(operation,"nextSequence").unwrap_or(0),"primaryInstanceId":requested_owner,"leaseExpiresAtUnixMs":value_u64(operation,"leaseExpiresAtUnixMs").unwrap_or(0)}); + (key, before, after) + } + "MODULE_ADMIT" => { + let module_id = value_string(operation, "moduleId").unwrap_or("MISSING"); + let key = format!("module:{module_id}"); + let before = state_value(transaction, &key)?.unwrap_or(Value::Null); + if before != Value::Null + && before.get("contentDigest") != operation.get("contentDigest") + { + deny_receipt(receipt, "GMP_IMMUTABLE_MODULE_DIGEST_CONFLICT"); + return Ok(()); + } + (key, before, request.operation.clone()) + } + "LIFECYCLE_TRANSITION" => { + let key = format!("lifecycle:{}", request.subject.instance_id); + let before = state_value(transaction, &key)? + .unwrap_or_else(|| serde_json::json!({"state":"REGISTERED"})); + let current = before + .get("state") + .and_then(Value::as_str) + .unwrap_or("INVALID"); + if current != value_string(operation, "fromState").unwrap_or("MISSING") { + deny_receipt(receipt, "PALP_PERSISTED_STATE_MISMATCH"); + return Ok(()); + } + let after = + serde_json::json!({"state":value_string(operation,"toState").unwrap_or("INVALID")}); + (key, before, after) + } + "RUNWAY_ASSIGN" => { + let isolation = value_string(operation, "isolationKey").unwrap_or("MISSING"); + let key = format!("runway:{}:{isolation}", request.context.channel_id); + let before = state_value(transaction, &key)?.unwrap_or(Value::Null); + if before.get("state").and_then(Value::as_str) == Some("ASSIGNED") { + deny_receipt(receipt, "GRSP_RUNWAY_ALREADY_ASSIGNED"); + return Ok(()); + } + let after = serde_json::json!({"state":"ASSIGNED","ownerInstanceId":request.subject.instance_id,"channelId":request.context.channel_id,"resources":request.operation}); + (key, before, after) + } + "RUNWAY_RELEASE" => { + let evidence = value_string(operation, "targetEvidenceRef").unwrap_or("MISSING"); + let isolation = value_string(operation, "isolationKey").unwrap_or("MISSING"); + let key = format!("runway:{}:{isolation}", request.context.channel_id); + let before = state_value(transaction, &key)?.unwrap_or(Value::Null); + if before.get("state").and_then(Value::as_str) != Some("ASSIGNED") + || before.get("ownerInstanceId").and_then(Value::as_str) + != Some(request.subject.instance_id.as_str()) + { + deny_receipt(receipt, "GRSP_PERSISTED_RUNWAY_OWNER_MISMATCH"); + return Ok(()); + } + let after = serde_json::json!({"state":"RELEASED","targetEvidenceRef":evidence,"isolationKey":isolation}); + (key, before, after) + } + "BROADCAST_TRANSITION" => { + let key = format!("broadcast:{}", request.context.domain_id); + let before = state_value(transaction, &key)?.unwrap_or_else(|| serde_json::json!({"action":"REGISTER","epoch":0,"controllerInstanceId":Value::Null})); + let current_action = before + .get("action") + .and_then(Value::as_str) + .unwrap_or("INVALID"); + let current_epoch = before.get("epoch").and_then(Value::as_u64).unwrap_or(0); + let current_owner = before.get("controllerInstanceId").and_then(Value::as_str); + let requested_epoch = value_u64(operation, "epoch").unwrap_or(0); + let requested_owner = + value_string(operation, "controllerInstanceId").unwrap_or("MISSING"); + if current_action != value_string(operation, "fromAction").unwrap_or("MISSING") + || requested_epoch < current_epoch + { + deny_receipt(receipt, "BTCP_PERSISTED_ACTION_OR_EPOCH_MISMATCH"); + return Ok(()); + } + if requested_epoch == current_epoch + && current_epoch > 0 + && current_owner != Some(requested_owner) + { + deny_receipt(receipt, "BTCP_DOUBLE_CONTROLLER_EPOCH_CONFLICT"); + return Ok(()); + } + let after = serde_json::json!({"action":value_string(operation,"toAction").unwrap_or("INVALID"),"epoch":requested_epoch,"controllerInstanceId":requested_owner}); + (key, before, after) + } + _ => return Ok(()), + }; + project_state_digests(receipt, &before, &after)?; + write_state(transaction, &key, &after, &receipt.idempotency_key) +} + +fn persist_receipt( + path: &Path, + mut receipt: ProtocolDecisionReceipt, + request: Option<&ProtocolDecisionRequest>, +) -> Result { + let mut connection = open_ledger(path)?; + let transaction = connection + .transaction_with_behavior(TransactionBehavior::Immediate) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_LOCK_FAILED: {error}"))?; + let existing: Option<(String, String)> = transaction.query_row( + "SELECT input_digest, receipt_json FROM protocol_receipts WHERE idempotency_key=?1 ORDER BY sequence ASC LIMIT 1", + params![receipt.idempotency_key], + |row| Ok((row.get(0)?, row.get(1)?)), + ).optional().map_err(|error| format!("HOLOLAKE_GLS_LEDGER_READ_FAILED: {error}"))?; + if let Some((input_digest, json)) = existing { + if input_digest == receipt.input_digest { + return serde_json::from_str(&json) + .map_err(|error| format!("HOLOLAKE_GLS_RECEIPT_REPLAY_INVALID: {error}")); + } + receipt.decision = "DENY".into(); + receipt.reason_codes = vec!["GLP_IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_INPUT".into()]; + } + if let Some(request) = request { + enforce_persistent_state(&transaction, &mut receipt, request)?; + } + let previous: Option<(u64, String)> = transaction + .query_row( + "SELECT sequence, receipt_sha256 FROM protocol_receipts ORDER BY sequence DESC LIMIT 1", + [], + |row| Ok((row.get(0)?, row.get(1)?)), + ) + .optional() + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_TAIL_FAILED: {error}"))?; + receipt.sequence = previous.as_ref().map_or(1, |(sequence, _)| sequence + 1); + receipt.previous_receipt_sha256 = previous.map_or_else(|| "GENESIS".into(), |(_, hash)| hash); + receipt.receipt_id = format!("GLP-RCP-{:012}-{}", receipt.sequence, Uuid::new_v4()); + receipt.receipt_sha256.clear(); + receipt.receipt_sha256 = sha256( + &serde_json::to_vec(&receipt) + .map_err(|error| format!("HOLOLAKE_GLS_RECEIPT_SERIALIZE_FAILED: {error}"))?, + ); + let json = serde_json::to_string(&receipt) + .map_err(|error| format!("HOLOLAKE_GLS_RECEIPT_SERIALIZE_FAILED: {error}"))?; + transaction.execute("INSERT INTO protocol_receipts(sequence,idempotency_key,input_digest,decision,receipt_sha256,receipt_json) VALUES(?1,?2,?3,?4,?5,?6)", params![receipt.sequence, receipt.idempotency_key, receipt.input_digest, receipt.decision, receipt.receipt_sha256, json]) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_APPEND_FAILED: {error}"))?; + transaction + .commit() + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_COMMIT_FAILED: {error}"))?; + Ok(receipt) +} + +fn build_receipt( + value: &Value, + parsed: Option<&ProtocolDecisionInput>, + decision: Decision, + protocols: Vec, + observed_at: u64, +) -> ProtocolDecisionReceipt { + let request = parsed.map(|input| &input.request); + let text = |pointer: &str| { + value + .pointer(pointer) + .and_then(Value::as_str) + .unwrap_or("UNKNOWN") + .to_string() + }; + ProtocolDecisionReceipt { + schema: RECEIPT_SCHEMA.into(), + receipt_id: String::new(), + sequence: 0, + previous_receipt_sha256: String::new(), + request_id: request.map_or_else( + || text("/request/requestId"), + |item| item.request_id.clone(), + ), + event_kind: request.map_or_else( + || text("/request/eventKind"), + |item| item.event_kind.clone(), + ), + human_controller_id: request.map_or_else( + || text("/request/humanControllerId"), + |item| item.human_controller_id.clone(), + ), + subject_id: request.map_or_else( + || text("/request/subject/canonicalId"), + |item| item.subject.canonical_id.clone(), + ), + target_id: request.map_or_else( + || text("/request/target/canonicalId"), + |item| item.target.canonical_id.clone(), + ), + protocol_bundle_commit: request.map_or_else( + || "UNKNOWN".into(), + |item| item.context.protocol_bundle_commit.clone(), + ), + protocol_bundle_sha256: sha256(EMBEDDED_KERNEL.as_bytes()), + protocol_set: protocols, + adapter_id: decision.adapter.into(), + input_digest: sha256(&serde_json::to_vec(value).unwrap_or_default()), + decision: decision.decision.into(), + reason_codes: decision.reasons, + state_before_digest: request + .map_or_else(|| "UNKNOWN".into(), |item| item.state_before_digest.clone()), + state_after_digest: request + .map_or_else(|| "UNKNOWN".into(), |item| item.state_after_digest.clone()), + evidence_refs: request.map_or_else(Vec::new, |item| item.evidence_refs.clone()), + time_authority: format!("HOLOLAKE_GUANGHU_TIME_AUTHORITY@{observed_at}"), + observed_at_unix_ms: observed_at, + idempotency_key: request.map_or_else( + || text("/request/idempotencyKey"), + |item| item.idempotency_key.clone(), + ), + signer: "HOLOLAKE_NATIVE_PROTOCOL_KERNEL_LOCAL_HASH_CHAIN".into(), + receipt_sha256: String::new(), + } +} + +fn decide_value_at( + ledger: &Path, + session_root: &Path, + value: Value, + observed_at: u64, +) -> Result { + let parsed = match serde_json::from_value::(value.clone()) { + Ok(input) => input, + Err(_) => { + return persist_receipt( + ledger, + build_receipt( + &value, + None, + Decision { + adapter: "glp-envelope-codec", + decision: "DENY", + reasons: vec!["GLP_STRICT_CODEC_REJECTED_MALFORMED_INPUT".into()], + }, + vec!["GLS-0301".into(), "GLS-0306".into()], + observed_at, + ), + None, + ) + } + }; + let authenticated = authenticate_context_at(session_root, &parsed.session); + let decision = match authenticated { + Ok(_) => decide( + &parsed.request, + &parsed.session.account_id, + &parsed.session.session_id, + observed_at, + ), + Err(_) => Decision { + adapter: "glp-identity-reference", + decision: "DENY", + reasons: vec!["GLP_SESSION_AUTHENTICATION_FAILED".into()], + }, + }; + let protocols = + crate::gls_protocol_runtime::require_adapter(decision.adapter, &parsed.request.event_kind) + .or_else(|_| { + crate::gls_protocol_runtime::require_adapter( + "glp-decision-kernel", + "DECISION_RECEIPT", + ) + })?; + let receipt = build_receipt(&value, Some(&parsed), decision, protocols, observed_at); + persist_receipt(ledger, receipt, Some(&parsed.request)) +} + +#[tauri::command] +pub async fn decide_gls_protocol( + app: AppHandle, + input: Value, +) -> Result { + let ledger = ledger_path(&app)?; + let sessions = direct_session_root(&app)?; + tauri::async_runtime::spawn_blocking(move || { + decide_value_at(&ledger, &sessions, input, now_unix_ms()) + }) + .await + .map_err(|error| format!("HOLOLAKE_GLS_DECISION_JOIN_FAILED: {error}"))? +} + +#[tauri::command] +pub async fn compile_gls_hldp_program( + app: AppHandle, + input: Value, +) -> Result { + let Some(root) = input.as_object() else { + return Err("HOLOLAKE_GLC_COMMAND_OBJECT_REQUIRED".into()); + }; + if root + .keys() + .any(|key| !matches!(key.as_str(), "session" | "request" | "program")) + { + return Err("HOLOLAKE_GLC_COMMAND_FIELD_UNKNOWN".into()); + } + let program_value = root.get("program").cloned().unwrap_or(Value::Null); + let compiled = crate::gls_bootstrap_compiler::compile_hldp_program(program_value.clone()); + let golden = crate::gls_bootstrap_compiler::bootstrap_self_check()?; + let mut request = root + .get("request") + .cloned() + .unwrap_or_else(|| Value::Object(Map::new())); + let request_object = request + .as_object_mut() + .ok_or("HOLOLAKE_GLC_REQUEST_OBJECT_REQUIRED")?; + let (source_digest, unresolved_language, unresolved_permissions) = match &compiled { + Ok(gir) => ( + gir.source_sha256.clone(), + Vec::::new(), + Vec::::new(), + ), + Err(error) => ( + sha256(&serde_json::to_vec(&program_value).unwrap_or_default()), + vec![error.clone()], + vec!["STRICT_COMPILER_INPUT_REJECTED".into()], + ), + }; + let operation = serde_json::json!({ + "sourceDigest": source_digest, + "unresolvedNaturalLanguage": unresolved_language, + "unresolvedPermissions": unresolved_permissions, + "goldenVectorDigest": golden, + }); + request_object.insert("schema".into(), Value::from(REQUEST_SCHEMA)); + request_object.insert("eventKind".into(), Value::from("COMPILE_HLDP")); + request_object.insert( + "payloadSha256".into(), + Value::from(operation_digest(&operation)?), + ); + request_object.insert("operation".into(), operation); + let decision_value = serde_json::json!({"session": root.get("session").cloned().unwrap_or(Value::Null), "request": request}); + let ledger = ledger_path(&app)?; + let sessions = direct_session_root(&app)?; + let decision_receipt = tauri::async_runtime::spawn_blocking(move || { + decide_value_at(&ledger, &sessions, decision_value, now_unix_ms()) + }) + .await + .map_err(|error| format!("HOLOLAKE_GLC_DECISION_JOIN_FAILED: {error}"))??; + Ok(CompileHldpResult { + gir: if decision_receipt.decision == "ALLOW" { + compiled.ok() + } else { + None + }, + decision_receipt, + }) +} + +fn counts(connection: &Connection) -> Result<(u64, BTreeMap, String), String> { + let total = connection + .query_row("SELECT COUNT(*) FROM protocol_receipts", [], |row| { + row.get(0) + }) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_COUNT_FAILED: {error}"))?; + let mut by_decision = BTreeMap::new(); + let mut statement = connection + .prepare("SELECT decision, COUNT(*) FROM protocol_receipts GROUP BY decision") + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_COUNT_FAILED: {error}"))?; + let rows = statement + .query_map([], |row| { + Ok((row.get::<_, String>(0)?, row.get::<_, u64>(1)?)) + }) + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_COUNT_FAILED: {error}"))?; + for row in rows { + let (decision, count) = + row.map_err(|error| format!("HOLOLAKE_GLS_LEDGER_COUNT_FAILED: {error}"))?; + by_decision.insert(decision, count); + } + let tail = connection + .query_row( + "SELECT receipt_sha256 FROM protocol_receipts ORDER BY sequence DESC LIMIT 1", + [], + |row| row.get(0), + ) + .optional() + .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_TAIL_FAILED: {error}"))? + .unwrap_or_else(|| "GENESIS".into()); + Ok((total, by_decision, tail)) +} + +#[tauri::command] +pub async fn get_gls_protocol_kernel(app: AppHandle) -> Result { + let contract = load_contract()?; + let connection = open_ledger(&ledger_path(&app)?)?; + let (total, decision_counts, tail) = counts(&connection)?; + let executable_protocol_count = contract.stages[..6] + .iter() + .map(|stage| stage.protocols.len()) + .sum(); + Ok(ProtocolKernelSnapshot { + state: "P1_TO_P6_NATIVE_P7_FAIL_CLOSED".into(), + contract_id: contract.record_id, + source_commit: contract.source_commit, + executable_protocol_count, + implemented_stage_count: 6, + decision_receipt_count: total, + allow_count: *decision_counts.get("ALLOW").unwrap_or(&0), + deny_count: *decision_counts.get("DENY").unwrap_or(&0), + ambiguous_count: *decision_counts.get("AMBIGUOUS").unwrap_or(&0), + unverified_count: *decision_counts.get("UNVERIFIED").unwrap_or(&0), + last_receipt_sha256: tail, + stages: contract.stages, + p7_verified_physical_capability_count: 0, + p7_node_assemblies: contract.p7_node_assemblies, + raw_protocol_text_executed: contract.runtime_boundaries.raw_protocol_text_executed, + model_can_override_decision: contract.runtime_boundaries.model_can_override_decision, + bootstrap_compiler_self_check: "PASS_DETERMINISTIC_DOUBLE_COMPILE".into(), + bootstrap_golden_gir_sha256: crate::gls_bootstrap_compiler::bootstrap_self_check()?, + }) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::direct_local_session::{ + issue_ticket_at, open_at, IssueDiscoveryTicketInput, OpenSessionInput, + }; + use tempfile::TempDir; + + fn digest_value(value: &Value) -> String { + operation_digest(value).unwrap() + } + + fn authenticated_input( + root: &Path, + event: &str, + operation: Value, + now: u64, + key: &str, + ) -> Value { + let account_id = format!("ICE-GL-{key}"); + let ticket = issue_ticket_at( + root, + IssueDiscoveryTicketInput { + account_id: account_id.clone(), + lane_id: "personal-channel".into(), + client_instance_id: "test-instance".into(), + }, + ) + .unwrap(); + let session = open_at( + root, + OpenSessionInput { + account_id: account_id.clone(), + lane_id: "personal-channel".into(), + client_instance_id: "test-instance".into(), + discovery_ticket: ticket.discovery_ticket, + }, + ) + .unwrap(); + serde_json::json!({ + "session":{"accountId":account_id,"sessionId":session.session_id,"resumeSecret":session.resume_secret.unwrap()}, + "request":{"schema":REQUEST_SCHEMA,"requestId":format!("REQ-{key}"),"idempotencyKey":key,"eventKind":event,"humanControllerId":format!("ICE-GL-{key}"), + "subject":{"canonicalId":"ICE-P-ZY001","subjectKind":"AGE_PERSONA","instanceId":"persona-primary","domainId":"FIFTH_DOMAIN","registryRef":"registry://persona/ICE-P-ZY001","proofRef":"proof://persona/current"}, + "target":{"canonicalId":"JD-FD-PRIMARY","subjectKind":"NODE","instanceId":"jd-primary","domainId":"FIFTH_DOMAIN","registryRef":"registry://node/JD-FD-PRIMARY","proofRef":"proof://node/current"}, + "context":{"worldId":"GUANGHU_WORLD","domainId":"FIFTH_DOMAIN","channelId":"personal-channel","taskId":"TASK-1","authorizationRef":format!("direct-session://{}",session.session_id),"protocolBundleCommit":SOURCE_COMMIT,"visibilityScope":"PRIVATE_SUBJECT"}, + "issuedAtUnixMs":now-1,"expiresAtUnixMs":now+60_000,"payloadSha256":digest_value(&operation),"stateBeforeDigest":sha256(b"before"),"stateAfterDigest":sha256(b"after"),"evidenceRefs":[],"operation":operation} + }) + } + + #[test] + fn kernel_contract_covers_p1_to_p7_without_claiming_physical_capability() { + let contract = load_contract().unwrap(); + assert_eq!(contract.stages.len(), 7); + assert_eq!( + contract.stages[..6] + .iter() + .map(|stage| stage.protocols.len()) + .sum::(), + 21 + ); + assert!(contract + .p7_node_assemblies + .iter() + .all(|assembly| assembly.state != "ACTIVE_HEALTHY")); + } + + #[test] + fn malformed_and_expired_inputs_fail_closed_and_still_write_receipts() { + let temp = TempDir::new().unwrap(); + let ledger = temp.path().join("ledger.sqlite3"); + let malformed = decide_value_at( + &ledger, + temp.path(), + serde_json::json!({"request":{"idempotencyKey":"bad"}}), + 1000, + ) + .unwrap(); + assert_eq!(malformed.decision, "DENY"); + let mut expired = authenticated_input( + temp.path(), + "MESSAGE_VALIDATE", + serde_json::json!({}), + 2000, + "expired", + ); + expired["request"]["expiresAtUnixMs"] = Value::from(1999_u64); + let receipt = decide_value_at(&ledger, temp.path(), expired, 2000).unwrap(); + assert_eq!(receipt.decision, "DENY"); + assert_eq!( + open_ledger(&ledger) + .unwrap() + .query_row("SELECT COUNT(*) FROM protocol_receipts", [], |row| row + .get::<_, u64>(0)) + .unwrap(), + 2 + ); + } + + #[test] + fn every_stage_rule_is_deterministic_and_fail_closed() { + let temp = TempDir::new().unwrap(); + let ledger = temp.path().join("ledger.sqlite3"); + let now = 10_000; + let cases = [ + ( + "HEARTBEAT_OBSERVE", + serde_json::json!({"leaseExpiresAtUnixMs":20_000,"healthDigest":sha256(b"health")}), + "ALLOW", + ), + ( + "WORK_ORDER_TRANSITION", + serde_json::json!({"proposerId":"ICE-P-ZY001","approverId":"ICE-GL∞","fromStage":"REGISTERED","toStage":"TESTED"}), + "ALLOW", + ), + ( + "MEMORY_SYNC", + serde_json::json!({"causalRelation":"CONCURRENT","localVersion":2,"remoteVersion":2}), + "AMBIGUOUS", + ), + ( + "TIME_CONTINUITY", + serde_json::json!({"previousSequence":0,"nextSequence":1,"primaryInstanceId":"persona-primary","leaseExpiresAtUnixMs":20_000}), + "ALLOW", + ), + ( + "MODULE_ADMIT", + serde_json::json!({"moduleId":"GMP-1","immutableVersion":"1.0.0","contentDigest":sha256(b"module"),"provenanceRef":"repo://fixed","signatureRef":"sig://1"}), + "ALLOW", + ), + ( + "RUNWAY_ASSIGN", + serde_json::json!({"cpuUnits":1,"memoryBytes":1024,"channelIsolation":true,"isolationKey":"channel-1"}), + "ALLOW", + ), + ( + "EXTERNAL_ADAPTER_TRANSLATE", + serde_json::json!({"externalKind":"API","normalizedDigest":sha256(b"normalized"),"sourceRef":"api://fixed","requestsExecutionAuthority":false}), + "ALLOW", + ), + ( + "MODEL_ROUTE", + serde_json::json!({"modelId":"replaceable-model","modelIsPersona":false,"grantsWorldAuthority":false,"privacyClass":"PRIVATE","healthReceiptRef":"receipt://health/1"}), + "ALLOW", + ), + ( + "TEMPORARY_CAPABILITY", + serde_json::json!({"sandboxed":true,"permanentInstall":false,"autoPublish":false,"autoDeploy":false,"cleanupPlanDigest":sha256(b"cleanup")}), + "ALLOW", + ), + ( + "COMPILE_HLDP", + serde_json::json!({"sourceDigest":sha256(b"program"),"unresolvedNaturalLanguage":[],"unresolvedPermissions":[],"goldenVectorDigest":sha256(b"golden")}), + "ALLOW", + ), + ]; + for (index, (event, operation, expected)) in cases.into_iter().enumerate() { + let input = + authenticated_input(temp.path(), event, operation, now, &format!("case-{index}")); + assert_eq!( + decide_value_at(&ledger, temp.path(), input, now) + .unwrap() + .decision, + expected + ); + } + } + + #[test] + fn receipt_chain_is_idempotent_and_detects_key_reuse() { + let temp = TempDir::new().unwrap(); + let ledger = temp.path().join("ledger.sqlite3"); + let input = authenticated_input( + temp.path(), + "MESSAGE_VALIDATE", + serde_json::json!({}), + 1000, + "same", + ); + let first = decide_value_at(&ledger, temp.path(), input.clone(), 1000).unwrap(); + let replay = decide_value_at(&ledger, temp.path(), input, 1001).unwrap(); + assert_eq!(first.receipt_sha256, replay.receipt_sha256); + let mut changed = authenticated_input( + temp.path(), + "IDENTITY_VERIFY", + serde_json::json!({}), + 1000, + "changed-session", + ); + changed["request"]["idempotencyKey"] = Value::from("same"); + let conflict = decide_value_at(&ledger, temp.path(), changed, 1000).unwrap(); + assert_eq!(conflict.decision, "DENY"); + assert_eq!(conflict.previous_receipt_sha256, first.receipt_sha256); + } + + #[test] + fn concurrent_exact_replay_produces_one_receipt() { + let temp = TempDir::new().unwrap(); + let ledger = temp.path().join("ledger.sqlite3"); + let sessions = temp.path().join("sessions"); + let input = authenticated_input( + &sessions, + "MESSAGE_VALIDATE", + serde_json::json!({}), + 1_000, + "concurrent", + ); + let handles = (0..8) + .map(|_| { + let ledger = ledger.clone(); + let sessions = sessions.clone(); + let input = input.clone(); + std::thread::spawn(move || { + decide_value_at(&ledger, &sessions, input, 1_000).unwrap() + }) + }) + .collect::>(); + let receipts = handles + .into_iter() + .map(|handle| handle.join().unwrap()) + .collect::>(); + assert!(receipts + .iter() + .all(|receipt| receipt.receipt_sha256 == receipts[0].receipt_sha256)); + assert_eq!( + open_ledger(&ledger) + .unwrap() + .query_row("SELECT COUNT(*) FROM protocol_receipts", [], |row| row + .get::<_, u64>(0)) + .unwrap(), + 1 + ); + } + + #[test] + fn protocol_state_machines_are_atomic_persistent_and_fail_closed() { + let temp = TempDir::new().unwrap(); + let ledger = temp.path().join("ledger.sqlite3"); + let now = 10_000; + + let decide = |key: &str, event: &str, operation: Value| { + decide_value_at( + &ledger, + temp.path(), + authenticated_input(temp.path(), event, operation, now, key), + now, + ) + .unwrap() + }; + + assert_eq!( + decide( + "work-1", + "WORK_ORDER_TRANSITION", + serde_json::json!({"proposerId":"proposer","approverId":"approver","fromStage":"REGISTERED","toStage":"TESTED"}), + ) + .decision, + "ALLOW" + ); + assert_eq!( + decide( + "work-stale", + "WORK_ORDER_TRANSITION", + serde_json::json!({"proposerId":"proposer","approverId":"approver","fromStage":"REGISTERED","toStage":"TESTED"}), + ) + .reason_codes, + ["GLP_WORK_ORDER_PERSISTED_STAGE_MISMATCH"] + ); + + assert_eq!( + decide( + "time-1", + "TIME_CONTINUITY", + serde_json::json!({"previousSequence":0,"nextSequence":1,"primaryInstanceId":"persona-primary","leaseExpiresAtUnixMs":20_000}), + ) + .decision, + "ALLOW" + ); + let mut competing_time = authenticated_input( + temp.path(), + "TIME_CONTINUITY", + serde_json::json!({"previousSequence":1,"nextSequence":2,"primaryInstanceId":"persona-secondary","leaseExpiresAtUnixMs":20_000}), + now, + "time-double-primary", + ); + competing_time["request"]["subject"]["instanceId"] = Value::from("persona-secondary"); + assert_eq!( + decide_value_at(&ledger, temp.path(), competing_time, now) + .unwrap() + .reason_codes, + ["PTCP_PERSISTED_PRIMARY_LEASE_CONFLICT"] + ); + + assert_eq!( + decide( + "module-1", + "MODULE_ADMIT", + serde_json::json!({"moduleId":"GMP-PERSISTENT","immutableVersion":"1.0.0","contentDigest":sha256(b"module-a"),"provenanceRef":"repo://fixed","signatureRef":"sig://1"}), + ) + .decision, + "ALLOW" + ); + assert_eq!( + decide( + "module-conflict", + "MODULE_ADMIT", + serde_json::json!({"moduleId":"GMP-PERSISTENT","immutableVersion":"1.0.0","contentDigest":sha256(b"module-b"),"provenanceRef":"repo://fixed","signatureRef":"sig://1"}), + ) + .reason_codes, + ["GMP_IMMUTABLE_MODULE_DIGEST_CONFLICT"] + ); + + assert_eq!( + decide( + "lifecycle-1", + "LIFECYCLE_TRANSITION", + serde_json::json!({"fromState":"REGISTERED","toState":"DORMANT"}), + ) + .decision, + "ALLOW" + ); + assert_eq!( + decide( + "lifecycle-stale", + "LIFECYCLE_TRANSITION", + serde_json::json!({"fromState":"REGISTERED","toState":"DORMANT"}), + ) + .reason_codes, + ["PALP_PERSISTED_STATE_MISMATCH"] + ); + + assert_eq!( + decide( + "runway-assign", + "RUNWAY_ASSIGN", + serde_json::json!({"cpuUnits":1,"memoryBytes":1024,"channelIsolation":true,"isolationKey":"isolated-runway"}), + ) + .decision, + "ALLOW" + ); + let mut wrong_release = authenticated_input( + temp.path(), + "RUNWAY_RELEASE", + serde_json::json!({"resourcesReleased":true,"targetEvidenceRef":"receipt://cleanup/wrong","isolationKey":"isolated-runway"}), + now, + "runway-wrong-owner", + ); + wrong_release["request"]["subject"]["instanceId"] = Value::from("persona-secondary"); + assert_eq!( + decide_value_at(&ledger, temp.path(), wrong_release, now) + .unwrap() + .reason_codes, + ["GRSP_PERSISTED_RUNWAY_OWNER_MISMATCH"] + ); + assert_eq!( + decide( + "runway-release", + "RUNWAY_RELEASE", + serde_json::json!({"resourcesReleased":true,"targetEvidenceRef":"receipt://cleanup/ok","isolationKey":"isolated-runway"}), + ) + .decision, + "ALLOW" + ); + + assert_eq!( + decide( + "broadcast-1", + "BROADCAST_TRANSITION", + serde_json::json!({"fromAction":"REGISTER","toAction":"SUMMON","epoch":1,"controllerInstanceId":"persona-primary"}), + ) + .decision, + "ALLOW" + ); + let mut competing_controller = authenticated_input( + temp.path(), + "BROADCAST_TRANSITION", + serde_json::json!({"fromAction":"SUMMON","toAction":"ASSIGN","epoch":1,"controllerInstanceId":"persona-secondary"}), + now, + "broadcast-double-controller", + ); + competing_controller["request"]["subject"]["instanceId"] = Value::from("persona-secondary"); + assert_eq!( + decide_value_at(&ledger, temp.path(), competing_controller, now) + .unwrap() + .reason_codes, + ["BTCP_DOUBLE_CONTROLLER_EPOCH_CONFLICT"] + ); + + assert_eq!( + decide( + "memory-conflict", + "MEMORY_SYNC", + serde_json::json!({"causalRelation":"CONCURRENT","localVersion":2,"remoteVersion":3}), + ) + .decision, + "AMBIGUOUS" + ); + let connection = open_ledger(&ledger).unwrap(); + assert_eq!( + connection + .query_row("SELECT COUNT(*) FROM protocol_conflicts", [], |row| row + .get::<_, u64>(0)) + .unwrap(), + 1 + ); + assert_eq!( + connection + .query_row("SELECT COUNT(*) FROM protocol_state", [], |row| row + .get::<_, u64>(0)) + .unwrap(), + 6 + ); + } +} diff --git a/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_runtime.rs b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_runtime.rs index 935d530ac..2b0a0e9a2 100644 --- a/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_runtime.rs +++ b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_runtime.rs @@ -43,7 +43,7 @@ struct GlsCompilerBoundary { arbitrary_protocol_code_allowed: bool, executable_projection_requires_explicit_adapter: bool, unprojected_protocol_behavior: String, - legacy_untyped_dependency_behavior: String, + source_dependency_behavior: String, runtime_graph_source: String, runtime_dependency_cycles: String, unknown_protocol: String, @@ -61,6 +61,9 @@ struct GlsReconciliation { dependencies_without_numbered_source: Vec, numbered_sources_not_in_protocol_registry: Vec, legacy_dependency_cycles: Vec>, + source_reference_cycles: Vec>, + typed_source_dependency_counts: HashMap, + unclassified_source_dependency_count: usize, discovered_unreconciled_count: usize, authority_conflict_count: usize, } @@ -75,6 +78,7 @@ struct GlsDependencyEdge { target: String, edge_kind: String, enters_runtime_graph: bool, + classification_basis: Option, } #[derive(Clone, Debug, Deserialize)] @@ -83,6 +87,7 @@ struct GlsProtocol { source_sha256: String, registration: GlsRegistration, projection_state: String, + implementation_stage: Option, adapter: Option, event_kinds: Vec, dependencies: Vec, @@ -108,6 +113,9 @@ pub struct GlsProtocolRuntimeSnapshot { pub legacy_dependency_cycle_count: usize, pub discovered_unreconciled_count: usize, pub authority_conflict_count: usize, + pub typed_source_dependency_count: usize, + pub unclassified_source_dependency_count: usize, + pub implementation_stage_count: usize, pub active_adapters: Vec, pub raw_protocol_text_executed: bool, pub arbitrary_protocol_code_allowed: bool, @@ -133,8 +141,7 @@ fn validate_registry(registry: &GlsRuntimeRegistry) -> Result<(), String> { .compiler .executable_projection_requires_explicit_adapter || registry.compiler.unprojected_protocol_behavior != "INVENTORIED_NOT_EXECUTABLE" - || registry.compiler.legacy_untyped_dependency_behavior - != "AUDIT_ONLY_BLOCKS_NEW_ACTIVATION" + || registry.compiler.source_dependency_behavior != "TYPED_AUDIT_ONLY_NEVER_ACTIVATES" || registry.compiler.runtime_graph_source != "EXPLICIT_EXECUTABLE_PROJECTIONS_ONLY" || registry.compiler.runtime_dependency_cycles != "REJECT" || registry.compiler.unknown_protocol != "FAIL_CLOSED" @@ -144,14 +151,25 @@ fn validate_registry(registry: &GlsRuntimeRegistry) -> Result<(), String> { || registry.reconciliation.registered_draft_count != 33 || registry.reconciliation.registered_draft_not_started_count != 21 || registry.reconciliation.legacy_dependency_target_count != 57 - || registry.reconciliation.dependencies_not_in_protocol_registry.len() != 19 - || registry.reconciliation.dependencies_without_numbered_source.len() != 24 + || registry + .reconciliation + .dependencies_not_in_protocol_registry + .len() + != 19 + || registry + .reconciliation + .dependencies_without_numbered_source + .len() + != 24 || registry .reconciliation .numbered_sources_not_in_protocol_registry .len() != 31 || registry.reconciliation.legacy_dependency_cycles.len() != 3 + || registry.reconciliation.source_reference_cycles + != registry.reconciliation.legacy_dependency_cycles + || registry.reconciliation.unclassified_source_dependency_count != 0 || registry.reconciliation.discovered_unreconciled_count != 0 || registry.reconciliation.authority_conflict_count != 0 || registry.protocol_count != registry.protocols.len() @@ -215,10 +233,24 @@ fn validate_registry(registry: &GlsRuntimeRegistry) -> Result<(), String> { return Err("HOLOLAKE_GLS_REGISTRATION_NOT_RECONCILED".into()); } for edge in &protocol.dependency_edges { - match edge.edge_kind.as_str() { - "RUNTIME_REQUIRES" if edge.enters_runtime_graph => {} - "LEGACY_UNTYPED_REFERENCE" if !edge.enters_runtime_graph => {} - _ => return Err("HOLOLAKE_GLS_DEPENDENCY_EDGE_INVALID".into()), + if edge.edge_kind == "RUNTIME_REQUIRES" && edge.enters_runtime_graph { + if edge.classification_basis.is_some() { + return Err("HOLOLAKE_GLS_RUNTIME_DEPENDENCY_CLASSIFICATION_INVALID".into()); + } + } else if matches!( + edge.edge_kind.as_str(), + "NORMATIVE_REFERENCE" + | "SCHEMA_IMPORT" + | "BUILD_REQUIRES" + | "BOOT_REQUIRES" + | "RECOVERY_REQUIRES" + | "EVIDENCE_ONLY" + ) && !edge.enters_runtime_graph + && edge.classification_basis.as_deref() + == Some("BOOTSTRAP_COMPILER_V1_FAMILY_AND_TARGET_RULE") + { + } else { + return Err("HOLOLAKE_GLS_DEPENDENCY_EDGE_INVALID".into()); } } let runtime_edges = protocol @@ -239,6 +271,23 @@ fn validate_registry(registry: &GlsRuntimeRegistry) -> Result<(), String> { if executable != registry.executable_projection_count { return Err("HOLOLAKE_GLS_EXECUTABLE_COUNT_MISMATCH".into()); } + let stages = registry + .protocols + .iter() + .filter_map(|protocol| protocol.implementation_stage.as_deref()) + .collect::>(); + if stages != HashSet::from(["P0", "P1", "P2", "P3", "P4", "P5", "P6"]) + || registry.executable_projection_count != 25 + || registry.inventoried_not_executable_count != 50 + || registry + .reconciliation + .typed_source_dependency_counts + .values() + .sum::() + == 0 + { + return Err("HOLOLAKE_GLS_IMPLEMENTATION_STAGE_SET_INVALID".into()); + } let by_id = registry .protocols @@ -337,6 +386,20 @@ pub async fn get_gls_protocol_runtime() -> Result>() + .len(), active_adapters, raw_protocol_text_executed: registry.compiler.raw_protocol_text_executed, arbitrary_protocol_code_allowed: registry.compiler.arbitrary_protocol_code_allowed, @@ -352,11 +415,23 @@ mod tests { fn registry_is_pinned_and_never_executes_raw_protocol_text() { let registry = load_registry().unwrap(); assert_eq!(registry.protocol_count, 75); - assert_eq!(registry.executable_projection_count, 4); + assert_eq!(registry.executable_projection_count, 25); assert_eq!(registry.reconciliation.protocol_registry_id_count, 52); assert_eq!(registry.reconciliation.legacy_dependency_target_count, 57); assert_eq!(registry.reconciliation.legacy_dependency_cycles.len(), 3); assert_eq!(registry.reconciliation.authority_conflict_count, 0); + assert_eq!( + registry.reconciliation.unclassified_source_dependency_count, + 0 + ); + assert_eq!( + registry + .reconciliation + .typed_source_dependency_counts + .values() + .sum::(), + 183 + ); assert!(!registry.compiler.raw_protocol_text_executed); assert!(!registry.compiler.arbitrary_protocol_code_allowed); } @@ -394,7 +469,7 @@ mod tests { .iter_mut() .find(|protocol| protocol.id == "GLS-0253") .unwrap(); - numbering.dependency_edges[0].edge_kind = "LEGACY_UNTYPED_REFERENCE".into(); + numbering.dependency_edges[0].edge_kind = "NORMATIVE_REFERENCE".into(); assert_eq!( validate_registry(&dependency_tamper).unwrap_err(), "HOLOLAKE_GLS_DEPENDENCY_EDGE_INVALID" diff --git a/product-source/hololake-native-desktop/src-tauri/src/lib.rs b/product-source/hololake-native-desktop/src-tauri/src/lib.rs index 20c98c8a6..4fa67db61 100644 --- a/product-source/hololake-native-desktop/src-tauri/src/lib.rs +++ b/product-source/hololake-native-desktop/src-tauri/src/lib.rs @@ -11,6 +11,8 @@ mod direct_local_session; mod dynamic_capability_routing; mod enterprise_work_channel; mod glp_envelope; +mod gls_bootstrap_compiler; +mod gls_protocol_kernel; mod gls_protocol_runtime; mod home_status; mod knowledge_base; @@ -50,6 +52,9 @@ pub fn run() { direct_local_session::append_direct_local_session_event, direct_local_broker::get_nearby_ai_discovery, gls_protocol_runtime::get_gls_protocol_runtime, + gls_protocol_kernel::get_gls_protocol_kernel, + gls_protocol_kernel::decide_gls_protocol, + gls_protocol_kernel::compile_gls_hldp_program, local_development_bridge::acquire_development_write_lane, local_development_bridge::inspect_development_write_lane, local_development_bridge::release_development_write_lane, @@ -98,6 +103,9 @@ pub fn run() { zero_point::zero_point_status, ]) .setup(|app| { + // GLS 是 HoloLake 产品内核,不是开发机旁路服务。合同、依赖闭包、 + // 自举编译器或回执账本任一不可用时,产品启动失败关闭。 + gls_protocol_kernel::start_on_application_open(app.handle())?; // 软件打开即先启动时间主控并发起联网校时;失败只降级,不阻塞人进入 HoloLake。 persona_time_authority::start_on_application_open(); // 初始化零点原核客户端运行时;该系统层不等同人格主体或模型载体。 diff --git a/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs b/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs index bd110b916..82ba500d4 100644 --- a/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs +++ b/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs @@ -210,6 +210,7 @@ pub(crate) fn issue_authenticated_at( session_root: &Path, input: IssuePersonaTimeTicketInput, ) -> Result { + crate::gls_protocol_runtime::require_adapter("glp-continuity-kernel", "TIME_CONTINUITY")?; let session = authenticate_context_at(session_root, &input.session)?; issue_with_sample( authority_root, diff --git a/product-source/hololake-native-desktop/src/main.tsx b/product-source/hololake-native-desktop/src/main.tsx index 68adc82af..6d1040e44 100644 --- a/product-source/hololake-native-desktop/src/main.tsx +++ b/product-source/hololake-native-desktop/src/main.tsx @@ -97,11 +97,36 @@ interface GlsProtocolRuntimeSnapshot { legacyDependencyCycleCount: number discoveredUnreconciledCount: number authorityConflictCount: number + typedSourceDependencyCount: number + unclassifiedSourceDependencyCount: number + implementationStageCount: number activeAdapters: string[] rawProtocolTextExecuted: boolean arbitraryProtocolCodeAllowed: boolean unprojectedProtocolBehavior: string } +interface GlsKernelStage { id: string; state: string; protocols: string[] } +interface GlsNodeAssembly { protocolId: string; target: string; state: string; sourceEvidenceNode: string } +interface GlsProtocolKernelSnapshot { + state: string + contractId: string + sourceCommit: string + executableProtocolCount: number + implementedStageCount: number + decisionReceiptCount: number + allowCount: number + denyCount: number + ambiguousCount: number + unverifiedCount: number + lastReceiptSha256: string + stages: GlsKernelStage[] + p7NodeAssemblies: GlsNodeAssembly[] + p7VerifiedPhysicalCapabilityCount: number + rawProtocolTextExecuted: boolean + modelCanOverrideDecision: boolean + bootstrapCompilerSelfCheck: string + bootstrapGoldenGirSha256: string +} interface PersonalChannelIdentity { humanSubjectId: string; displayName: string; channelId: string; createdAtUnixMs: number } interface PersonalChannelModule { moduleId: string; kind: string; displayName: string; state: string; installedAtUnixMs: number; timeZone: string; calendarName: string; clockVerification: string } interface LoginSession { username: string; host: string; domain: string; signedInAtUnixMs: number } @@ -616,6 +641,7 @@ function HoloLakeApp() { const [developmentLane, setDevelopmentLane] = useState(null) const [numberingKernel, setNumberingKernel] = useState(null) const [glsRuntime, setGlsRuntime] = useState(null) + const [glsKernel, setGlsKernel] = useState(null) const [enterpriseEntry, setEnterpriseEntry] = useState(null) const [enterpriseEntryBusy, setEnterpriseEntryBusy] = useState(false) const [enterpriseReceiptBusy, setEnterpriseReceiptBusy] = useState(false) @@ -644,7 +670,7 @@ function HoloLakeApp() { setBeijingCoordinate(startup.coordinate) } catch { /* 联网失败时其余首页能力仍可启动。 */ } const localAccountId = getOrCreateLocalId('hololake-local-account', 'human-local') - const [homeResult, personalResult, knowledgeResult, codeResult, eraResult, developmentResult, numberingResult, glsRuntimeResult] = await Promise.allSettled([ + const [homeResult, personalResult, knowledgeResult, codeResult, eraResult, developmentResult, numberingResult, glsRuntimeResult, glsKernelResult] = await Promise.allSettled([ invoke('get_hololake_home_status'), invoke('get_personal_channel_snapshot'), invoke('get_knowledge_snapshot'), @@ -653,6 +679,7 @@ function HoloLakeApp() { invoke('inspect_development_write_lane', { input: { accountId: localAccountId } }), invoke('get_zero_core_numbering_kernel'), invoke('get_gls_protocol_runtime'), + invoke('get_gls_protocol_kernel'), ]) if (homeResult.status === 'fulfilled') setStatus(homeResult.value) if (personalResult.status === 'fulfilled') setPersonal(personalResult.value) @@ -665,6 +692,7 @@ function HoloLakeApp() { setDevelopmentLane(developmentResult.status === 'fulfilled' ? developmentResult.value : null) setNumberingKernel(numberingResult.status === 'fulfilled' ? numberingResult.value : null) setGlsRuntime(glsRuntimeResult.status === 'fulfilled' ? glsRuntimeResult.value : null) + setGlsKernel(glsKernelResult.status === 'fulfilled' ? glsKernelResult.value : null) }, []) const loadReceipts = useCallback(async () => { try { @@ -1372,7 +1400,8 @@ function HoloLakeApp() {

本机 GH-PNCC 投影

本机仓库挂载、开发写入通道与读取回执来自同一运行事件流。

已挂载仓库
{status.codeRepositoryMountCount}
投影回执
{status.pnccReceiptCount}
开发执行通道
{developmentLane?.state === 'ACTIVE' ? '已切入 HoloLake' : '等待受控载体'}
当前开发线
{developmentLane?.laneId || '—'}
当前写入载体
{developmentLane?.ownerInstanceId || '—'}
当前结论
{developmentLane?.state === 'ACTIVE' ? '开发执行环境已由 HoloLake 持有单写通道' : status.codeRepositoryMountCount > 0 && status.pnccReceiptCount > 0 ? '已有可核验运行记录' : '接口已接入,尚无完整运行记录'}
-

GLS 协议运行层

正本先完成注册对账和依赖分型;只有显式原生适配器进入执行图。

{glsRuntime ? '运行清单 v2 已加载' : '失败关闭'}
{glsRuntime ?
正本来源
{glsRuntime.sourceRepository} · {glsRuntime.sourceCommit.slice(0, 12)}
已发现编号协议
{glsRuntime.protocolCount}
协议注册表编号
{glsRuntime.protocolRegistryIdCount}
注册草案
{glsRuntime.registeredDraftCount} · {glsRuntime.registeredDraftNotStartedCount} 尚未实现
当前工程执行
{glsRuntime.executableProjectionCount}
已收录待工程化
{glsRuntime.inventoriedNotExecutableCount}
旧依赖目标
{glsRuntime.legacyDependencyTargetCount} · {glsRuntime.legacyDependencyCycleCount} 组待拆环
缺少编号正本的依赖
{glsRuntime.dependencyGapCount}
登记冲突 / 未对账
{glsRuntime.authorityConflictCount} / {glsRuntime.discoveredUnreconciledCount}
原文直接执行
{glsRuntime.rawProtocolTextExecuted ? '允许' : '禁止'}
任意协议代码
{glsRuntime.arbitraryProtocolCodeAllowed ? '允许' : '禁止'}
:

GLS 运行清单不可读,协议适配器全部保持关闭。

}
+

GLS 协议运行层

正本先完成注册对账和依赖分型;只有显式原生适配器进入执行图。

{glsRuntime ? '运行清单 v2 已加载' : '失败关闭'}
{glsRuntime ?
正本来源
{glsRuntime.sourceRepository} · {glsRuntime.sourceCommit.slice(0, 12)}
已发现编号协议
{glsRuntime.protocolCount}
协议注册表编号
{glsRuntime.protocolRegistryIdCount}
注册草案
{glsRuntime.registeredDraftCount} · {glsRuntime.registeredDraftNotStartedCount} 尚未实现
内嵌工程协议
{glsRuntime.executableProjectionCount} · P0–P6 共 {glsRuntime.implementationStageCount} 层
已收录待工程化
{glsRuntime.inventoriedNotExecutableCount}
已分型来源依赖
{glsRuntime.typedSourceDependencyCount} · 未分类 {glsRuntime.unclassifiedSourceDependencyCount}
旧来源关系环
{glsRuntime.legacyDependencyCycleCount} 组仅供审计 · 不进入运行图
缺少编号正本的依赖
{glsRuntime.dependencyGapCount}
登记冲突 / 未对账
{glsRuntime.authorityConflictCount} / {glsRuntime.discoveredUnreconciledCount}
原文直接执行
{glsRuntime.rawProtocolTextExecuted ? '允许' : '禁止'}
任意协议代码
{glsRuntime.arbitraryProtocolCodeAllowed ? '允许' : '禁止'}
:

GLS 运行清单不可读,协议适配器全部保持关闭。

}
+

HoloLake 原生协议内核

协议规则已编入软件本体;每次允许、拒绝、歧义和未核验裁决都写入本机哈希链回执。

{glsKernel ? '随软件运行' : '失败关闭'}
{glsKernel ?
P1–P6 原生器官
{glsKernel.executableProtocolCount} 份合同 · {glsKernel.implementedStageCount} 个阶段
协议裁决回执
{glsKernel.decisionReceiptCount}
允许 / 拒绝
{glsKernel.allowCount} / {glsKernel.denyCount}
歧义 / 未核验
{glsKernel.ambiguousCount} / {glsKernel.unverifiedCount}
GLC 自举一致性
{glsKernel.bootstrapCompilerSelfCheck === 'PASS_DETERMINISTIC_DOUBLE_COMPILE' ? '双编译一致' : '失败关闭'}
P7 物理能力
{glsKernel.p7VerifiedPhysicalCapabilityCount} 已获本机目标证据 · {glsKernel.p7NodeAssemblies.length} 项装配边界
模型可改写裁决
{glsKernel.modelCanOverrideDecision ? '允许' : '禁止'}
回执链末端
{glsKernel.lastReceiptSha256 === 'GENESIS' ? '尚无裁决' : glsKernel.lastReceiptSha256.slice(0, 16)}
:

原生协议内核不可读,所有协议裁决保持关闭。

}

零点原核编号内核

先按权威图确定主体类别与登记面,再进入编号核验;编号外形本身不构成权威。

{numberingKernel ? '本机内核已加载' : '失败关闭'}
{numberingKernel ?
权威图
{numberingKernel.authorityMapId}
权威图版本
{numberingKernel.authorityMapVersion}
正本提交
{numberingKernel.sourceCommit.slice(0, 12)}
人类入口命名空间
{numberingKernel.humanRouteNamespaces.join(' · ')}
自动派发身份号
{numberingKernel.automaticIdentityIssuance ? '已开启' : '禁止'}
未知编号
{numberingKernel.unknownNumber === 'FAIL_CLOSED' ? '失败关闭 · 不猜测' : numberingKernel.unknownNumber}
:

编号内核不可读,所有编号路由保持关闭。

}

用户编号验证

用户编号必须通过登记服务验证。验证结果不构成人格绑定、模型载体绑定或执行授权。

{zeroPoint ? (zeroPoint.route === 'verified' ? '验证有效' : '功能受限') : '正在读取'}