Skip to content

testing: smoke runner decodes Blender output with the locale codec and reruns reuse stale status/output files #403

Closed

Description

@TMHSDigital

Evidence

  • Encoding. tests/smoke/run_example.py:~58 uses text=True with no encoding, so on Windows Blender's UTF-8 output is decoded as cp1252.
    • Today's — and → decode without error but come out garbled.
    • A UTF-8 character containing the bytes 0x81, 0x8D, 0x8F, 0x90 or 0x9D (e.g. ”, ←, Í, or a non-ASCII user path) raises UnicodeDecodeError in the read loop. The runner then crashes without a record and leaves Blender running.
  • Stale state on local reruns.
    • run_catalog.py appends to the --status JSONL and never truncates it, so old PASS and FAIL records accumulate.
    • It never deletes expect_file (e.g. $OUT/swatch.png) before a run, so a stale render can satisfy the check.
    • CI is unaffected (fresh RUNNER_TEMP); local and Windows contributors are not.

Suggested approach

  • Pass encoding="utf-8", errors="replace" to Popen.
  • Truncate the status file at catalog start (or namespace it per run).
  • Delete each expect_file before its row runs.

Done when

A decode test with b"\xe2\x80\x9d" passes, and the catalog truncates its status file and pre-deletes expected outputs.

Activity

  1. added
    testingTest harness and CI test coverage
    dxDeveloper/contributor experience
    on Oct 4, 2026
  2. TMHSDigital commented on Oct 5, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in #416 (merged):

    • Encoding: run_example.py now decodes Blender output as UTF-8 with replacement. A b'\xe2\x80\x9d' regression test in test_harness.py covers it, falsified once with the strict cp1252 decode restored.
    • Stale outputs: run_catalog.py deletes each row's expect_file before running it, with a test.

    Not done, deliberately: truncating --status at catalog start. CI's canary and template smoke steps append to the same JSONL before run_catalog.py runs, so truncating there would erase their records. CI is unaffected by stale records (fresh RUNNER_TEMP). For local reruns, point --status / BDT_SMOKE_STATUS at a fresh path.

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

    dxDeveloper/contributor experiencepriority: lowNice to havetestingTest harness and CI test coverage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions