<!-- App Care — Heystack docs. Rendered: https://heystack.dev/docs/app-care · Index: https://heystack.dev/llms.txt -->
# App Care

App Care watches the customer journeys you choose, keeps evidence when an outcome fails, and can carry a supported repair through preparation, approval, deployment, and verified recovery.

App Care is released behind a workspace rollout gate. A workspace where it is not enabled receives `404 {"error":"app_care_not_enabled"}` from `/api/care/*`. This avoids showing care data before its durable database migration and recovery connection are ready.

## Journeys and checkups

A journey checks an outcome you define. Choose an HTTP check with expected status, response text, JSON values, content type, or latency; or a browser check with click, fill, text, and URL steps. Browser checks require at least one outcome assertion. Choose a check interval of 5 minutes to 24 hours. Heystack records each real result; a network error is **unknown**, while an observed response that differs from the expectation is **failing**.

App Checkup uses the first enabled journey and reports public response and security-header observations. Missing headers are hardening gaps, not proof of a vulnerability or attack. HTTP checks accept public hostnames on normal HTTP/HTTPS ports only. They reject credentials, IP literals, local/reserved names, common DNS-to-IP alias domains, and unsafe redirects. Checks time out and do not retain response bodies.

### Where these live in the console

Journeys, repair permissions and the code repository are settings for each app: **Settings › App › Journeys to watch**, **Repair permissions** and **Code repository**. A journey shows **Unknown** until a recent check confirms it, and a passing result is described as "Check passing", not as proof that a whole flow works for customers. If App Care isn't turned on for your workspace, these sections say so instead of showing an empty list. Admins add and edit every kind of journey there, including browser steps, extra allowed origins and the test sign-in a step uses; members can read them. Each journey's recent runs, with the evidence for every expectation, open from its row; anyone with write access can also run a journey now, press **Run a check** (which runs the first enabled journey and records it, so it can open an issue) and test a preview address from the same section. Members can read the repair permissions but only admins can change them.

## Incidents and investigations

A failed outcome opens or updates one incident for that journey. The incident keeps the exact check result as evidence. An AI investigation uses the stored incident evidence to summarize confirmed observations separately from open questions; a factual summary remains available when AI is unavailable. Heystack does not turn a release association or an HTTP failure into an asserted root cause.

Passing checks do not silently erase an incident. Recovery has its own proof and timestamp.

## Recovery modes

The per-app action policy has four modes:

- **Watch** records checks and incidents.
- **Prepare** can ask the configured recovery service to prepare an allowed repair, but cannot deploy it.
- **Supervised** lets an Admin approve and execute a prepared repair.
- **Autopilot** may execute only explicitly allowed, supported low-risk action kinds within the daily action budget. Initial autopilot actions are deployment rollback and configuration restore. Source patches stay supervised. Autopilot runs a prepared repair on its own only when an Admin requested it; a repair requested by a Member always waits for an Admin to approve it, even under Autopilot.

Every repair is fenced to the fresh release observed in your server's telemetry (future-dated data is ignored). Only data sent with your server key (`sk_live_…`) counts: browser and mobile keys can't set the release, because Heystack records which kind of key sent each event and ignores any claim the sender makes about it. If your server hasn't reported in the last 15 minutes, the release reads as unknown and repairs wait. Source repairs require a full 40-character repository commit. A rollback can only target a release Heystack has seen your server report in the last 30 days, and never the current one. If the app deploys again, its policy changes, a verification journey changes, required checks do not pass, or another action is active for the app, execution stops.

The recovery service uses a configured GitHub repository and a pinned workflow. An app has one repository setting: connecting a repository also becomes the repository behind the app's commit links, and editing the app's repository later does not change what recovery uses. It prepares a pull request or change set, reports actual checks, and runs the approved deployment. A missing connector or executor is reported as unavailable; Heystack never simulates a successful repair.

If the result of a GitHub dispatch is uncertain, Heystack keeps the preparation or action nonterminal and blocks another recovery action for that app. The activity feed marks the dispatch as needing reconciliation. An Admin can attach an existing run only after the recovery service verifies its repository, workflow, request title, fenced commit, and creation time. The other choice requires an explicit confirmation that GitHub did not dispatch the run. Reconciliation is idempotent and does not redispatch work.

Policy changes, connector changes, repair approvals, execution requests, reconciliation decisions, and recovery receipts are recorded in the app activity feed with the responsible actor where applicable. Connector tokens are write-only and are never included in activity details.

## What “recovered” means

