Skip to content

Prevent CSS and component edits from rebuilding the ingestion worker. - #2442

Merged
BigSimmo merged 6 commits into
mainfrom
worker-watch-patterns
Aug 27, 2026
Merged

Prevent CSS and component edits from rebuilding the ingestion worker.#2442
BigSimmo merged 6 commits into
mainfrom
worker-watch-patterns

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Narrow Railway worker watchPatterns from /src/** to /src/lib/** and /src/data/** so CSS and component edits no longer rebuild the ingestion worker.
  • The worker image only bundles src/lib plus src/data snapshots, so watching all of /src/** triggered unnecessary Railway rebuilds.
  • Matching contract coverage is in tests/railway-config.test.ts.

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Verification not run: bare "open PR" publication by request; local and hosted checks were not executed.

Risk and rollout

Complete this section for clinical, data, API, auth/privacy, workflow, dependency, build, or deployment changes.

  • Risk: Low. This only narrows Railway worker watchPatterns so rebuilds fire on /src/lib/** and /src/data/** instead of all of /src/**. Worker runtime, ingestion pipeline behaviour, and clinical output are unchanged. A missed path would delay a worker image rebuild until the next matching file change, not change serving behaviour.
  • Rollback: Revert this PR (or restore watchPatterns to /src/** in railway.worker.json) and let the worker service redeploy from main.
  • Provider or production effects: After merge to main, Railway auto-deploys the worker from this repo. The change only narrows which path edits trigger a worker rebuild; it does not mutate live data or require a one-off operator action.
  • RAG impact: none

Clinical Governance Preflight

Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

This PR does not touch clinical-risk paths (clinicalRisk is false). It only changes Railway worker watchPatterns and the matching config test, so the preflight items above are not applicable and remain unchecked.

Notes

  • Deployment-config only: railway.worker.json plus tests/railway-config.test.ts. No RAG ranking surfaces, no ingestion worker source, and no clinical output change.

Note

Low Risk
Deployment watch-pattern only; worker runtime and ingestion behaviour are unchanged. A wrong pattern could delay worker image rebuilds until a matching path changes.

Overview
Narrows Railway worker deploy triggers so edits under src/components, src/app (e.g. CSS), and other UI paths no longer rebuild the ingestion worker image.

railway.worker.json replaces the broad /src/** watch pattern with /src/lib/** and /src/data/**, matching what the worker build actually ships. Tests add src/data/dsm-clinical-content.json as a positive worker trigger and assert src/components/ui/button.tsx and src/app/globals.css do not trigger a worker deploy.

Reviewed by Cursor Bugbot for commit 10c7db0. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Improved worker deployment triggers so updates to library and data content are monitored separately.
    • Prevented UI-only changes from unnecessarily triggering worker rebuilds.
    • Added clinical content updates to worker deployment triggers.

The worker image only bundles src/lib (plus src/data snapshots), so watching all of /src/** triggered unnecessary Railway rebuilds.
Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@supabase

supabaseBot commented Aug 27, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitaiBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ca6098a-2fce-4f27-8604-f31c2c6556f7

📥 Commits

Reviewing files that changed from the base of the PR and between 6f32f92 and 10c7db0.

📒 Files selected for processing (2)
  • railway.worker.json
  • tests/railway-config.test.ts

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The Railway worker watch scope now separates library and data paths. Tests include DSM clinical content as a deployment trigger and verify that UI components and global stylesheets do not trigger worker rebuilds.

Changes

Railway worker deployment scope

Layer / File(s)Summary
Worker watch patterns and trigger validation
railway.worker.json, tests/railway-config.test.ts
The worker watches /src/lib/** and /src/data/**. Tests include the DSM clinical content file as a trigger and exclude UI component and global stylesheet changes.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk:⚪ Minimal · up to 10c7d

This localized deployment-config change narrows worker rebuild triggers without changing worker runtime behavior or clinical output, and no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description check✅ PassedThe description follows the repository template. It explains the watch-pattern change, verification status, risk, rollback, provider effects, RAG impact, and clinical governance applicability.
Title check✅ PassedThe title clearly describes the main change: preventing CSS and component edits from triggering ingestion-worker rebuilds.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worker-watch-patterns

Comment @coderabbitai help to get the list of available commands.

@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2af6b8cb-ff35-4ad6-8cb7-b1cc36b68b91)

@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a2e89655-254e-4ee3-bb9f-51b4151506ab)

@BigSimmo
BigSimmo enabled auto-merge (squash) August 27, 2026 17:45
@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ff0f5692-f510-474c-9a30-6bd5090a3f91)

@BigSimmo
BigSimmo merged commit d655351 into mainAug 27, 2026
33 of 34 checks passed
@BigSimmo
BigSimmo deleted the worker-watch-patterns branch August 27, 2026 19:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude