You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a shared TTL memo helper with a process-memo reset registry wired into Vitest setup, so registered process-global memos clear after each unit/provider test by construction.
Migrate the simulator booted memo, daemon device-ready cache, and Apple tool fingerprint cache off ad hoc test reset exports while preserving their cache keys and TTL/process-lifetime behavior.
Add focused coverage for TTL expiry, scheduled expiry, registry-backed cross-test cleanup, and a migrated simulator boot memo leak scenario. Closes#1042.
Touched files: 11.
Validation
Passed: pnpm exec vitest run src/utils/__tests__/ttl-memo.test.ts src/platforms/apple/core/__tests__/simulator-booted-memo.test.ts src/daemon/__tests__/device-ready.test.ts src/platforms/apple/core/__tests__/runner-xctestrun.test.ts --project unit.
Passed: pnpm check:quick.
Passed after building dist: pnpm build, then pnpm test:smoke.
Residual risk: exact pnpm check:unit was run twice but did not pass in this local environment. The failures were nondeterministic across runs, mostly full-suite timeouts or mocked adb/xcrun helper misses in unrelated files; the failed files I reran in isolation passed.
The reason will be displayed to describe this comment to others. Learn more.
Review: LGTM. The API is right-sized (lazy expiry on get, opt-in scheduled expiry with unref'd timers — checked, line 55), the vitest global afterEach reset via setupFiles kills the leak class by construction, and the acceptance bar from #1042 is met: zero __reset*ForTests exports remain outside the registry (grepped), and the three named memos migrated. 422 tests across the touched suites + typecheck green locally. This retires the bug class that fired three times last week.
Review pass: no actionable blockers found. This satisfies #1042 by introducing a shared TTL memo plus a process-level reset registry wired into unit/provider setup, and it migrates the simulator boot memo, device-ready cache, and Apple tool fingerprint cache without changing their production cache keys/TTL behavior. The sequential leak tests cover registry cleanup, and CI is green. I marked this ready-for-human. Residual note: the worker reported local full-suite check:unit flake, but the PR head Unit Tests/Coverage/Integration and smoke jobs are passing in CI.
Preview removed because the pull request was closed.
2026-07-03 10:02 UTC
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
ready-for-humanValid work that needs human implementation, judgment, or maintainer merge
1 participant
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.
Summary
Add a shared TTL memo helper with a process-memo reset registry wired into Vitest setup, so registered process-global memos clear after each unit/provider test by construction.
Migrate the simulator booted memo, daemon device-ready cache, and Apple tool fingerprint cache off ad hoc test reset exports while preserving their cache keys and TTL/process-lifetime behavior.
Add focused coverage for TTL expiry, scheduled expiry, registry-backed cross-test cleanup, and a migrated simulator boot memo leak scenario. Closes #1042.
Touched files: 11.
Validation
Passed:
pnpm exec vitest run src/utils/__tests__/ttl-memo.test.ts src/platforms/apple/core/__tests__/simulator-booted-memo.test.ts src/daemon/__tests__/device-ready.test.ts src/platforms/apple/core/__tests__/runner-xctestrun.test.ts --project unit.Passed:
pnpm check:quick.Passed after building dist:
pnpm build, thenpnpm test:smoke.Residual risk: exact
pnpm check:unitwas run twice but did not pass in this local environment. The failures were nondeterministic across runs, mostly full-suite timeouts or mocked adb/xcrun helper misses in unrelated files; the failed files I reran in isolation passed.