Skip to content

build: preserve unchanged sidebar extension declaration - #13245

Merged
teamleaderleo merged 2 commits into
mainfrom
codex/preserve-sidebar-extension-declaration
Sep 20, 2026
Merged

teamleaderleo merged 2 commits into
mainfrom
codex/preserve-sidebar-extension-declaration

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

The sidebar extension-point build phase currently deletes and recreates its declaration on every build, even when the selected point and XML are unchanged. Preserve the existing regular file when its contents match, while still running the phase to clean stale tags and recreate missing or corrupt output.

Changed output is written through a temporary file and renamed into place. Destination symlinks are replaced without modifying their targets. The unchanged path preserves the declaration's inode and mtime, and does not change the Extensions directory's mtime.

Validation: seven behavioral tests invoke the real script and inspect generated plist artifacts, covering unchanged output, tag changes, stale declarations, missing/corrupt output, and file/directory symlinks. The original script fails two tests; the fix passes all seven. The regression and fix are separate commits. The tests run in the existing Linux workflow-guard-tests job. bash -n and git diff --check pass.

This removes one unnecessary bundle mutation. It does not claim a measured whole-build speedup or that Xcode will skip signing; other build phases can still modify the bundle.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Stops the sidebar extension-point build phase from replacing an unchanged declaration every build, so the app bundle no longer unnecessarily changes.

  • Still runs the phase to clean up stale declarations and recreate missing or corrupt ones.
  • Preserves the existing file's inode and mtime when the declaration is unchanged, and leaves the Extensions directory's mtime alone.
  • Writes changed output through a temp file and replaces any destination symlink without modifying its target.
  • Adds seven tests covering unchanged, changed, stale, missing/corrupt, and symlink cases; they run in the existing Linux workflow-guard-tests job.
  • Does not claim a whole-build speedup or that Xcode will skip signing; other build phases can still touch the bundle.

Written for commit 26c4489. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9cc700a2-fddf-4653-9999-7eeca9b04e73

📥 Commits

Reviewing files that changed from the base of the PR and between ad34966 and 26c4489.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • scripts/write-sidebar-extension-point.sh
  • tests/test_write_sidebar_extension_point.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression or repository-rule violation was identified.

Summary

This PR makes sidebar extension-point generation content-aware while retaining stale-output cleanup and safe replacement behavior.

  • Preserves the existing declaration’s inode and timestamps when its content is unchanged.
  • Writes changed output through a same-directory temporary file and atomically renames it into place.
  • Replaces destination symlinks without modifying their targets.
  • Adds seven behavioral tests and runs them in the workflow guard job.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Create Extensions directory] --> B[Delete stale extension-point declarations]
  B --> C{Destination is not a symlink and content matches?}
  C -- Yes --> D[Preserve existing file and exit]
  C -- No --> E[Create same-directory temporary file]
  E --> F[Write declaration and set mode 0644]
  F --> G{Destination type}
  G -- Symlink --> H[Remove symlink]
  G -- Empty directory --> I[Remove directory]
  G -- Other or absent --> J[No preliminary removal]
  H --> K[Rename temporary file into place]
  I --> K
  J --> K
Loading

Reviews (1) · Last reviewed commit: "build: preserve unchanged sidebar extens..."

@teamleaderleo
teamleaderleo merged commit 024562c into main Sep 20, 2026
39 of 41 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 20, 2026
692f2c0 fix: use complete settings paths in checkout and installed skill (manaflow-ai#13250)
bb318b5 perf: fetch native cmux-tui client slices for local reloads (manaflow-ai#13249)
fc77a71 feat(localization): add one-command contributor workflow (manaflow-ai#13220)
024562c build: preserve unchanged sidebar extension declaration (manaflow-ai#13245)
39e98d7 perf(reload): clone the tagged app staging copy on APFS (manaflow-ai#13241)
cc28407 ci: retry Warp checkout and capture DNS failures (manaflow-ai#13204)
6a09735 ci: find admitted compiles beyond the first jobs page (manaflow-ai#13240)
a979439 ci: make merge-group fail-fast watcher reliable (manaflow-ai#13235)

# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/cmux-skill-contract.yml
#	.github/workflows/ios-appstore-upload.yml
#	.github/workflows/merge-group-fail-fast.yml
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