Skip to content

Conversation

@sachaservan
Copy link
Member

@sachaservan sachaservan commented Dec 13, 2025

Summary by cubic

Pin the OpenAI Swift package to v0.4.7 to avoid breakages from upstream changes and ensure reproducible builds. Added a small script to bump the dependency to the latest release when needed.

  • Dependencies
    • Pinned MacPaw/OpenAI to exact 0.4.7 (was tracking main).
    • Added update_openai.sh to fetch the latest tag, update Package.swift, and create a commit.

Written for commit deed59c. Summary will update automatically on new commits.

@sachaservan sachaservan merged commit 8902ea7 into main Dec 13, 2025
3 checks passed
@sachaservan sachaservan deleted the fix/pin-openai branch December 13, 2025 00:29
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="update_openai.sh">

<violation number="1" location="update_openai.sh:4">
P1: Missing validation for `LATEST_TAG`. If the curl request fails or returns unexpected JSON, the variable could be empty or &#39;null&#39;, corrupting Package.swift. Add validation before proceeding.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

#!/bin/bash
set -e

LATEST_TAG=$(curl -sL https://api.github.com/repos/MacPaw/OpenAI/releases/latest | jq -r ".tag_name")
Copy link

@cubic-dev-ai cubic-dev-ai bot Dec 13, 2025

Choose a reason for hiding this comment

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

P1: Missing validation for LATEST_TAG. If the curl request fails or returns unexpected JSON, the variable could be empty or 'null', corrupting Package.swift. Add validation before proceeding.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At update_openai.sh, line 4:

<comment>Missing validation for `LATEST_TAG`. If the curl request fails or returns unexpected JSON, the variable could be empty or &#39;null&#39;, corrupting Package.swift. Add validation before proceeding.</comment>

<file context>
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+LATEST_TAG=$(curl -sL https://api.github.com/repos/MacPaw/OpenAI/releases/latest | jq -r &quot;.tag_name&quot;)
+
+echo &quot;OpenAI package latest version: $LATEST_TAG&quot;
</file context>
Fix with Cubic

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.

2 participants