Skip to content

test: carry tokenizer oracle exclusions into declaration parity - #1542

Merged
zackees merged 2 commits into
masterfrom
test/decl-oracle-exclusion
Oct 20, 2026
Merged

zackees merged 2 commits into
masterfrom
test/decl-oracle-exclusion

Conversation

@zackees

@zackees zackees commented Oct 20, 2026

Copy link
Copy Markdown
Member

Location

rust/obs-callback/tests/callback/decl_parity.rs:excluded.

Class

Differential test input filtering error.

How it is reached

Fast Gate on #1530 failed random_pieces_match_oracle. The generated declaration ends in a line splice inside a comment. This is an existing documented oracle exclusion in rust/obs-util/tests/config/cf_tokenizer_parity.rs, but the declaration tests that call the tokenizer did not carry it forward. See run 39467032007, job 118781234889.

Proposed fix and failing test

Add focused assertions for the declaration filter, then exclude exactly terminal line splices within comment or string tokens. Keep ordinary trailing splices and unterminated comments without a splice covered. No production parser changes or C test changes.

Decisions

A separate prerequisite for the individual bug fixes split from #1462. Reuse the already documented tokenizer oracle limitation rather than changing Rust to match an undefined C result.

Validation: RED 3dc17a676 fails the new filter regression; GREEN passes the declaration tests.

ng daemon generation is launched behind it.
soldr: to retire it deliberately, run: soldr broker remove
# t0=1792517963.680
    0.15    Compiling obs-data v0.1.0 (/home/niteris/.clud/worktrees/obs-studio-wt-ten-oracle/rust/obs-data)
    1.05     Finished `test` profile [unoptimized] target(s) in 1.04s
    1.06      Running tests/core.rs (target/debug/deps/obs_tests_core-4ecab2d5d129642a)

running 9 tests
test callback::decl_parity::decl_cases_match_oracle ... ok
test callback::decl_parity::decl_exclusions_are_the_documented_ones ... ok
test callback::decl_parity::decl_log_capture_keeps_only_its_own_thread ... warning: Errors/warnings for 'other thread':


ok
test callback::decl_parity::random_bytes_match_oracle ... ok
test callback::decl_parity::random_declarations_match_oracle ...     1.10 soldr[cache] obs_tests_core [NC]
ok
test callback::decl_parity::random_pieces_match_oracle ... ok
test callback::decl_parity::terminal_splices_exclude_only_comment_and_string_tokens ... ok
test callback::layout::decl_layout_matches_c_header ... ok
test callback::proc_parity::invalid_decl_test ... ok

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 192 filtered out; finished in 0.09s


This changes only Rust differential test filtering. Existing C tests and production code stay unchanged.

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