Uh oh!
There was an error while loading. Please reload this page.
fix: remaining strong box file - #1255
Conversation
| } | ||
| // Migrate the legacy marker only when no version has been persisted yet. | ||
| // TODO: Replace the hardcoded version used for migration from the legacy timestamp file. | ||
| recentModuleVersion = '5.0.0'; |
There was a problem hiding this comment.
since this was created as temporary from the very beginning, maybe it's time to remove it now for good?
There was a problem hiding this comment.
🟡 Changes recommended
The new logic (and tests) reads Strongbox state via .value without an explicit read(), which can leave the persisted version undefined and reintroduce repeated cleanup/migration behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR addresses repeated WebDriverAgent cleanup by ensuring the previously persisted module version is consulted before falling back to the legacy “timestamp marker” migration path (per appium-xcuitest-driver#2970).
Changes:
- Updates
WebDriverAgent#_cleanupProjectIfFresh()to create a Strongbox item up front and use it to determine whether cleanup/migration is needed. - Adds unit tests covering persistence, legacy-marker migration, invalid persisted values, and retry-after-failure behavior.
File summaries
| File | Description |
|---|---|
lib/webdriveragent.ts | Adjusts cleanup decision logic to prefer a persisted Strongbox version over the legacy marker path. |
test/unit/wda-cleanup.spec.ts | Adds test coverage for Strongbox-backed persistence/migration behavior across multiple agent instances. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixesappium/appium-xcuitest-driver#2970
Loads the persisted version before considering the legacy marker, preventing repeated cleanup.