Skip to content

bug: obs-callback decl parser logs nothing on an unterminated comment where C logs Unexpected EOF #1549

Closed

Description

@zackees

callback::decl_parity (Fast Gate) compares the Rust callback declaration parser (rust/obs-callback, decl) with the C oracle on random inputs, and intermittently fails on PRs that don't touch it.

Failing inputs

Both have an unterminated /* comment and end in a backslash-newline. C logs an error at level 200 (LOG_ERROR); Rust returns the same ok: false with no log.

  1. random_declarations_match_oracle, run 39351750345 (PR docs: describe a null item the way the code stores it (Refs #1452) #1470):
    • input "foo get5out/*/*abreturn\\\n"
    • C log: declaration (1, 1): Expected 'return type', declaration (2, 10): Expected '(', declaration (2, 10): Unexpected EOF
  2. random_pieces_match_oracle, run 39467032007 attempt 1 (PR obs-data: preserve empty item types for defaults #1530):
    • input "void f/*stringfptr)b{b{b\r\n*float}voidfbool{float\\\n"
    • C log: declaration (3, 4): Unexpected EOF

Rust side in both: Outcome { ok: false, name: None, ..., log: "", level: 0 }.

Expected

Rust logs the same errors at the same level as C. Most likely the Rust lexer or parser stops on an unterminated block comment (or a trailing line continuation) without reporting Unexpected EOF and the errors before it.

Asks

  • Add both inputs as fixed regression cases in decl_parity (RED), then fix the Rust parser (GREEN).
  • The random tests should print or persist their seed so a failure can be replayed.

Until this is fixed, unrelated PRs fail the Fast Gate at random and need a re-run.

Activity

  1. zackees commented on Oct 20, 2026

    @zackees
    MemberAuthor

    Claiming: Rust callback declaration parser parity fix. 1. Add both reported inputs as fixed differential regressions and capture a local RED result. 2. Match the C oracle error behavior, then run targeted Rust tests and lint. 3. Open a PR against master with separate RED and GREEN commits. First draft PR today.

  2. added
    claimed
    on Oct 20, 2026
  3. zackees commented on Oct 20, 2026

    @zackees
    MemberAuthor

    The two reported failures are terminal line splices inside unterminated block comments. #1542 merged the documented tokenizer oracle exclusion into decl_parity and added focused filter tests, resolving the intermittent differential mismatch. Releasing this claim because no parser change is appropriate for this excluded C-oracle case. Random-seed replay is a separate test-harness improvement if still desired.

  4. zackees commented on Oct 20, 2026

    @zackees
    MemberAuthor

    Releasing #1549. The reported oracle mismatch is covered by merged #1542; I am moving to an unclaimed migration task.

  5. removed
    claimed
    on Oct 20, 2026
  6. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Additional occurrence in full qualification 39824614077/job119987430792 at frozen d511b0a (Flatpak recipe/fixture/docs change, callback Rust code unchanged). callback::decl_parity::random_pieces_match_oracle:664passed/1failed. Proptest persisted cc dc2f39db6996d9551caa8f60e5275fdd120fff103d9e971370dbfab56afb2ea6. Input contains an unterminated block comment and terminal backslash-newline, matching this issue's failure shape. Rust returns false/no log/level0; C returns false with Expected '(' and Expected ')' diagnostics/level200. Related oracle-exclusion ownership remains #1541.

    No rerun, exclusions, parser changes or C-test modifications made under #1760; preserving this failed Windows job and cost while independent Flatpak consumer/runtime qualification continues.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions