feat: extract minimal redstone module kernel - #134
Conversation
|
Final review found one small but real kernel-boundary issue. The two verified fixtures themselves are correct: I independently compared all 8 checked-in expected facings against the merged MinePilot VoxelPlans (ItemSorter N/E/S/W + PistonDoor N/E/S/W), and all 8 match exact block coordinates/states. The remaining issue is the fail-closed transform contract in Today axis, hinge, orientation, rotation, shapeand silently preserves every other unknown property. That means a future property with directional semantics that is not on this blacklist could be rotated geometrically while its state is silently left unchanged. That is broader than the evidence and contradicts #133's requirement that unsupported directional transforms fail closed rather than guess. Please make one narrow change:
Do not add a Minecraft-wide state registry or expand scope. No fixture, VoxelPlan, public API, docs architecture, or runtime behavior change is requested. Existing 8/8 exact fixture outputs should remain unchanged. Everything else in #134 looks merge-ready. |
Summary
Implements the bounded, internal static module kernel for CraftDAG #133, using only the verified MinePilot ItemSorterSlice and quasi-connected PistonDoor proofs as evidence. No MinePilot implementation or runtime behavior was changed.
Proof comparison
sourceNodeId.facing.The helper centralizes only the repeated static mechanics in CraftDAG. The verified MinePilot proofs remain unchanged. See the rewritten
docs/REDSTONE_MODULES.mdfor the comparison matrix and runtime-target boundary.Files
packages/core/src/redstone/moduleKernel.ts(not exported through the public package entry point).packages/core/test/fixtures/redstone/item-sorter-slice.jsonandquasi-connected-piston-door.json. Each records canonical topology, N/E/S/W topology, roles, exact block states, and proof provenance. Fixture facing outputs were checked against all eight block blob SHAs in merged MinePilot PRs feat: extract minimal redstone module kernel #134 and #136.packages/core/test/redstone-module-kernel.test.ts: canonical equivalence, all four expected orientations, exact states, ordinary VoxelPlan lowering, repeat determinism, and fail-closed structural/state cases. Non-zero rotations reject unknown state properties; zero rotation preserves them unchanged.docs/REDSTONE_MODULES.mdto distinguish proven shared structure, module-specific behavior, and deferred abstractions.Validation
pnpm test: passed; Core 197 tests plus importer (12), exporter (7), adapter-mesh (7), and CLI (10); all builds passed.pnpm typecheck: passed.pnpm lint: passed.git diff --check: passed.Review state
b9d34aec1da3b5a7e8c975cb19cf4cdf1337c675Closes #133