Skip to content

fix: require structured challenge test results#201

Open
saurabhhhcodes wants to merge 1 commit into
ThePlator:mainfrom
saurabhhhcodes:fix/structured-challenge-results-194
Open

fix: require structured challenge test results#201
saurabhhhcodes wants to merge 1 commit into
ThePlator:mainfrom
saurabhhhcodes:fix/structured-challenge-results-194

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

📌 Description

  • Type: Security / Bug Fix / Tests
  • Summary: Challenge submissions now derive correctness from structured judge results instead of trusting stdout text containing Passed. JavaScript submissions with problem test cases get an internal per-case judge marker, all expected cases must report passed: true, and failed case details are stored with the submission.

🔗 Related Issues

✅ Checklist

  • Code compiles and runs clean
  • Added/Updated documentation
  • Added/Updated tests
  • Linted and formatted code
  • Related issue linked
  • No sensitive data added

📸 Screenshots (if applicable)

Not applicable; backend challenge evaluation fix.

💬 Notes for Reviewers

The regression test covers the exploit case directly: stdout can contain Passed, but the submission remains incorrect unless the structured judge markers cover every configured test case and the execution exits cleanly.

🧪 How to Test This PR

cd backend
npm install --ignore-scripts
node --check controllers/challenge.controller.js
node --check models/ChallengeRoom.js
node --check tests/challenge.test.js
npm test -- challenge.test.js
npm test
cd ..
git diff --check

Local result: challenge suite passed with 8 tests; full backend suite passed with 13 files and 75 tests.

📦 Tech Stack

  • Node.js
  • Express
  • MongoDB
  • Vitest

@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

@saurabhhhcodes is attempting to deploy a commit to the Sameer's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added level:advanced Advanced level difficulty quality:clean Clean code quality type:bug Bug fix gssoc:approved Approved for GirlScript Summer of Code labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for GirlScript Summer of Code level:advanced Advanced level difficulty quality:clean Clean code quality type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Challenge correctness is derived from fragile output text

1 participant