Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ jobs:
--image=${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/morning-briefing/app:${{ github.sha }} \
--region=${{ env.REGION }} \
--platform=managed \
--update-env-vars=PUPPETEER_CACHE_DIR=/app/.cache/puppeteer \
--quiet
4 changes: 4 additions & 0 deletions src/sources/economic-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ const MARKET_IMPACT_INDICATORS: ReadonlyMap<string, number> = new Map([
// Tier 1 — Score 10
["nonfarm payrolls", 10],
["consumer price index", 10],
// TradingView labels the headline US CPI release "Inflation Rate YoY".
// Treat it as CPI so the weekend week-ahead ranking does not bury it below
// lower-impact foreign GDP releases.
["inflation rate yoy", 10],
[" cpi", 10], // leading space avoids false matches like "recipe"
["interest rate decision", 10],
["fed funds rate", 10],
Expand Down
8 changes: 8 additions & 0 deletions terraform/cloudrun.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ resource "google_cloud_run_v2_service" "morning_briefing" {
value = google_storage_bucket.data.name
}

# Keep the runtime path aligned with the Chrome cache baked into the
# image. This also replaces the obsolete /home/pptruser cache setting
# left on existing Cloud Run revisions.
env {
name = "PUPPETEER_CACHE_DIR"
value = "/app/.cache/puppeteer"
}

ports {
container_port = 8080
}
Expand Down
8 changes: 8 additions & 0 deletions tests/economic-calendar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ describe("scoreEvent", () => {
expect(scoreEvent(event)).toBe(15);
});

it("scores TradingView's US headline CPI label at 15", () => {
const event = createEvent({
title: "Inflation Rate YoY",
country: "US",
});
expect(scoreEvent(event)).toBe(15);
});

it("scores ECB Interest Rate Decision at 12 (10 * 1.2 EU weight)", () => {
const event = createEvent({
title: "ECB Interest Rate Decision",
Expand Down
Loading