Skip to content

feat: add app versioning#188

Open
liamnwhite1 wants to merge 3 commits into
fix/139-fix-pytest-examplesfrom
feat/182-add-app-versioning
Open

feat: add app versioning#188
liamnwhite1 wants to merge 3 commits into
fix/139-fix-pytest-examplesfrom
feat/182-add-app-versioning

Conversation

@liamnwhite1

Copy link
Copy Markdown
Collaborator

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 --exec value with a default fallback.
  • get_executable_version() runs a configurable version command, captures stdout and stderr, supports --env setup 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:

  • OS/shell: Linux, bash
  • Python: 3.12.10 from the project .venv
  • Install method: existing project virtual environment

Commands run:

  • .venv/bin/python -m pytest
  • .venv/bin/ruff check src/myna/core/app/base.py tests/test_app_versioning.py
  • git diff --check

The 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/docs impact considered. Updated ARCHITECTURE.md, developer docs,
    and/or ADRs where needed.

@liamnwhite1 liamnwhite1 force-pushed the fix/139-fix-pytest-examples branch from 46c7077 to a17d3be Compare June 2, 2026 11:33
@liamnwhite1 liamnwhite1 changed the title Feat/182 add app versioning feat: add app versioning Jun 2, 2026
@liamnwhite1 liamnwhite1 force-pushed the feat/182-add-app-versioning branch from 18259c2 to 3c248dc Compare June 2, 2026 11:35
@liamnwhite1 liamnwhite1 marked this pull request as ready for review June 2, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant