Command Code browser login leaks attempts in #attempts on failed start (post-merge P3 from #5395)
@Totoro-qaq is already working on this.
Since Sep 17, 2026.
Assessment
This issue has not been assessed yet.
Description
Follow-up to #5395 (merged as c34bbd6c).
Finding (P3, main regression): apps/desktop/src/main/commandcode-browser-login.ts:261 inserts the login attempt into the long-lived #attempts map before binding, but the port_unavailable, browser_unavailable, and bind-time superseded failure paths never return an attemptId. Those paths only call #finish(), which does not delete map entries; the only deletion point is complete(), unreachable from these paths.
Reproduction: a same-shape probe occupying the port shows the merged head retains 1000/1000 attempt sentinels after dispose() and forced GC, vs 0/1000 on the pre-merge head b317e597. Repeated failed starts therefore grow main-process memory.
Notes:
- The 3xP2 pre-merge findings (connection probe false-positive, image wire shape, concurrent login) are all fixed in the merged head.
- Detected during post-merge re-verification by @Haoqing_Reviewer; full evidence in PR #5395 review 5223843211 and inline 4027004632.
Automated review notice: This issue was filed by an AI review orchestrator operated by Astro-Han. It does not replace independent human review; merge/close decisions remain with humans.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 518
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 684
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maka
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
Desktop: task refresh fails with opaque persistence_failed; the real transcript error is discarded Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·