Skip to content

W-068: ecs-relations package rules and preconditions (REL-F08)

Type: feature · Size: S · Epic: E-relations-v0 · Target: packages/ecs-relations · Breaking: no Depends: W-061, W-062, W-063, W-064, W-065, W-066, W-067 Refs: spec REL-150..REL-152, REL-155 (group REL-F08; KL1, KL4); REL-153 and REL-154 are retired; REL-155 is the README section

Goal

Lock the package-wide rules of ecs-relations with tests: no module-level mutable state, no side effects on import, per-world isolation across symmetric and transitive, and the reset canary for KL4. Write the README Preconditions section that links the sections of W-063, W-066, and W-067.

Steps

  • S1 (REL-150, REL-151): tests that installing symmetric and transitive in one world does not change another world, even with the same rel and closure objects; importing the package creates no world, entity, or hook; files: packages/ecs-relations/tests/package-rules.test.ts
  • S2 (REL-152): canary that after world.reset() the hooks of symmetric and transitive are gone (a new pair is not mirrored or closed) and that calling the install functions again works; files: packages/ecs-relations/tests/reset-canary.test.ts
  • S3 (REL-155 [manual]; changeset): README "Preconditions" section listing what the package cannot check (KL1), linking the transitive, ChildOf, and names sections, and stating that hooks are per world and lost on world.reset(), and that koota onRemove can fire for a pair the entity does not have (KL2); files: packages/ecs-relations/README.md, .changeset/w-068-ecs-relations-package-rules.md (patch, @workspace/ecs-relations)

Log

  • 2026-11-01 created (Triage), split from the approved spec W-008
  • 2026-11-01 placed in Later (Depends W-061 to W-067 not done; last feature item of E-relations-v0)