Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Fuzz every problem and language driver against the reference solutions

Aperta
#24 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
backend, ci-cd, testing

Direzione di ricerca

Start by reading backend/arena/runner/harness.js and the existing npm run validate:problems workflow to understand how reference solutions, problem metadata, and language drivers are run. Then inspect problem.function parameter types and the constraints referenced in issues #3 and #12. Done means the new seeded fuzzer supports the requested flags, shrinking, driver checks and CI run, and the stated validation commands pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

Every problem is validated by running its JavaScript and Python references against its hand-written tests (npm run validate:problems). That only proves the references agree on inputs someone thought of. Bugs hide at the edges: empty arrays, negative numbers, duplicate values, maximum sizes, unicode strings.

What to do

Add backend/arena/scripts/fuzz-problems.js:

  • Generate random inputs from each problem's parameter types in problem.function (all types listed in #3), respecting declared constraints where present (see #12).
  • Bias generation toward edge cases: empty, single element, all equal, sorted, reverse sorted, min and max values.
  • Run both reference solutions on each input and compare with the problem's compare mode.
  • On a mismatch, shrink the input to the smallest failing case and print it, ready to paste into the problem as a new test.
  • Run every language driver in backend/arena/runner/harness.js on a reference solution too, so driver bugs in serialization (big integers, floats, nested tuples, unicode) are caught. New language drivers (#1, #2, #3, #5, #6) should pass this before merging.
  • Deterministic by seed. --seed, --runs and --problem flags.

Definition of done

  • Runs over all 45 problems locally in a few minutes with CODEARENA_RUNNER=local.
  • Prove it works: break one reference on purpose and show the fuzzer finding and shrinking the failure in the pull request.
  • Any real disagreements found get their own issues or fixes, with the shrunk input added as a test.
  • A short fuzz run (fixed seed, small run count) added to CI.
  • npm test and node scripts/check-boundary.js pass.
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.