Skip to content

Fix .bat anonymization, truncated-tree misses, submodule warning, account deletion#742

Merged
tdurieux merged 5 commits into
mainfrom
fix/issue-batch-735-738-737-741
Jul 2, 2026
Merged

Fix .bat anonymization, truncated-tree misses, submodule warning, account deletion#742
tdurieux merged 5 commits into
mainfrom
fix/issue-batch-735-738-737-741

Conversation

@tdurieux

@tdurieux tdurieux commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Four fixes, one commit each:

  • Not anonymizing Batch scripts #735 — .bat files were not anonymized. mime-types maps .bat to application/x-msdownload (same MIME as .exe/.dll), so batch scripts were classified as binary and streamed through untouched. .bat/.cmd are now special-cased as text before the MIME lookup; .exe/.dll stay binary.

  • Certain zip files showing 'File not found' while the github repo has the file. #738 — files missing from truncated tree listings returned 404. GitHub truncates tree listings of very large repositories; files that fell outside the listing never reached the database, so requesting them returned file_not_found even though they exist on GitHub. When a lookup misses and the path is under a recorded truncated folder, the file metadata is now fetched on demand from the contents API (object media type) and cached.

  • The submodule was not copied over into the anonymized project #737 — submodules appear as empty folders. GitHub archives/trees never include submodule contents. The explorer now shows a warning banner when the repository has a root .gitmodules.

  • How does one delete his account and records from your DB? I want to unlink my account. #741 — account deletion. New DELETE /api/user endpoint removes all anonymized repositories/gists/PRs owned by the user, best-effort revokes the OAuth grant, and scrubs personal data from the user record (kept with a placeholder username so removed repoIds stay reserved). The settings page gains an Account section with a confirmed delete button.

Tests: suite passes except the pre-existing error-codes translation-coverage failure on main (missing token_expired/job_is_active translations, unrelated).

tdurieux added 4 commits July 2, 2026 14:19
mime-types maps .bat to application/x-msdownload, the same MIME type as
.exe/.dll, so batch scripts were classified as binary and streamed
through without any anonymization. Special-case .bat/.cmd as text before
the MIME lookup, keeping .exe/.dll binary.
GitHub truncates tree listings of very large repositories. Folders whose
listing was truncated are recorded in truncatedFolders, but files that
fell outside the listing never reached the database, so requesting them
returned 404 file_not_found even though they exist on GitHub — and a
force refresh could not help.

When a file lookup misses and its directory is under a truncated folder,
fetch the file metadata directly from GitHub's contents API (object
media type, so it works past the 1MB inline limit), cache it in the
database, and serve it normally.
GitHub archives and tree listings never include submodule contents, so
submodules end up as empty folders in the anonymized repository, which
surprises users. Detect a root .gitmodules file and show a warning
banner in the explorer explaining that submodule contents are not
included.
Add DELETE /api/user: removes all anonymized repositories, gists, and
pull requests owned by the user, best-effort revokes the GitHub OAuth
grant, and scrubs personal data (username, emails, tokens, GitHub id,
photo) from the user record. The record itself is kept with a
placeholder username so removed repoIds stay reserved and owner
references remain resolvable.

The settings page gains an Account section with a confirmed delete
button.
The error-code coverage test failed because both backend codes had no
frontend translation.
@tdurieux tdurieux merged commit 839582c into main Jul 2, 2026
2 checks passed
@tdurieux tdurieux deleted the fix/issue-batch-735-738-737-741 branch July 2, 2026 11:35
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