test(host_agent): assert parsed agent version matches AGENT_VERSION constant
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 7s
CI / integration (push) Successful in 2m11s

The on-disk-version test hardcoded '1.0.0' and broke on the 1.1.0 bump. Compare
against agent.AGENT_VERSION so future bumps don't require touching the test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 12:14:53 -04:00
parent 3b2146bc7a
commit 712aec60c1
@@ -69,6 +69,9 @@ def test_rendered_script_passes_sh_n(tmp_path):
def test_agent_version_parses_on_disk_agent():
# Version-agnostic: the parsed value must match the agent module's constant,
# so a future AGENT_VERSION bump doesn't require touching this test.
from plugins.host_agent import agent
assert AGENT_SOURCE_PATH.exists()
v = _agent_version()
assert v == "1.0.0"
assert v == agent.AGENT_VERSION