Repository navigation
Phase 2 / S15.a: handoff CLI hotspot decomposition - #80
Merged
Merged
Conversation
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, |
This was referenced Apr 29, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
S15.a — bring
cli/src/commands/handoff.tsunder the §15 hotspot caphandoff.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/--abortbranches now live incli/src/commands/handoff/helpers.ts(factory pattern). The forward + reverse orchestration body remains inhandoff.tsunchanged.containerName,targetNs,aksPfPort,aksPfProc) migrate from action-scope to factory-scope.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