Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
63daada
Add speckit to the repository.
sgmv Jan 20, 2026
58197ac
Added documentation about the project.
sgmv Jan 20, 2026
b1dbc02
update tokio version
sgmv Jan 21, 2026
424a0b2
remove unused deps
sgmv Jan 21, 2026
bdfb03d
feat: Add comprehensive functional test suite specification
sgmv Jan 21, 2026
712f61d
Add plan
sgmv Jan 21, 2026
7766950
Add tasks
sgmv Jan 21, 2026
7cf8dbc
Add tests, second stage
sgmv Jan 21, 2026
6e7c2f7
Add tests, third stage
sgmv Jan 21, 2026
1c71202
update docs
sgmv Jan 21, 2026
0c1eccf
feat: Add comprehensive test suite for Phases 6-9
sgmv Jan 21, 2026
da31587
update docs
sgmv Jan 21, 2026
efaee16
Add Makefile and add more tests
sgmv Jan 22, 2026
2c3b1f7
update coverage to 95%
sgmv Jan 22, 2026
09f90e1
add ci stage
sgmv Jan 22, 2026
737a0f5
update ci stage
sgmv Jan 22, 2026
00b391c
update ci stage 2
sgmv Jan 22, 2026
34a2fb5
fix ci
sgmv Jan 22, 2026
d2f2121
align ci with the Makefile
sgmv Jan 22, 2026
bb956d6
comment unfixed issues
sgmv Jan 22, 2026
6d42d99
Merge branch 'main' into 002-functional-test-suite
sgmv Jan 22, 2026
dba1ab2
fix integration tests and fixtures
sgmv Jan 22, 2026
99c2288
Add specification for migration from API V1 to V2
sgmv Jan 22, 2026
1446dff
clarify the spec
sgmv Jan 22, 2026
a33183a
add plan for implementation
sgmv Jan 23, 2026
43ea6ed
add tasks
sgmv Jan 26, 2026
6a92c15
complete T001-002
sgmv Jan 26, 2026
8f0df01
complete T003-006
sgmv Jan 26, 2026
89989de
phase 3 complete
sgmv Jan 26, 2026
3c5c58a
phase 4 complete
sgmv Jan 26, 2026
956b38d
phase 5 complete
sgmv Jan 26, 2026
19f08d4
phase 6 complete
sgmv Jan 27, 2026
06c2e24
add test and move sd interaction to the one module
sgmv Jan 28, 2026
d1f935f
add test and move sd interaction to the one module
sgmv Jan 28, 2026
8ca9488
fix formats and add documentation
sgmv Jan 28, 2026
e6dd4fb
fix linter issues
sgmv Jan 28, 2026
98a352a
add documentation and move to the actual incident creation endpoint /…
sgmv Jan 28, 2026
e4496a9
Merge branch 'main' into 003-sd-api-v2-migration
sgmv Jan 29, 2026
3f5ebb6
remove duplicated code
sgmv Jan 29, 2026
1789c96
update the coverage
sgmv Jan 29, 2026
746ad90
enable checks for formatting and linter
sgmv Jan 29, 2026
dd9f7c1
fix format
sgmv Jan 29, 2026
25ebdc9
revert timeout
sgmv Jan 29, 2026
07b94cf
revert timeout
sgmv Jan 29, 2026
dc57244
update the schema generation
sgmv Jan 29, 2026
f517419
update log format and add e2e tests
sgmv Jan 30, 2026
f38fbe2
add end-to-end test
sgmv Jan 30, 2026
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
1 change: 1 addition & 0 deletions .github/agents/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cargo test [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES][ONLY COMMANDS FOR ACTIVE TECH
Rust 1.75+ (edition 2021, per Cargo.toml): Follow standard conventions

## Recent Changes
- 003-sd-api-v2-migration: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]

- 001-project-documentation: Added Rust 1.75+ (edition 2021, per Cargo.toml) + axum (0.6), tokio (1.28), serde (1.0), tracing (0.1), reqwest (0.11)

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:
steps:
- uses: actions/checkout@v4

# Temporarily disabled linting and formatting checks, to be re-enabled later.
# - name: Check formatting
# run: make fmt-check
#
# - name: Run linter
# run: make lint
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Check formatting
run: make fmt-check

- name: Run linter
run: make lint

- name: Run tests
run: make test
Expand All @@ -37,6 +41,5 @@ jobs:
steps:
- uses: actions/checkout@v4


- name: Run tests with coverage
run: make coverage-check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ docs/
coverage/
tarpaulin-report.html
cobertura.xml

