Skip to content

docs(ios): fix the SPM BugseeAgent path pattern and the existence check - #126

Merged
krassx merged 1 commit into
mainfrom
docs/ios-bugseeagent-spm-check
Nov 2, 2026
Merged

krassx merged 1 commit into
mainfrom
docs/ios-bugseeagent-spm-check

Conversation

@dsheikherev

@dsheikherev dsheikherev commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

These are follow-ups to the BugseeAgent path fix from #119, in symbolication.mdx, v6/symbolication.mdx and the AI prompt in build-size-analysis.mdx.

  • Path pattern. ${BUILD_DIR%Build/*} cuts at the last path component that ends in Build. During Archive, BUILD_DIR is .../Build/Intermediates.noindex/ArchiveIntermediates/<Scheme>/BuildProductsPath. A scheme such as AppBuild therefore produced .../ArchiveIntermediates/AppSourcePackages. The pattern is now ${BUILD_DIR%/Build/*}/SourcePackages/..., which matches only a component named Build.
  • Existence check. [ ! "${SCRIPT_SRC}" ] tests for an empty string. That works after find, but the SPM path is never empty. A wrong path ran python3 on a missing file, the error went to the post-action's stderr, and nothing was uploaded. The check is now [ ! -f ... ] in every script and prompt.
  • SPM error text. The SPM tab printed advice about copying the script out of a linked framework, which applies only to the direct download. It now names the path it tried.

Closes #121. The wrong $BUILD_DIR/../ path from that issue was fixed in #119; this PR fixes the always-false check.

The agent skills get the same change in bugsee/bugsee-for-ai#30. The mirror under docs/ai/agent-skills is regenerated after that merges.

Test plan

  • Ran the SPM tab's script under sh. With an Archive BUILD_DIR for scheme AppBuild, the agent runs. With a wrong location, it prints Error: BugseeAgent script not found at … and exits 1.
  • cspell: 0 issues
  • npm run build: success

🤖 Generated with Claude Code

- ${BUILD_DIR%Build/*} cut at any component ending in "Build". During Archive,
  BUILD_DIR holds the scheme name, so a scheme like AppBuild gave
  .../ArchiveIntermediates/AppSourcePackages. Use ${BUILD_DIR%/Build/*}/SourcePackages.
- [ ! "${SCRIPT_SRC}" ] tests for an empty string, which the SPM path never is, so a
  wrong path ran python3 on a missing file and failed silently. Use [ ! -f ... ].
- The SPM tab's error names the path it tried instead of the framework-copy advice,
  which applies only to the direct download.

Applies to symbolication, v6/symbolication and the build-size-analysis AI prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I8500a5eb45ec36ecaf58ca6a450e858e3018fa34
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 085f8f2d-332f-432b-9f74-92e46bcc740c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@claude

claude Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Claude finished @dsheikherev's task in 29s —— View job


Review of PR #126

  • Read the diff and the surrounding docs
  • Grep for other copies of the old pattern and check
  • Test the %/Build/* expansion edge cases in bash
  • Post findings

I didn't run the build or cspell. I only read the diff, grepped the repo, and tested the parameter expansion in bash.

Findings

  • P3, docs/sdk/ios/symbolication.mdx:48 (inline). ${BUILD_DIR%/Build/*} cuts at the last /Build/ component. A scheme named exactly Build would still resolve to the wrong directory. The new -f check makes this fail loudly with a path in the error message. It's an edge case, so I'd document it or leave it.

Checks

  • Typical Archive path. .../Build/Products/Debug-iphoneos gives the DerivedData root. An AppBuild scheme is handled correctly, because the pattern now requires a full /Build/ component.
  • find branch. If find finds nothing, SCRIPT_SRC is empty and [ ! -f "" ] is true. It still errors correctly, so the check is a strict improvement there.
  • Other copies. All three docs pages, including both the script blocks and the AI prompts, are updated consistently. The only remaining [ ! "$SCRIPT_SRC" ] is in the generated docs/ai/agent-skills/**/SKILL.md mirror. That's expected, because the PR says it will be regenerated after fix(skills): iOS SPM path to BugseeAgent in the build-publish step bugsee-for-ai#30 merges. Nobody should hand-edit it, per CLAUDE.md.
  • Error text. The SPM tab no longer shows the "copy the script out of a linked framework" advice. The direct-download tab keeps it, which is correct.

Summary

  1. Overall risk: Low. This is docs-only, and the shell logic is correct for the described cases.
  2. Merge recommendation: Approve and merge. The P3 is optional.
  3. Most important issues to fix: None are blocking. Merge fix(skills): iOS SPM path to BugseeAgent in the build-publish step bugsee-for-ai#30 and sync the mirror soon, so the docs/ai/agent-skills copies don't contradict these pages for long.
  4. Positives: The root-cause explanation is clear. The error message now includes the attempted path. The fix is applied consistently to the scripts and to the AI prompts. The PR describes how it was tested.
    · Branch: docs/ios-bugseeagent-spm-check

Comment thread docs/sdk/ios/symbolication.mdx Resolved
@dsheikherev
dsheikherev requested a review from krassx November 2, 2026 05:33
@krassx
krassx merged commit 8b51868 into main Nov 2, 2026
6 checks passed
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.

iOS symbolication: the SPM BugseeAgent scripts fail silently (always-false check, wrong path)

2 participants