Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 8, 2025

When integration tests switch between controller versions (e.g., devlatest), leftover node_modules and data directories cause version conflicts and stale state.

Changes

Version tracking via .controller-version file:

  • getInstalledControllerVersion() - reads current version from tracking file
  • saveControllerVersion() - persists version after installation
  • getControllerVersionFilePath() - returns path to tracking file

Automatic cleanup on version change:

  • clearTmpDirectory() - empties node_modules and data directories
  • prepareTestDir() - detects version changes and clears before installation

Behavior

// First run with 'dev' - installs and saves version
await controllerSetup.prepareTestDir('dev');

// Same version - skips cleanup, fast npm install
await controllerSetup.prepareTestDir('dev');

// Version change - clears directories, fresh install
await controllerSetup.prepareTestDir('latest');

Version changes trigger cleanup; same version preserves state for faster subsequent runs.

Original prompt

This section details on the original issue you should resolve

<issue_title>Clear tmp directory when switching controller versions</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Clear tmp directory when switching controller versions Clear tmp directory when switching controller versions Nov 8, 2025
Copilot AI requested a review from Apollon77 November 8, 2025 13:47
Copilot finished work on behalf of Apollon77 November 8, 2025 13:47
Sign up for free to 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.

Clear tmp directory when switching controller versions

2 participants