fix(dev): fill sync.* config placeholders in backend bootstrap - #2757
Open
tyler-dane wants to merge 1 commit into
Open
fix(dev): fill sync.* config placeholders in backend bootstrap#2757tyler-dane wants to merge 1 commit into
tyler-dane wants to merge 1 commit into
Conversation
The backend bootstrap script did not fill the sync.mongoUri and sync.internalAuthToken placeholders that compass.example.yaml now ships, so dev:web and dev:backend aborted with a config validation error. Fill them with local defaults (sync uses an isolated compass_sync database on the same local replica set) and document the sync-change-feed warnings in AGENTS.md. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
tyler-dane
marked this pull request as ready for review
August 11, 2026 22:49
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
While setting up the development environment I found that
.cursor/bootstrap-backend.shwas stale relative to the currentcompass.example.yaml. The example config now ships a requiredsync:block withREPLACE_WITH_SYNC_MONGO_PASSWORDandREPLACE_WITH_SYNC_INTERNAL_AUTH_TOKENplaceholders, but the bootstrap script only filled the olderbackend,supertokens, andmongo.urivalues. The config validator (packages/core/src/config/compass.config.ts) rejects any remainingREPLACE_WITH_value, so bothbun run dev:webandbun run dev:backendaborted at startup with:This PR:
sync.mongoUri(an isolatedcompass_syncdatabase on the same local single-node replica set) andsync.internalAuthTokeninbootstrap-backend.sh, reading optionalSYNC_MONGO_URI/SYNC_INTERNAL_AUTH_TOKENenv overrides with safe local defaults.sync.mongoUrireplica-set requirement, and the expected/harmlesssync-change-feed ... unavailablewarnings (logged when the optionaldev:syncservice isn't running) under## Cursor Cloud specific instructionsinAGENTS.md.No application code changed;
compass.yamlremains gitignored.Simplicity
Minimal: two additional
sedsubstitutions plus one default variable, mirroring the existing pattern in the script. Documentation updates only inAGENTS.md.Automated validation
bun lint— passes (12 pre-existing warnings, exit 0).bun test:core— 549 pass.bun test:web— 2173 pass.bun test:backend— 300 pass, 1 skip (in-memory Mongo auto-started).bun run dev:backend—GET /api/healthreturns200 {"status":"ok"}with Mongo connected.bun run dev:web— serves http://localhost:9080 (HTTP 200).Independent review
Verified fresh-path bootstrap fills all
sync.*placeholders (only commented google/email/posthog placeholders remain, which the validator ignores) and that re-running the script is idempotent (leaves an existingcompass.yamluntouched).Test plan