feat: add app versioning#188
Open
liamnwhite1 wants to merge 3 commits into
Open
Conversation
46c7077 to
a17d3be
Compare
18259c2 to
3c248dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add app-level executable version discovery so Myna applications can inspect external executable versions and branch on compatibility or template behavior.
Related issues
Details
This feature adds shared executable version helpers to
MynaApp:get_executable()resolves the configured--execvalue with a default fallback.get_executable_version()runs a configurable version command, captures stdout and stderr, supports--envsetup and Docker execution, and extracts a version identifier with either a regex or the first non-empty output line.extract_executable_version()centralizes output parsing for app-specific version logic.The developer guide now documents how app authors can call the new helper after argument parsing and use the returned version string to select templates or raise compatibility errors.
Unit tests cover regex extraction, default first-line extraction, stderr output from non-zero commands, unmatched regex failures, and environment-file PATH setup.
Impact
This is a low-risk feature addition. Existing executable validation behavior is preserved, with the duplicated executable fallback logic moved into
get_executable().The change gives app developers a common extension point for executable compatibility checks without requiring each app to implement its own subprocess/version parsing logic. No existing app templates or execution workflows are changed by default.
Testing strategy
Local environment:
.venvCommands run:
.venv/bin/python -m pytest.venv/bin/ruff check src/myna/core/app/base.py tests/test_app_versioning.pygit diff --checkThe default pytest suite passed locally. The new tests use temporary fake shell executables, so no external simulation application versions are required for coverage.
Checklist
ARCHITECTURE.md, developer docs,and/or ADRs where needed.