Skip to content

Commit 3a89839

Browse files
authored
Merge pull request #165 from VersusControl/feature/update
docs: update CHANGELOG.md
2 parents 13157e4 + 3670855 commit 3a89839

1 file changed

Lines changed: 79 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,50 +34,128 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
3434
- Frequency spike detection: known patterns whose rate exceeds the EWMA
3535
baseline are routed to the AI SRE alongside unknowns.
3636

37+
#### Data sources (AI agent)
38+
- **Loki** signal source (`pkg/signalsources/loki.go`) — polls
39+
`/loki/api/v1/query_range` with stream-label filtering, configurable
40+
`query` + `step`, basic-auth and `X-Scope-OrgID` for multi-tenant
41+
deployments. Full test coverage.
42+
- **CloudWatch Logs** signal source
43+
(`pkg/signalsources/cloudwatchlogs.go`) — pulls events via the AWS
44+
SDK v2 with `--log-group-name` and optional `--log-stream-name-prefix`
45+
/ `--filter-pattern`. Full test coverage.
46+
- Agent now supports `type: loki` and `type: cloudwatchlogs` in
47+
`agent_sources.yaml` alongside the existing `file` and
48+
`elasticsearch` sources.
49+
3750
#### UI
3851
- New **Detect** page (table + outcome filters) and detail page (prompt,
3952
raw response, finding).
4053
- New **System Prompt** page rendering the assembled system prompt.
4154
- Dashboard **AI Detect** tile and chart bar (replaces the prior
4255
Services tile).
56+
- **Incident detail page** redesigned: structured Summary / Suggestions
57+
/ Sample log / Raw payload column on the left; Facts / Channels
58+
notified / Status / Agent context column on the right. Same layout
59+
for every incident (manual, webhook, or agent-emitted).
60+
- Two AI action cards at the top of the detail page — **Analysis** and
61+
**Auto Post Mortem** — each with an explanation and a
62+
`coming soon` pill. Reserved for future AI features.
63+
- **Status page** now a proper agent dashboard: runtime banner (agent
64+
on/off, mode, source counts, AI model, poll interval), two tile rows
65+
(patterns/services/shadow + detect/emitted/cache/errors), four
66+
breakdown tables (shadow verdicts, detect outcomes, detect verdicts,
67+
AI severity), and a signal-sources table read from
68+
`agent_sources.yaml`.
4369

4470
#### Notification templates
4571
- All 5 channel templates (Slack, Telegram, MS Teams, Lark, Viber) now
4672
detect `Versus Agent` source via `.PatternID` and render an
4773
agent-native block (verdict, category, frequency, baseline,
4874
confidence, pattern, suggestions, sample log) in channel-native
4975
formatting.
76+
- Split the prior shared `agent_message.tmpl` into six per-channel
77+
templates (`agent_slack_message.tmpl`, `agent_telegram_message.tmpl`,
78+
`agent_msteams_message.tmpl`, `agent_lark_message.tmpl`,
79+
`agent_viber_message.tmpl`, `agent_email_message.tmpl`) so each
80+
channel renders in its native formatting.
81+
- `pkg/utils/agent_template.go` exposes `IsAgentIncident()` and the
82+
six template-path constants; alert dispatch picks the agent template
83+
automatically when `.PatternID` is set or `.Source` starts with
84+
`agent:`.
85+
86+
#### Examples
87+
- Four self-contained docker-compose stacks under
88+
`examples/docker-compose/`:
89+
- `file/` — tails a host log file
90+
- `loki/` — Grafana + Loki + Promtail + Versus
91+
- `elasticsearch/` — single-node ES + Versus
92+
- `cloudwatch/` — CloudWatch Logs poller + Versus
93+
- Each stack ships its own `docker-compose.yml`,
94+
`config/{config.yaml,agent_sources.yaml}`, and `README.md` with
95+
test-traffic instructions. Compose files use `${VAR:-default}` so
96+
`docker compose up` works zero-config.
97+
- All stacks run **Redis with TLS** via a one-shot
98+
`redis-tls-init` container that mints a self-signed cert into a
99+
shared volume — matches the app's unconditional TLS Redis config.
50100

51101
#### Test scripts
52102
- `scripts/generate_noisy_logs.py` and `scripts/run_noisy_logs.sh` now
53103
support `--scenario` with 7 curated incident scenarios:
54104
`db-outage`, `cache-meltdown`, `disk-full`, `tls-expired`,
55105
`oom-cascade`, `auth-attack`, `k8s-imagepull`.
106+
- `scripts/generate_noisy_logs.py` rewritten with pluggable sinks:
107+
`--target {stdout,loki,elasticsearch,cloudwatch}`. Stdlib only;
108+
`boto3` is lazy-imported for the CloudWatch target.
109+
- `scripts/run_noisy_logs.sh` accepts the same `--target` flag with
110+
per-backend env vars (`LOKI_URL`, `ES_URL`, `CW_LOG_GROUP_NAME`, …).
56111

57112
#### Documentation
58113
- New `src/agent/ai-detect-mode.md` covering configuration, pipeline
59114
outcomes, admin endpoints, system prompt anatomy, worked example, and
60115
cost knobs.
61-
- `SUMMARY.md` updated with the new entry.
116+
- New **Data Sources** mdBook section
117+
(`src/agent/data-sources.md`) covering every source type with
118+
configuration, polling semantics, and end-to-end examples.
119+
- `src/userguide/admin-ui.md` updated for the new detail/status pages.
120+
- `SUMMARY.md` updated with the new entries.
121+
122+
#### CI / release
123+
- `release.yaml` now builds **multi-platform** images
124+
(`linux/amd64` + `linux/arm64`) using QEMU + Buildx.
125+
- CI guards `go vet` against an empty `ui/dist/` by re-creating
126+
`ui/dist/.gitkeep` before compilation (the `go:embed all:dist`
127+
directive needs at least one entry).
62128

63129
### Changed
64130
- `core.AISRE.Analyze` now returns `*AICallResult` (finding + user
65131
prompt + raw response + latency + model) instead of `*AIFinding`.
66132
External implementations of `AISRE` must be updated.
67133
- OpenAI endpoint is now hardcoded to
68134
`https://api.openai.com/v1/chat/completions`.
135+
- `.env.example` files removed from the docker-compose examples —
136+
the `${VAR:-default}` defaults in compose files cover every knob
137+
and keep the quick-start to a single command.
69138

70139
### Fixed
71140
- Channel notifications for AI-emitted incidents previously rendered as
72141
"Unknown Alert (Unknown) / INFO". All 5 templates now correctly
73142
display the agent verdict, severity, and metadata.
143+
- **Pattern catalog** — race / correctness regressions in the catalog,
144+
alert fan-out, and on-call status handling.
145+
- **Storage** — fsync the staged file before the atomic rename in the
146+
file-backed provider so a crash mid-write can no longer leave a
147+
zero-byte `incidents.json`.
74148

75149
### Security
76150
- Detect-mode audit log redacts samples through the same redactor used
77151
before AI calls; raw payloads never reach the on-disk log unredacted.
78152
- `gateway_secret` continues to gate every `/api/agent/*` endpoint;
79153
empty secret means the admin endpoints are not registered at all
80154
(no silent open admin surface).
155+
- **Constant-time gateway-secret comparison** in
156+
`pkg/controllers/agent.go` — replaces the previous `==` check, which
157+
was vulnerable to timing-based secret discovery on the
158+
`/api/agent/*` and `/api/admin/*` endpoints.
81159

82160
---
83161

0 commit comments

Comments
 (0)