Skip to content

Core: Improve engine stability, fix lifecycle logging, and increase test coverage#73

Closed
GuilhermeF03 wants to merge 9 commits into
mainfrom
chore/improved-tests-coverage
Closed

Core: Improve engine stability, fix lifecycle logging, and increase test coverage#73
GuilhermeF03 wants to merge 9 commits into
mainfrom
chore/improved-tests-coverage

Conversation

@GuilhermeF03
Copy link
Copy Markdown
Member

Summary

This PR focuses on hardening the core engine stability and significantly expanding the unit test suite to improve long-term reliability. It addresses critical timing issues in the physics loop, fixes lifecycle logging bugs, and introduces automated coverage reporting.

Changes

Core Engine & Lifecycle

  • SceneManager: Implemented a robust while-loop physics accumulator with a MAX_PHYSICS_STEPS safety cap (8 steps). This prevents physics desync during frame rate drops and protects against the "spiral of death."
    • SceneManager: Persisted viewportWidth and viewportHeight state to allow late-registering systems to query dimensions immediately after setup.
    • App Lifecycle: Refactored the shutdown sequence to execute onExit hooks before tearing down the logging subsystem, ensuring final cleanup logs are correctly captured.
    • Node Observability: Added TRACE level logging for path resolution to provide visibility when the engine transparently skips wrapper nodes.

Build & Infrastructure

  • Kotlin Upgrade: Upgraded Kotlin version to 2.3.20.
    • Kover Reports: Enabled automated HTML and XML Kover coverage report generation on the check task.

Test Suite & Quality

  • Test Expansion: Added 29 new test files across engine, adapters, and tooling modules.
    • Refactoring: Renamed EmptyNode to TestNode project-wide to clarify the distinction between internal engine components and test doubles.
    • Coverage: Verified 146 passing tests with instruction coverage reports now integrated into the build process.

How to Test

  1. Run the full test suite and verify all 146 tests pass:
  2. ./gradlew test
    1. Generate and inspect the coverage report:
  3. ./gradlew check
    1. Verify that physics timing remains consistent even under simulated lag in SceneManagerTests.

@DanielSousa01
Copy link
Copy Markdown
Collaborator

🤖

@GuilhermeF03
Copy link
Copy Markdown
Member Author

Closed, was a simple test of Antigravity and Codex - will be used for more atomic tasks. This PR also fails the contribution guidelines

@github-project-automation github-project-automation Bot moved this from Backlog to Done in canopy-tasks Apr 21, 2026
@GuilhermeF03 GuilhermeF03 deleted the chore/improved-tests-coverage branch April 21, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants