Skip to content

[OMEGA-430] Abort omega launcher start when script and Docker image versions differ - #364

Open
janaina-senna wants to merge 5 commits into
singnet:mainfrom
janaina-senna:jn/feat/omega-script-check-version
Open

janaina-senna wants to merge 5 commits into
singnet:mainfrom
janaina-senna:jn/feat/omega-script-check-version

Conversation

@janaina-senna

@janaina-senna janaina-senna commented Sep 24, 2026 •

Copy link
Copy Markdown

Description

Abort scripts/omega start (and the interactive bootstrap) when the host launcher version and the Docker image version are both known and do not match.

The check runs after docker pull and before docker rm -f omega. Host version comes from omega_version(); image version is read from /PeTTa/repos/Omega/version, with a fallback to the image's scripts/omega --version. A trailing -dirty suffix is ignored so a locally dirty checkout of the same tag is not a false mismatch.

If either version cannot be determined (Omega unknown, typical curl | bash with no git metadata), the script warns and continues so the documented pipe-install path still works.

README now states that the launcher and image must be the same git tag.

How Has This Been Tested?

  • bash -n scripts/omega
  • ./scripts/omega --version
  • Launcher tests in tests/test_omegaclaw_launcher.py:
    • matching image version allows start and still issues docker rm / docker run
    • mismatched image version exits non-zero, prints the warning, and does not replace the existing container
  • Existing launcher option tests still pass (component import flags, mutually exclusive flags, rejected removed flags)

Checklist

  • PR contains autogenerated code
  • Self-review completed
  • Test scenarios above are passed with the version of the code from PR

@janaina-senna janaina-senna changed the title Jn/feat/omega script check version Abort omega launcher start when script and Docker image versions differ Sep 24, 2026
@janaina-senna

janaina-senna commented Sep 25, 2026 •

Copy link
Copy Markdown
Author

Manual test of the matching scenario:

$ ./scripts/omega start -p Test -t test -d omega:dev
omega
a260a18972e5e5ecf485849de973a8d526fdb3d126fb376586f5b842aee56894
$ echo "exit: $?"
exit: 0

Manual test of the mismatching scenario:

$ ./scripts/omega start -p Test -t test -d omega:mismatch
The launcher script and Docker image versions do not match.
  Script: Omega version=v0.1.19-139-gb25ec74
  Image (omega:mismatch): Omega version=v0.0.0-test

Update the script or the image so both are the same tag/commit. For example:
  curl -fsSL https://github.com/singnet/Omega/raw/refs/tags/<tag>/scripts/omega | bash -s -- singularitynet/omega:<tag>
$ echo "exit: $?"
exit: 1

@janaina-senna

janaina-senna commented Sep 25, 2026 •

Copy link
Copy Markdown
Author

Unit tests for matching and mismatching scenarios were added:

$ pytest tests/test_omegaclaw_launcher.py -q
.......                                                                                                                                                    [100%]
7 passed in 1.60s

@vsbogd vsbogd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is right, but there is the excessive complexity in processing Omega versions. The problem is that instead of use bare version the code gets something like "Omega version ...." and tries to figure out version from this string. I would suggest get bare version from Python function instead.

Next question is what function to use. The function returning Omega version is

def omega_version(repo_root: str | os.PathLike | None = None) -> str:
But it returns already formatted string "Omega ..." which is not what we would expect. We need to split this function on two:

  • one returns bare version or empty string
  • another returns the formatted version if it is needed (personally I would not format version here at all and format it in the code which prints/sends the version instead)

Then we can get bare version using python -c ... command and postprocessing is not needed, code will be simpler overall.

@janaina-senna janaina-senna changed the title Abort omega launcher start when script and Docker image versions differ [OMEGA-430] Abort omega launcher start when script and Docker image versions differ Sep 25, 2026

This branch has not been deployed

No deployments
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.

2 participants