6.6 KiB
6.6 KiB
Reactor Maintenance Rewrite Tasks
Current State
- Branch:
design-rewrite - Scope approved: implement
docs/design.mdend-to-end with deterministic defaults and no backward compatibility. - Simulation core has been replaced with the first design-native model and deterministic engine slice.
- Simulation and test projects now target
net10.0because this Linux environment only has the .NET 10 runtime. - Win2D editor has been rewritten against the new design model.
- Win2D project now targets
net10.0-windows10.0.19041.0to match the simulation project. - Linux can restore and compile the referenced simulation project, but full WinUI/XAML compilation still requires a Windows-capable XAML compiler environment.
Completed Work
- Read project instructions, Linux instructions, code style, and
docs/design.md. - Confirmed deterministic balance defaults should be chosen during implementation.
- Confirmed a full Win2D editor is required.
- Created branch
design-rewrite. - Added
TASKS.mdas the required per-commit work tracker. - Removed the legacy integer hazard/effect/hazard plug-in simulation surface.
- Added design-native terrain, underground carrier layers, surface hazards, props, leaks, doors, reactor bindings, robot inventory, rule events, validation, serialization, and forecasts.
- Added deterministic default balancing values.
- Added a first deterministic simulation pipeline for network propagation, consumers, leaks, surface interactions, robot safety, reactor readiness, rule events, and forecasts.
- Replaced old tests with design-based simulation tests.
- Verified
dotnet test tests/ReactorMaintenance.Simulation.Tests/ReactorMaintenance.Simulation.Tests.csprojpasses: 11 passed. - Attempted
dotnet jb cleanupcode --build=False ...; unavailable in this environment becausedotnet-jbis not installed. - Reviewed the first slice and fixed an action-resolution maintainability issue before commit.
- Verified
git diff --checkreports no whitespace errors. - Ran
dotnet jb cleanupcode --build=False ...successfully after ReSharper install and normalized line endings back to LF. - Reworked the Win2D editor for the new model: full tool list, layer-aware painting, terrain, underground carriers, surface hazards, props, doors, leaks, robot, forecasts, save validation, starter level, and simple play actions.
- Removed old editor dependencies on legacy props, pressure pipes, smoke, fire, and global power/cooling/core-stability fields.
- Verified
dotnet test tests/ReactorMaintenance.Simulation.Tests/ReactorMaintenance.Simulation.Tests.csprojpasses after the editor rewrite: 11 passed. - Attempted Win2D build on Linux with
dotnet build src/ReactorMaintenance.Win2D/ReactorMaintenance.Win2D.csproj -p:EnableWindowsTargeting=true -p:Platform=x64; it fails at WindowsXamlCompiler.exewith exec format error. - Attempted managed XAML compiler path with
-p:UseXamlCompilerExecutable=false; it fails loading the WinUI XAML compiler task dependency under this Linux/.NET 10 setup. - Updated
README.mdfor the new design-model editor, .NET 10 target, and Linux/Windows build expectations. - Committed the Win2D editor rewrite slice.
- Added branch-aware junction flow analysis shared by validation and simulation propagation.
- Junction validation now rejects malformed branch counts and ambiguous source-side branches.
- Junction propagation now applies deterministic T-junction and cross-junction ratio weights only to inferred outgoing branches.
- Added tests for T-junction ratio splits, zero-weight branches, ambiguous junction validation, and best-path flow into non-junction cells.
- Verified
dotnet test tests/ReactorMaintenance.Simulation.Tests/ReactorMaintenance.Simulation.Tests.csprojpasses: 15 passed. - Ran
jb cleanupcode --build=False ...andpython D:\Code\crlf.py ...for touched C# files after the junction slice. - Expanded rule predicates with reactor readiness/loss/win, network value bands, and robot inventory checks.
- Expanded rule effects with removal of surface hazards, heat, and inventory, plus authored access positions for leak-start effects.
- Hardened rule event validation for predicate targets, effect targets, leak access, and non-negative amount effects.
- Added tests for network-band rules, reactor-ready rules, inventory rules, removal effects, electricity leak access, and invalid rule targets.
- Verified
dotnet test tests/ReactorMaintenance.Simulation.Tests/ReactorMaintenance.Simulation.Tests.csprojpasses after the rule slice: 21 passed. - Ran
jb cleanupcode --build=False ...andpython D:\Code\crlf.py ...for touched C# files after the rule slice. - Split serializable simulation records and enums from the monolithic
Models.csfile into individual files underModels. - Moved level creation, grid mutation helpers, surface clamping, grid geometry, and inventory operations out of serializable model records.
- Replaced separate T-junction and cross-junction props/tools with one topology-inferred
Junctionprop and one editor tool. - Moved junction ratio presets into balancing data.
- Replaced hardcoded
EPairEffectvariants with parameterized surface interaction verbs and balance-owned magnitudes. - Temporarily introduced and then removed a public
SimulationEnginefacade after review showed it was pure delegation. - Updated design documentation for generic junctions and parameterized surface interactions.
- Removed the temporary
SimulationCoreSystemcatch-all and madeSimulationEnginethe real orchestration point. - Split simulation behavior into purposeful systems for player actions, network propagation, consumers, leaks, surface interactions, robot safety, reactors, rule events, and forecasts.
- Kept
Systemslimited to behavior-owning systems; shared traversal, band, and carrier math helpers live at the simulation root. - Replaced carrier-specific editor enum entries with parameterized editor commands.
- Added explicit editor workflows for door edge selection, electricity wall leak access-face selection, reactor consumer binding, and basic rule event authoring.
- Added editor operation tests plus broader junction validation and serialization round-trip coverage.
- Verified
dotnet test tests\ReactorMaintenance.Simulation.Tests\ReactorMaintenance.Simulation.Tests.csprojpasses: 27 passed. - Verified
dotnet build src\ReactorMaintenance.Win2D\ReactorMaintenance.Win2D.csproj -p:Platform=x64 -p:EnableWindowsTargeting=truesucceeds on Windows. - Ran
jb cleanupcode --build=False ...andpython D:\Code\crlf.py ...for touched files in the final rewrite slice.
Current Work
- Rewrite task list completed on
design-rewrite.
Future Work
No known rewrite tasks remain.