Change Impact
Make the change. Know the impact.

Try the review
A small request with more than one moving part.
Request handler
Will the new field reach the update function?
The route passes an explicit field list.
Review action
Add preferredName to request validation and the route mapping.
src/routes/profile.ts · lines 31–35
router.patch('/customers/:id', async (req) => {
return updateCustomer(req.params.id, {
displayName: req.body.displayName
});
});Implementation
Does the change recorder track this field?
The recorder has its own list of fields.
Review action
Add preferredName to trackedFields and inspect the caller of the recorder.
src/history.ts · lines 8–15
const trackedFields = ['displayName'];
async function recordProfileChange(before, after) {
for (const field of trackedFields) {
if (before[field] !== after[field]) {
await history.insert(after.id, field, before[field], after[field]);
}
}
}Table definition
Can the history table hold the new value?
Search your imported database schema for the history table. It stores field names and values, rather than one column per profile field.
Review action
Check value types and constraints before deciding whether a migration is needed.
db/customer_history.sql · lines 1–7
CREATE TABLE customer_history ( customer_id bigint NOT NULL, field_name text NOT NULL, old_value text, new_value text, changed_at timestamptz NOT NULL );
Requirement
What behavior must this change preserve?
The request includes history, not just a successful save. Trellis links a requirement to code when the requirement names that code.
Review action
Keep the old value, new value and timestamp in the recorded change.
Profile change history · Requirements
Customers need to see the previous value, the new value and when each account change happened. Every saved profile-field change must be recorded. Implementation reference: `src/history.ts`
Tests
Would a passing test catch a missing history entry?
A saved-profile assertion alone does not check history.
Review action
Add a test for both the saved value and the recorded change.
tests/profile-history.test.ts · illustrative excerpt
await updateCustomer(id, { preferredName: 'Alex' });
expect((await customers.get(id)).preferredName).toBe('Alex');
// Also check the history entry:
expect(await history.latest(id)).toMatchObject({
field_name: 'preferredName',
old_value: 'Alexander',
new_value: 'Alex'
});The conversation gets more specific
“It saves correctly” is only the first check.
- The requestSave a preferred name
- The dependencyRecord the change
- The reasonKeep account history
The request handler can accept a new field while the history recorder misses it. Connected source context gives your team another place to look.
What this example adds to the review
Leave the review knowing what to check.
Add preferredName to request validation and the route mapping.
Request handler · src/routes/profile.ts · lines 31–35
Add preferredName to trackedFields and inspect the caller of the recorder.
Implementation · src/history.ts · lines 8–15
Check value types and constraints before deciding whether a migration is needed.
Table definition · db/customer_history.sql · lines 1–7
Keep the old value, new value and timestamp in the recorded change.
Requirement · Profile change history · Requirements
Add a test for both the saved value and the recorded change.
Tests · tests/profile-history.test.ts · illustrative excerpt
This checklist is authored for the example. It is a starting point for review, not a completeness guarantee or an automatic approval.
Try a change you already understand