The MastForest type needs to enforce an invariant that the total number of nodes is always strictly less…
The MastForest type needs to enforce an invariant that the total number of nodes is always strictly less…: a task in LegoFlow-SWE (Harbor dataset). Currently, MastForest allows adding nodes without checking this bound. Operations like add node and ensure node should detect when an insertion would…
The task
Currently, `MastForest` allows adding nodes without checking this bound. Operations like `add_node` and `ensure_node` should detect when an insertion would cause the node count to reach or exceed 2^30 and return an error instead of silently creating an invalid state that could lead to serialization failures or panics.
Part of Lego-X/LegoFlow-SWE.