Skip to content

chore: sunset the StaticMirroringWorker - #924

Open
Priyanshubhartistm wants to merge 3 commits into
cameri:mainfrom
Priyanshubhartistm:chore/sunset-static-mirroring-worker
Open

Priyanshubhartistm wants to merge 3 commits into
cameri:mainfrom
Priyanshubhartistm:chore/sunset-static-mirroring-worker

Conversation

@Priyanshubhartistm

Copy link
Copy Markdown
Collaborator

Description

Removes the StaticMirroringWorker and everything that only existed for it, as the maintainer asked on #909.

  • Removed the worker (src/app/static-mirroring-worker.ts), its factory and its static-mirroring worker type in src/index.ts; the primary process no longer forks mirror workers.
  • mirroring.static is no longer supported. It is gone from the default settings and the docs, and a value that is still configured is ignored: start-up logs a warning that points to NIP-77. The Mirroring type stays only as a deprecated marker for that warning.
  • Admin console: removed the "Mirror health" table, the /admin/ops/mirrors route and controller, and the mirror heartbeats of the ops store and its types. The worker table no longer lists mirror workers.
  • Relay monitor: mirroring.static addresses are no longer probed.
  • CONFIGURATION.md: the mirroring.static[] rows are replaced by one row that says the setting was removed and how to sync with another relay (NIP-77, for example strfry sync); two mentions of the worker in the eventId and nip66.targets rows are dropped.
  • Changeset (minor) describing the removal.

Related Issue

Closes #923

Motivation and Context

The worker mirrored events through its own admission check, separate from the one EventMessageHandler uses, so every rule added to the write path had to be repeated in it (for example, mirrored writes skipped subscription expiry), and it had no tests (#904). NIP-77 sync and other ways of syncing with relays cover what it was used for.

Operators who set mirroring.static lose that mirroring on upgrade. Their settings still load, the key is ignored with a warning.

PR #920 also edits static-mirroring-worker.ts, the admin dashboard and the default settings, so whichever of the two merges second will need to resolve a conflict there.

How Has This Been Tested?

  • New unit tests: no mirroring worker is forked for a configured mirroring.static, the worker list no longer has mirror workers, and mirror addresses are not probed. Removed the tests of the removed code; the admin settings test now checks redaction with a notification target's bot token, since mirroring is no longer part of the settings.
  • pnpm lint, pnpm check:deps, pnpm run build:check, pnpm run build, pnpm run verify:cli:build, pnpm run test:unit (2508 passing), pnpm run test:cli (105 passing).

@changeset-bot

changeset-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a4ab2e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous settings-update blocker is fixed.

Summary

Removes StaticMirroringWorker and its admin reporting.

  • Static relay mirroring no longer runs inside the relay.
  • The admin console no longer shows static mirror health.
  • Relay monitoring checks only its configured public targets.

Reviews (2) · Last reviewed commit: "fix(settings): keep accepting the remove..." · Reviewed by Greptile

Comment thread resources/default-settings.yaml
@coveralls

coveralls commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 39665588362

Coverage increased (+1.7%) to 75.454%

Details

  • Coverage increased (+1.7%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (8 of 9 lines covered, 88.89%).
  • 9 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
src/utils/admin-diagnostics-export.ts 1 0 0.0%
Total (5 files) 9 8 88.89%

Coverage Regressions

9 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
src/utils/ops-trust-notifications.ts 8 47.78%
src/utils/relay-probe-targets.ts 1 89.36%

Coverage Stats

Coverage Status
Relevant Lines: 11285
Covered Lines: 8905
Line Coverage: 78.91%
Relevant Branches: 5846
Covered Branches: 4021
Branch Coverage: 68.78%
Branches in Coverage %: Yes
Coverage Strength: 801.59 hits per line

💛 - Coveralls

greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 21, 2026
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
@Priyanshubhartistm
Priyanshubhartistm force-pushed the chore/sunset-static-mirroring-worker branch from dc3da11 to a4ab2e1 Compare October 21, 2026 19:53
@greptile-apps
greptile-apps Bot dismissed their stale review October 21, 2026 19:53

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@cameri
cameri requested a review from Ferryx349 October 22, 2026 15:16

@Ferryx349 Ferryx349 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch has not been deployed

No deployments
Sign up for free to 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.

chore: sunset the StaticMirroringWorker in favour of negentropy sync

3 participants