Skip to content

[BUGFIX] reusable container path quoting and visualization - #38

Merged
Yuki-Imajuku merged 2 commits into
mainfrom
fix/reusable-container-path-quoting
Jul 16, 2026
Merged

[BUGFIX] reusable container path quoting and visualization#38
Yuki-Imajuku merged 2 commits into
mainfrom
fix/reusable-container-path-quoting

Conversation

@Yuki-Imajuku

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 16, 2026 10:55
@Yuki-Imajuku
Yuki-Imajuku merged commit f7d9279 into main Jul 16, 2026
11 checks passed
@Yuki-Imajuku
Yuki-Imajuku deleted the fix/reusable-container-path-quoting branch July 16, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses path-safety issues when building shell commands and when generating per-case scratch/visualization files, particularly in reusable-container execution paths.

Changes:

  • Quote container file paths in run/judge/visualization command builders using shlex.quote to handle spaces and shell-sensitive characters.
  • Introduce build_case_file_prefix() to sanitize problem_id for per-case scratch filenames and use it throughout case_iter_func.
  • Adjust reusable-container visualization execution to run in /tmp and copy the generated visualization artifact from /tmp/{vis.html|out.svg}.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/ale_bench/tool_wrappers/case_runner.py Adds robust shell-quoting, sanitizes per-case filename prefixes, and updates reusable visualization execution to use /tmp.
tests/tool_wrappers/test_case_runner.py Expands tests to cover quoting behavior and adds unit tests for build_case_file_prefix().
tests/judge/test_reuse_containers.py Adds an integration test ensuring reusable containers handle unsafe problem_id characters successfully.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants