Expose native patch drift and cache recovery in desktop dev builds
iamnbutler opened ·
## Observed
On main at `39191bb`, `bun desktop dev` exits with Electrobun code 1. Bun workspace-filter output elides the underlying diagnostic and repeatedly redraws the task header, leaving only the wrapper stack in `sparkle.ts` / `build.ts`.
Read-only inspection of the failing checkout found the pinned Peekaboo HEAD (`4d43dc9d80cd2aa3787a27f54b76d692db1dcf8f`) with native patch drift. Replaying the build verifier with a temporary private Git index found that none of the 15 accepted states (unpatched through the complete 14-patch stack) matches the cached working tree. `helper.ts` consequently rejects it with: `The native checkout differs from every pinned patch prefix. Resolve source drift before building.` Bun 1.4.0 and Swift 6.4 meet the build requirements. No full rebuild or cache mutation was performed during diagnosis.
## Needed
- Keep the underlying build failure visible through the root desktop command rather than hiding it behind filtered output. - Include the offending cache path and actionable, non-destructive recovery instructions in the drift diagnostic. - Preserve unknown native edits; do not automatically reset or delete a mismatched checkout.
Recovery is to move `apps/desktop/native/.build` aside as a backup and rebuild, causing SwiftPM to recreate the pinned dependencies and Ace to apply the current patches. Invoke `bun scripts/build.ts dev --run` from `apps/desktop` to bypass the root workspace-filter elision.
Found in Ace while investigating a user-reported development-loop failure. Related: #55. Dogfooding: #5.
iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub
- IA
While applying Agentation feedback in #210, the recommended recovery backup was still present as an untracked `apps/desktop/native/.build-backup-20261006-210348/`. Plain `bun run ci` traversed that backup and failed dprint on 406 third-party/generated files, producing a very large diff. The backup was preserved unchanged.
The source check can be run without mutating the backup:
```sh bunx dprint check --excludes '**/.build-backup-*/**' bunx oxlint --ignore-pattern '**/.build-backup-*/**' ```
Recovery guidance should keep backup directories outside the checked source tree, or source checks should explicitly exclude that recovery-backup location.
iamnbutlerreferenced this in fix(ui): tighten navigation and channel details sizing #211last month on GitHub
iamnbutlerreferenced this in chore(desktop): prepare canary 0.0.21 #212last month on GitHub