> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liteclaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation

> Go-live checklist for production deployments.

# Go-Live Validation

Use this checklist to validate a production deployment before signing off.

<Note>
  This is the canonical checklist. Run through it after every production deployment.
</Note>

## Pre-Deploy

```bash theme={null}
pnpm install
pnpm migrate
pnpm check   # Must pass: lint + typecheck + tests + build
```

Verify Railway services are healthy (worker + both cron services) with no startup errors in logs.

## Security Gates

### Ownership Claim

From your Telegram account:

```
/start
/claim <OWNER_CLAIM_CODE>
```

<Check>Claim succeeds once</Check>
<Check>Second claim attempt fails</Check>

### Whitelist Enforcement

From a **different** Telegram account:

```
/start
hello
```

<Check>Unauthorized account is silently ignored</Check>

## Integrations

### Connect

```
/integrations
/integrations weather San Francisco, CA
/integrations connect calendar
/integrations connect gmail
```

Complete browser OAuth for calendar and gmail.

```
/integrations
```

<Check>Weather shows configured location</Check>
<Check>Calendar shows connected</Check>
<Check>Gmail shows connected</Check>

### Disconnect

```
/integrations disconnect calendar
/integrations disconnect gmail
/integrations
```

<Check>Both show disconnected</Check>
<Check>Follow-up reads fail gracefully</Check>

Reconnect before continuing:

```
/integrations connect calendar
/integrations connect gmail
```

## Read Paths

```
What's on my calendar tomorrow?
Any important emails?
What's the weather tomorrow?
```

<Check>Calendar returns events or "no events" message</Check>
<Check>Gmail returns summary</Check>
<Check>Weather returns forecast</Check>

## Write Path + Confirmation

### Happy path

```
Schedule dentist appointment tomorrow 2pm for 60 minutes
```

<Check>Bot proposes action with confirmation code</Check>

```
YES <code_from_bot>
```

<Check>Event created confirmation</Check>
<Check>Event appears in subsequent calendar query</Check>

### Wrong code

```
Schedule haircut Friday 4pm
```

```
YES 000000
```

<Check>Confirmation mismatch error</Check>

### Cancellation

```
Schedule meeting Monday 3pm
NO
```

<Check>Action canceled, no event created</Check>

## Heartbeats

```
/heartbeats morning on
/heartbeats weekly on
/heartbeats
```

<Check>Both jobs show enabled with schedule</Check>

Check cron service logs for one execution cycle:

<Check>Logs show `sent`, `skippedNotDue`, or `skippedDuplicate` (not `failed`)</Check>
<Check>No duplicate sends</Check>

## Failure Handling

1. Temporarily break `OPENWEATHER_API_KEY` in Railway
2. Ask: "What's the weather?"
3. Restore the key

<Check>Graceful error response (no crash)</Check>
<Check>Normal behavior returns after restore</Check>

## Sign-Off

All must be true before marking deployment complete:

* [ ] `pnpm check` passed on release commit
* [ ] Ownership claim: works once, replay fails
* [ ] Unauthorized users blocked
* [ ] OAuth connect/disconnect works
* [ ] Write confirmation gate works (correct code, wrong code, cancel)
* [ ] Read paths work (calendar, gmail, weather)
* [ ] Heartbeats fire only when due, no duplicates
* [ ] No critical errors in logs during test window