An executor reporting success starts verification; it does not close the incident. Heystack waits through a real five-minute observation window, requires the deployed release to appear in fresh production telemetry, rejects any failure or unavailable check observed during the window, and runs the unchanged verification journeys again.

Only then does it create a recovery receipt with the deployed release, journey runs, observation window, evidence, and remaining uncertainty. Results from scheduled journey checks are labelled synthetic. Until real customer traffic is measured, the receipt says so.

See [GitHub recovery](https://heystack.dev/docs/recovery-connector) to configure the executor and [REST API](https://heystack.dev/docs/api) for the full route list.

## Browser outcomes and preview checks

Browser journeys run in isolated browser sessions. Additional origins must be explicitly allowed. A blocked dependency or unavailable browser is unknown, not a passing check. Use disposable test data: fill values are stored with the journey, so do not put passwords, access tokens, or real payment details in them. Saved test sign-ins (dedicated, disposable accounts whose passwords are encrypted and never shown again) can be filled into steps, and a journey can switch to a second sign-in in a fresh browser context to look for one account's content and confirm it is absent for the other. Sign-in journeys need an `https://` start URL. A pass confirms only the steps you configured; it does not show that authorization is sound everywhere. Sign-in is a username and password only: single sign-on, multi-factor prompts and CAPTCHAs are not supported, a journey can use at most two sign-ins, and sessions don't carry over between runs.

### Care checks don't count as your users

Every request a journey or checkup makes tells your app it comes from Heystack: HTTP checks send the user agent `Heystack-Care/1.0`, browser journeys use the user agent `Heystack-Care/1.0 (journey)`, and both send the header `x-heystack-synthetic: 1`. When your app's telemetry for those requests reaches Heystack, it is marked as synthetic (Care) traffic.

Synthetic traffic is left out of **Users & sessions** (the people and visit lists), Activity, key events and AI health, so a test sign-in never shows up as a customer and a check never inflates your usage. It is still stored, so a trace from a failing check stays available as evidence. The request-rate, error and latency charts and other existing dashboards still include it for now.

For the marking to reach your server-side telemetry, keep the user agent on your request spans (most web frameworks record it by default). If your app strips or rewrites it, allow the `x-heystack-synthetic` header through. Firewall or bot rules that block unknown user agents may need an exception for `Heystack-Care/`.

**Settings › App › Journeys to watch** keeps the latest 20 runs with the actual assertion evidence. Editing a check resets its current result; old checks cannot establish that the new expectation passes. Browser journeys and preview checks are serialized per app to avoid overlapping side effects.

**Test a preview** (the **Check a preview before you release** card on the same screen) runs up to five selected journeys against a preview URL and records the result without changing production health. A journey that signs in with a saved test identity only runs against an `https://` preview (and an `https://` production URL); otherwise it is reported as unknown and no credentials are typed. It verifies the configured outcomes, not every feature or authorization boundary. A preview check does not replay a browser journey that has additional production origins configured; that check remains unknown instead of contacting those origins from the preview.

## Source repairs and security findings

For a source repair, an administrator can select a bounded list of source files. Heystack prepares a draft pull request against the observed commit, runs the repository's configured tests, and requires approval before deployment. Repository workflow and deployment setup are required; source repair is never an unrestricted code agent.

Settings can import the details of up to 10 current GitHub dependency, code-scanning, and secret-scanning findings per source through the recovery connection; Issues lists those, and more may be open on GitHub than are listed. The response marks a truncated source, and missing permissions or unavailable scanners remain unknown. Secret values are never returned. Journey evidence and recovery receipts state the checks performed and what remains unmeasured.

The saved findings now appear as security issues in Issues, visible to organization admins only (see [Security](https://heystack.dev/docs/security)). A finding closes when a complete scan no longer lists it, and a scan that cannot reach GitHub never closes anything.

## Preparing and tracking a repair from the issue page

A journey problem is an issue, and its **Fix** section covers the repair path: **Investigate**, **Prepare a fix**, **Refresh plan**, approval, start, and **Check status**. Approving shows exactly what will run first (approach, target, prepared change, pre-checks and the journeys to re-check). Preparing a repair takes the same inputs as before (the approach, what it should do, and for a patch the files it may touch, which only an admin can set) and re-runs the incident's journey as the independent check. Whether the repair ran and whether it worked are always shown separately: the **Confirm it's fixed** section reads **Unknown** or "Fix ran — not confirmed yet" until a recovery receipt from an independent check shows a pass. The receipts, and the runs they follow, are listed under that section's **Technical detail**.
