-
Notifications
You must be signed in to change notification settings - Fork 2
Version 0.18 #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 0.18 #46
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 88.47% 88.70% +0.22%
==========================================
Files 74 75 +1
Lines 5337 5720 +383
==========================================
+ Hits 4722 5074 +352
- Misses 476 500 +24
- Partials 139 146 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Use IsError field in MCP result properly. - Split `query_status` tool and `query_incidents` tool. - Add `search` parameter to `query_logs` tool. - Rename `query` parameter to `jq`.
There was a problem hiding this 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 version 0.18 of Ayd with three major changes: adding an Instance Name feature that displays throughout the UI and MCP tools, implementing a remote MCP (Model Context Protocol) server for AI tool integration, and various bug fixes and performance improvements.
Changes:
- Added Instance Name feature that appears in page titles, status pages, and MCP tool descriptions
- Implemented comprehensive MCP server endpoint at
/mcpwith three tools (query_status, query_incidents, query_logs) supporting jq queries for flexible data extraction - Refactored time parsing from string-based to optimized byte-level operations for better performance
- Fixed critical bugs including pattern comparison bug, SSH username validation, and CSV error handling
Reviewed changes
Copilot reviewed 56 out of 57 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib-ayd/time.go, lib-ayd/time_test.go, lib-ayd/time_internal_test.go | Major refactor of time parsing from string templates to optimized byte-level parsing with comprehensive test coverage |
| lib-ayd/record.go, lib-ayd/record_test.go, lib-ayd/record_fuzz_test.go | Improved UTF-8 validation and JSON encoding to handle invalid UTF-8 strings safely |
| internal/store/store.go, internal/store/store_test.go | Added instance name field and implemented file handle caching (100ms timeout) for better performance |
| internal/store/scanner.go, internal/store/scanner_test.go | Fixed buffer overflow handling in log scanner using ReadSlice + ReadBytes fallback |
| internal/store/pattern.go | Fixed critical bug in timePattern.Less where Hour comparison was incorrectly comparing p.Hour < p.Hour instead of p.Hour < x.Hour |
| internal/endpoint/mcp.go, internal/endpoint/mcp_test.go | New comprehensive MCP server with three query tools supporting jq filtering with extensive test coverage (1000+ lines) |
| internal/endpoint/templates.go, internal/endpoint/templates_test.go, internal/endpoint/templates/base.html | Added instance name to page titles and fixed latency_graph and extra2jsons to handle empty arrays |
| internal/endpoint/writer.go | Fixed flushWriter to use pointer receiver instead of value receiver |
| internal/endpoint/log.go, internal/endpoint/incidents.go | Added instance name support and fixed error scope in incidents.json endpoint |
| internal/scheme/ssh.go, internal/scheme/probe_test.go | Fixed SSH username validation to reject empty usernames (e.g., ":@example.com") |
| internal/scheme/http.go | Updated HTTP user agent to include version from meta package |
| internal/scheme/dns_test.go | Updated DNS test expectations for cloudflare nameservers |
| internal/query/valuematcher.go, internal/query/tokenizer.go, internal/query/query_test.go | Optimized time value matching and tokenization with byte-level operations and pre-allocation |
| internal/logconv/csv.go | Fixed CSV writer to return flush errors instead of ignoring them |
| internal/testutil/store.go, internal/testutil/endpoint.go | Refactored to use functional options pattern for better flexibility |
| internal/meta/version.go | New package for version and commit information, extracted from main |
| cmd/ayd/main.go, cmd/ayd/server.go, cmd/ayd/schedule.go | Added instance name flag (-n), version info refactoring, and interval validation |
| go.mod, go.sum | Added MCP SDK and gojq dependencies, updated various dependencies |
| Makefile, Dockerfile, .goreleaser.yml | Updated build scripts to inject version into new meta package location |
| README.md | Added documentation for MCP server endpoint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.