Skip to content

obs-output: Port service module lookup accessors (#3839) - #3844

Merged
zackees merged 6 commits into
masterfrom
port/service-module-lookup
Nov 7, 2026
Merged

zackees merged 6 commits into
masterfrom
port/service-module-lookup

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Fixes #3839

Ports the five private service module lookup accessors into obs-output: enabled/disabled list selection, next link, service count/id and load state. find_service, release/free and context/state/handlers remain unchanged and outside this slice.

The C bodies/signatures were extracted verbatim in 3ffee49 (byte comparison against master passed), then placed in a reference-only ported unity group. Production uses Rust; the C reference and Tier 3 oracle compile the original bodies. The only new C seam exposes both global roots together without selecting a list. C retains module/list ownership, synchronization and the unchanged private layout. Rust's mirror is checked against the real obs-internal.h; callback slots are layout placeholders and never invoked. Existing C tests, public headers and obs-websocket are unchanged. Five Rust shims are hidden through their unit manifest.

RED → GREEN

  • RED d1e98ff: focused output::service_module_lookup through soldr exited 101, 0 passed / 2 failed at the #3839 stubs. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-epTG6n.log.
  • GREEN: SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core output::service exited 0, 41 passed, including existing lifecycle/module lookup coverage and six new tests. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-vjBxbU.log.
  • Tier 1 covers empty/independent roots, next links, duplicate IDs, every defined load-state value and unchanged counts. Tier 3 checks size/alignment/every field offset of the module and service darray against the real header, fixed boundaries and bounded generated module lists against the original C. Metadata reads also accept a NULL service array with SIZE_MAX count without touching storage, as C does.
  • No intended differences on defined C inputs. NULL module handles and invalid service indexes are C UB and excluded. Handles refer to fully initialized libobs-created modules with initialized registered IDs; the caller retains ownership. No private layout changes.
  • Mutation: reversing enabled/disabled selection exited 101, 3 passed / 3 failed: Tier 1 selection, Tier 3 fixed boundaries and Tier 3 proptest. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-dmRGQk.log. Restored the exact GREEN core and reran the six new tests: exit 0, 6 passed, log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-xMSeHm.log. The mutation-generated independent-root seed is retained as a regression fixture.

Tier 2 and exports

Both the behavior-neutral extraction and GREEN passed unchanged test_service_lifecycle: 8/8 C-reference and 8/8 hybrid, no skips. Loaded libraries verified with ldd; 1,767 dynamic exports, identical. Extraction log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-6AImLr.log. GREEN log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-a6DSv1.log.

Focused reproducer: uv run --no-project /tmp/run-service-module-tier2.py. It uses the repository's docker_task_command, checkout-scoped warm volume/image/source mount and ZCCACHE_DISABLE=1; builds libobs libobs-c-reference test_service_lifecycle, compares nm -D --defined-only, verifies both loader paths, and runs the selected CTest under xvfb in OFF and ON modes. The first extraction attempt failed at Git's dubious-ownership check on the container mount /ro; retry supplies container-local safe.directory=/ro. Full Tier 2/full workspace suites were not run locally. Hosted required CI remains the merge gate.

Gates and cost

  • Staged source-group inventory: 10 passed. The initial unstaged run missed the new group; staged rerun passed.
  • Full repository lint with automatic formatting: formatters, Python checks and Clippy stages passed; exit 1 only at the documented soldr refusal to build the Dylint driver under clud (v6.2.0 lacks the pinned nightly driver). No workaround; hosted Fast Gate must run Dylint. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-i2Jy3c.log.
  • Read-only clud-review: one reviewer, clean, no actionable findings.
  • Hosted Windows Rust Tests found MSVC C4116/C2220 in the oracle layout query: expanding anonymous DARRAY(char *) inside offsetof/alignment parentheses. Fix e00f3b9 names that exact real C type with a typedef and queries the alias, with no warning suppression or production change. Failing job. Focused local rerun: exit 0, 6 passed, log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-kyNNZB.log; the changed C file also passes pinned clang-format. Hosted Windows validation must confirm the MSVC fix.
  • Test cost: 25 debug runs per new module with reduced parity: Tier 1 longest 0.01 s, peak 10,680 KiB RSS; Tier 3 longest 0.01 s, peak 17,692 KiB RSS. Reproducer: uv run --no-project /tmp/measure-service-module.py. Existing obs-tests-core category only, no new executable, no threads of their own.
  • Tier 4 / real app / features ledger: inapplicable, no protocol or user-visible behavior change. No local-gate attestation claimed.

Rebase after #3850

Rebased assigned head 8740896f6cd1e4fb09813442c9d21f5d711e56f5 onto master 52945776c92cb900c40303621766177bc98238d3; new head 0398c03ba1e6d16c361e7e00b34a37cf22a0f69a. Both service ports retain their modules, exports, test registrations and reference-only groups. git range-diff preserves all six commits with only conflict-context changes; lookup implementation/test/oracle files are byte-identical to the previous head, and state implementation/tests remain identical to master. No port behavior changes. Graph merged without conflicts or inventory edits.

  • Focused owning category: SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core output::service: exit 0, 52 passed, including six lookup and five state cases. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-BUQ7Zb.log.
  • uv run -m unittest ci.test_test_graph_sorted ci.test_native_test_graph_slices ci.test_native_b2_portability ci.test_build_groups: exit 0, 16 passed. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-658rks.log.
  • SOLDR_PORCELAIN=0 ./lint: exit 1, earlier stages passed; final log confirms only the documented soldr refusal to build the Dylint driver under clud (nightly-2026-05-28 unavailable pre-deployed). Hosted Fast Gate must validate Dylint. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-mBpCiA.log.
  • git diff --check clean. No new Tier 2, full workspace, Windows or macOS runs during this mechanical rebase; prior evidence above is retained. No local-gate attestation.

@zackees
zackees marked this pull request as ready for review November 7, 2026 08:09
@zackees
zackees enabled auto-merge November 7, 2026 08:09
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator / checkout-free merge chaperone. Verified GREEN head c43eb15 is ready with head-pinned auto-merge enabled. Local service tests, restored mutation tests, focused unchanged Tier 2 and identical exports are documented in the final body; hosted CI remains the gate. Slot obs-studio5 is being returned to detached origin/master.

@zackees
zackees force-pushed the port/service-module-lookup branch from e00f3b9 to 8740896 Compare November 7, 2026 08:41
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased e00f3b9 onto master after #3842; both registration sets and all six original commits preserved, including the MSVC typedef fix. New head 8740896 is pushed and head-pinned auto-merge confirmed. Revalidated: focused service suite 47 passed (exit 0), six module-lookup tests 6 passed (exit 0), unchanged test_service_lifecycle 8/8 against each library, verified loader paths and 1,767 identical exports; source-group inventory 10 passed. Lint passed earlier lanes and stopped only at the documented soldr Dylint-driver refusal. Current master merges cleanly via merge-tree. Existing chaperone retains the handoff.

@zackees
zackees force-pushed the port/service-module-lookup branch from 8740896 to 0398c03 Compare November 7, 2026 09:30
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator / existing pool chaperone. Replaced 8740896 with rebased head 0398c03 after #3850; exact force-with-lease used and pushed head verified. Both service slices retained; range-diff changes only conflict context. Focused service category 52 passed, graph/build inventory 16 passed. Lint passed earlier stages and stopped only at documented soldr Dylint-driver refusal under clud. Final PR body includes evidence and limits. Head-pinned auto-merge re-armed; retiring slot obs-studio4 without waiting for hosted CI.

@zackees
zackees force-pushed the port/service-module-lookup branch from 0398c03 to 542dbb5 Compare November 7, 2026 10:04
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased assigned head 0398c03ba1e6d16c361e7e00b34a37cf22a0f69a onto master d5428c98d093c45e531a303d57e5d2f5046172e1; new head 542dbb5f2d9ab4c373d6d57f6d5c42e492dd7e1d. Retained both README records; all modules, exports and test registrations preserved. Range-diff: five commits identical, GREEN differs only in README context; all obs-output source/tests byte-identical to the replaced head. Graph/build inventory: 16 passed, exit 0 (local-test-BU1aKc.log). git diff --check clean.

Requested sibling check: git merge-tree --write-tree --name-only bd8e9879c70e044b225f082cfd90ef61165f11c0 542dbb5f2d9ab4c373d6d57f6d5c42e492dd7e1d exits 1, with only rust/README.md conflicted (tree 6076b95912e58e6d591e1c11ad859b316a3c52c9). Registrations merge cleanly. Resolve after one sibling merges; no stacking or behavior changes introduced.

This assignment ran SOLDR_PORCELAIN=0 ./lint on #3858: earlier formatting, Python and workspace/feature Clippy lanes passed; only documented soldr Dylint-driver build refusal under clud (exit 1, local-test-s7DvSb.log). Full unittest/Tier 2/native runtime suites not repeated; hosted Fast Gate remains authoritative. Existing pool chaperone retains the handoff.

Focused owning category output::service: 52 passed, exit 0 (local-test-V36LLF.log); service fixtures emit expected negative-path logs. Exact force-with-lease push verified remotely; head-pinned auto-merge re-armed.

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.

rust: Port obs-service module lookup accessors to obs-output

1 participant