# Changelog

All notable changes to **adblock-tester** are documented here.
Format: [Keep a Changelog](https://keepachangelog.com/).

## [0.3.0] — 2026-11-14

### Added

- **`GET /api/lookup?url=…` (SITE-CHECK-001)** — pre-visit tracker verdict:
  enter a URL and the server fetches it **once** through the sibling
  `securityheaders.btoven.net` checker (page profiling + third-party origin
  extraction), matches the result against this repo's canonical
  `static/lists/trackers.txt`, and answers
  `{verdict, trackers[], tracker_count, third_party_origins[], privacy_grade,
  security{…}, errors[], upstream{engine,schema_version,service}, cache,
  checked_at}`. Verdicts: `trackers_detected | clean | not_profiled |
  no_tracker_data | unreachable` (`not_profiled`/`no_tracker_data` are never
  PASSes). Bounded in-memory cache (10 min fresh / 24 h stale fallback) —
  upstream enforces 30 req/h per IP and all our users share one IP in front
  of it. UI panel "Check a site before you visit it" on the landing page.
- **SSRF-001 guard** — RFC1918 / loopback / link-local / CGNAT / metadata
  targets (and `localhost`, `*.local`, `*.internal`) are rejected with
  `400 {error: "private_target", retry: "never"}` **before** any outbound
  request.
- **`GET /llms.txt`** — the living contract served at its canonical path
  (was only reachable at `/static/llms.txt`).
- **`target_query_params: ["url"]`** — the abuse guard's per-target dimension
  (60/h) is now wired to the lookup query parameter, as promised in `llms.txt`.

### Changed

- **`schema_version` 1 → 2** (B2): the `/api/lookup` verdict shape is a new
  structural addition; `polarity.error_fields` now declares `["errors"]` (B4).

## [0.2.0] — 2026-10-30

### Added

- **`GET /changelog.md`** — serves this file for the version badge menu (route in the
  server + `COPY CHANGELOG.md /opt/CHANGELOG.md` in the image).
- **`GET /health`** (MCP consumer contract B1): `{status, version, commit,
  schema_version, engine, contract_version, polarity}`. `commit` is baked from
  `GIT_COMMIT` (exported by the Makefile, passed as `ARG` by the Dockerfile) and falls
  back to `unknown` when the build had no sha.
- **Response identity (B2/B4)**: every JSON response carries `engine` (`adblock/0.2.0`),
  `schema_version`, `contract_version` and `polarity` (`absence_means: "pass"` over
  (none yet — lookup API pending, see `ENDPOINTS-001`)).
- **`llms.txt` contract, privacy and acceptable-use section (B5/B7/B11)**: queries are
  not persisted, real cache TTLs, and the abuse-guard limits (30/h per IP · 300/h per
  user-agent · 60/h per target · 2000/h global).
- **`server/src/contract.rs`**, shared with the eight testers (audit06
  `shared_identical` group, drift 8/8), plus `config::API_META`.

### Changed

- Cache-key validation warnings log the length of the value instead of the value itself
  (privacy promise).
- Version **0.1.0 → 0.2.0** across the workspace (server crate).
- The lookup API is still pending (`ENDPOINTS-001`), so the error envelope and the
  per-target dimension wiring land with it.

### Notes

- **Verification pending** (`CONTRACT-002`): this session did not build. Run `cargo
  build && cargo clippy -- -D warnings && cargo test` before shipping.

## [0.1.0] — 2026-05-04

### Notes

- First versioned release of this repository. No changelog existed before `0.2.0`;
  earlier work is visible in `git log`.
