@rehearsal-db/core 1.1.0 → 1.2.0

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/COMPATIBILITY.md +31 -0
  3. package/README.md +7 -3
  4. package/dist/package.json +3 -1
  5. package/dist/src/cli/arguments.mjs +1 -0
  6. package/dist/src/cli/basic_command_handlers.mjs +4 -0
  7. package/dist/src/cli/editor_command_handlers.mjs +24 -0
  8. package/dist/src/runtime/migration_history.d.mts +5 -1
  9. package/dist/src/runtime/migration_history.mjs +24 -6
  10. package/dist/src/runtime/migration_impact.d.mts +125 -0
  11. package/dist/src/runtime/migration_impact.mjs +278 -0
  12. package/dist/src/runtime/migration_impact_catalog.d.mts +18 -0
  13. package/dist/src/runtime/migration_impact_catalog.mjs +116 -0
  14. package/dist/src/runtime/migration_impact_plan.d.mts +47 -0
  15. package/dist/src/runtime/migration_impact_plan.mjs +297 -0
  16. package/dist/src/runtime/migration_impact_queries.d.mts +22 -0
  17. package/dist/src/runtime/migration_impact_queries.mjs +270 -0
  18. package/dist/src/runtime/migration_insights.d.mts +137 -0
  19. package/dist/src/runtime/migration_insights.mjs +143 -0
  20. package/dist/src/runtime/migration_insights_input.d.mts +13 -0
  21. package/dist/src/runtime/migration_insights_input.mjs +153 -0
  22. package/dist/src/runtime/migration_sql_lexer.d.mts +14 -0
  23. package/dist/src/runtime/migration_sql_lexer.mjs +204 -0
  24. package/dist/src/runtime/migration_sql_scan.d.mts +16 -0
  25. package/dist/src/runtime/migration_sql_scan.mjs +369 -0
  26. package/dist/src/runtime/plan.d.mts +2 -1
  27. package/dist/src/runtime/plan.mjs +4 -4
  28. package/dist/src/runtime/topology.d.mts +1 -1
  29. package/dist/src/runtime/topology.mjs +2 -2
  30. package/dist/src/shared/cancellation.mjs +1 -0
  31. package/dist/src/shared/held_path_ancestry.d.mts +7 -0
  32. package/dist/src/shared/held_path_ancestry.mjs +110 -0
  33. package/dist/src/shared/operation_guard.mjs +1 -0
  34. package/dist/src/targets/migration_impact_runtime.d.mts +22 -0
  35. package/dist/src/targets/migration_impact_runtime.mjs +367 -0
  36. package/docs/README.md +20 -7
  37. package/docs/adapters.md +10 -0
  38. package/docs/architecture.md +75 -1
  39. package/docs/commands.md +169 -34
  40. package/docs/configuration.md +23 -5
  41. package/docs/index.md +1 -0
  42. package/docs/releasing.md +11 -9
  43. package/docs/roadmap.md +19 -0
  44. package/docs/runtime-lifecycle.md +10 -0
  45. package/docs/updating.md +73 -0
  46. package/docs/vscode.md +23 -17
  47. package/package.json +3 -1
package/docs/commands.md CHANGED
@@ -10,6 +10,138 @@ versioned migration history with required predecessor links, statuses, warnings,
10
10
  the exact complete candidate digest. Filters never change the required ordered suffix;
11
11
  Rehearsal does not infer SQL safety from filenames.
12
12
 
