# Reviewing a Change

URL: /code/learn/reviewing-a-change · Id: `page:code/learn/reviewing-a-change`

> Tutorial 11 of 12 takes Leaseline's edits through a Change, with tests, a scenario and an Evaluator on the notice, to review, merge and deploy.

Every edit to a definition is a [Change](/business/nouns/change), reviewed before it merges. Leaseline declares a `Lease` [Noun](/business/nouns/noun), and its notice is graded before any resident reads it.

## What you build
You add a scenario test and an [Evaluator](/business/nouns/evaluator) for the notice's tone, then review, merge and deploy the Change that holds tutorials 2 to 10.

## Steps
1. To test the whole path, write a scenario that walks it as a manager would:

   ```ts title="tests/first-renewal.test.ts"
   import { clock, expect, test, walk } from 'startup-builder/test'

   test('a lease ending in 60 days gets its notice', async () => {
     const manager = await walk('manager')
     await manager.subscribe('pro')
     await manager.import('mappings/rent-roll', 'fixtures/rent-roll.csv')
     await clock.advance('1 day')
     expect(await manager.inbox()).toContainMessage('Your lease at 4B ends')
   })
   ```

2. To grade the notice, write its rubric:

   ```ts title="evaluators/notice-tone.ts"
   import { evaluator } from 'startup-builder'

   export default evaluator({
     rubric: 'States the end date and the new rent, offers one clear next step, and makes no threat.',
     grade: async (notice: string, $) => $`Grade this renewal notice against the rubric: ${notice}`,
   })
   ```

3. To review the Change, run every test and Evaluator on its preview:

   ```bash
   npx startup-builder do Change.review --json '{"change":"change_3Ex8uVSOyQ"}'
   ```

4. To merge it into a new [Version](/business/nouns/version), call merge. A field changed on both sides sends it back to review:

   ```bash
   npx startup-builder do Change.merge --json '{"change":"change_3Ex8uVSOyQ"}'
   ```

5. To serve the new Version, deploy it:

   ```bash
   npx startup-builder do Version.deploy --json '{"version":"version_4HTEMs14G4"}'
   ```

## Result
The Change passed its [Verb](/business/nouns/verb) tests, the scenario and the tone Evaluator, merged into a new Version and serves at Leaseline's address. A bad merge is reverted by a new Change, and nothing is deleted. Checkpoint `leaseline@ch11` (status `planned`) adds `tests/` and `evaluators/`.

## Next steps
- [Tutorial 12](/code/learn/launching-leaseline) takes the [Startup](/business/nouns/startup) Live.
- [Changes and records](/code/platform/changes-and-records): how a Change merges, and what writes directly.