diff --git a/feeds.json b/feeds.json index 209a835..50406bd 100644 --- a/feeds.json +++ b/feeds.json @@ -390,5 +390,14 @@ "Articles", "News" ] + }, + { + "name": "claude.dev Blog", + "url": "https://claude.dev/rss.xml", + "tags": [ + "Articles", + "Blog", + "claude" + ] } ] diff --git a/src/app/config/env.test.ts b/src/app/config/env.test.ts index 5f6f4b3..4b6089f 100644 --- a/src/app/config/env.test.ts +++ b/src/app/config/env.test.ts @@ -92,6 +92,19 @@ describe("app/config/env", () => { } }); + it("rejects an explicit feed subscription file that does not exist", async () => { + const temporaryDirectory = mkdtempSync(join(tmpdir(), "rss-summary-config-")); + const missingFile = join(temporaryDirectory, "missing-feeds.json"); + + try { + await expect(Effect.runPromise(loadEnvConfig({ RSS_FEEDS_FILE: missingFile }))).rejects.toThrow( + `Feed subscription file does not exist: ${missingFile}` + ); + } finally { + rmSync(temporaryDirectory, { force: true, recursive: true }); + } + }); + it("allows RSS feed subscriptions from env", async () => { const config = await resolveConfig( { diff --git a/src/app/config/env.ts b/src/app/config/env.ts index d86948a..8a4e14f 100644 --- a/src/app/config/env.ts +++ b/src/app/config/env.ts @@ -138,6 +138,11 @@ function loadFeedSubscriptions( const feedsFile = configuredFile ?? "feeds.json"; if (!existsSync(feedsFile)) { + // A configured path that is missing means the deployment lost its registry; silently returning + // no subscriptions would turn that into an empty digest that looks like "nothing was published". + if (configuredFile) { + throw new Error(`Feed subscription file does not exist: ${feedsFile}`); + } return []; } return decodeFeedsJson(readFileSync(feedsFile, "utf8"));