Skip to content

bug: Oracle stand-ins in test_stubs.c can diverge from libobs #145

Closed

Description

@zackees

Tier 3 parity is only as good as the oracle's environment. rust/obs-c-oracle/oracle/test_stubs.c (and the *_host.c files) re-implement libobs functions such as os_fread_utf8, os_breakpoint, os_oom and the os_* file helpers. When a stand-in differs from libobs, parity certifies the difference: #79 and #84 were exactly this, and #77 shipped a second os_fread_utf8 that returned the size where libobs returns 0.

Work:

Activity

  1. added
    bug
    quality
    on Oct 10, 2026
  2. zackees commented on Oct 13, 2026

    @zackees
    MemberAuthor

    Claiming a slice of #145: a ci/ check that every oracle stand-in tagged with its libobs source (/* platform.c */ etc.) is identical to the real function, so copies can't silently drift (the #77/#79/#84 class). Untagged or intentionally different stand-ins get listed explicitly, with the reason. Compiling the real functions in place of copies stays open for later slices.

  3. chriscoveries commented on Oct 13, 2026

    @chriscoveries
    Contributor

    Claiming the next slice of #145, complementary to the drift check above:

    1. Compile the real util/platform.c (plus util/time.c) into the oracle in place of the verbatim copies. The few stand-ins that have to stay keep a comment naming their libobs source, so your check covers them.
    2. Make the empty os_breakpoint / os_oom stand-ins abort, so a parity test can't pass on a path where libobs traps.
    3. That also removes the one live drift: the oracle's os_fread_utf8 uses ftell and memcmp where platform.c uses os_ftelli64 and astrcmp_n.

    PR follows. If your check lands first I'll rebase onto it.

  4. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    Triage: being worked in slices (drift check, compiling the real platform.c into the oracle), so labelling it tracker. Slices should be filed as sub-issues.

  5. added
    tracker
    on Oct 25, 2026
  6. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Triage: already fixed on current origin/master (6c974e6). rust/obs-c-oracle/oracle/test_stubs.c is gone; oracle/platform.c:1-11 now compiles the unmodified libobs platform sources rather than hand copies. The remaining host helpers are covered by ci/test_oracle_standins.py:62-79, which compares every overlapping *_host.c definition to libobs; uv run --script ci/test_oracle_standins.py passes (2 tests). oracle/platform_host.c:20-54 also makes the former empty os_breakpoint/os_oom stand-ins abort loudly. Closing as resolved.

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

    bugqualitytracker

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions