# agent tail filter regex matched nothing: declared deploy healthy

## TL;DR

The tail filter regex matched nothing, so the agent saw zero errors and declared the deploy healthy. A health check on empty data is not a health check: require a minimum log volume, and fail the check when the filter matches nothing. Silence is not success.

```text
agent tail filter regex matched nothing: declared deploy healthy
```

## Steps

1. Confirm the filter matches nothing: run it against known log output.
   Expected: The regex is proven empty.

2. Fix the regex or widen the filter until it matches the expected traffic.
   Expected: Logs flow.

3. Re-evaluate the deploy with real log data.
   Expected: The verdict is honest.

4. Add a minimum-volume gate: health checks fail when matched logs are below threshold.
   Expected: Empty data cannot pass.

5. Test the filter against recorded logs before using it for verdicts.
   Expected: Filters are validated.

## When to use

- a deploy is declared healthy on no logs
- tail filters are regex-based
- the filter was just written

## When not to use

- logs exist and are clean (then healthy may be correct)
- the service genuinely has no traffic (then say so, do not say healthy)
- the filter is known-good (check the service instead)

## Tool compatibility

- wrangler tail
- deploy health checks

## Variant phrasings

- "tail filter matched nothing healthy"
- "regex filter no logs deploy"
- "false healthy deploy no logs"

## Why it happens

An agent that checks 'are there errors in the logs' with a filter matching nothing gets the answer 'no' and reports healthy. The logic is correct; the premise (the filter sees the logs) is false. Health verdicts need a liveness proof: the check must demonstrate it observed traffic before it may declare health.

## Edge cases

- the volume gate needs a baseline; brand-new services have little traffic
- regex filters deserve unit tests against sample logs
- 'no traffic' and 'healthy' must be distinct verdicts

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_nplN5g31cVeubiqU6fRH-w
