Skip to content

Guard against Array status in test results#8637

Merged
iHiD merged 1 commit into
mainfrom
fix/8634
Feb 13, 2026
Merged

Guard against Array status in test results#8637
iHiD merged 1 commit into
mainfrom
fix/8634

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 13, 2026

Closes #8634
Closes #8635

Summary

  • Tooling runners can return status as an Array (e.g., ["pass"]) inside individual test result objects, causing NoMethodError: undefined method 'to_sym' for an instance of Array when serializing
  • Applied Array().first unwrap on test[:status] in TestResult#to_h, matching the existing pattern used for the version field (PR Handle Array version in test run raw_results #8618)
  • Added test for array status in test results

Test plan

  • bundle exec rails test test/models/submission/test_run_test.rb — 17 tests, 0 failures
  • New test verifies ['pass'] is correctly unwrapped to :pass

🤖 Generated with Claude Code

Tooling runners can return `status` as an Array (e.g., `["pass"]`)
inside individual test result objects. Use `Array().first` to safely
unwrap, matching the existing pattern for the `version` field.

Closes #8634
Closes #8635

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit 479c27e into main Feb 13, 2026
41 checks passed
@iHiD iHiD deleted the fix/8634 branch February 13, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant