@descryy/core 0.3.0 → 0.5.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.
- package/dist/budget/reply.d.ts +11 -46
- package/dist/budget/reply.d.ts.map +1 -1
- package/dist/budget/reply.js +10 -39
- package/dist/budget/reply.js.map +1 -1
- package/dist/budget/size.d.ts +2 -21
- package/dist/budget/size.d.ts.map +1 -1
- package/dist/budget/size.js +3 -24
- package/dist/budget/size.js.map +1 -1
- package/dist/capabilities/preconditions.d.ts +7 -68
- package/dist/capabilities/preconditions.d.ts.map +1 -1
- package/dist/capabilities/preconditions.js +6 -57
- package/dist/capabilities/preconditions.js.map +1 -1
- package/dist/contracts/engine.d.ts +26 -12
- package/dist/contracts/engine.d.ts.map +1 -1
- package/dist/contracts/engine.js +28 -11
- package/dist/contracts/engine.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/orphans.d.ts +28 -77
- package/dist/contracts/orphans.d.ts.map +1 -1
- package/dist/contracts/orphans.js +124 -94
- package/dist/contracts/orphans.js.map +1 -1
- package/dist/contracts/paths.d.ts +4 -114
- package/dist/contracts/paths.d.ts.map +1 -1
- package/dist/contracts/paths.js +7 -140
- package/dist/contracts/paths.js.map +1 -1
- package/dist/contracts/shapes.d.ts +13 -66
- package/dist/contracts/shapes.d.ts.map +1 -1
- package/dist/contracts/shapes.js +20 -91
- package/dist/contracts/shapes.js.map +1 -1
- package/dist/governance/budget.d.ts +12 -48
- package/dist/governance/budget.d.ts.map +1 -1
- package/dist/governance/budget.js +12 -48
- package/dist/governance/budget.js.map +1 -1
- package/dist/governance/candidate-boundary.d.ts +4 -32
- package/dist/governance/candidate-boundary.d.ts.map +1 -1
- package/dist/governance/candidate-boundary.js +4 -32
- package/dist/governance/candidate-boundary.js.map +1 -1
- package/dist/governance/escalation.d.ts +7 -45
- package/dist/governance/escalation.d.ts.map +1 -1
- package/dist/governance/escalation.js +7 -45
- package/dist/governance/escalation.js.map +1 -1
- package/dist/governance/fact-boundary.d.ts +7 -49
- package/dist/governance/fact-boundary.d.ts.map +1 -1
- package/dist/governance/fact-boundary.js +5 -43
- package/dist/governance/fact-boundary.js.map +1 -1
- package/dist/governance/finding-funnel.d.ts +11 -72
- package/dist/governance/finding-funnel.d.ts.map +1 -1
- package/dist/governance/finding-funnel.js +9 -68
- package/dist/governance/finding-funnel.js.map +1 -1
- package/dist/graph/build.d.ts +13 -75
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +0 -0
- package/dist/graph/build.js.map +1 -1
- package/dist/graph/cross-language.d.ts +4 -43
- package/dist/graph/cross-language.d.ts.map +1 -1
- package/dist/graph/cross-language.js +9 -77
- package/dist/graph/cross-language.js.map +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/merge.d.ts +8 -76
- package/dist/graph/merge.d.ts.map +1 -1
- package/dist/graph/merge.js +27 -77
- package/dist/graph/merge.js.map +1 -1
- package/dist/graph/observed-tests.d.ts +7 -68
- package/dist/graph/observed-tests.d.ts.map +1 -1
- package/dist/graph/observed-tests.js +5 -60
- package/dist/graph/observed-tests.js.map +1 -1
- package/dist/graph/persist.d.ts +2 -25
- package/dist/graph/persist.d.ts.map +1 -1
- package/dist/graph/persist.js +2 -25
- package/dist/graph/persist.js.map +1 -1
- package/dist/graph/runtime-confirmation.d.ts +14 -91
- package/dist/graph/runtime-confirmation.d.ts.map +1 -1
- package/dist/graph/runtime-confirmation.js +19 -103
- package/dist/graph/runtime-confirmation.js.map +1 -1
- package/dist/ledger/mint.d.ts +9 -43
- package/dist/ledger/mint.d.ts.map +1 -1
- package/dist/ledger/mint.js +15 -65
- package/dist/ledger/mint.js.map +1 -1
- package/dist/ledger/resolve.d.ts +13 -81
- package/dist/ledger/resolve.d.ts.map +1 -1
- package/dist/ledger/resolve.js +13 -76
- package/dist/ledger/resolve.js.map +1 -1
- package/dist/multipr/fingerprint.d.ts +5 -46
- package/dist/multipr/fingerprint.d.ts.map +1 -1
- package/dist/multipr/fingerprint.js +22 -74
- package/dist/multipr/fingerprint.js.map +1 -1
- package/dist/multipr/hidden-dependency.d.ts +13 -73
- package/dist/multipr/hidden-dependency.d.ts.map +1 -1
- package/dist/multipr/hidden-dependency.js +12 -63
- package/dist/multipr/hidden-dependency.js.map +1 -1
- package/dist/multipr/mechanical.d.ts +25 -160
- package/dist/multipr/mechanical.d.ts.map +1 -1
- package/dist/multipr/mechanical.js +21 -137
- package/dist/multipr/mechanical.js.map +1 -1
- package/dist/multipr/migration-heads.d.ts +18 -105
- package/dist/multipr/migration-heads.d.ts.map +1 -1
- package/dist/multipr/migration-heads.js +15 -84
- package/dist/multipr/migration-heads.js.map +1 -1
- package/dist/multipr/overlap.d.ts +16 -94
- package/dist/multipr/overlap.d.ts.map +1 -1
- package/dist/multipr/overlap.js +25 -105
- package/dist/multipr/overlap.js.map +1 -1
- package/dist/multipr/scope-store.d.ts +15 -80
- package/dist/multipr/scope-store.d.ts.map +1 -1
- package/dist/multipr/scope-store.js +17 -87
- package/dist/multipr/scope-store.js.map +1 -1
- package/dist/multipr/superseded.d.ts +10 -95
- package/dist/multipr/superseded.d.ts.map +1 -1
- package/dist/multipr/superseded.js +7 -60
- package/dist/multipr/superseded.js.map +1 -1
- package/dist/query/confirmed-facts.d.ts +12 -58
- package/dist/query/confirmed-facts.d.ts.map +1 -1
- package/dist/query/confirmed-facts.js +8 -47
- package/dist/query/confirmed-facts.js.map +1 -1
- package/dist/query/declared-value-closure.d.ts +13 -104
- package/dist/query/declared-value-closure.d.ts.map +1 -1
- package/dist/query/declared-value-closure.js +15 -104
- package/dist/query/declared-value-closure.js.map +1 -1
- package/dist/query/memory.d.ts +5 -9
- package/dist/query/memory.d.ts.map +1 -1
- package/dist/query/memory.js +31 -15
- package/dist/query/memory.js.map +1 -1
- package/dist/query/prominence.d.ts +6 -55
- package/dist/query/prominence.d.ts.map +1 -1
- package/dist/query/prominence.js +6 -55
- package/dist/query/prominence.js.map +1 -1
- package/dist/query/provider.d.ts +28 -81
- package/dist/query/provider.d.ts.map +1 -1
- package/dist/query/provider.js +8 -29
- package/dist/query/provider.js.map +1 -1
- package/dist/query/queries.d.ts +15 -65
- package/dist/query/queries.d.ts.map +1 -1
- package/dist/query/queries.js +43 -100
- package/dist/query/queries.js.map +1 -1
- package/dist/query/refusal-fetch.d.ts +8 -85
- package/dist/query/refusal-fetch.d.ts.map +1 -1
- package/dist/query/refusal-fetch.js +11 -93
- package/dist/query/refusal-fetch.js.map +1 -1
- package/dist/query/refusal-questions.d.ts +17 -92
- package/dist/query/refusal-questions.d.ts.map +1 -1
- package/dist/query/refusal-questions.js +14 -78
- package/dist/query/refusal-questions.js.map +1 -1
- package/dist/query/resolution-floor.d.ts +3 -23
- package/dist/query/resolution-floor.d.ts.map +1 -1
- package/dist/query/resolution-floor.js +3 -23
- package/dist/query/resolution-floor.js.map +1 -1
- package/dist/query/root-cause-score.d.ts +11 -161
- package/dist/query/root-cause-score.d.ts.map +1 -1
- package/dist/query/root-cause-score.js +6 -137
- package/dist/query/root-cause-score.js.map +1 -1
- package/dist/query/row-closure-picture.d.ts +5 -67
- package/dist/query/row-closure-picture.d.ts.map +1 -1
- package/dist/query/row-closure-picture.js +6 -67
- package/dist/query/row-closure-picture.js.map +1 -1
- package/dist/query/similar-incidents.d.ts +6 -41
- package/dist/query/similar-incidents.d.ts.map +1 -1
- package/dist/query/similar-incidents.js +15 -69
- package/dist/query/similar-incidents.js.map +1 -1
- package/dist/query/sqlite.d.ts +3 -7
- package/dist/query/sqlite.d.ts.map +1 -1
- package/dist/query/sqlite.js +13 -16
- package/dist/query/sqlite.js.map +1 -1
- package/dist/query/test-coverage.d.ts +5 -45
- package/dist/query/test-coverage.d.ts.map +1 -1
- package/dist/query/test-coverage.js +10 -53
- package/dist/query/test-coverage.js.map +1 -1
- package/dist/query/traverse.d.ts +22 -126
- package/dist/query/traverse.d.ts.map +1 -1
- package/dist/query/traverse.js +0 -0
- package/dist/query/traverse.js.map +1 -1
- package/dist/query/unresolved.d.ts +19 -164
- package/dist/query/unresolved.d.ts.map +1 -1
- package/dist/query/unresolved.js +11 -138
- package/dist/query/unresolved.js.map +1 -1
- package/dist/query/verification-status.d.ts +12 -109
- package/dist/query/verification-status.d.ts.map +1 -1
- package/dist/query/verification-status.js +9 -99
- package/dist/query/verification-status.js.map +1 -1
- package/dist/recording/migrate.d.ts +4 -10
- package/dist/recording/migrate.d.ts.map +1 -1
- package/dist/recording/migrate.js +4 -10
- package/dist/recording/migrate.js.map +1 -1
- package/dist/recording/reader.d.ts +2 -7
- package/dist/recording/reader.d.ts.map +1 -1
- package/dist/recording/reader.js +2 -7
- package/dist/recording/reader.js.map +1 -1
- package/dist/recording/redact.d.ts +6 -57
- package/dist/recording/redact.d.ts.map +1 -1
- package/dist/recording/redact.js +8 -64
- package/dist/recording/redact.js.map +1 -1
- package/dist/recording/schema.d.ts +3 -38
- package/dist/recording/schema.d.ts.map +1 -1
- package/dist/recording/schema.js +3 -38
- package/dist/recording/schema.js.map +1 -1
- package/dist/recording/writer.d.ts +11 -74
- package/dist/recording/writer.d.ts.map +1 -1
- package/dist/recording/writer.js +3 -43
- package/dist/recording/writer.js.map +1 -1
- package/dist/scoping/fanout.d.ts +6 -68
- package/dist/scoping/fanout.d.ts.map +1 -1
- package/dist/scoping/fanout.js +6 -68
- package/dist/scoping/fanout.js.map +1 -1
- package/dist/scoping/score.d.ts +20 -70
- package/dist/scoping/score.d.ts.map +1 -1
- package/dist/scoping/score.js +20 -70
- package/dist/scoping/score.js.map +1 -1
- package/dist/scoping/tiers.d.ts +4 -16
- package/dist/scoping/tiers.d.ts.map +1 -1
- package/dist/scoping/tiers.js +4 -16
- package/dist/scoping/tiers.js.map +1 -1
- package/dist/scoping/traverse.d.ts +3 -25
- package/dist/scoping/traverse.d.ts.map +1 -1
- package/dist/scoping/traverse.js +14 -49
- package/dist/scoping/traverse.js.map +1 -1
- package/dist/scoping/weights.d.ts +10 -74
- package/dist/scoping/weights.d.ts.map +1 -1
- package/dist/scoping/weights.js +14 -86
- package/dist/scoping/weights.js.map +1 -1
- package/dist/sources/confirmed/incidents.d.ts +5 -35
- package/dist/sources/confirmed/incidents.d.ts.map +1 -1
- package/dist/sources/confirmed/incidents.js +14 -48
- package/dist/sources/confirmed/incidents.js.map +1 -1
- package/dist/sources/git/diff.d.ts +71 -65
- package/dist/sources/git/diff.d.ts.map +1 -1
- package/dist/sources/git/diff.js +136 -83
- package/dist/sources/git/diff.js.map +1 -1
- package/dist/sources/git/env.d.ts +7 -0
- package/dist/sources/git/env.d.ts.map +1 -1
- package/dist/sources/git/env.js +10 -11
- package/dist/sources/git/env.js.map +1 -1
- package/dist/sources/git/history.d.ts +64 -84
- package/dist/sources/git/history.d.ts.map +1 -1
- package/dist/sources/git/history.js +141 -112
- package/dist/sources/git/history.js.map +1 -1
- package/dist/sources/git/incidents.d.ts +13 -75
- package/dist/sources/git/incidents.d.ts.map +1 -1
- package/dist/sources/git/incidents.js +21 -91
- package/dist/sources/git/incidents.js.map +1 -1
- package/dist/sources/git/index.d.ts +5 -3
- package/dist/sources/git/index.d.ts.map +1 -1
- package/dist/sources/git/index.js +3 -2
- package/dist/sources/git/index.js.map +1 -1
- package/dist/sources/git/source.d.ts +9 -79
- package/dist/sources/git/source.d.ts.map +1 -1
- package/dist/sources/git/source.js +0 -0
- package/dist/sources/git/source.js.map +1 -1
- package/dist/sources/migrations/across-change.d.ts +94 -0
- package/dist/sources/migrations/across-change.d.ts.map +1 -0
- package/dist/sources/migrations/across-change.js +278 -0
- package/dist/sources/migrations/across-change.js.map +1 -0
- package/dist/sources/migrations/dialects.d.ts +20 -36
- package/dist/sources/migrations/dialects.d.ts.map +1 -1
- package/dist/sources/migrations/dialects.js +11 -36
- package/dist/sources/migrations/dialects.js.map +1 -1
- package/dist/sources/migrations/index.d.ts +3 -1
- package/dist/sources/migrations/index.d.ts.map +1 -1
- package/dist/sources/migrations/index.js +2 -1
- package/dist/sources/migrations/index.js.map +1 -1
- package/dist/sources/migrations/read.d.ts +14 -79
- package/dist/sources/migrations/read.d.ts.map +1 -1
- package/dist/sources/migrations/read.js +14 -89
- package/dist/sources/migrations/read.js.map +1 -1
- package/dist/sources/workspace/workspace.d.ts +6 -42
- package/dist/sources/workspace/workspace.d.ts.map +1 -1
- package/dist/sources/workspace/workspace.js +10 -53
- package/dist/sources/workspace/workspace.js.map +1 -1
- package/dist/store/driver/driver.d.ts +9 -38
- package/dist/store/driver/driver.d.ts.map +1 -1
- package/dist/store/driver/driver.js +4 -22
- package/dist/store/driver/driver.js.map +1 -1
- package/dist/store/driver/node-sqlite.d.ts +3 -12
- package/dist/store/driver/node-sqlite.d.ts.map +1 -1
- package/dist/store/driver/node-sqlite.js +4 -18
- package/dist/store/driver/node-sqlite.js.map +1 -1
- package/dist/store/index.d.ts +2 -7
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +4 -10
- package/dist/store/index.js.map +1 -1
- package/dist/store/migrate.d.ts +14 -50
- package/dist/store/migrate.d.ts.map +1 -1
- package/dist/store/migrate.js +15 -52
- package/dist/store/migrate.js.map +1 -1
- package/dist/store/reader.d.ts +19 -84
- package/dist/store/reader.d.ts.map +1 -1
- package/dist/store/reader.js +25 -92
- package/dist/store/reader.js.map +1 -1
- package/dist/store/schema.d.ts +14 -76
- package/dist/store/schema.d.ts.map +1 -1
- package/dist/store/schema.js +14 -76
- package/dist/store/schema.js.map +1 -1
- package/dist/store/writer.d.ts +14 -88
- package/dist/store/writer.d.ts.map +1 -1
- package/dist/store/writer.js +29 -123
- package/dist/store/writer.js.map +1 -1
- package/dist/tiers/certify.d.ts +46 -281
- package/dist/tiers/certify.d.ts.map +1 -1
- package/dist/tiers/certify.js +46 -226
- package/dist/tiers/certify.js.map +1 -1
- package/dist/tiers/ladder.d.ts +7 -51
- package/dist/tiers/ladder.d.ts.map +1 -1
- package/dist/tiers/ladder.js +13 -89
- package/dist/tiers/ladder.js.map +1 -1
- package/dist/validation/attributes.d.ts +47 -0
- package/dist/validation/attributes.d.ts.map +1 -0
- package/dist/validation/attributes.js +130 -0
- package/dist/validation/attributes.js.map +1 -0
- package/dist/validation/config-graph.d.ts +7 -56
- package/dist/validation/config-graph.d.ts.map +1 -1
- package/dist/validation/config-graph.js +15 -61
- package/dist/validation/config-graph.js.map +1 -1
- package/dist/validation/env.d.ts +53 -2
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +99 -4
- package/dist/validation/env.js.map +1 -1
- package/dist/validation/index.d.ts +5 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +3 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/join-substitution.d.ts +22 -120
- package/dist/validation/join-substitution.d.ts.map +1 -1
- package/dist/validation/join-substitution.js +13 -90
- package/dist/validation/join-substitution.js.map +1 -1
- package/dist/validation/migration-integrity.d.ts +72 -0
- package/dist/validation/migration-integrity.d.ts.map +1 -0
- package/dist/validation/migration-integrity.js +238 -0
- package/dist/validation/migration-integrity.js.map +1 -0
- package/dist/validation/migrations.d.ts +23 -88
- package/dist/validation/migrations.d.ts.map +1 -1
- package/dist/validation/migrations.js +20 -79
- package/dist/validation/migrations.js.map +1 -1
- package/dist/validation/nodes.d.ts +3 -1
- package/dist/validation/nodes.d.ts.map +1 -1
- package/dist/validation/nodes.js +3 -1
- package/dist/validation/nodes.js.map +1 -1
- package/dist/validation/rollback.d.ts +10 -73
- package/dist/validation/rollback.d.ts.map +1 -1
- package/dist/validation/rollback.js +23 -81
- package/dist/validation/rollback.js.map +1 -1
- package/dist/validation/route-drift.d.ts +9 -62
- package/dist/validation/route-drift.d.ts.map +1 -1
- package/dist/validation/route-drift.js +7 -52
- package/dist/validation/route-drift.js.map +1 -1
- package/dist/validation/sources.d.ts +16 -94
- package/dist/validation/sources.d.ts.map +1 -1
- package/dist/validation/sources.js +51 -147
- package/dist/validation/sources.js.map +1 -1
- package/dist/worker/pool.d.ts +6 -45
- package/dist/worker/pool.d.ts.map +1 -1
- package/dist/worker/pool.js +5 -42
- package/dist/worker/pool.js.map +1 -1
- package/dist/worker/protocol.d.ts +7 -20
- package/dist/worker/protocol.d.ts.map +1 -1
- package/dist/worker/protocol.js +3 -10
- package/dist/worker/protocol.js.map +1 -1
- package/dist/worker/traversal.worker.d.ts +2 -21
- package/dist/worker/traversal.worker.d.ts.map +1 -1
- package/dist/worker/traversal.worker.js +4 -23
- package/dist/worker/traversal.worker.js.map +1 -1
- package/package.json +11 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/validation/migrations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/validation/migrations.ts"],"names":[],"mappings":"AAAA;;;;8EAI8E;AAO9E;+CAC+C;AAC/C,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,aAAa,GACb,aAAa,GACb,UAAU,GACV,QAAQ,CAAC;AAEb;;+DAE+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC;2FACuF;IACvF,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAA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a,CAgE9F"}
|
|
@@ -1,75 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* it names nothing the Canonical IR boundary forbids. Same limit, too — this half
|
|
7
|
-
* sees only what is written as DDL, and DEC-122 measured exactly how little that
|
|
8
|
-
* is: **zero `.sql` files inside a migration directory across fifteen reference
|
|
9
|
-
* repositories**, against 3,301 migrations written as program code. The code half
|
|
10
|
-
* arrives through `attrs.migrationOps` and is an adapter's to produce.
|
|
11
|
-
*
|
|
12
|
-
* ## The scope fence, which is what makes this Class A
|
|
13
|
-
*
|
|
14
|
-
* Appendix B.3 settles rollback readiness as Class A against two sources that
|
|
15
|
-
* called it B, and the resolution turns entirely on what is claimed:
|
|
16
|
-
*
|
|
17
|
-
* > **"this migration contains a destructive operation"** — a fact, and a
|
|
18
|
-
* > deterministic pattern match establishes it.
|
|
19
|
-
* >
|
|
20
|
-
* > **"this migration is unsafe to roll back"** — an inference, requiring the
|
|
21
|
-
* > consumer-impact analysis §15.3 explicitly separates this check from.
|
|
22
|
-
*
|
|
23
|
-
* Every sentence produced here is written to stay behind that fence. The finding
|
|
24
|
-
* names the operation, the object and the line; it does not characterise risk.
|
|
25
|
-
*
|
|
26
|
-
* ## What counts as destructive, and the things deliberately left out
|
|
27
|
-
*
|
|
28
|
-
* Only operations that **destroy data**. `DROP INDEX`, `DROP CONSTRAINT`,
|
|
29
|
-
* `DROP VIEW`, `DROP TRIGGER` and `DROP FUNCTION` are all recoverable by
|
|
30
|
-
* re-running the definition and none of them loses a row, so including them
|
|
31
|
-
* would triple the finding count with statements nobody needs to see. A rename
|
|
32
|
-
* is carried separately: the data survives, so it is not the same claim as a
|
|
33
|
-
* drop, but every reader of the old name breaks.
|
|
34
|
-
*
|
|
35
|
-
* ## Section detection is tool-blind on purpose
|
|
36
|
-
*
|
|
37
|
-
* Directional migrations mark their halves with a comment directive. Matching a
|
|
38
|
-
* specific tool's spelling would put that tool's name in engine code — rule 1,
|
|
39
|
-
* the violation the boundary lint already caught once in this directory. So the
|
|
40
|
-
* **shape** is matched instead: a comment carrying a directive word followed by
|
|
41
|
-
* an up/down keyword, in either the `+name Up` form or a bare `-- Up`. Any tool
|
|
42
|
-
* using that shape works; none of them is named.
|
|
43
|
-
*/
|
|
1
|
+
/** §15.3's rollback-readiness check, format half — DDL is a format, not a
|
|
2
|
+
* language, so it stays below the IR boundary. DEC-122: zero `.sql` files
|
|
3
|
+
* across 15 repos vs 3,301 migrations as code (adapter's territory).
|
|
4
|
+
* Class A (Appx B.3): reports only "this drops data", never the inference
|
|
5
|
+
* "unsafe to roll back". Section markers matched by shape, not tool name. */
|
|
44
6
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
45
7
|
import { join, relative, sep } from "node:path";
|
|
46
8
|
import { skipDirectory } from "./sources.js";
|
|
47
9
|
const DEFAULT_MAX_DEPTH = 8;
|
|
48
10
|
const DEFAULT_MAX_FILES = 20_000;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
* rather than after any tool that creates it. A `.sql` file in a `schema/`
|
|
54
|
-
* directory is a definition, not a change, and reading it as one would report
|
|
55
|
-
* every `CREATE`-then-`DROP` setup script in the repository.
|
|
56
|
-
*/
|
|
57
|
-
const MIGRATION_DIRECTORY = /(^|\/)(migrations?|migrate|versions|changelogs?)(\/|$)/i;
|
|
11
|
+
/** A directory holding migrations — path-based, not content-based, so a
|
|
12
|
+
* `.sql` file in `schema/` (a definition, not a change) isn't misread.
|
|
13
|
+
* Exported for `migration-integrity.ts`'s tie-break: a generic shape, no tool/framework name. */
|
|
14
|
+
export const MIGRATION_DIRECTORY = /(^|\/)(migrations?|migrate|versions|changelogs?)(\/|$)/i;
|
|
58
15
|
/** A directive comment carrying a direction, in either common shape. */
|
|
59
16
|
const SECTION_MARKER = /^\s*--\s*(?:\+\w+\s+)?(up|down)\b/i;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* A plain split would cut a statement in half at the first semicolon inside a
|
|
65
|
-
* default value, which is a real thing to find in a migration.
|
|
66
|
-
*
|
|
67
|
-
* **This duplicates the splitter in `adapter-sql`, deliberately and with the
|
|
68
|
-
* cost recorded** (DEC-122). `@descryy/core` cannot depend on an adapter —
|
|
69
|
-
* adapters depend on core — so the alternative to a second copy is inverting the
|
|
70
|
-
* boundary the repository split exists to hold. If a third caller appears, the
|
|
71
|
-
* right home is `@descryy/ir`.
|
|
72
|
-
*/
|
|
17
|
+
/** Splits DDL on `;`, skipping separators inside strings/identifiers/comments.
|
|
18
|
+
* Duplicates `adapter-sql`'s splitter (core can't depend on an adapter,
|
|
19
|
+
* DEC-122) — a third caller should move this to `@descryy/ir`. */
|
|
73
20
|
export function statements(sql) {
|
|
74
21
|
const found = [];
|
|
75
22
|
let buffer = "";
|
|
@@ -136,23 +83,14 @@ export function statements(sql) {
|
|
|
136
83
|
function unquote(identifier) {
|
|
137
84
|
return identifier.replace(/^["`[]+|["`\]]+$/g, "").toLowerCase();
|
|
138
85
|
}
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* Returns `null` for everything unrecognised, which is the overwhelming
|
|
143
|
-
* majority and is correct: an unclassified statement is not a silent pass, it is
|
|
144
|
-
* counted by the caller and disclosed.
|
|
145
|
-
*/
|
|
86
|
+
/** Classifies one statement; `null` for unrecognised (the majority) is
|
|
87
|
+
* correct — the caller counts and discloses it, not a silent pass. */
|
|
146
88
|
export function classifyStatement(text, line, section) {
|
|
147
89
|
const flat = text.replace(/\s+/g, " ").trim();
|
|
148
90
|
const guarded = /\bIF\s+EXISTS\b/i.test(flat);
|
|
149
|
-
// ALTER TABLE … DROP COLUMN
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
// The negative lookahead is not decoration. `ALTER TABLE t DROP CONSTRAINT c`
|
|
153
|
-
// has the same shape with the keyword omitted, and without the guard the
|
|
154
|
-
// constraint name is read as a column name — a data-loss claim about a
|
|
155
|
-
// statement that loses no data. Found by a test, which is where it belongs.
|
|
91
|
+
// ALTER TABLE … DROP COLUMN checked before bare DROP (substring match).
|
|
92
|
+
// Negative lookahead matters: `DROP CONSTRAINT c` without it reads as a
|
|
93
|
+
// column drop — a false data-loss claim. Caught by a test.
|
|
156
94
|
const dropColumn = /^ALTER\s+TABLE\s+(?:IF\s+EXISTS\s+)?([\w."`[\]]+)\s+DROP\s+(?:COLUMN\s+)?(?:IF\s+EXISTS\s+)?(?!CONSTRAINT\b|INDEX\b|CHECK\b|PRIMARY\b|FOREIGN\b|UNIQUE\b|DEFAULT\b|NOT\b|PARTITION\b)([\w."`[\]]+)/i.exec(flat);
|
|
157
95
|
if (dropColumn !== null) {
|
|
158
96
|
return {
|
|
@@ -272,6 +210,9 @@ export function scanMigrations(root, options = {}) {
|
|
|
272
210
|
directory = statSync(full).isDirectory();
|
|
273
211
|
}
|
|
274
212
|
catch {
|
|
213
|
+
// Same as an unreadable dir, on one entry (broken symlink, perm error,
|
|
214
|
+
// race). Disclosed via `unreadable` (rule 7), not dropped silently.
|
|
215
|
+
unreadable.push(rel(root, full));
|
|
275
216
|
continue;
|
|
276
217
|
}
|
|
277
218
|
if (directory) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/validation/migrations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/validation/migrations.ts"],"names":[],"mappings":"AAAA;;;;8EAI8E;AAE9E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAoD7C,MAAM,iBAAiB,GAAG,C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AAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACd,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AACpD,CAAC;AAED,SAAS,GAAG,CAAC,IAAY,EAAE,IAAY;IACrC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -10,7 +10,9 @@ import type { AdjacencyProvider } from "../query/provider.ts";
|
|
|
10
10
|
* The node types that stand for a whole file.
|
|
11
11
|
*
|
|
12
12
|
* **Every shipped adapter emits `MODULE` for a file and not one of them emits
|
|
13
|
-
* `FILE`** — verified across all
|
|
13
|
+
* `FILE`** — verified across all ten language adapters, not assumed. The count
|
|
14
|
+
* was written as nine and a tenth shipped; the fact it carries did not change,
|
|
15
|
+
* which is exactly why the wrong number survived. The checks in this directory
|
|
14
16
|
* were written against `FILE` alone, their tests minted `FILE` nodes, their
|
|
15
17
|
* benches minted `FILE` nodes, and all three gates passed while the graph half of
|
|
16
18
|
* every check was unable to fire on any real repository. The number stayed right
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/validation/nodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/validation/nodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,6BAA8B,CAAC;AAElE,+DAA+D;AAC/D,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAgBpE"}
|
package/dist/validation/nodes.js
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* The node types that stand for a whole file.
|
|
9
9
|
*
|
|
10
10
|
* **Every shipped adapter emits `MODULE` for a file and not one of them emits
|
|
11
|
-
* `FILE`** — verified across all
|
|
11
|
+
* `FILE`** — verified across all ten language adapters, not assumed. The count
|
|
12
|
+
* was written as nine and a tenth shipped; the fact it carries did not change,
|
|
13
|
+
* which is exactly why the wrong number survived. The checks in this directory
|
|
12
14
|
* were written against `FILE` alone, their tests minted `FILE` nodes, their
|
|
13
15
|
* benches minted `FILE` nodes, and all three gates passed while the graph half of
|
|
14
16
|
* every check was unable to fire on any real repository. The number stayed right
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/validation/nodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/validation/nodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU,CAAC;AAElE,+DAA+D;AAC/D,MAAM,UAAU,eAAe,CAC7B,QAA2B,EAC3B,KAAc;IAEd,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,sBAAsB,EAAE,CAAC;QAC1C,MAAM,GAAG,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjG,SAAS,GAAG,SAAS,IAAI,GAAG,CAAC,SAAS,CAAC;QACvC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC7B,yEAAyE;YACzE,qCAAqC;YACrC,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,SAAS;YACxD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI;gBAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -1,56 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Class A at R0, and **deliberately the easy half of consumer impact**: a
|
|
6
|
-
* destructive operation is a pattern in a migration, not an inference about who
|
|
7
|
-
* reads the column. The scope fence that makes that classification safe is stated
|
|
8
|
-
* in `migrations.ts` and every sentence below stays behind it.
|
|
9
|
-
*
|
|
10
|
-
* ## The trap, measured before this was written
|
|
11
|
-
*
|
|
12
|
-
* The env check's trap was a variable read and never declared. This one is
|
|
13
|
-
* larger, and DEC-122 counted it:
|
|
14
|
-
*
|
|
15
|
-
* | repository | migrations | with a reverse section |
|
|
16
|
-
* | --- | --- | --- |
|
|
17
|
-
* | `outline` | 300 | **300** |
|
|
18
|
-
* | `dispatch` | 162 | **162** |
|
|
19
|
-
* | `directus` | 112 | 110 |
|
|
20
|
-
*
|
|
21
|
-
* **Effectively every migration in these projects declares a reverse, and a
|
|
22
|
-
* destructive operation in the reverse is supposed to be there** — it undoes the
|
|
23
|
-
* forward migration. A check that matched destructive operations without knowing
|
|
24
|
-
* which half it was reading would report `outline`'s 202 destructive files, and
|
|
25
|
-
* most of those matches are a drop that undoes a create three lines above.
|
|
26
|
-
*
|
|
27
|
-
* So `section` is to this check what `required` was to the env check: the field
|
|
28
|
-
* without which the whole thing is wrong on nearly every file it sees. And
|
|
29
|
-
* `unknown` is not a synonym for `forward`. Two of the reference repositories
|
|
30
|
-
* declare no direction at all — they hand the framework a reversal callback — and
|
|
31
|
-
* their operations are **counted and disclosed, never reported**. That refusal
|
|
32
|
-
* alone withholds 192 files' worth of matches, and it is the honest treatment:
|
|
33
|
-
* an operation whose half cannot be determined is not evidence of a forward
|
|
34
|
-
* destructive change.
|
|
35
|
-
*
|
|
36
|
-
* ## Two further refusals, both from the only real DDL in the corpus
|
|
37
|
-
*
|
|
38
|
-
* - **`DROP … IF EXISTS` paired with a `CREATE` of the same object** is an
|
|
39
|
-
* idempotent setup script, not a data-losing change. Both destructive lines in
|
|
40
|
-
* the one genuine `.sql` file found across fifteen repositories are exactly
|
|
41
|
-
* this shape.
|
|
42
|
-
* - **Dropping an object created in the same migration** is not a finding. The
|
|
43
|
-
* object did not exist before the file ran.
|
|
44
|
-
*
|
|
45
|
-
* ## Where the input comes from
|
|
46
|
-
*
|
|
47
|
-
* Two sources, and DEC-122 measured that the one the architecture implies is the
|
|
48
|
-
* smaller: **0 `.sql` files inside a migration directory** across the reference
|
|
49
|
-
* corpus, against **3,301** migrations written as program code. The format half
|
|
50
|
-
* runs today and needs no adapter; the code half arrives as `attrs.migrationOps`
|
|
51
|
-
* and is an adapter's to produce. When neither is present the check says so and
|
|
52
|
-
* does not report a clean result.
|
|
53
|
-
*/
|
|
1
|
+
/** §15.3 rollback-readiness — Class A at R0, deliberately the easy half (fence in migrations.ts).
|
|
2
|
+
* `section` is load-bearing like `required` was for env: reverse-section drops are correct code
|
|
3
|
+
* (near-100% of migrations, DEC-122), and `unknown` section is withheld, never assumed forward. */
|
|
54
4
|
import type { ResolutionLevel } from "@descryy/ir";
|
|
55
5
|
import type { AdjacencyProvider, QueryResult } from "../query/provider.ts";
|
|
56
6
|
import type { DestructiveKind, MigrationOp, MigrationScan } from "./migrations.ts";
|
|
@@ -60,12 +10,8 @@ export interface RollbackFinding {
|
|
|
60
10
|
readonly target: string;
|
|
61
11
|
readonly file: string;
|
|
62
12
|
readonly line: number;
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* Stays behind the §15.3 fence: it states that the operation is present, never
|
|
67
|
-
* that the migration is unsafe to roll back.
|
|
68
|
-
*/
|
|
13
|
+
/** The sentence a developer reads. Stays behind the §15.3 fence — states the operation is
|
|
14
|
+
* present, never that the migration is unsafe to roll back. */
|
|
69
15
|
readonly detail: string;
|
|
70
16
|
readonly resolution: ResolutionLevel;
|
|
71
17
|
}
|
|
@@ -81,12 +27,8 @@ export interface RollbackReport {
|
|
|
81
27
|
/** Destructive operations seen, before any refusal. */
|
|
82
28
|
readonly operations: number;
|
|
83
29
|
};
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* The counts are the point: they are the size of what this check chose not to
|
|
88
|
-
* say, and each has a different cause a reader can act on.
|
|
89
|
-
*/
|
|
30
|
+
/** Every operation declined, by reason. The counts are the point — the size of what this check
|
|
31
|
+
* chose not to say, each with a cause a reader can act on. */
|
|
90
32
|
readonly withheld: {
|
|
91
33
|
/** In a reverse section — undoing a forward migration. */
|
|
92
34
|
readonly reverse: number;
|
|
@@ -108,14 +50,9 @@ export interface RollbackOptions {
|
|
|
108
50
|
readonly files?: readonly string[];
|
|
109
51
|
readonly limit?: number;
|
|
110
52
|
}
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* A row with no `section`, or an unrecognised one, is **dropped rather than
|
|
115
|
-
* treated as forward**. Defaulting it would manufacture exactly the claim the
|
|
116
|
-
* reverse-section fence exists to withhold, on a corpus where the reverse
|
|
117
|
-
* section is present in effectively every file.
|
|
118
|
-
*/
|
|
53
|
+
/** Pulls `attrs.migrationOps` off a file node, refusing anything malformed. A row with no
|
|
54
|
+
* `section` (or an unrecognised one) is dropped, never defaulted to forward — that would
|
|
55
|
+
* manufacture exactly the claim the reverse-section fence exists to withhold. */
|
|
119
56
|
export declare function readMigrationOps(attrs: Readonly<Record<string, unknown>>): {
|
|
120
57
|
readonly ops: readonly MigrationOp[];
|
|
121
58
|
readonly malformed: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollback.d.ts","sourceRoot":"","sources":["../../src/validation/rollback.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rollback.d.ts","sourceRoot":"","sources":["../../src/validation/rollback.ts"],"names":[],"mappings":"AAAA;;oGAEoG;AAEpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAc,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGvF,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,aAAa,EAEd,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,0DAA0D;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zB;AAgBD;;kFAEkF;AAClF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACvC;IAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,WAAW,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAsCtE;AASD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,aAAa,EACnB,OAAO,GAAE,eAAoB,GAC5B,WAAW,CAAC,cAAc,CAAC,CA6M7B"}
|
|
@@ -1,57 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Class A at R0, and **deliberately the easy half of consumer impact**: a
|
|
6
|
-
* destructive operation is a pattern in a migration, not an inference about who
|
|
7
|
-
* reads the column. The scope fence that makes that classification safe is stated
|
|
8
|
-
* in `migrations.ts` and every sentence below stays behind it.
|
|
9
|
-
*
|
|
10
|
-
* ## The trap, measured before this was written
|
|
11
|
-
*
|
|
12
|
-
* The env check's trap was a variable read and never declared. This one is
|
|
13
|
-
* larger, and DEC-122 counted it:
|
|
14
|
-
*
|
|
15
|
-
* | repository | migrations | with a reverse section |
|
|
16
|
-
* | --- | --- | --- |
|
|
17
|
-
* | `outline` | 300 | **300** |
|
|
18
|
-
* | `dispatch` | 162 | **162** |
|
|
19
|
-
* | `directus` | 112 | 110 |
|
|
20
|
-
*
|
|
21
|
-
* **Effectively every migration in these projects declares a reverse, and a
|
|
22
|
-
* destructive operation in the reverse is supposed to be there** — it undoes the
|
|
23
|
-
* forward migration. A check that matched destructive operations without knowing
|
|
24
|
-
* which half it was reading would report `outline`'s 202 destructive files, and
|
|
25
|
-
* most of those matches are a drop that undoes a create three lines above.
|
|
26
|
-
*
|
|
27
|
-
* So `section` is to this check what `required` was to the env check: the field
|
|
28
|
-
* without which the whole thing is wrong on nearly every file it sees. And
|
|
29
|
-
* `unknown` is not a synonym for `forward`. Two of the reference repositories
|
|
30
|
-
* declare no direction at all — they hand the framework a reversal callback — and
|
|
31
|
-
* their operations are **counted and disclosed, never reported**. That refusal
|
|
32
|
-
* alone withholds 192 files' worth of matches, and it is the honest treatment:
|
|
33
|
-
* an operation whose half cannot be determined is not evidence of a forward
|
|
34
|
-
* destructive change.
|
|
35
|
-
*
|
|
36
|
-
* ## Two further refusals, both from the only real DDL in the corpus
|
|
37
|
-
*
|
|
38
|
-
* - **`DROP … IF EXISTS` paired with a `CREATE` of the same object** is an
|
|
39
|
-
* idempotent setup script, not a data-losing change. Both destructive lines in
|
|
40
|
-
* the one genuine `.sql` file found across fifteen repositories are exactly
|
|
41
|
-
* this shape.
|
|
42
|
-
* - **Dropping an object created in the same migration** is not a finding. The
|
|
43
|
-
* object did not exist before the file ran.
|
|
44
|
-
*
|
|
45
|
-
* ## Where the input comes from
|
|
46
|
-
*
|
|
47
|
-
* Two sources, and DEC-122 measured that the one the architecture implies is the
|
|
48
|
-
* smaller: **0 `.sql` files inside a migration directory** across the reference
|
|
49
|
-
* corpus, against **3,301** migrations written as program code. The format half
|
|
50
|
-
* runs today and needs no adapter; the code half arrives as `attrs.migrationOps`
|
|
51
|
-
* and is an adapter's to produce. When neither is present the check says so and
|
|
52
|
-
* does not report a clean result.
|
|
53
|
-
*/
|
|
1
|
+
/** §15.3 rollback-readiness — Class A at R0, deliberately the easy half (fence in migrations.ts).
|
|
2
|
+
* `section` is load-bearing like `required` was for env: reverse-section drops are correct code
|
|
3
|
+
* (near-100% of migrations, DEC-122), and `unknown` section is withheld, never assumed forward. */
|
|
54
4
|
import { fileScopedNodes } from "./nodes.js";
|
|
5
|
+
import { readMigrationRevision } from "./migration-integrity.js";
|
|
55
6
|
const DEFAULT_MAX_FINDINGS = 25;
|
|
56
7
|
/** DDL read straight from the repository needs no resolution — see `env.ts`. */
|
|
57
8
|
const DECLARATIVE_RESOLUTION = 3;
|
|
@@ -63,14 +14,9 @@ const KINDS = new Set([
|
|
|
63
14
|
"TRUNCATE",
|
|
64
15
|
"RENAME",
|
|
65
16
|
]);
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* A row with no `section`, or an unrecognised one, is **dropped rather than
|
|
70
|
-
* treated as forward**. Defaulting it would manufacture exactly the claim the
|
|
71
|
-
* reverse-section fence exists to withhold, on a corpus where the reverse
|
|
72
|
-
* section is present in effectively every file.
|
|
73
|
-
*/
|
|
17
|
+
/** Pulls `attrs.migrationOps` off a file node, refusing anything malformed. A row with no
|
|
18
|
+
* `section` (or an unrecognised one) is dropped, never defaulted to forward — that would
|
|
19
|
+
* manufacture exactly the claim the reverse-section fence exists to withhold. */
|
|
74
20
|
export function readMigrationOps(attrs) {
|
|
75
21
|
const raw = attrs["migrationOps"];
|
|
76
22
|
if (!Array.isArray(raw))
|
|
@@ -111,7 +57,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
111
57
|
const scoped = options.files === undefined ? null : new Set(options.files);
|
|
112
58
|
const notes = [];
|
|
113
59
|
const candidates = [];
|
|
114
|
-
// --- the format half: DDL read from the repository -----------------------
|
|
115
60
|
let fromSource = 0;
|
|
116
61
|
for (const migration of scan.files) {
|
|
117
62
|
if (scoped !== null && !scoped.has(migration.file))
|
|
@@ -126,7 +71,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
126
71
|
});
|
|
127
72
|
}
|
|
128
73
|
}
|
|
129
|
-
// --- the code half: whatever an adapter attached -------------------------
|
|
130
74
|
const nodes = fileScopedNodes(provider, options.limit);
|
|
131
75
|
let fromGraph = 0;
|
|
132
76
|
let malformed = 0;
|
|
@@ -138,14 +82,17 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
138
82
|
continue;
|
|
139
83
|
const extracted = readMigrationOps(node.attrs);
|
|
140
84
|
malformed += extracted.malformed;
|
|
141
|
-
|
|
85
|
+
// A migration with no destructive op is still a migration read — a CREATE-TABLE-only file
|
|
86
|
+
// must not trigger "No migration was read". `readMigrationRevision` is shared with
|
|
87
|
+
// migration-integrity.ts so the two checks can't disagree on what counts as a migration node.
|
|
88
|
+
const hasRevision = readMigrationRevision(node.attrs, path, node.resolution) !== null;
|
|
89
|
+
if (extracted.ops.length === 0 && !hasRevision)
|
|
142
90
|
continue;
|
|
143
91
|
fromGraph += 1;
|
|
144
92
|
for (const op of extracted.ops) {
|
|
145
93
|
candidates.push({ op, file: path, creates: [], resolution: node.resolution });
|
|
146
94
|
}
|
|
147
95
|
}
|
|
148
|
-
// --- the refusals --------------------------------------------------------
|
|
149
96
|
const findings = [];
|
|
150
97
|
const withheld = { reverse: 0, undirected: 0, idempotent: 0, selfCreated: 0 };
|
|
151
98
|
for (const candidate of candidates) {
|
|
@@ -158,10 +105,8 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
158
105
|
withheld.undirected += 1;
|
|
159
106
|
continue;
|
|
160
107
|
}
|
|
161
|
-
// Order separates two
|
|
162
|
-
//
|
|
163
|
-
// *after* a guarded drop is an idempotent setup script. Without the line
|
|
164
|
-
// these collapse into one bucket and the disclosure names the wrong cause.
|
|
108
|
+
// Order separates two refusals: a create BEFORE the drop is a temporary object; a create
|
|
109
|
+
// AFTER a guarded drop is an idempotent setup script. Without the line these collapse wrongly.
|
|
165
110
|
const object = op.target.split(".")[0] ?? op.target;
|
|
166
111
|
const matches = candidate.creates.filter((c) => c.name === op.target || c.name === object);
|
|
167
112
|
if (matches.some((c) => c.line < op.line)) {
|
|
@@ -187,15 +132,15 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
187
132
|
a.line - b.line ||
|
|
188
133
|
a.target.localeCompare(b.target));
|
|
189
134
|
const kept = findings.slice(0, maxFindings);
|
|
190
|
-
// --- disclosures ---------------------------------------------------------
|
|
191
135
|
const ran = fromSource > 0 || fromGraph > 0;
|
|
192
136
|
const blockers = [];
|
|
193
137
|
if (!ran) {
|
|
194
138
|
blockers.push("No migration was read. This check reads DDL files under a migration directory straight " +
|
|
195
|
-
"from the repository,
|
|
196
|
-
"an array of { kind, target, line, section }
|
|
197
|
-
"
|
|
198
|
-
"
|
|
139
|
+
"from the repository, migration operations from attrs.migrationOps on a file-scoped node — " +
|
|
140
|
+
"an array of { kind, target, line, section } — and a migration's own revision from " +
|
|
141
|
+
"attrs.migrationRevision/migrationDownRevision/migrationDir. None was present on this run. " +
|
|
142
|
+
"Migrations written as program code need a language adapter to emit those keys — not every " +
|
|
143
|
+
"adapter does, and this run's did not. This is not a result of zero destructive operations.");
|
|
199
144
|
for (const blocker of blockers)
|
|
200
145
|
notes.push(blocker);
|
|
201
146
|
}
|
|
@@ -245,11 +190,9 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
245
190
|
notes.push("The migration scan hit its file budget before finishing, so some migrations were not read.");
|
|
246
191
|
}
|
|
247
192
|
if (ran && scoped === null && findings.length > 0) {
|
|
248
|
-
// §15.1 runs this against the
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
// forward operations on two repositories, all correct and almost all years
|
|
252
|
-
// old.
|
|
193
|
+
// §15.1 runs this against the scoped subgraph. Unscoped, it reads every migration the
|
|
194
|
+
// project has ever written — history, not a property of a change (measured: 33 and 67
|
|
195
|
+
// forward ops on two repos, all correct and almost all years old).
|
|
253
196
|
notes.push(`${findings.length} operation(s) were found across the whole repository, which is every ` +
|
|
254
197
|
"migration the project has ever written rather than anything about a particular change. " +
|
|
255
198
|
'This check is meant to run against a scoped change — pass "files" — where a handful of ' +
|
|
@@ -293,8 +236,7 @@ function describe(op, file) {
|
|
|
293
236
|
case "TRUNCATE":
|
|
294
237
|
return `${where} truncates ${op.target} in the forward migration.`;
|
|
295
238
|
default:
|
|
296
|
-
// A rename is a different claim from a drop
|
|
297
|
-
// survive, and what breaks is every reader of the old name.
|
|
239
|
+
// A rename is a different claim from a drop — the rows survive; what breaks is every reader of the old name.
|
|
298
240
|
return (`${where} renames ${op.target} in the forward migration. The data is not destroyed; ` +
|
|
299
241
|
"anything still reading the old name stops finding it.");
|
|
300
242
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollback.js","sourceRoot":"","sources":["../../src/validation/rollback.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rollback.js","sourceRoot":"","sources":["../../src/validation/rollback.ts"],"names":[],"mappings":"AAAA;;oGAEoG;AAKpG,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAyDjE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,gFAAgF;AAChF,MAAM,sBAAsB,GAAoB,CAAC,CAAC;AAElD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAC9E,MAAM,KAAK,GAAG,IAAI,GAAG,CAAkB;IACrC,YAAY;IACZ,aAAa;IACb,aAAa;IACb,UAAU;IACV,QAAQ;CACT,CAAC,CAAC;AAEH;;kFAEkF;AAClF,MAAM,UAAU,gBAAgB,CAC9B,KAAwC;IAExC,MAAM,GAAG,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAE1D,MAAM,GAAG,GAAkB,EAAE,CAAC;IAC9B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,MAAM,KAAK,IAAI,GAAG,EAAE,CAAC;QACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAChD,SAAS,IAAI,CAAC,CAAC;YACf,SAAS;QACX,CAAC;QACD,MAAM,GAAG,GAAG,KAAgC,CAAC;QAC7C,MAAM,IAAI,GAAG,GAAG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