Commit 282876b
fix: follow-up PR bot review findings (cubic P1/P2 + coderabbit MAJOR/MINOR)
Addresses 5 substantive issues raised by the latest round of bot reviews.
### P1 / MAJOR
- **MySQL/MariaDB week-partition values no longer corrupted** (cubic P1,
data-diff.ts:610) — the prior ISO `yyyy-mm-dd` normalization applied to
every dialect silently rewrote MySQL `DATE_FORMAT(%Y-%u)` outputs like
`"2024-42"` into invalid dates, producing WHERE clauses that never
match. Scope the normalization to T-SQL / Fabric only — those use
`CONVERT(DATE, …, 23)` which is the only code path that requires ISO.
Postgres, MySQL, ClickHouse, BigQuery, Oracle all get the raw value
verbatim, matching their own `DATE_TRUNC`/`toStartOf*` output.
- **Partitioned diff no longer drops extra_columns** (coderabbit MAJOR,
data-diff.ts:824) — the partition fix wraps each side as a SELECT
subquery before recursing. `discoverExtraColumns` skips SQL queries
(only inspects plain table names), so the recursive `runDataDiff` fell
through to key-only comparison, silently losing value-level diffs.
Now `runPartitionedDiff` runs discovery ONCE on the plain source
table up-front and passes the resolved `extra_columns` explicitly to
each recursive call. Audit-column exclusion metadata is also
propagated to the aggregated result for user reporting.
### P2 / MINOR
- **`azure_resource_url` trailing slash normalized** (cubic P2,
sqlserver.ts:50) — an explicit `"https://custom-host"` (no slash)
would produce an invalid OAuth scope `"https://custom-host.default"`.
Enforce a trailing slash in `resolveAzureResourceUrl`.
- **`az account get-access-token` uses `execFile`** (coderabbit,
sqlserver.ts:200) — replaces `exec(<shell command string>)` with
`execFile("az", [args])` so user-supplied `azure_resource_url` can't
introduce shell metacharacters into the command string. Also updates
the test harness to stub both `exec` and `execFile`.
### Test isolation / coverage
- **Added same-dialect cross-warehouse joindiff test** (cubic,
data-diff-cross-dialect.test.ts:97) — two MSSQL servers with
different hosts must still be gated by the joindiff guard; previous
tests only exercised mixed dialects.
- **Added MySQL week-partition regression tests** — prevent future
revivals of the dialect-unaware ISO rewrite.
- **Added trailing-slash `azure_resource_url` test.**
Test results:
- 44/44 sqlserver driver tests pass
- 2824/2824 altimate tests pass, 0 fail
- Remaining full-suite failures (`mcp/`, `tool/project-scan`,
`plan-approval-phrase`) are pre-existing on `main`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 64dd815 commit 282876b
4 files changed
Lines changed: 177 additions & 53 deletions
File tree
- packages
- drivers
- src
- test
- opencode
- src/altimate/native/connections
- test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
188 | 204 | | |
189 | 205 | | |
190 | | - | |
| 206 | + | |
191 | 207 | | |
192 | 208 | | |
193 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
105 | 118 | | |
106 | 119 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
116 | 132 | | |
117 | | - | |
| 133 | + | |
118 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
| |||
128 | 148 | | |
129 | 149 | | |
130 | 150 | | |
| 151 | + | |
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
| |||
726 | 747 | | |
727 | 748 | | |
728 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
729 | 764 | | |
730 | 765 | | |
731 | 766 | | |
| |||
Lines changed: 48 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
613 | 621 | | |
614 | 622 | | |
615 | 623 | | |
| |||
775 | 783 | | |
776 | 784 | | |
777 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
778 | 806 | | |
779 | 807 | | |
780 | 808 | | |
| |||
820 | 848 | | |
821 | 849 | | |
822 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
823 | 855 | | |
824 | 856 | | |
825 | 857 | | |
| |||
840 | 872 | | |
841 | 873 | | |
842 | 874 | | |
| 875 | + | |
843 | 876 | | |
844 | 877 | | |
845 | 878 | | |
| |||
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
133 | 150 | | |
134 | 151 | | |
135 | 152 | | |
| |||
147 | 164 | | |
148 | 165 | | |
149 | 166 | | |
150 | | - | |
| 167 | + | |
151 | 168 | | |
152 | 169 | | |
153 | 170 | | |
| |||
166 | 183 | | |
167 | 184 | | |
168 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
169 | 209 | | |
170 | 210 | | |
171 | 211 | | |
| |||
0 commit comments