Skip to content

feat(admin): trust and automation for operator console - #920

Merged
cameri merged 4 commits into
mainfrom
feat/admin-trust-automation-919
Oct 21, 2026
Merged

cameri merged 4 commits into
mainfrom
feat/admin-trust-automation-919

Conversation

@Ferryx349

Copy link
Copy Markdown
Collaborator

Description

This PR adds :-

  • Admin audit log (GET /admin/audit-log) and Trust UI
  • Webhook events: probe.failed / recovered, ssl.expiring, mirror.disconnected; optional HTTP HMAC
  • OpenTelemetry probe and mirror metrics
  • Diagnostics export and manual NIP-66 probe

Related Issue

Closes #919

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Screen.Recording.2026-10-21.at.08.33.15.mov

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

Add audit log API and Trust UI, signed webhook events for probe/mirror/SSL,
OpenTelemetry probe and mirror metrics, redacted diagnostics export, and
manual NIP-66 probe from the admin console.

Closes #919
@changeset-bot

changeset-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e572093

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

@coveralls

coveralls commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 39590902899

Coverage decreased (-0.4%) to 73.796%

Details

  • Coverage decreased (-0.4%) from the base build.
  • Patch coverage: 116 uncovered changes across 18 files (191 of 307 lines covered, 62.21%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

Top 10 Files by Coverage Impact Changed Covered %
src/controllers/admin/post-admin-network-health-run-controller.ts 48 12 25.0%
src/utils/ops-trust-notifications.ts 70 46 65.71%
src/utils/admin-diagnostics-export.ts 23 12 52.17%
src/controllers/admin/get-admin-diagnostics-export-controller.ts 11 3 27.27%
src/controllers/admin/get-admin-audit-log-controller.ts 7 2 28.57%
src/app/static-mirroring-worker.ts 4 0 0.0%
src/factories/controllers/post-admin-network-health-run-controller-factory.ts 11 7 63.64%
src/telemetry/ops-metrics.ts 22 18 81.82%
src/utils/admin-audit-store.ts 25 21 84.0%
src/utils/admin-notifications-settings.ts 8 4 50.0%
Total (26 files) 307 191 62.21%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
src/app/static-mirroring-worker.ts 2 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 11554
Covered Lines: 8936
Line Coverage: 77.34%
Relevant Branches: 5997
Covered Branches: 4016
Branch Coverage: 66.97%
Branches in Coverage %: Yes
Coverage Strength: 779.68 hits per line

💛 - Coveralls

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Adds an admin Trust page, an audit log, diagnostics export, manual probes, signed webhooks, and probe and mirror metrics.

  • The Trust view shows recent admin actions and a redacted support bundle.
  • Operators can run NIP-66 probes from the network-health panel.
  • Operators can receive signed webhook alerts for probe, certificate, and mirror events.
  • Probe runs and mirror reconnects now add operations metrics.
  • Redis script calls reload and retry when Redis has lost a script.

Reviews (4) · Last reviewed commit: "fix(admin): skip audit Redis when cache ..." · Reviewed by Greptile

Comment thread src/utils/ops-trust-notifications.ts Outdated
Comment thread src/utils/ops-trust-notifications.ts Outdated
Comment thread resources/admin/assets/notifications.js
Comment thread resources/admin/assets/admin-trust.js Outdated
Comment thread resources/admin/assets/dashboard.js
Comment thread src/utils/ops-trust-notifications.ts Outdated
Wrap Redis dedupe in try/catch, enqueue before marking alerts sent, atomize
probe transitions, allow clearing webhook secrets, and fix Trust 401 handling.
Comment thread src/utils/ops-trust-notifications.ts
Reload cached script SHAs after Redis flushes scripts and isolate SSL
expiry notifications from probe eval failures.
greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 21, 2026
Avoid constructing an invalid Redis URL during admin login and settings
updates when REDIS_* env vars are unset (e.g. unit test CI).
@greptile-apps
greptile-apps Bot dismissed their stale review October 21, 2026 11:17

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

@cameri
cameri merged commit abd4a1b into main Oct 21, 2026
14 of 17 checks passed
@cameri
cameri deleted the feat/admin-trust-automation-919 branch October 21, 2026 17:56
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.

[Admin Console] : trust & automation (audit, webhooks, OTel, diagnostics)

3 participants