[PM-33574] llm: Add build-test-verify skill#2448
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
|
Claude finished @SaintPatrck's task in 2m 24s —— View job Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the extraction of build, test, lint, and troubleshooting content from No findings. |
|
Overall Assessment: APPROVE Reviewed the extraction of build/test/troubleshooting content from CLAUDE.md into a dedicated Code Review Details
Finding 1 --
Details and fixThe regular test command (line 42) correctly includes The source in Suggested fix: RECORD_MODE=1 xcodebuild test \
-workspace Bitwarden.xcworkspace \
-scheme Bitwarden \
-testPlan Bitwarden-Snapshot \
-destination 'platform=iOS Simulator,name=iPhone 16' |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2448 +/- ##
==========================================
- Coverage 86.86% 85.80% -1.07%
==========================================
Files 1841 2076 +235
Lines 162244 178294 +16050
==========================================
+ Hits 140941 152987 +12046
- Misses 21303 25307 +4004 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ce11fe5 to
008392a
Compare
fedemkr
left a comment
There was a problem hiding this comment.
Looks good, just some improvements. Let me know what you think and I can do the changes, no problem.
| ## Building | ||
|
|
||
| ```bash | ||
| ./Scripts/build.sh project-pm.yml Bitwarden Simulator # PM for simulator | ||
| ./Scripts/build.sh project-bwa.yml Authenticator Simulator # Authenticator for simulator | ||
| ./Scripts/build.sh project-pm.yml Bitwarden Device # PM for device | ||
| ``` |
There was a problem hiding this comment.
🤔 Maybe we should do some testing on this, but is this smart / fast enough on detecting that to build Test Harness for device it needs to use ./Scripts/build.sh project-bwth.yml TestHarness Device? Should the general script be added here? Although maybe it just fetches the docs from build.sh so this may not be necessary.
./Scripts/build.sh project-{productAcronym}.yml {build_scheme} {build_mode}There was a problem hiding this comment.
We can add an example of building the test harness to save Claude a few extra tool calls.
| **Re-record snapshot tests** (when visual changes are intentional): | ||
| ```bash | ||
| RECORD_MODE=1 xcodebuild test \ | ||
| -workspace Bitwarden.xcworkspace \ | ||
| -scheme Bitwarden \ | ||
| -testPlan Bitwarden-Snapshot \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16' | ||
| ``` |
There was a problem hiding this comment.
| mint run sourcery --config BitwardenKit/Sourcery/sourcery.yml | ||
|
|
||
| # Asset/localization code generation | ||
| mint run swiftgen config run --config swiftgen-pm.yml |
There was a problem hiding this comment.
⛏️ I'd use swiftgen-bwr.yml instead here as it's the most likely place to need asset/localization generation given that a lot of them are shared now in "Bitwarden Resources".
| ## Tooling Reference | ||
|
|
||
| | Tool | Config | Purpose | | ||
| |------|--------|---------| | ||
| | XcodeGen | `project-*.yml` | Generates `.xcodeproj` from YAML specs | | ||
| | Mint | `Mintfile` | Swift tool package manager | | ||
| | SwiftLint | `.swiftlint.yml` | Linting with custom rules | | ||
| | SwiftFormat | `.swiftformat` | Code formatting | | ||
| | Sourcery | `*/Sourcery/sourcery.yml` | Mock generation (`AutoMockable`) | | ||
| | SwiftGen | `swiftgen-*.yml` | Asset/localization code generation | | ||
| | Fastlane | `fastlane/Fastfile` | CI/CD automation | |
There was a problem hiding this comment.
🤔 Should typos be included here as well?
| |---------|-------|-----| | ||
| | `.xcodeproj` not found | Files are gitignored | Run `./Scripts/bootstrap.sh` | | ||
| | `MockXxx` not found | Sourcery not run | Add `// sourcery: AutoMockable`, run Sourcery or build | | ||
| | Snapshot test fails | Simulator mismatch or intentional change | Check `.test-simulator-*` files; re-record if change is intentional | |
There was a problem hiding this comment.
🤔 I'd indicate that these are disabled for the time being and if any snapshot test is run then it should actually disable it by adding disable to the test function so it's transformed to something like disabletest_snapshot_*.
- Add Test Harness build example - Note snapshot tests are currently disabled - List all SwiftGen configs with BitwardenResources as primary - Add typos to tooling reference table - Update snapshot failure row to reflect disabled status
|
|
||
| CI runs all `-Default` test plans on PRs to `main`, commits to `main`, and release branches. Test execution order is randomized (`randomExecutionOrder: true`). | ||
|
|
||
| **Snapshot tests are currently disabled.** Do not run or re-record them. If you encounter a snapshot test, prefix the function name with `disable` (e.g., `disabletest_snapshot_defaultState`). |

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-33574
📔 Objective
Consolidates all build, test, lint, and troubleshooting content from CLAUDE.md into a dedicated on-demand skill.
What changed:
skills/build-test-verify/SKILL.md— Complete reference for: initial setup (bootstrap.sh), project generation (XcodeGen specs), build commands, test execution with correct simulator requirements, lint/format/spell check, Sourcery mock generation, SwiftGen asset generation, tooling reference table, common failures table (missing.xcodeproj, missing mocks, snapshot failures, extension memory crashes, SwiftLint TODO warning), and debug tips.CLAUDE.md — Removes Pre-build Scripts subsection, the entire Deployment section (building, initial setup, git hooks, code generation, CI/CD, tooling table), and the entire Troubleshooting section. Replaces ~100 lines with a two-line pointer to the
build-test-verifyskill.