Skip to content

sync: port upstream server VCS, keybindings, images, terminal, persistence (#3998–#4104)#166

Merged
aaditagrawal merged 9 commits into
mainfrom
sync/20260718-server-core-stack
Jul 18, 2026
Merged

sync: port upstream server VCS, keybindings, images, terminal, persistence (#3998–#4104)#166
aaditagrawal merged 9 commits into
mainfrom
sync/20260718-server-core-stack

Conversation

@aaditagrawal

@aaditagrawal aaditagrawal commented Jul 18, 2026

Copy link
Copy Markdown
Owner

What changed

Ports upstream server-core fixes into the fork:

  • #3998 treat selected commit paths literally in Git VCS
  • #4077 stabilize non-repository Git diagnostics
  • #3969 fix duplicate keybinding rule replacement
  • #3952 fix image upload stack overflow in MIME handling
  • #3108 strip AppImage runtime env from spawned terminals
  • #3951 skip undecodable provider runtime rows when listing sessions
  • #4104 share MCP OAuth locks across Codex shadow homes

Preserves fork: multi-provider runtime, orchestration persistence, Codex shadow-home layout.

Validation

  • vp check (0 errors) and vp run typecheck on stack tip
  • CI: pending

Stack: 1 of 5; base main.

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation for base64 image data, including malformed, empty, padded, and case-variant inputs.
    • Prevented duplicate keybinding entries when replacing rules.
    • Preserved valid provider sessions when individual stored records are corrupted.
    • Improved Codex MCP OAuth lock handling across shared environments.
    • Cleaned AppImage-specific environment values from terminal sessions.
    • Made Git status output more consistent across locales.
    • Ensured selected file paths containing special characters are handled literally.

EricTsai83 and others added 7 commits July 18, 2026 14:53
…ow (pingdotgg#3952)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#3108)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…ions (pingdotgg#3951)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aaditagrawal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: baf832bc-b75f-4afc-8be9-31249b2698ae

📥 Commits

Reviewing files that changed from the base of the PR and between 161f02d and 6320e7f.

📒 Files selected for processing (4)
  • apps/server/src/imageMime.ts
  • apps/server/src/persistence/ProviderSessionRuntime.ts
  • apps/server/src/terminal/Manager.test.ts
  • apps/server/src/terminal/Manager.ts
📝 Walkthrough

Walkthrough

This PR strengthens Base64 data URL parsing, prevents duplicate keybindings, skips undecodable runtime rows, shares Codex MCP locks, scrubs AppImage terminal environments, and stabilizes Git diagnostics and selected-file staging.

Changes

Image data URL parsing

Layer / File(s) Summary
Base64 data URL validation
apps/server/src/imageMime.ts, apps/server/src/imageMime.test.ts
Manual header and payload validation replaces whole-payload regex parsing, with coverage for malformed, padded, case-insensitive, empty, and large Base64 inputs.

Keybinding replacement persistence

Layer / File(s) Summary
Replacement filtering and regression coverage
apps/server/src/keybindings.ts, apps/server/src/keybindings.test.ts
Replacement upserts remove both matching target and incoming rules before persistence, preventing duplicate entries.

Provider runtime row handling

Layer / File(s) Summary
Tolerant runtime listing
apps/server/src/persistence/ProviderSessionRuntime.ts, apps/server/src/persistence/RepositoryErrorCorrelation.test.ts
Undecodable runtime rows are logged and skipped while valid rows remain available; SQL error correlation coverage is retained.

Codex and terminal runtime environments

Layer / File(s) Summary
Shared MCP OAuth lock directory
apps/server/src/provider/Drivers/CodexHomeLayout.ts, apps/server/src/provider/Drivers/CodexHomeLayout.test.ts
mcp-oauth-locks is shared through shadow homes, and existing local lock directories can be replaced with symlinks.
AppImage terminal environment scrubbing
apps/server/src/terminal/Manager.ts, apps/server/src/terminal/Manager.test.ts
AppImage markers and mount-derived path segments are removed from PTY environments only during AppImage launches.

Git diagnostics and literal paths

Layer / File(s) Summary
Stable Git diagnostics
apps/server/src/vcs/GitVcsDriverCore.ts, apps/server/src/vcs/GitVcsDriverCore.test.ts
Parsed Git commands use LC_ALL=C, with subprocess tests verifying command sequences and environment values.
Literal selected-file staging
apps/server/src/vcs/GitVcsDriverCore.ts, apps/server/src/vcs/GitVcsDriverCore.test.ts
Selected-file staging uses --literal-pathspecs and verifies filenames containing pattern characters are handled literally.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: juliusmarminge

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change set and clearly summarizes the upstream sync across server VCS, keybindings, images, terminal, and persistence.
Description check ✅ Passed The description covers What Changed and Validation, but it omits the Why section and the template checklist/UI guidance.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/20260718-server-core-stack

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 github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Jul 18, 2026
@aaditagrawal aaditagrawal changed the title fix(git): treat selected commit paths literally (#3998) sync: port upstream server VCS, keybindings, images, terminal, persistence (#3998–#4104) Jul 18, 2026
@aaditagrawal

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/server/src/imageMime.ts`:
- Around line 45-47: Update isBase64Whitespace to also return true for the tab
character code 0x09, while preserving support for carriage return, newline, and
space.

In `@apps/server/src/persistence/ProviderSessionRuntime.ts`:
- Around line 291-308: Update the `Effect.map` callback around `Arr.filterMap`
to return each `row` Option directly, or replace the filter with
`Arr.getSomes(decoded)`. Remove the `Result.succeed`/`Result.failVoid`
conversion while preserving the existing filtering of absent decoded rows.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 727760c8-8e32-4283-a160-923600156ba1

📥 Commits

Reviewing files that changed from the base of the PR and between 2886832 and 161f02d.

📒 Files selected for processing (12)
  • apps/server/src/imageMime.test.ts
  • apps/server/src/imageMime.ts
  • apps/server/src/keybindings.test.ts
  • apps/server/src/keybindings.ts
  • apps/server/src/persistence/ProviderSessionRuntime.ts
  • apps/server/src/persistence/RepositoryErrorCorrelation.test.ts
  • apps/server/src/provider/Drivers/CodexHomeLayout.test.ts
  • apps/server/src/provider/Drivers/CodexHomeLayout.ts
  • apps/server/src/terminal/Manager.test.ts
  • apps/server/src/terminal/Manager.ts
  • apps/server/src/vcs/GitVcsDriverCore.test.ts
  • apps/server/src/vcs/GitVcsDriverCore.ts

Comment thread apps/server/src/imageMime.ts
Comment thread apps/server/src/persistence/ProviderSessionRuntime.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 161f02d95d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/terminal/Manager.ts Outdated
aaditagrawal added 2 commits July 18, 2026 15:14
Accept tab as Base64 whitespace, and collect decoded session rows with
Arr.getSomes instead of a Result-based Arr.filterMap conversion.
Keep explicit TerminalOpenInput APPDIR/PATH overrides when the server
itself is not an AppImage, while still stripping AppImage mount markers
from the inherited process environment.

aaditagrawal commented Jul 18, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 18, 10:05 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 18, 10:06 AM UTC: @aaditagrawal merged this pull request with Graphite.

@aaditagrawal
aaditagrawal merged commit dcd00ef into main Jul 18, 2026
12 checks passed
aaditagrawal added a commit that referenced this pull request Jul 18, 2026
…ngdotgg#3948, pingdotgg#2124, pingdotgg#3932, pingdotgg#4094) (#167)

## What changed

- `pingdotgg#3948` include runtime model and effort in Codex developer instructions
- `pingdotgg#2124` thread cwd through Claude capability probe (kept fork `CLAUDE_CONFIG_DIR` semantics)
- `pingdotgg#3932` prevent ACP assistant ID collisions after restarts (Grok + shared `AcpSessionRuntime`; skipped deleted Cursor ACP files)
- `pingdotgg#4094` default legacy Cursor binary path to `cursor-agent` without restoring ACP — Cursor remains on `@cursor/sdk`

Preserves fork: Cursor SDK migration, Grok ACP, multi-provider management.

## Validation

- `vp check` / `vp run typecheck` on stack tip
- CI: pending

Stack: 2 of 5; depends on #166.
aaditagrawal pushed a commit that referenced this pull request Jul 18, 2026
Merge upstream after the Jul 18 port stack (#166#170). Conflicts keep
fork Cursor SDK, CLAUDE_CONFIG_DIR semantics, branding bootstrap, and
the fork-only macOS 26 icon path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants