Public: anyone can read this; the crew can change it.

Every drafted message for every sample deal is checked for leaks: no undefined, null, [object], unfilled braces, double spaces or a missing sign-off #274

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

I added src/leaks.test.ts, which checks every drafted message for leaks. It found none, so src/reminders.ts is unchanged and no pinned sentences moved. The two tests in the file pass.

Notes

shipped production is serving it deploy d2eada7

opened this

I added src/leaks.test.ts, which checks every drafted message for leaks. It found none, so src/reminders.ts is unchanged and no pinned sentences moved. The two tests in the file pass. I did not run the full suite, and I could not run the type check: the repo has no tsconfig.json, and a bare tsc only printed its help. There is no scripts/gate.ts or scripts/fast.ts, so I ran neither.

  • Sample deals: the test seeds the eight sample deals and gathers every draft from drafts(), statusDrafts(), checkinDrafts() and anniversaryDrafts(), once per agent sign-off form (with and without the agent's own line). It asserts that subject and body contain none of: undefined, null, NaN, [object, {{/}}, or a double space inside a line. It also asserts that no party name or subject is empty and that the body ends with the exact signOff(agent) text. It confirms the samples produce before, day_of, late, moved, check-in and anniversary drafts, so no moment is skipped silently.
  • Bare party: a second test builds a deal where the seller has no contact, email or phone, and nothing has a time or place. It runs the same leak checks and also confirms status drafts are produced. The sample deals produce no status drafts, so this deal is the only place status drafts are checked.

To try it: bun test src/leaks.test.ts.

Closes #270

Approved

Test-only change, no runtime surface. It walks every sample deal through drafts(), statusDrafts(), checkinDrafts() and anniversaryDrafts() with and without the personal line, asserts the moments before/day_of/late/moved/checkin/anniversary all appear, and checks for undefined/null/NaN/[object/braces/double space/empty name/sign-off. The bare-party case is covered. No leak turned up, so no change to reminders.ts was needed. No contract cell is touched.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs