Skip to content

Commit 631b5c5

Browse files
[Autoloop: python-to-go-migration] Iteration 45: migrate core/token_manager (+497), primitives/discovery (+612)
Migrated 2 modules, +1109 Python lines. Metric: 38.91 -> 40.45 (+1.54). - core/token_manager: GitHubTokenManager with credential-fill subprocess, gh CLI fallback, per-(host,port) cache, and setup/validate helpers for Copilot/Codex/LLM runtimes. - primitives/discovery: PrimitiveCollection with conflict detection, local/dependency primitive scanning, globMatch with ** support, FindPrimitiveFiles with exclude pruning. Run: https://github.com/githubnext/apm/actions/runs/25871294987 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 50fa0b7 commit 631b5c5

4 files changed

Lines changed: 1066 additions & 4 deletions

File tree

benchmarks/migration-status.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"original_python_lines": 71696,
3-
"migrated_python_lines": 27894,
3+
"migrated_python_lines": 29003,
44
"migrated_modules": [
55
{
66
"module": "src/apm_cli/constants.py",
@@ -794,9 +794,9 @@
794794
"notes": "LLM CLI runtime adapter"
795795
}
796796
],
797-
"last_updated": "2026-05-14T12:17:24Z",
798-
"iteration": 43,
799-
"python_lines_migrated_pct": 38.06,
797+
"last_updated": "2026-05-14T16:23:30Z",
798+
"iteration": 44,
799+
"python_lines_migrated_pct": 40.45,
800800
"modules_migrated": 106,
801801
"modules": [
802802
{
@@ -831,6 +831,18 @@
831831
"python_lines": 775,
832832
"go_package": "internal/integration/commandintegrator",
833833
"status": "migrated"
834+
},
835+
{
836+
"module": "core/token_manager",
837+
"status": "migrated",
838+
"python_lines": 497,
839+
"go_package": "internal/core/tokenmanager"
840+
},
841+
{
842+
"module": "primitives/discovery",
843+
"status": "migrated",
844+
"python_lines": 612,
845+
"go_package": "internal/primitives/discovery"
834846
}
835847
]
836848
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package tokenmanager
2+
3+
import "time"
4+
5+
// timerAfter returns a channel that closes after n seconds.
6+
func timerAfter(n int) <-chan struct{} {
7+
ch := make(chan struct{})
8+
go func() {
9+
time.Sleep(time.Duration(n) * time.Second)
10+
close(ch)
11+
}()
12+
return ch
13+
}

0 commit comments

Comments
 (0)