Skip to content

Phase 2 / S15.a: handoff CLI hotspot decomposition - #80

Merged
Pal Lakatos-Toth (pallakatos) merged 1 commit into
devfrom
phase2-hotspot-handoff-cli
Apr 29, 2026
Merged

Pal Lakatos-Toth (pallakatos) merged 1 commit into
devfrom
phase2-hotspot-handoff-cli

Conversation

@pallakatos

Copy link
Copy Markdown
Collaborator

S15.a — bring cli/src/commands/handoff.ts under the §15 hotspot cap

handoff.ts: 1119 → 798 LOC (under 800 cap).

Closure-captured helper bundle (router exec, AKS port-forward, admin-token resolution, Docker wake, CRD-read, credential rehydrate) plus the --status / --abort branches now live in cli/src/commands/handoff/helpers.ts (factory pattern). The forward + reverse orchestration body remains in handoff.ts unchanged.

  • No behavioural change. Closure captures (containerName, targetNs, aksPfPort, aksPfProc) migrate from action-scope to factory-scope.
  • All 454 CLI tests still pass; build + tsc + lint clean.

Audit: docs/security-audits/2026-04-29-phase2-hotspot-handoff-cli.md.

Carved out separately: plugin.ts, operator.ts, up.ts, mesh.ts — each their own §15 sub-slice.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Extract closure-captured helper bundle and the --status / --abort
branches from cli/src/commands/handoff.ts into a new
cli/src/commands/handoff/helpers.ts module (factory pattern).

handoff.ts: 1119 -> 798 LOC, under the §15 hotspot cap.

No behavioural change. The closure captures (containerName, targetNs,
aksPfPort, aksPfProc) migrate from action-scope to factory-scope; the
helper functions still see the same set of variables, the same way.

Audit: docs/security-audits/2026-04-29-phase2-hotspot-handoff-cli.md
Tests: 454 passing | 2 skipped. Build + tsc + lint all clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
aksRouterExec,
getAksAdminToken,
wakeDormantDocker,
readAksCrdSpec,
@pallakatos
Pal Lakatos-Toth (pallakatos) merged commit 56c7f04 into dev Apr 29, 2026
14 of 15 checks passed
@pallakatos
Pal Lakatos-Toth (pallakatos) deleted the phase2-hotspot-handoff-cli branch April 29, 2026 10:46
Pal Lakatos-Toth (pallakatos) added a commit that referenced this pull request May 12, 2026
…80)

Extract closure-captured helper bundle and the --status / --abort
branches from cli/src/commands/handoff.ts into a new
cli/src/commands/handoff/helpers.ts module (factory pattern).

handoff.ts: 1119 -> 798 LOC, under the §15 hotspot cap.

No behavioural change. The closure captures (containerName, targetNs,
aksPfPort, aksPfProc) migrate from action-scope to factory-scope; the
helper functions still see the same set of variables, the same way.

Audit: docs/security-audits/2026-04-29-phase2-hotspot-handoff-cli.md
Tests: 454 passing | 2 skipped. Build + tsc + lint all clean.

Co-authored-by: Pal Lakatos-Toth <pallakatos@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants