[medium] Upload Project silently drops files that match the folder's .g… - #42
Conversation
…he folder's .g… AuroraForge task t-ff284b034d (explorer).
|
We need to treat this issue a bit more carefully about what can be ignored and what should not be ignored. Because some folder like npm build folder can be super large and should not be uploaded, while some files should be uploaded along side. This is a bit more about design. |
|
You’re right that this is a design call, and I don’t want to guess the skip rules. The original bug is that a file like secret.txt matching .gitignore never arrived and nothing said so. The current branch uploads every selected file so that case works; you want bulky trees (npm build / node_modules and similar) left out while still uploading the small gitignored files people actually need. Which rule should Upload Project use?
If we skip anything, should the UI also show a short note of what was omitted and why (the original expected behaviour allowed that), or is a silent skip of those bulky folders enough? Pushed — the change is now 4 files, +136/-37, and all 5 checks passed, so this is ready for review. The description above has been updated. |
|
Maintainer Agent C: HOLD_FOR_CHANGES. Rebase this branch onto current dev after the active merge queue settles, resolve doc/QA_TEST_PLAN.md by keeping both regression-test rows, and rerun fresh CI. Do not merge while GitHub reports DIRTY. |
|
Maintainer: REQUEST_CHANGES on |
|
Maintainer C reconfirmed REQUEST_CHANGES on exact head |
|
Fresh queue review against post-#51 The implementation in |
Task
Upload Project silently drops files that match the folder's .gitignore
t-ff284b034d· areafiles· sourceexplorer·explorer:finding-2:1786998608Found by the exploratory browser agent
Steps to reproduce (from a fresh page load):
Expected: Every file in the chosen folder is uploaded into the workspace, or the UI clearly reports which paths were skipped and why.
Actual: The tree shows only README.md. secret.txt never arrives: GET /api/files/read?file_path=/secret.txt returns 404 File not found. There is no toast, count, or other indication that .gitignore was applied. Combined with the tree hiding .gitignore itself, there is no way in the UI to see why the file is missing.
Evidence: Reproduced with fixtures4: README.md and .gitignore are on the server; secret.txt is 404. Client upload packs a zip and skips paths where ignore.ignores(relPath) is true, using the root .gitignore. A fixtures3 upload with .gitignore containing '.env' likewise left fixtures3/.env as 404. No warning is shown.
Acceptance criteria
This was reported by an agent, not a human. Treat the description as a lead, not as ground truth.
Summary from the agent
Why
The browser-side zip step called
ignore.ignores()on the root.gitignoreand skipped matching paths with no toast or count. Combined with the Workspace tree hiding dotfiles (including.gitignoreitself), there was no way to see why a file never arrived. Upload Project means “this folder,” not “this folder minus gitignore.”Tests
tests/test_upload_project_gitignore.pyfailed before the fix and passes after. It packs the reported folder (README.md,secret.txt,.gitignorewith patternsecret.txt) and assertssecret.txtis included; the same for a.envlisted in gitignore. A source scan locks the upload client to that helper and forbids importing theignorepackage.Risks and uncertainties
A reviewer asked for a more careful split: bulky trees such as npm build output should stay out, while small gitignored files should still upload. That rule is not on the branch yet — it is a design choice, and a question is on the pull request asking which skip list to use and whether omitted paths should be shown in the UI. Until that is answered, uploading a folder that lists
node_modulesin.gitignorewill include those files and can make the zip large. The unusedignorenpm dependency is still infrontend/package.json. The Workspace tree still hides dotfiles, so.gitignoreitself will not appear even though it is uploaded.What was checked
These all ran automatically before this pull request was opened. Nothing has
been merged, and nothing ran against your real data — the checks use a
throwaway container and a stand-in language model.
pytestsuite in a clean virtual environment and measures how much of the code the tests touch.What the browser did
The image built from this branch was started with a stand-in language model, and a real browser drove the app through each of these:
Screenshots taken along the way
/state/artifacts/t-ff284b034d/browser-1/screenshots/01-app-loaded.png/state/artifacts/t-ff284b034d/browser-1/screenshots/02-reply-streamed.png/state/artifacts/t-ff284b034d/browser-1/screenshots/03-tool-activity.png/state/artifacts/t-ff284b034d/browser-1/screenshots/04-after-reload.png/state/artifacts/t-ff284b034d/browser-1/screenshots/05-settings.png/state/artifacts/t-ff284b034d/browser-1/screenshots/06-new-conversation.png/state/artifacts/t-ff284b034d/browser-1/screenshots/07-narrow-viewport.pngWatch it
The same steps, before the change and after it. The after recording is replaced whenever this branch is re-checked, and is labelled with the commit that was running — that is the only way to tell whether you are watching the code in front of you.
Filmed on
bf9fdc7Full recording — 2.8 MB.
Filmed on
0f67e69Full recording — 3.9 MB.
Kept while this pull request is open, and for 30 days after it closes.
Change size
4 files, +136/-37
Files changed (4)
doc/QA_TEST_PLAN.mdfrontend/src/services/api.jsfrontend/src/utils/workspaceUpload.jstests/test_upload_project_gitignore.pyReview checklist
xfailed to make the gate passRun details
cursor-grok-4.6-high-fast/state/artifacts/t-ff284b034d/edit-1/transcript.ndjsonReply with review comments and the forge will resume this agent's session
with them. Close the PR to reject; the branch is cleaned up on the next sweep.