promptdojo_
Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Final drill. Write safe_to_commit(status) that decides whether the current staged set is safe to commit. Rules:

  • If anything in status["staged"] starts with .env (any case), return ("block", "secrets staged").
  • If status["staged"] is empty, return ("block", "nothing staged").
  • Otherwise return ("ok", f"{n} files staged") where n is the count of staged files.

Then the script will exercise three cases and print each result.

Expected output:

ok: 2 files staged
block: secrets staged
block: nothing staged

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.