Harden model image registration script#9
Merged
Merged
Conversation
codychampion
added a commit
that referenced
this pull request
May 22, 2026
* Harden model image registration script * Add lightweight smoke workflow * Fix watcher dataset-card f-string syntax
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
This PR hardens
scripts/register_model_image.py, which builds and registers model Docker images, fixes a real syntax issue inscripts/watcher.py, and adds a lightweight smoke workflow.Changes include:
shell=Truefrom Docker subprocess calls--metricsas a JSON object instead of silently swallowing malformed inputscripts/watcher.pycaused by a backslash inside an f-string expressionWhy this matters
The previous implementation interpolated user-controlled arguments into shell commands. This is risky even for internal tooling and can fail in surprising ways when paths, model IDs, or tags contain unexpected characters.
The new smoke workflow also caught an existing syntax error in
scripts/watcher.py, which is now fixed.Checks
The smoke workflow passes.
Notes
This keeps the script behavior and generated registry-note structure intact, but makes failures clearer and command execution safer. The workflow deliberately avoids installing the full ML stack so checks stay fast and reliable.