Skip to content

Commit 8b8f32d

Browse files
committed
fix(scripts): keep the two widening-ALTER bodies where the durability gate resolves their log helper
check-durability-degradation-log-level follows same-file helpers, so a moved catch whose only log is this.logDurabilityFailure(...) read as swallowed (measured: migrateMysqlDatetimeColumns and migrateMysqlTimeColumns red). PATH_READER_NEEDLES gains this.runWideningAlters( with that reader. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
1 parent db0a766 commit 8b8f32d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎scripts/codemod-split-sql-driver.mjs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ const PATH_READER_NEEDLES = Object.freeze({
210210
'keyed ? this.keyableTextLength(field) : null': 'scripts/check-keyed-text-bounds.mjs EMITTER_ANCHOR and the generate-string-family-width pin',
211211
'JSON_COLUMN_TYPES.has(type) ? this.jsonColumn(table, name) : table.string(name)': 'packages/cli generate-field-type-vocabulary and generate-string-family-width pins',
212212
'if (FILE_REFERENCE_TYPES.has(type)) {': 'packages/cli generate-string-family-width pin',
213+
// check-durability-degradation-log-level judges the `catch` around a
214+
// durability call by following SAME-FILE helpers (its `functionBodies` is
215+
// per source file): `this.logDurabilityFailure(…)` resolves only in
216+
// sql-driver.ts, so a moved catch reads as "swallowed, no log" (measured:
217+
// migrateMysqlDatetimeColumns / migrateMysqlTimeColumns red when moved).
218+
'this.runWideningAlters(': 'scripts/check-durability-degradation-log-level.mjs resolves the catch\'s log helper in the same file',
213219
});
214220

215221
/**

0 commit comments

Comments
 (0)