Reviews schema: externalId dedupe, persist pull, cron ingest, auto-draft (TEL-8) - #295
Merged
Merged
Conversation
…ex webhook - Add externalId, externalUrl, provider ids, lastSyncedAt on guest_reviews - Unique index on (property_id, source, external_id) for ingest dedupe - Persist pull results via ReviewsIngestService with re-sync updates - Emit guest.review.ingested and auto-run review_response agent - POST /reviews/ingest for hourly external cron - POST /channels/inbound/channex/reviews for Channex review events TEL-8 Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
telivity-otaip
marked this pull request as ready for review
August 9, 2026 17:58
Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Resolve conflicts: - README.md / docs/test-stats.json: re-sync test counts (1458 tests, 206 files) - docs/operations/cron.md: keep both guest_comms daily cron (main) and hourly review ingest cron (TEL-8) Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements TEL-8: review ingest persistence with deduplication, automatic
review_responsedrafting, scheduled pull endpoint, and Channex review webhooks.Changes
Schema
external_id,external_url,provider_place_id,provider_location_id,provider_channel_id, andlast_synced_atonguest_reviews(property_id, source, external_id)for ingest dedupe0018_guest_reviews_external_id.sql+push-schema.tsupdatesIngest pipeline
ReviewsIngestServicepersists pulled/webhook reviews with insert-on-conflict dedupelast_synced_atwithout creating duplicatesguest.review.ingestedfor new rowsAuto-draft
ReviewIngestListenerrunsreview_responseagent on ingest events (pull, cron, Channex)Scheduling
POST /api/v1/reviews/ingest?propertyId=for external hourly cron (Google + TripAdvisor when configured)docs/operations/cron.mdChannex
POST /api/v1/channels/inbound/channex/reviewshandlesreviewwebhook eventsguest_reviewsAPI response
POST /reviews/pullnow returnsimported,updated, andnewReviewIdsalongside pull resultsAcceptance
Testing
reviews-ingest.service.spec.tsreviews.service.spec.tschannex-review.mapper.spec.tspnpm --filter @telivityhaip/api typecheckLinear Issue: TEL-8