Pilot issue batch
Seven open issues in frappe/pilot, fixed one at a time. The order puts small, independent fixes first. #751 comes after #752, because it reuses the backup size estimate. #756 comes last, because it adds a new host-wide setting.
Each fix goes on its own branch from develop with tests. Progress: 7 of 7 done. Updated 2026-11-03.
#676 2FA QR code does not scan in dark mode
Approved, PR open- Root cause
- The QR SVG has no quiet zone (qrcode.vue default margin is 0). The white frame comes from the container class bg-surface-white, and that theme token turns dark in dark mode. Scanners need a light border around the code.
- Proposal
- Give the QR code its own 4-module white quiet zone with fixed white and black colors, so the theme cannot change it.
- How it is checked
- Build the dashboard and open the 2FA dialog in dark mode. The code shows a white border.
- Branch
fix/2fa-qr-dark-mode, PR frappe/pilot#759at0e5a99cd- Result
- Rendered the component: the SVG viewBox grows from 29 to 37 modules and the code starts at (4,4) on a white rect, so the quiet zone no longer depends on the theme.
#742 setup production --tls fails when another certbot runs
Approved, PR open- Root cause
- certbot takes a global lock. When the renewal timer or another run holds it, certbot exits at once with 'Another instance of Certbot is already running'. Pilot runs certbot once and does not wait.
- Proposal
- Run every certbot certonly call through one method on LetsEncryptManager. On that exact message only, wait 10 seconds and try again, up to 6 times. After the last try, fail with a clear message: another certbot run is in progress, try again in a minute. certbot refuses before it does any work, so the retry is safe.
- How it is checked
- Unit tests: lock message retries then succeeds; other errors do not retry; the final error has the clear message.
- Branch
fix/certbot-lock-retry, PR frappe/pilot#760atefa4f5e2- Result
- 3 new unit tests pass, plus 88 existing certbot tests. A fake certbot that prints the lock message twice succeeds on the third run through the real run_command path.
#736 Admin domain gets indexed by search engines
Approved, PR open- Root cause
- The admin vhost proxies every path to the admin SPA, so /robots.txt returns index.html. The template has no noindex header.
- Proposal
- Always add X-Robots-Tag "noindex, nofollow" to the admin vhost and serve a fixed /robots.txt that disallows everything. No config switch: an admin login page must never be indexed. A general custom-include hook is left out; it adds a root-parsed, bench-writable config surface.
- How it is checked
- Unit test on rendered nginx config: admin server block has the header and robots location; site blocks do not. Run nginx -t on the rendered file when nginx is present.
- Branch
fix/admin-noindex, PR frappe/pilot#761at17c26680- Result
- Rendered config passes nginx -t on nginx 1.30. Live curl: admin /robots.txt returns the disallow text; admin / returns X-Robots-Tag: noindex, nofollow; the site vhost has no header.
#741 Supported way to run git with the bench's stored credential
Approved, PR open- Root cause
- Only internal helpers (auth_config_for, git_env) attach the stored token to git. Outside scripts import them and break when they change.
- Proposal
- Add a public App.run_git(*args) that runs git in the app folder with the stored credential in the environment (never in argv or .git/config). Add a thin CLI: pilot -b <bench> git <app> <git args...>, which streams output and returns git's exit code.
- How it is checked
- Unit tests: env carries GIT_CONFIG_* auth and argv has no token; CLI passes args through and returns the exit code. Run pilot git <app> status on a local bench.
- Branch
feat/app-run-git, PR frappe/pilot#762at4b7ed532- Result
- 3 unit tests: the token reaches git through GIT_CONFIG_* (git config --get reads it) and is absent from argv and .git/config; exit codes pass through. Live on a local bench: pilot -b bench1 git frappe log --oneline -1 and ls-remote work, a bad ref exits 128, a missing app exits 1.
#752 Reject a backup if the disk has no space
Approved, PR open- Root cause
- SiteBackups.take writes to the site's backups folder with no space check. A full disk can also stop the database.
- Proposal
- SiteBackups.take checks free space before Frappe runs and raises InsufficientDiskSpaceError. The estimate is the newest local database dump plus 20%; with no local dump, the database size on disk (an upper bound). With files, add the size of public/files and private/files. 500 MB always stays free for the system. Backups that stream to S3 skip the check. The API was left thin: the task fails at once with the message, and the failure counts toward the backup-failing alert.
- How it is checked
- Unit tests for the estimate and the rejection. API test for the early 4xx error.
- Branch
feat/backup-disk-space, PR frappe/pilot#763ate843afa0- Result
- New tests for the estimate, the refusal, the 500 MB reserve edge and the message. Local site drift.localhost: last real run was 142 MB, estimate 170 MB. With free space forced to 600 MB, the backup is refused before Frappe runs: 'needs about 170 MB, plus 500 MB kept free for the system, and 600 MB is free'.
#751 Reject a migration if the disk has no space for its backup
Approved, PR open- Root cause
- MigrationOperation.begin starts the backup phase without a space check, so a migration can fail half way, with sites in maintenance.
- Proposal
- MigrationOperation.begin sums each site's predicted database backup size (from #752) and calls the same ensure_free_space helper, so the 500 MB reserve applies here too. It raises before any site enters maintenance. Safeguards off means no backup, so no check. The Admin API maps the error to 507 insufficient_disk_space with the message, and deletes the unstarted record.
- How it is checked
- Unit tests in test_migration_operation: begin raises and no site enters maintenance; safeguards off skips the check.
- Branch
feat/migration-disk-space (stacked on #752), PR frappe/pilot#764at07111007- Result
- New unit tests (refuse, allow, safeguards off, no maintenance on refusal) and an API test for the 507. Local bench drift: a real migration record passes on the real disk and is refused with free space forced low; the record was deleted afterwards.
#756 Opt-in auto Pilot update
Approved, PR open- Root cause
- Pilot updates only when a person runs pilot admin upgrade or clicks update in the Admin.
- Proposal
- [updates] auto = false in common_config.toml (host-wide). pilot admin auto-update on|off|status saves it and adds or removes a daily cron entry (03:37). When a newer release exists, the entry queues one update-cli task on the first bench by name, with an idempotency key per release. Dev checkouts are skipped. Extra change: the update-cli task now restarts the admin of every bench, not only the bench that ran it. Before, other admins kept old modules over the new code.
- How it is checked
- Unit tests for config parsing, cron install and remove, and the check that queues one update only when a newer release exists.
- Branch
feat/auto-update, PR frappe/pilot#765ata986ab5c- Result
- Tests for config round trip, cron on/off, queue only on a release build with a newer release, and restart of every admin even when one fails. Real check with a temporary benches folder: on writes [updates] auto = true and a '37 3 * * *' crontab line; that line ran by hand exits 0; off removes it, and the crontab matches its backup.