Skip to content

[GB-MONITOR] Fix the Sentry DSN project lookup and give CodeCaps iOS its own DSN - #336

Merged
jaywedgeworth22 merged 5 commits into
mainfrom
gbmonitor/codecaps-sentry-dsn
Oct 29, 2026
Merged

jaywedgeworth22 merged 5 commits into
mainfrom
gbmonitor/codecaps-sentry-dsn

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Root cause: sentry_dsn_project() in scripts/ios-fleet/ship-testflight.sh (added in #325) called

Summary

Fixes CodeCaps iOS TestFlight Sentry routing so crashes, dSYMs, and Size Analysis land in the dedicated Sentry project codecaps (4512207409840129) instead of the shared fleet project (botfleet), and fixes the DSN-to-project lookup that was turning every ship red.

What changed

Dedicated CodeCaps DSN for iOS ship (ios-ship.yml):

  • Fetches new secret SENTRY_DSN_CODECAPS from Fleet-OPS Infisical prod /, with same-named GitHub repository secret as fallback.
  • New Use the CodeCaps Sentry DSN step promotes SENTRY_DSN_CODECAPS to SENTRY_DSN via GITHUB_ENV before archive/ship, so the archive, dSYM upload, and Size Analysis build all target codecaps.
  • Missing DSN handling: falls back to shared fleet SENTRY_DSN without blocking the TestFlight upload, but is loud — emits ::error title=Sentry DSN:: and writes a note to $RUNNER_TEMP/ios-ship-sentry-dsn-missing (kept out of checkout to avoid dirty-worktree ship failure).
  • Final Sentry artifact upload status step reads that note, reports ship outcome first so a failed ship is not masked, then fails the run (exit 1) if the shared DSN was used.

Sentry project lookup fix (scripts/ios-fleet/ship-testflight.sh sentry_dsn_project):

  • Lookup now queries the Sentry web API at ${SENTRY_API_BASE:-https://sentry.io} via GET /api/0/projects/{org}/{id or slug}/, trying numeric org ID from DSN then simple-with-us.
  • Previously queried https://{DSN-host}/api/0/organizations/{org}/projects/{id}/ — the DSN host is the ingest endpoint (*.ingest.us.sentry.io) which 404s for /api/0/ paths, and that organizations-form endpoint does not exist, causing false red ships (2026-10-28). DSN host is now only used to derive the org ID.

Docs: Updated INFISICAL.md and docs/IOS-TESTFLIGHT.md to document SENTRY_DSN_CODECAPS source, fallback-to-shared plus red-run behavior, and that TestFlight upload is never blocked.

Tests (scripts/ios-ship-workflow.test.mjs): Added coverage that numeric IDs resolve via sentry.io/api/0/projects/... never via ingest host, that unresolvable IDs try fleet org, that slug tails need no API call, and that the workflow picks the CodeCaps DSN after fetch/before ship with loud-missing behavior.

…its own DSN

sentry_dsn_project() asked https://<DSN ingest host>/api/0/organizations/{org}/projects/{id}/,
an endpoint that does not exist (404 for every input), so every CodeCaps iOS
ship went red at the Sentry status step even though the uploads to codecaps
worked.  It now asks https://sentry.io/api/0/projects/{org}/{id}/.

ios-ship.yml fetches SENTRY_DSN_CODECAPS (Sentry project codecaps) and makes it
the SENTRY_DSN for the archive.  A missing one falls back to the shared fleet
DSN with an ::error:: and a red run; the TestFlight upload is never blocked.
@jaywedgeworth22 jaywedgeworth22 added the do-not-auto-merge Hold: no automatic or bot merge. The PR says who added it or who decides. label Oct 29, 2026
@kody-ai

kody-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Could Not Complete ⚠️

The review failed before suggestions could be generated.

Reason: The configured API key (open_router) is out of credits or has hit its billing limit. Top up the account or adjust the plan.

open_router · meta/muse-spark-1.3-contributor · HTTP 429 · generalist

Provider said: Token Plan usage limit reached: Upgrade your Token Plan or purchase Credits for more usage. (2056)

After fixing the issue, comment @kody review on this PR to re-run the review.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

Comment thread .github/workflows/ios-ship.yml Resolved
@github-actions

Copy link
Copy Markdown
Contributor
Autofix run https://github.com/Simple-With-Us/CodeCaps/actions/runs/40811857876 started for `sentry[bot]`'s tagged request. Owner/sentry request: exempt from the per-bot cap (owner rule 2026-10-20).

The ship script refuses a dirty worktree, so a note written to the repo root
before the ship step would have stopped the ship.  The note now goes to
RUNNER_TEMP and the Sentry status step reads it (Seer finding on #336).
@kody-ai

kody-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Could Not Complete ⚠️

The review failed before suggestions could be generated.

Reason: The configured API key (open_router) is out of credits or has hit its billing limit. Top up the account or adjust the plan.

open_router · meta/muse-spark-1.3-contributor · HTTP 429 · generalist

Provider said: Token Plan usage limit reached: Upgrade your Token Plan or purchase Credits for more usage. (2056)

After fixing the issue, comment @kody review on this PR to re-run the review.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

@jaywedgeworth22

Copy link
Copy Markdown
Member Author

@kody start-review

@kody-ai

kody-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@jaywedgeworth22

Copy link
Copy Markdown
Member Author

@kody start-review

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Kody Rules low

PR description uses two ASCII spaces instead of an NBSP sentence gap

Two ASCII spaces after the quote collapse to one in rendered PR prose instead of preserving the required sentence gap. Replace them with U+00A0 followed by one ASCII space.

Kody rule violation: Sentence gap by surface: two ASCII spaces in files, U+00A0 plus a space in rendered copy and GitHub text

Prompt for LLM
PR description uses two ASCII spaces instead of an NBSP sentence gap

Replace the two ASCII spaces after the sentence-ending quote with an actual U+00A0 followed by one ASCII space. GitHub PR prose requires a real NBSP gap; two ordinary spaces are not an accepted sentence gap.

Kody rule violation: [Sentence gap by surface: two ASCII spaces in files, U\+00A0 plus a space in rendered copy and GitHub text](https://app.kodus.io/settings/code-review/global/kody-rules/2a52ef80-886f-4e53-994b-2f70ee73f305?teamId=69360e3a-6b41-45d2-9e49-fde78fe49457)

​

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

Comment thread .github/workflows/ios-ship.yml Resolved
Comment thread .github/workflows/ios-ship.yml Resolved
Comment thread .github/workflows/ios-ship.yml Resolved
Comment thread .github/workflows/ios-ship.yml Resolved
Comment thread INFISICAL.md Resolved
kody-ai[bot]
kody-ai Bot previously requested changes Oct 29, 2026

@kody-ai kody-ai 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.

@kody-ai

kody-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Could Not Complete ⚠️

The review failed before suggestions could be generated.

Reason: The configured API key (open_router) appears invalid or lacks permission. Check the key in your settings.

open_router · meta/muse-spark-1.3-contributor · HTTP 403 · generalist

Provider said: Workspace weekly budget of $3.00 exceeded. Contact your org admin. $3.02 of $3.00 used; resets 2026-11-02T00:00:00.000Z.

After fixing the issue, comment @kody review on this PR to re-run the review.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

…OPS as the only Sentry vault in INFISICAL.md
@kody-ai

kody-ai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@jaywedgeworth22

Copy link
Copy Markdown
Member Author

Answers to the issue-level Kody notes on this PR:  the PR-description sentence gaps now use U+00A0 plus a space, fixed in the description itself.  The business-logic notes only say the linked task has no description; the PR body carries the full why, the change list, the tests and the one pre-merge step (Jay sets Infisical Fleet-OPS prod / SENTRY_DSN_CODECAPS), so there is nothing to change in code.  The five inline findings are answered in their threads (two fixed in 9032f08, three disputed with code reasons).  This PR stays do-not-auto-merge until that secret is set.

@kody-ai

kody-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

Comment thread scripts/ios-fleet/ship-testflight.sh Resolved
Comment thread scripts/ios-fleet/ship-testflight.sh Resolved
Comment thread scripts/ios-fleet/ship-testflight.sh Resolved
…rip a trailing slash, reject non-https bases so the API token never leaves over cleartext or off-domain, and give the project-slug curl connect/max timeouts so a hung Sentry API fails fast.
@jaywedgeworth22
jaywedgeworth22 merged commit 59933d0 into main Oct 29, 2026
6 checks passed
@jaywedgeworth22 jaywedgeworth22 removed the do-not-auto-merge Hold: no automatic or bot merge. The PR says who added it or who decides. label Oct 29, 2026
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