Repository navigation
Conversation
wxhking
marked this pull request as ready for review
October 13, 2026 08:31
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1978.
After
note.txtandnote (1).txtthroughnote (999).txtexist, the local Downloads helper falls back to the same unchecked PID filename on every save. Two sequential downloads in one process therefore overwrite the first file.Continue the existing numbered suffix until a free path is found. A regression test creates the 1000 occupied names and verifies that two subsequent saves return different paths and retain both payloads and the original file. The implementation change is confined to
unique_download_path(); no API or filename-sanitization behavior changes.This is separate from #1892, which addresses concurrent inbound attachments in
infra/gateway/media/inbound_store.py. This PR addresses sequential saves throughPOST /api/downloads/localand does not claim concurrent write atomicity.Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
Windows, Python 3.12.13:
make allpasses locallyThe complete gate above ran on the final commit without test-file selectors, deselection, or additional skip markers. The 199 skips are the repository's existing platform/optional-resource skips. On this Windows environment, locally installed VC runtime DLLs needed to be registered with
os.add_dll_directory()before ONNX imports. After fixing that environment configuration, all previously failing ONNX/knowledge modules and the complete gate passed. No dependency, application, or unrelated test changes are included in this PR.make install-hookswas enabled. The initial commit hook used the affected download test scope and passed the dashboard build. The final commit has now also passed the complete, unrestrictedmake allgate reported above.Checklist
CHANGELOG.md(if user-facing)Prepared with Codex assistance. Public logs omit local paths and personal environment details.