@rehearsal-db/core 0.1.0-rc.9 → 1.0.1
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 +52 -1
- package/COMPATIBILITY.md +56 -8
- package/README.md +31 -12
- package/SECURITY.md +5 -3
- package/SUPPORT.md +4 -3
- package/dist/package.json +3 -3
- package/dist/scripts/install/create_root_config.mjs +9 -2
- package/dist/src/application/interactive_task.d.mts +2 -6
- package/dist/src/application/interactive_task.mjs +4 -13
- package/dist/src/application/session.d.mts +5 -8
- package/dist/src/application/session.mjs +44 -19
- package/dist/src/cli/arguments.mjs +8 -1
- package/dist/src/cli/rehearsal.mjs +27 -5
- package/dist/src/cli/runtime_commands.mjs +16 -17
- package/dist/src/cli/runtime_planning.mjs +6 -0
- package/dist/src/cli/terminal.mjs +24 -5
- package/dist/src/project/install_scaffold.mjs +7 -0
- package/dist/src/project/project_discovery_metadata.mjs +9 -11
- package/dist/src/runtime/persistence.mjs +6 -3
- package/dist/src/runtime/plan.mjs +26 -15
- package/dist/src/shared/cancellation.d.mts +3 -1
- package/dist/src/shared/cancellation.mjs +12 -4
- package/dist/src/shared/host_platform.d.mts +16 -0
- package/dist/src/shared/host_platform.mjs +109 -0
- package/dist/src/shared/process_environment.d.mts +2 -1
- package/dist/src/shared/process_environment.mjs +47 -5
- package/dist/src/shared/terminal_input.d.mts +25 -0
- package/dist/src/shared/terminal_input.mjs +129 -0
- package/docs/commands.md +17 -1
- package/docs/getting-started.md +48 -0
- package/docs/index.md +15 -9
- package/docs/releasing.md +50 -24
- package/docs/roadmap.md +8 -3
- package/docs/stability.md +48 -19
- package/docs/tutorial.md +1 -1
- package/docs/vscode.md +199 -41
- package/package.json +3 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/** Own terminal control bytes without suspending the invoking shell's npm job. */
|
|
2
|
+
const leases = new WeakMap();
|
|
3
|
+
export const hasTerminalInputLease = (input) => !!input && leases.has(input);
|
|
4
|
+
/** Prompt libraries may restore cooked mode; resume only a still-owned lease. */
|
|
5
|
+
export const reassertTerminalInputLease = (input) => {
|
|
6
|
+
if (!input || !leases.get(input)?.interactive)
|
|
7
|
+
return;
|
|
8
|
+
if (input.isRaw !== true)
|
|
9
|
+
input.setRawMode?.(true);
|
|
10
|
+
input.resume?.();
|
|
11
|
+
};
|
|
12
|
+
const restoreInput = (input, lease) => {
|
|
13
|
+
if (!lease.interactive)
|
|
14
|
+
return;
|
|
15
|
+
const errors = [];
|
|
16
|
+
try {
|
|
17
|
+
if (lease.changedRaw)
|
|
18
|
+
input.setRawMode?.(lease.wasRaw);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
errors.push(error);
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
// A previously untouched (null) stream must return to non-consuming mode,
|
|
25
|
+
// just like a previously paused stream; do not leave stdin keeping Node alive.
|
|
26
|
+
if (lease.wasFlowing)
|
|
27
|
+
input.resume?.();
|
|
28
|
+
else
|
|
29
|
+
input.pause?.();
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
errors.push(error);
|
|
33
|
+
}
|
|
34
|
+
if (errors.length === 1)
|
|
35
|
+
throw errors[0];
|
|
36
|
+
if (errors.length > 1)
|
|
37
|
+
throw new AggregateError(errors, "Terminal input restoration failed.");
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Raw input turns Ctrl+C/Ctrl+Z into bytes instead of kernel signals to the
|
|
41
|
+
* entire foreground npm/shell job. Signal handlers remain responsible for
|
|
42
|
+
* externally delivered signals. The final overlapping lease restores only the
|
|
43
|
+
* mode/flow state this owner acquired; a pre-existing raw terminal stays raw.
|
|
44
|
+
*/
|
|
45
|
+
export const acquireTerminalInput = (input, onInterrupt) => {
|
|
46
|
+
if (!input)
|
|
47
|
+
return Object.assign(() => undefined, { isCurrentOwner: () => true });
|
|
48
|
+
const owner = { interrupt: onInterrupt };
|
|
49
|
+
let lease = leases.get(input);
|
|
50
|
+
const first = !lease;
|
|
51
|
+
if (!lease) {
|
|
52
|
+
const owners = [];
|
|
53
|
+
lease = {
|
|
54
|
+
owners,
|
|
55
|
+
interactive: input.isTTY === true,
|
|
56
|
+
wasRaw: input.isRaw === true,
|
|
57
|
+
wasFlowing: input.readableFlowing === true,
|
|
58
|
+
changedRaw: input.isTTY === true &&
|
|
59
|
+
input.isRaw !== true &&
|
|
60
|
+
typeof input.setRawMode === "function",
|
|
61
|
+
dispatch: (chunk) => {
|
|
62
|
+
const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
63
|
+
const signal = bytes.includes(0x03)
|
|
64
|
+
? "SIGINT"
|
|
65
|
+
: bytes.includes(0x1a)
|
|
66
|
+
? "SIGTSTP"
|
|
67
|
+
: null;
|
|
68
|
+
// Capture one owner before dispatch: synchronous release must not deliver
|
|
69
|
+
// the same byte again to an outer operation.
|
|
70
|
+
const current = owners.at(-1);
|
|
71
|
+
if (signal)
|
|
72
|
+
current?.interrupt(signal);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
leases.set(input, lease);
|
|
76
|
+
}
|
|
77
|
+
lease.owners.push(owner);
|
|
78
|
+
try {
|
|
79
|
+
if (first && lease.changedRaw)
|
|
80
|
+
input.setRawMode(true);
|
|
81
|
+
if (first && lease.interactive)
|
|
82
|
+
input.prependListener("data", lease.dispatch);
|
|
83
|
+
if (lease.interactive)
|
|
84
|
+
input.resume?.();
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
const errors = [error];
|
|
88
|
+
lease.owners.splice(lease.owners.indexOf(owner), 1);
|
|
89
|
+
try {
|
|
90
|
+
if (first && lease.interactive)
|
|
91
|
+
input.removeListener("data", lease.dispatch);
|
|
92
|
+
}
|
|
93
|
+
catch (cleanupError) {
|
|
94
|
+
errors.push(cleanupError);
|
|
95
|
+
}
|
|
96
|
+
if (first) {
|
|
97
|
+
leases.delete(input);
|
|
98
|
+
try {
|
|
99
|
+
restoreInput(input, lease);
|
|
100
|
+
}
|
|
101
|
+
catch (cleanupError) {
|
|
102
|
+
errors.push(cleanupError);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (errors.length > 1)
|
|
106
|
+
throw new AggregateError(errors, "Terminal input could not be acquired or restored.");
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
let released = false;
|
|
110
|
+
const release = () => {
|
|
111
|
+
if (released)
|
|
112
|
+
return;
|
|
113
|
+
released = true;
|
|
114
|
+
lease.owners.splice(lease.owners.indexOf(owner), 1);
|
|
115
|
+
if (lease.owners.length === 0) {
|
|
116
|
+
leases.delete(input);
|
|
117
|
+
try {
|
|
118
|
+
if (lease.interactive)
|
|
119
|
+
input.removeListener("data", lease.dispatch);
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
restoreInput(input, lease);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
return Object.assign(release, {
|
|
127
|
+
isCurrentOwner: () => !released && lease.owners.at(-1) === owner,
|
|
128
|
+
});
|
|
129
|
+
};
|
package/docs/commands.md
CHANGED
|
@@ -324,7 +324,8 @@ Clients should disable conflicting actions unless the state is `idle`.
|
|
|
324
324
|
|
|
325
325
|
### Cancelling a mutation
|
|
326
326
|
|
|
327
|
-
`run`, `reset`, `migrate`,
|
|
327
|
+
`run`, `reset`, `migrate`, confirmed `refresh`, and direct or guided `open` preparation support
|
|
328
|
+
package-owned cancellation.
|
|
328
329
|
Send `SIGINT`, `SIGTERM`, `SIGHUP`, or `SIGTSTP` to the Rehearsal CLI process. Rehearsal
|
|
329
330
|
handles repeated delivery as one request, forwards it only to the detached process group
|
|
330
331
|
it launched, waits for package rollback and child cleanup, releases the project lock, and
|
|
@@ -343,6 +344,14 @@ The CLI does not stop Docker itself, signal unrelated processes, prune shared re
|
|
|
343
344
|
or delete unrelated volumes. `SIGTSTP` is treated as cancellation and becomes `SIGTERM`
|
|
344
345
|
for the owned child group instead of suspending it mid-cleanup. Windows uses direct child
|
|
345
346
|
signalling; the detached process-group guarantee is supported on macOS and Linux.
|
|
347
|
+
During an interactive cancellable operation, Rehearsal temporarily owns terminal control
|
|
348
|
+
input so `Ctrl+C` and `Ctrl+Z` request cleanup without suspending an invoking npm job.
|
|
349
|
+
It restores the terminal's previous raw mode and consuming/non-consuming input state
|
|
350
|
+
after cleanup. Piped input is not consumed by this shortcut.
|
|
351
|
+
For direct or guided `open`, cancellation before the ready attached session returns this same
|
|
352
|
+
exit `130` contract, including interruption during runtime preparation or application
|
|
353
|
+
readiness. A cancellation during the ready application's handoff stops that owned
|
|
354
|
+
application before returning; cleanup failure is not reported as clean cancellation.
|
|
346
355
|
|
|
347
356
|
`SIGKILL`, host shutdown, and a force-quit cannot produce a result or run cleanup. After
|
|
348
357
|
one of those events, clients must not guess: run `activity --json`. A `stale` or `invalid`
|
|
@@ -384,6 +393,13 @@ default `keep-until-stop` leaves databases running; `stop-on-application-exit` s
|
|
|
384
393
|
with database and Storage changes preserved. Likewise, `lifecycle.run` can remain
|
|
385
394
|
`keep-until-stop` or use `stop-after-run` for bounded automation. JSON results include
|
|
386
395
|
the selected mode, final runtime state, and preserved-data guarantee.
|
|
396
|
+
While the ready application or copied-account sign-in session is attached, terminal
|
|
397
|
+
`Ctrl+C` and `Ctrl+Z` are handled as control bytes rather than suspending npm wrappers.
|
|
398
|
+
Rehearsal restores the prior terminal mode after retiring its owned application; it
|
|
399
|
+
never resumes or signals an invoking shell, npm ancestor, or unrelated job.
|
|
400
|
+
Once the ready application is attached, its handled `Ctrl+C`, `Ctrl+Z`, `SIGINT`, or
|
|
401
|
+
`SIGTSTP` closes the session with exit `0` as before; it does not also cancel an outer
|
|
402
|
+
preparation owner. Nested input ownership dispatches a control byte only once.
|
|
387
403
|
|
|
388
404
|
## Clean up disk space
|
|
389
405
|
|
package/docs/getting-started.md
CHANGED
|
@@ -5,6 +5,54 @@ your computer. Normal setup and rehearsal commands never connect to a hosted dat
|
|
|
5
5
|
|
|
6
6
|
Want to experiment first? Use the [safe hands-on tutorial](tutorial.md).
|
|
7
7
|
|
|
8
|
+
## OS-specific setup files (optional)
|
|
9
|
+
|
|
10
|
+
Separate setup folders are available for
|
|
11
|
+
[Windows / WSL 2](https://github.com/Ddupasquier/rehearsal-db/tree/main/installers/windows),
|
|
12
|
+
[macOS](https://github.com/Ddupasquier/rehearsal-db/tree/main/installers/macos) and
|
|
13
|
+
[Linux](https://github.com/Ddupasquier/rehearsal-db/tree/main/installers/linux).
|
|
14
|
+
They are readable helpers, not native executables or bundled Node/Docker installers.
|
|
15
|
+
Existing Node.js 24 or 26 is required. The default only checks an existing project;
|
|
16
|
+
installation needs an explicit option and does not start a database. Review the
|
|
17
|
+
[shared behavior and release availability](https://github.com/Ddupasquier/rehearsal-db/blob/main/installers/README.md)
|
|
18
|
+
before choosing an install option. An exact core 1.0.1 install requires that version to
|
|
19
|
+
be published; a checked-in helper is not proof of publication.
|
|
20
|
+
|
|
21
|
+
### Windows: use a WSL 2 Linux workspace
|
|
22
|
+
|
|
23
|
+
The Windows compatibility route is Linux execution inside **WSL 2**, not a native
|
|
24
|
+
PowerShell/Command Prompt database runtime. Core 1.0.1 and extension 0.1.21 make that
|
|
25
|
+
boundary explicit; native Windows version/help/discovery do not authorize runtime work.
|
|
26
|
+
|
|
27
|
+
1. Follow Microsoft's [WSL installation guide](https://learn.microsoft.com/en-us/windows/wsl/install)
|
|
28
|
+
to prepare a WSL 2 Linux distribution, such as Ubuntu 24.04. Do not use WSL 1.
|
|
29
|
+
2. Clone or open the project inside the distribution's Linux home directory, such as
|
|
30
|
+
`/home/your-name/projects/app`. Do not keep the runtime project under `/mnt/c`, a
|
|
31
|
+
Windows share or a Windows-mounted drive. Rehearsal does not relocate your files.
|
|
32
|
+
3. Install a supported **Linux** Node/npm and a Docker-compatible Linux engine in that
|
|
33
|
+
environment. Docker Engine in WSL or an already configured Docker Desktop WSL
|
|
34
|
+
integration are user-controlled setup choices; Rehearsal does not install or license
|
|
35
|
+
Docker Desktop for you. In the Linux terminal, check:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node -p "process.platform"
|
|
39
|
+
pwd
|
|
40
|
+
docker info --format '{{.OSType}}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Both platform results must be `linux`, and `pwd` must be in the Linux filesystem.
|
|
44
|
+
|
|
45
|
+
4. For editor use, install Microsoft's **WSL** extension, then run `code .` from that
|
|
46
|
+
Linux project directory. Confirm the VS Code window says **WSL** in its remote
|
|
47
|
+
indicator, and install Rehearsal into **WSL**, not only the Windows-side extension host.
|
|
48
|
+
5. Continue below from that Linux terminal. Keep the existing baseline, approval and
|
|
49
|
+
local-only checks; do not substitute a hosted database to make setup pass.
|
|
50
|
+
|
|
51
|
+
WSL is a compatibility preview. A real WSL PostgreSQL fixture and a native Remote-WSL
|
|
52
|
+
editor walkthrough are different evidence; do not infer the latter from Linux unit
|
|
53
|
+
tests. Supabase/Auth/Storage in WSL and other remote hosts remain unclaimed until their
|
|
54
|
+
own checks pass. See the [complete platform boundary](https://github.com/Ddupasquier/rehearsal-db/blob/main/COMPATIBILITY.md#operating-systems-and-execution-location).
|
|
55
|
+
|
|
8
56
|
## 1. Check the required tools
|
|
9
57
|
|
|
10
58
|
You need Node.js 22, 24, or 26, npm, and a running Docker-compatible engine. Node.js 24
|
package/docs/index.md
CHANGED
|
@@ -12,6 +12,11 @@ Rehearsal catches those problems before deployment. It restores a reviewed, sani
|
|
|
12
12
|
baseline into a disposable local PostgreSQL or Supabase environment, applies only the
|
|
13
13
|
exact migrations you approve, and runs your application's own proof.
|
|
14
14
|
|
|
15
|
+
The [CLI is free and MIT-licensed](https://www.npmjs.com/package/@rehearsal-db/core).
|
|
16
|
+
Prefer clicks to commands? [Install the free VS Code Starter preview](vscode.md).
|
|
17
|
+
All features included in its Starter-licensed releases are free indefinitely, with no
|
|
18
|
+
account, payment card, or trial period.
|
|
19
|
+
|
|
15
20
|
| Empty-database tests miss… | Rehearsal exercises… |
|
|
16
21
|
| ------------------------------------------------- | --------------------------------------------------------- |
|
|
17
22
|
| old rows and edge cases | a reviewed, production-shaped baseline |
|
|
@@ -23,15 +28,16 @@ exact migrations you approve, and runs your application's own proof.
|
|
|
23
28
|
You do not need to read everything before your first rehearsal. Start with the outcome
|
|
24
29
|
you want, then follow the links when a term or safety check is new.
|
|
25
30
|
|
|
26
|
-
| I want to…
|
|
27
|
-
|
|
|
28
|
-
| Set up my own project
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
31
|
+
| I want to… | Go here |
|
|
32
|
+
| ---------------------------------------- | ----------------------------------------------------------------- |
|
|
33
|
+
| Set up my own project | [Getting started](getting-started.md) |
|
|
34
|
+
| Use the free visual workbench in VS Code | [Install VS Code Starter](vscode.md) |
|
|
35
|
+
| Try Rehearsal without touching my app | [Hands-on tutorial](tutorial.md) |
|
|
36
|
+
| Understand what makes a copy safe | [Baselines](baselines.md) and [Sanitization](sanitization.md) |
|
|
37
|
+
| Look up a command or setting | [CLI commands](commands.md) and [Configuration](configuration.md) |
|
|
38
|
+
| Reduce Docker and Supabase resource use | [Container runtime lifecycle](runtime-lifecycle.md) |
|
|
39
|
+
| Add editor and compiler type checks | [TypeScript](typescript.md) |
|
|
40
|
+
| Fix something that did not work | [Troubleshooting](troubleshooting.md) |
|
|
35
41
|
|
|
36
42
|
## The short version
|
|
37
43
|
|
package/docs/releasing.md
CHANGED
|
@@ -95,23 +95,27 @@ than seven days or in the future. Public fields and timestamps must still match
|
|
|
95
95
|
bypass metadata is hidden; an explicitly malformed or nonempty bypass list always
|
|
96
96
|
refuses publication.
|
|
97
97
|
|
|
98
|
-
The prepare job
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
GitHub
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
98
|
+
The prepare job displays the exact package version, SHA-256, source commit and run
|
|
99
|
+
in its summary. Review the candidate and passed checks, then choose **Review
|
|
100
|
+
deployments → npm → Approve and deploy**. That ordinary GitHub approval is the
|
|
101
|
+
publication authorization: no separate chat approval, secret phrase or pasted block
|
|
102
|
+
is required. Comments are optional.
|
|
103
|
+
|
|
104
|
+
GitHub's enforced, no-bypass `npm` environment admits the publishing job only after
|
|
105
|
+
its protection rules pass. The workflow also reads this run's actual review history
|
|
106
|
+
to corroborate the configured human owner's approval for the exact npm environment.
|
|
107
|
+
That history does not identify an approval's run attempt or verify artifact bytes;
|
|
108
|
+
the workflow independently checks the prepared tarball's hashes before publication,
|
|
109
|
+
and freshly downloads/checks registry bytes before tag repair. Reruns keep the same
|
|
110
|
+
source/ref and remain subject to GitHub's environment controls; old review text is
|
|
111
|
+
never presented as proof of new bytes or a fresh attempt.
|
|
112
|
+
|
|
113
|
+
The unsigned settings record remains a bounded drift check, not authorization or
|
|
114
|
+
cryptographic proof of current hidden bypass settings. Refresh its owner observation
|
|
115
|
+
when stale or changed; never advance its timestamp without reading the settings.
|
|
116
|
+
No settings check eliminates a later administrator change or check-to-use race.
|
|
117
|
+
See [GitHub's deployment review](https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/review-deployments),
|
|
118
|
+
[ruleset metadata boundary](https://docs.github.com/en/rest/repos/rules#get-a-repository-ruleset)
|
|
115
119
|
and [workflow approval history](https://docs.github.com/en/rest/actions/workflow-runs#get-the-review-history-for-a-workflow-run).
|
|
116
120
|
|
|
117
121
|
Keep customer evidence, credentials, runtime data and the internal tracker out of public
|
|
@@ -137,11 +141,12 @@ release-source migration.
|
|
|
137
141
|
5. Change `private` to `false` only in the reviewed release change.
|
|
138
142
|
6. Record the exact tarball filename, SHA-1, SHA-256, allowlisted files, unpacked size,
|
|
139
143
|
executable, declared runtime dependency inventory, and dependency audit result.
|
|
140
|
-
7.
|
|
141
|
-
8. Merge the
|
|
144
|
+
7. Review the release change and its exact artifact evidence.
|
|
145
|
+
8. Merge the reviewed release commit through protected `main` and create the exact
|
|
142
146
|
`v<package-version>` tag and GitHub release.
|
|
143
|
-
9.
|
|
144
|
-
the
|
|
147
|
+
9. Authorize publication once, in the protected `npm` deployment review, after its
|
|
148
|
+
prepare job matches the tested version and checksum. No comment or chat approval
|
|
149
|
+
is required.
|
|
145
150
|
10. Verify public visibility, ownership, provenance, registry SHA-1, README rendering,
|
|
146
151
|
exact-version clean installation, CLI execution, signatures, and the unrelated
|
|
147
152
|
installed Docker fixture. Allow up to six minutes for a first package to propagate
|
|
@@ -154,6 +159,28 @@ The independent Rehearsal Test Lab is the primary pre-release consumer environme
|
|
|
154
159
|
Real product integrations provide additional compatibility evidence; they do not
|
|
155
160
|
replace the package-owned release gate or Test Lab.
|
|
156
161
|
|
|
162
|
+
### Optional remote verification
|
|
163
|
+
|
|
164
|
+
When local resource guards refuse a heavy run, the existing full release check can
|
|
165
|
+
run on an isolated GitHub-hosted runner instead:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
gh workflow run verify.yml --ref YOUR_REVIEWED_RELEASE_BRANCH -f exact_release=true
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This manual-only option runs `npm run release:verify` and the production dependency
|
|
172
|
+
audit. It adds no required branch check and has no publishing permission or npm
|
|
173
|
+
environment. It does not bypass a local resource guard or start local services.
|
|
174
|
+
The other existing verification jobs still run normally.
|
|
175
|
+
|
|
176
|
+
Download the run's `exact-release-<commit>-<attempt>` artifact within seven days.
|
|
177
|
+
It contains only the frozen tarball and release reports. Require a successful job
|
|
178
|
+
and all nine passed stages in `acceptance.json`, match the reviewed source commit
|
|
179
|
+
and tarball SHA-256, then use those exact bytes for consumer checks and publication
|
|
180
|
+
authorization. Reports retained after failure are failure evidence, not approval.
|
|
181
|
+
This is an execution option for the same release requirements, not a substitute for
|
|
182
|
+
consumer acceptance, supported-platform observations or human publication approval.
|
|
183
|
+
|
|
157
184
|
The workflow publishes beta and release-candidate versions under the `beta` dist-tag.
|
|
158
185
|
While Rehearsal has no stable release, it also moves `latest` to the same reviewed
|
|
159
186
|
prerelease. This keeps the npm package page and the ordinary
|
|
@@ -177,6 +204,5 @@ package or select a different version. The `npm` environment must supply the ver
|
|
|
177
204
|
human approval gate; a workflow reference to that environment is not sufficient.
|
|
178
205
|
|
|
179
206
|
Creating the repository, passing CI, extracting the engine, merging a release branch,
|
|
180
|
-
or creating a tag does not authorize npm publication.
|
|
181
|
-
|
|
182
|
-
supplies the final human gate.
|
|
207
|
+
or creating a tag does not authorize npm publication. The protected GitHub deployment
|
|
208
|
+
review supplies the single human authorization for the exact displayed artifact.
|
package/docs/roadmap.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# Next steps
|
|
2
2
|
|
|
3
|
-
Rehearsal
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Rehearsal core **1.0.0 is available on
|
|
4
|
+
[npm](https://www.npmjs.com/package/@rehearsal-db/core)** for guided Supabase and
|
|
5
|
+
ordinary PostgreSQL migration rehearsals. The [free VS Code Starter preview](vscode.md)
|
|
6
|
+
adds a visual workbench. Neither requires a purchase or account.
|
|
7
|
+
|
|
8
|
+
The standalone workflow keeps the rehearsal engine in the package while application
|
|
9
|
+
meaning and privacy decisions remain project-owned. The sequence below explains its
|
|
10
|
+
dependencies, not a list of features withheld from the published release.
|
|
6
11
|
|
|
7
12
|
## Standalone workflow
|
|
8
13
|
|
package/docs/stability.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# Stability and the first stable release
|
|
2
2
|
|
|
3
|
-
Rehearsal
|
|
4
|
-
|
|
3
|
+
Rehearsal core **1.0.0 is published** on
|
|
4
|
+
[npm](https://www.npmjs.com/package/@rehearsal-db/core). This page defines its
|
|
5
|
+
compatibility promise and the verification policy for releases; it is not an
|
|
6
|
+
unfinished launch checklist. Stable core does not require every planned database,
|
|
7
|
+
editor interface, or paid feature.
|
|
5
8
|
|
|
6
9
|
## What becomes a compatibility promise
|
|
7
10
|
|
|
8
|
-
Starting with `
|
|
11
|
+
Starting with `1.0.0`, Rehearsal treats these documented surfaces as public:
|
|
9
12
|
|
|
10
13
|
- CLI command names, flags, JSON result fields, and exit categories in
|
|
11
14
|
[CLI commands](commands.md);
|
|
@@ -45,21 +48,30 @@ release.
|
|
|
45
48
|
|
|
46
49
|
## Promotion sequence
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
is
|
|
51
|
-
|
|
52
|
-
1.
|
|
53
|
-
2.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
Promotion is evidence-based, not a calendar countdown. The initial seven-day RC
|
|
52
|
+
wait was replaced after owner review; passing time alone cannot make a candidate
|
|
53
|
+
ready. The sequence below is policy, not a claim that its checks have passed.
|
|
54
|
+
|
|
55
|
+
1. Freeze broad feature development on the release branch.
|
|
56
|
+
2. Select one immutable candidate from the reviewed release branch. A release candidate
|
|
57
|
+
may be published from protected `main` through the reviewed npm environment; another
|
|
58
|
+
prerelease is not required solely to verify the final stable tarball.
|
|
59
|
+
3. Run the complete Rehearsal Test Lab gate twice from clean isolated workspaces.
|
|
60
|
+
4. Perform one final package-only check in a real consumer using the exact frozen
|
|
61
|
+
stable tarball, not duplicate Rehearsal machinery. Preserve its reviewed settings
|
|
62
|
+
and persistent data; a package check does not require resetting its databases.
|
|
63
|
+
5. Review reports and existing scheduled Test Lab results for unresolved blockers.
|
|
64
|
+
A blocking correction needs its affected acceptance repeated against the exact
|
|
65
|
+
corrected candidate. Reuse sufficient unchanged evidence with its original scope;
|
|
66
|
+
do not relabel old or unavailable manual checks as new results. No minimum number
|
|
67
|
+
of calendar days replaces these checks.
|
|
68
|
+
6. Publish `1.0.0` only when no blocking issue remains and the exact tarball has passed
|
|
69
|
+
the required release checks and consumer acceptance. The protected GitHub npm
|
|
70
|
+
review is the single human authorization for its displayed exact version and
|
|
71
|
+
checksum; no separate chat approval or pasted phrase is required.
|
|
72
|
+
7. Independently verify registry bytes, provenance, signatures and channels, then
|
|
73
|
+
confirm the published package in the real consumer. Promotion is complete only
|
|
74
|
+
when the published artifact matches the tested tarball and these checks pass.
|
|
63
75
|
|
|
64
76
|
Test Lab is the primary verification system. A real consumer is the final compatibility
|
|
65
77
|
check, not a replacement for package-owned coverage. Real Google or GitHub consent does
|
|
@@ -69,6 +81,23 @@ not need to run on every build unless authentication behavior changes.
|
|
|
69
81
|
|
|
70
82
|
Beta and release-candidate versions publish under the `beta` tag. Before a stable
|
|
71
83
|
release exists, `latest` follows that reviewed prerelease so the ordinary install command
|
|
72
|
-
remains useful. Once stable `
|
|
84
|
+
remains useful. Once stable `1.0.0` exists, `latest` stays on the stable line and `beta`
|
|
73
85
|
continues to identify the newest prerelease. Stable publication never rewrites the
|
|
74
86
|
`beta` tag.
|
|
87
|
+
|
|
88
|
+
## Upgrading from a 0.1 release candidate
|
|
89
|
+
|
|
90
|
+
The first stable release preserves rc.10's database runtime and schema formats and
|
|
91
|
+
corrects invalid-command diagnostics. A package upgrade
|
|
92
|
+
does not require resetting a sandbox or replacing its reviewed configuration, key or
|
|
93
|
+
baseline. Automatic compatible updates do not cross the 0.x-to-1.x version boundary;
|
|
94
|
+
review the changelog and deliberately select the stable version:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install --save-dev --save-exact @rehearsal-db/core@1.0.0
|
|
98
|
+
npx --no-install rehearsal --version
|
|
99
|
+
npx --no-install rehearsal doctor
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use the project's existing package manager and dependency location. Review its lockfile
|
|
103
|
+
and readiness output before the next sandbox operation; do not reset data just to update.
|
package/docs/tutorial.md
CHANGED
|
@@ -117,6 +117,6 @@ npm run test:fixture
|
|
|
117
117
|
The PostgreSQL equivalent is `npm run test:fixture:postgresql`.
|
|
118
118
|
|
|
119
119
|
The release workflow also runs `npm run test:fixture:onboarding` from the packed package.
|
|
120
|
-
That check creates fresh Supabase and PostgreSQL consumers, verifies
|
|
120
|
+
That check creates fresh Supabase and PostgreSQL consumers, verifies reviewed configuration
|
|
121
121
|
preservation, and exercises safe refusal and recovery for partial setup, occupied ports,
|
|
122
122
|
malformed configuration, and missing credentials.
|