@rehearsal-db/core 0.1.0-beta.4 → 0.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -1
- package/COMPATIBILITY.md +5 -0
- package/README.md +105 -368
- package/SECURITY.md +2 -1
- package/SUPPORT.md +5 -0
- package/docs/adapters.md +5 -0
- package/docs/baselines.md +81 -22
- package/docs/commands.md +76 -64
- package/docs/configuration.md +47 -4
- package/docs/getting-started.md +87 -218
- package/docs/glossary.md +7 -8
- package/docs/sanitization.md +8 -5
- package/docs/security-model.md +5 -1
- package/docs/troubleshooting.md +46 -1
- package/docs/tutorial.md +70 -59
- package/package.json +5 -3
- package/scripts/lib/rehearsal/baseline_preparation.mjs +138 -23
- package/scripts/lib/rehearsal/configuration.d.mts +18 -3
- package/scripts/lib/rehearsal/configuration.mjs +227 -56
- package/scripts/lib/rehearsal/diagnostics.mjs +4 -2
- package/scripts/lib/rehearsal/input_discovery.mjs +155 -0
- package/scripts/lib/rehearsal/plan.mjs +85 -10
- package/scripts/lib/rehearsal/policy_review.mjs +45 -5
- package/scripts/lib/rehearsal/runtime_restore.mjs +6 -2
- package/scripts/lib/rehearsal/setup.mjs +60 -28
- package/scripts/lib/rehearsal/support_report.mjs +102 -0
- package/scripts/lib/runtime/postgresql_runtime.mjs +772 -0
- package/scripts/lib/runtime/runtime_target.mjs +41 -0
- package/scripts/lib/runtime/supabase_runtime.mjs +790 -0
- package/scripts/operations/database/manage_rehearsal_database.mjs +6 -785
- package/scripts/operations/rehearsal/rehearsal_cli.mjs +522 -149
package/docs/getting-started.md
CHANGED
|
@@ -1,282 +1,151 @@
|
|
|
1
1
|
# Getting started
|
|
2
2
|
|
|
3
|
-
This guide
|
|
4
|
-
|
|
3
|
+
This guide sets up Rehearsal in an existing project. It creates a disposable database on
|
|
4
|
+
your computer and never connects to a hosted database.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Want to experiment first? Use the [safe hands-on tutorial](tutorial.md).
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- npm
|
|
10
|
-
- Supabase CLI 2.117.0 (the version proved by package CI)
|
|
11
|
-
- Docker Desktop, Colima, or another Docker-compatible engine
|
|
12
|
-
- a Supabase project with timestamped SQL migrations
|
|
8
|
+
## 1. Check the required tools
|
|
13
9
|
|
|
14
|
-
|
|
10
|
+
You need Node.js 24, npm, and a running Docker-compatible engine:
|
|
15
11
|
|
|
16
12
|
```bash
|
|
17
13
|
node --version
|
|
18
14
|
npm --version
|
|
19
|
-
supabase --version
|
|
20
15
|
docker info
|
|
21
16
|
```
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
`node --version` must begin with `v24`. If `docker info` fails, start Docker Desktop,
|
|
19
|
+
Colima, or your usual Docker engine.
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
npm ci --ignore-scripts
|
|
28
|
-
npm run test:fixture
|
|
29
|
-
```
|
|
21
|
+
Choose the extra requirement for your project:
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
its labeled local runtime. It does not need a hosted Supabase project or credentials.
|
|
23
|
+
- **Supabase:** install Supabase CLI 2.117.0 and run `supabase --version`.
|
|
24
|
+
- **PostgreSQL:** download the local database image once:
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
```bash
|
|
27
|
+
docker pull postgres:17-alpine
|
|
28
|
+
```
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
Rehearsal will use that image with downloads disabled.
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
## 2. Install and open the guide
|
|
33
|
+
|
|
34
|
+
Run these commands from the directory containing your project's `package.json`:
|
|
42
35
|
|
|
43
36
|
```bash
|
|
44
37
|
npm install --save-dev @rehearsal-db/core@beta
|
|
45
38
|
npx rehearsal
|
|
46
39
|
```
|
|
47
40
|
|
|
48
|
-
Choose **Set
|
|
49
|
-
|
|
50
|
-
`.gitignore` entries before asking permission to write. The guide remains open afterward
|
|
51
|
-
and recommends the next incomplete stage.
|
|
41
|
+
Choose **Set the stage**, then choose Supabase or PostgreSQL. Rehearsal previews every file
|
|
42
|
+
before asking to create it. It will not replace an existing file.
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
Review the generated `rehearsal.config.mjs`, especially:
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```
|
|
46
|
+
- the migration directory;
|
|
47
|
+
- the application start and proof commands;
|
|
48
|
+
- the local ports.
|
|
59
49
|
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
The proof command should check behavior changed by the migration. A test that only checks
|
|
51
|
+
whether the home page loads is usually too weak.
|
|
62
52
|
|
|
63
|
-
|
|
64
|
-
project ID, application commands, and project-owned input paths. Do not run `doctor`
|
|
65
|
-
until the next section's files exist.
|
|
53
|
+
## 3. Prepare safe baseline inputs
|
|
66
54
|
|
|
67
|
-
|
|
55
|
+
A **baseline** is the locked starting point restored before each rehearsal. Start with a
|
|
56
|
+
small synthetic dataset. Do not use raw production data.
|
|
68
57
|
|
|
69
|
-
|
|
58
|
+
Rehearsal needs:
|
|
70
59
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
| Input | What it contains |
|
|
61
|
+
| ------------------- | ---------------------------------------------------- |
|
|
62
|
+
| Records | Safe rows in NDJSON format: one JSON object per line |
|
|
63
|
+
| Migration ledger | The historical migrations represented by those rows |
|
|
64
|
+
| Sanitization policy | A decision for every included table and column |
|
|
65
|
+
| Storage manifest | Optional Supabase Storage files only |
|
|
75
66
|
|
|
76
|
-
|
|
67
|
+
A record looks like this:
|
|
77
68
|
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
cp supabase/config.toml infrastructure/rehearsal/supabase/config.toml
|
|
69
|
+
```json
|
|
70
|
+
{ "table": "widgets", "row": { "id": 1, "name": "Synthetic Widget" } }
|
|
81
71
|
```
|
|
82
72
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
Put your safe records and ledger inside the project. Conventional names such as
|
|
74
|
+
`rehearsal/sanitized-data.ndjson` and `rehearsal/migration-ledger.json` are discovered
|
|
75
|
+
automatically. The guide inspects their structure but does not print row values.
|
|
86
76
|
|
|
87
|
-
|
|
88
|
-
`verification.commands` with real commands from your project. The proof should check a
|
|
89
|
-
restored relationship and the candidate schema—not merely that `/` returns 200.
|
|
77
|
+
Follow the guide's recommended actions:
|
|
90
78
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
1. **Prepare the script** creates a draft sanitization policy.
|
|
80
|
+
2. **Review the script** asks you to classify every table and column.
|
|
81
|
+
3. **Create the baseline** validates and activates the reviewed inputs.
|
|
94
82
|
|
|
95
|
-
|
|
96
|
-
their table and column shape into a fail-closed policy draft without printing values:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
npx rehearsal baseline prepare \
|
|
100
|
-
--records=rehearsal/synthetic-data.ndjson \
|
|
101
|
-
--ledger=rehearsal/migration-ledger.json
|
|
102
|
-
npx rehearsal baseline prepare \
|
|
103
|
-
--records=rehearsal/synthetic-data.ndjson \
|
|
104
|
-
--ledger=rehearsal/migration-ledger.json \
|
|
105
|
-
--write
|
|
106
|
-
```
|
|
83
|
+
Rehearsal will not activate a policy containing undecided fields.
|
|
107
84
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
85
|
+
The ledger must describe the exact historical SQL included in the baseline. Do not type
|
|
86
|
+
years of migration history by hand for a real project. Generate it through reviewed
|
|
87
|
+
project tooling. The [tutorial](tutorial.md) contains a complete synthetic example, and
|
|
88
|
+
[Baselines](baselines.md) explains the file formats.
|
|
112
89
|
|
|
113
|
-
|
|
114
|
-
`"draft": true` only after that review. Rehearsal refuses to activate a draft.
|
|
90
|
+
## 4. Reach READY
|
|
115
91
|
|
|
116
|
-
|
|
92
|
+
The guide displays four setup stages. Continue with its recommended action until all
|
|
93
|
+
checks are complete and the project reports `READY`.
|
|
117
94
|
|
|
118
|
-
|
|
119
|
-
create table public.widgets (
|
|
120
|
-
id bigint generated by default as identity primary key,
|
|
121
|
-
name text not null,
|
|
122
|
-
created_at timestamptz not null default now()
|
|
123
|
-
);
|
|
95
|
+
You can run the same check directly:
|
|
124
96
|
|
|
125
|
-
|
|
126
|
-
|
|
97
|
+
```bash
|
|
98
|
+
npx rehearsal doctor
|
|
127
99
|
```
|
|
128
100
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"policyVersion": 1,
|
|
134
|
-
"migrationCutoff": "20260101000000",
|
|
135
|
-
"tables": [
|
|
136
|
-
{
|
|
137
|
-
"name": "widgets",
|
|
138
|
-
"group": "synthetic",
|
|
139
|
-
"sourceRows": "STREAM AND SANITIZE",
|
|
140
|
-
"columns": [
|
|
141
|
-
{
|
|
142
|
-
"name": "id",
|
|
143
|
-
"action": "KEEP EXACTLY",
|
|
144
|
-
"generated": "NEVER",
|
|
145
|
-
"identity": "YES",
|
|
146
|
-
"foreignKey": null
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "name",
|
|
150
|
-
"action": "REPLACE WITH SYNTHETIC",
|
|
151
|
-
"generated": "NEVER",
|
|
152
|
-
"identity": "NO",
|
|
153
|
-
"foreignKey": null
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"name": "created_at",
|
|
157
|
-
"action": "DERIVE",
|
|
158
|
-
"generated": "NEVER",
|
|
159
|
-
"identity": "NO",
|
|
160
|
-
"foreignKey": null
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
```
|
|
101
|
+
If it reports `NOT READY`, fix the listed item and run it again. Do not bypass a check or
|
|
102
|
+
add a hosted connection string.
|
|
167
103
|
|
|
168
|
-
|
|
104
|
+
## 5. Run the rehearsal
|
|
169
105
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"table": "widgets",
|
|
173
|
-
"row": {
|
|
174
|
-
"id": 1,
|
|
175
|
-
"name": "Synthetic Widget",
|
|
176
|
-
"created_at": "2026-01-01T00:00:00.000Z"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
```
|
|
106
|
+
Choose **Run a rehearsal**. Rehearsal shows the exact candidate migrations and asks for
|
|
107
|
+
confirmation before it changes the disposable runtime.
|
|
180
108
|
|
|
181
|
-
|
|
109
|
+
A successful run:
|
|
182
110
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"name": "create_widgets",
|
|
188
|
-
"statements": [
|
|
189
|
-
"create table public.widgets (\n\tid bigint generated by default as identity primary key,\n\tname text not null,\n\tcreated_at timestamptz not null default now()\n)",
|
|
190
|
-
"insert into storage.buckets (id, name, public)\nvalues ('fixture-assets', 'fixture-assets', false)"
|
|
191
|
-
]
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
```
|
|
111
|
+
1. restores the baseline;
|
|
112
|
+
2. applies only the migrations you approved;
|
|
113
|
+
3. verifies the local database;
|
|
114
|
+
4. runs your application proof.
|
|
195
115
|
|
|
196
|
-
|
|
197
|
-
statements must exactly represent the historical migration bytes in the baseline. SQL
|
|
198
|
-
that is merely equivalent is rejected. For a production-shaped baseline, generate this
|
|
199
|
-
ledger through the project's reviewed source/export tooling; do not reconstruct years of
|
|
200
|
-
history by hand.
|
|
116
|
+
Your original baseline remains unchanged.
|
|
201
117
|
|
|
202
|
-
|
|
118
|
+
## 6. Test and clean up
|
|
203
119
|
|
|
204
|
-
|
|
205
|
-
npx rehearsal baseline create \
|
|
206
|
-
--records=rehearsal/synthetic-data.ndjson \
|
|
207
|
-
--ledger=rehearsal/migration-ledger.json
|
|
208
|
-
```
|
|
120
|
+
Use the guide for normal runtime tasks:
|
|
209
121
|
|
|
210
|
-
|
|
122
|
+
- **Verify** checks the current runtime.
|
|
123
|
+
- **Reset** discards runtime edits and restores the baseline.
|
|
124
|
+
- **Stop** stops the runtime but keeps its local state.
|
|
125
|
+
- **Discard** removes this project's disposable runtime and volume.
|
|
211
126
|
|
|
212
|
-
|
|
127
|
+
Press `Ctrl+Z` at any prompt to exit the entire guide. It will not leave a suspended
|
|
128
|
+
process behind.
|
|
213
129
|
|
|
214
|
-
|
|
215
|
-
Activated synthetic baseline ...: 1 rows across 1 tables; 1 migrations through 20260101000000.
|
|
216
|
-
```
|
|
130
|
+
## Command-line setup
|
|
217
131
|
|
|
218
|
-
|
|
132
|
+
The guide is recommended for people. Scripts and CI can use explicit commands:
|
|
219
133
|
|
|
220
134
|
```bash
|
|
135
|
+
npx rehearsal setup --target=postgresql --write
|
|
221
136
|
npx rehearsal doctor
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Do not continue until it ends with `READY`. Doctor checks the local-only boundary,
|
|
225
|
-
dependencies, artifact integrity, migration lineage, ports, and project commands.
|
|
226
|
-
|
|
227
|
-
If it reports `NOT READY`, fix each named prerequisite and rerun it. Do not bypass a
|
|
228
|
-
check or copy a hosted connection string into the generated runtime environment.
|
|
229
|
-
|
|
230
|
-
## 4. Review pending work
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
npx rehearsal explain
|
|
234
137
|
npx rehearsal candidates
|
|
235
|
-
npx rehearsal
|
|
236
|
-
npx rehearsal inspect migrations
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
The plan prints an exact candidate digest. It does not start services or change data.
|
|
240
|
-
|
|
241
|
-
## 5. Run the rehearsal
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
npx rehearsal run --confirm-candidates=<sha256>
|
|
138
|
+
npx rehearsal run --confirm-candidates=PASTE_DIGEST_HERE
|
|
245
139
|
```
|
|
246
140
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
database is writable, so you can test real application changes without mutating the
|
|
250
|
-
baseline.
|
|
251
|
-
|
|
252
|
-
## 6. Work, verify, and reset
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
npx rehearsal status
|
|
256
|
-
npx rehearsal start
|
|
257
|
-
npx rehearsal verify
|
|
258
|
-
npx rehearsal reset
|
|
259
|
-
npx rehearsal stop
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Changes persist in the disposable runtime until `reset` or runtime removal. `start`
|
|
263
|
-
resumes that runtime without resetting it. `reset` restores the exact baseline. `stop`
|
|
264
|
-
stops only this project's runtime.
|
|
265
|
-
|
|
266
|
-
## Next steps
|
|
267
|
-
|
|
268
|
-
- Follow [the full tutorial](tutorial.md).
|
|
269
|
-
- Read [the security model](security-model.md) before designing a production export.
|
|
270
|
-
- Define an exhaustive [sanitization policy](sanitization.md).
|
|
271
|
-
- Learn the [baseline lifecycle](baselines.md).
|
|
141
|
+
Replace `postgresql` with `supabase` when needed. See [CLI commands](commands.md) for the
|
|
142
|
+
complete reference and [Troubleshooting](troubleshooting.md) when a check fails.
|
|
272
143
|
|
|
273
|
-
##
|
|
144
|
+
## Files Rehearsal creates
|
|
274
145
|
|
|
275
|
-
- `rehearsal.config.mjs`
|
|
276
|
-
|
|
277
|
-
- `.rehearsal/
|
|
278
|
-
-
|
|
279
|
-
- `.rehearsal/runtime/` contains the disposable local Supabase project and receipts.
|
|
280
|
-
- `.rehearsal/runtime.env` contains generated loopback-only application credentials.
|
|
146
|
+
- `rehearsal.config.mjs` — reviewed project configuration
|
|
147
|
+
- `.rehearsal/` — ignored baselines, runtime files, and receipts
|
|
148
|
+
- `.rehearsal/runtime.env` — generated local-only application variables
|
|
149
|
+
- `infrastructure/rehearsal/supabase/config.toml` — Supabase-only local configuration
|
|
281
150
|
|
|
282
|
-
|
|
151
|
+
Keep `.rehearsal/` out of source control, even when its data is synthetic.
|
package/docs/glossary.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Glossary
|
|
1
|
+
# Glossary
|
|
2
2
|
|
|
3
3
|
**Baseline** — immutable sanitized starting artifact.
|
|
4
4
|
|
|
@@ -19,13 +19,12 @@ baseline.
|
|
|
19
19
|
|
|
20
20
|
```mermaid
|
|
21
21
|
flowchart LR
|
|
22
|
-
A[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
E --> F
|
|
27
|
-
F --> G[
|
|
28
|
-
G --> H[Verified local receipt]
|
|
22
|
+
A[Safe rows] --> B[Locked baseline]
|
|
23
|
+
C[Migration files] --> D[Reviewed plan]
|
|
24
|
+
B --> E[Disposable local database]
|
|
25
|
+
D --> E
|
|
26
|
+
E --> F[Application proof]
|
|
27
|
+
F --> G[Verified result]
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
The reusable package owns the path from a completed baseline plus migration directory to
|
package/docs/sanitization.md
CHANGED
|
@@ -19,11 +19,14 @@ whether it is an identity column, and its foreign-key target or explicit absence
|
|
|
19
19
|
draft uses `REVIEW REQUIRED` placeholders and cannot be activated until they are
|
|
20
20
|
replaced and the `draft` marker is removed.
|
|
21
21
|
|
|
22
|
-
In an interactive terminal, the guided **Review the script** action
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
In an interactive terminal, the guided **Review the script** action works table by table.
|
|
23
|
+
For larger tables, a human can explicitly apply safe defaults (`REPLACE`, `NEVER`
|
|
24
|
+
generated, `NO` identity, and no foreign key), then review only exceptions. Likely
|
|
25
|
+
structural columns such as `id`, `*_id`, and timestamps start selected as exceptions.
|
|
26
|
+
Users can instead review every column individually. Retaining a value is explicitly
|
|
27
|
+
labeled as sensitive, every saved field remains classified, and no preset is silently
|
|
28
|
+
applied. The reviewer validates the completed policy and refuses to overwrite a draft
|
|
29
|
+
changed during the session.
|
|
27
30
|
|
|
28
31
|
The package exports `validateSanitizationCoverage` and
|
|
29
32
|
`applySanitizationAction` as generic primitives:
|
package/docs/security-model.md
CHANGED
|
@@ -13,12 +13,16 @@ changed migration history, incomplete artifacts, or an unverified runtime.
|
|
|
13
13
|
## Independent barriers
|
|
14
14
|
|
|
15
15
|
- loopback-only application and service URLs;
|
|
16
|
-
- a dedicated unlinked Supabase workdir and
|
|
16
|
+
- a dedicated unlinked Supabase workdir, or an exactly named and labeled PostgreSQL
|
|
17
|
+
container and volume;
|
|
17
18
|
- exact non-overlapping local ports;
|
|
18
19
|
- a clean child-process environment that omits hosted credentials;
|
|
19
20
|
- immutable baseline files and checksums;
|
|
20
21
|
- exact migration-prefix and candidate digests;
|
|
21
22
|
- local runtime labels used for bounded stop/removal;
|
|
23
|
+
- PostgreSQL images must already exist locally and are never pulled implicitly;
|
|
24
|
+
- plain PostgreSQL receives a fresh random password per disposable runtime, retained
|
|
25
|
+
only in owner-readable ignored runtime files;
|
|
22
26
|
- successful receipts written only after verification.
|
|
23
27
|
|
|
24
28
|
No single environment variable or config edit should redirect the tool to production.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
|
+
Start with:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx rehearsal doctor
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Doctor names each missing or unsafe item. If you still need help, run
|
|
10
|
+
`npx rehearsal support`, review the report, and attach it to a GitHub issue.
|
|
11
|
+
|
|
12
|
+
## `npx rehearsal` cannot find the command
|
|
13
|
+
|
|
14
|
+
Confirm you are in the project directory and install the beta locally:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install --save-dev @rehearsal-db/core@beta
|
|
18
|
+
npx rehearsal --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Do not use `sudo` or require a global install.
|
|
22
|
+
|
|
3
23
|
## Setup says Node.js 24 is required
|
|
4
24
|
|
|
5
25
|
Rehearsal intentionally supports one maintained Node.js major in its first beta. Switch
|
|
@@ -19,12 +39,32 @@ writes setup files.
|
|
|
19
39
|
Start Docker Desktop or Colima, confirm `docker info`, then rerun `rehearsal doctor`.
|
|
20
40
|
Restarting the computer is rarely necessary.
|
|
21
41
|
|
|
42
|
+
## The guide does not show styled menus
|
|
43
|
+
|
|
44
|
+
Rehearsal uses numbered menus when terminal styling is unavailable, `NO_COLOR` is set, or
|
|
45
|
+
`--plain` is used. Enter the number beside your choice. This is the same workflow and has
|
|
46
|
+
the same safety checks.
|
|
47
|
+
|
|
48
|
+
If bare `npx rehearsal` prints help, the command is not connected to an interactive
|
|
49
|
+
terminal. Run it directly in a terminal rather than through a pipe or background task.
|
|
50
|
+
|
|
51
|
+
## Doctor says the PostgreSQL image is unavailable
|
|
52
|
+
|
|
53
|
+
Rehearsal will not download an image during a rehearsal. Pull and review the exact image
|
|
54
|
+
declared in `rehearsal.config.mjs`, then rerun Doctor:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
docker pull postgres:17-alpine
|
|
58
|
+
npx rehearsal doctor
|
|
59
|
+
```
|
|
60
|
+
|
|
22
61
|
## A port is already in use
|
|
23
62
|
|
|
24
63
|
Rerun `rehearsal setup` to select a different available block. Setup checks both active
|
|
25
64
|
listeners and whether every selected port can be bound, then checks again before writing.
|
|
26
65
|
For an existing configuration, choose unique non-privileged ports and mirror them in the
|
|
27
|
-
dedicated Supabase config. Do not stop an unrelated database to make
|
|
66
|
+
dedicated Supabase config when using Supabase. Do not stop an unrelated database to make
|
|
67
|
+
defaults fit.
|
|
28
68
|
|
|
29
69
|
## Baseline checksum mismatch
|
|
30
70
|
|
|
@@ -62,5 +102,10 @@ is the local Auth callback. Do not paste provider secrets into config or termina
|
|
|
62
102
|
`reset` deliberately restores the immutable baseline. `stop` should preserve Docker
|
|
63
103
|
state, but runtime removal or a failed migration discards untrusted state.
|
|
64
104
|
|
|
105
|
+
## `Ctrl+Z` exits instead of suspending
|
|
106
|
+
|
|
107
|
+
This is intentional inside the guided interface. It exits the entire Rehearsal session
|
|
108
|
+
and restores the terminal. Choose **Exit** for the same result.
|
|
109
|
+
|
|
65
110
|
Use `--debug` only after ordinary output is insufficient. Diagnostics are redacted, but
|
|
66
111
|
you should still review output before sharing it publicly.
|