CB-WP-0048 T01: Configuration and Rules — identity split from behaviour
catalog.rs reads ground-game's schema 2 and refuses an unknown schema by name: a reader that silently accepted schema 1 would answer questions about aspects over a file that has none. config.rs holds the two types ADR-0022 chose. Configuration is identity and round-trips anything the catalog names, including modules with no kernel path; Rules is behaviour, exhaustive, no catch-all. resolve() is the boundary and emits the two distinct errors -- "known module with no kernel path (status: proposed)" vs "not a module the catalog has" -- which is the entire reason this shape was chosen over a per-aspect enum. Nothing about aspects, defaults or module status is written in our source; all of it is read. The tests find the proposed module by searching for status: proposed rather than naming one, so implementing it upstream makes the test look elsewhere instead of going stale. Four mutations, four red. scoped_plus_attack_soothe now resolves -- the combination the three-armed enum could not express. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a87afca48f
commit
e75f3afe4d
3 changed files with 655 additions and 0 deletions
|
|
@ -16,6 +16,19 @@ pub mod bot;
|
|||
/// only one of them is optional.
|
||||
pub mod edition;
|
||||
|
||||
/// ground-game's rules catalog, schema 2 (CB-WP-0048, ADR-0022).
|
||||
///
|
||||
/// Gated with `scenarios` because it parses YAML and that is where
|
||||
/// `serde_yaml` lives. The *identity* type in `config` is not gated: a
|
||||
/// configuration must be readable off a recording whether or not this
|
||||
/// build can validate it against the catalog.
|
||||
#[cfg(feature = "scenarios")]
|
||||
pub mod catalog;
|
||||
|
||||
/// A configuration is a point in aspect space (ADR-0022).
|
||||
#[cfg(feature = "scenarios")]
|
||||
pub mod config;
|
||||
|
||||
/// K13's per-player projection (CB-WP-0008 T02) — the trait's first
|
||||
/// implementor. Needs the runtime's `Project`, which the game already
|
||||
/// depends on, so it is not feature-gated either.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue