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

cameri / nostream / 45036280473
80%

Build:
DEFAULT BRANCH: main
Ran 22 Nov 2026 03:08PM UTC
Jobs 2
Files 343
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

22 Nov 2026 03:04PM UTC coverage: 79.608% (-0.002%) from 79.61%
45036280473

push

github

web-flow
fix(cli): do not shadow settings.json with the defaults (#1200)

## Description
`ensureConfigBootstrap()` runs at the start of `nostream start` and
`nostream setup`. When `.nostr/settings.yaml` did not exist it copied
`resources/default-settings.yaml` there. The relay loads settings with
`settings.yaml` first and falls back to the deprecated `settings.json`
only when no yaml exists (`loadUserSettings`). So on a deployment that
still had only a `settings.json`, the first `nostream start` created a
yaml full of defaults, and from then on the whole `settings.json` was
ignored. Overrides such as `nip43.enabled` (admission restrictions),
payment settings or limits stopped applying without any message, and the
relay accepted what it had been configured to refuse (for example events
from non-members).

- the defaults are now copied only when **neither** `settings.yaml` nor
`settings.json` exists;
- a deployment with only a `settings.json` keeps working on it, as it
did before the CLI touched it; the admin console and `nostream config`
write `settings.yaml` themselves on the first save, and that file is
built from the merged settings, so the overrides carry over;
- `getLegacySettingsFilePath` is re-exported from
`src/cli/utils/paths.ts`, next to the other path helpers the CLI uses.

I did not make the bootstrap convert `settings.json` into a yaml. The
suggestion in the issue offered that as a second option, but not
shadowing is enough to stop the silent loss, and a conversion would have
to reproduce how the loader merges the two files.

## Related Issue
Partly addresses #1021 (finding F-042). That issue groups seven
findings; this PR only does F-042, so it does not close the issue.



## Motivation and Context
Starting the relay through the CLI should not change which settings
apply.

## How Has This Been Tested?
New `test/unit/cli/bootstrap.spec.ts`, on a temporary config directory:
with no settings the directory is created and the defaults are copied;
an ex... (continued)

5753 of 7846 branches covered (73.32%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

11994 of 14447 relevant lines covered (83.02%)

659.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 45036280473.1 22 Nov 2026 03:09PM UTC 343
77.49
GitHub Action Run
2 Integration - 45036280473.2 22 Nov 2026 03:08PM UTC 343
35.69
GitHub Action Run
Source Files on build 45036280473
  • Tree
  • List 343
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45036280473
  • 9ab90173 on github
  • Prev Build on main (#45035548750)
  • Next Build on main (#45058986958)
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