Skip to content

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

fix: eliminate recurring changelog merge conflicts in release workflow

Adam Eivy1d98583ad1a4
diff --git a/.changelog/v0.15.x.md b/.changelog/v0.15.x.md
index 9f35ab9629..ce6fabdf4a 100644
--- a/.changelog/v0.15.x.md
+++ b/.changelog/v0.15.x.md
@@ -13,6 +13,10 @@ Plan cleanup and documentation reorganization.
- **Added date substitution** to both the release body generation and the archived changelog file
- **Backfilled 4 releases** (v0.11.17, v0.12.48, v0.13.20, v0.14.21) with correct dates
+### CI: Recurring changelog merge conflicts on every release
+- **Fixed cherry-pick divergence** in `release.yml` -- the workflow was archiving the changelog on `dev` then cherry-picking to `main`, creating parallel commit histories that caused merge conflicts on the next PR
+- **Changed to archive on `main` first**, then merge main into dev -- this creates a shared commit ancestor, eliminating the divergent histories
+
### Hardening: Safe JSON parsing & output redaction
- **Replaced raw `JSON.parse` with `readJSONFile`** in `apps.js`, `socialAccounts.js`, `scriptRunner.js` -- corrupted data files no longer crash the server
- **Added null guard** on `data?.apps?.[id]` in `apps.js` to prevent undefined access
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 19101ebf20..8885dc595a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -113,37 +113,29 @@ jobs:
NEW_MINOR=$((MINOR + 1))
NEW_VERSION="$MAJOR.$NEW_MINOR.0"
- # Checkout dev branch
- git fetch origin dev
- git checkout dev
-
- # Rename and version the changelog file
+ # Archive changelog on main first (single source of truth)
+ # This avoids cherry-pick divergence that causes merge conflicts on the next PR
PATTERN_FILE=".changelog/v${MAJOR_MINOR}.x.md"
VERSIONED_FILE=".changelog/v${CURRENT_VERSION}.md"
if [ -f "$PATTERN_FILE" ]; then
- # Rename the file (preserves git history)
+ # Rename and version the changelog file on main
git mv "$PATTERN_FILE" "$VERSIONED_FILE"
# Replace version placeholders in the renamed file
sed -i.bak "s/v${MAJOR_MINOR}\.x/v${CURRENT_VERSION}/g; s/${MAJOR_MINOR}\.x/${CURRENT_VERSION}/g; s/YYYY-MM-DD/$(date +%Y-%m-%d)/g" "$VERSIONED_FILE"
rm "${VERSIONED_FILE}.bak"
- # Commit the renamed and updated changelog
git add "$VERSIONED_FILE"
git commit -m "docs: archive changelog for v${CURRENT_VERSION} [skip ci]"
-
- # Capture the changelog commit hash before switching branches
- CHANGELOG_COMMIT=$(git rev-parse HEAD)
- git push origin dev
-
- # Merge changelog back to main (without triggering CI)
- git checkout main
- git cherry-pick "$CHANGELOG_COMMIT"
git push origin main
- git checkout dev
fi
+ # Checkout dev and merge main to share the changelog commit history
+ git fetch origin dev
+ git checkout dev
+ git merge origin/main --no-edit -m "merge: incorporate v${CURRENT_VERSION} changelog archive [skip ci]"
+
# Update package.json files for next version
npm version $NEW_VERSION --no-git-tag-version
cd client && npm version $NEW_VERSION --no-git-tag-version && cd ..
diff --git a/CLAUDE.md b/CLAUDE.md
index 4225d3022d..e1773987d6 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -137,14 +137,12 @@ When you merge to `main`, the GitHub Actions workflow automatically:
1. Reads `.changelog/v0.10.x.md`
2. Replaces all instances of `0.10.x` with actual version (e.g., `0.10.5`)
3. Creates the GitHub release with substituted changelog
-4. Checks out dev branch
-5. Renames `v0.10.x.md` → `v0.10.5.md` using `git mv` (preserves git history)
-6. Commits the renamed file to dev: `"docs: archive changelog for v0.10.5 [skip ci]"`
-7. Cherry-picks that commit to main
-8. Bumps dev to next minor version (e.g., 0.11.0)
+4. Archives the changelog on `main`: renames `v0.10.x.md` → `v0.10.5.md` using `git mv`
+5. Checks out dev branch and merges main into dev (shared commit history avoids future conflicts)
+6. Bumps dev to next minor version (e.g., 0.11.0)
**Result:**
-- Both `dev` and `main` have `.changelog/v0.10.5.md` matching the tagged release
+- Both `dev` and `main` have `.changelog/v0.10.5.md` via shared commit ancestry
- Git history shows: `v0.10.x.md` → `v0.10.5.md` (rename)
- You create `.changelog/v0.11.x.md` to start the next development cycle