13
+ ### Static Migration Insights
14
+
15
+ In a core build advertising `rehearsalContracts.migrationInsights: 1`, run
16
+ `npx --no-install rehearsal inspect insights --json` to inspect pending SQL without
17
+ starting an engine, connecting to a database, running application commands or changing
18
+ files. This additive contract does not change `inspect plan` version 1. It is new
19
+ development work, not a capability of the original tested core 1.1.0 candidate.
20
+
21
+ The normal version-1 command envelope contains `data.schemaVersion: 1`, the exact
22
+ complete `candidateSha256`, candidate count, aggregate verdict and per-target entries.
23
+ Each entry binds its version, filename, SHA-256 and nullable safe workspace-relative
24
+ path to fixed findings. Findings expose only a rule, severity, one-based line and
25
+ UTF-16 column, fixed summary and suggestion—never SQL snippets, object names or row
26
+ values. Locations identify the static construct, not the origin of a later provider
27
+ error. Refresh after editing; editor navigation must recheck the source hash.
28
+
29
+ Rules flag table/column removal, truncation, UPDATE/DELETE without an outer WHERE,
30
+ NOT NULL requirements, new constraints and recognized CASCADE clauses. Comments,
31
+ strings, quoted identifiers and routine bodies are not reinterpreted as executable
32
+ statements. CTE mutations are considered separately from the outer statement.
33
+
34
+ Verdicts are `static_warnings`, `no_detected_warning`, and `unknown`.
35
+ **No detected warning does not mean safe, syntactically valid or database-verified.**
36
+ Coverage describes recognized lexical rules only. Unsupported statements, malformed
37
+ lexical input, runtime-dependent plain-string escaping and bounded/truncated analysis
38
+ remain unknown. A file can retain a warning while its overall coverage is unknown.
39
+ This is not a full PostgreSQL parser or a predictor of row loss, constraint compliance,
40
+ locks, rollback, permissions, production performance or external effects. Use the
41
+ ordinary reviewed rehearsal and application proof for actual behavior.
42
+
43
+ Input is limited to 10,000 SQL files across targets, 10,000 directory entries per
44
+ migration directory (including non-SQL entries), 1,000 pending candidates, 2 MiB per
45
+ file and 16 MiB total. Lexical analysis is bounded to 20,000 tokens and depth
46
+ 128 per file; findings are bounded to 1,000 per file and 5,000 total. Symlinks, escaping
47
+ paths, unsafe filenames, invalid UTF-8 and changed input refuse inspection. Exceeded
48
+ lexical/finding bounds produce incomplete coverage rather than a safety verdict.
49
+ The CLI and these essential safety warnings remain free.
50
+
51
+ ### Current-sandbox data impact
52
+
53
+ A source build advertising `rehearsalContracts.migrationImpact: 1` adds two free,
54
+ optional commands. This is unpublished development work, not a capability of an
55
+ already-installed release. It does not change migration-plan v1, static Insights,
56
+ failure diagnosis, or the gates for `run` and `migrate`.
57
+
58
+ ```bash
59
+ npx --no-install rehearsal inspect impact --target=primary --json
60
+ npx --no-install rehearsal measure impact --target=primary \
61
+ --confirm-candidates=<whole-plan-sha256-from-the-preview> --json
62
+ ```
63
+
64
+ Both commands require an explicit configured target name, even for `primary`.
65
+ `inspect impact` reads the reviewed project inputs only: it does not contact a
66
+ database, start an engine, run SQL, apply migrations, or change files. Its preview
67
+ binds planned aggregate kinds to the exact whole-project candidate digest, selected
68
+ target, baseline generation, and each candidate filename and hash. In a multi-target
69
+ project, confirmation still uses the **whole-plan** digest, not the selected target's
70
+ digest. Editing any target's pending migrations requires a fresh preview.
71
+
72
+ `measure impact` requires that exact confirmation and an already-running, verified,
73
+ ownership-proven disposable local sandbox. It refuses an unavailable, stale or
74
+ unmanaged runtime rather than starting, repairing or resetting it. The existing
75
+ project-operation lock prevents a concurrent Rehearsal mutation; operation lock files
76
+ and bounded local activity history may be written. A bounded read-only catalog
77
+ preflight retains eligible relation identities. The counts then use one
78
+ `REPEATABLE READ READ ONLY` transaction, which is rolled back after the counts.
79
+ Neither command executes pending migrations or application commands.
80
+ Measurements use the selected local sandbox's administrative connection, not the
81
+ application's role. They inspect stored data, not application permissions; RLS-enabled
82
+ or otherwise unsupported objects remain unknown. No application grants are changed.
83
+
84
+ Before the count snapshot, Rehearsal locks eligible measured relations in a fixed
85
+ order with `SHARE ROW EXCLUSIVE`. These locks temporarily block writers and
86
+ index/statistics/schema changes on that disposable sandbox; ordinary readers can
87
+ continue. They use the same 1-second lock wait and remaining total budget. Name
88
+ lookup also holds a bounded `SHARE` lock on the selected database's namespace
89
+ catalog to prevent concurrent schema renames; this temporarily blocks schema
90
+ catalog changes across that database and requires sufficient local privileges.
91
+ A relation name swapped to a view between preflight and locking may transiently lock that view's
92
+ dependencies inside the selected sandbox, but the retained-identity/type check
93
+ refuses its counts without executing the view query. This is not atomic name
94
+ resolution or protection against a compromised PostgreSQL server/catalog.
95
+ See PostgreSQL's [locking behavior](https://www.postgresql.org/docs/17/sql-lock.html).
96
+
97
+ The narrow recognizer supports simple, schema-qualified, unquoted SQL forms for:
98
+
99
+ | Recognized change | Aggregate on the current sandbox |
100
+ | --------------------------------------------------------------- | ------------------------------------------------------- |
101
+ | Drop a table, truncate one table, or delete without a predicate | Row count |
102
+ | Drop one column | Rows whose current column is not NULL |
103
+ | Set one column NOT NULL | Rows whose current column is NULL |
104
+ | Add a simple UNIQUE constraint | Rows in non-NULL duplicate groups, not only excess rows |
105
+ | Add a simple FOREIGN KEY with MATCH SIMPLE semantics | Non-NULL referencing rows with no match |
106
+
107
+ Measurements require PostgreSQL 17 or newer with server-side transaction deadlines,
108
+ ordinary non-inherited, non-partitioned heap tables without RLS, and supported built-in
109
+ column/operator semantics. Older or unsupported server semantics remain unknown;
110
+ Rehearsal never upgrades a database to obtain counts. Quoted identifiers, CHECK constraints,
111
+ UPDATE, predicates, CASCADE, expressions, routines, custom types/operators and other
112
+ unsupported forms remain unknown. The recognizer is not a PostgreSQL parser. A table
113
+ created or a column changed by an earlier pending migration is **not** simulated: all
114
+ counts describe the same current snapshot before any pending migration. Row counts
115
+ do not measure cascade, trigger or external effects, prove constraint validity, or
116
+ predict production locking, performance, data loss or safety.
117
+
118
+ The version-1 result includes the exact candidate/target bindings, `mode`
119
+ (`preview` or `measurement`), `measurementStatus`, nullable snapshot time and runtime
120
+ identity hash, per-file coverage/unknown reasons, and fixed operation/metric kinds
121
+ with lexical locations. Public counts are decimal **strings**, including `"0"`;
122
+ `null` means unavailable, never zero. No SQL, database object names or row contents
123
+ are returned. `planned` preview status may contain unsupported input and is not
124
+ measurement evidence. Measurement status is `measured`, `partial`, `unknown`, or
125
+ `not_required`. Partial or unknown measurement returns envelope `status: "not_ready"`
126
+ and exit `1`, retaining only the available evidence; neither a successful envelope
127
+ nor zero counts is a safety verdict.
128
+
129
+ The same bounded migration-input rules as static Insights apply. A review plans at
130
+ most 100 aggregates. Measurement uses a 1-second lock timeout, 5-second statement
131
+ timeout, 30-second total budget, 128 KiB output limit and 256 KiB generated-script
132
+ limit. The server transaction budget is reduced after runtime identity checks and
133
+ catalog preflight; it is never increased to compensate for a slow check.
134
+ Lock/statement/budget failures remain unknown instead of returning guessed counts.
135
+ Client cancellation is not by itself proof of immediate server-backend termination;
136
+ server-side deadlines additionally bound owned query/transaction lifetime.
137
+ Package-owned cancellation supports the ordinary cancellation signals,
138
+ releases the project lock and returns exit `130`; it does not reset or discard data.
139
+ Older editor versions may refuse the new `measure impact` operation kind in current
140
+ activity or retained history. This source command does not itself update the editor;
141
+ use the CLI until a compatible editor consumer is released.
142
+ Continue to use the normal reviewed rehearsal and application proof for actual
143
+ migration behavior.
144
+
13
145
  `npx rehearsal configuration --json` identifies the exact active config, its source
