Skip to content

fix(antigravity): keep saved subagent transcript text valid Unicode - #41374

Open
Lucenx9 wants to merge 1 commit into
pingdotgg:mainfrom
Lucenx9:fix/antigravity-saved-transcript-unicode
Open

Lucenx9 wants to merge 1 commit into
pingdotgg:mainfrom
Lucenx9:fix/antigravity-saved-transcript-unicode

Conversation

@Lucenx9

@Lucenx9 Lucenx9 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

A saved Antigravity subagent transcript can show a broken character before the truncation ellipsis. This happens when a step or serialized tool argument crosses its UTF-16 text limit halfway through an emoji.

Change

When truncating a transcript field, drop the incomplete character before adding the existing ellipsis. A complete character that fits within the limit is kept.

Scope

Small fix in the server's saved JSONL transcript reader. #40794 changes output in live ACP updates, and #39855 handles the byte window between transcript records. A targeted search found no equivalent fix for the saved step and tool-argument text caps.

Verification

I found this by replaying a native-format SQLite parent record and JSONL child transcript through readAntigravityChildWork. The original and minimal fixtures fail on base and pass with the fix.

Saved transcript field Before After
Step text at the 4,000-unit limit Isolated U+D83D before the ellipsis Valid Unicode
Tool input at the 1,000-unit limit Isolated U+D83D before the ellipsis Valid Unicode
Emoji entirely inside either limit Retained Retained

The existing transcript-tail test now checks the exact clipped step and tool input. On a source-derived copy of the shared limiter, fast-check passed 200 generated cases, Jazzer.js ran 300 iterations, and Stryker killed 9 of 10 mutants. The surviving regex removes the final anchor and is equivalent for well-formed input. Fallow passed on a two-file snapshot with limited dependency coverage. CodeScene's advisory gate flagged test length, while cyclomatic complexity decreased and production code reported no degradation.

Linux only. A temporary native-format fixture provides the runtime evidence. No live Antigravity session was used.

vp run check:changed --concurrency 1 passed with 15 tests, typecheck, format, lint, Knip and GraphQL after a frozen-lockfile install. Normal commit hooks passed.

Independent reviews: Gemini 4 Neon medium on Antigravity and Opus 5.5 high approved the diff.

Reviewed with sol-loop: 1 round with GPT-6.2 Sol on high. Sol verdict: approved.

Created with GPT-6.2 Sol in Codex through T3 Code.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 10:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T10:21:58.265803Z dc98a80 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The truncation logic removes a trailing high surrogate before adding an ellipsis. The test uses multibyte content and checks truncated step text and tool input.

Changes: Transcript truncation

Layer / File(s) Summary
Surrogate-safe truncation
apps/server/src/provider/acp/AntigravityChildWork.ts, apps/server/src/provider/acp/AntigravityChildWork.test.ts
capText removes a trailing high surrogate before adding an ellipsis. The test checks truncated step text and tool input using multibyte content.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, mkantautas

Merge Risk: Minimal · up to dc98a

Saved subagent transcripts will no longer end with half an emoji when text is truncated. The change is small, localized, and covered by an updated test, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(antigravity): keep saved subagent transcript text valid Unicode" matches the main change. The change drops a trailing high surrogate when capText truncates saved transcript step text an…
Description check Passed The description follows the template's main sections: Problem, Change, Scope, and Verification. It states the bug (an isolated surrogate before the ellipsis), the fix (drop the incomplete character be…
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.
Full details: Title check

Explanation

The title "fix(antigravity): keep saved subagent transcript text valid Unicode" matches the main change. The change drops a trailing high surrogate when capText truncates saved transcript step text and tool input, so the output stays valid Unicode. The title is a conventional commit, specific, and names the affected component.

Full details: Description check

Explanation

The description follows the template's main sections: Problem, Change, Scope, and Verification. It states the bug (an isolated surrogate before the ellipsis), the fix (drop the incomplete character before the ellipsis), and a link-based scope rationale (#40794 and #39855). Verification is detailed, with specific tests, fixtures, and observed before/after results. It does not link a bug issue directly, and the Scope section does not say whether a maintainer requested the PR. It also includes an agent attribution line, as the template asks. These gaps are minor, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d63b9c4 and dc98a80.

Files selected for processing: 2

  • apps/server/src/provider/acp/AntigravityChildWork.test.ts
  • apps/server/src/provider/acp/AntigravityChildWork.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants