-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area: coreCore CLI parsing, commands, error handling, utilitiesCore CLI parsing, commands, error handling, utilitiestype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Description
The test helpers::gmail::tests::test_parse_attachments_size_limit_accumulates intermittently fails with a path validation error:
thread 'helpers::gmail::tests::test_parse_attachments_size_limit_accumulates' panicked at src/helpers/gmail/mod.rs:2670:9:
error should mention exceeding limit: --attach '/path/to/.tmpmkVJJo/big1.bin' resolves to '/path/to/.tmpmkVJJo/big1.bin' which is outside the current directory
Root Cause
The test creates temporary files using a relative path with a hidden directory prefix (.tmp*), but the path validation logic (validate_safe_file_path) rejects the resolved canonical path as "outside the current directory" due to how symlink/canonical resolution interacts with temporary directories.
Impact
- Blocks
git pushwhen the pre-push hook runs the full test suite - Not related to any specific code change — reproducible on
main
Expected Behavior
The test should either:
- Create temp files in a way that passes path validation, or
- Use
std::env::temp_dir()with an appropriate test-only bypass for path validation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreCore CLI parsing, commands, error handling, utilitiesCore CLI parsing, commands, error handling, utilitiestype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.