14
146
  fingerprint, validated field metadata, and saved named profiles. To validate an edit
15
147
  without writing it, use `npx rehearsal configuration review --proposal=review.json --json`.
@@ -132,20 +264,22 @@ obsolete placeholder key.
132
264
 
133
265
  ## Check and inspect
134
266
 
135
- | Command | What it does |
136
- | ---------------------------------- | ----------------------------------------------------------------------- |
137
- | `npx rehearsal doctor` | Check dependencies, inputs, and safety rules. |
138
- | `npx rehearsal discover` | Explain detected facts, suggestions, and decisions. |
139
- | `npx rehearsal support` | Print a privacy-safe report for a support request. |
140
- | `npx rehearsal activity` | Report whether another Rehearsal operation is active. |
141
- | `npx rehearsal environments` | Show owned runtimes, live resource use, and Docker capacity. |
142
- | `npx rehearsal resources` | Browse images, volumes, container references, and cleanup explanations. |
143
- | `npx rehearsal explain` | Show the exact plan without changing anything. |
144
- | `npx rehearsal run --dry-run` | Show the same non-mutating plan. |
145
- | `npx rehearsal candidates` | List pending migrations and their approval digest. |
146
- | `npx rehearsal inspect baseline` | Show active and retained baseline metadata without row values. |
147
- | `npx rehearsal inspect migrations` | Classify every historical and candidate migration. |
148
- | `npx rehearsal status` | Report baseline, candidates, and local runtime state. |
267
+ | Command | What it does |
268
+ | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
269
+ | `npx rehearsal doctor` | Check dependencies, inputs, and safety rules. |
270
+ | `npx rehearsal discover` | Explain detected facts, suggestions, and decisions. |
271
+ | `npx rehearsal support` | Print a privacy-safe report for a support request. |
272
+ | `npx rehearsal activity` | Report whether another Rehearsal operation is active. |
273
+ | `npx rehearsal environments` | Show owned runtimes, live resource use, and Docker capacity. |
274
+ | `npx rehearsal resources` | Browse images, volumes, container references, and cleanup explanations. |
275
+ | `npx rehearsal explain` | Show the exact plan without changing anything. |
276
+ | `npx rehearsal run --dry-run` | Show the same non-mutating plan. |
277
+ | `npx rehearsal candidates` | List pending migrations and their approval digest. |
278
+ | `npx rehearsal inspect baseline` | Show active and retained baseline metadata without row values. |
279
+ | `npx rehearsal inspect migrations` | Classify every historical and candidate migration. |
280
+ | `npx rehearsal inspect impact --target=<name>` | Preview exact aggregate kinds without contacting a database. |
281
+ | `npx rehearsal measure impact --target=<name> --confirm-candidates=<sha256>` | Read bounded aggregates from that current verified sandbox. |
282
+ | `npx rehearsal status` | Report baseline, candidates, and local runtime state. |
149
283
 
