Skip to content

fix(ci): repair two master-CI reds — orphaned Metal registry entries + MCP smoke path allowlist - #1090

Closed
lusoris wants to merge 2 commits into
masterfrom
fix/master-ci-repair-aug
Closed

lusoris wants to merge 2 commits into
masterfrom
fix/master-ci-repair-aug

Conversation

@lusoris

@lusoris lusoris commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Two independent failures keeping CI red on every open PR. Both root-caused to
registry/contract drift introduced by earlier merged PRs, both verified locally.

1. Metal registry orphan

Re-registers the nine round-3/round-4 Metal feature extractors that were silently
dropped from the compiled registry, restoring the 17/17 contract asserted by
test_metal_kernel_coverage_audit (ADR-0959).

Why

PR #875 split core/src/feature/feature_extractor.c into .cpp but carried over
only 8 of the 17 *_metal externs. PR #1004 then deleted the now-dead .c
twin — which is where the other 9 lived. The .mm kernel TUs, the
g_metal_features[] dispatch rows and the parity tests all stayed in place, so
nothing failed to build; only the registry entries vanished. Net effect on macOS
Metal builds: vmaf_get_feature_extractor_by_name("<name>_metal") returned NULL
and --feature <name> could not select these kernels at all.

Affected: integer_ssim_metal, float_vif_metal, float_adm_metal,
integer_vif_metal, integer_adm_metal, integer_ciede_metal,
integer_psnr_hvs_metal, integer_cambi_metal, ssimulacra2_metal.

This is the same registry-split orphan class PR #1004 fixed for the GPU SpEED
twins, and it is the single failing test on both macOS CI build legs
(131 OK / 1 FAIL).

All additions sit inside #if HAVE_METAL; non-Metal builds are byte-unaffected.


2. MCP Smoke — compute_vmaf 10-bit case rejected by its own path allowlist

test_mcp_smoke's 10-bit case writes yuv420p10le fixtures to /tmp at run
time. PR #1054 added validate_path() to core/src/mcp/compute_vmaf.c, which
canonicalises every caller-supplied YUV path and admits only <repo>/testdata,
<repo>/model, <repo>/python/test/resource, /workspace/python/test/resource
and $VMAF_MCP_ALLOW. /tmp is deliberately not a default root, so
score_yuv_pair() returned -EACCES, the response carried no score field, and
the assertion tripped. This was the single failing test in the
MCP Smoke (Embedded C + Python Server) job.

Fixed in the test, not the allowlist: the case extends the allow-set via the
documented VMAF_MCP_ALLOW escape hatch for its own duration and unsetenv()s
it afterwards, so the remaining cases still run against the default roots. The
allowlist is unchanged and its rejection behaviour stays covered by
core/test/test_mcp_compute_vmaf_allowlist.c.

Reproduced and verified locally with the exact CI meson configuration:

cd core
meson setup build-mcp -Denable_cuda=false -Denable_sycl=false \
  -Denable_mcp=true -Denable_mcp_sse=enabled \
  -Denable_mcp_uds=true -Denable_mcp_stdio=true --buildtype=release
meson compile -C build-mcp
meson test -C build-mcp test_mcp_smoke --print-errorlogs
# before: 17 tests run, 1 failed  ("compute_vmaf 10-bit returns score")
# after:  18 tests run, 18 passed

Deep-dive deliverables

Reproducer / smoke-test command

Registry parity (any platform, no Metal device needed):

grep -oE '&vmaf_fex_\w+_metal' core/src/feature/feature_extractor.cpp | sort -u | wc -l
# 17 after this PR (8 before); EXPECTED_KERNEL_COUNT in
# core/test/test_metal_kernel_coverage_audit.c:108 is 17

The failing gate itself (macOS):

meson setup build -Denable_metal=true && \
  meson test -C build test_metal_kernel_coverage_audit --print-errorlogs

Audit #1 (test_every_kernel_basename_is_registered) is CPU-side and needs no
Metal device; audits #2/#3 skip with -ENODEV off-device.

Bug status hygiene

  • docs/state.md updated — T-METAL-REGISTRY-ORPHAN-2026-08-30 added under Recently closed.

@lusoris
lusoris force-pushed the fix/master-ci-repair-aug branch from a39bbd0 to 4768637 Compare August 30, 2026 08:58
@lusoris lusoris changed the title fix(metal): re-register 9 orphaned Metal feature extractors (17/17 registry parity) fix(ci): repair two master-CI reds — orphaned Metal registry entries + MCP smoke path allowlist Aug 30, 2026
lusoris and others added 2 commits August 30, 2026 11:16
…gistry parity)

PR #875 split core/src/feature/feature_extractor.c into .cpp but carried
over only 8 of the 17 *_metal externs; PR #1004 then deleted the dead .c
twin where the remaining 9 lived. The .mm kernel TUs, the g_metal_features[]
dispatch rows and the parity tests all stayed in place — only the registry
entries were lost, so vmaf_get_feature_extractor_by_name() returned NULL and
--feature <name> could not select them on macOS Metal builds.

Restores the externs and feature_extractor_list[] entries for
integer_ssim_metal, float_vif_metal, float_adm_metal, integer_vif_metal,
integer_adm_metal, integer_ciede_metal, integer_psnr_hvs_metal,
integer_cambi_metal and ssimulacra2_metal, bringing the registry back to the
17/17 contract asserted by test_metal_kernel_coverage_audit (ADR-0959).

This was the single failing test on both macOS CI build legs (131 OK / 1 FAIL).
All additions sit inside #if HAVE_METAL, so non-Metal builds are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ke CI red)

test_mcp_smoke's compute_vmaf 10-bit case writes its yuv420p10le fixtures to
/tmp at run time. PR #1054 added validate_path() to core/src/mcp/compute_vmaf.c,
which canonicalises every caller-supplied YUV path and admits only
<repo>/testdata, <repo>/model, <repo>/python/test/resource,
/workspace/python/test/resource and $VMAF_MCP_ALLOW. /tmp is deliberately not a
default root, so score_yuv_pair() returned -EACCES, the response carried no
score field, and the assertion tripped.

Fixed in the test rather than the allowlist: the case extends the allow-set
through the documented VMAF_MCP_ALLOW escape hatch for its own duration and
unsetenv()s it afterwards, so the remaining cases still exercise the default
roots. The allowlist is unchanged; its rejection behaviour stays covered by
core/test/test_mcp_compute_vmaf_allowlist.c.

Reproduced and verified locally with the exact CI meson configuration:
17 tests run / 1 failed before, 18 tests run / 18 passed after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lusoris
lusoris force-pushed the fix/master-ci-repair-aug branch from bcfddce to c15811b Compare August 30, 2026 09:17
@lusoris
lusoris enabled auto-merge (squash) August 30, 2026 09:54
@lusoris

lusoris commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by a rebuilt branch — the original had an orphan-root history that made rebase report both-added conflicts on files it never touched. Same two fixes, clean base.

@lusoris lusoris closed this Aug 30, 2026
auto-merge was automatically disabled August 30, 2026 11:53

Pull request was closed

@lusoris
lusoris deleted the fix/master-ci-repair-aug branch September 2, 2026 22:05
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