Repository navigation
Commit a945faa
fix(migrate): address findings from the pre-release smoke test (#604)
* fix(migrate): address findings from the pre-release smoke test
- Report users created without an extra or unverified email or phone Clerk
refused once the user existed: the summary lists them, `--json` adds them to
`result.warnings`, the user's line records `refused`, and `runs <id>` shows
them under warnings. Before, only users.ndjson said so.
- A secret key Clerk refuses (401) stops the import with Clerk's error, rather
than a stand-in instance that sent the run checks off course. A run undone in
full no longer blocks a stand-in import with "did not confirm which instance".
- Replace a gateway's HTML error page with "Clerk returned HTTP <status> with
no error details" in import, undo and runs breakdowns.
- A refused dry run says so after the checks, with the --allow-partial command
(`refused: true` in --json).
- Explain the APP_ID placeholder in fix commands (`checks.placeholders` in
--json).
- `--json` carries the notes the human summary adds to Clerk's messages, such
as the development-instance user limit (`result.notes`).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): only call an attach refused when Clerk refused the identifier
A 401 says the key stopped working, and an exhausted 429 says nothing about
the email or phone, so neither is recorded as `refused` or warned about. Also
lists `refused` among the users.ndjson fields, splits the `runs <id>` README
sentence, and rewrites the changeset in short sentences.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): leave an attach pending when the failure isn't about the identifier
A 401 or a 429 that outlasted its retries says nothing about the email or
phone, so the attach stays pending and a re-run finishes it, rather than being
dropped with only a note. Also types `createUser`'s response and adds the
Oxford commas the README and changeset were missing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): restore createUser's untyped response, which tsc needs
Typing it made tsc report a use before assignment on a path it can't follow.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): leave an attach pending on a 403 that isn't about the phone
A 403 can mean the key isn't permitted, which says nothing about the email or
phone, so the attach stays pending for a re-run. A country Clerk doesn't
support (`unsupported_country_code`) is still a refusal of the phone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): report dropped phones in runs <id>, and match the refused dry run to the real one
A first phone Clerk refused on the create now lands on the user's line as
`phoneRefused`, so `runs <id>` warns about it the way the import summary
does. A refused dry run now gives the real refusal's advice and next steps,
including the earlier run's undo or continue. The README also says which
attach errors stay pending.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): address Roy's second review of the final-testing fixes
- An attach Clerk answers `form_identifier_exists` looks the user up first:
when the user already holds it, an earlier attach with no answer landed,
so it counts as attached, not refused. A failed lookup leaves it pending.
- A refused first phone's reason goes on the retry's `creating` line too, so
a continue that adopts the user keeps `phoneRefused` and its note.
- A created user's first line carries its notes, so a stop before the second
line doesn't lose why the phone was dropped.
- A refused `--dry-run --json` carries the real refusal's `advice` and
`steps`.
- `runs <id>` lists those users under "Imported without an email or phone",
and both commands share the warning prefixes.
- Tests for a 429 attach that outlasts the retries, the taken-by-this-user
lookup, the adopted phone refusal, and the SMS note on a refused attach.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): address Roy's third review of the final-testing fixes
- An email the instance's allowlist or blocklist refuses (`not_allowed_access`)
is a refusal, not a key problem left pending.
- A taken phone counts as attached when the user holds it in E.164, whatever
the source wrote; emails are trimmed.
- A lone reserved phone a retry already counts as refused isn't also pending,
so a continue that adopts the user warns about it once.
- An attach left pending on a Clerk error notes why, once across continues,
and `runs <id>` lists those users.
- `runs <id>` drops its warnings once the run is undone in full.
- A refused dry run prints its next steps in agent mode too, and a real
refusal's `--json` carries `advice` and `steps`.
- A key Clerk rejects names where it came from, with Clerk's long message.
- Tests for the continue's phone wiring, the dry run's next steps, and a 403
for the country; README and changeset brought up to date.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(migrate): group refusals without the identifier, and word an HTML 401 by status
- A refusal's summary key drops the email or phone Clerk's message names, so
`not_allowed_access` refusals group as one warning instead of one per user.
- A 401 whose body is a proxy's HTML page reads "Clerk returned HTTP 401 with
no error details" instead of the markup.
- Spread the modes into `test.each`, per the testing rule.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(migrate): address Roy's nits on the final-testing fixes
- One `adoptedLines` map of `creating` lines replaces the `adoptedReserved`,
`adoptedPending` and `adoptedPhoneRefused` options.
- `RegExp.escape`, no spread for an unset body, notes and the key source each
built once, and a one-line warning loop without a status check that never
skipped anything.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Bump.
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent 4b196c7 commit a945faa
16 files changed
Lines changed: 1434 additions & 183 deletions
File tree
- .changeset
- packages/cli-core/src/commands/migrate
- export
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | | - | |
783 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
784 | 787 | | |
785 | 788 | | |
786 | 789 | | |
| |||
807 | 810 | | |
808 | 811 | | |
809 | 812 | | |
810 | | - | |
811 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
812 | 818 | | |
813 | 819 | | |
814 | 820 | | |
| |||
913 | 919 | | |
914 | 920 | | |
915 | 921 | | |
916 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
917 | 928 | | |
918 | 929 | | |
919 | 930 | | |
| |||
936 | 947 | | |
937 | 948 | | |
938 | 949 | | |
939 | | - | |
| 950 | + | |
| 951 | + | |
940 | 952 | | |
941 | 953 | | |
942 | 954 | | |
| |||
958 | 970 | | |
959 | 971 | | |
960 | 972 | | |
961 | | - | |
962 | | - | |
963 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
964 | 987 | | |
965 | 988 | | |
966 | 989 | | |
967 | 990 | | |
968 | 991 | | |
969 | | - | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
970 | 995 | | |
971 | 996 | | |
972 | 997 | | |
| |||
1001 | 1026 | | |
1002 | 1027 | | |
1003 | 1028 | | |
1004 | | - | |
| 1029 | + | |
| 1030 | + | |
1005 | 1031 | | |
1006 | 1032 | | |
1007 | 1033 | | |
| |||
1027 | 1053 | | |
1028 | 1054 | | |
1029 | 1055 | | |
1030 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1031 | 1061 | | |
1032 | 1062 | | |
1033 | 1063 | | |
| |||
1397 | 1427 | | |
1398 | 1428 | | |
1399 | 1429 | | |
1400 | | - | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1401 | 1433 | | |
1402 | 1434 | | |
1403 | 1435 | | |
1404 | 1436 | | |
1405 | | - | |
| 1437 | + | |
| 1438 | + | |
1406 | 1439 | | |
1407 | 1440 | | |
1408 | 1441 | | |
| |||
1547 | 1580 | | |
1548 | 1581 | | |
1549 | 1582 | | |
| 1583 | + | |
1550 | 1584 | | |
1551 | 1585 | | |
1552 | 1586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 283 | | |
288 | 284 | | |
289 | 285 | | |
290 | 286 | | |
291 | 287 | | |
292 | | - | |
293 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
0 commit comments