Conversation
…OpenAI, and Polly scripts Co-authored-by: trodrigues <trodrigues@tecracer.de>
…t-documentation
### Motivation - Add a GitHub Actions workflow to build and test the iOS app on macOS runners so iOS-specific build and test failures are caught by CI. ### Description - Create ` .github/workflows/ios-ci.yml` which runs on `macos-latest`, checks out the repo, sets up Xcode via `maxim-lobanov/setup-xcode@v1`, and runs `xcodebuild -project ios/awsary.xcodeproj -scheme "awsary (iOS)" -destination "platform=iOS Simulator,name=iPhone 14" clean test`. ### Testing - No automated tests were executed locally; the workflow is configured to run on `pull_request`, `push` to `main`, and `workflow_dispatch` so CI will run the `xcodebuild` tests when the workflow is executed. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6967eba7947c8332bc638ccf3aee3b43) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces CI for iOS to catch platform-specific build/test failures. > > - New `/.github/workflows/ios-ci.yml` runs on `pull_request`, `push` to `main`, and `workflow_dispatch` > - Uses `macos-latest`, checks out code, sets up Xcode (`maxim-lobanov/setup-xcode@v1`), then runs `xcodebuild` with the `ios/awsary.xcodeproj`, `awsary (iOS)` scheme, and iPhone 14 simulator to `clean test` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1cba0f5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Add iOS unit test target to scheme
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92c419e7c0
ℹ️ 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".
| if "#" not in item.get('shortDescription', '') : | ||
| print("Checking OpenAI for : " + item['name']) | ||
| chat_completion = openai.ChatCompletion.create(model="gpt-4", temperature=1, max_tokens=512,top_p=1,frequency_penalty=0,presence_penalty=0,messages=[{"role": "system", "content": "You are an AWS instructor and want to teach you students about AWS services.You will describe a macro overview about the service you are asked for, and then a little resume about pricing as well as some interesting facts.Use Markdown to make your output more organized, specifically create a title with # for each major topic. Include sections with titles 'Overview', 'Pricing' and 'Interesting Facts'."},{"role": "user", "content": item['name']}]) | ||
| item['shortDesctiption'] = chat_completion.choices[0].message.content | ||
| item['shortDescription'] = chat_completion.choices[0].message.content |
There was a problem hiding this comment.
Keep DynamoDB field name consistent with app schema
This script now reads/writes shortDescription, but the rest of the repo (e.g., ios/Shared/DataModels/awsService.swift and the JSON fixtures) still uses the misspelled shortDesctiption field. If the DynamoDB items follow that existing schema, this change will treat every item as missing (because shortDescription is absent), generate new content, and write a new attribute that the app never reads. That leaves stale text in the UI and duplicates data in the table unless you migrate all consumers at the same time.
Useful? React with 👍 / 👎.
| .onTapGesture { | ||
| UIPasteboard.general.string = service.shortDesctiption | ||
| } |
There was a problem hiding this comment.
Guard iOS-only UIPasteboard in shared view
DetailsView lives under ios/Shared and is built into the macOS target (per the project file), but UIPasteboard is iOS-only. This addition will break macOS builds with a missing symbol/"Cannot find UIPasteboard in scope" error. Use #if os(iOS) or a platform-appropriate pasteboard API for macOS to keep the shared target building.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| print("Checking OpenAI for : " + item['name']) | ||
| chat_completion = openai.ChatCompletion.create(model="gpt-4", temperature=1, max_tokens=512,top_p=1,frequency_penalty=0,presence_penalty=0,messages=[{"role": "system", "content": "You are an AWS instructor and want to teach you students about AWS services.You will describe a macro overview about the service you are asked for, and then a little resume about pricing as well as some interesting facts.Use Markdown to make your output more organized, specifically create a title with # for each major topic. Include sections with titles 'Overview', 'Pricing' and 'Interesting Facts'."},{"role": "user", "content": item['name']}]) | ||
| item['shortDesctiption'] = chat_completion.choices[0].message.content | ||
| item['shortDescription'] = chat_completion.choices[0].message.content |
There was a problem hiding this comment.
Key name mismatch between Python and Swift models
High Severity
The Python script now reads and writes the DynamoDB key shortDescription (correctly spelled), but the iOS app's awsService model and all JSON data still use shortDesctiption (with typo). When the Python script processes services, it writes to shortDescription, but the iOS app reads from shortDesctiption, so newly generated AI descriptions won't appear in the app. The fix corrects the typo only on one side of the data pipeline, breaking data consistency.
Additional Locations (1)
|
|
||
| /* Begin PBXBuildFile section */ | ||
| 341195612E55196E00EEF821 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; | ||
| 341195632E55196E00EEF821 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; |
There was a problem hiding this comment.
Null framework references in Xcode project file
Low Severity
The Xcode project file contains (null) in Frameworks build file entries that appear to be corrupted or incomplete framework references. These entries reference build files without valid names, which typically indicates incomplete SDK integration or project corruption that was accidentally committed.
Additional Locations (1)
|
|
||
| // for DEV | ||
| options.debug = true // Enabled debug when first installing is always helpful | ||
| options.environment = "dev" |
There was a problem hiding this comment.
Development Sentry configuration committed for production build
Medium Severity
Sentry SDK is configured with options.debug = true and options.environment = "dev" while production settings are commented out. Additionally, tracesSampleRate and sessionSampleRate are set to 1.0 (100%), which the comments note should be adjusted for production. This configuration will cause verbose debug logging in production builds, report all events as "dev" environment in Sentry dashboards, and incur higher costs from 100% sampling.
Additional Locations (1)
| ); | ||
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=tigpt\n export SENTRY_PROJECT=apple-ios\n ERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n"; |
There was a problem hiding this comment.
Shell script error capture is broken by redirections
Low Severity
The Sentry debug symbol upload script captures error output into ERROR variable using ERROR=$(sentry-cli ... 2>&1 >/dev/null), but the >/dev/null redirect sends stdout (which includes stderr after 2>&1) to /dev/null inside the subshell. This means ERROR will always be empty. When the upload fails, the warning message "warning: sentry-cli - $ERROR" will display no useful error information, making debugging upload failures difficult.
Note
Introduces Sentry monitoring, iOS CI, security hardening, and script reliability improvements across the repo.
SentrySDK.startinAWSaryApp.swift), adds Swift Packagesentry-cocoa, and a build phase to upload dSYMs; setsDEBUG_INFORMATION_FORMATtodwarf-with-dsym, disables user script sandboxing, and bumpsMARKETING_VERSIONto1.12.DetailsView.swift, adds copy/drag support forservice.shortDesctiptionand enables text selection inMarkdown(...); updates Polly label.ios-ci.ymlto build and test the iOS app on macOS runners.terraform/cloudfront_cdn.tf, changesviewer_protocol_policytoredirect-to-https.utils/open_ai.pyfixes key typo and uses safe access;utils/polly.pyuses a context manager for file writes.AGENTS.md,bug_fixes_summary.md, and ignoresios/.sentryclirc; updates iOS scheme metadata.Written by Cursor Bugbot for commit 2b50cc8. This will update automatically on new commits. Configure here.