Skip to content

Fix Broken unit tests and improve cross platform support in file helpers#11

Open
lucky5th wants to merge 14 commits into
jo-inc:mainfrom
lucky5th:main
Open

Fix Broken unit tests and improve cross platform support in file helpers#11
lucky5th wants to merge 14 commits into
jo-inc:mainfrom
lucky5th:main

Conversation

@lucky5th

Copy link
Copy Markdown
Contributor
  • Change safeResolvePath to normalize filename and memoryDir early
  • Update regex assertions to match unix or win32 path separator patterns
  • Added block absolute win32 paths
  • Extended bloack absolute paths to handle forward slashes case
  • Pass paths through path.normalize in assertions and parameters
  • Added .editorconfig to ensure consistent spacing.

lucky5th and others added 14 commits April 21, 2026 17:41
Add support for HOMEPATH environment variable present when running in Windows. 

Resolves issue where pi-mem will create a directory `./~/` in the pi agents directory and in the current working directory on Windows systems.
Use os.homedir() instead of bash tilde expansion to consistently resolve home directory in Windows and Linux environments
… user's home directory.

Pass through path.normalize() to ensure resolve paths and expected paths use the same path separator accross platforms.
- Change safeResolvePath to normalize filename and memoryDir early
- Update regex assertions to match unix or win32 path separator patterns
- Added block absolute win32 paths
- Extended bloack absolute paths to handle forward slashes case
- Pass paths through path.normalize in assertions and parameters
- Added defensive code in resolveHomeDir and resolveAgentDir to handle case where null is passed to fallback argument

- Added coverage for when no fallback argument is provided
- Added coverage for when null is passed to fallback argument
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.

1 participant