Ghost FTP by Brendigo — 0.99.83 Preview
Status: development candidate; not published. Previous public release: v0.99.82, published 23 November 2026. Date: 24 November 2026.
Sites and connection workflow
- Connected filter reflects real session profile identifiers, and Open session focuses a live connection instead of opening a duplicate.
- Clear search, reset filters, result counts and editable site names make saved-site management faster.
- Natural sorting, consistent category counts and finite last-used timestamps are shared read-only selectors. Credentials are excluded from search.
- A synchronous action guard prevents overlapping Site Manager profile mutations. Password visibility is scoped to the displayed draft; switching sites clears visibility and metadata editing. Deletion rechecks live sessions before proceeding.
- Responsive header and search, keyboard focus outlines, accessible icon controls and sort-direction labels improve the existing branded interface.
- Regression checks cover selector behavior, privacy, invalid dates, connected filtering, and wiring.
Follow-up audit and CI repair
- P1 (Agent config staging): a failed exclusive open previously entered the generic cleanup path and could unlink a staging file not owned by that writer. Open before cleanup ownership begins; close the owned handle before rename. Regression tests preserve existing configuration and foreign staging bytes and verify a later save succeeds.
- P2 (Sites): selected and draft profile IDs must match before rendering connection details or revealing a password. Prevent stale-draft saves and editing fields during a native mutation.
- P2 (Linux matrix): update the source contract to verify the extracted production selector and its real row wiring rather than requiring inline filtering in the dialog. Existing keyboard, deletion, native visual and protocol checks remain intact.
The Agent quota, admission lock and per-controller cap were already present; no duplicate fix is claimed. Native GUI acceptance and production signing remain separate gates.
Agent configuration validation
- P1 (availability / configuration integrity): enforce the 1 MiB input limit on actual reads, not only the pre-read metadata. Reject non-regular opened files and distinguish missing paths from inspection failures. A dangling symlink is no longer treated as a missing configuration.
- Validate the existing 128-peer and 1 MiB limits before staging a new configuration so an invalid save cannot replace a previously readable configuration.
- Added regressions for oversized input, rejected saves preserving original bytes, and dangling symlinks on Unix. Source change: 49169d0. Exact-head CI and native acceptance are pending. These changes do not establish full race-free filesystem access or parent-directory containment.
Unix configuration file opening
- The config reader now opens the final pathname component with no-follow and nonblocking flags on Unix, then validates the opened handle as a regular file. This closes the final-component symlink follow and FIFO blocking gaps between the preflight metadata check and open.
- Added two Unix regressions that exercise the actual open helper without relying on the preflight check, and isolated the legacy migration test in a unique temporary directory. Source: 5092242.
- Windows handle-level reparse-point checks, parent-directory races, hard links and actual Windows Scheduled Task stop verification remain open. No claim of complete filesystem hardening or native acceptance is made.
Transfer staging integrity
- P1: the shared download durability check now validates type and exact byte length on the opened handle, rather than relying only on an earlier pathname inspection. On Unix the open rejects final-component links, is nonblocking, compares device/inode and refuses additional hard links. On Windows it opens reparse points without following them, rejects reparse attributes and checks creation/write timestamps.
- Existing no-replace promotion, original-file backup and rollback behavior remain unchanged. Added a Unix regression ensuring a hard-linked delta staging file cannot replace an existing destination and unrelated bytes remain untouched.
- Source: ad88d96. Native CI remains required. Windows timestamps are not a unique file identity; Windows hard-link checks, parent-directory containment and the race between verification and pathname-based promotion remain open. FTP server-side atomic replacement limitations are unchanged.
Follow-up: Windows hard links and Linux directory handles
- Windows staging verification now checks the actual opened file's hard-link count using GetFileInformationByHandle and rejects any count other than one. The existing hard-link regression now covers both Windows and Unix. c816a04.
- All shared staging durability checks re-inspect the pathname after syncing. Unix checks the device, inode and link count again; Windows checks reparse attributes and timestamps. This narrows but does not eliminate the verification-to-promotion race.
- Linux no-replace sibling moves use a single pinned directory descriptor and renameat2, including backup/restore moves. O_PATH avoids requiring directory read access. A regression replaces the parent pathname after opening the directory and verifies the operation stays within the pinned directory and does not overwrite an occupied target. 3bffcf9, 40d66fb.
- Remaining: a single trusted directory handle throughout the full transfer/promotion/rollback lifecycle, safe Windows directory-handle-relative promotion, Windows file identity checks beyond timestamps, and source-entry substitution after verification. Native CI must verify these changes before publication. No claim of complete TOCTOU protection.
Follow-up: Windows file identity and release README contract
- The Windows staging verifier compares volume serial and file index from the original handle and a reopened, no-follow handle after synchronization, checking hard-link counts and reparse attributes on both. Added a native Windows regression for stable identity across opens and distinct identities for equal-length files. 23216e4. The final pathname-based rename is still a separate operation; full TOCTOU protection and Windows handle-relative promotion are not established.
- The release-index test failed on README label/version text after marketing edits. Restored the exact catalog link and current/previous Preview wording; all five assertions for the affected test were checked against the revised text and version metadata. All original image references were preserved; the test itself was not weakened. 227f74e; failed CI job. Full CI and native verification of the new head are still required.
Linux pinned overwrite transaction
- Linux sibling overwrite promotion now pins one directory descriptor for the entire final transaction. Entry inspection uses fstatat with AT_SYMLINK_NOFOLLOW; backup, promotion and rollback use renameat2 relative to that same descriptor, and backup cleanup uses unlinkat after a file-identity check. Uncertain recovery entries are preserved rather than knowingly restored or deleted. Existing backup collision and no-overwrite behavior is retained.
- Added a regression that replaces the original parent pathname after pinning and verifies promotion and cleanup do not modify the replacement directory's destination or backup. e9da28f, 9d32bf7.
- Repaired both formatting differences reported by the Rust workspace job; the formatting gate is unchanged. The new source still requires exact-head verification.
- Limits: the descriptor is pinned at final promotion, not at the start of the network transfer. Initial parent resolution, same-directory entry substitution between metadata and mutation, failed-transfer staging cleanup, Agent delta replacement and Windows handle-relative promotion remain open. No claim of complete TOCTOU protection or native acceptance.
Download parent lifetime and Agent integration
- DownloadParentGuard keeps an open directory handle from worker admission across retries, completion and cleanup. Linux compares device/inode; Windows compares volume serial/file index from open directory handles. A detected parent change stops the worker and avoids pathname-based cleanup in the changed directory. A cross-platform regression replaces and restores a parent and checks detection.
- Linux whole-file overwrite and no-replace promotion reuse a cloned original descriptor in the blocking commit worker; the clone stays alive even if the async caller is aborted. Agent full-download promotion also uses its initially opened descriptor. Agent delta verifies parent identity before basis inspection, patch creation, reassembly, commit and cleanup; fallback checks the original parent again.
- No /proc/self/fd path is passed to backend I/O: canceled async tasks may leave blocking workers running, so such paths would risk descriptor-number reuse. Existing network backend writes, some cleanup, and delta atomic rename still use pathnames. Same-directory entry substitution and changes during a path-based operation remain possible. Windows final handle-relative rename remains open. No full TOCTOU or native acceptance claim.
- Repaired three Rust formatting differences from Rust workspace CI; formatting gate remains unchanged.
- Source: 035eea6, 8eebc39, aa8795f, 3818fd6. New exact-head CI is required before publication.
Resumable download staging handles
- SFTP and Agent download resume now use a shared non-truncating read/write staging open. Unix rejects final-component symlinks and non-regular files, avoids blocking on FIFOs and checks the open file's hard-link count. Windows opens without following reparse points and checks the opened file's type, reparse attributes and hard-link count. A rejected open is classified as unowned so generic cleanup does not remove it.
- Both download paths reuse the validated file handle for prefix verification, resizing, seeking and streaming instead of reopening the pathname between verification and truncation. The existing Agent upload prefix wrapper remains in use. Added Unix symlink and Windows/Unix hard-link regression tests protecting original bytes and the rejected staging entry.
- Repaired the actual Rust formatting differences reported by CI; the gate is unchanged. Source: cebdbdf, 2fc7ff2.
- Limits: an existing ordinary staging file is still accepted for resume/restart; ownership across worker lifetimes is not yet authenticated. Parent-relative opening, source-entry substitution before promotion, full Agent delta handle-relative I/O, Windows native handle-relative rename and ownership-safe cleanup remain open. Exact-head compilation and native tests are required.
Verified file identity at final promotion
- The shared durability verifier returns its still-open staging file. The main download worker carries that handle into promotion rather than discarding it, and Agent full download hands over the actual synced writer handle. Linux holds a cloned file handle and the originally pinned directory descriptor together in the blocking promotion worker. Device, inode, link count, regular-file type and size are compared with the pinned entry before moving the original and again before publishing the stage. Windows compares the live handle with a reopened no-follow staging handle before the existing pathname-based move.
- Agent Skip/Rename cleanup checks the retained file identity; on Linux it inspects and unlinks relative to the original directory descriptor. A failed durability/identity check no longer triggers automatic pathname deletion by the main worker. Added a Linux regression substituting an equal-length stage after verification, then checking that promotion and cleanup preserve the original destination, the replacement entry and the verified data.
- Repaired two reported Rust formatting differences from CI. Source: c8b2153, 248f5c5, 76488f7.
- Limits: ordinary protocol stages are reopened for durability verification, so the original writer identity is not yet established for every backend. Linux name-based rename/unlink still has a same-directory check/use race, and the live inode can still be modified. Windows native handle-relative rename/delete, complete Agent delta ownership and cleanup, and the earlier parent-relative open gaps remain open. Failed verification can intentionally leave a staging entry for recovery. Native and exact-head CI remain required.
Original download writers and delta output hashing
- The 12 non-Agent download adapters (FTP/FTPS, SFTP, S3/object, WebDAV, HTTP, Dropbox, OneDrive, Google Drive, Box, Shopify, HubSpot and Dynamics) now return their original open writer on successful completion. FTP/FTPS returns the file from its blocking buffered writer. The common runner checks the actual writer's byte count and synchronizes it, then passes it to the existing parent-guard promotion. It no longer reopens the staging pathname to obtain the verification handle. Agent full download already passes its writer.
- Updated the source-level security guard to require writer verification, synchronization, FTP handle handover and writer-bound promotion. Added a Windows/Linux regression for an equal-length substitution of the staging name, including a mismatched-byte-count check; no new test dependency.
- The shared Agent delta reconstruction now reads the whole-file BLAKE3 hash from its own read/write output handle, after flushing, syncing and rewinding, instead of reopening the output pathname. The public apply_delta API remains unchanged.
- Source: d5d5731, d7eeb67, ebffb5b, 9e2bb37, 4c6a274.
- Limits: unsuccessful/canceled workers do not yet return authenticated ownership handles for every stage; cleanup remains partially pathname-based. Windows promotion still reopens the entry to compare identity and uses pathname rename. Delta output's handle is not carried into its final promotion, and patch/basis access remains path-based. Linux still has name-based check/use races. Exact-head CI and native validation are required.
Agent Delta retained output and guarded commit
- The shared protocol library exposes apply_delta_open, returning its original exclusively created, BLAKE3-verified file; the existing apply_delta API delegates and retains its result type. Desktop Agent Delta now passes that file through writer durability verification and guarded atomic promotion. On Linux the original directory descriptor is cloned into the blocking commit, with entry identity verified and renameat used for atomic replacement (no missing-destination backup gap); absent targets use no-replace.
- Delta patch and successful reconstruction output cleanup use retained handles and identity checks. The previous delta commit regression tests now exercise the production guarded promotion; added a cross-platform equal-length stage substitution test. Updated source-level security requirements to cover the new production path without dropping byte, hash, and no-replace safeguards.
- Repaired Rust formatting differences reported by CI. Source: 1ac5e69, 8d44c1a, 6e7e8ca, cb736de, e00faee, df21305.
- Remaining: Windows native handle-relative rename/delete, authenticated ownership during every failed/canceled worker, path-based patch/basis opening and failed reconstruction cleanup, Linux same-directory entry races and complete parent-relative opening. Native tests and exact-head CI are not yet verified; no release acceptance claim.
Windows native no-replace rename and stage ownership
- Windows guarded no-replace promotion (including the missing-destination Delta case) obtains DELETE access to the original verified object through ReOpenFile, and invokes SetFileInformationByHandle with FileRenameInfo, a simple UTF-16 basename and the retained directory handle as RootDirectory. Verified cleanup uses FileDispositionInfo instead of pathname deletion. No pathname-based fallback is used for these native operations. Added a native Windows regression for collision preservation, actual rename and disposition. Microsoft API references: FILE_RENAME_INFO, ReOpenFile, SetFileInformationByHandle.
- DownloadStageOwner records a live cloned handle after exclusive creation, including in the blocking FTP worker. The 12 ordinary protocol adapters and Agent full download now use recorded ownership for failure cleanup. The SFTP worker retains its ownership record across in-worker retry; already-existing stages do not confer ownership simply by being opened. Unknown or substituted entries are preserved. Added a cross-platform regression that verifies both rejection of an unowned collision and removal of an exclusively created stage. Updated the static security contract for the new path.
- Source: 6d49f64, 5a83ca5, 9c1fd00, 8acb5c7, 8097458.
- Limits: Windows native replace/backup/rollback for existing targets, native API support on target filesystems and all native tests remain unverified. A forcibly aborted task or process can leave its stage for later recovery; there is no persistent authenticated ownership ledger. Existing resumed regular stages can still be written through a path-based open, Linux same-directory checks and unlink/rename remain separate operations, and parent-relative opening is not complete. Agent Delta failure before output handoff and upload cleanup remain outside this change. Exact-head CI, native Windows/Linux testing and release acceptance are outstanding.
Native overwrite/rollback and Linux pinned stage creation
- Windows guarded promotion uses a native relative NtOpenFile (single validated basename, original directory RootDirectory, open-reparse-point and non-directory flags) to inspect the stage and existing target. Standard overwrite preserves the original using its own DELETE-access handle, moves the verified stage without replacing a collision, restores the original using the same handle if publication fails, and marks that original backup for deletion by handle after success. Existing recovery backups are never overwritten. Delta uses native handle rename for atomic replacement after target inspection, or no-replace for a missing target. Existing multi-link or reparse targets are refused. Native API references: NtOpenFile, FILE_RENAME_INFO.
- Windows verified cleanup now checks the entry through the pinned directory, obtains DELETE access to the original object and rechecks its identity. Added native overwrite/backup collision and forced rollback tests.
- Linux DownloadStageOwner retains the original directory descriptor; exclusive stage creation for whole-file adapters (including the blocking FTP/FTPS worker) uses openat with O_CREAT, O_EXCL, O_NOFOLLOW and O_CLOEXEC. FTP continues to reject unverified ranged resume. Added a regression that replaces the parent pathname and verifies the new file is created only in the original directory, without modifying the replacement. Updated the source-level audit contract; required text checks for the two changed transfer files were reviewed without missing entries.
- Fixed the exact Rust formatting difference from quality CI. Product + compatibility tooling passed on eb74847, but Rust and Windows hardening failed formatting on that same older commit. New native compilation and tests are not yet verified.
- Source: 955bf51, 25aafde, ee3592e, 6062fa1, 8c15270, 4cfa898, 989421f.
- Limits: persistent authenticated ownership ledger and cancellation/crash recovery are not implemented. Windows stage creation, resumable SFTP/Agent opening, and some delta/remote staging operations still use pathnames. Linux same-directory source-entry replacement races remain. Windows delta target inspection and atomic replacement are separate operations; ordinary backup transactions have a temporary missing-target interval and a crash can strand the backup. Native NT ABI, permissions, sharing, filesystem compatibility and tests need Windows verification. No claim of full TOCTOU protection, full audit or verified release.
Durable overwrite recovery intents (phase 1)
- Forward-only SQLite schema v9 adds a separate download_recovery table with insert-once records, a 64 KiB per-record limit and no transfer-history pruning. SQLite synchronous FULL is explicitly configured. The Windows and Linux native overwrite transactions persist a versioned record before the first backup rename, including absolute path hints and the original directory, stage and destination file identifiers and file sizes. Persistence failure stops the backup transaction. Successful backup cleanup attempts to clear the intent; errors and uncertain cleanup preserve it.
- Desktop transfer workers receive the shared database; startup logs the presence of unresolved records without exposing filenames, and a new worker with the same transfer ID fails closed when a pending record exists or loading fails. Existing records do not authorize automatic filesystem changes after restart. This is a conservative recovery journal foundation, not yet an authenticated crash recovery engine.
- Added tests for database reopen, duplicate-record refusal, independence from history pruning and backup-collision preservation with retained recovery evidence. Source-level audit guards for the changed transfer files were checked for presence. The exact previous Rust formatting failure is addressed (CI).
- Source: 9b81b53, 447c1ef, 31467fd, 22bb9fa, 4de23ac, 3a14838.
- Remaining: persistent authentication of stage ownership across process death, transaction phase reconciliation and user-visible recovery resolution, safe automatic rollback after crash, directory-entry durability under power loss, conflicts from different transfer IDs, Windows relative creation, SFTP/Agent relative resume, cancellation cleanup, and remaining TOCTOU races. File IDs can be reused and path hints are not authority. Unresolved records can require manual inspection even if no backup rename occurred. The journal does not automatically delete or restore anything on startup. Full audits, compilation, native tests and release acceptance remain unverified.
Recovery state machine and destination reservations (phase 2)
- Forward-only SQLite migration v10 adds persisted phases prepared, backup_saved, promoted, rollback_pending, rolled_back and cleanup_pending. Existing v9 records retain legacy_unknown; they are not treated as new transactions. Compare-and-set transitions require the expected prior phase and an allowed edge. Intent deletion requires cleanup_pending. Rollback completion stays recorded for review rather than authorizing an unverified stage cleanup.
- Linux and Windows native backup transactions persist phase transitions around backup, promotion, rollback and backup deletion. If publication succeeds but subsequent phase persistence fails, the backup and intent are retained. If persistence fails before publication, the operation stops and leaves recovery evidence. Phases describe the last recorded event, not an authoritative current filesystem snapshot: a process can stop between filesystem mutation and its database update.
- A unique SQLite destination reservation key derived from the pinned directory identity and target basename prevents conflicting journal insertions. Normal and Delta promotion reject already-known pending destination keys. Windows key case folding is conservative; aliases and filesystem-specific equivalence are not fully resolved. Preflight checks alone do not serialize every possible concurrent operation; no claim of complete destination locking.
- Added Rust tests for v9 migration, refusal of legacy journal conflicts, valid and stale transitions, reopen after each phase, reservation collisions, and protection from ordinary/Delta promotion with a different transfer ID. A local standalone SQLite SQL smoke test (not the Rust application suite) passed unique key, persisted phase, stale compare-and-set and cleanup-gate checks. All 40 required source-text markers in the changed staging/database audit groups were present. Prior CI was superseded/canceled; exact-head native and Rust tests remain unverified.
- Source: 05fdbe8, ca865e9, 7ec64a3, e9f1ac3, d2ad10c, 4488168.
- Remaining: authenticated ownership across restarts, reconciliation of journal and filesystem after actual process termination, crash-safe directory durability, explicit review/resolution UI (including legacy and rolled-back records), safe automatic rollback, full destination locking, Windows relative creation and handle-relative SFTP/Agent resume. Database reopen tests are not kill-process tests. No release acceptance or complete security audit claim.
Read-only recovery reconciliation (phase 3)
- The startup recovery worker reads a bounded snapshot (128 intents, plus a truncation indicator; payloads capped at 64 KiB) of the last persisted phase and immutable intent. It verifies the schema, sibling layout, distinct names and recorded parent identity before inspecting entries relative to the opened directory. Linux uses fstatat without following final-component links; Windows uses the native relative open and verifies file identity, type and link count. The stage, original and backup are classified twice; a differing observation is ambiguous. Windows UNC/device namespace paths are not automatically inspected.
- The classifier distinguishes original present, backup present, published with backup, published without backup, original without stage, backup without stage, ambiguous and unavailable. Recorded phase and observed layout remain separate; mismatch does not authorize a phase change. The desktop startup schedules read-only diagnostics away from the main window and logs aggregate matching/divergent/uncertain counts without filenames. No file data is read, no journal is advanced, no file is restored or deleted.
- Added tests of layout classification and real temporary-file rename sequences, including equal-length substitution and preservation of contents. These tests model crash windows; they do not kill the application process. Fixed 16 exact rustfmt hunks from CI and repaired two whitespace-sensitive audit assertions; all 48 source markers in the changed staging/database audit groups are present. Native execution and exact-head compilation are not confirmed.
- Source: c76f625, dd797e6, 6622e8a, d9fdc68, 02ec587, e60c2d9, 06d6ddc, f6a8b64, f92d830.
- Remaining: file identifiers may be reused, equal-length in-place edits are not detected, two scans are not an atomic snapshot, filesystem aliases and mapped or mounted remote volumes remain possible, and startup results can become stale while other workers run. No persistent cryptographic ownership authentication, automated rollback, recovery UI, complete reservation coverage, kill-process tests or release acceptance yet. Observations are diagnostics, never authority for destructive operations.
Authenticated recovery intents and advisory decisions (phase 4)
- New overwrite recovery intents attempt to authenticate the exact immutable JSON payload and transfer ID using AES-256-GCM with a fresh 256-bit OS-random key, random 96-bit nonce, domain separation and a random per-intent key identifier. The existing persistent OS credential vault stores the key under a separate service; the key is read back before the signed envelope is written to SQLite. No new dependency is introduced. The payload remains plaintext; this is authentication, not confidentiality.
- The bounded startup snapshot now includes the transfer ID. Recovery reconciliation verifies the envelope before inspecting its path hints. Missing vault keys, locked vaults, unsigned legacy records and modified envelopes require manual review and are not automatically inspected. If signing is unavailable at creation, the existing ordinary overwrite operation retains its unsigned recovery intent rather than disabling transfers; it has no automatic recovery authority. Completed signed intents attempt key deletion only after the journal row is removed.
- The decision classifier marks observed backup layouts as rollback candidates, published-with-backup layouts as cleanup candidates, recognizable safe layouts as inspect-only, and ambiguous/unavailable/unauthenticated layouts as manual review. These are advisory classifications; no recovery mutation is executed. Added tests for modified payload, ID, key, tag, nonce, key identifier and unauthenticated decisions. Fixed four exact rustfmt hunks from CI. All 54 required source markers in the changed staging/database groups were checked for presence; this is not a functional audit.
- Source: 9fded24, c83aac6, 5832d5e, c46de8b, 4de5cf0.
- Remaining: the mutable SQLite phase and reservation key are not authenticated, same-ID replay is not prevented, file contents and persistent ownership are not cryptographically proved, and lost or copied vault/DB state requires review. Per-intent credential entries can be orphaned after a crash or failed database write; bounded authenticated key lifecycle reconciliation is still needed. Automatic verified rollback, UI, complete interprocess reservation, actual kill-process tests, full audits, native vault verification and exact-head compilation remain outstanding. No claim of a verified release.
Repository administration blocker
Verified on 24 November 2026: the GitHub main branch reports protected=false and the repository ruleset listing is empty. Administrative branch/ruleset write access is not available through the current connector. A repository owner must require pull requests, required successful checks for quality/Rust/native Windows/native Linux/real protocol E2E/Windows hardening, up-to-date branches and restrictions on force pushes/deletion of main; add tag update/deletion restrictions for published version tags. Preserve the existing exact-SHA publication and immutable release checks. This does not certify repository administration as hardened.
Release gates
Requires successful exact-source frontend, Rust, Windows and Linux native packaging, security and dead-code checks and real FTP/FTPS/SFTP regressions. Preview is not a signed production Stable release. The GitHub Releases catalog is authoritative for publication.
Authenticated content and recovery phase chain
- Recovery schema 2 binds full SHA-256 digests of the original and stage to the authenticated transfer intent, native file identities and sizes. A backup made by renaming the original is checked against the original digest during reconciliation. Hashing uses positional, bounded-buffer reads. Linux prefers the retained verified writer; a write-only writer requires a directory-relative read handle verified against its identity. Windows uses native relative opening and an object-bound ReOpenFile read handle. No sampled digest is accepted.
- Startup reconciliation rejects missing content evidence or phase chains and mismatching reservations before inspecting files. Its total estimated content-read budget is 64 MiB; larger records are left for manual review, not treated as verified. The existing advisory recovery decisions do not authorize mutation.
- Each authenticated phase carries a sequence and the preceding tag, linked to the immutable intent tag and authenticated with AES-256-GCM. SQLite updates phase and envelope in one compare-and-set statement that also matches the prior payload and destination reservation. Signed transactions do not silently downgrade if their vault key becomes unavailable. Transactions that began without an accessible vault remain unsigned/manual-only on restart.
- Regression coverage added for equal-length stage and backup changes, malformed or reordered phase chains, cross-transaction reuse and stale SQL envelope/reservation updates. Source: 4cd5fb2, 5ecb65c.
- Limits: full-database replay of a valid prefix with the matching vault key is not prevented. Timestamp checks do not provide a locked snapshot or proof against a concurrent writer. Linux same-directory entry mutation races remain; the live rollback and backup-deletion paths still require digest revalidation immediately before mutation. Agent Delta atomic replacement is not yet integrated with this ledger. There is no automated destructive startup recovery or cross-store atomicity claim. Native tests, compilation, crash/kill-process coverage, performance benchmarks and exact-head CI remain required before release.
Independent recovery anchor and pre-mutation verification
- An AES-256-GCM authenticated commitment to the exact serialized phase envelope is stored in a distinct OS vault service per transaction key ID. The active anchor is written and read back before the SQLite phase CAS. A stale envelope, missing anchor, unavailable vault or interrupted cross-store update cannot authorize reconciliation. A terminal commitment is stored before deleting a completed SQL row; the anchor is removed only after key deletion succeeds.
- The live Windows and Linux journal-backed rollback and backup cleanup paths recheck the anchor, exact SQL row, pinned parent identity and full backup digest; cleanup also checks the published file digest. Unsigned transactions may publish, but cannot automatically restore or discard their backups. This can leave a destination reserved until manual review; a recovery UI is still needed.
- The pure anchor regression rejects old envelopes, a different transaction and terminal replay. SQL tests exercise stale-state checks. Existing source-level audit contracts are updated to require the new native handle access, phase checks and anchors rather than obsolete call signatures. Rust formatting corrections follow the actual failed quality job.
- Limits: no atomic OS-vault/SQLite commit, no global vault index detecting deleted SQL rows or new transactions after database rollback, no protection from restoring both stores or privileged vault tampering, no complete filesystem locking or same-directory TOCTOU solution. Non-journal and Agent Delta paths are not covered by these new gates. Native vault failure injection, crash/restart tests, compilation and exact-head CI remain required.
Global authenticated recovery index and process coordination
- A compact AES-256-GCM authenticated index in the persistent OS vault is scoped to the canonical app data directory. Its independent key is stored under a separate service. Each entry commits to the exact transaction ID, phase, destination reservation and signed SQLite envelope via SHA-256. Generation increments are authenticated. Recovery credentials use strict persistent reads without Linux legacy keyutils fallback.
- Under a native exclusive file lock, startup compares the index with SQLite and counts missing, unindexed and divergent entries. Any mismatch or unavailable vault defers filesystem inspection. Promotion and Agent Delta destination preflight also check the index and retain the lock through the native commit worker, including async cancellation. Delta does not yet journal its own atomic replacement.
- New journal transactions commit the index first, the per-transaction anchor second and the SQL row last. A phase transition uses the same order and exact SQL CAS. Completion retires the transaction anchor, deletes the SQL row, updates the index, then removes per-transaction credentials. Interrupted writes are recognized as inconsistencies; no unverified data is reconstructed or deleted.
- The index deliberately limits active entries to eight to fit the conservative Windows credential size budget. Overflow, uninitialized index with existing legacy rows, missing key/index half, locked vault and process-lock contention fail closed. All DB-backed download publication may be blocked until the vault or inconsistent ledger is resolved. This is a change in availability behavior; manual recovery tooling and safe legacy migration are still required.
- Added regression tests for index mismatch categories, malformed and tampered envelopes, cross-scope reuse, lock contention and release after forcibly killing a real child process. Native execution is still pending. The existing backup collision test distinguishes unavailable-vault refusal from actual journal-backed collision coverage.
- Scope limits: trusted persistent vault and canonical app data directory, cooperative processes on supported local filesystems, no simultaneous rollback of vault and SQL, no protection from a privileged process replacing the lock path or both stores. The digest index identifies inconsistencies but cannot reconstruct missing paths or complete interrupted transactions. There is no automatic destructive startup recovery. Full native test and exact-head CI are release prerequisites.
Sharded authenticated recovery ledger and redundant records
- Schema v2 stores an authenticated root manifest with up to sixteen immutable eight-entry shards, increasing the active-record capacity from 8 to 128 (the current bounded SQLite snapshot). Content-addressed vault blobs use 720-byte chunks, a verified length marker written last, strict reads and a complete SHA-256 digest. The root is published only after the record and referenced shards are staged. Existing v1 indexes migrate on a write only after every SQL record and its per-transaction anchor match; divergent legacy records require review.
- Full redundant metadata (transaction ID, signed phase envelope and reservation) is retained outside SQLite. Startup reconciliation and mismatched promotion preflight can restore an absent SQL row without overwriting an existing ID or destination, or advance an exact immediately preceding signed phase using the existing CAS. A prepared record whose anchor was not yet written may establish that anchor under the trusted manifest; a noninitial phase may only advance from its exact authenticated predecessor. A terminal anchor permits retirement of the matching cleanup-pending SQL row and index entry; never resurrect a terminal row.
- Unindexed rows, malformed chunks, missing record evidence, unrelated or more-than-one-step stale phases, unknown anchors and conflicting reservations fail closed. This repairs metadata only; no automatic file rollback, deletion or publication is performed. Per-file inspection remains separately bounded. The root and vault are the trust boundary, not a separate physical backup; simultaneous rollback of both stores is not prevented.
- Regression tests added for 128-entry shard round trips, duplicate shards, root size, anchor transition recovery, missing-anchor refusal and non-overwriting SQL restore. Tests do not yet demonstrate native vault durability, complete fault injection at each boundary, or full process-crash filesystem recovery. Immutable obsolete blobs and retired credentials are retained pending a verified garbage collector; storage usage and native performance must be tested. The 128-record ceiling remains intentional, not unlimited capacity.
- Prior Windows rustfmt failures were corrected using the actual CI diff; all source-level audit gates remain enabled. Exact-head Rust compilation, Windows/Linux native tests and release gates remain pending.
Verified recovery garbage collection and fault injection
- An authenticated bounded candidate queue (four pages, twelve blob candidates per page) registers immutable blob ownership and exact length before staging each object. Previous root references are registered before replacement. Under the interprocess lock the collector reloads the current authenticated root, checks SQL and per-transaction anchors, validates reachable objects and removes only registered unreachable blobs. Complete blobs are digest-verified before removing their length marker; the authenticated candidate then permits idempotent chunk cleanup after interruption. Unknown unregistered credentials are not swept.
- A separate authenticated queue (32 key IDs) records per-transaction keys before creation and again before terminal retirement. Only keys absent from the verified active ledger are removed, key first and anchor second, with strict persistent-vault readback. A crash after key creation or between key and anchor removal can be retried. Existing historical unregistered blobs/keys from earlier builds are intentionally not deleted.
- A test-only file-backed credential adapter supports process-kill fault injection with real SQLite, recovery locking and native Linux/Windows promotion calls. It is not a production configuration option. The matrix contains 30 selected durable boundaries, including key registration/creation, partial blob staging, root publication, prepared/advanced phase commits, native backup rename/publication/deletion, terminal retirement and partial GC. Restart checks include idempotent metadata reconciliation, active-object retention, actual absence of unreachable registered chunks/keys, and preservation of unrelated/user data except deliberately completed backup deletion.
- Separate regression checks reject a tampered GC page and preserve an unrelated vault entry. Prior CI-reported formatting differences were corrected; the security audit now requires the new collector and fault-test wiring. No test or release gate was disabled.
- Limits: test-only vault is not native Credential Manager/Secret Service, so physical vault durability, power-loss and arbitrary intra-write crashes remain unverified. The fault matrix is not exhaustive (initial index bootstrap, rollback branch, legacy migration and native vault failures still need dedicated tests). Large live-ledger verification and repeated vault operations require native performance testing. Existing unregistered objects are preserved; the queues bound pending registered garbage, not total historical vault size. Filesystem TOCTOU, Agent Delta integration and actual automated file recovery remain separate tasks. Exact-head CI and native execution are required before release.
Native vault durability, rollback crash matrix and reduced write amplification
- Native test mode uses the actual production credential adapter (Windows Credential Manager or Linux Secret Service), never the file-backed test vault. Each test has an isolated UUID-named data directory, unique scoped accounts and a durable test-only ownership registry for cleanup. Explicit mandatory native CI steps run the ignored-by-default native test on both platforms; Linux starts a separate D-Bus/keyring session. An unavailable native vault is a test failure, not a skip.
- Eight native process-kill checkpoints cover transaction key creation, prepared manifest, phase SQL commit, terminal anchor, key retirement and three rollback boundaries. The isolated file-backed matrix is extended by seven rollback checkpoints (37 total). A test-only promotion failure activates the real guarded rollback path; the parent checks the authenticated phase and exact original/stage/backup namespace after restart. No runtime switch enables fault injection in production.
- Existing identical immutable chunks no longer need a duplicate readback; newly written values still require readback. Shard updates reuse unchanged authenticated shards after verifying their content, register only superseded shards for GC and stage only new shards. This reduces redundant vault calls without weakening the current root, SQL or GC verification. Each crash case reports elapsed time; measured native latency and throughput comparisons remain pending.
- This suite tests process death and cross-process persistence, not a real system reboot, disk power loss, native service crash or arbitrary interruption during OS credential writes. Actual native CI success is required before claiming durability. Test credential cleanup on a failed assertion and complete historical garbage accounting remain follow-up work. No automatic destructive startup file recovery is enabled.
Vault service restart and filesystem durability barriers
- SQLite FULL synchronous mode is verified after configuring WAL. A private initialization sentinel is synced before first vault bootstrap; loss of both root and key in an initialized profile refuses automatic reinitialization, even if SQLite is empty. An interrupted first bootstrap or damaged sentinel needs manual review. The sentinel is a denial guard, not an authenticated anti-rollback root.
- Linux journal-backed promotion syncs original/stage data and the pinned directory before creating intent. Directory entries are synchronized after backup rename, publication, rollback and backup removal before advancing the corresponding durable phase. An uncertain sync preserves evidence. Four Linux-only process-kill checkpoints cover these barriers. Windows retains the existing file flush and handle-based namespace operations; directory/power-loss equivalence is not established.
- Linux CI restarts the disposable GNOME Secret Service daemon by killing only its verified same-session D-Bus owner, unlocks the same isolated keyring and verifies authenticated recovery metadata from a new process. Windows CI checks native cross-process persistence, not restart of Credential Manager. No host service is restarted on Windows.
- Native manifest benchmark writes and reads authenticated sharded indexes with 1, 8, 32 and 128 synthetic commitments, reporting write time and five-read median/max microseconds. This measures manifest I/O, not full transfer or filesystem recovery. Actual measurements require successful runner execution.
- The thirteen previous Rust formatting differences were applied from real CI output. Full power-loss testing requires a disposable VM or physical test system with controlled hard reset and verified storage semantics; process and service kills do not establish it. No release is authorized before all required checks pass.
VM hard reset and native end-to-end durability suite
- Windows journal-backed overwrite now flushes the same verified file object through a separately reopened write-capable handle before intent, after backup rename/rollback, after publication and before cleanup retirement. File identity is checked before and after the flush. If a write-capable reopen or flush is unavailable, the operation refuses or retains recovery evidence; read-only original files may no longer be overwritable through this protected path. File-level flush is not a documented directory or volume namespace durability guarantee; Windows power-loss behavior still requires actual verification.
- Four Windows-specific process-kill checkpoints exercise these flush boundaries. Seven previous rustfmt differences were applied from the actual Rust workspace failure log.
- A dedicated native VM guest probe prepares unique durable fixtures, runs real journal-backed promotion up to a selected checkpoint, then verifies the authenticated root and SQL after reboot without automatically altering user files. The opt-in libvirt/SSH host runner requires a dedicated domain name and exact UUID confirmation, observes a checkpoint, forces guest power-off, confirms a changed boot identity and collects a JSON report. Host safety unit tests are included in ordinary CI; hard reset is never executed on ordinary CI hosts.
- Native end-to-end overwrite benchmarks at 1 MiB and 16 MiB run three samples per size and verify contents, backup cleanup, empty SQL/ledger and GC. Both native CI paths invoke the benchmark; actual measurements remain pending. This is local recovery latency, not full network throughput or a populated 128-record recovery workload.
- No dedicated VM, hypervisor, or physical power-cut fixture was available during implementation. A forced guest power-off is not a host power cut. Neither Windows namespace durability nor native CI success has been established. See tools/recovery-vm/README.md for prerequisites, safety controls, evidence and execution instructions.
- The host also compares the guest SMBIOS UUID to the designated libvirt UUID and verifies an explicitly supplied SHA-256 of the guest test executable before preparation, before reset and after reboot. An identity mismatch fails before destructive actions. Mocked safety tests cover mismatched SSH guest and libvirt identities; native host execution remains pending.
Linux installation: choose the correct Ghost FTP package
Platform: Linux x86_64 / amd64. These are package-family labels, not
certifications that every distribution/version has been tested. The native
Windows/Linux build currently runs on an Ubuntu 22.04 x86_64 GitHub runner;
installed-device checks across other distributions remain required.
| Linux edition in GitHub Releases | Intended distribution / installation family | Important prerequisite |
|---|---|---|
GhostFTP-Linux-amd64-v<VERSION>.deb
| Debian, Ubuntu, Linux Mint, Pop!_OS, and compatible Debian-family amd64 systems | APT/dpkg dependencies, WebKitGTK 4.1 and compatible GTK/GLib; test on the target distro release. |
GhostFTP-Linux-x86_64-v<VERSION>.rpm
| Fedora, openSUSE, RHEL-compatible RPM-based x86_64 systems | RPM runtime dependencies, WebKitGTK and GTK availability differ. Package format alone does not prove the build launches. |
GhostFTP-Linux-x86_64-v<VERSION>.AppImage
| Portable / cross-distribution candidate for many glibc-based x86_64 desktop systems | Check FUSE/AppImage runtime, compatible glibc, WebKitGTK/GTK libraries and display server. Not guaranteed universal. |
GhostFTP-Linux-x86_64-v<VERSION> / .tar.gz
| Manual / advanced installation on compatible x86_64 desktop Linux | Not statically linked; administrators must supply all system runtime dependencies and desktop integration. |
Replace <VERSION> with the exact published tag number. Verify
GhostFTP-v<VERSION>-SHA256SUMS.txt before executing installers. A SHA-256
checksum only verifies integrity against that manifest; it does not prove
publisher identity or replace a cryptographic code signature.
No native package is currently built for Linux ARM64/aarch64,
32-bit x86, musl-only Alpine, or every NixOS/immutable-container configuration.
Arch Linux, Manjaro, EndeavourOS, Gentoo, elementary OS and others may be
candidates for AppImage/manual installation, but are not certified based
solely on an Ubuntu runner. Check compatible dependencies first; do not force a
Debian RPM/DEB package onto an unrelated distribution. On Wayland systems,
GTK/WebKit or XWayland availability can affect behavior.
Required acceptance before claiming distribution support
For each distribution and version named as tested, record its exact image
version, x86_64 architecture, display protocol (X11/Wayland), WebKitGTK/GTK
versions, GNOME Keyring/KWallet state, and the native binary hash. Verify:
- Install, first launch, File Manager/Sites/Transfers/Settings/Sync navigation,
resize at 1290×852 and 480×600, and correct keyboard focus. - FTP warning, verified FTPS TLS and SFTP SSH host-key checks on actual
endpoints; failed identity checks must not connect. - Queue retry/cancel, interrupted upload/download preservation, symlink and
overwrite safety, and shutdown/restart without losing profile metadata. - OS-backed credentials with locked and unavailable Secret Service; no
plaintext fallback or secret-bearing logs. - Uninstall and reinstall without silently deleting stored user documents,
connection profiles, or keys.
Current GitHub Actions Linux QA produces real Xvfb/WebKit screenshots of
seven core workspaces, not mockups. Those captures prove native rendering under
the CI environment; they do not certify a GNOME/KDE/Wayland distro or pixel
parity with all 29 user-supplied Linux design references.
Related: Linux handbook ·
Native desktop build ·
Published releases.
Operational prerequisites for unsigned desktop builds
Running the native binary does not require a purchased signing certificate. Verify the SHA-256 checksum of your package against the matching official release manifest; this validates file integrity, not cryptographic publisher identity. Saved credentials require an unlocked Secret Service provider and the secret-tool client (the DEB declares libsecret-tools, the RPM declares libsecret). An unavailable vault is a blocking error, not a reason to store plaintext passwords. Before upgrading, create an encrypted backup and ensure all transfers are finished. The desktop Updates screen offers the complete GitHub Releases index because signed auto-updates and manually downloadable package editions are independent.