raptor.schema.blocks.validate_neural_block_descriptor

raptor.schema.blocks.validate_neural_block_descriptor#

raptor.schema.blocks.validate_neural_block_descriptor(meta, *, name)[source]#

Validate a neural_block descriptor document; raise on any breach.

THE public entry point of the descriptor family’s wire contract, and the ONE implementation of it: a downstream package’s neural-block spec type calls it directly on construction and when loading from a sidecar (the raptor+numpy floor road), and eagle.sidecar.validate_sidecar() calls it as its pattern-conditional neural_block clause (the eagle road). Two importers, no copy — which is what makes the two roads’ verdicts and messages identical by construction rather than by parallel maintenance.

The order is the CORPUS order and is contractual: the schema-version gate (raptor.schema.manifest.check_schema_version()) runs BEFORE the clause, so a descriptor that is both too new and malformed is refused for being too new — what corpus row row04c pins. meta is the descriptor as loaded from JSON (or as serialized in process); name names the artifact in every message. Returns meta unchanged, for call-site chaining.

Return type:

dict

Parameters:
  • meta (dict)

  • name (str)