Fix tests for periodic front angle update mechanism#562
Fix tests for periodic front angle update mechanism#562chrxh merged 9 commits intofeatures/CreatureCheckfrom
Conversation
…erization, add lastUpdate tests Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
Add headCell(true) to all cells in tests that run >110 timesteps to prevent cell death from the new lastUpdate mechanism. Without a head cell, non-head cells have their lastUpdate incremented every timestep and die when it exceeds Cell::UpdateInterval + 10 (110). Files fixed: - FrontAngleUpdateTests: Update expectations for noUpdate_equalFrontAngleId - MuscleTests: Add headCell(true) to all cells, GenomeDesc with matching frontAngle for muscle head cells - PhysicsTests: Add headCell(true) to all cells in angular force and ghost tests - EnergyFlowTests: Add headCell(true) to all cells in long-running tests - GeneratorTests: Add headCell(true) to generator cells in >110 timestep tests - BalanceTests: Add headCell(true) to seed constructor cells - ConstructorTests: Add headCell(true) to cells in long-running tests - CreatureTests: Add headCell(true) to constructor seed cells Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot Try to make the test ConstructorTests_AllShapes::creature_3__generateShape running. |
…fix BendingMuscles frontAngleId expectation Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com> Agent-Logs-Url: https://github.com/chrxh/alien/sessions/e5955d01-d7a1-48a3-864c-36cc7510ca21
Fixed in 36d9f11. Root cause: Two fixes:
All 204 ConstructorTests now pass (201 pass, 3 pre-existing skips). |
The new front angle update logic (
d5e08f15) incrementscreature->frontAngleIdeveryCell::UpdateInterval(100) timesteps and incrementslastUpdateunconditionally for all non-head cells. Cells withlastUpdate > 110transition toCellState_Dying. This means any creature without aheadCellwill have its cells die after ~111 timesteps, breaking 200+ tests.CellStateTransitionTests
CellDeathConsequencesparameterization (no longer exists in kernel)Detachingpropagation tests (mechanism removed)lastUpdate-based death tests: threshold check, fixed cell exemption, head cell exemptionFrontAngleUpdateTests
noUpdate_equalFrontAngleId: periodic mechanism now bumpscreature->frontAngleIdeven when initially equal — updated expectations to expect propagated front angle valuesMuscleTests, PhysicsTests, ConstructorTests, CreatureTests, EnergyFlowTests, BalanceTests, GeneratorTests
headCell(true)to an appropriate cell in each test creatureGenomeDesc().frontAngle(...)matching the muscle cell's explicit front angle where neededEntityFactory bug fix
EntityFactory::createCellFromNodewas missingcell.lastUpdate = 0initialization. Newly constructed cells inherited garbage values from CUDA heap memory, causing them to immediately transition toCellState_DyingwhenlastUpdate > 110. This only manifested when running tests non-isolated (due to CUDA heap memory reuse from previous tests).ConstructorTests_BendingMuscles fix
resetBendingMuscletest expectation fromInitialFrontAngleId + 1toInitialFrontAngleId + 2— at timestep 0, both the periodic mechanism (timestep % 100 == 0) andactivateNewObjectOnLastNodeeach bumpcreature->frontAngleId.Example fix pattern for muscle tests:
Verified: All 204 ConstructorTests pass (201 pass, 3 pre-existing skips). All 144 FrontAngleUpdate + Physics + Muscle tests pass.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.