bug: test_parse_attachments_size_limit_accumulates fails with path validation error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
Research direction
Start with src/helpers/gmail/mod.rs and run helpers::gmail::tests::test_parse_attachments_size_limit_accumulates to reproduce the intermittent path validation error. Read validate_safe_file_path and the test's temporary-file setup, then make the test pass reliably while preserving the assertion that the attachment size limit is exceeded.
Written by the indexing model from the issue text.
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
- Dominant language
- Rust
- Stars
- 31.1k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleworkspace/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleworkspace/cli#921 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleworkspace/cli#920 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleworkspace/cli#914 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleworkspace/cli#882 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleworkspace/cli#858 ·
All issues in googleworkspace/cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·