• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 43977599943
79%

Build:
DEFAULT BRANCH: main
Ran 16 Nov 2026 11:18PM UTC
Jobs 2
Files 339
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Nov 2026 11:14PM UTC coverage: 79.247% (-0.002%) from 79.249%
43977599943

push

github

web-flow
fix(settings): reload settings when either settings.yaml or settings.json changes (#1157)

## Description
`SettingsStatic.watchSettings()` reloaded the cached settings only when
the file named `settings.<ext>` changed, where `<ext>` was chosen once
at startup from the first `settings*` file in the config directory. The
loader (`loadUserSettings`) reads `settings.yaml` and falls back to the
deprecated `settings.json`, and the admin console and the CLI always
write `settings.yaml`. A worker that started while only `settings.json`
existed therefore ignored every later write to `settings.yaml` and kept
its old cached settings, including the NIP-98 admin allowlist, until it
was restarted.

- the directory watcher now reloads when either `settings.yaml` or
`settings.json` changes (the names come from `getSettingsFilePath` and
`getLegacySettingsFilePath`, the same ones the loader uses);
- the startup `settingsFileType()` lookup in the watcher is gone, since
the watched names no longer depend on it. The method itself is
unchanged.

The reload still goes through `createSettings()`, which uses
`loadMergedSettings()`, so the yaml-over-json precedence is the loader's
and is not duplicated here.

Not in this PR: the issue also suggests that a successful admin policy
update should refresh every worker directly. Workers already reload
through this watcher once the file changes, so I kept the change to the
watcher.

## Related Issue
Fixes #1014

CodeRabbit's scan did not establish reachability, so I checked the code
first. On `main`, `watchSettings()` compares the changed filename with
`settings.${fileType}`, and `saveSettings` and the settings write path
write `settings.yaml`. It affects relays that were started from a
`settings.json`; for yaml installs the old behaviour was already
correct.

## Motivation and Context
A removed admin key or a changed limit should reach every worker,
whichever of the two supported settings files the worker started from.

## How Has T... (continued)

5439 of 7451 branches covered (73.0%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

6 existing lines in 1 file now uncovered.

11473 of 13890 relevant lines covered (82.6%)

677.55 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
76.92
-0.71% src/utils/settings.ts
Jobs
ID Job ID Ran Files Coverage
1 Integration - 43977599943.1 16 Nov 2026 11:18PM UTC 339
34.94
GitHub Action Run
2 Unit - 43977599943.2 16 Nov 2026 11:19PM UTC 339
77.12
GitHub Action Run
Source Files on build 43977599943
  • Tree
  • List 339
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43977599943
  • 5496a7d9 on github
  • Prev Build on main (#43936235076)
  • Next Build on main (#43984976488)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc