Skip to content

Fix Linux AppImage runtime mount lifecycle - #2491

Merged
SawyerHood merged 1 commit into
mainfrom
fix/linux-appimage-child-lifecycle-replacement
Aug 26, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
fix/linux-appimage-child-lifecycle-replacement

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

This pull request replaces #1781 because the source branch for that pull request was deleted.

The replacement preserves the original work and gives co-author credit to @salemsayed.

What was wrong

The packaged desktop started the long-lived bb-app bridge through an executable inside the desktop AppImage mount. The bridge and its descendants could continue after that mount disappeared. These processes could then fail with SIGBUS or BUS_ADRERR errors.

What changed

  • Start the packaged Linux runtime through the outer AppImage.
  • Give the owned runtime an independent FUSE mount.
  • Resolve the bridge path inside the new runtime mount.
  • Keep the AppImage supervisor as the process-group leader until all descendants exit.
  • Keep the original bridge path in the command line for stale-process verification.
  • Add an AppImage lifecycle smoke test to the Linux build and release jobs.

This change does not alter the host daemon protocol.

How you verified

Replaces #1781.

AGENT GENERATED

@SawyerHood
SawyerHood merged commit a60d3f1 into main Aug 26, 2026
24 of 25 checks passed
@SawyerHood
SawyerHood deleted the fix/linux-appimage-child-lifecycle-replacement branch August 26, 2026 18:40
brsbl added a commit that referenced this pull request Oct 8, 2026
## Human comments

## What was wrong

`smoke:appimage-lifecycle` launches the packaged production AppImage
with a fresh `BB_DATA_DIR` and leaves telemetry on. Packaged builds
carry a real version and the default PostHog key, and the telemetry ID
is a random value stored per data directory. Every CI run that executes
this step therefore sends an `app_started` event as a brand-new Linux
desktop "user". Since the step was added to `ci.yml` on Aug 26 (#2491),
this has added roughly 1,200–1,700 fake new app starters a week. They
are 95% single-start, 96% from US datacenter IPs, and almost none create
a thread. Daily counts track CI volume (Oct 3: 121 smoke runs vs 187
one-shot Linux desktop starters; Oct 4: 91 vs 127). Acquisition
reporting showed app starters growing while activation appeared to
halve.

## What changed

- `apps/desktop/scripts/smoke-linux-appimage-lifecycle.mjs` sets
`BB_TELEMETRY: "false"` in the AppImage's launch environment.
`BB_TELEMETRY` is a startup-managed env key, so it reaches the server
the same way the script's `BB_DATA_DIR` does. This matches
`packages/bb-app/scripts/smoke-boot.mjs` and `smoke-tarball.mjs`, which
already disable telemetry.
- `smoke-packaged-app.mjs` is unchanged: it attaches to its stub server
rather than starting bb's server, and Windows/macOS desktop starters
show no CI correlation.

## How you verified

- Traced the env path: smoke `childEnv` → desktop `bb-process.ts`
(passes `process.env`) → bb-app launcher (`BB_TELEMETRY` is in
`STARTUP_ONLY_MANAGED_ENV_KEYS`) → `createTelemetryService` returns the
no-op service when `BB_TELEMETRY` is false.
- PostHog evidence above. After merge, daily one-shot Linux desktop
starters should fall by roughly the CI run count.
- Relying on remote CI for the smoke run itself.

BB-Thread: [Filter bot
traffic](https://brsbl.getbb.app/projects/proj_khiw2za95v/threads/thr_d4hqj2xevj)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant