Original projects · source, cases and reference
Find a programming task you can verify.
Choose one contract, predict a result and repair the supplied wrong implementation. Each project runs offline with Node.js 20+, uses invented inputs and includes fixed checks plus a reference implementation. No model API, package install or paid account is required.
There are 80 current exercises below. They are programming practice, not a list of provider courses or validated qualifications. For the first steps in reviewing a repository, use the repository-map starter.
JavaScript contracts
- Preserve zero when applying a default
Distinguish a missing value from an intentional zero.
- Check owned keys without accepting inherited names
Review a property lookup against the object ownership contract.
- Update nested state without changing its source
Find an aliasing defect hidden by an outer object copy.
- Reject partially numeric integer input
Check a parser that silently accepts trailing text.
- Keep the first record for each ID
Choose a stable record identity rather than object reference.
- Preserve explicit null in a settings patch
Separate deletion-like null data from an absent patch.
- Parse a boolean configuration value explicitly
Prevent the text false from enabling a feature.
- Keep an unknown action out of a destructive branch
Audit default behavior in an action dispatcher.
- Return the first duplicate from binary search
Retain a candidate while continuing to search left.
- Order dependencies and report a cycle
Replace an alphabetic list with dependency-aware planning.
Text and encoding
- Truncate text without splitting a Unicode code point
Find an invalid UTF-16 slice in a display helper.
- Normalize CRLF and standalone carriage returns
Repair line splitting for mixed text files.
- Parse a CSV row with quoted commas and escaped quotes
Follow parser state rather than splitting on punctuation.
- Escape HTML characters in the correct order
Inspect a text-to-HTML helper without rendering a page.
- Preserve repeated query-string parameters
Choose a representation that does not discard repeated filters.
- Build a predictable ASCII slug from a title
Separate punctuation folding from whitespace replacement.
- Redact bearer values in a fictional log
Preserve surrounding log text while removing every token-shaped value.
- Resolve all template placeholders and report missing fields
Inspect incomplete text substitution without executing templates.
- Extract complete fenced code blocks
Keep multiple blocks and ignore incomplete fences.
- Fit a text prefix into a UTF-8 byte budget
Compare storage bytes with displayed character count.
Data transformations
- Count missing categories without dropping records
Reconcile grouped counts with source-row count.
- Keep unmatched rows in a left join
Preserve the driving table while looking up optional reference data.
- Choose the latest record by revision number
Avoid treating arrival order as version order.
- Sum repeated cells while pivoting a table
Keep aggregation separate from last-value assignment.
- Calculate a rolling average with missing observations
Define the denominator for a partial observation window.
- Use total weight in a weighted mean
Check the denominator instead of averaging weighted products.
- Project allowed fields without losing null
Build a minimal output record from an explicit field list.
- Validate zero-valued required numeric fields
Separate field presence, type and allowed range.
- Keep every group on one side of a data split
Enforce group-level partitioning when several rows share an entity.
- Place boundary observations in histogram bins
Translate interval notation into exactly one destination per value.
Files and repository work
- Check a relative path against a workspace boundary
Resolve parent segments before accepting a file path.
- Classify extensions without treating dotfiles as suffixes
Inspect the final basename instead of splitting the whole path.
- Exclude generated directories by path segment
Keep source files whose names merely resemble a generated directory.
- Resolve a local module against declared files
Choose an exact file before an extension or index fallback.
- Replace a text line while preserving its final newline
Separate line content from file-termination policy.
- Apply a JSON merge patch with deletion
Implement the distinction between object recursion and value replacement.
- Expand configuration references and detect cycles
Resolve dependent settings without leaving a recursive reference hanging.
- Reject duplicate keys while parsing a tiny config
Make conflicting configuration explicit instead of keeping the last value.
- Find modules unreachable from declared entry points
Follow transitive imports instead of reporting every non-entry file.
- Order migrations by numeric prefix and detect duplicates
Review a file plan before any database command is allowed.
Time and intervals
- Detect overlap without counting adjacent bookings
Turn half-open interval notation into a scheduling predicate.
- Validate leap-day dates using the century rule
Catch a calendar rule that works for most but not all years.
- Reject rollover when parsing an ISO calendar date
Check a date parser against an exact input format.
- Convert fixed-offset clock minutes to UTC
Apply the sign of an offset and keep the day shift.
- Parse a duration without accepting trailing junk
Match a complete hours-and-minutes expression.
- Count weekdays in a UTC date range
Define whether endpoints participate in a date-range calculation.
- Check cache freshness with consistent time units
Review seconds-to-milliseconds conversion at expiration.
- Count events in an open-left time window
Choose a precise inclusion rule for rate-limit accounting.
- Stop a sequential plan when its deadline is exceeded
Account for cumulative work rather than each task independently.
- Merge overlapping intervals without losing contained spans
Carry the maximum end across a sorted interval sweep.
HTTP contracts
- Classify retryable HTTP statuses under a declared policy
Separate transient failures from client mistakes.
- Recognize JSON media types with parameters
Parse a media type before checking its structured suffix.
- Encode query values without confusing delimiters
Build a request query from key-value pairs.
- Evaluate an If-None-Match list for a GET
Check all validators instead of comparing the whole header.
- Normalize one inclusive byte range
Distinguish suffix and open-ended range forms.
- Detect a repeated pagination cursor before another request
Traverse a cursor plan with explicit end and cycle states.
- Parse cookie pairs without truncating equals signs
Split each pair at the first equals sign only.
- Validate a redirect against the parsed origin
Resolve relative references before comparing origins.
- Validate a JSON response envelope before using it
Check nested field types instead of trusting a successful parse.
- Merge headers using case-insensitive names
Prevent a lowercase override from creating two logical headers.
Reliability simulations
- Cap an exponential retry schedule
Inspect a pure timing plan without sending requests.
- Detect conflicting reuse of an idempotency key
Separate repeat delivery from a changed request payload.
- Simulate a bounded FIFO queue with explicit overflow
Preserve the waiting item when a queue is full.
- Measure peak concurrency from half-open jobs
Order simultaneous finishes before starts in a sweep.
- Advance a checkpoint only across contiguous successes
Avoid skipping an unfinished record in a recovery plan.
- Track consecutive failures before opening a circuit
Reset a failure streak after a successful result.
- Simulate trailing-edge debounce deterministically
Keep only the final event in each quiet-window cluster.
- Preserve FIFO order among equal-priority jobs
Review a scheduler whose tie rule reverses queued work.
- Resolve a simulated completion-versus-timeout race
Declare tie behavior instead of relying on callback order.
- Coalesce work only while a request is in flight
Release a deduplication slot when work completes.
Configuration reviews
- Redact nested secret fields in a JSON object
Apply a case-insensitive key policy through objects and arrays.
- Review credentialed CORS origin configuration
Identify a conflicting origin and credential combination.
- Inspect script-src for unsafe inline permission
Parse the effective script directive before flagging a token.
- Audit command permissions against exact executable names
Avoid approving a command because its text contains an allowed word.
- Inspect package lifecycle scripts before installation
Limit an audit to scripts that an install step can trigger.
- Check whether simple ignore rules protect environment files
Distinguish a broad environment pattern from one exact filename.
- Reject dangerous keys in a configuration patch
Walk nested data before merging it into an application object.
- Keep SQL values out of query text
Construct a parameterized lookup without interpolating user text.
- Compare declared exact dependency versions with a lock snapshot
Spot missing, changed and unexpected packages before installation.
- Choose the smallest permission scope that covers required files
Compare path segment boundaries instead of raw prefixes.