Skip to content

Harden model extensions - #997

Merged
zaneni6 merged 2 commits into
ROCm:mainfrom
jtuyls:users/jtuyls/model-extension-followups
Nov 10, 2026
Merged

zaneni6 merged 2 commits into
ROCm:mainfrom
jtuyls:users/jtuyls/model-extension-followups

Conversation

@jtuyls

@jtuyls jtuyls commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Follow up on #874.

  • Check the entry a preferred_source merge-patches in like the entry itself: every field it sets, and the frontend family, backend and provider it selects. Before, only its name and files were checked.
  • Refuse catalog folder and file names Windows rewrites: a trailing dot or space ("Model." opens "Model", which another entry may own) and device names such as CON, NUL.txt and COM1. The schema patterns match.
  • Ship model_extension.h in the .deb; debian/rules removed include/, so the packaged CMake config pointed at a missing header.
  • Skip the Gemma4-open fixture builds and tests in release runs, as the models-from-source jobs are.
  • Note that the fixture needs vcpkg from setup_windows_deps.ps1.

@jtuyls
jtuyls requested review from zaneni6 and a balanced review from Copilot November 10, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Validation accepts Windows-reserved COM/LPT names with superscript suffixes, allowing overlays that fail during flm pull; the validator, schema checks, and regression tests need updating.

1 open issue
What changed in this PR

This follow-up to #874 hardens model-extension catalog validation and adjusts SDK packaging and release CI.

Changes:

  • Validates merged preferred_source entries and their frontend/backend provider selections.
  • Rejects additional Windows-unsafe path names, updates schema patterns, and adds regression tests.
  • Preserves SDK headers in Debian packages, skips extension fixture builds in release runs, and documents the fixture’s vcpkg dependency.
File Description
src/​test/​model_list_platform/​test_model_list_platform.cpp Adds path, preferred-source, folder-collision, and provider validation tests.
src/​schemas/​model-catalog-overlay-v1.schema.json Tightens folder and relative-path patterns for Windows compatibility.
src/​include/​AutoModel/​model_catalog_overlay.hpp Validates merged entries and rejects Windows-unsafe path components.
src/​common/​AutoModel/​model_frontend.cpp Checks frontend and multimodal provider compatibility for preferred sources.
debian/​rules Stops deleting installed SDK headers.
.github/​workflows/​build-and-test.yml Skips model-extension fixture builds during release runs.
.github/​script/​ci/​setup_windows_deps.ps1 Documents the fixture’s dependency on vcpkg include files; no behavior change.

Review effort: Balanced

- Check the entry a preferred_source merge-patches in like the entry
  itself: every field it sets, and the frontend family, backend and
  provider it selects. Before, only its name and files were checked.
- Refuse catalog folder and file names Windows rewrites: a trailing dot
  or space ("Model." opens "Model", which another entry may own) and
  device names such as CON, NUL.txt, COM1 and COM or LPT with a
  superscript 1 to 3. The schema patterns match.
- Ship model_extension.h in the .deb; debian/rules removed include/, so
  the packaged CMake config pointed at a missing header.
- Skip the Gemma4-open fixture builds and tests in release runs, as the
  models-from-source jobs are.
- Note that the fixture needs vcpkg from setup_windows_deps.ps1.
@jtuyls
jtuyls force-pushed the users/jtuyls/model-extension-followups branch from b9d81b2 to fb26e31 Compare November 10, 2026 08:49
# Conflicts:
#	.github/script/ci/setup_windows_deps.ps1
@zaneni6

zaneni6 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks, Jorn, these all look good! #971 (vendored curl, vcpkg dropped) landed in the meantime and already updated the Gemma4-open fixture, so it conflicted only on the new vcpkg note in setup_windows_deps.ps1. I merged main into the branch (b6c4c364) and took main's version of that file, since the note no longer applies. Everything else is unchanged. I'll merge once CI is green.

@zaneni6
zaneni6 merged commit 1bd9414 into ROCm:main Nov 10, 2026
51 checks passed
@jtuyls
jtuyls deleted the users/jtuyls/model-extension-followups branch November 10, 2026 23:31
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.

3 participants