Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file.

## [v0.0.5] - 2026-04-21

Comment on lines +5 to +6
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The PR metadata describes v0.0.5 as dated 2026-04-21, but the changelog entry is dated 2026-04-17. Please align the changelog release date with the intended release date (or adjust the PR description) so version history is consistent.

Copilot uses AI. Check for mistakes.
### Changed

- Deferred resolver route router construction until the module-level `router` attribute is accessed, reducing import-time dependency coupling.
- Added resolver mutation-testing configuration for `mutmut`, including resolver API routes, services, store modules, and selective test invocation.
- Lazily load baseline and granger engine classes via module `__getattr__` hooks to avoid import-time engine dependencies in store modules.
- Hardened shared Redis patching in resolver tests by importing store modules dynamically and only patching available attributes.
- Improved exception wrapper tests to preserve original HTTP exception identity and validate sync/async handler shape preservation.
- Tightened resolver pylint design thresholds and refactored analyzer/connector/rca interfaces to keep strict linting without compatibility regressions.
- Added structured RCA signal-input wiring and expanded edge-case tests so resolver `mypy`, `pylint`, and `pytest` all pass cleanly at 100% coverage.
- Applied cleanup-only compatibility wording updates in resolver config/comments and datasource fallback test literals with no behavior changes.
- Added a temporary SQLite test bootstrap for resolver tests, cleaned up resolver request/analyzer docstrings, and excluded generated mutation fixtures from resolver mypy.

## [v0.0.4] - 2026-04-14

### Changed
Expand Down
8 changes: 6 additions & 2 deletions api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# package marker for api submodules
"""
Package exports for the `api` module namespace.
Api module for the resolver package.

Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""
5 changes: 2 additions & 3 deletions api/requests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Requests and data models for API endpoints.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from .analyze import AnalyzeJobCreateRequest, AnalyzeRequest
Expand Down
7 changes: 6 additions & 1 deletion api/requests/_time_range.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""
Shared time-range request models.
Time range request model for log and metric queries.

Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/analyze.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Analyze request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/correlation.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Correlation request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/events.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Deployment event request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/logs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Log request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/metrics.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Metrics request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/slo.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
SLO request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/topology.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Topology request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/requests/traces.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Trace request models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Response models for API endpoints and internal data structures.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/analysis.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Analysis report response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/anomalies.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Anomaly response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
26 changes: 13 additions & 13 deletions api/responses/base.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Base response models and serialization helpers.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand All @@ -19,17 +18,18 @@


def _coerce(obj: SerializableValue) -> SerializableValue:
result: SerializableValue = obj
if isinstance(obj, dict):
return {k: _coerce(v) for k, v in obj.items()}
if isinstance(obj, list):
return [_coerce(v) for v in obj]
if isinstance(obj, np.integer):
return int(obj)
if isinstance(obj, np.floating):
return float(obj)
if isinstance(obj, np.ndarray):
return obj.tolist()
return obj
result = {k: _coerce(v) for k, v in obj.items()}
elif isinstance(obj, list):
result = [_coerce(v) for v in obj]
elif isinstance(obj, np.integer):
result = int(obj)
elif isinstance(obj, np.floating):
result = float(obj)
elif isinstance(obj, np.ndarray):
result = obj.tolist()
return result


class NpModel(BaseModel):
Expand Down
5 changes: 2 additions & 3 deletions api/responses/jobs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Asynchronous analysis job response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/logs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Log response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/rca.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
RCA and causal response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/slo.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
SLO response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
5 changes: 2 additions & 3 deletions api/responses/traces.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""
Trace response models.

Copyright (c) 2026 Stefan Kumarasinghe
Copyright (c) 2026 Stefan Kumarasinghe.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
License. See http://www.apache.org/licenses/LICENSE-2.0 for details.
"""

from __future__ import annotations
Expand Down
Loading
Loading