Skip to content

Conversation

@ice-dionysos
Copy link
Contributor

No description provided.

@ice-dionysos ice-dionysos self-assigned this Jan 30, 2026
Copilot AI review requested due to automatic review settings January 30, 2026 16:50
@ice-dionysos ice-dionysos requested a review from a team as a code owner January 30, 2026 16:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements NIP-11 monitoring functionality that tracks database health and exposes system status through the NIP-11 information endpoint. The implementation adds comprehensive status tracking with a finite state machine (FSM) to monitor database read/write operations and detect error conditions.

Changes:

  • Added database status tracking with FSM-based error detection (consecutive operation threshold: 3 failures within 60 seconds)
  • Implemented periodic database health checks that write and read test events to verify functionality
  • Integrated status reporting into the NIP-11 HTTP handler to expose system health via the relay information document

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
database/query/status.go New file implementing status tracking FSM and worker goroutine for monitoring database operations
database/query/status_test.go Comprehensive tests for FSM state transitions and status tracker functionality
database/query/query.go Integration of status tracking hooks for read/write operations
database/query/global.go Global initialization of status tracker alongside database client
database/query/client.go Added operation reporter callback for status tracking
server/http/nip11/system_status.go New file implementing system status collection and periodic database health checks
server/http/nip11/nip11.go Refactored to include system status in NIP-11 response and use streaming JSON encoding
server/http/nip11/nip11_test.go Tests for system status collector behavior using synctest for deterministic time control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ice-dionysos ice-dionysos force-pushed the feature_nip11_monitoring branch from abf3afe to 2bbccc5 Compare January 30, 2026 17:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant