Skip to content

build(cmake): ratchet decklink-captions onto the conversion groups (#2625) - #2956

Merged
zackees merged 1 commit into
masterfrom
infra/2625-conversion-decklink-captions
Oct 29, 2026
Merged

zackees merged 1 commit into
masterfrom
infra/2625-conversion-decklink-captions

Conversation

@zackees

@zackees zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member

Refs #2625. One more target leaves the conversion ratchet's blind spot.

What

plugins/decklink-captions/CMakeLists.txt opts the target into
-Wconversion, -Wsign-conversion and -Wfloat-conversion. Nothing else changes: the
target names no implicit conversion with the three groups on, so there is no call site to
state.

The opt-in is what makes the target appear in ci/conversion_ratchet.py's
ratcheted_dirs(), so from this commit on a PR that changes a compile input below
plugins/decklink-captions runs the asan lane that would have caught a sanitizer-only
diagnostic (#2955), instead of leaving it to the nightly schedule.

Evidence

Local tree: build/ (Linux, gcc 15.2, ENABLE_DECKLINK=ON, -Werror global), branch at
origin/master 61c814e48.

  • Build with the groups on. ninja -C build decklink-captions reconfigures and
    recompiles build/decklink-captions.core+.hpp.cpp and mocs_compilation.cpp with the
    three groups → clean, links decklink-captions.so.
  • Clang replay. Every decklink-captions.dir entry of build/compile_commands.json
    re-run as clang++ 21.1.8 with -fsyntax-only plus the three groups and the -Wno-*
    pins removed → 0 diagnostics in 3 TUs.
  • Gates. uvx gersemi==0.25.0 -c plugins/decklink-captions/CMakeLists.txt clean;
    ./lint → lane lint: ok (92.0s); uv run python -m unittest test_conversion_ratchet.py test_ci_scope.py → 59 tests OK (the ratchet test reads the tree, so the new entry is
    covered without a test edit).

No RED commit: this is a configuration-only change and the target reports nothing to
state, so there is no failing state to capture (coordination.md §4's exception for a
focused CI/configuration fix). The evidence above is the local compile of the affected
TUs with the flags the change adds.

Not verified here: AppleClang and MSVC. This target builds on macOS and Windows too,
and the opt-in is scoped to COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU, so a
compiler-specific diagnostic there would surface on those lanes, not in this replay.

No docs/features.md line: build tooling only.

…2625)

The target names no implicit conversion with -Wconversion,
-Wsign-conversion and -Wfloat-conversion on, so the pins that hide that
class are not needed here. This drops the target out of the ratchet's
blind spot: #2955's sanitizer lane now selects on a change below it.

Refs #2625.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewed for correctness, the ratchet mechanism, and the tests the change claims.

Verdict: correct and complete.

What I checked independently (not taken from the description):

  • The opt-in is what the ratchet reads. ci/conversion_ratchet.py matches the
    positive groups in any target_compile_options() body and records that
    CMakeLists' directory. On this head, uv run python -m ci.conversion_ratchet
    now lists plugins/decklink-captions, so the target really is in the ratchet
    rather than only compiling with the flags.
  • The lane actually follows. On this tree,
    ci_scope.scope(["plugins/decklink-captions/decklink-captions.cpp"], event="pull_request", ratchet_dirs=repo_ratcheted_dirs(...)) returns asan=True, which is the
    behaviour the description promises. (A CMakeLists-only change, including this
    PR, does not select it — SOURCE covers compile inputs only, same as every
    other ratcheted target.)
  • No diagnostics in the affected TUs. Replayed the three decklink-captions
    entries of an ENABLE_DECKLINK=ON Linux build with g++ 15.2, -fsyntax-only,
    the three -Wno-* pins removed and -Wconversion -Wsign-conversion -Wfloat-conversion added: 0 diagnostics, all three exit 0. That matches the
    clang replay in the description, on a different compiler.
  • Tests and format. From ci/: test_conversion_ratchet.py and
    test_ci_scope.py (59 tests) plus test_conversion_card.py,
    test_frontend_conversion_optins.py, test_conversion_measure.py (20 tests)
    all pass. gersemi 0.25.0 -c plugins/decklink-captions/CMakeLists.txt is clean.

The generator expression is spelled exactly like the existing obs-webrtc entry
(COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU), which is the right guard here —
the plugin has only C++ sources.

Not verified by me: AppleClang and MSVC. 0 docs/features.md line is right for a
build-only change.

Queuing.

Merged via the queue into master with commit 2fe262a Oct 29, 2026
35 checks passed
@zackees
zackees deleted the infra/2625-conversion-decklink-captions branch October 29, 2026 19:43
MCPVOT pushed a commit to MCPVOT/obs-studio that referenced this pull request Oct 30, 2026
…-rust#2956) (obs-rust#2961)

* test: a ratchet opt-in PR selects the sanitizer lane (obs-rust#2960)

RED on master: `hit()` matches only source suffixes, so the PR whose only
change is the CMakeLists that turns a target's ratchet on selects no asan
pass. That is obs-rust#2956's shape (one CMakeLists, +9 -0, `Sanitize` skipped) and
obs-rust#2959's.

Fails now:

    AssertionError: False is not true
    test_the_cmake_lists_that_turns_the_ratchet_on_hits
    test_the_pr_that_turns_a_targets_ratchet_on_selects_the_sanitizer_lane

* ci: the ratchet opt-in PR runs the sanitizer lane (obs-rust#2923, obs-rust#2956, obs-rust#2959)

`conversion_ratchet.hit()` matches a ratcheted target's own CMakeLists.txt as
well as the sources below it: the PR that names a group in that file changes a
build input of the target, and it is the cheapest place to pay for a diagnostic
only the asan configuration reports (the blind spot obs-rust#2923 exists for). The match
is the exact directory, so a nested `frontend/build/CMakeLists.txt` is another
target and a directory the ratchet does not name opts nothing in. The
`pull_request` guard is unchanged, so a merge-queue run still keeps the path
selection (obs-rust#2072, obs-rust#2593).

GREEN: `test_conversion_ratchet` + `test_ci_scope`, 61 tests.
Real tree, `repo_ratcheted_dirs`: `plugins/decklink-captions/CMakeLists.txt`
[pull_request] asan=true, [merge_group] asan=false.

Fixes obs-rust#2960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant