Skip to content

[Engine] extract canvas channel setter - #5547

Merged
zackees merged 2 commits into
obs-rust:masterfrom
wesleyhawes:test/canvas-channel-extraction
Dec 3, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
wesleyhawes:test/canvas-channel-extraction

Conversation

@wesleyhawes

@wesleyhawes wesleyhawes commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #5134

Scope

Move the public obs_canvas_set_channel() implementation verbatim from obs-canvas.c.h into the new obs-canvas-channel-setter.c.h fragment in the existing libobs.core-source unity group. The change preserves the current public API and all mutex, reference, signal, callback-replacement, activation, deactivation, and release ordering. The later Rust replacement is a separate follow-up.

The prior characterization PR #5142 merged at b80dfb17; its C-reference and hybrid Tier 2 tests passed, including 100 serial repetitions of the focused fixture.

RED → GREEN

  • RED 9bfade4a6: extracted the implementation but left the new .c.h out of every unity group. uv run python -m unittest ci/test_build_groups.py failed test_every_implementation_file_is_in_a_group, naming libobs/obs-canvas-channel-setter.c.h.
  • GREEN 2d4cae72d: add the fragment to the sorted existing libobs.core-source group. The group already belongs to the core module and LIBOBS_SOURCES; no central module or source-set edit is needed.

Validation

  • Baseline at 40fe9a883: uv run python -m unittest ci/test_build_groups.py — 10 tests passed.
  • GREEN: env PYTHONPATH=ci uv run python -m unittest ci/test_build_groups.py ci/test_libobs_modules.py ci/test_libobs_source_set_fragments.py — 18 tests passed, 1 skipped.
  • git diff --check — passed.
  • Local native tests and full lint could not run because this host lacks gio-2.0.pc.
  • Hosted CI on current head c63423d1 passed Fast Gate, formatting, CI Gate, and both Rust Tier 2 Linux modes (tests OFF and ON, all).
  • The only failed check is the claim bot. The maintainer confirmed it cannot add a label/comment on fork PRs and will fix the bot separately; this is not a code or test failure.

@wesleyhawes wesleyhawes changed the title refactor: extract canvas channel setter [Engine] extract canvas channel setter Nov 23, 2026
@wesleyhawes
wesleyhawes marked this pull request as draft November 23, 2026 23:18
@wesleyhawes

Copy link
Copy Markdown
Contributor Author

GREEN commit 2d4cae72d registers the extracted fragment in the existing core-source group. The build-group, module, and source-fragment checks pass (18 tests, one skipped), and git diff --check passes.

This is intentionally still a draft: the current head has no hosted checks reported. Could a maintainer approve the fork workflow so Tier 2 runs against both the C reference and hybrid libobs, including the existing setter and caller-characterization tests? I’ll keep it draft until those native checks and symbol parity are green.

@vpacher

vpacher commented Nov 24, 2026

Copy link
Copy Markdown
Member

Thanks for your patience, wesleyhawes. CI is green now (17 pass, 0 fail).

Your PRs have been slow to get through, and that was not caused by your changes. External problems stopped them: a mirror timeout yesterday and an Ubuntu package update today. These problems also showed gaps in our CI, which we have fixed or are fixing:

I rebased this PR onto master to get the fix. The diff did not change.

The PR is still a draft. When you mark it ready, it goes into the merge queue. With these fixes, your next PRs should get through more quickly.

@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to In progress in obs-rust Multiview Nov 25, 2026
vpacher added a commit to obs-rust/.github that referenced this pull request Nov 25, 2026
* test: a fork PR's claim conflict is explained on the failed check (RED, Refs #34)

On a fork PR the pull_request token is read-only, so the claim bot's
label and comment fail with HTTP 403 (obs-rust/obs-studio#5547, Claim
bot runs 45288247847 and 45288308289). The check goes red and the
reasons appear nowhere the author can see. These tests expect the
reasons, with what to do, as one ::error:: annotation and in the job
step summary; a clean PR writes neither.

