Skip to content

to main#861

Merged
JoshuaVSherman merged 4 commits into
mainfrom
dev
Jun 22, 2026
Merged

to main#861
JoshuaVSherman merged 4 commits into
mainfrom
dev

Conversation

@JoshuaVSherman

Copy link
Copy Markdown
Contributor

No description provided.

JoshuaVSherman and others added 4 commits June 22, 2026 17:52
Templates are now keyed by (type, stage) instead of type alone:
- template schema gains `stage` (cold|returning, default cold); the
  old `type`-unique constraint becomes a (type, stage) compound unique
  index; template dedup + list filter are stage-aware.
- venue gains `relationshipStage` (explicit override, unset = auto) and
  `templateOverride` (force a template type for special cases).
- send selection: type = templateType > venue.templateOverride >
  venueType; stage = explicit relationshipStage, else auto-derived
  (booked or prior replied/booked outreach => returning, else cold);
  findTemplate falls back returning->cold so sends never break before a
  returning variant is authored, and matches legacy stage-less templates.

v2.0.34, 308 tests green. NOTE: after deploy, set stage='cold' on the 3
existing prod templates (so dedup matches them); sends already work via
the cold fallback. Venue-editor controls for the two new fields are a
small JaMmusic follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
.jscpd.json (TS/JS, 5% threshold, csv/tests/build ignored) + npm run
jscpd, chained into npm test so CI enforces it (currently 4.57% lines).
No version bump — same PR (#860), one semver bump per PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reproduced the intermittent 'should update one book' 401: integration
specs share one Mongo test DB and three (book-router/gig-router/facebook)
call userModel.deleteMany({}). Files overlapped enough that one file's
user-wipe ran during another's in-flight auth -> users table momentarily
empty -> findUserById null -> 401 (caught GET /user + PUT /book/one both
401-ing at once). fileParallelism:false serializes files so no cleanup
wipes another file's auth user mid-request. Verified: 8/8 full-suite runs
green (was ~1-in-4 flaky). No version bump — same PR (#860).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(outreach): pick the email template by venueType + relationship stage
@JoshuaVSherman JoshuaVSherman merged commit ad42298 into main Jun 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant