refactor(migrator): bind repo-transfer context in Migration
CI / test (push) Canceled after 0s

Introduce a frozen Migration handle binding the identity quintet
(src/tgt clients, owner, name, NumberMap) the four entity phases
previously received as five loose params. The phases now take the
handle; migrate_repo builds one and drives all phases with it.
Retire RefCtx and the shared _path helper (absorbed into the
handle's .path()/.rewrite() accessors), deleting code rather than
leaving dead types. migrate_issues_and_prs mutates m.numbers in
place (returns None).

Add tests/test_phases.py: the previously-untested entity layer is
now reachable through the Migration seam (two mock-transport
clients + a number map, no network), covering the two-pass issue/PR
flow, label/milestone mappings, state-setting, best-effort PR merge,
the deleted-branch head fallback, and release+asset re-upload.

Closes #2
This commit is contained in:
AlexKucera committed 2026-08-11 16:31:58 +02:00
1 parent 1613ec72b8
commit 9d585f601a
12 files changed
+654 -124

No files matched your search

+1
View File
@@ -5,4 +5,5 @@ Complete history of session logs in this directory, newest first. One-line summa
<!-- write-log: full-index -->
| Date | Type | File | Summary |
|------|------|------|---------|
| 2026-08-11 | issue | [20260811-issue2-bind-migration-context-retire-refctx-path_log.md](20260811-issue2-bind-migration-context-retire-refctx-path_log.md) | Introduce frozen `Migration` bound context; rewrite the four entity phases to take the handle; retire `RefCtx`/`_path`; add the phase test seam (`test_phases.py`). Closes #2. |
| 2026-08-11 | issue | [20260811-issue1-gitrunner-sole-git-op-seam_log.md](20260811-issue1-gitrunner-sole-git-op-seam_log.md) | Introduce `git.GitRunner` as the sole git-op seam; rewrite mirror to drive it; retire URL-token helpers; closes audit HIGH A09 + MEDIUM A02 at the root. |