Fix missing ritualchain.source.ts file#6
Merged
Conversation
## Fix: Add missing ritualchain.source.ts file The build was failing because `apps/web/src/lib/server/domains/feedback/sources/ritualchain.source.ts` was missing, causing an unresolved import error during the SSR build phase. ### Error ``` [UNRESOLVED_IMPORT] Error: Could not resolve './domains/feedback/sources/ritualchain.source' in src/lib/server/startup.ts ``` ### Changes - Added `apps/web/src/lib/server/domains/feedback/sources/ritualchain.source.ts` with the correct implementation for ensuring the RitualChain feedback source exists on startup ### Why The startup code imports `ensureRitualChainFeedbackSource` from this file, but it was missing. This caused the build to fail during the SSR environment build phase. The implementation ensures a RitualChain feedback source exists in the database on startup using an advisory lock to prevent concurrent creation.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds the missing ritualchain.source.ts module that is imported during SSR startup, restoring a working build by providing the ensureRitualChainFeedbackSource implementation used to auto-provision the RitualChain feedback source in the database.
Changes:
- Added
ensureRitualChainFeedbackSource()to create the RitualChain feedback source on startup if it does not already exist. - Uses a transaction-scoped Postgres advisory lock to prevent duplicate source creation during concurrent startups.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+6
| /** | ||
| * RitualChain feedback source — auto-provisioned passive connector. | ||
| * | ||
| * One ritualchain source exists per deployment. Created on startup if absent. | ||
| * All new posts (including widget-submitted) are ingested automatically | ||
| * via the feedback_pipeline event hook on post.created. |
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.
Fix: Add missing ritualchain.source.ts file
The build was failing because
apps/web/src/lib/server/domains/feedback/sources/ritualchain.source.tswas missing, causing an unresolved import error during the SSR build phase.Error
Changes
apps/web/src/lib/server/domains/feedback/sources/ritualchain.source.tswith the correct implementation for ensuring the RitualChain feedback source exists on startupWhy
The startup code imports
ensureRitualChainFeedbackSourcefrom this file, but it was missing. This caused the build to fail during the SSR environment build phase. The implementation ensures a RitualChain feedback source exists in the database on startup using an advisory lock to prevent concurrent creation.