Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
docs: document the fork customization workflow in SELF_UPDATE
tzioup60c14c7590a6
diff --git a/docs/README.md b/docs/README.mdindex 28bdc68dc5..b5cdfdfdc6 100644--- a/docs/README.md+++ b/docs/README.md@@ -25,7 +25,7 @@ Index of everything under `docs/`. Start with the [root README](../README.md) fo| [CONTRIBUTING.md](./CONTRIBUTING.md) | Dev setup (PostgreSQL required), code conventions || [GITHUB_ACTIONS.md](./GITHUB_ACTIONS.md) | CI and release workflows || [VERSIONING.md](./VERSIONING.md) | SemVer + release process (`/do:release`) |-| [SELF_UPDATE.md](./SELF_UPDATE.md) | Fork-aware self-update flow — release polling, `FORK_SYNC_REQUIRED`, fork sync |+| [SELF_UPDATE.md](./SELF_UPDATE.md) | Fork-aware self-update flow — release polling, `FORK_SYNC_REQUIRED`, fork sync, running a customized fork || [MANAGED_APP_UPDATES.md](./MANAGED_APP_UPDATES.md) | Safe managed-app update default and the opt-in app lifecycle contract || [DEPS.md](./DEPS.md) | Dependency audit — every third-party package and its verdict || [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) | Common runtime issues, known issues |diff --git a/docs/SELF_UPDATE.md b/docs/SELF_UPDATE.mdindex 0998abfd2b..350eb52e5d 100644--- a/docs/SELF_UPDATE.md+++ b/docs/SELF_UPDATE.md@@ -105,6 +105,39 @@ When `isFork` is true, `UpdateTab` replaces the single "Update Now" button withKeep these three behaviors distinct. Collapsing them strips the user's agency over what touches their GitHub fork.+## Running a customized fork++The `UpdateTab` fork panel states this in short form. The full loop is here, because that panel is+the only other place it exists and it renders only when `isFork` is true.++Keep `main` a clean mirror of upstream and never commit to it — that is what keeps `gh repo sync`+fast-forward and avoids 409 `FORK_DIVERGED`. Private changes live on their own branch, rebased+onto `main` after each sync. Anything shareable goes upstream as a PR instead, so you carry less+forward each time.++**PM2 boots whatever is checked out**, so the branch you are on is the code that runs. Staying on+your private branch is what makes your customizations live; there is no separate step.++### After rebasing, reinstall and rebuild++`update.sh` always finishes on `main`, so it cannot do this half for you:++```bash+git checkout main && ./update.sh+git checkout <your-branch> && git rebase main+for d in . client server autofixer; do (cd "$d" && npm install); done+npm run build && npm run pm2:restart+```++Order matters. `npm install` rewrites `client/package.json`, so building before installing leaves+the build stale again.++**A clean rebase makes the install look broken.** Checking out a branch based on an older `main`+rewinds the working tree, and the rebase rolls it forward, so every touched file gets a new mtime.+`getInstallState()` (`server/services/installState.js`) compares mtimes, so it reports a stale+build and stale deps in all four workspaces even though no dependency changed and no build input+was edited. The reinstall and rebuild above clear it.+## Image-bearing Persistent Mind work must drain before source transitionsThe managed update route refuses to restart into a different source revision while a queued Persistent Mind message or active turn carries image references. `GET /api/update/status` reports the privacy-safe `persistentMindImages` preflight (`safe`, queued count, and active-turn boolean), and `POST /api/update/execute` re-checks it before and after acquiring the update lock.