Skip to content

fix: make grading cross-platform - #79

Closed
paulcam206 wants to merge 2 commits into
openclaw:mainfrom
paulcam206:paulcam206-fix-cross-platform-graders
Closed

fix: make grading cross-platform#79
paulcam206 wants to merge 2 commits into
openclaw:mainfrom
paulcam206:paulcam206-fix-cross-platform-graders

Conversation

@paulcam206

Copy link
Copy Markdown

What does this PR do?

Normalizes completion golden-text line endings and makes trajectory shell classification recognize cross-platform read/search commands without treating harmless stderr redirects as mutations.

Why?

Windows CRLF output can fail against equivalent LF golden text, and common PowerShell/CMD inspection commands are misclassified. Read-only grep/find commands that discard or merge stderr are also incorrectly marked as edits.

Changes

  • Normalize CRLF and lone CR to LF for inline and file-backed expected stdout comparisons.
  • Classify Select-String, recursive/filtered Get-ChildItem, dir /s, Get-Content, and ordinary directory listings precisely.
  • Ignore stderr redirects to null or stdout during mutation detection while preserving real file redirects as mutations.
  • Add behavior tests for equivalent and different output, Windows command families, and both redirect outcomes.

Tests

  • python -m pytest -q passes locally
  • python -m pytest -q tests/test_environment.py tests/test_environment_files.py tests/test_trajectory.py
  • python -m ruff check clawbench app.py scripts tests passes locally

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paulcam206
paulcam206 requested a review from a team as a code owner August 31, 2026 17:29
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paulcam206 paulcam206 closed this Aug 31, 2026
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.

1 participant