```python:inference/core/cache/air_gapped.py
def _get_block_type_identifier(block) -> str:
    """Extract the canonical ``type`` identifier from a block specification."""
    try:
        schema = block.manifest_class.model_json_schema()
        properties = schema.get("properties")
        if properties is None:
            return block.identifier
        
        type_prop = properties.get("type")
        if type_prop is None:
            return block.identifier
        
        # The type field is typically a const or enum with one value.
        # The type field is typically a const or enum with one value.
        if "const" in type_prop:
            return type_prop["const"]
        if "enum" in type_prop:
            enum_values = type_prop["enum"]
            if enum_values:
                return enum_values[0]
    except Exception:
        pass
    return block.identifier
```