# Parity — hedgedoc

HedgeDoc (formerly CodiMD) is a collaborative real-time markdown editor. It is a single-service
app backed by sqlite (default) or PostgreSQL, with a Node.js backend on port 3000.

The upstream recipe-maintainer corpus (`recipe-info/hedgedoc/tests/`) does not exist, so this
PARITY.md documents the cc-ci-authored suite as the baseline.

## Recipe-specific tests (Phase mirror, ≥2 functional tests)

HedgeDoc's defining behaviors:
- Root path (`/`) responds 200 or 302 (redirect to `/login` or `/new` depending on auth config).
- Served HTML contains HedgeDoc/CodiMD branding markers + bundled JS/CSS assets.

| cc-ci file | what's verified | rationale |
|---|---|---|
| `tests/hedgedoc/custom/test_health_check.py` | `GET /` → 200 or 302 | Proves the app is up and routing through Traefik. A wedged HedgeDoc returns 5xx or no response. |
| `tests/hedgedoc/custom/test_branding.py` | `GET /` HTML contains hedgedoc/codimd/hackmd markers OR bundle asset refs | Distinguishes "HedgeDoc is serving its own content" from "fallback page." A misrouted or empty backend lacks these markers. |

## Backup data-integrity

The default compose.yml includes `backupbot.backup=${ENABLE_BACKUPS:-true}`. HedgeDoc stores data
in `codimd_database` (sqlite) and `codimd_uploads` volumes. The generic backup tier verifies a
snapshot artifact is produced. Recipe-specific backup data-integrity overlay (ops.py +
test_backup.py) is deferred; the generic tier suffices for initial enrollment.

## Playwright

Not yet authored. A Playwright flow would create an anonymous note, assert the content persists,
and verify the collaborative editor loads. Deferred — the current functional tests plus the
generic Playwright `assert_serving` pass the enrollment bar.

## Deferred

- Playwright note-creation + persistence flow
- ops.py pre_backup/pre_restore with note content verification
- PostgreSQL variant (`compose.postgresql.yml`) — current tests target sqlite (default)
