1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Specialized-handler precedence loaded from `data/seed/handler-precedence.lino`
//! (issue #663).
//!
//! Handler precedence is behaviour — the order in which the universal solver
//! tries its specialized handlers, first-match-wins — and behaviour belongs in
//! seed data ("Data Is The Interface"), not in a Rust constant. This loader
//! reads the ordered handler rows — each row is a bare handler name, so the
//! precedence stays invisible to the seed's meaning-closure audit (only *value*
//! tokens are grounded, never the head slug a row names).
//! [`super::super::solver_dispatch`] joins that order with the Rust function
//! pointers (which must stay code) and asserts the two are an exact permutation
//! of each other, so a seed edit can never silently drop or duplicate a handler.
//!
//! The JavaScript worker loads the synced deployment copy through
//! `src/web/seed_loader.js`, and a routing-parity fixture pins the shared
//! precedence invariants across the Rust and browser surfaces.
use parse_lino;
use HANDLER_PRECEDENCE_LINO;
/// Ordered specialized-handler names, in dispatch precedence order (first wins),
/// as declared by the shipped `data/seed/handler-precedence.lino`.
/// Parse an arbitrary handler-precedence document into its ordered handler names.
///
/// Exposed so tests can reorder rows in a fixture and observe the routing change
/// (`routing_precedence_from_seed`).