Lock In Lab Intern, rank 1 of 9

BU-2choreSecond of 3 Builder tickets

Tests the agent can't skip

Takes
30 min in 3 steps
Checked
19 Nov 2026
min

Your estimate is optional. Your review compares it with how long it took; nothing is scored.

"Done" from an agent means "I think it's done". You'll put a test suite between the agent and done, written from the spec, and make the rule stick: tests run before the agent reports success, and a failing test is never fixed by editing the test.

You'll need Any project with logic worth testing (the tip splitter works). Node.js for the example; any test runner is fine. Prices checked this month are on Tools.

Tests from the spec, written first

Step 1 of 3, about 15 min

Read the tests. Each spec example should appear as-is. Add one edge case of your own that the spec mentions.

Paste this to your agent
Write tests for the examples in SPEC.md using node:test. Don't change any app code. Some may fail; tell me which.

The part of a video worth watching for this step

YouTube, AI Engineer. Published Nov 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

Break it on purpose

Step 2 of 3, about 5 min

Change the rounding in the app code by hand (round down instead of up). Run the tests: at least one must fail. If none does, your tests don't test what matters. Undo your change.

The part of a video worth watching for this step

YouTube, AI Engineer. Published Nov 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

Make the rule stick

Step 3 of 3, about 10 min

Add to AGENTS.md:

Before saying done: run `npm test` and paste the summary line.
Never edit or delete a test to make it pass. If a test looks wrong, stop and ask.

Then ask the agent for a small change and see whether it runs the tests unprompted.

The part of a video worth watching for this step

YouTube, Sean Kochel. Published May 2026.Checked 19 Nov 2026

Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.

the usual mistake

The agent writing its own tests for its own code. It tests what it already thought of. Write the cases from the spec, or have a different agent write them. It happened to us in INC-01, "The bot that graded its own homework".

Check and ship

The whole ticket
Run, then break the rounding by hand and run again:
npm test

It passes when Green on the real code, red with your deliberate bug.

  • At least five tests, three of them copied from the spec's examples.
  • npm test (or equivalent) fails when you break the logic by hand.
  • AGENTS.md says tests must pass before 'done' and tests can't be changed to make them pass without asking.

No server checks your work in this version: you mark it, and your review says "Checked by you". Graded checks are planned for Plus.

Next: BU-3 Keep keys out of git, out of the browser, out of the chat

What do you see?

Pick the closest one. Each goes to what to try first and the incident it looks like.