150
284
  State-reporting commands accept `--json` for scripts. Scripts should use the JSON fields
151
285
  and process exit code, not parse human-facing text.
@@ -359,7 +493,7 @@ Clients should disable conflicting actions unless the state is `idle`.
359
493
 
360
494
  ### Cancelling a mutation
361
495
 
362
- `run`, `reset`, `migrate`, confirmed `refresh`, and direct or guided `open` preparation support
496
+ `run`, `reset`, `migrate`, `measure impact`, confirmed `refresh`, and direct or guided `open` preparation support
363
497
  package-owned cancellation.
364
498
  Send `SIGINT`, `SIGTERM`, `SIGHUP`, or `SIGTSTP` to the Rehearsal CLI process. Rehearsal
365
499
  handles repeated delivery as one request, forwards it only to the detached process group
@@ -472,25 +606,26 @@ belonging to other projects are never included. This follows
472
606
 
473
607
  ## Common options
474
608
 
475
- | Option | Meaning |
476
- | -------------------------------------- | ---------------------------------------------------------------- |
477
- | `--help`, `-h` | Show the installed command reference. |
478
- | `--version`, `-V` | Print the installed package version and exit. |
479
- | `--json` | Return the versioned machine-readable result. |
480
- | `--verbose` | Show more safe detail. |
481
- | `--debug` | Show the most diagnostic detail; still review it before sharing. |
482
- | `--plain` | Disable decorative interactive prompts. |
483
- | `--config=<path>` | Use only this config for planning and every runtime action. |
484
- | `--target=supabase\|postgresql` | Choose the setup target. |
485
- | `--include-runtime` | Include this project's runtime in a cleanup preview. |
486
- | `--include-images` | Include older unused Supabase images in a cleanup preview. |
487
- | `--confirm-cleanup=<digest>` | Confirm the exact cleanup set printed by the preview. |
488
- | `--confirm-source-access=<digest>` | Confirm one exact temporary source-access plan. |
489
- | `--confirm-source-retirement=<digest>` | Confirm exact source-access retirement. |
490
- | `--confirm-refresh=<digest>` | Confirm an exact refresh, runtime reset, and old-copy removal. |
491
- | `--identity=<name>` | Choose one declared local identity association. |
492
- | `--confirm-identity=<digest>` | Confirm that exact local identity plan. |
493
- | `--write` | Apply a setup, policy, or cleanup preview. |
609
+ | Option | Meaning |
610
+ | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
611
+ | `--help`, `-h` | Show the installed command reference. |
612
+ | `--version`, `-V` | Print the installed package version and exit. |
613
+ | `--json` | Return the versioned machine-readable result. |
614
+ | `--verbose` | Show more safe detail. |
615
+ | `--debug` | Show the most diagnostic detail; still review it before sharing. |
616
+ | `--plain` | Disable decorative interactive prompts. |
617
+ | `--config=<path>` | Use only this config for planning and every runtime action. |
618
+ | `--target=<name>` | Choose a setup provider or configured runtime target; impact commands require an explicit name. |
619
+ | `--confirm-candidates=<digest>` | Confirm the exact whole-plan candidates for run, migrate or impact measurement. |
620
+ | `--include-runtime` | Include this project's runtime in a cleanup preview. |
621
+ | `--include-images` | Include older unused Supabase images in a cleanup preview. |
622
+ | `--confirm-cleanup=<digest>` | Confirm the exact cleanup set printed by the preview. |
623
+ | `--confirm-source-access=<digest>` | Confirm one exact temporary source-access plan. |
624
+ | `--confirm-source-retirement=<digest>` | Confirm exact source-access retirement. |
625
+ | `--confirm-refresh=<digest>` | Confirm an exact refresh, runtime reset, and old-copy removal. |
626
+ | `--identity=<name>` | Choose one declared local identity association. |
627
+ | `--confirm-identity=<digest>` | Confirm that exact local identity plan. |
628
+ | `--write` | Apply a setup, policy, or cleanup preview. |
494
629
 
495
630
  Run `npx rehearsal --help` to print the command list available in your installed version.
496
631
  Run `npx rehearsal --version` to print only its version number. Add `--json` when a
@@ -289,11 +289,29 @@ Colima. It warns at `diskWarningPercent` and refuses to start below
289
289
  generated PostgreSQL configs reserve 2 GiB. Engines that do not expose a portable disk
290
290
  measurement continue normally and report capacity as unavailable in `environments`.
291
291
 
