raptor.schema.blocks

raptor.schema.blocks#

The graph_block extension layer of the schema.

hawk never imports this module — only raptor.schema.manifest (the family-neutral layer) is part of hawk’s core-purity surface. This module is free to reference manifest, never the reverse.

Values below are copied VERBATIM from eagle/python/eagle/roles.py, cited by symbol below (symbol citations do not rot the way line citations do); eagle’s roles.py is not modified by this move — a later change may re-point it at this module instead.

The descriptor VALIDATOR lives here too. The clause that enforces this family’s wire contract — validate_block_descriptor() and the private _validate_graph_block / _validate_exec_ref it is built from — moved VERBATIM out of eagle/python/eagle/sidecar.py into this module, because enforcement lives with the contract’s OWNER at (never above) its lowest-floor consumer: the descriptor wire contract is declared here and consumed at the raptor+numpy floor, so its validator is spine content. It is ONE implementation with two importers — a downstream package’s two roads and eagle.sidecar.validate_sidecar’s pattern-conditional dispatch — never a copy. What did NOT move is everything serving the KERNEL families (ROLES / validate_roles, parse_derivative, the recognized-pattern and buffer-kind loops, MANIFEST_FORMATS): that vocabulary is eagle-owned and consumed only by eagle loaders, so its validator stays in eagle for the graph_block family only — eagle stays the deep validator everywhere else. This module imports nothing but raptor.schema.manifest, so the clause runs on a numpy-less, eagle-less interpreter.

Module Attributes

GRAPH_BLOCK_PATTERN

the graph-block family name (verbatim value from eagle/python/eagle/roles.py::RECOGNIZED_PATTERNS, one element of that set).

BLOCK_TOP_LEVEL_KEY_ORDER

the full top-level key order for a graph_block manifest — houses the literal "blocks" carriage key (kept out of the neutral module, per raptor.schema.manifest's note).

SCATTER_POLICIES

the declared TERMINAL-WRITE CONTRACT of a block's scatter (verbatim value from eagle/python/eagle/roles.py::SCATTER_POLICIES).

BLOCK_REQUIRED_FIELDS

the fields a graph_block descriptor MUST carry, beyond the general required set (verbatim value from eagle/python/eagle/roles.py::BLOCK_REQUIRED_FIELDS, minus a schema-key rename: fanin/fanout -> in_degree/out_degree, both ends renamed together, SCHEMA_VERSION stays 1).

BLOCK_EXEC_REF_FIELDS

the keys whose values are exec references (verbatim value from eagle/python/eagle/roles.py::BLOCK_EXEC_REF_FIELDS).

BLOCK_FORBIDDEN_FIELDS

kernel-machinery fields a descriptor must NOT carry (verbatim value from eagle/python/eagle/roles.py::BLOCK_FORBIDDEN_FIELDS).

BUFFER_KINDS

the declared-buffer kind vocabulary, schema v1 (verbatim value from eagle/python/eagle/roles.py::BUFFER_KINDS).

ALL_PATTERNS

the neutral base (raptor.schema.manifest.BASE_PATTERNS) plus graph_block.

Functions

validate_block_descriptor(…)

Validate a graph_block descriptor document; raise on any breach.