Skip to content

M1: IPC Contract Extensions + Swift Codegen#6907

Merged
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/qa-video-auto/task-1
Feb 23, 2026
Merged

M1: IPC Contract Extensions + Swift Codegen#6907
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/qa-video-auto/task-1

Conversation

@Jasonnnz
Copy link
Copy Markdown
Contributor

@Jasonnnz Jasonnnz commented Feb 23, 2026

Extends CuSessionCreate with reportToSessionId and qaMode fields. Adds CuSessionFinalized client→server message for QA recording finalization. Regenerates Swift IPC models and updates contract inventory. Part of #6899.


Open with Devin

…Create

Co-Authored-By: Claude <noreply@anthropic.com>
@Jasonnnz Jasonnnz self-assigned this Feb 23, 2026
@Jasonnnz Jasonnnz merged commit 32d687a into feature/qa-video-automation Feb 23, 2026
0 of 3 checks passed
@Jasonnnz Jasonnnz deleted the swarm/qa-video-auto/task-1 branch February 23, 2026 15:38
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

⚠️ 1 issue in files not directly in the diff

⚠️ Codegen INT_PATTERNS missing Ms suffix causes durationMs to be generated as Double instead of Int (assistant/scripts/ipc/generate-swift.ts:153-183)

The durationMs field in the new CuSessionFinalizedRecording struct is generated as Double in Swift, but it represents an integer millisecond value.

Root Cause

The Swift codegen at assistant/scripts/ipc/generate-swift.ts:153-183 uses heuristic INT_PATTERNS to decide whether a TypeScript number property should map to Swift Int or Double. Similar fields like sizeBytes match /[Ss]ize\w*$/Int, and expiresAt matches /At$/Int, but durationMs does not match any pattern, so it falls through to Double at line 265:

case 'number':
  return shouldBeInt(propName) ? 'Int' : 'Double';

This produces public let durationMs: Double at clients/shared/IPC/Generated/IPCContractGenerated.swift:498 when it should be Int. Swift consuming code would need awkward Int(recording.durationMs) conversions, and the type is inconsistent with the semantic meaning (whole milliseconds).

Impact: Swift code consuming IPCCuSessionFinalizedRecording.durationMs gets a Double instead of Int, creating a type mismatch with the rest of the codebase where durations in ms are integers. Not a data-loss issue since Double can represent typical ms values exactly, but it causes friction and inconsistency.

View 4 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown

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

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: fac0bcfabb

ℹ️ 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 clients/shared/IPC/Generated/IPCContractGenerated.swift
@Jasonnnz
Copy link
Copy Markdown
Contributor Author

Addressed in #6910

Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
Jasonnnz added a commit that referenced this pull request Feb 23, 2026
…Create (#6907)

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
Co-authored-by: Claude <noreply@anthropic.com>
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