instar 1.3.288 → 1.3.289
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/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +17 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/feedback-factory/cutoverReadiness.d.ts +45 -0
- package/dist/feedback-factory/cutoverReadiness.d.ts.map +1 -1
- package/dist/feedback-factory/cutoverReadiness.js +51 -0
- package/dist/feedback-factory/cutoverReadiness.js.map +1 -1
- package/dist/feedback-factory/dryrun/HttpParitySource.d.ts +14 -0
- package/dist/feedback-factory/dryrun/HttpParitySource.d.ts.map +1 -1
- package/dist/feedback-factory/dryrun/HttpParitySource.js +67 -4
- package/dist/feedback-factory/dryrun/HttpParitySource.js.map +1 -1
- package/dist/feedback-factory/migration/importRunner.d.ts +117 -0
- package/dist/feedback-factory/migration/importRunner.d.ts.map +1 -0
- package/dist/feedback-factory/migration/importRunner.js +162 -0
- package/dist/feedback-factory/migration/importRunner.js.map +1 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +25 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +3 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/middleware.d.ts.map +1 -1
- package/dist/server/middleware.js +3 -0
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +35 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.289.md +50 -0
- package/upgrades/side-effects/import-runner.md +66 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Side-effects review — feedback import runner + dry-run rehearsal route
|
|
2
|
+
|
|
3
|
+
The cutover-readiness checker (G2.4) composes two conditions; one of them —
|
|
4
|
+
`integrity-gate-pass` — reads a persisted import IntegrityReport that NOTHING in
|
|
5
|
+
the codebase could produce: the integrity-gate core shipped as pure functions
|
|
6
|
+
(#778) with no end-to-end runner wired to live data. This builds the runner and a
|
|
7
|
+
zero-durable-writes REHEARSAL route, so the import pipeline is provable on real
|
|
8
|
+
production data today and the real import is one adapter away when the
|
|
9
|
+
creds-gated cloud DB (G1.4) lands.
|
|
10
|
+
|
|
11
|
+
## 1. The change
|
|
12
|
+
|
|
13
|
+
- `migration/importRunner.ts` (new): `runImport(source, target)` — pre-import
|
|
14
|
+
fingerprint-uniqueness scan (aborts BEFORE any write on a collision),
|
|
15
|
+
parent-before-child AS-IS import through the new `ImportTarget` seam, then the
|
|
16
|
+
full integrity gate over what the target READS BACK (intent is never trusted
|
|
17
|
+
over observation). `InMemoryImportTarget` (deep-copy isolation, duplicate-PK
|
|
18
|
+
refusal) is the dry-run/test implementation; the real Prisma adapter is a thin
|
|
19
|
+
future shim over the same seam. Status-equivalence checks CLUSTER statuses only
|
|
20
|
+
(feedback rows carry their own processing-state domain).
|
|
21
|
+
- `HttpParitySource`: opt-in `captureRaw` keeps cluster + feedback rows VERBATIM
|
|
22
|
+
for the import read (parity mode unchanged); plus a live-found classification
|
|
23
|
+
gap closed — an abort during the page BODY read now maps to the same classified
|
|
24
|
+
504 naming the page/budgets (was: raw "operation was aborted", observed live
|
|
25
|
+
2026-06-05 11:01Z).
|
|
26
|
+
- `CutoverReadiness`: `runImportDryRunPass()` persists the rehearsal envelope to
|
|
27
|
+
a SEPARATE `feedback-import-dryrun.json` path; `importDryRunStatus()` surfaces
|
|
28
|
+
it as `importDryRun` in `status()`. **Readiness honesty is structural**: the
|
|
29
|
+
constructor REFUSES wiring the dry-run path onto the canonical integrity path,
|
|
30
|
+
and `ready` composes integrity + parity only — a green rehearsal can never
|
|
31
|
+
green the gate.
|
|
32
|
+
- Routes: `POST /cutover-readiness/import-dryrun` (server computes, agent only
|
|
33
|
+
triggers — T7; same always-logged-outcome contract and same 360s per-path
|
|
34
|
+
timeout as parity-pass) + `GET /cutover-readiness/import-dryrun` (read-only).
|
|
35
|
+
- Awareness: CapabilityIndex, site reference/api.md, CLAUDE.md template + an
|
|
36
|
+
idempotent PostUpdateMigrator splice for agents already carrying the Cutover
|
|
37
|
+
Readiness section (Migration Parity Standard).
|
|
38
|
+
|
|
39
|
+
## 2. Blast radius
|
|
40
|
+
|
|
41
|
+
Additive. No existing route's behavior changes; `GET /cutover-readiness` gains
|
|
42
|
+
the informational `importDryRun` field. The rehearsal writes ONE new state file
|
|
43
|
+
(`state/feedback-import-dryrun.json`) and nothing else durable. The mandate
|
|
44
|
+
conditions (`integrity-gate-pass`, `parity-zero-divergence`) are untouched — the
|
|
45
|
+
rehearsal cannot reach either. No config migration needed (no new config keys;
|
|
46
|
+
the runner reuses `feedbackMigration.paritySource`). The real import stays
|
|
47
|
+
creds-gated and unbuilt at the adapter layer by design.
|
|
48
|
+
|
|
49
|
+
## 3. Test coverage
|
|
50
|
+
|
|
51
|
+
- Unit (18 new, import-runner.test.ts): AS-IS preservation incl. unknown fields,
|
|
52
|
+
collision abort writes NOTHING, mangling/dropping/inventing targets each caught
|
|
53
|
+
by the readback gate, dangling-FK, unknown-status divergence, full v1 legacy
|
|
54
|
+
vocabulary accepted, adapter-supplied schema honored, sequence planning,
|
|
55
|
+
duplicate-PK refusal, deep-copy isolation, snake_case ids.
|
|
56
|
+
- Unit (6 new, http-parity-source.test.ts): raw capture verbatim, cross-page
|
|
57
|
+
accumulation + dedup, raw reads refuse without captureRaw/prepare, body-read
|
|
58
|
+
abort → classified 504, non-abort body parse failure propagates.
|
|
59
|
+
- Unit (6 new, cutover-readiness.test.ts): dry-run records to the separate path
|
|
60
|
+
and `ready` stays false; failed check records nothing; no-source refusal;
|
|
61
|
+
pre-import abort surfaced; the same-path wiring REFUSED; torn envelope reads
|
|
62
|
+
never-ran.
|
|
63
|
+
- Integration (4 new): POST rehearsal over the full HTTP pipeline with a hostile
|
|
64
|
+
body contributing nothing; GET verdict; 409-records-nothing; 503 when absent.
|
|
65
|
+
- E2E (1 new): import-dryrun routes ALIVE on the production init path
|
|
66
|
+
(Bearer-gated, 409-not-404 without a source, composed status carries the leg).
|