The graph registry

GENERATED from crates/hale-graph/src/registry.rs and held byte-equal by registry_matches_spec. Do not edit: change the table and run HALE_REGEN_REGISTRY=1…

Reference material, synced from the compiler repo’s spec/. The guide is the gentler path in.

GENERATED from crates/hale-graph/src/registry.rs and held byte-equal by registry_matches_spec. Do not edit: change the table and run HALE_REGEN_REGISTRY=1 cargo test -p hale-graph --test registry_matches_spec. The contract this index serves is spec/model.md § The graph registry.

The families, their legacy producers, the spec rules and the frozen Debug-string sites are counted by registry_is_well_formed, not here: a rendered total moved with every change to any family, so two unrelated changes conflicted on one line at every rebase.

Families

Section titled “Families”
family layer state kind producer legacy answers
seed_loading Layer 1 Canonical desugar collect_checkable 0 Which source units form the snapshot: the entry, every imported seed, their merge order and the spans’ virtual bases.
qualified_names Layer 1 Canonical desugar resolve_imports 0 What a qualified or aliased name denotes: the library identity, the mangled declaration, the construction target, the bus subject a path names.
desugar_sequence Layer 1 Canonical desugar desugar_before_check 0 Which rewrites the program receives before checking, in which order: the declaration-shaping passes only (JSON parsers, the serve and hub expansions, unit returns, construction aliases, qualified bus subjects, the omitted run, repr accessors). Sync inference is not a rewrite: its pick is a form row (sync_inference). The topic-reference and intra-locus rewrites are not desugars: they erase a written declaration reference the checker’s laws and the model read, and run in lowering’s resolved program, after the check.
sync_inference Layer 1 Canonical derivation form_rows 0 Which sync discipline each @form declaration gets: one row per declaration with the author’s configuration (omitted, a written discipline, none included, or an argument naming none) and the effective discipline, inference’s pick for a hashmap form left unconfigured, from the domains each of its instances is called from; two queries, explicitly configured and safe for cross-domain access.
effect_class_table Layer 1 Canonical derivation EffectClasses 0 The user effect classes of a load: one table every seed is parsed through, so a class (its name, its identity in the program’s one class namespace) has one User(i) index in every seed; which were declared, which are composed, and the one expansion of a composed class.
unit_catalogue Layer 2 Canonical derivation close 0 Exact rational relationships between resolved unit identities, cycle consistency witnesses, and coarsest widening-compatible denominations. A program’s catalogue is closed from its unit declarations and the stdlib’s time catalogue’s (the unit_declarations family); expression typing reads its factors through the quantities’ rules (unit_quantities, GH #1076 U3), Duration’s and Time’s among them (U4).
unit_declarations Layer 2 Canonical derivation derive_unit_rows 0 What each unit-dialect declaration is (GH #1076): every unit and its equation, every quantity, point, identity, range and refinement with its component, denomination, quantity, origin, policy and range, every unit a declaration names resolved, and the program’s catalogue closed from them; and whether the declarations obey the dialect’s structural laws.
top_scope Layer 2 Canonical derivation build_top_scope 0 What every top-level name denotes: the symbol table over the merged program.
expression_typing Layer 2 Canonical derivation check_bundle_scoped 0 The type of every expression, and the typed edges (calls, sends, field reads) the locus graph is built from.
generics Layer 2 Canonical derivation unify_generic_ty 0 Which monomorph a generic call instantiates and how its bindings unify.
surfaces Layer 2 Canonical law conformance_witness 0 Which surface is visible at which depth edge: contract exposure, interface conformance, perspective designation and serves conformance.
forms Layer 2 Canonical law check_form_shape 0 Whether a form’s shape, its capacity slots and its projection class are well formed, and which operation set closes each slot.
stdlib_surface Layer 2 Canonical capability SURFACES 0 What each stdlib function is: its signature, its effect classes, whether it blocks, how it lowers, and what a value of a type can be rendered as.
entrypoint Layer 3 Canonical derivation entry_row 0 Which locus is the program’s main, whether the world is closed, and which declarations are imported.
ownership Layer 3 Canonical derivation resolve_owners 0 Who owns each locus-producing expression and each instance: the tower, with its two relations accepts_ancestor and owner_of_site; and, per binding site, whether its value is handed back, moved by =, or a frame-local array.
bus_graph Layer 3 Canonical derivation build_bus_graph 0 The message graph: subjects, publishers, subscribers, handlers, and the per-subject devirtualization gates.
topics Layer 3 Canonical derivation topic_wire_subjects 0 What each topic is on the wire: its subject, payload contract, routing key, bounds and shed policy; and which topic a send’s subject names.
bindings Layer 3 Canonical derivation derive_binding_rows 0 Which topics are bound to which transport, in which role, with which codec, and whether the transport can carry the payload.
dispatch Layer 3 Canonical derivation fn from_gates 0 How each bus subject dispatches: dynamic, static bucket or static direct, given its gates and the arrangement.
handler_routing Layer 3 Canonical derivation handler_rows 0 Which on_failure handler a failing child’s locus type reaches, and from which parent.
flows Layer 3 Canonical derivation survey 0 Which children are flows (released per completion) and which are resident; and, per locus declaration, whether its run() is long-running and whether it never returns.
restart Layer 3 Canonical derivation handler_rows 0 Which loci declare restart operations, which restart in place, and what the restart bound is.
closures Layer 3 Canonical law closure_event_rows 0 Whether each closure’s recovery-event clauses (persists_through, resets_on) are well formed and can take effect: every name in the closed alphabet, dissolve never persisted through, no event in both clauses, every event one a recovery of the closed world applies to the locus, and a persistence with something to keep.
role_rows Layer 3 Canonical derivation role_rows 0 The role vocabulary: every role declaration of the bundle, with its includes, which a surface row’s requires and a hub binding’s requires: name.
surface Layer 3 Canonical derivation surface_rows 0 The program’s API as rows (GH #1417): one surface row per rpc line of an api block or @rpc handler (the surface, the member Locus::fn, the request, response and error types with their contract shape hashes, whether a failure is the server error, the pools the handler’s locus runs on, the required roles), each surface’s contract digest, each serve site’s exposure (its surface, transport instance, as: name, sources and receivers), and each hub binding’s stream row; R1 produces the rows and digests and names the serve sites and hub bindings for the description, R2 checks and serves the sites, R5 the hubs, and the family replaces api_surface at R4.
sealability Layer 3 Canonical law record_param_access 0 Which loci confine their state (@sealed), and which could.
runs_under Layer 3 Reserved derivation — 0 On whose authority a locus runs: the relation runs_under(locus, principal), with principals declared by the program.
transitions Layer 3 Reserved derivation — 0 For an evented locus: the transition each handler is, input event to output set (F.41, after phase 2).
effects Layer 4 Canonical derivation derive_effect_rows 0 Which effect classes each fn and locus reaches (the callgraph fixpoint), the declared classes and their causes:/depends: DAG, and the certificate relating the two.
blocking Layer 4 Canonical derivation blocking_path_match 0 Which fns block (a cooperative worker would be held), and whether the program places anything off the main thread.
alloc_summary Layer 4 Canonical derivation derive_alloc_summary 0 Where each allocation lands and when it is reclaimed: per-fn allocation, escape, scratch eligibility, method-scratch elision, stack arrays, arena elision.
borrow_lifetime Layer 4 Canonical law borrow_lifetime_diags 0 Whether a borrowed handle outlives its holder (GH #730), decided from position over the owner structure.
bare_fallible Layer 4 Canonical law bare_fallible_calls 0 Whether a fallible call’s error is addressed.
violate_fallible Layer 4 Canonical law violate_fallible_laws 0 Whether a fn that may violate says so: a value-returning one is fallible(ClosureViolation) (F.42), and one returning nothing is warned about until a later release makes it the law.
nonreturning Layer 4 Canonical law run_statically_nonreturning 0 Which run() bodies never return, which children are long-running, and whether the birth order or a pool starves because of it.
working_set Layer 4 Canonical derivation compute_program_working_set 0 The estimated working set per locus and program, and the locality law over it.
placement Layer 5 Canonical derivation derive_placement 0 Which thread domain each instance runs in: pools, pinned threads, replicas, affinity, and the deployment plan.
target_capability Layer 5 Canonical capability derive_capability_matrix 0 What a target can lower and what it refuses: the wasm stdlib refusals, link refusals, per-site skips, async_io availability, FFI portability.
deployment Layer 5 Reserved derivation — 0 A deployment as typed rows: root and horizon, component identities, instances and incarnations, resources and allocations, endpoints and routes, hosting and authority, persistence obligations (the habitat, after phase 2).
lifecycle_order Layer 6 Canonical derivation derive_lifecycle 0 The happens-before order per instance: birth sequence, params open and settle, failure delivery and its execution domain, reclaim prerequisites, drain, restart, teardown.
bus_inert Layer 6 Canonical derivation bus_inert 0 Whether the program can ever have a bus cell in flight, so drains can be elided.
law_backstops Layer 8 Canonical law lowering_laws 0 The laws that replaced lowering’s own refusals of rules the spec states.
model The law engine Canonical derivation derive_application_model_over 0 The canonical semantic model of a checked bundle: fifteen entity tables, seventeen relation tables, holes, capabilities, provenance (GH #476).
claims The law engine Canonical law claim_law_diags_over 0 Every user law: lowered claim rows, the judged verdicts over the model and evidence, constitution identities, and the artifact’s law account.
view The law engine Reserved derivation — 0 A named query over the tables: a node selector, a relation set and an adequacy policy, rendered by a backend (hale ui, after phase 2).
snapshot_identity Identity Canonical derivation mint 0 The identity of every semantic site in a snapshot: (seed, index), minted after the entry point’s desugars with the bundle’s source map, and again in the resolved-program step (numbered over the user program before the intra-locus rewrite, so the sends it records are numbered on every path, and minted over the merged program with the bundle’s seeds and a named seed for the bundled stdlib), idempotently (one numbering; a later mint numbers only what an earlier one did not see), with reliable provenance; and which declaration each use names (binding_of), resolved once by the mint.
demand Identity Canonical derivation Snapshot 0 Which families a consumer’s request computes, and in which order: a snapshot owns one load (the programs and their keys, each member’s own program beside the merged one, the source map, the import renames, the config that shaped them, the sequence already run, the mint) and derives each family on request (Snapshot::demand_*: the scope, the checked programs’ bus graph, ownership graph, handler rows and flow rows, law selection, the role rows, the arrangement, the effect rows, the model, the check in its two stages with the effects certificate report its typing produced, the lowering view), each at most once, blocking a family whose prerequisite reported errors.
digests Identity Canonical digest IDENTITIES 0 Every identity a build or an artifact carries, and what each covers: shape_hash, artifact_digest, model_hash, exec_digest, the toolchain and cache keys, source digests, and the snapshot key they were derived under.

Layer 1 — parse and desugar

Section titled “Layer 1 — parse and desugar”

seed_loading — Canonical · desugar

Section titled “seed_loading — Canonical · desugar”

Answers. Which source units form the snapshot: the entry, every imported seed, their merge order and the spans’ virtual bases.

Inputs. .hl files; import directives; the workspace root (hale.toml); editor overlays (LSP)

Producer. crates/hale-frontend/src/frontend.rs · collect_checkable

Also owned. crates/hale-frontend/src/parse_cache.rs · ParseCache; crates/hale-syntax/src/shift.rs · shift_program; crates/hale-syntax/src/shift.rs · shift_item; crates/hale-syntax/src/shift.rs · erase_positions

Consumers. check; build; run; test; replay; bench; lsp; dna (via the CLI)

Invariants.

Missing data. n/a

Focused tests. crates/hale-cli/tests/imports.rs (diamond_import, three_hop_import, import_library_key); crates/hale-cli/tests/source_map.rs; crates/hale-cli/tests/lsp.rs (lsp_and_check_agree_over_a_seed_that_imports, lsp_reports_an_unreadable_seed_member_as_check_does, lsp_outline_survives_a_link_failure); crates/hale-frontend/src/snapshot.rs (a_reused_parse_is_the_parse); crates/hale-syntax/src/shift.rs (the oracle over every .hl in the tree)

Spec. spec/projects.md

Guarded seams.

qualified_names — Canonical · desugar

Section titled “qualified_names — Canonical · desugar”

Answers. What a qualified or aliased name denotes: the library identity, the mangled declaration, the construction target, the bus subject a path names.

Inputs. import aliases; the seed cache; hale_stdlib::PATH_RENAMES; declaration names

Producer. crates/hale-frontend/src/imports.rs · resolve_imports

Also owned. crates/hale-types/src/mangle.rs · resolve_construction_aliases; crates/hale-frontend/src/imports.rs · name_library; crates/hale-types/src/qualified_subjects.rs · resolve_qualified_bus_subjects

Consumers. check; build; lsp (hover, definition, references)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-cli/tests/import_library_key.rs; crates/hale-cli/tests/import_library_names.rs; crates/hale-cli/tests/cross_seed_arity.rs; crates/hale-codegen/tests/cross_seed_imports.rs; crates/hale-types/tests/type_alias.rs; crates/hale-types/tests/qualified_subjects.rs; crates/hale-cli/tests/import_qualified_topic.rs

Spec. spec/semantics.md § Cross-seed namespace resolution; spec/projects.md

Guarded seams.

desugar_sequence — Canonical · desugar

Section titled “desugar_sequence — Canonical · desugar”

Answers. Which rewrites the program receives before checking, in which order: the declaration-shaping passes only (JSON parsers, the serve and hub expansions, unit returns, construction aliases, qualified bus subjects, the omitted run, repr accessors). Sync inference is not a rewrite: its pick is a form row (sync_inference). The topic-reference and intra-locus rewrites are not desugars: they erase a written declaration reference the checker’s laws and the model read, and run in lowering’s resolved program, after the check.

Inputs. the merged program; –env (constitutions); the cross-seed rename table

Producer. crates/hale-types/src/desugar_sequence.rs · desugar_before_check

Also owned. crates/hale-types/src/resolved.rs · rewrite_intra_locus; crates/hale-types/src/resolved.rs · resolve_rewritten; crates/hale-syntax/src/desugar.rs · desugar_intra_locus_topics; crates/hale-syntax/src/desugar.rs · desugar_topics; crates/hale-types/src/desugar_sequence.rs · bundled_stdlib; crates/hale-syntax/src/desugar.rs · desugar_omitted_run; crates/hale-syntax/src/desugar.rs · desugar_repr_accessors

Consumers. check; build; run; test; replay; bench; lsp; codegen (crates/hale-codegen/src/codegen.rs · build_resolved)

Invariants.

Missing data. n/a

Focused tests. crates/hale-cli/tests/api_description.rs; crates/hale-codegen/tests/framework_elision.rs; crates/hale-types/tests/topology_projection.rs (the_omitted_run_moves_no_artifact_and_no_diagnostic); crates/hale-types/tests/bus_graph.rs (a_rewritten_send_stays_on_the_resolved_graph, a_rewritten_topic_reference_stays_on_the_resolved_graph)

Spec. spec/semantics.md

Guarded seams.

sync_inference — Canonical · derivation

Section titled “sync_inference — Canonical · derivation”

Answers. Which sync discipline each @form declaration gets: one row per declaration with the author’s configuration (omitted, a written discipline, none included, or an argument naming none) and the effective discipline, inference’s pick for a hashmap form left unconfigured, from the domains each of its instances is called from; two queries, explicitly configured and safe for cross-domain access.

Inputs. placement (the table, per instance); top_scope; form declarations; method call sites

Producer. crates/hale-types/src/form_rows.rs · form_rows

Also owned. crates/hale-types/src/sync_inference.rs · infer_sync_for_bundle

Consumers. the snapshot (one row set per snapshot, after the mint, over its scope and placement table) (crates/hale-frontend/src/snapshot.rs · demand_forms); the allocation summary (sync_forms: the stdlib analysis copy’s, from that universe’s rows) (crates/hale-types/src/alloc_summary.rs · summarize_identified); check (F.31 cross-pool verdicts: the one predicate, safe for cross-domain access) (crates/hale-types/src/check.rs · check_placement_single_thread); check (instance aliasing: a field behind a sync discipline) (crates/hale-types/src/check.rs · locus_has_unsynchronized_state); the effects certificate engine (a call into a sync-bearing form or its holder can take its lock) (crates/hale-types/src/alloc_summary.rs · add_sync_forms); sync inference (its candidates: the forms not explicitly configured) (crates/hale-types/src/sync_inference.rs · infer_sync_for_bundle); model (sync_form, read by the depends law) (crates/hale-types/src/model_builder.rs · derive_application_model_over); the lowering view (the snapshot’s rows, and the merged stdlib’s as written) (crates/hale-types/src/resolved.rs · resolve_rewritten); codegen (the slot layout) (crates/hale-codegen/src/locus/decl.rs · sync_mode); lsp

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · sync_inference_a_hashmap_without_its_row_is_refused_at_its_declaration

Focused tests. crates/hale-types/tests/form_rows.rs (the_summary_reads_the_copys_rows_and_the_engine_adds_the_programs); crates/hale-frontend/src/snapshot.rs (the_form_rows_are_one_family_by_identity); crates/hale-types/tests/placement.rs

Spec. spec/forms.md § Cross-pool sync disciplines; spec/semantics.md § A form’s sync discipline

Guarded seams.

effect_class_table — Canonical · derivation

Section titled “effect_class_table — Canonical · derivation”

Answers. The user effect classes of a load: one table every seed is parsed through, so a class (its name, its identity in the program’s one class namespace) has one User(i) index in every seed; which were declared, which are composed, and the one expansion of a composed class.

Inputs. effect declarations and class references per seed; the load’s parse order (a seed after the seeds it imports)

Producer. crates/hale-syntax/src/ast.rs · EffectClasses

Also owned. crates/hale-syntax/src/lib.rs · parse_source_at_in; crates/hale-types/src/effect_classes.rs · EffectClassTable

Consumers. the load (own files, the editor’s members, every imported seed after its imports; through the provider’s parse cache when it carries one) (crates/hale-frontend/src/frontend.rs · parse_file); effects (contracts, phase contracts, the declared manifest) (crates/hale-types/src/effects.rs · EffectClassTable::of(); the effect rows (one table per snapshot, carried on the rows: the model’s effect-class rows and atoms, and the inferred manifest’s class names, read it there) (crates/hale-types/src/effect_rows.rs · EffectClassTable::of(); effects (causes) (crates/hale-types/src/frontier.rs · EffectClassTable::of(); alloc_summary (what @effects(is: …) carries) (crates/hale-types/src/alloc_summary.rs · EffectClassTable::of(); quantitative (user-class budgets) (crates/hale-types/src/quantitative.rs · EffectClassTable::of(); claims (lowering: class references, undeclared classes) (crates/hale-types/src/claim_lowering.rs · EffectClassTable::of(); topology (derived effect sets) (crates/hale-types/src/topology.rs · EffectClassTable::of()

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-cli/tests/cross_seed_effects.rs; crates/hale-cli/tests/xseed_user_effects.rs; crates/hale-types/src/effect_classes.rs (one_table_one_expansion); crates/hale-frontend/src/snapshot.rs (a_seed_is_numbered_after_the_seeds_it_imports)

Spec. spec/verification.md § Default-on & opt-in analyses

Guarded seams.

Layer 2 — declaration graphs

Section titled “Layer 2 — declaration graphs”

unit_catalogue — Canonical · derivation

Section titled “unit_catalogue — Canonical · derivation”

Answers. Exact rational relationships between resolved unit identities, cycle consistency witnesses, and coarsest widening-compatible denominations. A program’s catalogue is closed from its unit declarations and the stdlib’s time catalogue’s (the unit_declarations family); expression typing reads its factors through the quantities’ rules (unit_quantities, GH #1076 U3), Duration’s and Time’s among them (U4).

Inputs. unit declaration identities (UnitId: a SiteRef, the universe that minted the declaration and its SiteId); the stdlib’s time catalogue (hale-stdlib/hl/time.hl: ns us ms s min h day, from the stdlib’s analysis copy, SiteUniverse::StdlibAnalysis); equations with declaration identities and positive exact rational factors

Producer. crates/hale-types/src/unit_graph.rs · close

Also owned. crates/hale-types/src/unit_graph.rs · pub fn factor; crates/hale-types/src/unit_graph.rs · pub fn to_machine

Consumers. the unit declarations (the program’s catalogue, closed once from its equations; its inconsistent cycles are law 3’s witnesses; a point’s origin counted through factor) (crates/hale-types/src/units.rs · UnitGraph::close); conversion queries (reduced factor, exactness and equation witness) (crates/hale-types/src/unit_graph.rs · conversion); unpinned denomination queries (rational gcd and necessary input witnesses) (crates/hale-types/src/unit_graph.rs · meet); denomination values (a unit and an exact multiple; the factor between two, exact and as machine integers with an explicit overflow) (crates/hale-types/src/unit_graph.rs · pub fn factor); the quantities’ rules (every conversion’s exact factor, two denominations’ meet, a dimensionless denomination’s number: unit_quantities, U3) (crates/hale-types/src/unit_quantities.rs · pub fn factor); check –units (the witness report, U5: the headroom of an Int at a denomination, in the unit it is written against and in the coarsest unit of its component that still counts one, through factor) (crates/hale-types/src/unit_report.rs · catalogue.factor)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/src/unit_graph.rs; crates/hale-types/tests/unit_declarations.rs; crates/hale-types/tests/time_declarations.rs

Spec. spec/units.md § The catalogue

unit_declarations — Canonical · derivation

Section titled “unit_declarations — Canonical · derivation”

Answers. What each unit-dialect declaration is (GH #1076): every unit and its equation, every quantity, point, identity, range and refinement with its component, denomination, quantity, origin, policy and range, every unit a declaration names resolved, and the program’s catalogue closed from them; and whether the declarations obey the dialect’s structural laws.

Inputs. unit declarations and their equations (UnitDecl, UnitEquation); scalar type declarations (TypeDeclBody::Scalar: kind word, base, denomination, range: / round: / origin: clauses); the bundle’s other type, locus, interface and perspective names (what a base that is no scalar is); the stdlib’s seed declarations (hale-stdlib/hl/time.hl: the time catalogue, Duration, Time), from its analysis copy and its identities (U4); snapshot identities; unit_catalogue (the closure, and its witnessed cycles)

Producer. crates/hale-types/src/units.rs · derive_unit_rows

Also owned. crates/hale-types/src/units.rs · unit_laws; crates/hale-types/src/units.rs · declared_twice; crates/hale-types/src/units.rs · undeclared_units; crates/hale-types/src/units.rs · inconsistent_cycles; crates/hale-types/src/units.rs · second_quantity; crates/hale-types/src/units.rs · quantity_shape; crates/hale-types/src/units.rs · point_shape; crates/hale-types/src/units.rs · clauses; crates/hale-types/src/units.rs · identity_and_range_bases; crates/hale-types/src/units.rs · refinement_bases; crates/hale-types/src/units.rs · literal_suffix_names; crates/hale-types/src/units.rs · builtin_type_names; crates/hale-types/src/units.rs · typed_scalar_names; crates/hale-types/src/units.rs · stdlib_rows; crates/hale-types/src/units.rs · stdlib_literal; crates/hale-types/src/units.rs · quantity_tags; crates/hale-frontend/src/snapshot.rs · demand_units

Consumers. demand (one cell per snapshot, counted as this family) (crates/hale-frontend/src/snapshot.rs · derive_unit_rows); check (the twelve laws, through one entry, over the rows handed in: CheckInputs::units) (crates/hale-types/src/check.rs · unit_laws); check (the identities’ and ranges’ value rules, unit_values: each scalar’s kind, parent and range, from the rows handed in) (crates/hale-types/src/check.rs · ScalarTypes::new); check (the quantities’ and points’ value rules, unit_quantities: each row’s kind, component, denomination, quantity, origin and policy, a literal’s unit by name, read through the same ScalarTypes) (crates/hale-types/src/unit_quantities.rs · fn quantity_binop); the topic shape renderer (a quantity’s or a point’s wire tag, its denomination as written: quantity_tags, decision 9) (crates/hale-types/src/topic_identity.rs · quantity_tags); the resolver’s literal typing of a params initializer with no ascription (a time literal is a Duration: the stdlib’s rows, stdlib_literal, U4) (crates/hale-types/src/resolve.rs · stdlib_literal); codegen (a params or const initializer’s time literal, read without the typed bodies: its count of Duration from the stdlib’s rows, stdlib_literal, U4) (crates/hale-codegen/src/codegen.rs · stdlib_literal); codegen (a time literal in a body the checker types no row in, the stdlib’s own: its count from the stdlib’s rows, stdlib_literal, U4) (crates/hale-codegen/src/conversion.rs · stdlib_literal); check –units (the snapshot’s rows, handed to the report) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_units); check –units (the witness report, U5: each of the program’s scalar declarations with its kind, its denomination and the declaration whose in fixed it, its policy and the declaration that writes it, a point’s origin, its range and the narrowest machine width that holds it; the rows read through ScalarTypes::of_rows, no re-check; a development report, outside the hashed model half) (crates/hale-types/src/unit_report.rs · pub fn report)

Invariants.

Missing data. total: no stdlib row for a literal’s unit means the unit is no unit of the stdlib’s time catalogue: a params or const initializer of it is refused (param_value: set it in birth), and a literal of it in a body the checker types no row in is a missing required row (lower_quantity_literal)

Focused tests. crates/hale-types/tests/unit_declarations.rs; crates/hale-types/tests/unit_values.rs; crates/hale-types/tests/unit_quantities.rs; crates/hale-types/tests/time_declarations.rs; crates/hale-types/tests/time_literal_diagnostics.rs (a compound or retired time literal says what to write); crates/hale-types/tests/unit_report.rs; crates/hale-cli/tests/check_units.rs (the committed form’s report, pinned whole); crates/hale-codegen/tests/duration_scalar_arith.rs; crates/hale-types/tests/demand_gate.rs; tests/hale/unit_declarations_test.hl; tests/hale/identities_and_ranges_test.hl; tests/hale/unit_quantities_test.hl; crates/hale-types/tests/unit_acceptance.rs (the committed form’s example: each error it marks, its text where an earlier step decided otherwise, and no narrowing without a policy, per form); tests/hale/units_time_test.hl (the committed form’s stated results, U5, with the next four); tests/hale/units_money_test.hl; tests/hale/units_ticks_test.hl; tests/hale/units_identities_test.hl; tests/hale/units_temperature_test.hl

Spec. spec/units.md § Declarations; spec/units.md § The rows; spec/units.md § The laws; spec/units.md § The algebra; spec/units.md § Conversions; spec/units.md § The witness report; spec/verification.md § Structural & design rules

Guarded seams.

top_scope — Canonical · derivation

Section titled “top_scope — Canonical · derivation”

Answers. What every top-level name denotes: the symbol table over the merged program.

Inputs. the merged program; import renames

Producer. crates/hale-types/src/resolve.rs · build_top_scope

Consumers. check (crates/hale-types/src/check.rs · check_bundle_scoped); check (type expressions: the scope’s name table) (crates/hale-types/src/check.rs · &top.names); demand (every verb, the LSP’s diagnostics and its requests: one scope per snapshot) (crates/hale-frontend/src/snapshot.rs · build_top_scope); model (the snapshot’s scope, handed in) (crates/hale-types/src/model_builder.rs · ModelInputs); resolved program (lowering: the snapshot’s scope, handed in; its topic rows, and the stdlib’s bus rows and typed-body pairs answered over it) (crates/hale-types/src/resolved.rs · top: &TopScope); the stdlib’s bus rows (the scope of no program, which holds the stdlib’s declarations alone: once per process) (crates/hale-types/src/stdlib_bodies.rs · build_top_scope); lsp (definition, placement, the allocation survey: the snapshot’s scope) (crates/hale-lsp/src/lib.rs · demand_scope); lsp (completion, hover, references, enforcement: the editor’s scope, over the members that parsed while one does not) (crates/hale-lsp/src/lib.rs · demand_editor_scope)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/src/lifecycle/derive.rs (shared ancestry regression); crates/hale-types/tests/checks_inside_modules.rs; crates/hale-cli/tests/check_unknown_identifier.rs; crates/hale-types/tests/type_alias.rs

Spec. spec/semantics.md

Guarded seams.

expression_typing — Canonical · derivation

Section titled “expression_typing — Canonical · derivation”

Answers. The type of every expression, and the typed edges (calls, sends, field reads) the locus graph is built from.

Inputs. top_scope; declarations; bodies

Producer. crates/hale-types/src/check.rs · check_bundle_scoped

Also owned. crates/hale-types/src/resolve.rs · infer_literal_ty; crates/hale-types/src/typed_bodies.rs · typed_bodies; crates/hale-types/src/builtin_sigs.rs · BARE_BUILTIN_SIGS

Consumers. the snapshot (one typed-body table per snapshot, packaged on demand from the check’s record) (crates/hale-frontend/src/snapshot.rs · demand_typed_bodies); the check of a bundle no snapshot holds (the record packaged for the bare_fallible law) (crates/hale-types/src/check.rs · check_bundle_reporting); codegen (an accumulator slot’s element type, the closure’s typed-body row) (crates/hale-codegen/src/codegen.rs · accumulator_element_type); codegen (a bare builtin’s arity and result: its signature row) (crates/hale-codegen/src/codegen.rs · builtin_sig); the cross-pool value law (law_backstops, at the harness’s lowering view: the table’s omitted_args; the check reads its record’s) (crates/hale-frontend/src/snapshot.rs · omitted_args); the sealed rule (sealability: the param_accesses rows of each declaration, as its walk ends) (crates/hale-types/src/check.rs · settle_param_accesses); check –sealable (the snapshot’s table’s param_accesses) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_typed_bodies); check –units (every narrowing’s conversions row, U5: its factor or its range, a literal’s count, its discharge, and whether the target type’s round: gave it; one line for the rows the evaluations of one default share) (crates/hale-types/src/unit_report.rs · conversion_sites); codegen (a conversion between an identity or a range and its family: its cast’s conversions row, by its call on the evaluation path being lowered (empty outside a default), read from the body being emitted; lower_conversion reads the kind, the range and the discharge; a call with no row is no conversion, lowered as the call the checker resolved, never decided by its callee’s name) (crates/hale-codegen/src/conversion.rs · conversion_operand); codegen (a quantity’s or a point’s change of denomination, U3: a cast’s, .in(u)’s and .split(u)‘s row by the call, a division by a literal by the division, a value converted where it stands, a literal’s count and a printed value by the span, each on the evaluation path being lowered (empty outside a default), and every row read from the body being emitted (current_body, the declaration the checker recorded it under), never another’s, so a stdlib body, whose spans overlap the first file’s, finds none of a user body’s, and a constant’s initializer, lowered again at each use, is read from the constant on no evaluation path, a default’s use included (in_const_body); lower_scale emits the factor’s one multiplication, a point’s shift and one division rounded or checked by the row’s policy; a quantity literal is its row’s count, and a literal with no row is refused as a missing required row, save in a body the checker types no row in (the stdlib’s own, U4), where a time literal is its count of Duration from the stdlib’s rows; a printed value’s row is the unit written after its count) (crates/hale-codegen/src/conversion.rs · convert_value); codegen (an arithmetic operator over a quantity or a point, U4: its Operator row, by its span on the evaluation path being lowered, names the result’s type, the representation lowering emits the operation in: Int * Duration a Duration, Time - Time a Duration, a quantity at a denomination no declaration names an Int; codegen keeps no operator table of its own) (crates/hale-codegen/src/conversion.rs · operator_result); the bare_fallible law (a narrowing nothing discharges, a quantity’s included: the conversions column, once per conversion however many evaluations of a default hold it) (crates/hale-types/src/bare_fallible.rs · judge_narrowing); the closures’ reach law (the recoveries column: which locus each recovery statement outside the handlers applies its event to, by the type the checker gave its receiver) (crates/hale-types/src/closure_events.rs · unreached_events); every layer

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/typed_body_rows.rs · an_accumulator_without_a_row_is_refused_at_its_expression; total: no conversions row for a call (inside a default, under the evaluation path being lowered): the call is no conversion, and is lowered as the call the checker resolved (a local, a parameter or a fn), whatever its callee is named; no Operator row for an arithmetic operator (U4): the operator is over no quantity or point, or in a body the checker types no row in (the stdlib’s own), and is lowered in its operands’ one type, operands of two types refused (binary op operands of mixed types)

Focused tests. crates/hale-types/tests/typed_bodies.rs; crates/hale-types/tests/codegen_fixtures_typecheck.rs; crates/hale-codegen/tests/corpus_check_build_agreement.rs; crates/hale-types/tests/unit_values.rs (the conversion rows, by shape); crates/hale-codegen/tests/unit_conversion_lowering.rs (the emitted shape per policy, a_cast_without_its_row_is_an_ordinary_call, a_defaults_cast_is_lowered_by_its_evaluations_row, and a_nested_defaults_cast_is_lowered_by_its_paths_row); crates/hale-types/tests/unit_quantities.rs (every site a denomination changes is a row); crates/hale-codegen/tests/unit_quantity_lowering.rs (the emitted shape per rounding, the checked division, the split, a point’s shift, a factor no Int holds, a_literal_in_a_default_is_each_evaluations_count, a_constants_cast_is_its_conversion_inside_a_default, a_mixed_array_literal_stores_each_elements_count, a_users_row_never_reaches_a_stdlib_expression_at_its_span, a_user_fn_named_like_the_stdlib_converts); crates/hale-types/src/typed_bodies.rs (a_body_reads_its_own_row_at_a_span_another_body_shares); crates/hale-codegen/tests/unit_dialect_unsupported.rs (a_quantity_literal_with_no_row_is_refused_where_it_is_written: the missing required row)

Spec. spec/types.md

Guarded seams.

generics — Canonical · derivation

Section titled “generics — Canonical · derivation”

Answers. Which monomorph a generic call instantiates and how its bindings unify.

Inputs. generic declarations; call arguments; the mangled token vocabulary

Producer. crates/hale-types/src/check.rs · unify_generic_ty

Also owned. crates/hale-types/src/check.rs · monomorph_table; crates/hale-types/src/check.rs · specialize_generic_bodies; crates/hale-types/src/check.rs · record_specialized_type

Consumers. check (a mangled monomorph name: the table’s row) (crates/hale-types/src/check.rs · resolve_generic_monomorph); codegen (a generic fn call’s type arguments and specialization: the call’s typed-body row, and the monomorph table’s row for them) (crates/hale-codegen/src/codegen.rs · generic_call_instance); codegen

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · generics_a_call_without_its_row_is_refused_at_the_call; total: no row means no specialization: a call with no specialized row for its enclosing body or locus reads its own, and a monomorph the table does not name is not queued ahead of the source walk

Focused tests. crates/hale-codegen/tests/generic_monomorph_agreement.rs; crates/hale-types/tests/typed_bodies.rs

Spec. spec/types.md

surfaces — Canonical · law

Section titled “surfaces — Canonical · law”

Answers. Which surface is visible at which depth edge: contract exposure, interface conformance, perspective designation and serves conformance.

Inputs. type, interface, contract, perspective declarations; locus members

Producer. crates/hale-types/src/check.rs · conformance_witness

Also owned. crates/hale-types/src/check.rs · conformance

Consumers. check (crates/hale-types/src/check.rs · check_contract_expose_validity); check (crates/hale-types/src/check.rs · check_serves_conformance); check (crates/hale-types/src/check.rs · check_reperspective); check (interface coercion, F.20) (crates/hale-types/src/check.rs · check_structural_impl); check (a bus adapter binding’s __StdBusAdapter contract) (crates/hale-types/src/check.rs · check_main_and_bindings); the typed-body table (the conformance column: every declared locus and interface pair, every generic locus specialization, the merged stdlib’s pairs in the lowering view) (crates/hale-types/src/typed_bodies.rs · typed_bodies); codegen (storage routing: the conformance column) (crates/hale-codegen/src/types/mod.rs · locus_satisfies_interface); codegen (vtable swap)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · surfaces_a_pair_without_its_conformance_row_is_refused; total: no row means no interface: a name that declares none is satisfied by nothing

Focused tests. crates/hale-types/tests/perspective_serves.rs; crates/hale-types/tests/violate_fallible.rs; crates/hale-types/tests/duplicate_member.rs; crates/hale-types/tests/typed_bodies.rs; crates/hale-codegen/tests/conformance_routing_correction.rs

Spec. spec/types.md; spec/semantics.md

forms — Canonical · law

Section titled “forms — Canonical · law”

Answers. Whether a form’s shape, its capacity slots and its projection class are well formed, and which operation set closes each slot.

Inputs. @form arguments; capacity declarations; indexed_by; sync discipline (the sync_inference form rows)

Producer. crates/hale-types/src/check.rs · check_form_shape

Consumers. check; codegen (slot layout: the form row’s cap and sync discipline) (crates/hale-codegen/src/locus/decl.rs · ring_buffer_cap); sync_inference

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · forms_a_form_without_its_row_is_refused_at_its_declaration

Focused tests. crates/hale-types/tests/reserved_locus_members.rs; crates/hale-codegen/tests/form_vec_bce.rs; crates/hale-types/tests/form_rows.rs (the_row_carries_the_forms_fixed_capacity)

Spec. spec/forms.md; spec/memory.md

stdlib_surface — Canonical · capability

Section titled “stdlib_surface — Canonical · capability”

Answers. What each stdlib function is: its signature, its effect classes, whether it blocks, how it lowers, and what a value of a type can be rendered as.

Inputs. one table of stdlib functions (SURFACES: one row per function, grouped by namespace: its name, whether user code may call it, its effect classes, its signature when it has one (with the error type of a function that can fail), and how it lowers: an intrinsic id, a Hale body by name, one Hale body per receiver type, a rename, or not at all); one rule of what prints (hale_types::printable: prints over a one-level PrintShape each reader maps its own type into); one table of the builtin types (BUILTIN_TYPES: per type its name, its fields in order as a name and a primitive, and when the checker injects it); hale_stdlib::PATH_RENAMES; the parsed stdlib source; std::time’s types, declared in the stdlib’s seed (crates/hale-stdlib/hl/time.hl, U4: the time catalogue, Duration, Time), which the table’s signatures name as SigTy::Duration and SigTy::Time

Producer. crates/hale-types/src/stdlib_surface.rs · SURFACES

Also owned. crates/hale-types/src/printable.rs · prints; crates/hale-types/src/builtin_types.rs · BUILTIN_TYPES

Consumers. effects (crates/hale-types/src/effects.rs · effects_for); frontier (crates/hale-types/src/frontier.rs · effects_for); resolve (the stdlib error-type shadow rule: which builtin error a path-call fails with is its row’s error column) (crates/hale-types/src/resolve.rs · stdlib_call_error); purity (a stdlib call is impure when its public row carries syscall, block or publish: the effect rows’ purity column reads the table and keeps no list of its own) (crates/hale-types/src/purity.rs · is_impure_stdlib); codegen; codegen (the printable rule: value_to_string_supports maps a CodegenTy into the rule’s shape before rendering) (crates/hale-codegen/src/codegen.rs · value_to_string_supports); check (the printable rule: ty_is_printable_at maps a Ty into the rule’s shape for println, to_string, an f-string and the String + x coercion) (crates/hale-types/src/check.rs · ty_is_printable_at); codegen (the builtin types’ structs, declared from their rows before the program’s types) (crates/hale-codegen/src/codegen.rs · declare_builtin_types); check (the builtin types injected into the top scope from their rows) (crates/hale-types/src/resolve.rs · inject_builtin_types); lsp (hover, completion); doc

Invariants.

Missing data. total: no row means the path is not one of the table’s functions: lowering calls the stdlib Hale declaration the path names by its mangled name (a Hale-source stdlib function, GH #470) and refuses any other path as not implemented, which the check’s unknown-function error refuses first (lower_std_unarmed); a type with no BUILTIN_TYPES row is the program’s own, and the printable rule answers every type

Focused tests. crates/hale-codegen/tests/stdlib_registry_parity.rs; crates/hale-codegen/tests/stdlib_table_answers.rs; crates/hale-codegen/tests/stdlib_statement_position.rs; crates/hale-types/tests/stdlib_sig_check.rs; crates/hale-codegen/tests/corpus_check_build_agreement.rs; crates/hale-codegen/tests/printable_rule.rs; crates/hale-codegen/tests/builtin_types.rs; crates/hale-types/tests/time_declarations.rs (the std::time types as the seed’s declarations, their FFI classes and an @ffi fn over them); crates/hale-cli/tests/doc_effects_catalogue.rs; crates/hale-graph/tests/registry_guard.rs (std_path_literals_in_codegen_are_the_registry_allowance)

Spec. spec/stdlib.md; spec/semantics.md § Rendering values as text

Layer 3 — the locus graph

Section titled “Layer 3 — the locus graph”

entrypoint — Canonical · derivation

Section titled “entrypoint — Canonical · derivation”

Answers. Which locus is the program’s main, whether the world is closed, and which declarations are imported.

Inputs. locus declarations (is_main, imported, module nesting); the top-level fn main; the minted sites

Producer. crates/hale-types/src/entry.rs · entry_row

Consumers. check (rule 1’s count reads the witness: the seed’s own mains, module-nested ones included) (crates/hale-types/src/check.rs · check_main_and_bindings); placement (the table is seeded from the row’s root, EntryRow::root: the entry, or the refused module-nested main of a seed with none, so the rules that read the table still judge it; the F.31 rule, the form rows’ sync inference, the blocking check, the pinned-in-a-loop rule, instance aliasing and the model’s arrangement read it) (crates/hale-types/src/placement.rs · derive_placement); check (decision 2’s refusal, a lowering law: a seed whose only main locus is module-nested, EntryRow::refused, is refused once at that locus’s name, by the check and by the harness’s lowering view) (crates/hale-types/src/lowering_laws.rs · module_nested_main_is_not_the_entry); check (rule 9’s closed world is a program with an entry, and its api exemption is the entry’s api: binding, never an imported main’s, which is inert) (crates/hale-types/src/check.rs · check_bus_graph); check (each main locus‘s own placement { } block is validated over the witness, deployed or not: an affinity on no named pool, two for one pool) (crates/hale-types/src/check.rs · check_pool_affinity); bus_graph (the closed world: the entry, or a top-level fn main) (crates/hale-types/src/bus_graph.rs · build_bus_graph); ownership (the closed world: the entry, or a top-level fn main, the bus graph’s test; the producer hands the walk its row, and the rows of a bundle no snapshot holds, OwnershipRows::of, build theirs; the stdlib’s rows have none) (crates/hale-types/src/ownership_graph.rs · collect_ownership_walk); effects (the async_io placement-implied advisory: the row’s root’s placement, the pools lowering spawns) (crates/hale-types/src/effects.rs · placement_implied_diags); check –matrix (a seed is an entrypoint when its row has an entry; the row is built over the seed’s own files, since no import holds the entry, so a seed whose import does not resolve is still counted and its pair reports the import) (crates/hale-cli/src/verbs/check/matrix.rs · seed_entry_kind); –env on check and the build paths (the load refuses an environment for a seed with no entry, after the mint, before the sequence’s own refusal) (crates/hale-frontend/src/snapshot.rs · demand_entry); build; dna; codegen (the deployment plan’s root is the placement table’s, the row’s entry) (crates/hale-codegen/src/codegen.rs · collect_main_placement); codegen (fn main is the row’s column, found by its site: the body in_main marks, whose return and assertion-failure exits key on it; a view with no row is refused before lowering, never given the row’s definition, top_level_fn_main) (crates/hale-codegen/src/codegen.rs · entry_fn); bindings (codegen’s binding term counts the entry’s entries, by the declaring locus’s site) (crates/hale-types/src/binding_rows.rs · binds_on_main); the lifecycle plan (the deferred main entry’s spine is the entry’s, by identity) (crates/hale-types/src/lifecycle/derive.rs · is_entry); the lowering view (the snapshot’s row, carried to codegen) (crates/hale-frontend/src/snapshot.rs · view.entry = Some(entry)); codegen (every comparison against the main locus reads the row’s entry, found in lowering’s program by its site: instantiation’s and the cascade’s placement overrides, the deferred entry’s pool join, the frame flush’s main-locus head before its pinned joins, whether the root’s literal hands it back so it keeps the join record of every replica of its pinned fields, and which struct carries those records (C52), the bindings prelude’s loss handler, and root_bindings, which the shm-ring subjects and the binding codec thunks read) (crates/hale-codegen/src/codegen.rs · is_entry_locus); –env and –matrix (an environment’s constitutions are adopted into the row’s root, the seed’s own main locus the build deploys: the entry, in every seed an environment may be bound to) (crates/hale-frontend/src/snapshot.rs · adopt_into_root); model (the header’s entrypoint names the root the arrangement is rooted at, the placement table’s, so the row’s root; main when there is none) (crates/hale-types/src/model_builder.rs · derive_application_model_over); lsp (hale/placement shows the row’s root’s params and placement block, a refused module-nested root included, never an imported library’s main locus) (crates/hale-lsp/src/lib.rs · placement_of); hale dna init (the seed’s entry and its file, by the row over the seed’s own files that parse, as seed_entry_kind reads it: no import is resolved, and none holds the entry) (crates/hale-cli/src/dna.rs · main_of); claims (the world tier: the row’s world(), every main locus the bundle declares, whose inline claims are the world law, an imported application’s included, GH #733; a bundle that closes a world refuses a top-level claims block of the closing seed’s own) (crates/hale-types/src/claims.rs · enumerate_clauses); the cross-seed rename (GH #774: an imported seed closes a world, so its constitutions’ vocabulary is its own, when the row over its own files, none of them renamed yet, has an entry) (crates/hale-types/src/mangle.rs · seed_declares_main)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · entrypoint_a_view_without_the_entry_row_is_refused; total: no entry in the row means no main locus is deployed, and no fn main column means the program has none, which lowering refuses as such

Focused tests. crates/hale-frontend/src/snapshot.rs (the_entry_row_is_the_seeds_own_top_level_main_locus); crates/hale-cli/tests/check_entry_decisions.rs; crates/hale-cli/tests/check_entry_consumers.rs (each consumer’s correction on the decided shapes, beside a control); crates/hale-lsp/src/lib.rs (the_placement_view_is_the_deployed_roots); crates/hale-cli/tests/nested_main_transition.rs (after the transition, end to end: a seed whose only main locus is module-nested is refused by check and build, beside its own errors, and the top-level control is deployed); crates/hale-types/tests/checks_inside_modules.rs (the refusal’s message and span; a module variant reports the control’s messages, and the refusal as its one addition); crates/hale-cli/tests/offthread_imported_main.rs (the binding term counts the entry’s entries); crates/hale-cli/tests/entry_point_placement.rs; crates/hale-types/tests/bus_graph.rs

Spec. spec/semantics.md § Bundle-wide rules

Guarded seams.

ownership — Canonical · derivation

Section titled “ownership — Canonical · derivation”

Answers. Who owns each locus-producing expression and each instance: the tower, with its two relations accepts_ancestor and owner_of_site; and, per binding site, whether its value is handed back, moved by =, or a frame-local array.

Inputs. locus declarations (params, accept, release); bodies (let, assign, return, field initialisers, placement entries); fresh factories (one producer); returned bindings; placement (the table: each bubbling edge’s class, per instance)

Producer. crates/hale-types/src/ownership.rs · resolve_owners

Also owned. crates/hale-types/src/ownership.rs · resolve_binding_facts; crates/hale-types/src/ownership_graph.rs · bubble_plans; crates/hale-types/src/ownership_graph.rs · compute_forwarding_sets; crates/hale-types/src/ownership_graph.rs · classify_owner_kind; crates/hale-types/src/ownership_graph.rs · classify_edge; crates/hale-types/src/ownership.rs · fresh_factories

Consumers. codegen (crates/hale-codegen/src/locus/instantiation.rs · site_owner); codegen (a monomorph’s accept rows: its template’s, specialized at synthesis) (crates/hale-codegen/src/codegen.rs · specialized_accepts); codegen (whether the enclosing locus accepts the child it births) (crates/hale-codegen/src/locus/instantiation.rs · parent_accepts_us); borrow_lifetime (a bare literal’s enclosing locus accepts its child: accepts_ancestor, over the snapshot’s graph’s rows) (crates/hale-types/src/borrow_lifetime.rs · accepts_ancestor); lowering view (its graph: the snapshot’s rows through the correspondence, then the stdlib’s; the bubble plans, accepts and the accept rows lowering reads) (crates/hale-types/src/resolved.rs · lowering_ownership_graph); model (dynamic births: the snapshot’s graph) (crates/hale-frontend/src/snapshot.rs · demand_ownership_graph); a declaration’s dependents (X2: a locus’s births, accepts and instantiations make its neighbours through the ownership graph, the snapshot’s graph) (crates/hale-frontend/src/snapshot.rs · declaration_dependents); check (type-check rule 20, the unowned-subscriber rule: owner_of_site over the snapshot’s graph, handed in through CheckInputs) (crates/hale-types/src/check.rs · check_unowned_subscriber_locus); alloc_summary (eager-only accept sets); check and the harness (the cross-pool spawn law reads the bubble plan) (crates/hale-types/src/lowering_laws.rs · cross_pool_spawn_used_as_a_value); codegen (the handed-back column: a root some literal hands back keeps its pinned fields’ join records in their instances, C52) (crates/hale-codegen/src/codegen.rs · collect_main_placement)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · ownership_an_instantiation_without_its_owner_row_is_refused; total: no accept row means the enclosing locus does not accept the child, no bubble plan means no ancestor owns it, and no factory row means the fn is no fresh factory

Focused tests. crates/hale-types/tests/model_arrangement.rs; crates/hale-codegen/tests/owner_table.rs; crates/hale-codegen/tests/ownership_matrix.rs; crates/hale-codegen/tests/ownership_reclaim.rs (shadow_return_binding); crates/hale-codegen/tests/ownership_bubble.rs; crates/hale-cli/tests/check_unowned_subscriber.rs (rule 20, one test per class of the migration); crates/hale-types/tests/ownership_graph.rs (lowerings_graph_is_the_snapshots_rows_through_the_correspondence); crates/hale-types/tests/self_containing_locus.rs (a_factory_returning_a_carrier_is_reported, a_carrier_with_an_accessor_arm_is_not_a_cycle: the checker reads the extended factory set); crates/hale-cli/tests/check_borrow_lifetime.rs (the law over accepts_ancestor); crates/hale-types/tests/ownership_graph.rs (the O rows: nested under pinned, on the owner’s pool, per-instance pairing, adapter, mixed); crates/hale-codegen/tests/ownership_bubble_mixed.rs (U-1: both instances’ owner, count, retention, birth thread and teardown, both arms and ASan; the transient control; the located refusal); crates/hale-codegen/tests/ownership_bubble_crosspool.rs (O-1 under ASan)

Spec. spec/decisions.md F.39; spec/semantics.md § Dissolve timing rules; spec/semantics.md § Placement block (type-check rule 20); spec/semantics.md § Locus instantiation (accept bubbling: the owner per site, the delivery per instance); spec/runtime.md § Interest-based ownership (accept bubbling)

Guarded seams.

bus_graph — Canonical · derivation

Section titled “bus_graph — Canonical · derivation”

Answers. The message graph: subjects, publishers, subscribers, handlers, and the per-subject devirtualization gates.

Inputs. topics; bus blocks; sends; bindings; placement (the table: every label, and so the direct-call gate)

Producer. crates/hale-types/src/bus_graph.rs · build_bus_graph

Also owned. crates/hale-types/src/bus_graph.rs · dispatch_gates; crates/hale-types/src/bus_graph.rs · cycle_from; crates/hale-types/src/bus_graph.rs · external_handlers

Consumers. check (rule 9: the wire rows, their bound, cross-seed and wildcard columns, over the entry row’s closed world; the snapshot’s graph, CheckInputs::bus) (crates/hale-types/src/check.rs · check_bus_graph); check (rule 10: the edges by declaration, through cycle_from, each edge’s send joined to the intra-locus relation by its id, CheckInputs::intra_locus) (crates/hale-types/src/check.rs · check_bus_cycles); check (rule 7: the placed declaration’s row, external_handlers) (crates/hale-types/src/check.rs · check_cooperative_pool_blocking); check (rules 11, 12, 19); model (subjects, endpoints and gates: the snapshot’s graph) (crates/hale-frontend/src/snapshot.rs · demand_bus_graph); topology; dispatch; lsp (hale/busGraph: the model’s graph, so eligibility is the diagnostics pass’s) (crates/hale-lsp/src/lib.rs · demand_bus_graph); codegen (a rewritten publish, found by its call’s id in the relation: the probes and the reclaimed subregion) (crates/hale-codegen/src/codegen.rs · intra_locus_rewrite); lowering view (its graph: the snapshot’s rows through the correspondence, each user site keyed by the topic rewrite’s wire, then the stdlib’s; the plan lowering reads is its gates) (crates/hale-types/src/resolved.rs · lowering_bus_graph); the check of a bundle no snapshot holds (check::check_bundle, the hale-types tests’ scope-taking entry): the producer itself, once per call, over the caller’s scope (crates/hale-types/src/check.rs · build_bus_graph)

Invariants.

Missing data. total: no row in the intra-locus relation means the call is the one the author wrote (the relation names every send the rewrite replaced, and the call keeps the send’s id); within the graph, an unresolved subject stays a hole (holes), and the plan’s subjects are the dispatch family’s

Focused tests. crates/hale-types/tests/bus_graph.rs (lowerings_graph_is_the_snapshots_rows_through_the_correspondence); crates/hale-types/tests/lowering_correspondence.rs; crates/hale-types/tests/bus_graph.rs (the B rows: nested, imported root, qualified field, last-segment collision, two domains, adapter); crates/hale-types/tests/bus_rules_over_graph.rs; crates/hale-types/tests/bus_payload_handler.rs; crates/hale-codegen/tests/bus_devirt_differential.rs; crates/hale-codegen/tests/nested_offthread_delivery.rs (the dispatch-plan flavor of a nested subscriber, a nested publisher and an adapter’s publication)

Spec. spec/semantics.md rules 7, 9-12, 19; spec/verification.md § Bus-graph property checks

Guarded seams.

topics — Canonical · derivation

Section titled “topics — Canonical · derivation”

Answers. What each topic is on the wire: its subject, payload contract, routing key, bounds and shed policy; and which topic a send’s subject names.

Inputs. topic declarations; send subjects; subscribe bounds; bindings (shm_ring)

Producer. crates/hale-types/src/topic_identity.rs · topic_wire_subjects

Also owned. crates/hale-types/src/topic_identity.rs · TopicRows::of; crates/hale-types/src/topic_identity.rs · by_wire

Consumers. check (the topic rows, built once per bundle on the TopScope) (crates/hale-types/src/resolve.rs · build_top_scope); model (the scope’s topic rows: each topic’s wire, and the gate merge per wire) (crates/hale-types/src/model_builder.rs · ModelInputs); codegen (the lowering view’s rows: dispatch, bindings, codecs, runtime shape registration) (crates/hale-codegen/src/codegen.rs · topics: &resolved.top.topics); codegen (the shm-ring bindings: each bound topic’s wire and payload, from its row) (crates/hale-codegen/src/codegen.rs · collect_shm_ring_subjects); codegen (the routing-key, on_full-fail and subscriber-bound tables, from the rows) (crates/hale-codegen/src/codegen.rs · collect_routing_key_subjects); topology (topic shapes); resolved program (the intra-locus relation’s wire subjects) (crates/hale-types/src/resolved.rs · topic_wire_subjects)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · topics_a_declared_topic_without_its_row_is_refused_at_its_name; total: no row for a subject means it is already a wire (topic_wire, after the topic rewrite); a topic declaration’s name, a binding entry’s topic and a rewritten send’s topic are required (Cx::topic_row)

Focused tests. crates/hale-codegen/tests/topic_declarations.rs; crates/hale-codegen/tests/replica_keys.rs; crates/hale-codegen/tests/serializer_shape.rs; crates/hale-types/src/topic_identity.rs (a_subject_names_its_topic_by_one_rule, a_shared_subject_names_no_topic)

Spec. spec/semantics.md § Topic declarations; spec/semantics.md § Phase 3: routing keys

Guarded seams.

bindings — Canonical · derivation

Section titled “bindings — Canonical · derivation”

Answers. Which topics are bound to which transport, in which role, with which codec, and whether the transport can carry the payload.

Inputs. bindings blocks; topics; transport specs; purity (codecs)

Producer. crates/hale-types/src/binding_rows.rs · derive_binding_rows

Consumers. check (the binding rules walk the rows: topic, duplicate, role, adapter, ring layout, constraints, codec; the or wait legality check reads the bound-topic set) (crates/hale-types/src/check.rs · check_main_and_bindings); check (a binding’s where constraints are held to its transport’s guarantee: the capability module’s table, read through the row’s transport kind) (crates/hale-types/src/capability/transport.rs · guarantee); the transport’s cell on the effective target: RemoteTransport(kind) × the target row’s backend, read through the snapshot (verdict-neutral: the adapter’s wasm refusal is a late link refusal today, a known-open cell) (crates/hale-frontend/src/snapshot.rs · binding_cell); model (main’s binding thread domains: the role and the transport kind) (crates/hale-types/src/model_builder.rs · ModelInputs); bus graph (the bound-topic set, at both grains, is the rows’ projection) (crates/hale-types/src/bus_graph.rs · collect_bus_walk); codegen (the prelude, the shm-ring subjects, the codec thunks and the pinned adapter loci read each entry’s transport kind, role, codec and producer-versus-attach from its row, through the lowering view; the entry’s own text supplies the transport’s parameters; a missing row is an error) (crates/hale-codegen/src/codegen.rs · root_bindings); codegen (whether a thread crosses the bus boundary: an entry of the entry’s bindings { }, binds_on_main, beside the placement table’s domains) (crates/hale-codegen/src/codegen.rs · program_has_offthread)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · bindings_an_entry_without_its_row_is_refused_at_its_topic; total: no entry in the entry row means no bindings { } to lower

Focused tests. crates/hale-cli/tests/binding_imported_main.rs; crates/hale-codegen/tests/bindings_codec_clause.rs

Spec. spec/decisions.md F.36, F.37; spec/semantics.md § Operational constraints (Form K)

Guarded seams.

dispatch — Canonical · derivation

Section titled “dispatch — Canonical · derivation”

Answers. How each bus subject dispatches: dynamic, static bucket or static direct, given its gates and the arrangement.

Inputs. bus_graph (its rows, keyed by wire subject: the gates, the payload_flat column among them); the stdlib’s bus rows (the logger’s log.** and its sinks: once per process, over the stdlib’s analysis copy, stdlib_bodies::bus_rows); top_scope (each topic row’s wire); placement (each site’s label; and the domains: the arrangement projection, project_arrangement, with the ownership graph’s births outside it); –no-bus-devirt

Producer. crates/hale-model/src/dispatch_plan.rs · fn from_gates

Also owned. crates/hale-model/src/dispatch_plan.rs · domain_map; crates/hale-types/src/bus_graph.rs · derive_dispatch_gates; crates/hale-types/src/stdlib_bodies.rs · bus_rows

Consumers. demand (the family’s two cells: the gates, derive_dispatch_gates, and the plan, from_gates over them, derived once per snapshot) (crates/hale-frontend/src/snapshot.rs · demand_dispatch_plan); lowering view (the snapshot’s plan, handed in: the view derives none) (crates/hale-types/src/resolved.rs · plan: &DispatchPlan); codegen (crates/hale-codegen/src/codegen.rs · build_resolved); codegen (crates/hale-codegen/src/bus/dispatch.rs · bus_devirt); exec_digest (the view’s plan, the snapshot’s) (crates/hale-cli/src/shared/options.rs · resolved.plan.digest()); model (the snapshot’s plan, handed in, held projected onto the model’s subjects and loci: Analyses::dispatch_plan) (crates/hale-types/src/model_builder.rs · projected); model dump (the model’s projection) (crates/hale-types/src/model_builder.rs · analyses.dispatch_plan)

Invariants.

Missing data. total: no row means the subject dispatches dynamically: no static plan row names it, at its publish and its register alike

Focused tests. crates/hale-cli/tests/dispatch_plan_cli.rs; crates/hale-codegen/tests/bus_devirt_direct.rs; crates/hale-cli/tests/dispatch_payload_flat.rs (every wire payload alternative through both publish arms against the codec, the column against the codec at every publish over the corpus, the plan change recorded as a compatibility change: –dump-model’s row, a pre-change recording refused by its exec digest and admitted with –allow-unverified-model, a post-change recording replayed); crates/hale-types/tests/dispatch_gates.rs (the snapshot’s gates are lowering’s graph’s over 545 views, the stdlib’s sinks closing log.** in each); crates/hale-types/tests/dispatch_plan_projection.rs (the model holds the snapshot’s plan projected and the dump prints it: the stdlib’s log.** row lowering’s alone where the program names no log.**, a shared row without the stdlib’s sinks, a DNA main whose registration order is not the model’s); crates/hale-types/tests/dispatch_plan.rs (an_imported_seeds_loci_have_their_domains: a two-seed fixture’s imported loci have their domains, same-domain on main); crates/hale-model/src/dispatch_plan.rs (same_domain_is_no_part_of_the_digest)

Spec. spec/model.md § Derived products; spec/decisions.md F.38; spec/runtime.md § Placement classes (the dispatch plan)

Guarded seams.

handler_routing — Canonical · derivation

Section titled “handler_routing — Canonical · derivation”

Answers. Which on_failure handler a failing child’s locus type reaches, and from which parent.

Inputs. failure declarations; declared loci and type aliases (the bundled stdlib’s loci included); import renames; ownership (the supervising parent instance, in lowering)

Producer. crates/hale-types/src/handler_routing.rs · handler_rows

Also owned. crates/hale-types/src/handler_routing.rs · child_locus_name; crates/hale-types/src/handler_routing.rs · resolve_locus_type

Consumers. lowering view (its rows: the snapshot’s through the correspondence, then the stdlib’s, the indexes rebuilt over the union) (crates/hale-types/src/resolved.rs · lowering_handler_routing); codegen (the handler table, one fn per row keyed by the row’s site) (crates/hale-codegen/src/locus/decl.rs · handlers_of_instance); codegen (handler bodies, by the row’s site) (crates/hale-codegen/src/locus/method.rs · handlers_of_instance); codegen (concrete handler rows at locus synthesis) (crates/hale-codegen/src/codegen.rs · self.handlers.specialize); codegen (a route: the row’s handler fn) (crates/hale-codegen/src/channels/mod.rs · failure_handler_for); codegen (__parent_on_failure) (crates/hale-codegen/src/channels/mod.rs · resolve_failure_route); codegen (the params-settle bracket: whether the locus has a handler) (crates/hale-codegen/src/locus/instantiation.rs · settles_failures); codegen (restart in place) (crates/hale-codegen/src/locus/restart.rs · restarts_in_place); model (supervises, over the snapshot’s rows: demand_handlers) (crates/hale-types/src/model_builder.rs · Supervises); check (duplicate handlers, over the snapshot’s rows handed in: CheckInputs) (crates/hale-types/src/check.rs · check_duplicate_failure_handlers); check (@supervised, over the same rows) (crates/hale-types/src/frontier.rs · supervised_diags); check (a recovery event no handler applies: each row’s child and the events its ops apply, over the snapshot’s rows, beside the typed bodies’ recovery statements) (crates/hale-types/src/closure_events.rs · unreached_events); ownership births (resolved child, declaring template and identity) (crates/hale-types/src/ownership_graph.rs · identify_child)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · handler_routing_a_handler_without_its_row_is_refused; total: no route means the parent declares no handler for the child, whose failure takes the unhandled route, and no handler row means the locus settles no failures

Focused tests. crates/hale-codegen/tests/lifecycle_flow.rs (on_failure_dispatch_by_child_type); tests/hale/on_failure_per_child_type_test.hl; crates/hale-types/tests/violate.rs; crates/hale-types/tests/handler_routing_probes.rs

Spec. spec/semantics.md § failure; spec/runtime.md (failure delivery)

Guarded seams.

flows — Canonical · derivation

Section titled “flows — Canonical · derivation”

Answers. Which children are flows (released per completion) and which are resident; and, per locus declaration, whether its run() is long-running and whether it never returns.

Inputs. release declarations; accept declarations; run bodies; declared loci and type aliases (handler_routing’s resolver); import renames

Producer. crates/hale-types/src/flows.rs · survey

Consumers. check –flows (each flow type as written, with its clauses: the snapshot’s rows) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_flows); check (a daemon-shaped locus that accepts a child type it releases no clause for: a law over the rows) (crates/hale-types/src/check.rs · check_accept_release); check (the run rows: the long-running-child rule’s long-running column, the starvation and birth-order laws’ never-returns column; the snapshot’s rows handed in, CheckInputs::flows, shared by all four) (crates/hale-types/src/check.rs · run_of); lowering view (the snapshot’s rows, handed in: lowering reads them by locus name, so they need no correspondence) (crates/hale-types/src/resolved.rs · let flows = flows.clone()); a declaration’s dependents (X2: a flow child and its release owners are neighbours, Snapshot::declaration_dependents) (crates/hale-frontend/src/snapshot.rs · fn dependency_index); the lifecycle plan (an accepted flow is torn down by the reclaim its run’s end runs, a resident by its owner’s cascade: the snapshot’s rows over the checked programs) (crates/hale-frontend/src/snapshot.rs · fn demand_lifecycle); codegen (run elision, run-end reclaim and the release call: Cx::is_flow, one row read) (crates/hale-codegen/src/codegen.rs · is_flow); codegen (the generic-instantiation queue: each locus specialization it creates asks the row for its template’s clauses, under the substitution its synthesis applies) (crates/hale-codegen/src/codegen.rs · specialize()

Invariants.

Missing data. total: no row means the child is resident: no release clause names it, so its owner’s cascade tears it down (Cx::is_flow)

Focused tests. crates/hale-codegen/tests/release_reclaims_flow.rs; crates/hale-codegen/tests/release_two_parents.rs; crates/hale-codegen/tests/release_generic_owner.rs; tests/hale/release_generic_owner_test.hl; crates/hale-types/src/flows.rs (a_clause_names_the_locus_lowering_names, a_template_clause_names_the_specialization_s_argument); crates/hale-types/tests/demand_gate.rs (a_build_surveys_the_flows_once_and_lowering_reads_that_survey)

Spec. spec/semantics.md § release(c) and flow children

Guarded seams.

restart — Canonical · derivation

Section titled “restart — Canonical · derivation”

Answers. Which loci declare restart operations, which restart in place, and what the restart bound is.

Inputs. closure and birth-check declarations; handler_routing (the rows’ recovery ops)

Producer. crates/hale-types/src/handler_routing.rs · handler_rows

Also owned. crates/hale-types/src/handler_routing.rs · recovery_ops

Consumers. codegen (which loci get restart points: _restart, _resume) (crates/hale-codegen/src/locus/restart.rs · can_fail); codegen (the for N retry bound) (crates/hale-codegen/src/codegen.rs · retry_bound_at); codegen (_restart, _resume); model

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · restart_a_bound_without_its_row_is_refused_at_the_statement; total: no row in the failure column means no failure can originate in the locus, so it gets no restart points (can_fail; a monomorph is no declaration and is in no column, known open), and no handler restarting it in place means none does

Focused tests. crates/hale-codegen/tests/restart_in_place_params.rs; crates/hale-codegen/tests/restart_bound.rs; crates/hale-types/tests/handler_routing_probes.rs (the failure column, the bounds); crates/hale-codegen/tests/restart_spine_ir.rs

Spec. spec/semantics.md § supervision

Guarded seams.

closures — Canonical · law

Section titled “closures — Canonical · law”

Answers. Whether each closure’s recovery-event clauses (persists_through, resets_on) are well formed and can take effect: every name in the closed alphabet, dissolve never persisted through, no event in both clauses, every event one a recovery of the closed world applies to the locus, and a persistence with something to keep.

Inputs. closure declarations (each clause’s names as the parser typed them: RecoveryEvents); handler_routing (each handler’s child and the events its ops apply); expression_typing (the typed bodies’ recoveries: each recovery statement outside the handlers, with the locus the checker typed its receiver as); entrypoint (whether the world is closed, as rule 9 asks)

Producer. crates/hale-types/src/closure_events.rs · closure_event_rows

Also owned. crates/hale-types/src/closure_events.rs · closure_event_laws; crates/hale-types/src/closure_events.rs · unreached_event_laws; crates/hale-types/src/closure_events.rs · outside_the_alphabet; crates/hale-types/src/closure_events.rs · persists_through_dissolve; crates/hale-types/src/closure_events.rs · in_both_clauses; crates/hale-types/src/closure_events.rs · unreached_events; crates/hale-types/src/closure_events.rs · nothing_to_keep

Consumers. check (the four laws over the clause rows alone, through one entry) (crates/hale-types/src/check.rs · closure_event_laws); check, verify, build, run, test, replay, bench, the LSP (the reach law, with the typing diagnostics, beside the bare_fallible law: over the snapshot’s handler rows, entry row and whole typed-body table) (crates/hale-frontend/src/snapshot.rs · unreached_event_laws); the check of a bundle no snapshot holds (the reach law over the table packaged from the typing’s record) (crates/hale-types/src/check.rs · unreached_event_laws); codegen (the accumulator reset: each closure’s typed persists_through events, compared as RecoveryEvents with the event a recovery statement lowers) (crates/hale-codegen/src/locus/decl.rs · persists_through)

Invariants.

Missing data. total: no persisted event means the closure persists through none: its accumulators are zeroed at every recovery event, the default resets_on states (emit_accumulator_reset_for_event)

Focused tests. crates/hale-types/tests/closure_events.rs; crates/hale-syntax/tests/closure_recovery_events.rs; crates/hale-codegen/tests/closure_recovery_events.rs (the reset at run time: default, resets_on, persists_through); crates/hale-types/tests/handler_routing_probes.rs (the recovery statements’ typed rows); crates/hale-codegen/tests/closure_resets_per_epoch.rs; crates/hale-types/tests/violate.rs

Spec. spec/semantics.md § Recovery events; spec/verification.md § Structural & design rules; spec/runtime.md § Closure-test infrastructure (recovery-event interaction)

Guarded seams.

role_rows — Canonical · derivation

Section titled “role_rows — Canonical · derivation”

Answers. The role vocabulary: every role declaration of the bundle, with its includes, which a surface row’s requires and a hub binding’s requires: name.

Inputs. role declarations

Producer. crates/hale-types/src/roles.rs · role_rows

Also owned. crates/hale-types/src/roles.rs · role_rows; crates/hale-types/src/roles.rs · role_laws; crates/hale-frontend/src/snapshot.rs · demand_role_rows

Consumers. check –matrix (the roles an environment maps: the pair’s snapshot’s role rows, RoleRows::declared_roles, read once the pair’s check has demanded them, not gated on the typing; a pair the check refuses has no snapshot and is reported by its refusal alone, with no role coverage) (crates/hale-cli/src/verbs/check/matrix.rs · demand_role_rows); check (the three role rules, a law over the role rows, CheckInputs::roles) (crates/hale-types/src/check.rs · role_laws); check (the surface laws: a row’s requires names a declared role, law 4) (crates/hale-types/src/surfaces.rs · surface_laws)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/tests/api_binding_check.rs; crates/hale-types/tests/role_rows.rs

Spec. spec/api.md § Surfaces and their rows; spec/types.md § Roles

surface — Canonical · derivation

Section titled “surface — Canonical · derivation”

Answers. The program’s API as rows (GH #1417): one surface row per rpc line of an api block or @rpc handler (the surface, the member Locus::fn, the request, response and error types with their contract shape hashes, whether a failure is the server error, the pools the handler’s locus runs on, the required roles), each surface’s contract digest, each serve site’s exposure (its surface, transport instance, as: name, sources and receivers), and each hub binding’s stream row; R1 produces the rows and digests and names the serve sites and hub bindings for the description, R2 checks and serves the sites, R5 the hubs, and the family replaces api_surface at R4.

Inputs. api blocks and @rpc handlers (the parse: TopDecl::Api, FnDecl::rpc); the locus declarations the rows name (their member fns, lifecycle methods, modes and failure handlers); the contract shapes (topic_identity::Shapes, the shape hashes the digest folds); placement (the pools the handlers’ loci and the receivers run on); topics (a hub stream’s wire subject); serve sites: api::serve(…) and its named arguments (R1 names them for the description; R2a checks them, the five laws, and builds each one’s exposure); topic bindings to a hub with requires:, bound: and on_full:, and the ws::Hub literal they name (R5)

Producer. crates/hale-types/src/surfaces.rs · surface_rows

Also owned. crates/hale-types/src/surfaces.rs · surface_rows; crates/hale-types/src/surfaces.rs · select_members; crates/hale-types/src/surfaces.rs · surface_laws; crates/hale-frontend/src/snapshot.rs · demand_surface_rows

Consumers. check (the admission law over the rows: laws 1 to 5 and 7 of spec/api.md, beside the may-violate law, CheckInputs::surfaces) (crates/hale-types/src/check.rs · surface_laws); check (the snapshot’s check stage: the same laws over the snapshot’s rows) (crates/hale-frontend/src/snapshot.rs · surface_laws); check (the laws of a serve site: an exposure named once, every receiver type bound, a receiver that outlives its exposure, a bound type the rows name, a stated queue, no serve site in a main locus the program imports and builds) (crates/hale-types/src/check.rs · serve_laws); check (the snapshot’s check stage: the serve-site laws over the snapshot’s rows) (crates/hale-frontend/src/snapshot.rs · serve_laws); the model (the surfaces and surface_rows tables, projected; the digest law) (crates/hale-types/src/model_builder.rs · inputs.surfaces); build (a hub binding the expansion could not serve, and a serve site over a transport this compiler does not ship, are refused) (crates/hale-types/src/lib.rs · unserved_sites); check –api (the inventory; one exposure’s description for a caller holding --holds under its role source; law 6’s notes on stderr) (crates/hale-cli/src/verbs/check/run_impl.rs · api_document); the OpenAPI, JSON Schema and MCP forms of one surface (check --api --surface), projections of its rows (crates/hale-types/src/surface_doc.rs · openapi); api export (R8a: a surface’s bundle, its description, OpenAPI, JSON Schema, MCP and digest files, generated from its rows and checkable against a committed copy; hale api export) (crates/hale-types/src/surface_doc.rs · surface_description); api client (R8a: a typed client of one surface in Hale or TypeScript, generated from its rows and held current by --check; hale api client, crates/hale-cli/src/api_gen/) (crates/hale-types/src/surface_doc.rs · client_model); serve (R2a: a serve site’s exposure, its rows adapter, its receivers’ plumbing and the codecs of what the rows carry, written before the check by the desugar sequence) (crates/hale-types/src/rpc_expand.rs · expand); serve (R2a: lowering reads the call as its exposure’s handle, a read of the serving locus’s param the expansion wrote; it reads no row); serve (the runtime’s dispatch over a socket: Context, the digest check, requires before enqueue, decode by shape, R2b and R3); hubs (R5: a topic bound to a hub: the hub’s literal made the standard library’s, its listener, one adapter binding and JSON codec per stream row, the rows adapter and the description’s pieces, written before the check by the desugar sequence) (crates/hale-types/src/hub_expand.rs · expand); hubs (the runtime, api_hub.hl: admission against the row’s requires, delivery from a queue of bound frames under on_full, expiry and revocation, closed at stop(), R5); describe / call / watch / admin / mcp –app (R4 C: each reads the exposure’s description, {"describe": true} or GET /.description, and speaks the R0 wire; crates/hale-cli/src/api_client.rs, mcp.rs); ui (reserved)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-cli/tests/api_contract_fixtures.rs; crates/hale-types/tests/api_hub_check.rs (one refusal per law of a hub binding in its wording, the binding admitted by the check and the build); crates/hale-codegen/tests/api_hub.rs (a publish reaches the hub once each, the address bound in the program’s birth, a stopped hub releases it); crates/hale-codegen/tests/api_hub_streams.rs (the witness’s stream half over sockets: admission and its refusals, delivery with increasing seq, revocation with nothing delivered after, expiry at its instant, closed at stop(), the served description against the fixtures, ASan); crates/hale-codegen/tests/api_hub_desk.rs (drop_old and drop_new shedding with the seq gap, rpcs on a subscriber’s connection, ASan); crates/hale-codegen/tests/api_hub_udp.rs (the stream half over datagrams: the id every datagram carries, admission and its refusals, revocation, expiry, unsubscribe, closed, the description by datagram); crates/hale-types/tests/api_rows_check.rs (one refusal per law in its wording, law 6’s statement, the fixture admitted); crates/hale-types/tests/surface_rows.rs (the fixture’s rows, digests and model rows; an @rpc row and an rpc line are one row); crates/hale-syntax/tests/api_surface_parse.rs (both spellings, the serve site, the hub binding, the refusals); crates/hale-model/src/surface.rs (the digest framings against digest.md)

Spec. spec/api.md; spec/api-description.schema.json; spec/model.md § The shape of a type

Guarded seams.

sealability — Canonical · law

Section titled “sealability — Canonical · law”

Answers. Which loci confine their state (@sealed), and which could.

Inputs. expression_typing (the typed bodies’ param_accesses column); top_scope (whether a receiver is sealed, and the methods it declares); locus declarations (the survey’s loci)

Producer. crates/hale-types/src/check.rs · record_param_access

Also owned. crates/hale-types/src/sealed_access.rs · sealed_access_law; crates/hale-types/src/sealed_access.rs · outside_access; crates/hale-types/src/sealability.rs · survey

Consumers. check (the sealed rule, a law over the rows, run as each top-level declaration’s walk ends, and once more after the walks per monomorph: each finding placed where the walk first reached the access, one per access however many evaluation paths or specializations reach it, and a default’s once per check however many declarations evaluate it) (crates/hale-types/src/check.rs · settle_param_accesses); check –sealable (the survey, a group-by over the snapshot’s rows: demand_typed_bodies) (crates/hale-cli/src/verbs/check/run_impl.rs · sealability::survey); claims (require sealed: the declaration’s sealed, not the rows)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/tests/sealed_locus.rs; crates/hale-types/tests/typed_bodies.rs (the_param_access_column_records_each_access_through_a_locus); crates/hale-types/tests/sealability_survey.rs; crates/hale-types/tests/sealable_survey_correction.rs

Spec. spec/verification.md § Secrets — confine, classify, claim; spec/verification.md § Structural & design rules; spec/projects.md (hale check --sealable)

Guarded seams.

runs_under — Reserved · derivation

Section titled “runs_under — Reserved · derivation”

Answers. On whose authority a locus runs: the relation runs_under(locus, principal), with principals declared by the program.

Inputs. principal declarations (a later dialect); ownership (an undeclared locus inherits its owner’s principal)

Producer. none: reserved, computes nothing.

Consumers. claims (only reaches(effects(secret(..))) via { runs_under(P) }); placement (policy projections per principal); dna (positions instantiate principals)

Invariants.

Missing data. n/a

Spec. RFC #1212, the authority comment

transitions — Reserved · derivation

Section titled “transitions — Reserved · derivation”

Answers. For an evented locus: the transition each handler is, input event to output set (F.41, after phase 2).

Inputs. @evented declarations; handler signatures

Producer. none: reserved, computes nothing.

Consumers. bus_graph (exact cycles); effects (rate bounds); lifecycle_order (finite products); replay

Invariants.

Missing data. n/a

Spec. RFC #1212 §6 (F.41 sketch)

Layer 4 — effects

Section titled “Layer 4 — effects”

effects — Canonical · derivation

Section titled “effects — Canonical · derivation”

Answers. Which effect classes each fn and locus reaches (the callgraph fixpoint), the declared classes and their causes:/depends: DAG, and the certificate relating the two.

Inputs. effect annotations; the callgraph; stdlib_surface (leaf effects); effect_class_table; ffi names

Producer. crates/hale-types/src/effect_rows.rs · derive_effect_rows

Also owned. crates/hale-types/src/frontier.rs · infer_effects; crates/hale-types/src/frontier.rs · infer_effect_bounds; crates/hale-types/src/purity.rs · infer_purity_for_bundle; crates/hale-types/src/effect_rows.rs · EffectRows; crates/hale-types/src/evidence.rs · derive_certificate_evidence; crates/hale-types/src/evidence.rs · derive_certificate_evidence_over

Consumers. check (crates/hale-types/src/check.rs · check_decorator_stacks); claims (certificate, causes, depends, budget); the certificate evidence (the check’s effects certificate report, read by the check’s laws and the artifact’s) (crates/hale-frontend/src/snapshot.rs · demand_effect_certificates); check (a codec binding’s purity assertion reads the purity column, demanding the rows only when a codec reaches it) (crates/hale-types/src/check.rs · CheckInputs); check (the blocking warning: which helpers hold a cooperative worker, the BLOCK class with its leaves and resolved targets, demanding the rows only once a placed field has a run() to walk) (crates/hale-types/src/check.rs · worker_holding_fns); model (effect labels, lower bounds and direct contributions, the last read by the reachability judgment’s effects(C) test, and the summary the rows’ walk read: the snapshot’s rows, handed in) (crates/hale-types/src/model_builder.rs · ModelInputs); the effects manifest (--dump-effects-manifest, --check-effects-manifest: the snapshot’s rows, cross-seed calls resolved through the renames) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_effects); replay (the live-effects gate reads the manifest over the snapshot’s rows, and refuses when they are blocked) (crates/hale-cli/src/verbs/replay.rs · demand_effects); doc

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-types/tests/effect_assertions.rs; crates/hale-types/tests/effects_cross_seed_correction.rs; crates/hale-types/tests/indirect_calls.rs; crates/hale-cli/tests/effects_baseline_gate.rs; crates/hale-cli/tests/effects_manifest.rs

Spec. spec/verification.md § Default-on & opt-in analyses; spec/verification.md § Claims

Guarded seams.

blocking — Canonical · derivation

Section titled “blocking — Canonical · derivation”

Answers. Which fns block (a cooperative worker would be held), and whether the program places anything off the main thread.

Inputs. stdlib_surface (holds_cooperative_worker); effects (the rows’ BLOCK class, their resolved targets and unresolved leaves); placement (the table’s domains); bindings (the program’s own main’s entries)

Producer. crates/hale-types/src/check.rs · blocking_path_match

Also owned. crates/hale-types/src/check.rs · worker_holding_fns; crates/hale-types/src/placement.rs · places_off_main; crates/hale-types/src/binding_rows.rs · binds_on_main

Consumers. check (rules 7, 8); effects (@no_block); codegen (mark_pinned, no_pinned dispatch: program_has_offthread over the view’s placement table and binding rows) (crates/hale-codegen/src/codegen.rs · program_has_offthread)

Invariants.

Missing data. total: no domain off main and no binding row of the entry means no thread crosses the bus boundary (program_has_offthread)

Focused tests. crates/hale-types/tests/placement.rs; crates/hale-codegen/tests/bus_devirt_no_pinned.rs; crates/hale-types/tests/checks_inside_modules.rs; crates/hale-cli/tests/offthread_imported_main.rs

Spec. spec/semantics.md rules 7, 8; spec/verification.md § Concurrency & placement safety; spec/semantics.md § The entry locus

Guarded seams.

alloc_summary — Canonical · derivation

Section titled “alloc_summary — Canonical · derivation”

Answers. Where each allocation lands and when it is reclaimed: per-fn allocation, escape, scratch eligibility, method-scratch elision, stack arrays, arena elision.

Inputs. bodies; signatures (non_allocating, fallible, ffi); the callgraph; ownership (accept sets)

Producer. crates/hale-types/src/alloc_summary.rs · derive_alloc_summary

Also owned. crates/hale-types/src/alloc_summary.rs · summarize_identified; crates/hale-types/src/alloc_routing.rs · derive_alloc_routing; crates/hale-types/src/alloc_routing.rs · scratch_local_free_fns

Consumers. the effects certificate engine (the check’s @effects, @phase_effects and placement diagnostics: the snapshot’s summary, handed in) (crates/hale-types/src/check.rs · CheckInputs); effects (the rows walk the snapshot’s summary and hold it, shared) (crates/hale-frontend/src/snapshot.rs · demand_effects); check (the unbounded-allocation advisory, --dump-alloc-summary and --report-unbounded-use: the snapshot’s summary) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_alloc_summary); the editor’s typing stage (the advisory in the diagnostics, Config::alloc_advisory: the snapshot’s summary) (crates/hale-frontend/src/snapshot.rs · typing_stage); lsp (hale/allocSummary: the snapshot’s summary) (crates/hale-lsp/src/lib.rs · demand_alloc_summary); model (its function rows, dispatch sites and holes: the snapshot’s summary’s own rows) (crates/hale-types/src/model_builder.rs · program_rows); topology (the artifact’s fn sort, labels, derived effects and through-stdlib contraction: the snapshot’s summary, handed in) (crates/hale-types/src/topology.rs · dump_topology_over); check (the hot-path lint: a law over the program’s own rows and their columns, the snapshot’s summary, handed in) (crates/hale-types/src/check.rs · check_hot_path_alloc); claims (@budget: the counting engines over the snapshot’s summary’s own rows, handed to the evidence) (crates/hale-types/src/evidence.rs · derive_certificate_evidence_over); codegen (arena routing at an allocation) (crates/hale-codegen/src/codegen.rs · current_arena_ptr); lowering view (the routing rows’ scratch-local set: the snapshot’s summary’s, handed in) (crates/hale-frontend/src/snapshot.rs · summary.scratch_local); codegen (a free fn’s scratch: the view’s non-allocating and scratch-local rows) (crates/hale-codegen/src/codegen.rs · alloc_routing); codegen (a locus’s arena, and its hooks’, methods’ and modes’ scratch: the elision rows, a monomorph’s specialized) (crates/hale-codegen/src/codegen.rs · locus_elision); resource_budget (the fd sites and the fd-leak warnings: the snapshot’s summary’s own rows) (crates/hale-types/src/resource_budget.rs · program_rows); frontier (the causes: engine: the summary’s own rows) (crates/hale-types/src/frontier.rs · causes_inner); a declaration’s dependents (X2: the call edges of the rows and of the declaration bodies) (crates/hale-frontend/src/dependents.rs · declaration_bodies)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · alloc_summary_a_declaration_without_its_routing_rows_is_refused; total: no row in the routing sets means the conservative answer: a fn not proven non-allocating keeps its scratch, one not scratch-local allocates into its caller’s arena, and a member with no scratch entry keeps its scratch; a locus’s elision rows and a free fn’s caller-arena row are required, a generic fn’s monomorph taking the rows’ producer over its synthesized declaration

Focused tests. crates/hale-types/tests/hot_path_alloc.rs; crates/hale-types/tests/alloc_summary_construction_correction.rs; crates/hale-types/tests/alloc_summary_correction.rs; crates/hale-types/tests/alloc_summary_own_rows.rs; crates/hale-types/tests/alloc_summary_reclaim_boundary.rs; crates/hale-types/tests/demand_gate.rs (a_build_classifies_the_scratch_local_fns_once); crates/hale-codegen/tests/alloc_model_rss.rs; crates/hale-codegen/tests/scratch_local_free_fn.rs; crates/hale-codegen/tests/fn_nonalloc_add.rs; crates/hale-codegen/tests/method_scratch_elision.rs

Spec. spec/memory.md § Allocation routing; spec/verification.md § Memory-bound proofs (item 1): the reclaim boundary; spec/styleguide.md

Guarded seams.

borrow_lifetime — Canonical · law

Section titled “borrow_lifetime — Canonical · law”

Answers. Whether a borrowed handle outlives its holder (GH #730), decided from position over the owner structure.

Inputs. ownership (Borrowed rows); bodies

Producer. crates/hale-types/src/borrow_lifetime.rs · borrow_lifetime_diags

Consumers. check (crates/hale-cli/src/verbs/check/run_impl.rs · borrow_lifetime_diags); build, run, test, replay, bench (a build config’s snapshot check, Config::build_rules) (crates/hale-types/src/lib.rs · build_rule_diags)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-cli/tests/check_borrow_lifetime.rs

Spec. spec/semantics.md § A borrow outlives its holder; spec/decisions.md F.39

Guarded seams.

bare_fallible — Canonical · law

Section titled “bare_fallible — Canonical · law”

Answers. Whether a fallible call’s error is addressed.

Inputs. typed_bodies (the fallible_calls column: each call’s callee mark and what addresses it); typed_bodies (the conversions column: each narrowing’s discharge, GH #1076)

Producer. crates/hale-types/src/bare_fallible.rs · bare_fallible_calls

Consumers. check, verify, build, run, test, replay, bench, the LSP (the snapshot’s check, with the typing diagnostics) (crates/hale-frontend/src/snapshot.rs · bare_fallible_calls); the check of a bundle no snapshot holds (the tests’ entries) (crates/hale-types/src/check.rs · bare_fallible_calls)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-cli/tests/check_strict_fallible.rs; crates/hale-types/tests/typed_bodies.rs; crates/hale-types/tests/unit_values.rs

Spec. spec/semantics.md § A bare fallible call is an error; spec/types.md

Guarded seams.

violate_fallible — Canonical · law

Section titled “violate_fallible — Canonical · law”

Answers. Whether a fn that may violate says so: a value-returning one is fallible(ClosureViolation) (F.42), and one returning nothing is warned about until a later release makes it the law.

Inputs. alloc_summary (each fn’s violates column, the violate statements of its own body, and its resolved call edges); fn declarations (each fn’s written return type and fallible clause, the program’s and the stdlib analysis copy’s)

Producer. crates/hale-types/src/violate_fallible.rs · violate_fallible_laws

Also owned. crates/hale-types/src/violate_fallible.rs · may_violate; crates/hale-types/src/violate_fallible.rs · verdicts

Consumers. check, verify, build, run, test, replay, bench, the LSP (the snapshot’s check, with the typing diagnostics, beside the bare_fallible law) (crates/hale-frontend/src/snapshot.rs · violate_fallible_laws); the check of a bundle no snapshot holds (the tests’ entries) (crates/hale-types/src/check.rs · violate_fallible_laws)

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-types/tests/violate_fallible.rs; crates/hale-codegen/tests/violate_build.rs; tests/hale/violate_in_value_method_test.hl

Spec. spec/semantics.md § A value-returning method that may violate is fallible; spec/types.md § ClosureViolation, the error of a violating fn (F.42); spec/verification.md § Structural & design rules; spec/decisions.md F.42

Guarded seams.

nonreturning — Canonical · law

Section titled “nonreturning — Canonical · law”

Answers. Which run() bodies never return, which children are long-running, and whether the birth order or a pool starves because of it.

Inputs. flows (each locus declaration’s run row: the long-running and never-returns columns); params order; placement (the table’s rows for the deployed root’s fields)

Producer. crates/hale-types/src/flows.rs · run_statically_nonreturning

Also owned. crates/hale-types/src/check.rs · check_pool_starvation; crates/hale-types/src/check.rs · check_birth_order

Consumers. check (the nested-long-running-child rule reads the long-running column) (crates/hale-types/src/check.rs · check_nested_long_running_child); check (the starvation and birth-order laws read the never-returns column) (crates/hale-types/src/check.rs · never_returns)

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-types/tests/birth_order_trap.rs; crates/hale-codegen/tests/birth_order_trap.rs; crates/hale-codegen/tests/nested_long_running_child.rs; crates/hale-types/src/flows.rs (long_running_and_never_returns_are_two_columns)

Spec. spec/semantics.md; spec/runtime.md § Typecheck enforcement

Guarded seams.

working_set — Canonical · derivation

Section titled “working_set — Canonical · derivation”

Answers. The estimated working set per locus and program, and the locality law over it.

Inputs. declared shapes; @locality

Producer. crates/hale-types/src/working_set.rs · compute_program_working_set

Also owned. crates/hale-types/src/working_set.rs · compute_locus_working_set; crates/hale-types/src/working_set.rs · compute_program_returns_entry_per_locus

Consumers. build (crates/hale-cli/src/verbs/build.rs · compute_program_working_set)

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-cli/tests/target_model.rs

Spec. spec/memory.md

Layer 5 — placement

Section titled “Layer 5 — placement”

placement — Canonical · derivation

Section titled “placement — Canonical · derivation”

Answers. Which thread domain each instance runs in: pools, pinned threads, replicas, affinity, and the deployment plan.

Inputs. placement and topology blocks; entrypoint (the row’s root: the entry, or a seed’s refused module-nested main); the construction templates: the root’s literals, the entry’s implicit construction of a root no literal builds, fn main’s own literals, the root’s bindings { } adapters; the params towers each template builds; the minted sites of the snapshot and of the stdlib analysis copy; free fns and locus bodies (dynamic sites, their domains and bounds)

Producer. crates/hale-types/src/placement.rs · derive_placement

Consumers. check (rule 6, the lowering laws) (crates/hale-types/src/lowering_laws.rs · pinned_features); check (instance aliasing, #334: where each of the deployed root’s params fields runs, the table’s root and the domains of its rows) (crates/hale-types/src/check.rs · check_instance_aliasing); check (rule 17, the lowering laws: the root’s constructions and their bounds) (crates/hale-types/src/lowering_laws.rs · pinned_root_in_a_loop); check (rule 18, the lowering laws: the root and its constructions) (crates/hale-types/src/lowering_laws.rs · placement_entry_consumed); check (rules 2-5, 13-16); check (F.31: the caller per instance, the receiver by its row’s owner_relative) (crates/hale-types/src/check.rs · check_placement_single_thread); check (the blocking check and the starvation and birth-order laws: where each of the deployed root’s fields runs, its pool’s async_io, and the declarations it realizes) (crates/hale-types/src/check.rs · root_field_placements); check (type-check rule 20: the construction paths of a handler birth’s enclosing locus, OwnershipGraph::construction_paths over the table handed in, derived only when that locus does not accept the child itself) (crates/hale-types/src/check.rs · check_unowned_subscriber_locus); sync_inference (accessor domains per instance) (crates/hale-types/src/sync_inference.rs · infer_sync_for_bundle); dispatch (domains: the plan’s domain map, Arrangement::domains, over the arrangement projection) (crates/hale-types/src/arrangement.rs · fn domains); model (the arrangement: instances, owners, placed_in and affined_to, the table’s rows projected through project_arrangement, user-only: the snapshot’s projection, handed in) (crates/hale-types/src/model_builder.rs · derive_application_model_over); the intra-locus rewrite (a publish into a field off its owner’s thread stays on the bus: PlacementTable::off_owner_fields) (crates/hale-types/src/resolved.rs · rewrite_intra_locus); codegen (the deployment plan, the table’s lowering view: the root, and per root field an entry decides its schedule class, pool, NUMA node and replica cores; the pools’ async_io and affinity; the pinned anchors’ and pooled rows’ realized declarations, an adapter among the anchors) (crates/hale-codegen/src/codegen.rs · collect_main_placement); resource budget (the threads, partitioned by the scope that creates them: the root’s pinned anchors under their construction’s bound, the adapters once; the worker pools, main never one) (crates/hale-types/src/resource_budget.rs · budget_for_programs); codegen (whether a thread crosses the bus boundary: a domain that is not main, places_off_main, over the lowering view’s table, the snapshot’s, handed in) (crates/hale-codegen/src/codegen.rs · program_has_offthread); codegen (the registration route: the pinned anchors whose tree holds a subscriber, or whose thread may build one at run time (a dynamic site in the anchor’s domain, or in no known domain, whose locus subscribes or whose params defaults, transitively, build one), by lowered name, each given a mailbox the subscriptions made on its thread route to) (crates/hale-types/src/resolved.rs · route_anchors); bus_graph (every placement label and the direct-call gate: the set of each type’s instances’ domains) (crates/hale-types/src/bus_graph.rs · type_placements); check (a subscriber’s bounded(N, …), legal only where every instance runs on main: B-2, read only when a subscriber is bounded) (crates/hale-types/src/check.rs · check_bounded_bus); ownership (each bubbling edge’s class: the enclosing instances paired with their owner rows) (crates/hale-types/src/ownership_graph.rs · relate); lsp (hale/placement); deployment (reserved)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · placement_an_entry_without_its_root_row_is_refused_at_the_entry; total: no root where the entry row names no main locus means nothing is deployed; no entry deciding a field means it runs where its owner does; no realized declaration (a hole) means the row joins no thread set; and no anchor in the route set means it has no nested subscriber

Focused tests. crates/hale-types/tests/placement_golden.rs (static instance rows, root, template bounds, domains and holes, plus the dynamic domain and hole projection read by consumers, over the corpus, tests/hale, DNA and placement fixtures; each seed by id, shared row groups by hash; HALE_SHADOW_REGEN regenerates); crates/hale-types/tests/placement.rs; crates/hale-types/tests/placement_pairings.rs; crates/hale-codegen/tests/pool_affinity.rs; crates/hale-codegen/tests/placement_where_async_io.rs; crates/hale-types/tests/placement_table.rs (the table through the frontend’s load: the correspondence’s coverage cases 1 to 16, the two universes joined into lowering’s mint, the table’s laws over every clean fixture, and a check that demands it once); crates/hale-types/tests/form_rows.rs (sync inference per instance, K-5); crates/hale-codegen/tests/nested_offthread_delivery.rs (the receiving thread of a nested subscriber, recorded inside its handler and inside its birth() and run(), in both devirtualization arms; the startup handshake, a nested child waiting during its anchor’s initialization for a delivery through the anchor’s route, or for a reply from a subscriber on the instantiating thread (and its control with that thread’s drain off); a temporary of a pinned default, dissolved at the init’s end; the same startup under a pool anchor (the review’s program beside pinned, a child two levels down, two pool roots on one pool, an async_io pool, the round trip through main and its control, a worker blocked on a held failure running the init); the route’s IR, for both threads, and its teardown under ASan); crates/hale-types/tests/intra_locus_pool_safety.rs (the intra-locus rewrite keeps a publish into a field off its owner’s thread on the bus, through the lowering view); crates/hale-types/tests/model_arrangement.rs (the model’s arrangement as the table’s rows: M-1, M-3, M-5, M-7, M-9, U-4 and U-5, each against the old build’s ids and hashes); crates/hale-types/tests/resource_budget.rs (the budget’s rows R-1 to R-7 and checkpoint 4 through the frontend’s load: replicas, one worker per pool, affinity, imported roots, constructions times their bounds and the uncertainty, adapters once, main never a pool, the dump’s counted and not-counted lines); crates/hale-codegen/tests/placement_occurrences.rs (checkpoint 1: one template, one domain, its bound multiplying the budget; two live occurrences of one literal on two anchor threads, each nested subscriber on its own, in both devirtualization arms)

Spec. spec/semantics.md § Placement block (F.31); spec/decisions.md F.31, F.35, F.38; spec/runtime.md § Placement classes (m28b: subscriptions follow the tower)

Guarded seams.

target_capability — Canonical · capability

Section titled “target_capability — Canonical · capability”

Answers. What a target can lower and what it refuses: the wasm stdlib refusals, link refusals, per-site skips, async_io availability, FFI portability.

Inputs. –target; a source target declaration; stdlib_surface; FFI signatures

Producer. crates/hale-types/src/capability.rs · derive_capability_matrix

Also owned. crates/hale-types/src/capability/uses.rs · derive_capability_uses; crates/hale-types/src/capability/uses.rs · admission_diags

Consumers. check; build; docs (systems/webassembly.md § What wasm32 can do, and spec/ffi.md’s refused-namespace table: regions rendered from the cells) (crates/hale-types/src/capability.rs · render_markdown); the effective-target row, on the snapshot: the check’s target and its conflict refusal, the editor’s alike (crates/hale-frontend/src/snapshot.rs · demand_target); hale build’s backend and artifact naming, from the effective target (crates/hale-cli/src/verbs/build.rs · compile_target(row.effective)); hale run and replay refuse a program whose effective target is wasm32 (crates/hale-cli/src/shared/options.rs · refuse_unexecutable); the use rows, on the snapshot: the check’s input beside the row (crates/hale-frontend/src/snapshot.rs · demand_capability_uses); the admission law: every use’s cell for the effective target, in the check of every entry point (crates/hale-types/src/check.rs · admission_diags); hale check and hale build: every link input (–link, each package’s [ffi] link) held to LinkLibrary before any tool, located at its manifest line or flag (crates/hale-cli/src/shared/options.rs · link_refusals); a build handed link libraries (the harness, a library build): LinkLibrary read off the lowering view’s column before lowering and before any tool (crates/hale-codegen/src/codegen.rs · Capability::LinkLibrary); lowering: every behaviour and obligation emitted or omitted per target, read off the lowering view’s column (LoweringView::cells) (crates/hale-codegen/src/codegen.rs · self.cells.); the wasm32 link: the module’s fixed exports are ExportSurface’s lowering data (crates/hale-codegen/src/codegen.rs · Lowering::Exports(fixed)); the check of an @ffi or @export signature: the FfiType cells for its ABI on the effective target (crates/hale-types/src/check.rs · ffi_type_refusal); the teardown spines: the pool join, wait-abort and ingress quiesce each spine owes, in the lifecycle plan’s order (crates/hale-codegen/src/codegen.rs · emit_teardown_obligations)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-types/src/capability/laws.rs · every_pair_has_exactly_one_cell

Focused tests. crates/hale-types/tests/wasm_target_gating.rs; crates/hale-codegen/tests/wasm_target.rs; crates/hale-cli/tests/target_model.rs; crates/hale-cli/tests/wasm_package_csrc.rs (T4: a package’s [ffi] link refused by check and build alike at the manifest’s line; –link named as the flag; the refusal before any tool, on a PATH with no clang); crates/hale-cli/tests/target_precedence.rs (the precedence table: source x –target, check, build and the editor agreeing per cell; wasm-flower built for its declared target; run refusing a declared program; the agreement test: every wasm-relevant program’s located refusals equal on check, build and the editor, with and without –target wasm32); crates/hale-types/src/capability/laws.rs (the matrix’s laws: one cell per pair, anchored witnesses, premises, requires; KNOWN_OPEN empty since T2, T3 and T5 landed, a new entry held to today’s answer); crates/hale-types/src/target.rs (async_io_follows_the_libc: TargetSpec::has_async_io is the runtime’s shape, the AsyncIoPool cell what a program may ask for; they differ on wasm32 alone); crates/hale-types/tests/shadow_capability.rs (the checker rows against their cells over the corpus, tests/hale, the DNA seeds and the wasm programs, on three columns: 0 divergences); crates/hale-codegen/tests/shadow_capability_lowering.rs (the codegen rows, the thread behaviours and @ffi(“js”) against their cells, both targets built, a harness build refused by the admission before lowering; 7 classified divergences, all the design’s: 4 declared export-only programs and 3 declared @ffi(“js”) programs a harness lowers natively anyway, where codegen still says program has no fn main() and the native link fails); crates/hale-cli/tests/shadow_capability_cli.rs (run, replay, record and –wrap-main against their cells; 0 divergences); crates/hale-types/tests/capability_uses.rs (the use producer’s acceptance cases: a stdlib call, a construction with its lifecycle, a handle’s method, a wrapper refused once, module-nested and on_failure bodies, a hole, declaration rows, an export-only program, an exported run(); T2’s pinned, pool, async_io and transport refusals at the entry or binding; T3’s stub namespaces; T5’s @ffi(“js”) on a native target, called or not; each type-only variant admitted); crates/hale-types/tests/capability_doc_matches.rs (both document regions equal the rendered matrix); crates/hale-codegen/tests/target_lifecycle_cells.rs (the five teardown spines on both targets, each owing what its target’s cells select, in the plan’s order); crates/hale-codegen/tests/portable_subset.rs (the design’s programs and the playground’s examples print the same bytes natively and under node; skipped, naming what is missing, without node, clang or wasm-ld); crates/hale-codegen/tests/wasm_import_backstop.rs (T7: every module the wasm tests build imports only the loader’s writers, read from the loader’s source, plus its declared @ffi(“js”) names, or a known-open name from its stated callers (dprintf and fflush, the unabsorbed-violation report, until the loader has a stderr writer); a control module importing an undefined @ffi(“c”) name reported by name; each known-open name still imported; no observation probe emitted for wasm32, against the native build of the same program; skipped, naming what is missing, without clang or wasm-ld)

Spec. spec/decisions.md F.35; spec/ffi.md § The target declaration + stdlib gating; docs/src/systems/webassembly.md

Guarded seams.

deployment — Reserved · derivation

Section titled “deployment — Reserved · derivation”

Answers. A deployment as typed rows: root and horizon, component identities, instances and incarnations, resources and allocations, endpoints and routes, hosting and authority, persistence obligations (the habitat, after phase 2).

Inputs. placement; bindings; admitted artifacts; a deployment dialect (later)

Producer. none: reserved, computes nothing.

Consumers. fleet (today’s JSON as an input adapter); dna (the habitat); ui (reserved)

Invariants.

Missing data. n/a

Spec. RFC #1212, the implementation plan §8; GH #262

Layer 6 — lifecycle order

Section titled “Layer 6 — lifecycle order”

lifecycle_order — Canonical · derivation

Section titled “lifecycle_order — Canonical · derivation”

Answers. The happens-before order per instance: birth sequence, params open and settle, failure delivery and its execution domain, reclaim prerequisites, drain, restart, teardown.

Inputs. placement (the instance templates: the static towers, replicas apart, and the dynamic sites with their domains and bounds; the domains); handler_routing (the owner’s handler for each child, and whether it restarts); flows (an accepted flow is reclaimed at its run’s end, a resident by its owner’s cascade); bus_graph (which instances subscribe); entrypoint (which main locus is the entry, whose deferred teardown is the main entry’s spine); the declarations each template realizes (run, the closures’ epochs, birth_check, violate sites, accept, on_failure, the params bracket); the decision lines (hale_types::lifecycle::DECISION_LINES) and the inventory rows they name; the runtime protocol (lotus_failure_hold / await / defer_reclaim; a run’s retention, queued or started, lotus_run_cancel_only / lotus_run_cancel_queued and deferred storage release); the delivery’s domain (lotus_failure_post: the owner’s domain recorded where its params open, a delivery off it posted there and awaited, its cell’s hold on the child; lotus_pinned_join and the pool join’s wait for the joined domain’s end)

Producer. crates/hale-types/src/lifecycle/derive.rs · derive_lifecycle

Also owned. crates/hale-types/src/lifecycle.rs · LifecyclePlan; crates/hale-types/src/lifecycle/trace.rs · Expected; crates/hale-types/src/lifecycle/project.rs · expected; crates/hale-types/src/lifecycle/spine.rs · birth_order; crates/hale-types/src/lifecycle/spine.rs · reclaim_order; crates/hale-types/src/lifecycle/spine.rs · cascade_order; crates/hale-types/src/lifecycle/spine.rs · cascade_fields; crates/hale-types/src/lifecycle/spine.rs · recovery_order; crates/hale-types/src/lifecycle/spine.rs · entry_order

Consumers. the lowering view (the snapshot’s plan, carried to the emitters) (crates/hale-frontend/src/snapshot.rs · view.lifecycle = Some(lifecycle)); codegen (the process rows of every teardown spine, in the plan’s order as the target’s cells select them: a spine’s head before its frame’s pre-drain, the pre-drain and the rows after it in a fn main exit’s flush) (crates/hale-codegen/src/codegen.rs · emit_process_rows); codegen (fn main’s three exits, the fall-through, the test failure and return, through one helper: the exit spine’s process rows, the frame, the process exit tail C24) (crates/hale-codegen/src/codegen.rs · emit_main_exit); codegen (a main-locus entry’s teardown in the plan’s order, LifecyclePlan::entry_order: the eager spine and the frame flush emit its head before its own pinned joins, the flush ahead of the first of them wherever its entry order puts it, and refuse a cascade the plan places earlier) (crates/hale-codegen/src/codegen.rs · head_before_pinned_joins); codegen (emission reads the order, spine by spine, through LifecyclePlan::spine); codegen (the restart and the resume: _restart, _resume) (crates/hale-codegen/src/locus/restart.rs · define_restart_fns); closures (the event alphabet); transitions (reserved); deployment (reserved)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · lifecycle_order_a_view_without_the_plan_is_refused; total: no template of a declaration in the plan (one only the stdlib or an imported seed builds) means it reads each spine’s order from every template of the plan, then in the producer’s order, and owes no readiness

Focused tests. crates/hale-types/src/lifecycle/derive.rs (shared ancestry regression); crates/hale-codegen/tests/reclaim_spine_ir.rs (reclaim ordering through retained callbacks, contract teardown halves, pinned field drains and declaration order); crates/hale-codegen/tests/birth_spine_ir.rs (the birth spine’s IR per shape: a root child, a nested child, each replica, a pinned child with its birth_check before its run, a pool-placed child born on its pool’s worker as a posted job, a cross-pool bubble accepted before birth); crates/hale-codegen/tests/header_before_params.rs (the header before the params: children a params default bubbles to a main locus, a field owner in its owner’s arena and a pool-placed owner stay accepted and are torn down; a dirtied stack is never read; a pinned owner’s on_failure at settle reads its own latch clear); crates/hale-codegen/tests/restart_spine_ir.rs (the restart and resume spines’ IR per shape: a root child, a nested child, a pinned child, each replica, a pool-placed child, restart_in_place under a generic supervisor, a locus with no run() resumed without one); crates/hale-types/tests/lifecycle_plan.rs (a_restart_reads_decision_entry_birth_then_run); crates/hale-codegen/tests/topic_phase2.rs (a_births_own_publishes_are_delivered_after_it_in_order; sends directly in birth or in its helpers retain receiver identity and wait for readiness; pinned birth bursts and managed payloads run under ASan); crates/hale-types/tests/lifecycle_plan.rs (the plan through the snapshot: demanded once and built by no check; its laws over every corpus program the snapshot scopes, edges naming its own rows and acyclic on events, birth and teardown owed once per template, every line a decision line, every delivery to an owner of known domain naming its domain; the rows lines 1, 3, 7, 12, 13, 14, 18, 19 and RD are about; a cross-domain delivery’s claim, posted or under the shutdown rule; a main locus built twice; started-run retention through physical reclaim; statement-position subscribers torn down at frame exit); crates/hale-codegen/tests/lifecycle_flow.rs; crates/hale-codegen/tests/reclamation_spine.rs; crates/hale-codegen/tests/main_locus_deferred_pool_join.rs; crates/hale-codegen/tests/teardown_pinned_join_order.rs; crates/hale-codegen/tests/frame_flush_ir.rs (the frame flush per fn main exit, with and without a pool: the head’s rows, then the pre-drain and the rows after it, the entries subscription-less pinned first then reverse push; a deferred main entry’s head before its pinned joins, in a fn other than main and in fn main’s frame; a returned root’s pinned field joined by its owner’s teardown in the caller, and the control a frame keeps; another fn’s flush pre-drains and aborts no wait); crates/hale-codegen/tests/reclaim_cancel_ir.rs (queued cancellation precedes the storage callback on every spine, and its hold wait dominates physical releases); crates/hale-codegen/tests/replay_canceled_run.rs (a canceled run replays clean; a held run keeps its retention; the hold buffer is freed by each thread that held, under ASan with no suppression); crates/hale-types/src/lifecycle.rs (the schema’s laws: every decision line binds a kind, the Pending lines are the named ones, the doc table is the data); crates/hale-codegen/tests/lifecycle_fixtures.rs (a fixture per decision line under tests/fixtures/lifecycle/; KNOWN_OPEN pins today’s outcome where it differs from the adopted one; the trace oracle holds each run to the producer’s plan for the fixture’s program, rendered along the run’s path and its line’s known-open rules, the line-19 fixtures’ included, or, for a fixture in UNDERIVED (one field replacement, C29), to its hand-written plan; TRACE_KNOWN_OPEN names today’s departures, CONTROLS fail it; every_spine_emits_the_plans_obligations_in_order holds each instance’s emitted steps on the eight instance spines (the deferred entry’s and the deferred main entry’s among them) and reclaim/cancellation on every spine to the plan’s order); crates/hale-types/tests/lifecycle_plan.rs (every_declaration_reads_one_birth_order_over_the_corpus, the_reader_orders_each_spine_by_the_plans_edges); crates/hale-types/src/lifecycle/trace.rs (the trace’s parser and oracle); crates/hale-codegen/tests/corpus_oracle.rs (corpus_traces_keep_the_lifecycle_laws: every runnable example, traced, held to the trace’s laws and to its program’s plan along its run’s path, the path stated where the run is not the default one (a failure, a branch not taken, a default its literals replace); PLAN_KNOWN_OPEN names today’s departures); crates/hale-codegen/tests/lifecycle_matrix.rs (failure phase × tree position × domain, a generated program per cell held to its outcome, the producer’s plan for the program rendered along the cell’s run, ASan on the sample and the let-bound differential; KNOWN_OPEN names today’s failing cells, none since the producer claims the shutdown rule’s domain; HALE_MATRIX=full runs every cell); crates/hale-codegen/tests/target_lifecycle_cells.rs (the five teardown spines on both targets: each owes what its target’s cells select, in the order the plan’s process rows state, before the cascade; the call counts pinned per shape, variant and target); crates/hale-codegen/tests/failure_delivery_domain.rs (a pinned child’s handler on its owner’s thread, outside the owner’s window; an owner’s reclaim never under a delivery in flight; a pool-placed owner’s held and posted deliveries on its worker, by thread id; all under ASan in both dispatch modes); crates/hale-codegen/tests/cascade_model.rs (the GenMC model compiled with every control, run natively once: the in-place control fails the domain assertion)

Spec. spec/runtime.md (failure delivery; pool join rule b); spec/runtime.md § Lifecycle obligations (the decision lines, adopted and shipped told apart); spec/runtime.md § The lifecycle trace (a debug aid, not a contract); spec/runtime.md § Lossless recording mode (the replay hold and a canceled run); spec/semantics.md § lifecycle

Guarded seams.

bus_inert — Canonical · derivation

Section titled “bus_inert — Canonical · derivation”

Answers. Whether the program can ever have a bus cell in flight, so drains can be elided.

Inputs. the user program’s declarations (topics, perspectives, bus and bindings blocks, accepts); the names the user program spells (hale_syntax::names); the stdlib’s bus-taint column (which std:: namespaces reach bus surface)

Producer. crates/hale-types/src/bus_inert.rs · bus_inert

Also owned. crates/hale-types/src/bus_inert.rs · bus_tainted_namespaces; crates/hale-syntax/src/names.rs · for_each_spelled

Consumers. the resolved program (a row of the lowering view, over the user program before the stdlib merge) (crates/hale-types/src/resolved.rs · bus_inert::bus_inert(); codegen (drain elision: the row, read) (crates/hale-codegen/src/codegen.rs · resolved.bus_inert); codegen (crates/hale-codegen/src/bus/runtime.rs · emit_bus_drain)

Invariants.

Missing data. total: no absence is possible: the verdict is a value of every view, and false keeps every drain

Focused tests. crates/hale-codegen/tests/drain_elision.rs; crates/hale-codegen/tests/log_routing.rs; crates/hale-types/src/bus_inert.rs (the_verdict_reads_declarations_and_names)

Spec. spec/runtime.md § drain

Guarded seams.

Layer 8 — lowering

Section titled “Layer 8 — lowering”

law_backstops — Canonical · law

Section titled “law_backstops — Canonical · law”

Answers. The laws that replaced lowering’s own refusals of rules the spec states.

Inputs. the AST; the placement table; the binding rows; the ownership graph; the typed-body table’s omitted_args; the entry row

Producer. crates/hale-types/src/lowering_laws.rs · lowering_laws

Consumers. the check (every verb and the LSP) (crates/hale-types/src/check.rs · lowering_laws); the harness’s lowering view (Config::harness), which is not gated on the check (crates/hale-frontend/src/snapshot.rs · lowering_laws); codegen (the backstop: a value use of a literal the plan posts to another thread, which the cross-pool value law judges, refused as its missing judgment) (crates/hale-codegen/src/locus/instantiation.rs · emit_crosspool_bubble_spawn)

Invariants.

Missing data. required: a missing row is a CodegenError, pinned by crates/hale-codegen/tests/missing_rows.rs · law_backstops_a_value_use_the_law_did_not_judge_is_refused_at_the_literal

Focused tests. crates/hale-types/tests/placement.rs; crates/hale-cli/tests/check_lowering_laws.rs (hale check and hale build); crates/hale-cli/tests/nested_main_transition.rs (decision 2’s refusal at hale check and hale build); crates/hale-frontend/src/snapshot.rs (the_lowering_view_carries_the_entry_row: the refusal blocks the harness’s view too); crates/hale-codegen/tests/harness_lowering_laws.rs (the harness, which skips the check); crates/hale-codegen/tests/deferred_slot_per_iteration.rs (rule 17 at the harness); crates/hale-codegen/tests/placement_factory_default.rs (rule 18 at the harness); crates/hale-types/tests/ownership_graph.rs (the cross-pool spawn law, every expansion context of a default included); crates/hale-types/tests/self_containing_locus.rs; crates/hale-codegen/tests/self_containing_locus.rs

Spec. spec/semantics.md rules 6, 17, 18 and § accept bubbling; spec/types.md § A locus may not contain itself by value; GH #813, #870, #876

Guarded seams.

The law engine

Section titled “The law engine”

model — Canonical · derivation

Section titled “model — Canonical · derivation”

Answers. The canonical semantic model of a checked bundle: fifteen entity tables, seventeen relation tables, holes, capabilities, provenance (GH #476).

Inputs. a checked bundle; top_scope; bus_graph; ownership; handler_routing; placement; effects; alloc_summary; topics; bindings; dispatch (the snapshot’s plan, held projected: no model table hashes it)

Producer. crates/hale-types/src/model_builder.rs · derive_application_model_over

Also owned. crates/hale-types/src/model_builder.rs · ModelInputs

Consumers. demand (every verb and the LSP: the claims, over the snapshot’s scope and graphs) (crates/hale-frontend/src/snapshot.rs · derive_application_model_over); topology (hale check’s artifact and both gates: the snapshot’s model) (crates/hale-cli/src/verbs/check/run_impl.rs · dump_topology_over); model dump (the check’s snapshot) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_model); the build identity: the model hash and the obs ids (build, run, replay: the snapshot’s model) (crates/hale-cli/src/shared/options.rs · demand_model); fleet (admits the artifact, never the model)

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-types/tests/demand_gate.rs; crates/hale-model/tests/architecture.rs; crates/hale-types/tests/topology_projection.rs; crates/hale-types/tests/model_arrangement.rs (the arrangement’s three identity contracts, each pinned against the build before the switch)

Spec. spec/model.md

Guarded seams.

claims — Canonical · law

Section titled “claims — Canonical · law”

Answers. Every user law: lowered claim rows, the judged verdicts over the model and evidence, constitution identities, and the artifact’s law account.

Inputs. model; claim and constitution declarations; evidence (certificates, budgets); effects

Producer. crates/hale-types/src/judgment.rs · claim_law_diags_over

Consumers. check / verify; admission (hale topology graph, hale fleet: an artifact’s law account is validated against itself, with the family’s own functions; it recomputes the law digest and the evidence inputs digest, checks every reference against the artifact’s catalogs, re-renders every stated form with the model’s spelling (hale_model::claim_form) and recomputes a row’s verdict and the document’s with the model’s aggregation (certificate_row_verdict, document_verdict); its decoder is the artifact schema’s reader, since a payload carries no model ids and cannot rebuild a ClaimIr, held to the emitter by a round trip over every artifact the corpus emits, law_account_round_trip.rs, F.40 phase 4, A5) (crates/hale-cli/src/topology_law.rs · validate_law_account); the check’s law-selection diagnostics (the snapshot’s selection, handed in) (crates/hale-types/src/check.rs · laws.diags); the check’s laws stage (judged over the snapshot’s model, after its typing stage; its lowering reads the snapshot’s selection) (crates/hale-frontend/src/snapshot.rs · demand_laws); topology (law section: the law rows, the constitution identities projected from the adoption, and the environment label, all the snapshot’s selection, handed in) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_law_selection); check –matrix (each pair’s identity comparison: the roots its snapshot’s selection adopted, LawSelection::identities, the projection the artifact reads; a pair the check refuses has no snapshot, so no constitution of its takes part) (crates/hale-cli/src/verbs/check/matrix.rs · adopted_roots); fleet; dna (dna_law.rs wording); model diff

Invariants.

Missing data. an unknown is a hole with a stated policy

Focused tests. crates/hale-types/tests/claim_diags_snapshot.rs; crates/hale-cli/tests/law_selection_reaches_the_artifact.rs; crates/hale-cli/tests/law_account_round_trip.rs; crates/hale-cli/tests/dna_law.rs; crates/hale-types/tests/one_reachability_engine.rs

Spec. spec/verification.md § Claims; spec/model.md § Adding a judgment family

view — Reserved · derivation

Section titled “view — Reserved · derivation”

Answers. A named query over the tables: a node selector, a relation set and an adequacy policy, rendered by a backend (hale ui, after phase 2).

Inputs. the resolved program’s tables; a view declaration (its own surface)

Producer. none: reserved, computes nothing.

Consumers. ui (reserved); bundle (reserved)

Invariants.

Missing data. an unknown is a hole with a stated policy

Spec. RFC #1212, the UI comment

Identity

Section titled “Identity”

snapshot_identity — Canonical · derivation

Section titled “snapshot_identity — Canonical · derivation”

Answers. The identity of every semantic site in a snapshot: (seed, index), minted after the entry point’s desugars with the bundle’s source map, and again in the resolved-program step (numbered over the user program before the intra-locus rewrite, so the sends it records are numbered on every path, and minted over the merged program with the bundle’s seeds and a named seed for the bundled stdlib), idempotently (one numbering; a later mint numbers only what an earlier one did not see), with reliable provenance; and which declaration each use names (binding_of), resolved once by the mint.

Inputs. seed_loading; desugar_sequence

Producer. crates/hale-types/src/snapshot.rs · mint

Also owned. crates/hale-syntax/src/sites.rs · SiteKind; crates/hale-types/src/snapshot.rs · resolve_uses; crates/hale-types/src/snapshot.rs · declaration_of; crates/hale-types/src/snapshot.rs · number

Consumers. every table; the shadow facility (compares through an explicit correspondence, never raw id equality); lsp (a later incremental future); the resolved program (codegen’s input is minted over the merged program)

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/tests/fn_key_identity.rs; crates/hale-codegen/tests/ownership_reclaim.rs (shadow_return_binding); crates/hale-codegen/tests/owner_table.rs; crates/hale-types/tests/snapshot.rs (each_use_resolves_to_the_declaration_in_scope); crates/hale-types/tests/demand_gate.rs (each_snapshot_resolves_its_uses_once); crates/hale-syntax/tests/sites.rs

Spec. spec/decisions.md F.39, F.40

Guarded seams.

demand — Canonical · derivation

Section titled “demand — Canonical · derivation”

Answers. Which families a consumer’s request computes, and in which order: a snapshot owns one load (the programs and their keys, each member’s own program beside the merged one, the source map, the import renames, the config that shaped them, the sequence already run, the mint) and derives each family on request (Snapshot::demand_*: the scope, the checked programs’ bus graph, ownership graph, handler rows and flow rows, law selection, the role rows, the arrangement, the effect rows, the model, the check in its two stages with the effects certificate report its typing produced, the lowering view), each at most once, blocking a family whose prerequisite reported errors.

Inputs. seed_loading; desugar_sequence; snapshot_identity; the config (target, api, api roles, environment, the check’s rules); editor overlays (LSP); a consumer’s request

Producer. crates/hale-frontend/src/snapshot.rs · Snapshot

Also owned. crates/hale-frontend/src/snapshot.rs · demand_entry; crates/hale-frontend/src/snapshot.rs · demand_scope; crates/hale-frontend/src/snapshot.rs · demand_editor_scope; crates/hale-frontend/src/snapshot.rs · demand_bus_graph; crates/hale-frontend/src/snapshot.rs · demand_ownership_graph; crates/hale-frontend/src/snapshot.rs · demand_handlers; crates/hale-frontend/src/snapshot.rs · demand_flows; crates/hale-frontend/src/snapshot.rs · demand_law_selection; crates/hale-frontend/src/snapshot.rs · demand_role_rows; crates/hale-frontend/src/snapshot.rs · demand_arrangement; crates/hale-frontend/src/snapshot.rs · demand_effects; crates/hale-frontend/src/snapshot.rs · demand_effect_certificates; crates/hale-frontend/src/snapshot.rs · demand_model; crates/hale-frontend/src/snapshot.rs · demand_typing; crates/hale-frontend/src/snapshot.rs · demand_laws; crates/hale-frontend/src/snapshot.rs · demand_check; crates/hale-frontend/src/snapshot.rs · demand_lowering; crates/hale-frontend/src/snapshot.rs · from_program; crates/hale-frontend/src/snapshot.rs · SnapshotKey; crates/hale-frontend/src/snapshot.rs · declarations; crates/hale-frontend/src/snapshot.rs · declaration_dependents; crates/hale-frontend/src/dependents.rs · DependencyIndex; crates/hale-frontend/src/snapshot.rs · reusing_typing; crates/hale-frontend/src/snapshot.rs · typing_reuse; crates/hale-frontend/src/typing_reuse.rs · ReuseKey; crates/hale-frontend/src/typing_reuse.rs · plan

Consumers. check (crates/hale-cli/src/verbs/check/run_impl.rs · demand_check); the checker’s rules (the handler rows: duplicate handlers, @supervised; the entry row: rule 1 and rule 9; the placement table: the F.31 rule per instance, the blocking check, pinned-in-a-loop, rule 20’s construction paths; the bus graph: rules 7, 9 and 10, and the role law’s sites; the ownership graph: rule 20; law selection: the law-selection diagnostics; the role rows: the role rules; the sequence’s surface: the api entry’s rules), demanded before the check runs; the effect rows’ purity column for a codec binding, demanded only when one reaches the assertion (crates/hale-frontend/src/snapshot.rs · CheckInputs); topology (--dump-topology, --check-topology, --check-topology-shape: one artifact of the snapshot’s model) (crates/hale-cli/src/verbs/check/run_impl.rs · dump_topology_over); the model dump (--dump-model: the check’s own model when it judged a law) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_model); the build identity (build, run, replay: the model hash and the obs ids from the snapshot’s model, the plan digest from its lowering view) (crates/hale-cli/src/shared/options.rs · model_identity); build (crates/hale-cli/src/verbs/build.rs · demand_lowering); run and run

(crates/hale-cli/src/verbs/run.rs · demand_lowering); test (a build config for the host, the dev profile) (crates/hale-cli/src/verbs/test.rs · demand_lowering); replay (the identity admitted before lowering) (crates/hale-cli/src/verbs/replay.rs · demand_lowering); bench (the driver an overlay on the bench file) (crates/hale-cli/src/verbs/bench.rs · demand_lowering); the test harness (tests/support/build.rs of the codegen crate: Snapshot::load of text or a directory, Snapshot::from_program for a program a test made; lowering not gated on a check); lsp (the first publication: one snapshot per publish pass, its typing stage) (crates/hale-lsp/src/lib.rs · demand_typing); lsp (the typing stage reuses the seed’s last typed snapshot, State::typed) (crates/hale-lsp/src/lib.rs · reusing_typing); lsp (the second publication: the whole check, for the files the laws add to) (crates/hale-lsp/src/lib.rs · demand_check); lsp (every request loads the snapshot the diagnostics load, editor_snapshot, one per request) (crates/hale-lsp/src/lib.rs · editor_snapshot); lsp (definition, placement, the allocation survey) (crates/hale-lsp/src/lib.rs · demand_scope); lsp (completion, hover, references, enforcement) (crates/hale-lsp/src/lib.rs · demand_editor_scope); lsp (hale/busGraph) (crates/hale-lsp/src/lib.rs · demand_bus_graph); model (the effect rows, demanded with the graphs it reads) (crates/hale-frontend/src/snapshot.rs · demand_effects); the effects manifest (--dump-effects-manifest, --check-effects-manifest) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_effects); replay (the live-effects gate) (crates/hale-cli/src/verbs/replay.rs · demand_effects); the check’s laws (their certificate evidence reads the typing’s effects certificate report) (crates/hale-frontend/src/snapshot.rs · demand_effect_certificates); topology (the artifact’s law evidence reads the same report) (crates/hale-cli/src/verbs/check/run_impl.rs · demand_effect_certificates); lsp (documentSymbol: the open file’s member program, its own declarations as written) (crates/hale-lsp/src/lib.rs · snap.member()

Invariants.

Missing data. a missing required row is a compiler error

Focused tests. crates/hale-types/tests/demand_gate.rs (a_build_derives_the_scope_and_each_graph_once_lowering_included: the lowering view derives no scope, graph, handler rows, flow rows or arrangement of its own, F.40 phase 3, C5 and phase 4, Q1; a_build_classifies_the_scratch_local_fns_once; law_selection_runs_once_per_snapshot_on_every_verb_path, phase 4, A2); crates/hale-types/tests/declaration_dependents.rs (a_declarations_dependents_cover_what_a_fresh_check_rederives, an_edit_to_a_declared_surface_escapes_the_families); crates/hale-cli/tests/lsp.rs (the_check_is_its_typing_stage_followed_by_its_laws_stage, lsp_and_check_agree_over_a_seed_with_laws, lsp_publishes_the_typing_stage_first_and_the_laws_replace_it, the_incremental_typing_stage_is_the_full_one, the_incremental_typing_stage_is_the_full_one_over_the_dna_host, the_incremental_typing_stage_is_the_full_one_through_handler_and_initializer_calls, lsp_publishes_what_check_reports_after_a_helper_edit_through_handler_and_initializer_calls); crates/hale-cli/tests/lsp_latency.rs (lsp_latency_first_and_final_publication: the editor’s latency, first and final publication apart; a measurement, ignored by default); crates/hale-frontend/src/snapshot.rs (a_changed_input_is_a_distinct_snapshot_and_shares_no_result, a_file_that_does_not_parse_blocks_the_scope_and_its_dependents, the_editor_scope_covers_the_members_that_parsed_and_names_the_hole, a_member_that_will_not_read_blocks_the_scope, a_program_that_does_not_typecheck_blocks_the_model, a_check_with_errors_blocks_the_lowering_view, the_lowering_view_is_resolved_once_after_the_check); crates/hale-lsp/src/lib.rs (a_request_builds_only_the_families_it_reads, a_request_over_a_seed_with_a_hole_answers_from_the_members_that_parsed, the_laws_replace_the_typing_stage_unless_a_newer_event_supersedes_them, a_pass_reuses_the_seeds_last_typed_snapshot)

Spec. spec/decisions.md F.40; RFC #1212 § phase 2 (demand and readiness)

Guarded seams.

Answers. Every identity a build or an artifact carries, and what each covers: shape_hash, artifact_digest, model_hash, exec_digest, the toolchain and cache keys, source digests, and the snapshot key they were derived under.

Inputs. the model half; the artifact; sources; BuildOptions; compiler sources; the snapshot key

Producer. crates/hale-graph/src/identity.rs · IDENTITIES

Also owned. crates/hale-types/src/topology_projection.rs · project_shape_hash; crates/hale-cli/src/shared/options.rs · model_identity; crates/hale-cli/src/shared/options.rs · exec_digest; crates/hale-types/src/topology.rs · dump_topology_over; crates/hale-model/src/claim_ir.rs · semantic_digest; crates/hale-model/src/application.rs · analysis_coverage_digest; crates/hale-model/src/dispatch_plan.rs · digest; crates/hale-cli/build.rs · toolchain_digest; crates/hale-iris/build.rs · main; crates/hale-iris/src/lib.rs · toolchain_hash; crates/hale-dna/src/digest.rs · digest_of_pairs; crates/hale-types/src/evidence.rs · analysis_inputs_digest; crates/hale-frontend/src/frontend.rs · source_map; crates/hale-model/src/obs_ids.rs · digest; crates/hale-frontend/src/snapshot.rs · SnapshotKey; crates/hale-frontend/src/snapshot.rs · digest; crates/hale-frontend/src/source.rs · overlay_digest; crates/hale-frontend/src/snapshot.rs · load; crates/hale-types/src/claims.rs · constitution_digest; crates/hale-cli/src/fleet.rs · fnv; crates/hale-codegen/src/codegen.rs · compile_cached_runtime_object_with; crates/hale-cli/src/shared/stale.rs · stale_sources; crates/hale-cli/src/shared/stale.rs · stale_dna

Inventory of identities (crates/hale-graph/src/identity.rs · IDENTITIES). One row per value compared for equality as an identity. Leaves out names an input a reader would expect, with the stated reason; a reason that begins “a defect” or “a gap” names the step that closes it.

identity identifies computed fold covers leaves out producer on mismatch versioned by frozen
shape_hash two programs have the same structural model: the hashed half of the topology artifact, rendered from the model alone artifact emission (hale check --dump-topology) and every build (model_identity) Fnv64 ModelHalf SourcePaths: by design: a structural identity, so a moved comment or a renamed file does not churn it; UserSources: by design: it names what the program is, not the text it was written in; LawRows: by design: the law rows are a section of their own, under law_digest crates/hale-types/src/topology_projection.rs · project_shape_hash the artifact is refused (verify_shape_hash), a replay is refused, a baseline gate fails the artifact schema (TOPOLOGY_SCHEMA, 1.19) the 1,793 pinned values of topology_projection, the nine of model_arrangement, and DNA, which requires schema 1.19 and recomputes it
model_hash a binary was built from a model with this shape_hash: the same value, stamped into the recording and observation headers hale build, run, replay (model_identity, from the snapshot’s model) Fnv64 ModelHalf BuildOptions: by design: the model is not the build; exec_digest carries the options crates/hale-cli/src/shared/options.rs · model_identity replay is refused moves with shape_hash: the artifact schema the iris protocol’s header layout
artifact_digest the whole topology artifact, results and provenance included, is the one a producer emitted: an unkeyed tripwire, not a signature artifact emission Fnv64 ModelHalf, Model, LawRows, UserSources, SourcePaths, AnalysisVersion CompilerSources: by design: it is a checksum of the document; the compiler that wrote it is named by nothing in it crates/hale-types/src/topology.rs · dump_topology_over the artifact is refused the artifact schema; a correction changes a section’s values and never its shape (I3 made relative the sources paths that were absolute) DNA requires schema 1.19 exactly and recomputes it
law_digest the artifact’s law rows and issues are the ones emitted: a fold of their canonical JSON artifact emission Fnv64 LawRows — crates/hale-types/src/topology.rs · dump_topology_over the artifact is refused: a row edited under a stale digest the artifact schema DNA reads the law section under schema 1.19
claim_table_digest an evidence sidecar was derived from this claim table: its rows, origins, laws and provenance store evidence derivation (ClaimIrTable::semantic_digest) Fnv64 LawRows ModelHalf: by design: the sidecar names the model by model_shape; two programs of one topology with different @effects classes must not accept each other’s evidence, which is why the law table is hashed beside it crates/hale-model/src/claim_ir.rs · semantic_digest the evidence is refused (InvalidProvenanceRecord) the crate’s own FNV hasher, never DefaultHasher; a change of what the table holds moves it —
analysis_coverage_digest an evidence sidecar was derived over a model whose analysis coverage (the analyzable, analyzed, summarized and ownership bits) is this one evidence derivation Fnv64 Model SourcePaths: by design: coverage bits per entity, by canonical entity order crates/hale-model/src/application.rs · analysis_coverage_digest the evidence is refused (InvalidProvenanceRecord) a change of the bits it folds moves it; ANALYSIS_SEMANTICS_VERSION covers the analyses’ meaning —
dispatch_plan_digest two builds lowered the bus with the same dispatch plan: each subject, its flavor and its subscribers hale build, run, replay (the lowering view’s plan; the default plan under no_bus_devirt) Fnv64 DispatchPlan DispatchPlan: the same-domain column is a reserved zero byte that no lowering reads; GH #464 makes it a column again crates/hale-model/src/dispatch_plan.rs · digest none of its own: it moves exec_digest, so a replay is refused a change of what lowering reads moves it, and with it every recording’s exec_digest —
exec_digest a build and a recording were made from the same build inputs: the toolchain, the options, the plan and the user’s sources, each named by its source-map path, in the source map’s order hale build, run, replay Sha256 CompilerSources, RuntimeC, StdlibSeeds, Manifests, RustcVersion, GitCommit, CompilerVersion, BuildOptions, DispatchPlan, UserSources, SourcePaths — crates/hale-cli/src/shared/options.rs · exec_digest replay refused moves with every compiler commit (the toolchain half frames the commit) the default options fingerprint string (build_env.rs’s test)
toolchain_digest the replay identity’s compiler half: a recording was made by a compiler built from these sources, by this rustc, at this commit compiler build (HALE_TOOLCHAIN_SHA256, hale-cli/build.rs) Sha256 CompilerSources, RuntimeC, StdlibSeeds, Manifests, RustcVersion, GitCommit UserSources: by design: the toolchain is not the program; exec_digest frames the sources beside it; BuildOptions: by design: options are a build’s, exec_digest frames them crates/hale-cli/build.rs · toolchain_digest replay refused (through exec_digest) moves with every compiler commit; a framing of the one shared selection (identity_files) —
stale_src_hash the stale-binary warning’s hash: the binary was built from the identity-covered sources now on disk, the selection toolchain_digest and compiler_src_hash fold compiler build (HALE_STALE_SRC_HASH, hale-cli/build.rs), and on a check, verify, build, run, test, dna or inputs invocation in a development checkout only when a covered file or its directory is newer than the binary (stale_sources: otherwise it stats and reads nothing) Fnv64 CompilerSources, RuntimeC, StdlibSeeds, Manifests RustcVersion: by design: a warning that the sources on disk are not the binary’s; another rustc over the same sources is no edit; GitCommit: by design: the commit names no source the files do not crates/hale-cli/src/shared/stale.rs · stale_sources a warning on stderr none: the shared selection (identity_files) and the shared fold; a change of coverage is a change of that selection —
compiler_src_hash the DNA host cache’s compiler half: the same file selection as toolchain_digest, folded without the rustc version or the commit, because the cache is keyed by what this binary would build compiler build (HALE_COMPILER_SRC_HASH, hale-iris/build.rs) Fnv64 CompilerSources, RuntimeC, StdlibSeeds, Manifests RustcVersion: by design: two binaries of one source build one host; GitCommit: by design: the commit names no source the files do not; BuildOptions: by design: this is the compiler half; toolchain_hash frames the options the cache’s build inherits beside it crates/hale-iris/build.rs · main the cache directory is new; the host is rebuilt moves with every compiler source edit; the shared selection (identity_files) —
toolchain_hash the DNA host cache’s key: the compiler’s sources (the stdlib among them, folded once), the options its hale build subprocess builds with, and the embedded iris and DNA trees are the ones the cached host was built from hale iris, hale dna (per invocation) Fnv64 CompilerVersion, CompilerSources, RuntimeC, StdlibSeeds, Manifests, BuildOptions, EmbeddedDna, EmbeddedIris BuildOptions: by design: the options are the execution identity’s fingerprint of the environment the subprocess inherits (host_cache_options), so what that fingerprint leaves out (the DWARF switch LOTUS_NO_DEBUGINFO, a narration or a timing, the C warnings, the linker, the cache’s place) is no part of the key either; RustcVersion: by design: see compiler_src_hash crates/hale-iris/src/lib.rs · toolchain_hash the cache directory is new; the host is rebuilt moves with the version, the compiler’s sources, the inherited options and every embedded byte —
embedded_dna_digest a binary embeds this DNA source set: the files of the listed directories, by path and content compiler build (HALE_DNA_EMBEDDED_DIGEST, hale-dna/build.rs), and over any checkout’s tree (digest_of_tree); the stale-DNA check on a check, verify, build, run, test, dna or inputs invocation in a development checkout digests the tree only when an embedded file or its directory is newer than the binary or the count is not the embedded set’s (stale_dna: otherwise it stats and reads nothing) Sha256 EmbeddedDna EmbeddedDna: by design: the directories are listed non-recursively, with the extensions each contributes (EMBEDDED_DIRS); a file outside them is not embedded crates/hale-dna/src/digest.rs · digest_of_pairs a warning on stderr (the stale-DNA check); hale dna status reports the difference a framing tag (hale-dna-embedded-v1) persisted in users’ trees (vendor/dna provenance): its value never moves with a refactor
analysis_inputs_digest evidence was produced by the same analyses: the stdlib source they absorb, the compiler version, the path renames and the surface registry; independent of the program by design artifact emission and admission (recomputed by the binary that reads it) Fnv64 AnalysisVersion, StdlibSeeds, CompilerVersion, PathRenames, SurfaceRegistry UserSources: by design: it names the analyses, never the program; CompilerSources: by design: the analyses’ Rust is versioned by ANALYSIS_SEMANTICS_VERSION, bumped by hand when a certificate’s meaning moves crates/hale-types/src/evidence.rs · analysis_inputs_digest the artifact is refused: evidence produced under another analysis snapshot a hand-bumped constant (ANALYSIS_SEMANTICS_VERSION, 8), and the compiler version —
source_digest a source file has this text: the per-file digest of the snapshot’s source map snapshot load (source_map, hale-frontend) Fnv64 UserSources SourcePaths: by design: the path rides beside it in the source map, relative to one root, not in the digest crates/hale-frontend/src/frontend.rs · source_map the evidence is refused; the artifact’s digest differs the artifact schema the sources section’s shape (schema 1.19)
obs_entity_id_digest two observed id tables number the entities identically: the (kind, name, id) rows a build stamped, which an external consumer recomputes from its own copy of the model hale build (codegen stamps it into the obs header), and by a consumer from its model Fnv64 Model SourcePaths: by design: keyed by (kind, name), because no artifact carries a site identity; keying it by site would break the consumer and churn on unrelated edits crates/hale-model/src/obs_ids.rs · digest no match, no join: a consumer refuses the ids the iris protocol’s version (0.3) nine literal values in model_arrangement; PROTOCOL.md §3.2
snapshot_key two snapshots were loaded from the same inputs and share a result: the entry, the load mode, the target and the three component digests snapshot load Structural SourcePaths, Target, SnapshotConfig, EditorBuffers, UserSources CompilerSources: by design: the key is snapshot-local; no binary or recording carries it; BuildOptions: by design: codegen options are not a load’s crates/hale-frontend/src/snapshot.rs · SnapshotKey the snapshots are distinct and share no result its fields: a component added is a field added —
snapshot_config_digest the load’s configuration is the same: the target and its spec, the api and roles, the environment and the check’s switches snapshot load (Config::digest) Fnv64 Target, EnvironmentRoles, SnapshotConfig — crates/hale-frontend/src/snapshot.rs · digest the snapshots are distinct length-framed fields: a switch added is a field added —
snapshot_overlay_digest the editor buffers a load read over the disk are the same snapshot load (SourceProvider::overlay_digest) Fnv64 EditorBuffers — crates/hale-frontend/src/source.rs · overlay_digest the snapshots are distinct zero for the disk itself; length-framed fields —
snapshot_sources_digest a load read the same source text: every unit’s path and text, imports included snapshot load Fnv64 UserSources, SourcePaths SourcePaths: by design: the path is hashed absolute, not as the source map names it: two files at two places are two snapshots, so one program checked out at two roots has two keys; the key is snapshot-local and no artifact, binary or recording carries it crates/hale-frontend/src/snapshot.rs · load the snapshots are distinct none: the order is the load’s —
constitution_digest two constitutions have the same normalized closure: their bases (deduplicated) and entries, rendered as forms law selection, once per snapshot, projected for the artifact and the matrix (LawSelection::identities) Fnv64 Constitutions SourcePaths: by design: the closure’s text, not where it was declared crates/hale-types/src/claims.rs · constitution_digest the matrix reports two environments that adopt different closures none: a change of the rendering moves it —
fleet_shape_hash a fleet plan’s model text is the one printed: the plan artifact’s own shape fleet plan emission Fnv64 FleetPlan — crates/hale-cli/src/fleet.rs · fnv none: nothing in the workspace compares it, it is printed none —
runtime_object_key a cached runtime object was compiled from this C source with these flags by this C compiler hale build (compile_cached_runtime_object_with) DefaultHasher RuntimeC, CCompiler CCompiler: the host clang hashes as it always has, so a cached object stays valid; only another compiler or another release moves the key crates/hale-codegen/src/codegen.rs · compile_cached_runtime_object_with the object is recompiled a hand-bumped constant (RT_CACHE_VERSION) —

Consumers. replay (admission); topology / fleet (admission); dna (schema 1.19, semantics 2, shape_hash, artifact_digest); the runtime obs header; the DNA host cache; the stale-binary warning

Invariants.

Missing data. n/a

Focused tests. crates/hale-cli/tests/obs_model_hash.rs; crates/hale-cli/tests/model_diff.rs; crates/hale-cli/tests/replay_cli.rs; crates/hale-cli/tests/stale_dna_warning.rs; crates/hale-cli/tests/source_map.rs; crates/hale-cli/src/shared/stale.rs (an_edit_to_any_covered_source_is_stale_and_an_uncovered_one_is_not, an_unmodified_tree_is_fresh_without_a_read_and_its_fold_agrees, the_dna_tree_is_digested_only_when_a_time_or_the_count_moved, a_dna_edit_that_restores_its_time_is_not_seen_by_the_cheap_check); crates/hale-graph/tests/identity_coverage.rs (the_fnv_basis_is_written_only_where_the_one_fold_lives)

Spec. spec/model.md § Identity and versioning

A registered rule without an evaluator fails the compiler’s own build, and registry_rules_match_spec.rs reads each list below from the spec and fails on a rule one side lacks or a title that differs. reads is what the evaluator reads: the rows of the named families, or the declaration it judges.

list rules
spec/semantics.md § Type-check rules 20
spec/semantics.md § Slot restrictions (v1) 3
spec/verification.md § Structural & design rules 39
rule list title gist family evaluator reads state
semantics/placement/1 spec/semantics.md § Type-check rules placement { } is main locus only. placement { } is main-locus-only placement crates/hale-syntax/src/parser.rs · ``placement block is only valid inside the declaration Canonical
semantics/placement/2 spec/semantics.md § Type-check rules Keys reference main-locus params field names. keys name main-locus params fields placement crates/hale-types/src/check.rs · check_placement_block top_scope Canonical
semantics/placement/3 spec/semantics.md § Type-check rules Field values are locus types. field values are locus types placement crates/hale-types/src/check.rs · check_placement_block top_scope Canonical
semantics/placement/4 spec/semantics.md § Type-check rules At most one placement entry per field. at most one entry per field placement crates/hale-types/src/check.rs · check_placement_block the declaration Canonical
semantics/placement/5 spec/semantics.md § Type-check rules Pool names use snake_case Idents. pool names are identifiers; main always exists placement crates/hale-syntax/src/parser.rs · parse_placement_block the declaration Canonical
semantics/placement/6 spec/semantics.md § Type-check rules Locus-pinning compatibility. pinned-class restrictions (no accept(), no closure whose epoch is birth or dissolve, the default) on every pinned instance, a placement entry’s or an adapter binding’s placement crates/hale-types/src/lowering_laws.rs · pinned_features placement, bindings Canonical
semantics/placement/7 spec/semantics.md § Type-check rules Dead bus receiver (error). dead bus receiver on a cooperative pool is an error blocking crates/hale-types/src/check.rs · check_cooperative_pool_blocking placement, bus_graph, effects Canonical
semantics/placement/8 spec/semantics.md § Type-check rules Blocking syscall on a cooperative pool (warning). a blocking syscall on a cooperative pool is a warning blocking crates/hale-types/src/check.rs · check_cooperative_pool_blocking placement, bus_graph, effects Canonical
semantics/placement/9 spec/semantics.md § Type-check rules Orphan bus topic (warning). orphan bus topic (closed world) bus_graph crates/hale-types/src/check.rs · check_bus_graph bus_graph, entrypoint, top_scope Canonical
semantics/placement/10 spec/semantics.md § Type-check rules Bus cycles. bus cycles: a queued cycle warns, an unconditional intra-locus cycle of direct calls is an error bus_graph crates/hale-types/src/check.rs · check_bus_cycles bus_graph, desugar_sequence Canonical
semantics/placement/11 spec/semantics.md § Type-check rules Bus backpressure (warning). bus backpressure heuristic bus_graph crates/hale-types/src/check.rs · check_bus_backpressure the declaration Migrating
semantics/placement/12 spec/semantics.md § Type-check rules Bus subject type-mismatch (error). one literal subject, one payload type bus_graph crates/hale-types/src/check.rs · check_bus_subject_types the declaration Migrating
semantics/placement/13 spec/semantics.md § Type-check rules Empty / degenerate pinned(cores = …) (error). degenerate pinned(cores = ..) is an error placement crates/hale-types/src/check.rs · check_placement_block the declaration Canonical
semantics/placement/14 spec/semantics.md § Type-check rules topology { } consistency + pinned(node/l3) resolution (error). topology consistency and node/l3 resolution placement crates/hale-types/src/check.rs · check_topology_block the declaration Canonical
semantics/placement/15 spec/semantics.md § Type-check rules replicas = K (error on K < 1; pinned-only). replicas = K: K >= 1, pinned only placement crates/hale-types/src/check.rs · check_placement_block the declaration Canonical
semantics/placement/16 spec/semantics.md § Type-check rules Pool affinity (2026-08-12). pool affinity agrees per pool placement crates/hale-types/src/check.rs · check_pool_affinity entrypoint Migrating
semantics/placement/17 spec/semantics.md § Type-check rules A pinned placement forbids a loop (error). a pinned locus is not instantiated in a loop placement crates/hale-types/src/lowering_laws.rs · pinned_root_in_a_loop placement Canonical
semantics/placement/18 spec/semantics.md § Type-check rules Every entry is consumed by exactly one instantiation (error). every placement entry is consumed exactly once placement crates/hale-types/src/lowering_laws.rs · placement_entry_consumed placement Canonical
semantics/placement/19 spec/semantics.md § Type-check rules Uncarriable bus payload (error). a bus payload is carriable bus_graph crates/hale-types/src/check.rs · check_bus_payload_carriable top_scope Migrating
semantics/placement/20 spec/semantics.md § Type-check rules Unowned subscriber (error). a subscriber born in a bus handler is owned ownership crates/hale-types/src/check.rs · check_unowned_subscriber_locus ownership, placement Canonical
semantics/slots/1 spec/semantics.md § Slot restrictions (v1) Slot element type must be a value-shape, not a LocusRef. a capacity slot’s cell type is not a locus: a span-targeted typecheck error, and again at codegen (locus/decl.rs) as defense in depth forms crates/hale-types/src/check.rs · check_locus_member_at top_scope Canonical
semantics/slots/2 spec/semantics.md § Slot restrictions (v1) Slot pointers don’t cross the bus. structurally enforced, no check: a slot name is a locus member, not a typeable identifier (self.<slot> is typed Unknown, check_expr_at), so it cannot appear as a payload struct field forms crates/hale-types/src/check.rs · check_expr_at the declaration Canonical
semantics/slots/3 spec/semantics.md § Slot restrictions (v1) Duplicate slot names rejected. two slots of one name are a typecheck error, and again at codegen (locus/decl.rs) forms crates/hale-types/src/check.rs · check_locus_member_at the declaration Canonical
verification/structural/cqrs-no-locus-return spec/verification.md § Structural & design rules CQRS / no-locus-return a locus fn whose return type or fallible(T) payload names a user-declared locus (error) surfaces crates/hale-types/src/check.rs · check_no_locus_return top_scope Canonical
verification/structural/stdlib-error-type-shadow spec/verification.md § Structural & design rules Stdlib error-type shadow a user type named like a stdlib error type whose shape differs, when a fallible stdlib call reaches that error type, read from the call’s stdlib surface row (error) stdlib_surface crates/hale-types/src/resolve.rs · check_stdlib_error_shadowing top_scope, stdlib_surface Migrating
verification/structural/codec-purity spec/verification.md § Structural & design rules Codec purity a bus codec whose encode / decode is not pure (error), read from the purity column of the effect rows, whose stdlib leaves are the surface table’s syscall, block and publish rows bindings crates/hale-types/src/check.rs · check_main_and_bindings bindings, effects Canonical
verification/structural/ring-layout-contract spec/verification.md § Structural & design rules ring_layout contract a foreign-ring layout declaration that is internally ill-formed (error); check_ring_layout, and check_main_and_bindings for a binding’s layout: reference bindings crates/hale-types/src/check.rs · check_ring_layout the declaration Canonical
verification/structural/ring-layout-geometry spec/verification.md § Structural & design rules ring_layout geometry a cross-field inconsistency in a ring_layout (overlap, overrun, a buffer_size that is not a multiple of the record alignment) (error); check_ring_layout and check_main_and_bindings bindings crates/hale-types/src/check.rs · check_ring_layout the declaration Canonical
verification/structural/foreign-ring-payload-shape spec/verification.md § Structural & design rules Foreign-ring payload shape a layout:-bound topic whose payload is neither flat-shapeable nor BytesView (error) bindings crates/hale-types/src/check.rs · check_main_and_bindings bindings, top_scope Canonical
verification/structural/value-returning-violator-is-fallible spec/verification.md § Structural & design rules A value-returning violator is fallible a value-returning fn or locus method that may violate and is not fallible(ClosureViolation) (error, at its name, naming the closure or the callee the path goes through) violate_fallible crates/hale-types/src/violate_fallible.rs · violate_fallible_laws alloc_summary Canonical
verification/structural/one-error-type-for-a-violator spec/verification.md § Structural & design rules One error type for a violator a fn that may violate declared fallible(E) with E other than ClosureViolation (error) violate_fallible crates/hale-types/src/violate_fallible.rs · violate_fallible_laws alloc_summary Canonical
verification/structural/violation-in-a-method-returning-nothing spec/verification.md § Structural & design rules Violation in a method returning nothing a fn returning nothing that may violate and is not fallible (warning; a later release makes it the law) violate_fallible crates/hale-types/src/violate_fallible.rs · violate_fallible_laws alloc_summary Canonical
verification/structural/violation-in-a-perspective-served-method spec/verification.md § Structural & design rules Violation in a perspective-served method a locus method serving a perspective fn that may violate and is not fallible, exempt from the law and the lint until a fallible perspective call lowers (warning) violate_fallible crates/hale-types/src/violate_fallible.rs · violate_fallible_laws alloc_summary Canonical
verification/structural/perspective-fallibility-matches spec/verification.md § Structural & design rules A perspective fn’s fallibility a method serving a perspective fn with a different fallibility, either way (error) surfaces crates/hale-types/src/check.rs · check_serves_conformance the declaration Canonical
verification/structural/cell-slot-of-origin spec/verification.md § Structural & design rules Cell slot-of-origin releasing a Cell<T> into a different (locus, slot) than it was acquired from (error, at codegen) forms crates/hale-codegen/src/codegen.rs · try_lower_capacity_slot_method_call the declaration Canonical
verification/structural/recovery-event-alphabet spec/verification.md § Structural & design rules Recovery event alphabet a name in persists_through(...) or resets_on(...) outside restart, restart_in_place, quarantine (error, at the name, a misspelling one edit away suggesting the event) closures crates/hale-types/src/closure_events.rs · outside_the_alphabet the declaration Canonical
verification/structural/persist-through-dissolve spec/verification.md § Structural & design rules Persisting through dissolve dissolve in persists_through(...), which can mean nothing: an accumulator does not outlive its locus’s dissolve (error, at the name) closures crates/hale-types/src/closure_events.rs · persists_through_dissolve the declaration Canonical
verification/structural/contradicting-recovery-clauses spec/verification.md § Structural & design rules Contradicting recovery clauses an event one closure names in both persists_through(...) and resets_on(...) (error, at the resets_on name, the witness the persists_through name); resets_on otherwise states the default and changes nothing at run time closures crates/hale-types/src/closure_events.rs · in_both_clauses the declaration Canonical
verification/structural/unreached-recovery-event spec/verification.md § Structural & design rules Unreached recovery event an event a closure of the program’s own seed names that no handler or recovery statement of the closed world applies to its locus (warning, at the name, the witness each handler and statement that names the locus and the events it applies); a spent restart(c) for N is quarantine; not judged in an open world, for an imported locus, or for an event a recovery applies to a child no row names closures crates/hale-types/src/closure_events.rs · unreached_events handler_routing, expression_typing, entrypoint Canonical
verification/structural/persistence-without-accumulator spec/verification.md § Structural & design rules Persistence with no accumulator persists_through(...) on a closure whose assertion accumulates nothing, so the clause keeps nothing (warning, at the clause, the witness the assertion) closures crates/hale-types/src/closure_events.rs · nothing_to_keep the declaration Canonical
verification/structural/sealed-confinement spec/verification.md § Structural & design rules Sealed confinement a read or write of a @sealed locus’s params from outside its own members (error, at the access, naming the methods to call instead) sealability crates/hale-types/src/sealed_access.rs · outside_access expression_typing, top_scope Canonical
verification/structural/module-nested-main spec/verification.md § Structural & design rules Module-nested entry a seed whose only main locus is module-nested has no entry (error, once, at that locus’s name) law_backstops crates/hale-types/src/lowering_laws.rs · module_nested_main_is_not_the_entry entrypoint Canonical
verification/structural/cross-pool-spawn-as-a-value spec/verification.md § Structural & design rules Cross-pool spawn as a value a locus literal the bubble plan posts to an owner on another thread, used as a value rather than a bare statement (error, at the literal, or at the call or literal whose default expands it) law_backstops crates/hale-types/src/lowering_laws.rs · cross_pool_spawn_used_as_a_value ownership, placement, expression_typing Canonical
verification/structural/self-containing-locus spec/verification.md § Structural & design rules Self-containing locus a locus whose params defaults construct one of its own kind by value, by a literal or a fresh-factory call (error, at the param that closes the cycle) law_backstops crates/hale-types/src/lowering_laws.rs · self_containing_locus ownership Canonical
verification/structural/role-declared-once spec/verification.md § Structural & design rules Role declared once a role declared twice (error, at the second, the witness the first) role_rows crates/hale-types/src/roles.rs · declared_twice role_rows Canonical
verification/structural/role-declared spec/verification.md § Structural & design rules Declared role a role an includes names that nothing declares (error, at the name) role_rows crates/hale-types/src/roles.rs · undeclared role_rows Canonical
verification/structural/role-includes-acyclic spec/verification.md § Structural & design rules Acyclic role includes a role reachable from its own includes chain (error, at the role’s name) role_rows crates/hale-types/src/roles.rs · role_cycle role_rows Canonical
verification/structural/pool-starvation spec/verification.md § Structural & design rules Pool starvation two or more never-returning run() bodies on one cooperative pool of the deployed root (warning, at the first) flows crates/hale-types/src/check.rs · check_pool_starvation placement, flows Canonical
verification/structural/birth-order-trap spec/verification.md § Structural & design rules Birth-order trap a root params field whose never-returning run() runs inline on main, so the params after it are never born (warning, at the first such field) flows crates/hale-types/src/check.rs · check_birth_order placement, flows Canonical
verification/structural/dropped-scope-local-delivery spec/verification.md § Structural & design rules Dropped scope-local delivery a bus subscriber, or a locus that keeps one (its params defaults, transitively, or a child its bodies accept or store), built and dissolved inside one call that runs on a classic cooperative pool, where every delivery to it is dropped (warning, at the literal) alloc_summary crates/hale-types/src/check.rs · check_scope_local_subscriber_on_classic_pool alloc_summary, top_scope, ownership, placement Canonical
verification/structural/hot-path-allocation spec/verification.md § Structural & design rules Hot-path allocation an allocation per loop iteration or per bus message (warning; an error under @hot, where it also flags snapshot() / finish() and a whole-struct self-field replace) alloc_summary crates/hale-types/src/check.rs · check_hot_path_alloc alloc_summary, top_scope Canonical
verification/structural/unit-declared-once spec/verification.md § Structural & design rules Unit declared once a unit declared twice (error, at the second’s name, the witness the first; a unit of the stdlib’s time catalogue’s name, U4, is that unit declared again, the message naming the catalogue) unit_declarations crates/hale-types/src/units.rs · declared_twice unit_declarations Canonical
verification/structural/declared-unit spec/verification.md § Structural & design rules Declared unit an equation’s target, a denomination or an origin naming no declared unit (error, at the name, the nearest declared unit suggested; a retired time unit says what it is now first: m, minutes are min) unit_declarations crates/hale-types/src/units.rs · undeclared_units unit_declarations Canonical
verification/structural/unit-cycles-multiply-to-one spec/verification.md § Structural & design rules Unit cycles multiply to one a cycle of unit equations whose product is not one (error, at the equation the closure found inconsistent, with what it claims and what the other path implies; the witness is the other path, each step at its declaration) unit_declarations crates/hale-types/src/units.rs · inconsistent_cycles unit_declarations, unit_catalogue Canonical
verification/structural/one-quantity-per-component spec/verification.md § Structural & design rules One quantity per component a second quantity declared with no policy over one component of the catalogue (error, at its name, the witness the component’s quantity), and a refinement of a quantity denominated outside its component unit_declarations crates/hale-types/src/units.rs · second_quantity unit_declarations Canonical
verification/structural/quantity-counts-an-int spec/verification.md § Structural & design rules Quantity counts an Int a quantity over anything but Int, a quantity with no in, or Int in D with no quantity (error, saying what to write) unit_declarations crates/hale-types/src/units.rs · quantity_shape unit_declarations Canonical
verification/structural/point-over-a-quantity spec/verification.md § Structural & design rules Point over a quantity a point over anything but a quantity, an origin: on anything but a point, and a point’s denomination or origin in a unit outside its quantity’s component (error) unit_declarations crates/hale-types/src/units.rs · point_shape unit_declarations Canonical
verification/structural/round-and-range-clauses spec/verification.md § Structural & design rules Round and range clauses a round: naming none of the five policies or on an identity or a range; a range: bound that is no integer literal, a range holding no value, or one outside its parent’s (error, the witness the parent’s range) unit_declarations crates/hale-types/src/units.rs · clauses unit_declarations Canonical
verification/structural/identity-and-range-bases spec/verification.md § Structural & design rules Identity and range bases an identity that is not distinct Int or has a denomination; a range over a primitive other than Int, with a denomination, or a refinement of Int with no range: (error) unit_declarations crates/hale-types/src/units.rs · identity_and_range_bases unit_declarations Canonical
verification/structural/refinement-of-a-scalar spec/verification.md § Structural & design rules Refinement of a scalar a scalar declaration over a name nothing declares, a refinement of a struct, an enum, an alias of one or another non-scalar, and a refinement chain that comes back to itself (error, at the base) unit_declarations crates/hale-types/src/units.rs · refinement_bases unit_declarations Canonical
verification/structural/unit-named-like-a-literal-suffix spec/verification.md § Structural & design rules Unit named like a literal suffix a unit named d, the Decimal literal’s suffix (3d is the Decimal 3), or e / E and a digit, a Float’s exponent (3e5): the lexer reads either before a unit, so no literal could write the unit (error, at the name) unit_declarations crates/hale-types/src/units.rs · literal_suffix_names unit_declarations Canonical
verification/structural/named-like-a-builtin-type spec/verification.md § Structural & design rules Named like a builtin type a quantity, a point, an identity, a range or a unit of a program named like a builtin type (a primitive: Bytes, Int, String, …; or a builtin error type): a type position reads the builtin before any declaration, so the declaration could never be named (error, at the name) unit_declarations crates/hale-types/src/units.rs · builtin_type_names unit_declarations Canonical

The shadow facility (hale-graph’s shadow module) runs a new derivation beside the old one while a family migrates. Its call sites outside tests are this allowance only: a source file under crates/*/src that references the facility, other than the facility’s own module, is listed here with its count, or fails registry_guard.rs. None today: F.40 phase 3 deleted every shadow, and the facility’s users are tests.

Every stdlib call lowers from its row: an intrinsic’s id picks its arm in an exhaustive match, at statement, value and or position. A ["std", path literal in crates/hale-codegen/src is a lowering that decides on a path instead, so the ones that remain are this allowance, each with its reason, or fail registry_guard.rs.

path literals reason
crates/hale-codegen/src/stdlib/sockopt.rs 2 its unit test’s probes of unknown_fn_error, a path built around a variable name to ask the checker’s question; neither dispatches

Every Debug rendering with no prose around it (a ?} placeholder in a formatting macro whose template holds no space) in hale-syntax, hale-types, hale-model, hale-codegen, hale-frontend, hale-cli and hale-lsp, with the number of invocations that collapse to the fragment. A message with prose around its {:?} is not listed: it is read by a person. A site that decides derives a fact from a Debug string and is permitted only until its family’s table replaces it; a new site fails the guard.

path invocation count verdict
crates/hale-cli/src/build_env.rs format!( "target={:?};cpu={:?};dev={};debug=false", o.target, o.target_cpu, o.dev_profile 1 decides (digests)
crates/hale-cli/src/build_env.rs format!(";lto={l:?}") 1 decides (digests)
crates/hale-cli/src/verbs/misc.rs println!("{:#?}", prog) 1 renders
crates/hale-codegen/src/codegen.rs format!("{:?}", other) 1 renders
crates/hale-lsp/src/lib.rs format!("pinned({:?})", affinity) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", ExitCode::SUCCESS) 2 renders
crates/hale-lsp/src/lib.rs format!("{:?}", affinity) 1 decides (placement)
crates/hale-lsp/src/lib.rs format!("{:?}", c.kind) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", p) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", r) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", s.placement) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", site.escape) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", site.kind) 1 renders
crates/hale-lsp/src/lib.rs format!("{:?}", site.reason) 1 renders
crates/hale-lsp/src/lib.rs format!("{code:?}") 1 renders
crates/hale-syntax/src/json_gen.rs format!("{:?}", f) 1 renders
crates/hale-syntax/src/parser.rs format!("{:?}", err) 21 renders
crates/hale-types/src/check.rs format!("{:?}", p) 2 decides (snapshot_identity)
crates/hale-types/src/check.rs format!("{:?}({})", class, type_expr_text(inner)) 1 renders
crates/hale-types/src/check.rs format!("{:?}({})", class, type_expr_identity(inner, known)) 1 decides (snapshot_identity)
crates/hale-types/src/lib.rs format!("{:?}", d.kind) 1 renders
crates/hale-types/src/model_builder.rs format!("{:?}:{}", d.kind, d.display) 1 renders
crates/hale-types/src/model_builder.rs format!( "projection:{:?}({})", class, type_descriptor(inner) ) 1 decides (snapshot_identity)
crates/hale-types/src/desugar_sequence.rs format!("{:?}", d) 1 renders
crates/hale-types/src/purity.rs format!("{:?}", op) 1 renders
crates/hale-types/src/purity.rs format!("{:?}", subject) 1 renders
crates/hale-types/src/secret_reveal.rs format!("{:?}", fd) 1 decides (effects)
crates/hale-types/src/secret_reveal.rs format!("{:?}", lc.kind) 1 decides (effects)
crates/hale-types/src/secret_reveal.rs format!("{:?}", m) 1 decides (effects)
crates/hale-types/src/secret_reveal.rs format!("{:?}", other) 3 renders
crates/hale-types/src/stdlib_names.rs format!("{:?}", d) 1 decides (stdlib_surface)