@descryy/core 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +23 -11
- package/dist/contracts/engine.d.ts.map +1 -1
- package/dist/contracts/engine.js +23 -11
- package/dist/contracts/engine.js.map +1 -1
- package/dist/contracts/orphans.d.ts +18 -122
- package/dist/contracts/orphans.d.ts.map +1 -1
- package/dist/contracts/orphans.js +36 -134
- 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 +9 -90
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +15 -62
- 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/merge.d.ts +8 -88
- package/dist/graph/merge.d.ts.map +1 -1
- package/dist/graph/merge.js +9 -93
- 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 +4 -16
- package/dist/query/memory.d.ts.map +1 -1
- package/dist/query/memory.js +9 -22
- 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 +27 -93
- 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 +30 -104
- 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 +9 -19
- 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 +25 -126
- 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 +93 -63
- package/dist/sources/git/diff.d.ts.map +1 -1
- package/dist/sources/git/diff.js +200 -81
- 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 +33 -133
- 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 +6 -55
- package/dist/validation/attributes.d.ts.map +1 -1
- package/dist/validation/attributes.js +6 -55
- package/dist/validation/attributes.js.map +1 -1
- 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 +47 -8
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +119 -31
- package/dist/validation/env.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -0
- 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 +11 -72
- package/dist/validation/migration-integrity.d.ts.map +1 -1
- package/dist/validation/migration-integrity.js +16 -79
- package/dist/validation/migration-integrity.js.map +1 -1
- package/dist/validation/migrations.d.ts +22 -101
- package/dist/validation/migrations.d.ts.map +1 -1
- package/dist/validation/migrations.js +19 -83
- 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/orm-registration.d.ts +106 -0
- package/dist/validation/orm-registration.d.ts.map +1 -0
- package/dist/validation/orm-registration.js +191 -0
- package/dist/validation/orm-registration.js.map +1 -0
- package/dist/validation/rollback.d.ts +10 -73
- package/dist/validation/rollback.d.ts.map +1 -1
- package/dist/validation/rollback.js +15 -82
- 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":"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;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;oEACgE;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,uHAAuH;IACvH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B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
@@ -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 { fileScopedNodes } from "./nodes.js";
|
|
55
5
|
import { readMigrationRevision } from "./migration-integrity.js";
|
|
56
6
|
const DEFAULT_MAX_FINDINGS = 25;
|
|
@@ -64,14 +14,9 @@ const KINDS = new Set([
|
|
|
64
14
|
"TRUNCATE",
|
|
65
15
|
"RENAME",
|
|
66
16
|
]);
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* A row with no `section`, or an unrecognised one, is **dropped rather than
|
|
71
|
-
* treated as forward**. Defaulting it would manufacture exactly the claim the
|
|
72
|
-
* reverse-section fence exists to withhold, on a corpus where the reverse
|
|
73
|
-
* section is present in effectively every file.
|
|
74
|
-
*/
|
|
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. */
|
|
75
20
|
export function readMigrationOps(attrs) {
|
|
76
21
|
const raw = attrs["migrationOps"];
|
|
77
22
|
if (!Array.isArray(raw))
|
|
@@ -112,7 +57,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
112
57
|
const scoped = options.files === undefined ? null : new Set(options.files);
|
|
113
58
|
const notes = [];
|
|
114
59
|
const candidates = [];
|
|
115
|
-
// --- the format half: DDL read from the repository -----------------------
|
|
116
60
|
let fromSource = 0;
|
|
117
61
|
for (const migration of scan.files) {
|
|
118
62
|
if (scoped !== null && !scoped.has(migration.file))
|
|
@@ -127,7 +71,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
127
71
|
});
|
|
128
72
|
}
|
|
129
73
|
}
|
|
130
|
-
// --- the code half: whatever an adapter attached -------------------------
|
|
131
74
|
const nodes = fileScopedNodes(provider, options.limit);
|
|
132
75
|
let fromGraph = 0;
|
|
133
76
|
let malformed = 0;
|
|
@@ -139,12 +82,9 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
139
82
|
continue;
|
|
140
83
|
const extracted = readMigrationOps(node.attrs);
|
|
141
84
|
malformed += extracted.malformed;
|
|
142
|
-
// A migration
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
// migration-integrity check's own header). `readMigrationRevision` is
|
|
146
|
-
// this check's own carrier, shared rather than duplicated so the two
|
|
147
|
-
// checks cannot disagree about what counts as "a migration node".
|
|
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.
|
|
148
88
|
const hasRevision = readMigrationRevision(node.attrs, path, node.resolution) !== null;
|
|
149
89
|
if (extracted.ops.length === 0 && !hasRevision)
|
|
150
90
|
continue;
|
|
@@ -153,7 +93,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
153
93
|
candidates.push({ op, file: path, creates: [], resolution: node.resolution });
|
|
154
94
|
}
|
|
155
95
|
}
|
|
156
|
-
// --- the refusals --------------------------------------------------------
|
|
157
96
|
const findings = [];
|
|
158
97
|
const withheld = { reverse: 0, undirected: 0, idempotent: 0, selfCreated: 0 };
|
|
159
98
|
for (const candidate of candidates) {
|
|
@@ -166,10 +105,8 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
166
105
|
withheld.undirected += 1;
|
|
167
106
|
continue;
|
|
168
107
|
}
|
|
169
|
-
// Order separates two
|
|
170
|
-
//
|
|
171
|
-
// *after* a guarded drop is an idempotent setup script. Without the line
|
|
172
|
-
// 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.
|
|
173
110
|
const object = op.target.split(".")[0] ?? op.target;
|
|
174
111
|
const matches = candidate.creates.filter((c) => c.name === op.target || c.name === object);
|
|
175
112
|
if (matches.some((c) => c.line < op.line)) {
|
|
@@ -195,7 +132,6 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
195
132
|
a.line - b.line ||
|
|
196
133
|
a.target.localeCompare(b.target));
|
|
197
134
|
const kept = findings.slice(0, maxFindings);
|
|
198
|
-
// --- disclosures ---------------------------------------------------------
|
|
199
135
|
const ran = fromSource > 0 || fromGraph > 0;
|
|
200
136
|
const blockers = [];
|
|
201
137
|
if (!ran) {
|
|
@@ -254,11 +190,9 @@ export function checkRollbackReadiness(provider, scan, options = {}) {
|
|
|
254
190
|
notes.push("The migration scan hit its file budget before finishing, so some migrations were not read.");
|
|
255
191
|
}
|
|
256
192
|
if (ran && scoped === null && findings.length > 0) {
|
|
257
|
-
// §15.1 runs this against the
|
|
258
|
-
//
|
|
259
|
-
//
|
|
260
|
-
// forward operations on two repositories, all correct and almost all years
|
|
261
|
-
// 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).
|
|
262
196
|
notes.push(`${findings.length} operation(s) were found across the whole repository, which is every ` +
|
|
263
197
|
"migration the project has ever written rather than anything about a particular change. " +
|
|
264
198
|
'This check is meant to run against a scoped change — pass "files" — where a handful of ' +
|
|
@@ -302,8 +236,7 @@ function describe(op, file) {
|
|
|
302
236
|
case "TRUNCATE":
|
|
303
237
|
return `${where} truncates ${op.target} in the forward migration.`;
|
|
304
238
|
default:
|
|
305
|
-
// A rename is a different claim from a drop
|
|
306
|
-
// 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.
|
|
307
240
|
return (`${where} renames ${op.target} in the forward migration. The data is not destroyed; ` +
|
|
308
241
|
"anything still reading the old name stops finding it.");
|
|
309
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,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;QAC5E,KAAK,UAAU;YACb,OAAO,GAAG,KAAK,cAAc,EAAE,CAAC,MAAM,4BAA4B,CAAC;QACrE;YACE,6GAA6G;YAC7G,OAAO,CACL,GAAG,KAAK,YAAY,EAAE,CAAC,MAAM,wDAAwD;gBACrF,uDAAuD,CACxD,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -1,43 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Route drift
|
|
3
|
-
*
|
|
4
|
-
* The comparison logic only; identity from `@descryy/ir`, never re-implemented
|
|
5
|
-
* here. The `bench/route-drift.mjs` instrument does the harder half of this
|
|
6
|
-
* row — reading `php artisan route:list`, the `--introspection` file
|
|
7
|
-
* fallback, and the refusal to run an installer on a cloned repository (§5
|
|
8
|
-
* rule 10, DEC-115 clause 3). This module is the query it calls: given two
|
|
9
|
-
* already-extracted route lists, decide what they say about each other.
|
|
10
|
-
*
|
|
11
|
-
* ## The rule this file is built around, before anything else
|
|
12
|
-
*
|
|
13
|
-
* **A diff is the one measurement where an empty input produces the most
|
|
14
|
-
* reassuring possible output.** If introspection returns nothing —
|
|
15
|
-
* `artisan` not runnable, the application not bootable, the command failing
|
|
16
|
-
* quietly — the drift is zero, and zero drift is exactly what a healthy
|
|
17
|
-
* repository looks like. So both population *sizes* are part of the result,
|
|
18
|
-
* not scaffolding, and this module cannot report agreement it was not
|
|
19
|
-
* actually given. An empty or implausible side is a **refusal** to report
|
|
20
|
-
* drift, never a clean bill — the same shape this lane measured directly on
|
|
21
|
-
* `env-precision-adapter.mjs`: two runs both printed `decision accuracy
|
|
22
|
-
* 100.0%`, one on 5 decisions and one on 51, indistinguishable except for the
|
|
23
|
-
* confidence interval underneath. A diff has no interval to fall back on, so
|
|
24
|
-
* the refusal has to be explicit.
|
|
25
|
-
*
|
|
26
|
-
* ## The polarity is DEC-115's and is not re-opened here
|
|
27
|
-
*
|
|
28
|
-
* Static extraction is the **floor**; introspection is a **promotion** over
|
|
29
|
-
* the same node ids. The two disagreement directions are two findings with
|
|
30
|
-
* different audiences and different truth conditions, and collapsing them is
|
|
31
|
-
* the error:
|
|
32
|
-
*
|
|
33
|
-
* | direction | what it is | what it is NOT |
|
|
34
|
-
* | --- | --- | --- |
|
|
35
|
-
* | static says yes, listing says no | "these two sources disagree" | **never** "dead route" — ambiguous between the customer's app and our own false positive, and nothing here separates them |
|
|
36
|
-
* | listing says yes, static says no | a statement about **us**: the extractor missed one | not a finding about the customer at all |
|
|
37
|
-
*
|
|
38
|
-
* The second row is the more valuable one. Where a listing exists it is
|
|
39
|
-
* **ground truth for recall** — a complete denominator this project has
|
|
40
|
-
* never had without hand-building it.
|
|
2
|
+
* Route drift (DEC-115): compares two already-extracted route lists; identity via `@descryy/ir`, never re-implemented. An empty/implausible introspection side must be a *refusal*, never reported as zero drift — the emptiest input would otherwise be the most falsely reassuring output.
|
|
3
|
+
* Static extraction is the floor, introspection a promotion (DEC-115 polarity): static-yes/listing-no is an ambiguous disagreement, never "dead route"; listing-yes/static-no is a statement about our own extractor missing a route, and listing is ground truth for recall.
|
|
41
4
|
*/
|
|
42
5
|
/** One route, from either side, before identity is applied. */
|
|
43
6
|
export interface DriftRoute {
|
|
@@ -46,13 +9,8 @@ export interface DriftRoute {
|
|
|
46
9
|
/** Repo-relative, when the side has one (the static extractor always does). */
|
|
47
10
|
readonly file?: string;
|
|
48
11
|
}
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* Three refusal states plus `read`, mirroring `RollbackReport.ran` /
|
|
53
|
-
* `blockers` one level down: a caller needs to know *why* nothing was
|
|
54
|
-
* compared, not just that nothing was.
|
|
55
|
-
*/
|
|
12
|
+
/** What the introspected side returned. Three refusal states plus `read` — a
|
|
13
|
+
* caller needs to know *why* nothing was compared, not just that it wasn't. */
|
|
56
14
|
export type Introspection = {
|
|
57
15
|
readonly state: "read";
|
|
58
16
|
readonly source: string;
|
|
@@ -86,23 +44,12 @@ export interface DriftReport {
|
|
|
86
44
|
readonly recallAgainstListing?: number;
|
|
87
45
|
}
|
|
88
46
|
export interface DriftOptions {
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* A Laravel application with `artisan` and one route is far more likely to
|
|
93
|
-
* be a listing that failed than an application with one route. Crude on
|
|
94
|
-
* purpose — it exists to catch "the command produced almost nothing," not
|
|
95
|
-
* to model route counts.
|
|
96
|
-
*/
|
|
47
|
+
/** Below this, a listing isn't believed — crude on purpose, catches "the
|
|
48
|
+
* command produced almost nothing," not a route-count model. */
|
|
97
49
|
readonly implausibleBelow?: number;
|
|
98
50
|
}
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* `staticOnly`/`listedOnly`/`agreed` are only ever populated when both sides
|
|
103
|
-
* were actually read and the introspected side is not implausibly small.
|
|
104
|
-
* Every other path returns `reported: false` carrying both counts, because
|
|
105
|
-
* the counts are the evidence the refusal was necessary.
|
|
106
|
-
*/
|
|
51
|
+
/** The comparison, and the refusal that guards it. `staticOnly`/`listedOnly`/
|
|
52
|
+
* `agreed` populate only when both sides read and neither is implausibly
|
|
53
|
+
* small; otherwise `reported: false` carries both counts as evidence. */
|
|
107
54
|
export declare function checkRouteDrift(staticSide: readonly DriftRoute[], introspected: Introspection, options?: DriftOptions): DriftReport;
|
|
108
55
|
//# sourceMappingURL=route-drift.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-drift.d.ts","sourceRoot":"","sources":["../../src/validation/route-drift.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"route-drift.d.ts","sourceRoot":"","sources":["../../src/validation/route-drift.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,IAAI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AAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AASD;;0EAE0E;AAC1E,wBAAgB,eAAe,CAC7B,UAAU,EAAE,SAAS,UAAU,EAAE,EACjC,YAAY,EAAE,aAAa,EAC3B,OAAO,GAAE,YAAiB,GACzB,WAAW,CA+Cb"}
|
|
@@ -1,43 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Route drift
|
|
3
|
-
*
|
|
4
|
-
* The comparison logic only; identity from `@descryy/ir`, never re-implemented
|
|
5
|
-
* here. The `bench/route-drift.mjs` instrument does the harder half of this
|
|
6
|
-
* row — reading `php artisan route:list`, the `--introspection` file
|
|
7
|
-
* fallback, and the refusal to run an installer on a cloned repository (§5
|
|
8
|
-
* rule 10, DEC-115 clause 3). This module is the query it calls: given two
|
|
9
|
-
* already-extracted route lists, decide what they say about each other.
|
|
10
|
-
*
|
|
11
|
-
* ## The rule this file is built around, before anything else
|
|
12
|
-
*
|
|
13
|
-
* **A diff is the one measurement where an empty input produces the most
|
|
14
|
-
* reassuring possible output.** If introspection returns nothing —
|
|
15
|
-
* `artisan` not runnable, the application not bootable, the command failing
|
|
16
|
-
* quietly — the drift is zero, and zero drift is exactly what a healthy
|
|
17
|
-
* repository looks like. So both population *sizes* are part of the result,
|
|
18
|
-
* not scaffolding, and this module cannot report agreement it was not
|
|
19
|
-
* actually given. An empty or implausible side is a **refusal** to report
|
|
20
|
-
* drift, never a clean bill — the same shape this lane measured directly on
|
|
21
|
-
* `env-precision-adapter.mjs`: two runs both printed `decision accuracy
|
|
22
|
-
* 100.0%`, one on 5 decisions and one on 51, indistinguishable except for the
|
|
23
|
-
* confidence interval underneath. A diff has no interval to fall back on, so
|
|
24
|
-
* the refusal has to be explicit.
|
|
25
|
-
*
|
|
26
|
-
* ## The polarity is DEC-115's and is not re-opened here
|
|
27
|
-
*
|
|
28
|
-
* Static extraction is the **floor**; introspection is a **promotion** over
|
|
29
|
-
* the same node ids. The two disagreement directions are two findings with
|
|
30
|
-
* different audiences and different truth conditions, and collapsing them is
|
|
31
|
-
* the error:
|
|
32
|
-
*
|
|
33
|
-
* | direction | what it is | what it is NOT |
|
|
34
|
-
* | --- | --- | --- |
|
|
35
|
-
* | static says yes, listing says no | "these two sources disagree" | **never** "dead route" — ambiguous between the customer's app and our own false positive, and nothing here separates them |
|
|
36
|
-
* | listing says yes, static says no | a statement about **us**: the extractor missed one | not a finding about the customer at all |
|
|
37
|
-
*
|
|
38
|
-
* The second row is the more valuable one. Where a listing exists it is
|
|
39
|
-
* **ground truth for recall** — a complete denominator this project has
|
|
40
|
-
* never had without hand-building it.
|
|
2
|
+
* Route drift (DEC-115): compares two already-extracted route lists; identity via `@descryy/ir`, never re-implemented. An empty/implausible introspection side must be a *refusal*, never reported as zero drift — the emptiest input would otherwise be the most falsely reassuring output.
|
|
3
|
+
* Static extraction is the floor, introspection a promotion (DEC-115 polarity): static-yes/listing-no is an ambiguous disagreement, never "dead route"; listing-yes/static-no is a statement about our own extractor missing a route, and listing is ground truth for recall.
|
|
41
4
|
*/
|
|
42
5
|
import { endpointQsp, normaliseEndpointPath } from "@descryy/ir";
|
|
43
6
|
const DEFAULT_IMPLAUSIBLE_BELOW = 3;
|
|
@@ -45,14 +8,9 @@ const DEFAULT_IMPLAUSIBLE_BELOW = 3;
|
|
|
45
8
|
function key(method, path) {
|
|
46
9
|
return endpointQsp(String(method || "").toUpperCase(), normaliseEndpointPath(String(path || "")));
|
|
47
10
|
}
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* `staticOnly`/`listedOnly`/`agreed` are only ever populated when both sides
|
|
52
|
-
* were actually read and the introspected side is not implausibly small.
|
|
53
|
-
* Every other path returns `reported: false` carrying both counts, because
|
|
54
|
-
* the counts are the evidence the refusal was necessary.
|
|
55
|
-
*/
|
|
11
|
+
/** The comparison, and the refusal that guards it. `staticOnly`/`listedOnly`/
|
|
12
|
+
* `agreed` populate only when both sides read and neither is implausibly
|
|
13
|
+
* small; otherwise `reported: false` carries both counts as evidence. */
|
|
56
14
|
export function checkRouteDrift(staticSide, introspected, options = {}) {
|
|
57
15
|
const implausibleBelow = options.implausibleBelow ?? DEFAULT_IMPLAUSIBLE_BELOW;
|
|
58
16
|
if (introspected.state !== "read") {
|
|
@@ -92,11 +50,8 @@ export function checkRouteDrift(staticSide, introspected, options = {}) {
|
|
|
92
50
|
staticOnly,
|
|
93
51
|
listedOnly,
|
|
94
52
|
agreed,
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
// is a real ratio — `listedKeys.size` is never 0 on this path, since
|
|
98
|
-
// `implausibleBelow` already refused anything under it, but the type
|
|
99
|
-
// stays honest about the precondition rather than asserting past it.
|
|
53
|
+
// listedKeys.size is never 0 here (implausibleBelow refused that), but the
|
|
54
|
+
// type stays honest about the precondition rather than asserting past it.
|
|
100
55
|
...(listedKeys.size === 0 ? {} : { recallAgainstListing: agreed / listedKeys.size }),
|
|
101
56
|
};
|
|
102
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-drift.js","sourceRoot":"","sources":["../../src/validation/route-drift.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"route-drift.js","sourceRoot":"","sources":["../../src/validation/route-drift.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAqCjE,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,sFAAsF;AACtF,SAAS,GAAG,CAAC,MAAc,EAAE,IAAY;IACvC,OAAO,WAAW,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,qBAAqB,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACpG,CAAC;AAED;;0EAE0E;AAC1E,MAAM,UAAU,eAAe,CAC7B,UAAiC,EACjC,YAA2B,EAC3B,UAAwB,EAAE;IAE1B,MAAM,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AAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,CAAC,GAAG,UAAU,CAAC;SAC/B,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACnC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEzE,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,UAAU,CAAC,MAAM;QAC9B,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM;QAC7C,UAAU;QACV,UAAU;QACV,MAAM;QACN,2EAA2E;QAC3E,0EAA0E;QAC1E,GAAG,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;KACrF,CAAC;AACJ,CAAC"}
|
|
@@ -1,47 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* ## Why this is not an adapter, and why it is legal here
|
|
6
|
-
*
|
|
7
|
-
* §15.3's own wording is *"cross-check against declared variables **or the
|
|
8
|
-
* deploy target's actual state**"*. The deploy target's state is not in the graph
|
|
9
|
-
* and never will be. What holds it is `.env`, a container manifest, a CI
|
|
10
|
-
* workflow, an image build file — **formats, not languages.** Reading
|
|
11
|
-
* `KEY=value` and an indented `env:` block names no language, so it does not
|
|
12
|
-
* cross the Canonical IR boundary; it is legal above it for the same reason
|
|
13
|
-
* reading a commit log is (`sources/git`).
|
|
14
|
-
*
|
|
15
|
-
* That is what lets the check produce findings with no adapter change at all.
|
|
16
|
-
* See DEC-120.
|
|
17
|
-
*
|
|
18
|
-
* ## Precision over recall, three times, because a misparse here is a wrong finding
|
|
19
|
-
*
|
|
20
|
-
* A name invented by a sloppy scan becomes a confident sentence about somebody's
|
|
21
|
-
* configuration. So:
|
|
22
|
-
*
|
|
23
|
-
* 1. **Two different name rules, on purpose.** In a dotenv file `KEY=` is
|
|
24
|
-
* unambiguous, so any identifier shape is taken. Inside a structured document
|
|
25
|
-
* an `env:` block is indistinguishable from any other mapping once the scan
|
|
26
|
-
* loses its place, so only `UPPER_SNAKE` is accepted. The cost is a lowercase
|
|
27
|
-
* variable in a manifest, which is rare; the alternative is turning a stray
|
|
28
|
-
* key into a declaration.
|
|
29
|
-
* 2. **A block ends at the first line indented no deeper than its header.** No
|
|
30
|
-
* document model, no continuation handling, no anchors. A construct this scan
|
|
31
|
-
* cannot follow ends the block early, which *loses* names — a disclosed gap
|
|
32
|
-
* rather than a wrong one.
|
|
33
|
-
* 3. **A commented-out declaration counts, and is marked.** `# STRIPE_KEY=` in a
|
|
34
|
-
* sample file documents that the variable exists, which is exactly the
|
|
35
|
-
* question being asked. Treating it as absent would report every well
|
|
36
|
-
* documented optional setting as undeclared.
|
|
37
|
-
*
|
|
38
|
-
* ## The example/supply distinction
|
|
39
|
-
*
|
|
40
|
-
* `.env.example` **documents**; `.env.development` and a container manifest
|
|
41
|
-
* **supply**. Both are declarations for the purpose of "does this repository know
|
|
42
|
-
* this variable exists", and they are not interchangeable for anything else, so
|
|
43
|
-
* the distinction is carried on the surface rather than flattened.
|
|
44
|
-
*/
|
|
1
|
+
/** §15's env/config check reads `.env`/manifests/CI directly — formats, not
|
|
2
|
+
* languages, so it never crosses the IR boundary (DEC-120). Precision over
|
|
3
|
+
* recall: strict names, lossy block-end, commented lines count.
|
|
4
|
+
* `.env.example` documents, others supply. */
|
|
45
5
|
/** What a surface is evidence *of*. */
|
|
46
6
|
export type SurfaceRole =
|
|
47
7
|
/** The repository's own statement that a variable exists. */
|
|
@@ -71,15 +31,8 @@ export interface SurfaceScan {
|
|
|
71
31
|
readonly unreadable: readonly string[];
|
|
72
32
|
/** True when the walk hit its file budget before finishing. */
|
|
73
33
|
readonly truncated: boolean;
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Empty means no adapter declared any, and the walk therefore descended into
|
|
78
|
-
* whatever vendored trees the repository holds. Reporting it is what keeps an
|
|
79
|
-
* undeclared scan from reading like a complete one (rule 7) — the caller can
|
|
80
|
-
* see that the surface count is inflated rather than inferring it from a number
|
|
81
|
-
* that looks fine.
|
|
82
|
-
*/
|
|
34
|
+
/** Noise dirs actually used. Empty means none declared (rule 7) — surface
|
|
35
|
+
* count may be inflated by vendored trees. */
|
|
83
36
|
readonly noiseDirectories: readonly string[];
|
|
84
37
|
}
|
|
85
38
|
export interface ScanOptions {
|
|
@@ -87,41 +40,21 @@ export interface ScanOptions {
|
|
|
87
40
|
readonly maxDepth?: number;
|
|
88
41
|
/** Total files a walk may consider. */
|
|
89
42
|
readonly maxFiles?: number;
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* into — `node_modules`, `vendor`, `target`. **Supplied by the caller from the
|
|
93
|
-
* active adapters' `CapabilityMatrix.noiseDirectories`, never known here**
|
|
94
|
-
* (DEC-110). Undeclared, they are walked, and `SurfaceScan` says so.
|
|
95
|
-
*/
|
|
43
|
+
/** Ecosystem install/build dirs, supplied by the caller's
|
|
44
|
+
* `CapabilityMatrix.noiseDirectories` (DEC-110); undeclared, they get walked. */
|
|
96
45
|
readonly noiseDirectories?: readonly string[];
|
|
97
46
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Shared with the migration scan, so the two walks cannot disagree about what
|
|
100
|
-
* counts as vendored. A second copy of this rule is a second place to forget the
|
|
101
|
-
* next ecosystem.
|
|
102
|
-
*/
|
|
47
|
+
/** Shared with the migration scan — one rule, not two that can disagree. */
|
|
103
48
|
export declare function skipDirectory(name: string, noiseDirectories?: readonly string[]): boolean;
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* Structured documents are only opened when their path says they are a manifest
|
|
108
|
-
* or a workflow. Opening every YAML file in a repository would pull in test
|
|
109
|
-
* data, schema definitions and dependency lockfiles, and an `env:` key inside a
|
|
110
|
-
* schema definition is a description of a variable rather than a declaration of
|
|
111
|
-
* one.
|
|
112
|
-
*/
|
|
49
|
+
/** Reads every config surface. Structured docs open only when their path
|
|
50
|
+
* names a manifest/workflow, else a schema `env:` key would count as one. */
|
|
113
51
|
export declare function scanConfigSurfaces(root: string, options?: ScanOptions): SurfaceScan;
|
|
114
52
|
/** `KEY=value`, and `# KEY=value`, which documents the same variable. */
|
|
115
53
|
export declare function readDotenv(text: string): readonly EnvDeclaration[];
|
|
116
54
|
/** `ENV K=V`, the legacy `ENV K V`, and `ARG K`. */
|
|
117
55
|
export declare function readImageBuild(text: string): readonly EnvDeclaration[];
|
|
118
|
-
/**
|
|
119
|
-
* `
|
|
120
|
-
*
|
|
121
|
-
* Mapping — `KEY: value` — and sequence — `- KEY=value` or a bare `- KEY`. The
|
|
122
|
-
* bare sequence form declares a pass-through from the host, which is still the
|
|
123
|
-
* document stating that the variable exists.
|
|
124
|
-
*/
|
|
56
|
+
/** `env:`/`environment:` blocks: mapping (`KEY: value`) or sequence
|
|
57
|
+
* (`- KEY=value` / bare `- KEY`, a host pass-through — still a declaration). */
|
|
125
58
|
export declare function readStructured(text: string): readonly EnvDeclaration[];
|
|
126
59
|
/** One `KEY = "value"` line inside a `wrangler.toml` `[vars]` or `[env.<name>.vars]` table. */
|
|
127
60
|
export interface WranglerVarsEntry {
|
|
@@ -133,20 +66,9 @@ export interface WranglerVarsEntry {
|
|
|
133
66
|
readonly line: number;
|
|
134
67
|
readonly commented: boolean;
|
|
135
68
|
}
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* Every other table — `[[kv_namespaces]]`, `[assets]`, `[env.<name>]` itself
|
|
140
|
-
* (the deploy target's own settings, not its vars) — is out of scope by
|
|
141
|
-
* construction rather than by exclusion list: entering *any* table this
|
|
142
|
-
* function does not recognise as a vars table resets tracking to "outside",
|
|
143
|
-
* so a line that merely looks like `KEY = value` inside `[[kv_namespaces]]`
|
|
144
|
-
* (e.g. `binding = "HOSTNAMES"`) is never mistaken for a declared variable.
|
|
145
|
-
* `[[...]]` array-of-tables headers are matched and reset scope the same way,
|
|
146
|
-
* rather than silently falling through as an unrecognised line — an
|
|
147
|
-
* `[[env.staging.kv_namespaces]]` line right after `[env.staging.vars]` must
|
|
148
|
-
* end that table, not extend it.
|
|
149
|
-
*/
|
|
69
|
+
/** Only `[vars]`/`[env.<name>.vars]` tables are read; any other table (or
|
|
70
|
+
* `[[...]]` header) resets scope to "outside", so `[[kv_namespaces]]` lines
|
|
71
|
+
* are never mistaken for a var. */
|
|
150
72
|
export declare function readWranglerVarsEntries(text: string): readonly WranglerVarsEntry[];
|
|
151
73
|
/** The declaration-only projection `scanConfigSurfaces` uses. See `readWranglerVarsEntries` for the value-carrying form `resolve.ts` reads. */
|
|
152
74
|
export declare function readWranglerVars(text: string): readonly EnvDeclaration[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../src/validation/sources.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../src/validation/sources.ts"],"names":[],"mappings":"AAAA;;;+CAG+C;AAK/C,uCAAuC;AACvC,MAAM,MAAM,WAAW;AACrB,6DAA6D;AAC3D,aAAa;AACf,oEAAoE;GAClE,cAAc,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,GAA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