# ai assistant files
skills
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ path="src/bin/reporter.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "~1.0"
axum = { version="~0.6" }
axum-macros = { version="~0.3" }
chrono = "~0.4"
Expand Down Expand Up @@ -45,15 +46,12 @@ uuid = { version = "~1.3", features = ["v4", "fast-rng"] }

[dev-dependencies]
mockito = "~1.0"
serial_test = "3.3.1"
tempfile = "~3.5"
tokio-test = "*"
tower = { version = "0.4", features = ["util"] }
hyper = { version = "0.14", features = ["full"] }

[build-dependencies]
schemars = "~0.8"
serde = { version = "~1.0", features = ["derive"] }
serde_json = "~1.0"

[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
version = "0.3"
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ lint-fix:
# ============================================================================

## Build mdbook documentation
doc:
doc: doc-schema
mdbook build doc/

## Serve documentation locally with live reload
Expand All @@ -129,6 +129,10 @@ doc-api:
doc-api-open:
cargo doc --no-deps --open

## Generate JSON schema for configuration
doc-schema:
cargo test --lib -- generate_config_schema --ignored --nocapture

## Clean generated documentation
doc-clean:
rm -rf docs/*
Expand Down Expand Up @@ -205,6 +209,7 @@ help:
@echo " doc-open - Build and open documentation in browser"
@echo " doc-api - Generate Rust API documentation"
@echo " doc-api-open - Generate and open Rust API docs in browser"
@echo " doc-schema - Generate JSON schema for configuration"
@echo " doc-clean - Clean generated documentation"
@echo ""
@echo " Utilities:"
Expand Down
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mdbook serve doc/
### Running Tests

```bash
# Run all tests
# Run all unit tests
cargo test

# Run tests with output
Expand All @@ -86,6 +86,31 @@ cargo test common::tests
cargo test -- --test-threads=4
```

### E2E Integration Tests

End-to-end tests validate the complete pipeline using real Docker containers (go-carbon + carbonapi).

#### Prerequisites
- Docker installed and running
- Ports available: 2003, 8080, 3005, 9999

#### Running E2E Tests

```bash
# Run E2E tests (Docker containers are managed automatically)
cargo test --test integration_e2e_reporter -- --ignored --nocapture
```

The E2E test validates 4 scenarios:
| Scenario | Expected Weight | Description |
|----------|-----------------|-------------|
| healthy | 0 | All metrics within thresholds |
| degraded_slow | 1 | API response time > 1200ms |
| degraded_errors | 1 | Success rate < 65% |
| outage | 2 | 100% API failures |

For details, see [Testing Guide](doc/testing.md).

### Test Coverage

```bash
Expand All @@ -99,8 +124,6 @@ cargo tarpaulin --out Html
open tarpaulin-report.html
```

For detailed testing documentation, see [Testing Guide](doc/testing.md).

### JSON Schema for Configuration

A JSON Schema for configuration validation is auto-generated during build:
Expand Down
163 changes: 0 additions & 163 deletions build.rs

This file was deleted.

28 changes: 27 additions & 1 deletion doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,33 @@ This section is providing capability to describe query templates to be later ref

## status_dashboard

Configures URL and jwt secret for communication with the status dashboard
Configures URL and JWT secret for communication with the status dashboard.

```yaml
status_dashboard:
url: "https://status-dashboard.example.com"
secret: "your-jwt-secret"
```

| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|---------------------------------------|
| `url` | string | Yes | - | Status Dashboard API URL |
| `secret` | string | No | - | JWT signing secret for authentication |

## health_query

Configures the time window for health metric queries.

```yaml
health_query:
query_from: "-5min"
query_to: "-2min"
```

| Property | Type | Required | Default | Description |
|--------------|--------|----------|---------|---------------------------------------------------------------------|
| `query_from` | string | No | `-5min` | Start time offset for health metric queries (e.g., "-10min", "-1h") |
| `query_to` | string | No | `-2min` | End time offset for health metric queries (e.g., "-1min", "-30s") |

## flag_metrics

Expand Down
4 changes: 2 additions & 2 deletions doc/configuration/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ TSDB connection configuration.

| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
| `url` | string | Yes | - | TSDB URL (e.g., `http://graphite:8080`) |
| `timeout` | integer | No | `10` | Query timeout in seconds |
| `url` | string | Yes | - | TSDB URL (e.g., `http://graphite:8080`) |
| `timeout` | integer | No | `2` | Query timeout in seconds |

```yaml
datasource:
Expand Down
Loading