Engineering audit · started 25 October 2026 · UTC times
Pilot startup and recovery audit
Pilot must show a usable page while a bench starts or recovers. This audit checks a new self-hosted install, a cloud-managed install, and a warm host that waits for cloud configuration. It also checks whether a user can retry after a task stops.
Code review and VM experiments complete; real cloud acceptance run remains. The Pilot repairs pass 3,765 tests. Live lite mode works with Frappe version-16-hotfix. The proposal below identifies the changes needed to target a usable signed-in site within 15–20 seconds. That complete latency is not yet measured. The audit host is a fresh Ubuntu 26.04 VM with about 2 GB of RAM. Pilot uses develop.
How can a signed-in site arrive within 20 seconds?
Lite mode is working on the audit VM. Pilot develop starts Frappe version-16-hotfix with web, jobs, and realtime in frappe.runner. A signed-in browser, a queued job, and a realtime handshake all passed. This confirms the runtime combination. It does not measure the complete cloud signup path.
The critical path is: Central queues the request → Atlas places the VM → Metal restores local memory and disk → the guest applies identity, time, and cloud configuration → Central sees the site → Pilot creates a session → the browser opens the app. Image building and the five-minute warm capture happen before signup. They must not enter this path.
New benches enable lite mode. Cargo inherits that default through pilot new.
Correction: the earlier review inspected only the config class default and missed the creation path. No Cargo override is needed. The live generated service runs frappe.runner.
Cargo: provision.sh, prewarm loop
The pending marker is removed before warm probes pass. Exhausted retries exit with status zero.
Injected failed HTTP probes produced exit zero and no pending marker. A warm artifact can contain an unready app. Separate the password-reset guard from warm readiness. Publish a success marker only after all checks pass. Fail explicitly otherwise.
The synchronous Admin hostname claim runs before Site.create_once_addressable. Its request timeout is 35 seconds.
A slow optional rename can delay the Site record. Record the addressable site first. Queue the Admin hostname claim after commit and retry it independently. The wildcard Admin route already works.
Pilot: pilot/core/site/login.py, create_session
Every login starts a new Python interpreter and initializes Frappe. The subprocess timeout is 30 seconds. Central permits 120 seconds for the relay.
A warm web process does not make this subprocess warm. One Administrator session took 2.877 seconds on the audit VM. User creation and app hooks can add work. Move session exchange into an already warm Frappe request handler.
Central chooses the cheapest trial plan and newest matching image independently. Warm restore requires matching vCPU and memory, sufficient disk, a compatible Firecracker build, and local warm artifacts.
A valid image selection does not prove a warm start. Validate the plan against the template. Expose warm availability per host as generic image state and prefer eligible hosts with the artifact. Measure every cold fallback.
Recommended sequence and ownership
Cargo builds and validates. Pin Pilot and Frappe revisions. Enable lite mode. Install apps, migrate, build assets, and warm the real product landing page. Test login and a job. These steps happen before publication.
Atlas stays unchanged. The user excluded Atlas changes. Its five-minute capture remains fixed. Cargo keeps incomplete preparation pending and lets systemd retry, including after restore. This improves recovery but cannot prove that every captured guest completed warmup before capture.
Atlas restores generic VM state. Keep CPU, memory, local artifact, and runtime compatibility checks. Metadata is already replaced before vCPU resume. The guest metadata agent already applies host time before network identity. Preserve these useful invariants.
Pilot applies tenant identity, then publishes readiness. Apply cloud configuration and seed the signing keys. Keep the pending page until the actual product page and session exchange can work. A ping alone does not validate authenticated app boot or its assets. Do not restart the ready database or rebuild assets at this point.
Central hands off immediately. Create the Site record before optional remote administration. Use the automatic wildcard hostname for first access. Keep the requested domain change after login. Prefer adding a primary domain to a stable internal site name instead of moving the site directory.
Frappe stays unchanged. The user excluded framework changes. Pilot keeps its existing session creation path and its measured interpreter cost. Cargo now warms the real Pilot login API and logs out afterward, without resetting Administrator's password. A future warm-handler session exchange remains an optimization proposal, not part of these PRs.
A shared password or baked session is not needed. Sessions and passwords in a memory snapshot are copied to every clone. Cargo already logs out its warmup session. Keep that behavior. A fresh session from a warm handler removes the interpreter cost without sharing a credential. Review and replace other image-wide secrets before enabling customer access.
Proposed latency budget
These are engineering targets, not measured cloud results. The clock starts when Central receives Create and ends when the browser shows the signed-in product page.
Stage
Target
Required condition
Central validation, durable request, dispatch
2 seconds
Provisioning has worker capacity and does not wait behind unrelated long jobs.
Atlas placement and Metal warm restore
4 seconds
Correct shape; complete local artifact; no image transfer or cold fallback.
Guest identity, time, bootstrap, route readiness
3 seconds
Ready database and runtime; no build, migration, or synchronous rename.
Readiness detection and session exchange
2 seconds
Short readiness poll; already warm session handler; bounded user creation.
Browser network, assets, signed-in render
4 seconds
Product page prewarmed; small cached assets; realistic client network.
Tail margin
5 seconds
Measure queueing, host pressure, and network variance.
Hypotheses still to test
Rename race. Pilot moves the site directory, reloads nginx, and immediately removes the compatibility link. nginx reload is asynchronous. An old worker or in-flight request can still name the old path. A direct request for an absent site returned HTTP 404, not the reported plain HTTP 500. This is a credible brief 404 path, not a proved cause of that plain-text error. Test slow requests and overlapping login during a real rename. A stable internal site name avoids this class of problem.
Readiness gap. Central uses a public ping before creating a session. A ping can succeed while the product landing page, user creation, or session exchange still fails. Test those three steps independently with the actual product apps and a newly created user.
Warm fallback and resource pressure. Missing host artifacts, a shape mismatch, or a restore failure can cold-boot. The current VM test does not measure this. Use Metal's existing boot kind and started/reachable metrics, then add the same request identity to Central, Pilot readiness, session creation, and browser milestones. ICMP reachability is not application readiness.
Rejected hypotheses. Admin has a 600-second idle timeout, so the five-minute capture does not by itself expire it. The warm-state metadata test with MariaDB left running did not reproduce the error. A Redis-cache stop on the login route also did not reproduce it. Do not report a database-start delay as the historical warm snapshot root cause.
Acceptance run before promising 20 seconds
Run at least 100 complete trial creations on real warm hosts. Include fresh and aged snapshots, the exact trial shape, simultaneous signups, host memory pressure, unavailable metadata, delayed key delivery, rename overlap, task cancellation, and a deliberate cold fallback. Measure request accepted, queued, dispatched, restored, mesh ready, bootstrap applied, product ready, session created, and browser usable. Report median, p95, p99, maximum, and error count. Keep cold fallback results separate. A fallback page is useful recovery, but it is not a usable signed-in site and does not satisfy this latency target.
Code reviewed: Atlas 64bb4b3a, Cargo 93f6bef, Central 955f43e1, and the uncommitted Pilot audit patch. Existing unrelated Atlas and Central edits were left untouched. This cross-plane section proposes changes; it does not claim they have been installed.
Plan
Inventory. Record the code revision, services, resource limits, and current host state. Preserve existing data and changes.
Install and observe. Install Pilot develop. Sample the page and API during first start, setup, and the switch to production services.
Trace state. Read setup, cloud configuration, routes, task ownership, process control, and browser recovery code. Find every point where partial work can become visible.
Inject failures. Cancel queued and running tasks. Kill a task or worker between steps. Restart Admin and dependencies. Check what the user sees and how retry works.
Repair and verify. Make small fixes at the state owner. Add regression tests. Repeat each failed experiment with the patch installed.
Review and hand over. List verified behavior, remaining limits, patch locations, and the final host state. Keep the experiment history below.
Test matrix
Path
Checks
Status
Self-hosted setup
First page, refresh, duplicate start, setup failure, retry, production handoff, login
A failed retry can remove existing site and app data.
Track directories created by the attempt. Regression test preserves existing files. Patched locally and on the VM.
A partial Python environment looks complete
A restart can start an incomplete workload instead of setup.
Keep an initialization marker until all steps succeed. Test interruption and retry. The VM cancellation kept bootstrap in setup mode.
Wrapper death leaves running children
A failed task can leave processes that overlap with a retry.
Stop verified children before marking interruption complete. Reproduced on the VM. All 231 task tests pass with the local patch. Live repeat is pending.
Evidence and limits
The audit uses one development VM. It can show a failure and verify a repair under stated test conditions. It cannot prove that every request will succeed under every infrastructure failure. Page responses and API errors are recorded separately. A valid API error must remain an error; a working page must give the user a clear next action.
Append-only log
Entries are added at the end. Corrections use a new entry. Credentials, private addresses, account data, and raw host logs are excluded.
001 · Scope and baseline
Read the previous audit, the repository rules, and the publishing instructions. The local Pilot checkout is clean on develop at 0c82635f. SSH access works. The target VM has no Pilot install or bench data. Started the host installer from this checkout. The plan covers self-hosted, cloud, warm-host, and task recovery paths.
002 · Resume and rollback finding
The installer completed. Created a disposable audit bench. The first start is building the Admin frontends. The baseline setup and initialization tests passed: 34 tests.
Found a data preservation bug in initialization rollback. A failed retry could remove apps and sites that existed before the attempt. The local patch removes only directories created by that attempt. A regression test keeps existing site and app files through an injected failure. All 14 initialization tests and the Python lint check pass. The patch is not yet installed on the VM.
Correction to the earlier session note: transient browser session failures still need a browser reproduction. No verified browser finding is claimed here.
003 · Partial environment and live cancellation
Added an initialization marker. A new bench stays in setup mode until all initialization steps finish. An interrupted attempt keeps the marker. A retry removes it only after success. Existing complete benches need no migration. The VM has this patch and the rollback patch.
The broader local check passed 674 tests. A separate check passed 66 cloud-bootstrap, metadata, and process-lifecycle tests. The Python lint check passed.
On the VM, the page routes, health endpoint, and bootstrap endpoint returned HTTP 200. Started Frappe version-16-hotfix with lite mode. Cancelled setup while the framework clone was running and the Python environment already existed. The page routes stayed reachable. Bootstrap still reported setup mode. A new attempt was accepted and started.
Browser preview inspection timed out twice. The alternate browser connector was unavailable. A direct Playwright check is in progress. These browser-tool limits do not establish an application failure.
004 · Wrapper crash and delayed metadata
A direct Playwright check through an SSH tunnel showed the running setup screen and its output. No page error was reported. Direct public navigation was slow; it is not used as proof of page readiness.
Killed only the task wrapper during dependency installation. Pilot marked the task failed while two task-owned child processes still ran. Cleaned up both processes after the measurement. The repair stops verified children before it marks the task interrupted. The test also checks that detached children are gone. All 231 task tests and Python lint pass. A stale-process safety test caught an initial error in the repair; the final change preserves that safety check.
Served test metadata on the VM loopback interface. Missing metadata kept bootstrap in pending mode with HTTP 200. Delayed metadata moved it to setup mode with HTTP 200. A second application made no change. Restored the original shared configuration and stopped the test metadata server. This checks the host code with a simulator. It does not test a real cloud control plane.
005 · Live repairs, retry, and production
Repeated wrapper death with the repair installed. Pilot reported the task failed, and no task-owned child process survived. The setup page remained available. The combined backend, setup, lifecycle, and task check passed 1,178 tests.
In the browser, cancelled setup showed the failure message and a visible Back to configuration button. Used that button and Set up bench to start a new task. The retry completed production setup with systemd and lite mode. The production Admin route reached the Sites page without a page script error.
A 300-request setup sample returned only HTTP 200. A separate 300-request Admin sample during a service restart also returned only HTTP 200. Created the disposable Frappe test site. A 300-request site sample during a graceful web restart returned only HTTP 200 for the page, login page, and readiness endpoint.
006 · Configured cloud alias returned 404
Reproduced an HTTP 404 for a configured cloud site hostname whose target site did not exist yet. nginx omitted the alias and used the catch-all route. The repair keeps that configured alias and serves a waiting page with HTTP 200. The page refreshes every five seconds. Its readiness endpoint returns HTTP 503 until the target exists, so the control plane cannot mistake the waiting page for a ready site.
The patched VM returned HTTP 200 and the expected waiting page. Its readiness endpoint returned HTTP 503. All 105 focused nginx tests passed. A browser displayed the waiting page. The browser transition check reached the new site response, but its final Login-button assertion timed out; full visual transition verification remains open. Restored the simulated cloud configuration. Unconfigured hostnames still use the catch-all route.
The user supplied public wildcard DNS for the next phase. Public Admin and site HTTP checks returned 200. Certificate setup and public TLS checks are in progress.
007 · Public TLS and database startup race
Issued certificates with the contact supplied by the user. Both public domains passed certificate validation. Admin, site login, and readiness returned HTTP 200. A 300-request Admin sample during restart and a 300-request site sample during a forced web-process kill returned only HTTP 200.
Started web while the managed database was unavailable. The 300-request sample included 14 HTTP 500 responses. Added a bounded database wait before web starts. Added systemd dependencies so web stops before the managed database and starts after it. A repeated fault test returned no 500 responses, but one probe exceeded its five-second deadline. An ordered database restart with a three-second injected delay then returned HTTP 200 for all 300 requests with a 15-second probe deadline. The maximum request time was 9.183 seconds. Removed errors by waiting; this is not a zero-latency result.
008 · Exact plain-text error and missing Admin index
A loopback test server bypassed the production startup gate. With MariaDB stopped, it returned HTTP 500, content type text/plain, and exactly 21 response bytes: Internal Server Error. The trace showed a second database error inside Frappe error cleanup. Uvicorn supplied the final plain-text response.
A rollback guard alone did not fix all paths. Another request failed while the HTML error page queried website metadata from the unavailable database. Restored the original Frappe source. The installed repair is in Pilot startup ordering. This experiment identifies a failure mechanism. It does not prove the cause of the user's earlier snapshot incident.
Found and reproduced a separate Pilot Admin error. If the frontend directory exists but index.html is absent, send_file raises FileNotFoundError and Flask returns its generic HTTP 500 page. Vite is configured to empty the served build directory. An interrupted or concurrent rebuild can create that state. Added a regression test that failed on the original code. The patch builds into a separate directory, validates the output, publishes assets first, and replaces index.html last. Old hashed assets remain available to open tabs. A missing index now serves a self-contained Preparing Pilot page that refreshes every five seconds.
The full Pilot suite passed 3,762 tests before this frontend patch. The focused frontend and command check passed 103 tests after the patch. Final full-suite and live-build checks are running.
009 · Warm state with the database left running
Repeated pending-to-ready metadata application on the completed bench. Kept MariaDB running. Its PID was unchanged throughout. The site returned HTTP 200 for ten probes before metadata delivery and ten probes after it. Admin moved from admin mode to pending mode and back to admin mode. Repeated metadata application made no change. Restored the shared configuration.
This warm-state experiment did not reproduce the 500. A database startup delay alone does not explain a snapshot that already has a usable database. A real snapshot restore and the external control plane remain outside this VM-only test.
010 · Gateway recovery and final Pilot checks
With no backend listener, nginx returned HTTP 502 to browser navigation. The repair serves a Reconnecting page for HTML GET navigation on a gateway failure. It refreshes every five seconds. API calls, POST requests, and non-HTML requests keep their error status. Live checks returned browser HTTP 200, API HTTP 502, and POST HTTP 502. The browser reached Sites after the backend started. This does not mask an upstream application HTTP 500.
A successful live Admin rebuild ran from 14:23:29 to 14:24:44 UTC. A public monitor covered the entire build, from 14:23:09 to 14:25:09 UTC. All 1,200 samples returned HTTP 200. The maximum request time was 5.281 seconds. An earlier monitor included a deliberate socket-stop fault and is not clean-build evidence.
The full Pilot suite passed 3,765 tests. Python lint and whitespace checks passed. Repairs are present locally and on the audit VM. They are not committed to Pilot. The public plan uses the publish-site-artifact skill.
011 · Confirmed site error scope and lite mode
The reported plain-text error was on the Frappe site URL. The separate Admin build issue cannot explain that incident. Stopped Redis cache with MariaDB left running. The login page still returned HTTP 200, and the database PID stayed the same. This single route did not reproduce a Redis failure.
Verified the installed Frappe branch is version-16-hotfix and its source is clean. Pilot reports lite mode enabled. The managed web service runs frappe.runner. A new Administrator session took 2.877 seconds. A signed-in browser reached Desk setup with HTTP 200 in 2.505 seconds. It had no page script errors or server errors. A real short-queue job finished in 0.105 seconds. The realtime polling handshake returned HTTP 200 with an Engine.IO open packet in 0.173 seconds. These are single observations on the audit VM, not an end-to-end VM restore benchmark.
The user added the Cargo image builder, Atlas warm capture, and Central signup flow to the review. Cargo prepares the guest. Atlas warms it for five minutes and captures memory. Central creates the customer VM and finishes the site identity. The target is a usable site within 15–20 seconds, including network delay. Atlas must keep a generic workload contract.
012 · Warm-path code trace and failure simulation
Traced Cargo provision.sh, Metal warm capture and restore, the guest metadata agent, Central image selection and site handoff, and Pilot session creation. Found the develop-only signup selector and the missing lite-mode enable step in Cargo. Found that Central performs the optional Admin hostname request before recording the addressable site.
Extracted the generated Cargo prewarm script into an isolated shell harness. Stubbed HTTP to return 500 for every probe. The script logged that warming failed, returned exit status zero, and left no pending marker. No real host or app data changed in this simulation. Atlas capture currently checks elapsed time, not that result.
Checked and rejected a suspected Admin idle-expiry explanation: the systemd Admin timeout is 600 seconds, longer than the five-minute capture wait. A direct Frappe request for a missing site returned HTML HTTP 404. It did not reproduce the literal plain-text error. Added the proposal, latency budget, remaining hypotheses, and real-cloud acceptance run above. No Cargo, Atlas, or Central implementation was changed.
013 · Corrected lite default and implementation boundaries
The user correctly pointed out that Pilot enables lite mode for a new bench. BenchCreator._initial_settings sets lite_mode_enabled to true. The earlier claim was based only on the deserialization default and was wrong. Cargo inherits the enabled setting. The current findings table is corrected; earlier log entries remain unchanged.
The user authorized one PR per changed repository and excluded Atlas and Frappe changes. Work uses isolated branches based on the latest fetched develop revisions. Existing unrelated local edits remain untouched. Central keeps primary-domain attachment now. Eventual directory renaming from Central is deferred. Pilot's rename implementation is being hardened to retain its compatibility path during old requests.
Cargo's generated script now uses the existing Pilot login API, checks logout, keeps its pending marker after failure, and lets systemd retry. Four local HTTP shell tests pass. The generated script also completed successfully against the audit VM's hotfix/lite runtime. Central records the Site before queuing optional Admin hostname work. Its site, server-observation, and metadata suites passed 81, 17, and 4 tests respectively on an isolated test.local database.
The Pilot suite passed 3,767 tests before the additional rename hardening. Final rename and full-suite checks are in progress. Open PRs: Cargo #117 and Central #562.
014 · Live rename check and pull requests
Renamed a disposable site on the audit VM while a client polled the old hostname. All 300 requests to /, /login, and /api/method/ping returned 200. The old path remained a symlink to the new directory, and the old site header still returned 200 after the reload. The full Pilot suite passes, except one test whose pgrep "sleep 5" matches an unrelated process on the local host. Opened Pilot #695, Cargo #117, and Central #562. Deploy Pilot first, then publish a working version-16-hotfix image, then deploy Central.
015 · End-to-end signup timing on the local stack
Pointed local Central at the local Warsaw Atlas: the region now uses the zone tanmoy-lc.fc.frappe.dev, and the Atlas region name matches it. Built a Raven trial image by hand, without Cargo: Pilot #695, Frappe version-16-hotfix, warm shape 0.5 vCPU / 1 GB / 10 GB. Two hosts are in maintenance, so every VM lands on one host. A harness drives the same Central API calls as the signup page and loads the login URL in Chromium.
Empty units in the image. Atlas snapshotted the running builder disk 28 seconds after setup central rewrote the systemd units. The data was not flushed, so every unit was 0 bytes. The bench never started, prewarm failed on every attempt, and Atlas still captured the warm image. The customer saw nginx 502 until the end. Fix: provision.sh ends with sync, and Pilot fsyncs the unit files after write_config.
First clean run, r4: about 48 seconds. The site answered 2.9 seconds after Create. For 31 seconds after that, Pilot answered every Central login with 401. The browser then took 11 seconds to load, and it landed on the setup wizard instead of /raven.
Cause of the 401s. A restored guest keeps the clock of its snapshot until NTP syncs, about 29 seconds after resume. It sees Central tokens as issued in the future. Atlas HEAD already has the fix (Metal writes the host time to MMDS, and the guest agent steps the clock), but neither part was deployed. Installed metald 0.1.0+64bb4b3a on the test host. The guest agent goes into the next image.
Cold web process in the warm image. Lite mode restarts an idle runner after 300 seconds. Atlas captures 300 seconds after boot, so the snapshot held a freshly restarted runner. The next image sets restart_idle_seconds = 900.
Central. The signup page treated a transient REFRESH_FAILED as a terminal failure, stopped polling, and offered Try again. A request is checked again only 3 minutes after an Atlas error. Product validation rejected version-16-hotfix. All are fixed locally. The test host also hung once, with no kernel message, and needed a reboot. Its cause is unknown.
016 · Signup under 20 seconds after the clock and idle fixes
The Atlas clock fix did not work after deployment. Metal writes the host time to MMDS when it loads a snapshot, but about 20 ms later the reconcile metadata phase replaces the whole MMDS document without it. The guest agent polls every 250 ms, so it never sees the value. Metal now stamps the host time on every metadata refresh, with a Go test. Deployed metald 0.1.0+64bb4b3a.hosttime on the test host. Image 3 carries the new guest agent and restart_idle_seconds = 900.
Measured from Create until the signed-in page loads in Chromium, warm restore, 0.5 vCPU / 1 GB: r8 14.0 s, r10 12.6 s, r11 16.3 s, r12 16.3 s, r13 16.2 s, r9b 16.2 s. Each login succeeded on the first attempt. The site answered after 2.8 to 6.0 seconds, the login URL arrived after 7.9 to 11.3 seconds, and the page loaded in 4.1 to 7.6 seconds. The browser saw no 4xx or 5xx response. One run, r9, failed inside the harness before Central received a request. It is excluded.
Open items: a Raven trial lands on the Frappe setup wizard, not on /raven. The session exchange still takes about 5 seconds on 0.5 vCPU. Only one host was used, with sequential signups.
017 · Review fixes and an open rename race
Pilot commit cb566f73 saves the old-name registry before it swaps the site paths. A registry write failure now leaves the original site directory in place. Regression tests cover a failure before the registry file changes and a failure after the file is replaced. The 80 focused rename, command, and process-hook tests passed locally. Greptile gave this commit 5/5. All review threads were resolved.
Commit ecf59356 updates the billing browser tests to use the current field and button names. The assertions still check the optional GSTIN field, the required State field, and the external plans URL. All 14 billing browser tests passed locally. CI and review must run again on this commit.
Open reliability blocker: CI caught a reader failure during repeated directory moves and rollbacks. A repeated local test also produced OSError 40: Too many levels of symbolic links. An atomic swap does not make a multi-step path lookup atomic. This race is not fixed by the registry-write repair. The rename path is not yet verified for uninterrupted reads during rollback. Keep the failing regression test. New trial sites continue to use primary-domain attachment, which does not rename the directory.
018 · Stop Cargo's builder before disk capture
Opened Cargo PR 118, commit 57b47a9. Cargo now flushes the builder's disk, requests an Atlas stop, and waits for the observed stopped state before requesting the image. A stop error, an unexpected VM state, or a five-minute stop timeout prevents capture. A retry can use an already-stopped builder without SSH.
Cached image and warm preparation settings stay the same. Atlas later boots the disk on each host and prepares the memory snapshot there. Atlas can force-stop a guest that does not shut down in time. The stopped state alone does not prove a clean database shutdown.
On the local test site, 14 builder tests and 90 image tests passed. Python lint and format checks passed. No live VM capture was performed for this change. The pull request is open; it is not deployed.
019 · Skip host caching for bare Site images
Opened Cargo PR 119, commit 8a110d1. New bare Site images set both cache_image and memory_snapshot to false. These images remain available on disk for building Apps images. Base and Apps images keep both flags enabled. Existing published images do not change.
All 91 focused image tests passed on the local test site. The checks include Base, Site, and Apps images. Python lint and format checks passed. The pull request is open; it is not deployed.
020 · Prefer signup images with time for host caching
Opened Central PR 564, commit 686dfa3f. Signup prefers the newest matching image at least 30 minutes old. If none is old enough, it uses the latest matching image. Central Settings has a configurable age in minutes. A value of 0 selects the latest image. The migration sets 30 minutes only when the setting is missing.
Selection checks every regional catalog page and keeps the product and Frappe version filters. All 11 image selection tests and 8 settings tests passed on the local test site. Python lint and format checks passed. The age allows time for caching but does not prove that each host has cached the image. This change is not deployed.
021 · Pilot task timeout and recovery audit
Audited all 40 existing task types on Pilot develop at 551c0b4e. None had a total execution deadline. Several clone, install, build, backup, database and certificate commands can wait without their own total limit. One stalled task can block the bench queue. Failure callbacks also ran without a deadline.
Local changes record task budgets and enforce them for new and adopted tasks. Short control tasks have five minutes, general tasks one hour, and large data operations 24 hours. Cleanup callbacks have 20 minutes. These are conservative limits, not expected task times. A timeout does not undo database writes or cancel an operation already accepted by a service manager.
The audit also found missing recovery callbacks in the revert chain; a 90-second systemd restart limit below the default lite worker's 690-second stop budget; swallowed worker restart errors; and a retry path that could stall after all site migrations had finished. Local fixes preserve checkpoints and add a completion-only retry task. A new bench also skips the database startup wait until initialization creates its runtime.
All 451 focused tests passed. Real subprocess tests cover a detached child, worker adoption, failure cleanup, queue progress and an unrelated process that must stay alive. The Admin UI type check passed. The full Python suite is running again after a test fixture correction. No production change was made.
022 · Task recovery fixes pushed for review
Opened Pilot PR 696, commit 44015618. The task inventory lists all 40 existing tasks and the new completion-only recovery task, their execution budgets, running cancellation policy, and the other timeout layers.
Final review found two more recovery gaps. Retry now enables maintenance again after a failed backup returned a site to normal service. Callback processes keep the task launch identity, so a wrapper crash cannot hide an active callback from process recovery. The worker stops the surviving callback before replaying cleanup. A separate probe confirmed that callback timeout does not kill its own parent.
The full local Python suite passed all 3,800 tests. The focused task engine suite passed 241 tests, and all eight final timeout and fault-injection tests passed. Python lint, formatting, the Admin UI type check, and 12 task-format tests passed. The tests use disposable local files and processes. No production deployment or live database cancellation was performed. CI and code review are pending.
The limits are safety bounds. They do not make interrupted database writes transactional. An operator must inspect a failed destructive operation before retrying it. The earlier physical site-rename rollback race remains a separate known issue; this PR does not claim to fix it.
023 · Review fixes and crash recovery checks
Pushed commits f901d1f8 and 7d9af4ce to Pilot PR 696. Three review findings exposed real recovery gaps. Cleanup now requires ownership written by the task that creates the site. This protects a site created by another task or the CLI while a queued restore waits. A replayed cleanup process records its identity before it starts changing data. A new worker stops that process before replay. An interrupted retry returns to a state that permits Retry and Restore.
The full Python suite passed 3,805 tests after these three fixes. A real process test kills the cleanup parent while its child waits on a file lock. The next worker stops the child and completes cleanup. No live database or production service changed.
A second review led to smaller fixes. Nginx setup and database restart now have the one-hour budget. Invalid deadline metadata logs an error without skipping process recovery. The Updates filter includes the completion task. All 362 task tests and 12 task display tests passed after these changes. Python lint, formatting, and the complexity check passed. The latest commits still need CI and fresh review.
The hard execution limit and user cancellation are separate controls. A destructive task rejects user cancellation but retains its 24-hour limit. Expiry can leave partial database changes. Source backups stay intact when cleanup removes a failed new restore site. Old tasks without a creation ownership record preserve their partial site for manual recovery.
The physical rename rollback race remains open. Returning the directory to its old name can leave a reader following a temporary self-link. A safe repair needs a stable storage path or a durable forward recovery design. Primary-domain attachment avoids the physical move on the signup path. No physical rename repair or 20-second cloud latency guarantee is claimed.
024 · Final local verification
The final full Python suite passed all 3,807 tests in 177 seconds at 7d9af4ce. The worktree is clean. All 15 review threads received a fix or a code-based explanation and were resolved. Fresh CI and automated review remain pending on Pilot PR 696.
The physical rename reader stress test passed 20 repeated runs. This result does not rule out the known rollback path race. It remains open. No production service changed in this audit pass.
025 · Corrupt record recovery and CI type fixes
The unit job failed its type check on two annotations. The local full test pass in entry 024 did not include that check. Commit a5fe6ac8 fixes both annotations. The full Python type check now passes on all 441 source files.
A new review found that a finished task with a corrupt process record could stop every worker cycle. Recovery now uses the guarded ownership check. Tests cover invalid JSON and missing identity fields, preserve the finished status, and verify that the next task can be claimed. Replay callbacks carry their task directory in the process command. If an identity record is corrupt but a matching callback is alive, recovery blocks until that process exits.
The callback runner now separates launch, wait, and cleanup. The complexity check passes with a limit of 8. Two browser tests load the task detail page and verify that a failure message appears only when failure details exist. Both pass. The UI type check passes.
Final verification passed all 3,810 Python tests in 172 seconds and all 365 focused task tests. Lint and formatting pass. The three new findings are fixed on Pilot PR 696. Fresh CI and review are pending. No production service changed. Physical rename rollback continuity remains open.
026 · Greptile review passes
Greptile reviewed commit a5fe6ac8 on Pilot PR 696 and raised its confidence score to 5/5. It confirms that all three prior findings are addressed. No review threads remain unresolved.
The unit check, including Python type checking, and the PostgreSQL end-to-end check pass. MariaDB end-to-end, integration, and Guard checks are still running. The PR remains open. No merge or production deployment was performed.
027 · Forward recovery for site renames
All four required checks passed for Pilot commit a5fe6ac8. The next commit, 245eb02a, is now pushed to Pilot PR 696. Its checks and review are pending.
The rename audit found that swapping directories back after failure can break readers that already followed the compatibility link. Pilot now keeps the forward move and a private recovery journal. Retry resumes the same rename. Both names stay reserved while recovery is pending. The replacement Admin token is reused on retry. Older links point directly to the current directory, and links for retained hostnames survive workload restart so queued jobs can still find their site.
All 3,825 local Python tests pass in 210 seconds. Real subprocess tests kill a rename before directory exchange and before nginx reload, then verify recovery. Concurrent readers, name reservation, primary hostname ordering, and private journal permissions are covered. Type checking passes for all 441 source files. Lint and formatting pass.
Central PR 568 submits the physical rename after signup commits. One five-minute loop observes pending tasks, saves status and completion time, and continues if one server is unavailable. Signup does not wait for submission or observation. All 15 focused naming tests and 31 routing tests pass on the local test site.
Deploy the Pilot rename fixes before the Central change. Central migration adds the status fields and scheduler entry. Existing accepted tasks without a tracking status stay unchanged. Failed or killed renames require an operator to retry in Pilot. No merge, production deployment, or production rename was performed.
028 · Certificate contact in VM bootstrap
Central did not send a certificate contact to Pilot. A later certificate request could fail because letsencrypt.email was unset. Commit 119eb09c in Central PR 568 sends the requesting user's email in pilot-common-config. Pilot's existing bootstrap saves it in common_config.toml. Telemetry failure does not remove the contact.
All five focused bootstrap metadata tests pass on the local test site. They cover the customer contact with telemetry available and unavailable. Lint, formatting, and the changed-file pre-commit checks pass. This applies to new VMs after deployment. Existing VMs keep their current setting. No production change or image rebuild was performed. Pilot PR 696 is left unchanged and monitoring is stopped at the user's request; its Guard findings remain unresolved.
029 · Certificate contact has a separate PR
Central PR 568 merged before the certificate contact commit was pushed. The certificate change is not included in that merge. It is now isolated on the merged develop branch as commit 281f5250 in Central PR 569. The source tree is identical to the tree used for the five passing metadata tests. The PR changes only contact metadata, its tests, and the integration specification. No production deployment was performed.
030 · Greptile rename test findings addressed
Greptile rated Pilot commit 245eb02a at 4/5. Its two comments were valid. The concurrent reader test retried one move instead of repeating directory exchanges. The test now performs 100 real exchanges through fresh names, with an interrupted attempt and successful retry for each name. It checks the original path continuously and verifies the database identity. A duplicated inline recovery comment was removed.
All 62 focused rename tests pass. Lint and formatting pass. The fixes are pushed as 6abf74ff to Pilot PR 696. Fresh review is pending. Four Guard findings were answered and resolved because the current control flow already handles them. The sudo timeout concern and boolean naming finding remain open. No production change was performed.
031 · Final update task logs stay visible
Guard withdrew its missing failure-callback finding. Its reply identified a separate log visibility bug: migration details skipped complete-migration because the backend label was missing. Commit d87aaf61 in Pilot PR 696 adds the label so operators can open the retained log as Finish update.
All nine migration API tests pass, including this task's log. Lint and formatting pass. Another Guard reply contained only unexecuted tool-call text and no new finding. The sudo timeout and boolean naming findings remain open. Fresh checks and review are pending. No production change was performed.
032 · Greptile returns to 5/5
Greptile reviewed 6abf74ff and raised Pilot PR 696 to 5/5. No Greptile review threads remain open. The newer commit d87aaf61 adds the final update task log label; its CI and review are still running. Two Guard findings remain open: sudo timeout handling and the boolean method name. No merge or production deployment was performed.
033 · Latest commit passes Greptile review
Greptile reviewed the current head d87aaf61 of Pilot PR 696 and retained its 5/5 score. No Greptile review threads remain open. Unit, integration, MariaDB and PostgreSQL end-to-end checks, and Guard are still running. The two existing Guard findings remain open. No code change was needed for this review. No merge or production deployment was performed.
034 · Skip certificates for proxy-terminated wildcards
Pilot already excluded private local names and routes that explicitly terminate TLS at the edge. Older sites could still have ssl=true without route metadata, and the daily timer ran an unfiltered host-wide renewal. Pilot now uses bench-domain-provider wildcard-domains to exclude those proxy hostnames from certificate requests, renewal, email requirements, and expiry alerts. Explicit HTTPS origin routes still need local certificates. The local-name exclusions remain in place.
The daily timer refreshes each bench's current local certificate domains, then publishes nginx under the site rename lock. Mixed sites retain their custom-domain certificates while dropping proxied names from the requested certificate coverage. Proxy-only domain changes queue nginx work. The implementation uses Certbot's named-certificate domain update support. Existing certificate files are retained. A separate OS-level Certbot timer keeps its own configuration.
The full local Python suite passed all 3835 tests. After adding serialization with site renames, all 131 focused TLS, setup, domain, and API checks passed again. Type checking passes on 442 source files. Lint and formatting pass. Pilot PR 696 merged; this change is isolated on its merged develop branch as 61dddbf8 in Pilot PR 697. Fresh CI and review are pending. No production deployment or certificate request was performed.
035 · Isolate provider failures during certificate maintenance
Greptile rated Pilot PR 697 at 4/5 and identified two valid issues. The provider lookup ran before explicit route checks, and a failed lookup could stop maintenance on later benches. Expiry selection also exceeded the review complexity limit. Commit 72048c14 fixes both findings.
Private names and explicit route policies now make no wildcard-provider request. The daily runner logs refresh and expiry-check failures separately for each bench and continues. Certificate file selection is separate from expiry evaluation. All 136 focused checks pass, including a real multi-bench test in which the first bench's provider fails and the later bench still requests its explicit HTTPS origin certificate. Type checking passes for 442 files. Lint, formatting, and the explicit complexity check pass. Both review threads were answered and resolved. Fresh review and CI are pending; the 5/5 target is not yet confirmed. No production change was performed.
036 · Proxy TLS review reaches 5/5
Greptile reviewed the latest commit 72048c14 in Pilot PR 697 and raised its confidence score to 5/5. It confirms that both previous findings are fixed. No review threads remain open. The unit check passes; MariaDB and PostgreSQL end-to-end checks and the integration check are still running. The requested Greptile review work is complete, and monitoring is stopped for handover. No merge or production deployment was performed.