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

Problem studio: write and validate problems in the browser

Aperta
#28 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, nextjs, nodejs, python

Direzione di ricerca

Start by reading backend/arena/scripts/validate-problems.js and the existing files under backend/arena/problems/ to understand validation and the problem/solution formats. Then trace how development-only pages and API routes are registered, and check their production behavior. Done means the studio meets the listed feature requirements, round-trips all 45 problems without diffs, includes one new problem, and passes npm test and node scripts/check-boundary.js.

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

Descrizione

enhancement help wanted

Adding a problem means hand-writing JSON, two reference solutions and tests, then running npm run validate:problems and reading the output. It works, but it is the main friction for the contribution we want most.

Goal

A local problem studio, a page available only in development (/dev/problem-studio), for writing and validating a problem in one place.

Features

  • A form for title, difficulty, tags and the function signature, with types picked from the supported list (see #3).
  • A Markdown editor for the description with a live preview that matches how the problem renders in battles.
  • Editors for the JavaScript and Python references side by side.
  • A table of examples and tests. Adding a row type-checks the input against the signature.
  • "Validate" runs the same checks as backend/arena/scripts/validate-problems.js and shows failures inline on the offending row.
  • "Generate expected outputs" fills expected values from the JavaScript reference, then confirms the Python reference agrees.
  • "Save" writes backend/arena/problems/<id>.json and the two solution files in exactly the format a hand-written problem uses.

Rules

  • The page and its API routes refuse to load when NODE_ENV=production, with a test proving it.
  • Validation must call the existing validator, not a copy of it, so the two can never drift.

Definition of done

  • Write one real new problem with the studio and include it in the pull request.
  • Round trip: loading an existing problem into the studio and saving it produces no diff, for all 45 problems.
  • 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.