Non-blocking follow-ups from PR #92 review (rounds 3–4):
1. WorldModel.mode is pub but doc says "never access directly."
The field is the serialization sentinel: None ≡ Full and emits no key (byte-stable). A downstream write of model.mode = Some(Mode::Full) would silently break byte-stability. pub(crate) isn't viable as-is (the bert and bert-compose crates construct WorldModel { mode: None, .. } via struct literal, which requires the field to be pub). Options: a constructor / builder that defaults mode to None, or a typestate that makes the sentinel unforgeable. Until then the field-level doc is the only guard.
2. kernel().things can contain duplicate Ids if the model wasn't validated first.
Duplicate entity Ids are caught by validate()'s check_duplicate_ids, not by kernel(). The dep field already documents its multiset semantics; things should get the analogous one-liner: "duplicates are possible on an unvalidated model — call validate() first, or dedup at the consumer if set semantics are needed."
3. (trivial) check_dynamical_face uses .trim().is_empty().
Defensive against whitespace-only slots; if UI strings are always pre-trimmed, plain .is_empty() is cheaper. Leave unless it shows up in a profile.
Refs bert#88, PR #92.
Non-blocking follow-ups from PR #92 review (rounds 3–4):
1.
WorldModel.modeispubbut doc says "never access directly."The field is the serialization sentinel:
None≡ Full and emits no key (byte-stable). A downstream write ofmodel.mode = Some(Mode::Full)would silently break byte-stability.pub(crate)isn't viable as-is (thebertandbert-composecrates constructWorldModel { mode: None, .. }via struct literal, which requires the field to bepub). Options: a constructor / builder that defaultsmodetoNone, or a typestate that makes the sentinel unforgeable. Until then the field-level doc is the only guard.2.
kernel().thingscan contain duplicate Ids if the model wasn't validated first.Duplicate entity Ids are caught by
validate()'scheck_duplicate_ids, not bykernel(). Thedepfield already documents its multiset semantics;thingsshould get the analogous one-liner: "duplicates are possible on an unvalidated model — callvalidate()first, or dedup at the consumer if set semantics are needed."3. (trivial)
check_dynamical_faceuses.trim().is_empty().Defensive against whitespace-only slots; if UI strings are always pre-trimmed, plain
.is_empty()is cheaper. Leave unless it shows up in a profile.Refs bert#88, PR #92.