Skip to content

fix(rc): implement picture_v2 API + fix ai/scripts stub exit codes - #886

Merged
lusoris merged 1 commit into
masterfrom
rc/scaffold-stub-completion
Jun 12, 2026
Merged

lusoris merged 1 commit into
masterfrom
rc/scaffold-stub-completion

Conversation

@lusoris

@lusoris lusoris commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • VmafPicture v2 fully implemented (ADR-0928 cycle N+1): all five entry points in core/src/picture_v2.c are now live in libvmaf.so. Previously the header was design-only and all symbols were unlinked. Header now installed via meson install_headers. 10-case unit test added to the fast suite (test_picture_v2).
  • 13 ai/scripts stub scripts fixed: all exited with code 0 (success) when not yet implemented, deceiving CI and any caller into believing work had completed. All now exit with code 1 and print a stderr guidance message pointing to the relevant doc/ADR.
  • No new stubs remain misleading: the remaining -ENOSYS patterns (HIP/Metal/DNN disabled-build stubs, MCP scaffold) are correct conditional-build behavior, not misleading silences.

Scaffold inventory

Item Status Action
picture_v2.h — 5 unlinked entry points Completed Implemented in picture_v2.c, header installed
13 ai/scripts/*.py sys.exit(0) stubs Tombstoned properly Changed to sys.exit(1)
HIP/Metal -ENOSYS stubs Correct behavior Left as-is (documented scaffold contract)
DNN disabled-build stubs Correct behavior Left as-is (ADR-0040/ADR-0374)
MCP scaffold Already implemented (T5-2b) Left as-is

Test plan

  • meson test -C <build> --suite=fast → 89/89 pass (up from 88)
  • test_picture_v2 covers: vmaf_backend_handle_name known + OOB, vmaf_picture2_alloc/unref happy + null paths, vmaf_picture_v1_to_v2/v2_to_v1 happy + null paths, round-trip
  • All 13 stub scripts now exit 1 when invoked (verified via shell)
  • Pre-commit passes (clang-format, ruff, black, copyright, semgrep)

Deliverables checklist

  • Research digest: no digest needed: trivial (implementation is mechanical wrapping of existing picture.c)
  • Decision matrix: no alternatives: only-one-way fix (the stubs had to be either implemented or removed; implemented because the design was correct)
  • AGENTS.md invariant: updated core/include/libvmaf/AGENTS.md picture_v2 invariant note
  • Reproducer: meson test -C build --suite=fast (test_picture_v2 at index 17)
  • Changelog fragment: changelog.d/fixed/rc-scaffold-stub-completion.md
  • Rebase notes: docs/rebase-notes.md § rc/scaffold-stub-completion

🤖 Generated with Claude Code

ADR-0928 cycle N+1: all five VmafPicture v2 entry points implemented
in core/src/picture_v2.c (vmaf_picture2_alloc, vmaf_picture2_unref,
vmaf_picture_v1_to_v2, vmaf_picture_v2_to_v1, vmaf_backend_handle_name).
Header installed via meson install_headers; 10-case unit test added
(test_picture_v2, suite: fast). Previously the header was a design-only
stub with unlinked symbols.

Fixed 13 ai/scripts stubs that exited with code 0 (success) despite
being unimplemented, misleading CI and callers. All now exit with
code 1 and print a guidance message to stderr.

89/89 fast tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lusoris
lusoris force-pushed the rc/scaffold-stub-completion branch from 88ecdb9 to 697a276 Compare June 12, 2026 22:06
@lusoris
lusoris merged commit d1039ac into master Jun 12, 2026
1 check passed
@lusoris
lusoris deleted the rc/scaffold-stub-completion branch June 12, 2026 22:06
@lusoris lusoris added this to the 1.0.0 — First release milestone Sep 4, 2026
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