Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Handle non-UTF-8 program output in the native case runner

Closed Beginner friendly
#711 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, rust

Research direction

Start by examining the subprocess handling in tools/run_tests.py (classify_program) and tools/process_tree.py. The reproduction script shows how to trigger the UnicodeDecodeError. The goal is to modify the output decoding to handle arbitrary bytes gracefully, ensuring test reports are still generated. Run the provided reproduction to verify the fix.

Written by the indexing model from the issue text.

Description

bug ci good first issue needs testing

Problem

The native runner uses text-mode subprocess output without a robust decoding policy. A successful program that writes arbitrary bytes can raise UnicodeDecodeError, aborting the suite before its report is written.

Start in classify_program in tools/run_tests.py and its subprocess handling in tools/process_tree.py.

Reproduction

Run this focused runner reproduction from the repository root:

import sys
from tools import run_tests as r
metadata = r.parse_test_metadata("tests/cases/shared/test1.wave")
r.classify_program(
    "binary-output", "tests/cases/shared/test1.wave",
    [sys.executable, "-c", "import sys; sys.stdout.buffer.write(bytes([255]))"],
    metadata, None,
)

Save it as /tmp/repro.py, then run PYTHONPATH=. python3 /tmp/repro.py. Replace sys.stdout with sys.stderr to exercise the other stream.

Tested at 01955d715dda275de993948037091140bb859174 on Fedora Linux 43, x86_64, with Python 3.14.

The child exits 0, but either stream makes the runner raise:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

A Wave program writing a u8 value of 255 through io_write_all also compiles and exits 0 at O0/O2, emitting ff. This is an output-handling issue, separate from string escapes (#599) or manifest input decoding (#688).

Completion criteria

  • Define a robust decoding policy for runtime stdout/stderr and retain bounded JSON diagnostics.
  • Binary output on either stream does not raise or prevent report generation.
  • Nonzero exits and artifact failures are still classified correctly; ordinary UTF-8 output is preserved.
  • Keep source and manifest input decoding strict.

Difficulty: easy.

Dominant language
Rust
Stars
56
Forks
21
Avg merge
3h 24m
Merged PRs (30d)
52

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wavefnd/Wave

All issues in wavefnd/Wave

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.