Skip to content

v0.4.2 - Lab Observation Test Coverage

Choose a tag to compare

@JackHopkins JackHopkins released this 27 Mar 23:42
· 11 commits to main since this release

Added

Comprehensive Lab Observation Test Coverage

Added extensive test coverage for lab entity observation in get_entities() API to ensure labs remain fully observable in all scenarios.

New Tests

  • 2 new test functions (test_get_lab and test_get_lab_edge_cases) with 13 total permutations:
    • Empty labs (just placed)
    • Labs with science packs (no power)
    • Labs with power connected
    • Multiple labs
    • Labs in mixed entity queries
    • Labs with position/radius filtering
    • Labs with full/empty inventories
    • Labs queried immediately after placement
    • Labs at far distances

Test Coverage Improvements

  • All 20 tests in test_get_entities.py now pass
  • Validates that labs are fully observable on player's force in all scenarios
  • Confirms force filtering works as designed (enemy/neutral labs not visible)

Investigation Results

This release adds regression tests following a comprehensive investigation that confirmed:

  • Labs are fully observable through the get_entities() API on the player's force
  • The only scenario where labs don't appear is when on a different force (enemy/neutral), which is intentional security design (force filtering in get_entities/server.lua)
  • No bugs exist in lab observation functionality

Full Changelog

See CHANGELOG.md for complete details.