Skip to content

meta: Rust port unit-testing roadmap, phases 2–5 #4

Open
8 of 8 issues completed
Open

Description

@zackees

Context

Phase 1 (bitstream, #1 / #3) established the four-tier testing policy (docs/rust-port/testing-policy.md), the Cargo workspace, the C oracle crate, ENABLE_RUST_LIBOBS, and the Docker Tier 2 harness. This meta issue tracks the next four phases. Each phase is a sub-issue; phases run in order, and later phases depend on infrastructure from Phase 2.

Phase Scope Main new problem it solves
2 Finish the existing cmocka suite (os_path, serializer, darray) + CI + Windows/macOS partial-file ports, header-inline code, cross-platform Tier 2
3 Pure leaf utilities with no tests (crc32, utf8, dstr, lexers, text-lookup, base, bmem) characterization tests written in C before porting
4 Stateful / I/O / platform utilities (serializers to files, config-file, platform*, threading, pipe, task, profiler) deterministic filesystem/thread tests on three OSes
5 Beyond util: graphics math, media-io, AVC/HEVC/AV1 parsers, obs-websocket Tier 4 fuzz-based parity and black-box protocol tests

Decisions

  • Four phases ordered by testing difficulty, not code size: each phase introduces one new testing problem and solves it before the next.
  • Policy changes ship as their own PR in Phase 2 (function extraction before partial-file ports, header-inline exemption, characterization-tests-first), so later phases follow a settled policy.
  • CI wiring lives in Phase 2 and hooks into existing workflows only. Per repo rules, no new workflow files are added without explicit sign-off.

Open questions

  • Approval to add cargo test + ENABLE_UNIT_TESTS/ENABLE_RUST_LIBOBS=ON jobs to the existing build-project.yaml (Phase 2 blocker for cross-platform Tier 2).

Sub-issues

Sub-issues

8 of 8 Issues completed
Loading 8 sub-issues

Activity

  1. added
    enhancement
    on Oct 8, 2026
  2. zackees commented on Oct 8, 2026

    @zackees
    MemberAuthor
    {
     "schema": "grind-plan/v1",
     "run_id": "7c2e",
     "meta": 4,
     "original": null,
     "repo": "obs-rust/obs-studio",
     "main": "master",
     "mode": "sequential",
     "preflight": "handled",
     "structure": "simple",
     "stages": [
      {
       "stage": "bugs",
       "base": "master",
       "children": []
      },
      {
       "stage": "feature",
       "group": "rust-port-testing-roadmap",
       "sub_meta": null,
       "branch": "grind/meta-4-7c2e",
       "base": "grind/meta-4-7c2e",
       "children": [
        5,
        6,
        7,
        8
       ],
       "depends_on_bugs": {}
      }
     ],
     "deferred_groups": [],
     "feature_merge": "auto",
     "problem_reporting": "issue",
     "models": {
      "worker": "sonnet"
     },
     "ci": false,
     "scripts": null,
     "rules": {
      "stuck_bug": "block_dependents_only",
      "no_overlap": "bugs_only",
      "ci_workflow_edits": "User approved adding Rust (soldr cargo test --workspace) and cmocka ENABLE_RUST_LIBOBS OFF/ON jobs to the EXISTING .github/workflows/build-project.yaml only. No new workflow files.",
      "testing_policy": "docs/rust-port/testing-policy.md is mandatory for every port; AGENTS.md applies; use soldr cargo; RED->GREEN per port; Tier 2 via rust/tools/linux-validate/run.sh"
     }
    }
  3. added a commit that references this issue on Oct 8, 2026
  4. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor

    Goals of this meta are landing on feature branch grind/meta-4-7c2e; they close when feature PR #9 merges into master.

  5. added a commit that references this issue on Oct 9, 2026
  6. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor
    {
     "schema": "grind-plan/v1",
     "run_id": "9b41",
     "meta": 4,
     "original": null,
     "repo": "obs-rust/obs-studio",
     "main": "master",
     "mode": "sequential",
     "preflight": "handled",
     "structure": "simple",
     "stages": [
      {
       "stage": "bugs",
       "base": "master",
       "children": []
      },
      {
       "stage": "feature",
       "group": "rust-port-testing-roadmap",
       "sub_meta": null,
       "branch": "grind/meta-4-9b41",
       "base": "grind/meta-4-9b41",
       "children": [
        6,
        7,
        8
       ],
       "depends_on_bugs": {}
      }
     ],
     "deferred_groups": [],
     "feature_merge": "auto",
     "problem_reporting": "issue",
     "models": {
      "worker": "sonnet"
     },
     "ci": false,
     "scripts": {
      "lint": "./lint",
      "test": "./unittest"
     },
     "rules": {
      "stuck_bug": "block_dependents_only",
      "no_overlap": "bugs_only",
      "testing_policy": "docs/rust-port/testing-policy.md and AGENTS.md are mandatory; use soldr cargo; RED->GREEN per port; Tier 2 via ./unittest (rust/tools/linux-validate/run.sh).",
      "local_gate": "Before every push the integrator runs ./lint and ./unittest, then stamps with `uvx --from git+https://github.com/zackees/ci.yml@1a970f01574447d681571ff3d0b8de56cb983dcc ci-lint local-gate run --repo .` (attested Linux test jobs are skipped in CI). In a fresh worktree, first run `git submodule update --init --depth 1 plugins/obs-browser plugins/obs-websocket` (issue #32).",
      "ci": "pr-pull.yaml runs on PRs into grind/** branches. PRs touching only rust/, test/cmocka/, libobs/cmake/rust*, the local gate or docs skip the full OBS builds; native changes run them (~12 min warm). Wait on CI only with `clud tool run github/pr_merge_watch.py <PR>`; never hand-written sleep/until-grep loops.",
      "ci_workflow_edits": "Edits to existing .github/workflows files are allowed; no new workflow files.",
      "scope_note": "Each phase issue is large. Land each phase as a series of focused port PRs into the feature branch; a phase is done when its acceptance criteria are met. Phase 5 (#8) excludes the get_ue_golomb UB (fixed in #11/#17)."
     }
    }
  7. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor

    Goals for this meta are landing on feature branch grind/meta-4-9b41; feature PR #33.

  8. 6 remaining items

  9. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor

    Reopened: grind run 9b41 landed phases 3–5 partially (feature PR #33). The remaining work is tracked in the open sub-issues #43, #44 and #45.

  10. reopened this on Oct 9, 2026
  11. added a commit that references this issue on Oct 9, 2026
  12. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor
    {
     "schema": "grind-plan/v1",
     "run_id": "c7d3",
     "meta": 4,
     "original": null,
     "repo": "obs-rust/obs-studio",
     "main": "master",
     "mode": "sequential",
     "preflight": "handled",
     "structure": "simple",
     "stages": [
      {
       "stage": "bugs",
       "base": "master",
       "children": []
      },
      {
       "stage": "feature",
       "group": "rust-port-remaining",
       "sub_meta": null,
       "branch": "grind/meta-4-c7d3",
       "base": "grind/meta-4-c7d3",
       "children": [
        43,
        44,
        45
       ],
       "depends_on_bugs": {}
      }
     ],
     "deferred_groups": [],
     "feature_merge": "auto",
     "problem_reporting": "issue",
     "models": {
      "worker": "sonnet"
     },
     "ci": false,
     "scripts": {
      "lint": "./lint",
      "test": "./unittest"
     },
     "rules": {
      "stuck_bug": "block_dependents_only",
      "no_overlap": "bugs_only",
      "testing_policy": "docs/rust-port/testing-policy.md and AGENTS.md are mandatory; use soldr cargo; RED to GREEN per port; the characterization cmocka tests already merged are the Tier 2 checks.",
      "local_gate": "Before every push: ./lint and ./unittest, then stamp with uvx --from git+https://github.com/zackees/ci.yml@1a970f01574447d681571ff3d0b8de56cb983dcc ci-lint local-gate run --repo .. In a fresh worktree first run git submodule update --init --depth 1 plugins/obs-browser plugins/obs-websocket, #32.",
      "ci": "Always pass -R obs-rust/obs-studio to gh, an upstream remote points at obsproject/obs-studio. Wait on CI only with clud tool run github/pr_merge_watch.py PR --timeout 3300; the Flatpak job can take ~12 min. Never hand-written sleep/until-grep loops.",
      "closing": "Only put Closes #N in the feature PR when EVERY checklist item of #N is done and verified. Otherwise use Refs #N, tick the completed items in the body of #N, and list what remains. Split each goal into several focused port PRs if needed.",
      "bugs": "The dstr port must not reproduce #46, dstr_insert_ch overflow and must record the #47, dstr_replace empty find decision; the lexer ports must resolve #48 per its options. Fix the C side with RED tests where the issue says so.",
      "ci_workflow_edits": "Edits to existing .github/workflows files are allowed; no new workflow files."
     }
    }
  13. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor
  14. added a commit that references this issue on Oct 10, 2026
  15. zackees commented on Oct 10, 2026

    @zackees
    MemberAuthor

    Roadmap update (2026-10-10), after a second-opinion review. Most ported code has only ever run inside unit-test binaries (no CI or release builds the app with ENABLE_RUST_LIBOBS=ON), so the next round puts trustworthy gating and running Rust in the real app ahead of more leaf ports.

    Stage 0: trustworthy gate, fewer conflicts, coordination

    Stage 1: Rust in the real app

    Stage 2: capped ports (about 6 open at a time; claim with a comment + the claimed label)

    Stage 3: design

    Status: on Linux/macOS 28 libobs C files are replaced by Rust when ON (plus header-inline ports); Phase 3 is done except cf-lexer/cf-parser (#43).

  16. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Triage (2026-10-30): this remains an active roadmap tracker, not a standalone code defect. It is not ready to close, and a catch-all Fixes #4 PR would incorrectly claim the remaining units are complete.

    Current master still has open, scoped follow-ups:

    Each must be claimed and completed as its own RED-to-GREEN port/test PR under the testing policy. Current code has no single #4-specific failing test or root cause to fix; closing this meta would erase the remaining-work signal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions