Repository navigation
Conversation
The scan, the ingest and the stats all sat inside `if (remoteSources.length > 0)`, so a machine with none configured ran the auto-sync timer every interval and did nothing. The default config has none, so that is the default. Also: the server tests write to the user's real config path, and the teardown only restored a config that had existed before. With no previous config the fixture was left behind and became the live one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XewuV2izBAhDPD2gEsGbKf
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.
What happens today
In
SyncManager.runSync()the scan, the ingest and the stats all sit insideif (remoteSources.length > 0):So a machine with no remote sources configured runs the auto-sync timer on every interval and
ingests nothing.
defaultConfig()hasremote_sources: [], so that is the default:serveappears to be keeping the database current and is not.
What this changes
sourcesis lifted out of the branch, and the scan, ingest and stats run after it. Remotepaths are still appended when there are remotes.
Two tests cover it: local sources are ingested with no remotes configured, and
lastIngestStatsreports what was done.Also
src/web/server.test.tswrites to the user's real config path, and its teardown onlyrestored a config that had existed beforehand. With no previous config the fixture was left
in place and became the live one. It is now removed in that case.
bun run checkpasses: 94 tests, typecheck clean.