Skip to content

fix: remaining strong box file - #1255

Open
KazuCocoa wants to merge 3 commits into
masterfrom
fix-strongbox
Open

fix: remaining strong box file#1255
KazuCocoa wants to merge 3 commits into
masterfrom
fix-strongbox

Conversation

@KazuCocoa

@KazuCocoaKazuCocoa commented Sep 9, 2026

Copy link
Copy Markdown
Member

Fixesappium/appium-xcuitest-driver#2970

Loads the persisted version before considering the legacy marker, preventing repeated cleanup.

Comment threadlib/webdriveragent.ts Outdated
}
// 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';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this was created as temporary from the very beginning, maybe it's time to remove it now for good?

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
FileDescription
lib/webdriveragent.tsAdjusts cleanup decision logic to prefer a persisted Strongbox version over the legacy marker path.
test/unit/wda-cleanup.spec.tsAdds 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.

Comment threadlib/webdriveragent.ts
Comment threadtest/unit/wda-cleanup.spec.ts
Sign up for freeto 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.

WDA project cleanup + cold rebuild runs on every session when a legacy upgrade.time file is present

3 participants

@KazuCocoa@mykola-mokhnach