292
- `supabase.serviceProfile` is `application` by default. It retains the database, Auth,
293
- Storage, PostgREST, gateway, and local mail service while omitting Studio, Realtime, Edge
294
- Functions, analytics, Vector, and image transforms. Choose `full` only when the project
295
- proof actually exercises one of those services. PostgreSQL remains the lighter choice
296
- when the proof needs only SQL, migrations, triggers, or sanitized relational data.
292
+ Choose the smallest reviewed environment that supplies the proof's dependencies:
293
+
294
+ | Proof needs | Select | Retained dependencies and boundary |
295
+ | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
296
+ | SQL migrations, schema, triggers, or sanitized relational data | `runtime.target: "postgresql"` | One PostgreSQL container; no native Supabase Auth, Storage, or Data API. |
297
+ | Supabase Auth, Storage, or Data API behavior | `runtime.target: "supabase"` with `supabase.serviceProfile: "application"` (the default) | Keep database, Auth, Storage, PostgREST, gateway, and local mail together. Direct SQL alone does not prove these application-facing paths. |
298
+ | Studio, Realtime, Edge Functions, analytics, or image transforms | Supabase with `serviceProfile: "full"` | Remove Rehearsal's exclusions, retain the application dependencies, and explicitly enable the needed services in the reviewed TOML. |
299
+
300
+ The application profile omits Studio, Realtime, Edge Functions, analytics, Vector, and
301
+ image transforms. These are reviewed bundles, not permission to trim individual services
302
+ with ad hoc CLI flags. Declare what the proof uses through
303
+ [`application.requiredServices`](#required-application-services); a conflicting profile
304
+ or disabled required service refuses before startup. Profile selection does not change
305
+ data retention, shared-engine ownership, or supported-platform boundaries.
306
+
307
+ Compare resource measurements only for the same exact package, fixture, engine, and
308
+ hardware. Test Lab's fresh-container startup measurement includes provisioning, health
309
+ checks, and baseline restoration on an already-running engine; record whether images
310
+ were cached. It does not measure VM boot or uncached-image downloads. Owned-container CPU/memory
311
+ samples are not host/VM memory reservations or an application-load soak test. Keep these
312
+ limits with the results rather than comparing mixed-version samples as an optimization.
313
+ Do not prune shared images or restart another project's engine to obtain a benchmark.
314
+ See [resource inspection](runtime-lifecycle.md#diagnosing-unexpected-activity).
297
315
 
298
316
  After each Supabase start, Rehearsal changes only the exact target's containers to
299
317
  Docker's `no` restart policy. Its database and Storage volumes remain intact,
package/docs/index.md CHANGED
@@ -33,6 +33,7 @@ you want, then follow the links when a term or safety check is new.
33
33
  | Set up my own project | [Getting started](getting-started.md) |
34
34
  | Use the free visual workbench in VS Code | [Install VS Code Starter](vscode.md) |
35
35
  | Try Rehearsal without touching my app | [Hands-on tutorial](tutorial.md) |
36
+ | Check changes, compatibility or updates | [Releases and updates](updating.md) |
36
37
  | Understand what makes a copy safe | [Baselines](baselines.md) and [Sanitization](sanitization.md) |
37
38
  | Look up a command or setting | [CLI commands](commands.md) and [Configuration](configuration.md) |
38
39
  | Reduce Docker and Supabase resource use | [Container runtime lifecycle](runtime-lifecycle.md) |
package/docs/releasing.md CHANGED
@@ -1,4 +1,8 @@
1
- # Release process
1
+ # Maintainers: publishing Rehearsal
2
+
3
+ **Audience: Rehearsal maintainers publishing a release.** To install or update
4
+ Rehearsal in your own project, use [Releases and updates](updating.md).
5
+ The publisher controls below are not steps that ordinary users need to perform.
2
6
 
3
7
  This page defines required release controls, not a certification that a publisher is
4
8
  currently ready. Verify the live repository, trusted-publisher identity and approval
@@ -15,9 +19,9 @@ back to a token or disable provenance. The release preflight described below enf
15
19
  that refusal; an actual held approval and the npm account settings still need direct
16
20
  verification. A local working tree is never the release source.
17
21
 
18
- `0.1.0-beta.0` was prepared under the unavailable `@rehearsal` npm scope and was never
19
- published. `0.1.0-beta.1` supersedes that candidate under `@rehearsal-db/core` without
20
- rewriting the earlier Git tag or GitHub prerelease.
22
+ This runbook describes the current controls. Historical candidates and release incidents
23
+ belong in [release history](https://github.com/Ddupasquier/rehearsal-db/releases) and
24
+ [issues](https://github.com/Ddupasquier/rehearsal-db/issues), not the installation path.
21
25
 
22
26
  ## Trusted publication boundary
23
27
 
@@ -37,11 +41,9 @@ private therefore cannot preserve this release contract unchanged. Keep the revi
37
41
  release source public; never silently remove provenance. See
38
42
  [npm's trusted-publisher guidance](https://docs.npmjs.com/trusted-publishers/).
39
43
 
40
- The initial `0.1.0-beta.1` package creation required a one-time bootstrap credential
41
- because npm cannot configure a trusted publisher before a package exists. That
42
- credential is not part of the maintained release architecture: it was deleted from the
43
- GitHub environment after publication, must remain revoked at npm, and cannot be consumed
44
- by this workflow.
44
+ Bootstrap credentials are not part of the maintained release architecture. Any historical
45
+ bootstrap credential must remain removed from GitHub and revoked at npm; this workflow
46
+ cannot consume it. Do not replace a failing trusted publisher with a stored token.
45
47
 
46
48
  A failed candidate does not permit moving or deleting its release tag. If its pinned
47
49
  workflow needs a source correction, prepare a new version and artifact through the same
package/docs/roadmap.md CHANGED
@@ -61,6 +61,25 @@ release or consumer upgrade remains unfinished:
61
61
  - Remove consumer integration code only after its replacement passes and that deletion
62
62
  is separately approved.
63
63
 
64
+ ## Efficient local execution and optional managed runs
65
+
66
+ Efficient local profiles, data-preserving lifecycle controls, essential safety and the
67
+ complete CLI stay free. Resource improvements must preserve the services and representative
68
+ data needed to prove the chosen scenario; a database-only pass is not full application
69
+ acceptance. See [choosing a local profile](runtime-lifecycle.md#choosing-postgresql-or-supabase).
70
+
71
+ Optional managed execution is the paid-service direction: run demanding rehearsals
72
+ without a local database stack. It is not currently available. Its design must establish
73
+ explicit upload consent, isolated execution, credential and retention boundaries,
74
+ verifiable cleanup and bounded costs before a hosted launch. Sanitization does not
75
+ automatically authorize uploading a baseline. Pricing and commercial terms remain separate.
76
+
77
+ The [resource-efficiency initiative](https://github.com/Ddupasquier/rehearsal-db/issues/208)
78
+ coordinates existing lifecycle work and bounded remote/native feasibility. Experimental
79
+ upstream native runtimes are not a supported Rehearsal replacement merely because they
80
+ can omit Docker. Moving an application's production host does not itself reduce the
81
+ services a local rehearsal needs.
82
+
64
83
  ## Later database targets
65
84
 
66
85
  Additional database, runtime, identity-provider and migration-tool integrations require
@@ -191,6 +191,16 @@ These observations help compare profiles, not promise a machine-wide memory budg
191
191
  A cold-image or fresh-VM benchmark needs its own disposable, exclusive test environment.
192
192
  Do not prune shared images or restart a shared engine to manufacture a cold measurement.
193
193
 
194
+ ### Free local efficiency and planned managed execution
195
+
196
+ Efficient local profiles, the complete CLI and essential lifecycle/data protections stay
197
+ free. Choose the smallest profile that still proves the requested behavior; Rehearsal
198
+ does not silently remove declared Auth, Storage or API dependencies to save memory.
199
+
200
+ Optional managed execution is planned separately and is not available in this release.
201
+ Choosing a local profile does not upload data or authorize a hosted operation. See the
202
+ [product direction](roadmap.md#efficient-local-execution-and-optional-managed-runs).
203
+
194
204
  ## Scheduled review and stale-stop safety
195
205
 
196
206
  Resource policies configure advisory retention, measured-volume budgets, and scheduled
@@ -0,0 +1,73 @@
1
+ # Releases and updates
2
+
3
+ The CLI and VS Code extension update separately. Their version numbers do not need to
4
+ match. Updating a package does not run migrations or reset your database.
5
+
6
+ ## What changed?
7
+
8
+ Read the [CLI release notes](https://github.com/Ddupasquier/rehearsal-db/releases) or
9
+ [extension release notes](https://github.com/Ddupasquier/rehearsal-vscode/releases)
10
+ for the version you plan to install. Each component has its own release history.
11
+
12
+ ## Is my environment supported?
13
+
14
+ Rehearsal supports Node.js 22, 24 and 26 on macOS and Linux. On Windows, run database
15
+ commands in a WSL 2 Linux workspace; native PowerShell and Command Prompt are not
16
+ supported database runtimes. The WSL route remains a preview, not a claim of native
17
+ Windows database support. See [supported environments and limitations](https://github.com/Ddupasquier/rehearsal-db/blob/main/COMPATIBILITY.md)
18
+ and the [Windows setup guide](getting-started.md#windows-use-a-wsl-2-linux-workspace)
19
+ before installing.
20
+
21
+ ## How do I update?
22
+
23
+ ### VS Code extension
24
+
25
+ Open **Extensions**, find **Rehearsal DB** (`rehearsal-db.rehearsal-db`), and choose
26
+ **Update** when available. Save your work and reload only when you are ready, if VS Code
27
+ asks. For a direct download, follow the [verified VSIX instructions](vscode.md#direct-github-installation).
28
+
29
+ Prefer automatic updates? Open **Rehearsal: Check for Updates** and save the extension
30
+ and/or CLI options you want. They are independent, initially off, and can be disabled
31
+ later. An unavailable network, busy project or incompatible update may defer installation.
32
+ See [automatic updates](vscode.md#optional-automatic-updates) for consent and privacy details.
33
+
34
+ Using the legacy preview through 0.1.18? Follow the [one-time identity migration](vscode.md#move-from-a-preview-through-0118)
35
+ instead of installing both extension identities together.
36
+
37
+ ### Project CLI package
38
+
39
+ Finish active Rehearsal commands first. Read the [release notes](https://github.com/Ddupasquier/rehearsal-db/releases),
40
+ then use your project's existing package manager and dependency location. For an npm
41
+ project that keeps Rehearsal in development dependencies, update to the reviewed 1.2.0
42
+ release only after it appears in the official registry:
43
+
44
+ ```bash
45
+ npm install --save-dev --save-exact @rehearsal-db/core@1.2.0
46
+ npx --no-install rehearsal --version
47
+ ```
48
+
49
+ Review the package and lockfile changes before the next Rehearsal command.
50
+
51
+ ## Breaking changes or known limitations?
52
+
53
+ Check the target release notes before upgrading. Breaking upgrades, the move from a
54
+ 0.x preview to stable core, and local source/tarball installations need deliberate
55
+ review rather than an automatic switch. See the [compatibility promise](stability.md#what-becomes-a-compatibility-promise)
56
+ or [troubleshooting](troubleshooting.md) when an update is refused.
57
+
58
+ Do not delete keys, baselines or sandbox data to update. Updating does not authorize
59
+ production access or make an unsupported database or platform supported. Keep the
60
+ [data-safety boundaries](security-model.md) and explicit reset/discard warnings in
61
+ force; a successful rehearsal is not a guarantee that deployment is safe.
62
+
63
+ ## Where can I verify the package's origin?
64
+
65
+ Use the official [npm package](https://www.npmjs.com/package/@rehearsal-db/core),
66
+ [VS Code Marketplace listing](https://marketplace.visualstudio.com/items?itemName=rehearsal-db.rehearsal-db)
67
+ or linked GitHub releases. npm provenance links the CLI package to its public release
68
+ source and build. For a direct VSIX download, follow the [SHA-256 verification steps](vscode.md#direct-github-installation).
69
+ Origin verification does not replace reviewing a release's compatibility or safety limits.
70
+
71
+ You do not need publisher credentials, GitHub deployment approvals or the maintainer
72
+ release checklist to install or update Rehearsal. Those belong to the
73
+ [maintainer publishing guide](releasing.md).
package/docs/vscode.md CHANGED
@@ -4,9 +4,9 @@ The Rehearsal extension turns the local CLI into a project-aware database-change
4
4
  workbench. It is for developers who want the safety of exact migration plans and disposable
5
5
  local runtimes without memorizing every command.
6
6
 
7
- This guide targets **Free Starter 0.1.23**, named **Rehearsal DB** on
7
+ This guide targets **Free Starter 0.1.24**, named **Rehearsal DB** on
8
8
  [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=rehearsal-db.rehearsal-db),
9
- with a [reviewed GitHub VSIX](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.23)
9
+ with a [reviewed GitHub VSIX](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.24)
10
10
  for direct installation. The canonical extension ID is **`rehearsal-db.rehearsal-db`**,
11
11
  published by **`rehearsal-db`**. The workbench and commands retain the **Rehearsal** brand.
12
12
  All included features are free indefinitely for personal or commercial development.
@@ -24,6 +24,9 @@ identity. This is not an automatic rename or uninstall.
24
24
 
25
25
  - See what Rehearsal detected, what it suggests, and what still needs your decision.
26
26
  - Review, filter, sort, and check off the exact pending migration set.
27
+ - Read optional static Migration Insights with core 1.2.0 and open unchanged source
28
+ at a lexical finding. Unsupported analysis stays unknown; no warning is a safety
29
+ verdict or proof of valid SQL. No database is started or contacted for this analysis.
27
30
  - Inspect targets, runtime state, retained baseline generations, local ports, and app URLs.
28
31
  - Review safe configuration changes as an exact diff before writing them.
29
32
  - Launch the same public CLI operations with their exact command and confirmation intact.
@@ -66,8 +69,9 @@ real WSL core fixtures do not certify a native Remote-WSL editor walkthrough.
66
69
  4. Follow **Next best step**. Review the detected project and active configuration;
67
70
  setup, source access, migration execution and cleanup keep their own confirmations.
68
71
 
69
- The release pairing described here is core **1.0.2** with Starter **0.1.23**.
70
- Install it once both versions appear in their official release channels.
72
+ Core and the extension have independent version numbers. This guide targets core
73
+ **1.2.0** and Starter **0.1.24**, only once each is published. See [Updates](updating.md)
74
+ when moving an existing installation forward.
71
75
  The extension's minimum core is `0.1.0-rc.4`. A project that is not ready should show
72
76
  setup guidance, not require you to build the extension. Opening the dashboard does not
73
77
  start a database or run a migration. Use
@@ -92,10 +96,10 @@ distinction between desktop OS, extension host, architecture and actual database
92
96
  ### Direct GitHub installation
93
97
 
94
98
  The verified GitHub VSIX is an alternative to Marketplace. Open the
95
- [Starter 0.1.23 release](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.23).
96
- Under **Assets**, download `rehearsal-db-0.1.23.vsix` and `SHA256SUMS`. In a terminal,
97
- run `shasum -a 256 /path/to/rehearsal-db-0.1.23.vsix` on macOS or
98
- `sha256sum /path/to/rehearsal-db-0.1.23.vsix` on Linux. Compare the result with that
99
+ [Starter 0.1.24 release](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.24).
100
+ Under **Assets**, download `rehearsal-db-0.1.24.vsix` and `SHA256SUMS`. In a terminal,
101
+ run `shasum -a 256 /path/to/rehearsal-db-0.1.24.vsix` on macOS or
102
+ `sha256sum /path/to/rehearsal-db-0.1.24.vsix` on Linux. Compare the result with that
99
103
  release's `SHA256SUMS`; stop if they differ. Do not substitute a local rebuild.
100
104
  Then open **Extensions → … → Install from VSIX…** and choose the verified file.
101
105
  Save your work and reload only if VS Code asks.
@@ -227,7 +231,7 @@ route; do not delete its coordination lock while a package manager may still be
227
231
 
228
232
  Manual updating stays available: download and verify the next reviewed VSIX, then repeat
229
233
  **Install from VSIX…**. See the release's
230
- [installation guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/README.md#install-and-open-your-project).
234
+ [installation guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/README.md#install-and-open-your-project).
231
235
  An ordinary core-package update is detected from its manifest, lockfile and installed
232
236
  metadata without reloading VS Code. The header shows loaded extension and core versions
233
237
  separately; installed → newest appears only after a successful release check. Unknown or
@@ -236,16 +240,18 @@ offline availability is not proof that you are up to date.
236
240
  ## Privacy boundary
237
241
 
238
242
  Passive inspection stays local. The extension includes no telemetry, advertising, hosted
239
- database access, or account. It does not read environment files, credentials, private rows,
240
- baseline contents, or project source during passive inspection. An explicit migration
243
+ database access, or account. It does not read environment files, credentials, private rows
244
+ or baseline contents. With the optional Insights capability, core also reads bounded
245
+ project-local migration files and returns fixed findings, not SQL bodies or row values.
246
+ No SQL is executed or uploaded and no database is contacted for static analysis. An explicit migration
241
247
  source action reads only the selected local input to check its approved bytes before
242
248
  opening it in the editor; it does not upload SQL. User-approved package operations and
243
249
  external links may use their own services.
244
250
 
245
251
  ## License, support and future Pro
246
252
 
247
- Starter 0.1.23 carries the same
248
- [free Starter license](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/LICENSE).
253
+ Starter 0.1.24 carries the same
254
+ [free Starter license](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/LICENSE).
249
255
  Its current review, configuration, comparison and reporting tools are included; they
250
256
  are not a timed evaluation or a paid feature gate. Free use does not mean the extension
251
257
  is MIT-licensed: its bundled terms govern copying and redistribution. Core remains MIT.
@@ -254,17 +260,17 @@ Future optional Pro editor workflows must be separately identified. They cannot
254
260
  retroactively remove Starter rights already granted for a received version. Pro pricing,
255
261
  billing and entitlements are not implemented; no payment is needed to use Starter.
256
262
  Database and safety capabilities stay in the free CLI. The
257
- [edition guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/docs/commercial-readiness.md)
263
+ [edition guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/docs/commercial-readiness.md)
258
264
  owns the detailed boundary.
259
265
 
260
266
  Preview describes stability, not a trial countdown. Support is best effort, with no
261
267
  service-level agreement, database hosting, backups or production support. Before use,
262
- read the release's [privacy statement](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/PRIVACY.md)
263
- and [support policy](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/SUPPORT.md).
268
+ read the release's [privacy statement](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/PRIVACY.md)
269
+ and [support policy](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/SUPPORT.md).
264
270
  Report editor problems in the
265
271
  [Rehearsal issue tracker](https://github.com/Ddupasquier/rehearsal-db/issues), as
266
272
  described in the support policy.
267
- Use its [private security process](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.23/SECURITY.md)
273
+ Use its [private security process](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.24/SECURITY.md)
268
274
  for vulnerabilities; never post credentials, private rows or baseline files publicly.
269
275
 
270
276
  Historical VSIX files retain their bundled terms. Choose a reviewed release carrying
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rehearsal-db/core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "description": "Catch PostgreSQL and Supabase migrations that pass on empty databases but fail on real data—before deploy.",
6
6
  "repository": {
@@ -27,6 +27,8 @@
27
27
  "resourceInventory": 1,
28
28
  "resourceManager": 1,
29
29
  "migrationReview": 1,
30
+ "migrationInsights": 1,
31
+ "migrationImpact": 1,
30
32
  "configurationReview": 1,
31
33
  "baselineShape": 1
32
34
  },