All challenges

Git · medium

Half-deleted

#15

Situation

While preparing the import-service cleanup PR, you removed two files together: the legacy CSV parser and its test fixture. Both deletions are staged and ready to ship. Then a search through the import pipeline stopped you: production still calls the parser every night. The fixture is dead; the parser is not.

Each deletion lives in two places at once: the staging area (ready to ship) and the working tree (gone from disk). For the parser you need both layers right again; the fixture stays ready to ship.

Objective

Undo only the parser's deletion, completely: src/legacy/parser.ts back on disk exactly as committed. The fixture's deletion stays staged, ready to ship, and history must not move.

The repo at start

repo/
├── src/
│   ├── app.ts
│   └── legacy/
│       └── parser.ts       (deletion staged - undo this one)
└── tests/
    └── legacy-rows.csv     (deletion staged - this one is right)

Checks you will turn green

  • parser.ts is back, exactly as committed
  • The fixture's deletion stays staged, ready to ship
  • History untouched on main

Concepts

indexstagingdeletedpathspec

Play it in your terminal

With sharpen installed, this command opens exactly this challenge in your local arena:

sharpen 15

First time? The full install is right below.

How to play

  1. 1 Install Claude Code if you do not have it yet: claude.com/claude-code
  2. 2 Install sharpen from npm:
    npm install -g @juanwmedia/sharpen
  3. 3 Then launch it; the arena opens in your browser:
    sharpen 15
  4. or Or try it without installing anything:
    npx @juanwmedia/sharpen 15
  5. 4 And to update when a new version ships:
    sharpen update