Fails now: on_pull_request prints no ::error:: line and writes no
step summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: explain a PR claim conflict on the failed check (Fixes #34)

On a fork PR the pull_request token is read-only, so the claim-conflict
label and the explanatory comment fail with HTTP 403 and the author sees
only a red check. on_pull_request now also reports every conflict on the
check itself: one ::error:: annotation and a "Claim conflict" section in
the job step summary, each with the reasons and how to fix the claim.
It needs no new token scope and does the same for same-repository PRs,
where the comment is still posted as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1795668679,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":85,"stamp":"24b624a6e75ce9ed20b6539f11b3e4ac","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668679,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":85,"stamp":"aeabc592edc883f622ef75a7a7d5dc76","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668679,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":85,"stamp":"013613a36f61ffbcef535c60d3622497","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668679,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":85,"stamp":"94d237d43589831f25ef8ed4f3de8c80","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"general/all/client-lint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"910d075a2bedbb36d99455d73865419c","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668679,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":85,"stamp":"eee940e9196db37b43be4d6fea79ffc1","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"5d187b656e9bec8c86432b90e3cbe146","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"74b90912410e46c131b2c9727110ab01","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"806102e71c520a0c4d1383bfe9300c4f","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"134a198e06f3b281d1a155e609a5f473","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"ecc25ffafc7e8a371e4e6895a8fd75b6","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"dc9e9e528fee3bb20df7d37d59df92b7","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"3286affe14355f502c99690f9fd64117","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"b7a3daa9948240ba458e1fbeaac62034","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"280af1d15745767e02d261b12ee62882","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"0259df9c2fed3afaaf2ab3bb5f6c5f0a","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"258fcd5fb1b3d92d53fa358ca6f7c505","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668593,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d3af9053f6275f3afd9f9b19b69627dddba0440be08f620ff9fb53e3e3405710","lane":"client-lint","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":16,"stamp":"6135e6eb876dd6f92845918b2ef26f1f","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}
Ci-Attestation: {"at":1795668959,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"1b624d1f254a3f298f7a194be540980aff628fa24cff84737084291e0e22af03","lane":"client-test-x86_64-unknown-linux-gnu","parents":["c0a5659e8d0ba1bfa08a78c14916abee9f5f5831"],"secs":278,"stamp":"42b7fea93a76a585a8051a8c1de33bb0","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"1a371e8bc576a915376715bf91ad39d30518b860","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/obs-canvas-channel-setter.c.h","libobs/obs-canvas.c.h"],"head":"76d044d43df4fdfb5b76b28526c0ead5b3d187da","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21503\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"9f46dd7203d871b1becc3cb6356c597f8f3673412ef548f38f0aaf821aa0431e","tree":"ebb43c2981773d175b82d1b7cfa5b33096a06cc4"}}
@zackees
zackees force-pushed the test/canvas-channel-extraction branch from 1e89afc to c63423d Compare November 26, 2026 04:56
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In progress to Needs fix in obs-rust Multiview Nov 27, 2026
@wesleyhawes
wesleyhawes marked this pull request as ready for review November 30, 2026 03:27
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to In review in obs-rust Multiview Nov 30, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Stalled in obs-rust Multiview Dec 3, 2026

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Coordinator review: verbatim extraction of obs_canvas_set_channel into libobs/obs-canvas-channel-setter.c.h registered in libobs.core-source+.h.c, with all 17 CI checks green. Approved the held Claim bot run to clear the stale claim check.

@zackees
zackees added this pull request to the merge queue Dec 3, 2026
Merged via the queue into obs-rust:master with commit 8eacf4f Dec 3, 2026
45 of 47 checks passed
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Stalled to Done in obs-rust Multiview Dec 4, 2026
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.

test: Extract and characterize canvas channel replacement before Rust swap

3 participants