Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0715d74
feat: complete app overhaul — engines, UI, tests, CI
cortexark Mar 13, 2026
2f873a8
fix: deterministic test seeds for flaky boundary tests (#2)
cortexark Mar 13, 2026
4479b18
feat: stress engine desk-mode, zone engine Phase 1, and validation im…
cortexark Mar 14, 2026
64af30c
feat: add demo videos for iOS, Watch, and website
cortexark Mar 14, 2026
3651e27
docs: remove AI attribution references from project files (#5)
cortexark Mar 15, 2026
e55cf70
fix: remove private access on viewModel for cross-file extension acce…
cortexark Mar 15, 2026
1d70e23
fix: make localStore internal for cross-file extension access (#7)
cortexark Mar 15, 2026
0accc17
fix: add timeFormatter to SleepScreen for watchOS build (#8)
cortexark Mar 15, 2026
c654868
fix: relax YoungAthlete nudge assertion — seekGuidance is valid for h…
cortexark Mar 15, 2026
b9f754e
feat: Watch app UI upgrade, engine fixes, and production readiness
cortexark Mar 15, 2026
e5a76cb
fix: remove duplicate declarations from DashboardView.swift (#11)
cortexark Mar 15, 2026
1cea98e
fix: production readiness — automatic signing + guard debug prints (#12)
cortexark Mar 15, 2026
8909911
feat: Sign in with Apple + observability fixes (#13)
cortexark Mar 15, 2026
c013edc
feat: add Firebase Firestore engine telemetry
cortexark Mar 15, 2026
fa37c29
feat: 1-year free launch offer, Firestore integration tests, and lega…
cortexark Mar 15, 2026
2a9f5da
feat: feedback forms, telemetry summaries, debug export, UI fixes
cortexark Mar 15, 2026
2f15bb2
feat: firebase telemetry, feedback forms, and UI fixes (#15)
cortexark Mar 15, 2026
f149be6
feat: week-over-week trends, metric impact, UX fixes (#16)
cortexark Mar 15, 2026
c974d64
feat: readiness breakdown, metric explainers, layout fixes (#17)
cortexark Mar 15, 2026
9665032
refactor: code quality improvements, model domain split, 223 new tests
cortexark Mar 16, 2026
630c86c
feat: readiness breakdown sheet, metric explainers, and layout fixes
cortexark Mar 15, 2026
b0f8c1b
feat: week-over-week trends, metric impact tags, and UX affordance fixes
cortexark Mar 15, 2026
677d458
Add comprehensive UI rubric test coverage (1,530 tests)
cortexark Mar 16, 2026
fe328d5
Fix HealthKit auth race condition with retry on dashboard refresh
cortexark Mar 16, 2026
0f6efe3
Fix 2 flaky test expectations
cortexark Mar 16, 2026
97d868e
Prevent swipe bypass on HealthKit onboarding page
cortexark Mar 16, 2026
1861c4b
Fix dead Focus Time and Stretch guidance buttons on Stress screen
cortexark Mar 16, 2026
b0344f1
Merge main into feature branch to pick up PRs #15, #16, #17
cortexark Mar 16, 2026
877eba5
Bug fixes: UI rubric tests, HealthKit retry, flaky tests, swipe bypas…
cortexark Mar 16, 2026
0b37136
Real device bug fixes: diagnostic export, Firebase feedback, HealthKi…
cortexark Mar 16, 2026
0343cf4
Bug fixes, diagnostic enhancements, and text quality improvements
cortexark Mar 17, 2026
49ecdc6
Merge claude/affectionate-bhabha: sessions 1-4 (bug fixes, diagnostic…
cortexark Mar 17, 2026
796be2f
Phase 1: Centralize ~85 thresholds into HealthPolicyConfig
cortexark Mar 17, 2026
4e3b412
Phase 2: DailyEngineCoordinator eliminates duplicate engine execution
cortexark Mar 17, 2026
d9e29ae
Phase 3: AdviceState + composable evaluators unify decision logic
cortexark Mar 17, 2026
1f78d7e
Phase 4: PipelineTrace extensions + CoherenceChecker invariants
cortexark Mar 17, 2026
cf760a6
Phase 5: Views become renderers of AdviceState via AdvicePresenter
cortexark Mar 17, 2026
744f964
Phase 6: Property-based tests + fuzz testing for engine invariants
cortexark Mar 17, 2026
d7eb345
Replace em-dashes with hyphens in user-facing coaching text
cortexark Mar 17, 2026
029590a
Super Reviewer: multi-journey LLM rubric evaluation system
cortexark Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
189 changes: 189 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# CI Pipeline for Thump (HeartCoach)
# Builds iOS and watchOS targets, runs ALL unit tests, and validates
# that every test function in source is actually executed.
#
# Runs on: push to main, ALL pull requests (any branch).
# Branch protection requires this workflow to pass before merge.

name: CI

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Minimum number of test functions that must execute.
# Update this when adding new tests. Current count: 833
MIN_TEST_COUNT: 1050
IOS_SIMULATOR: "platform=iOS Simulator,name=iPhone 16 Pro"
WATCH_SIMULATOR: "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)"

jobs:
build-and-test:
name: Build & Test
runs-on: macos-15
steps:
- uses: actions/checkout@v4

# -- Cache SPM packages --
- name: Cache SPM packages
uses: actions/cache@v4
with:
path: |
~/Library/Developer/Xcode/DerivedData/**/SourcePackages
~/.build
key: spm-${{ runner.os }}-${{ hashFiles('apps/HeartCoach/Package.swift') }}
restore-keys: |
spm-${{ runner.os }}-

# -- Install tools --
- name: Install XcodeGen
run: brew install xcodegen

- name: Show Xcode version
run: xcodebuild -version

- name: List available simulators
run: xcrun simctl list devices available | grep -E "iPhone|Apple Watch" | head -10

- name: Generate Xcode Project
run: |
cd apps/HeartCoach
xcodegen generate

# -- Validate all test files are in project --
- name: Validate test file inclusion
run: |
cd apps/HeartCoach
MISSING=0
for f in $(find Tests -name "*Tests.swift" -exec basename {} \;); do
if ! grep -q "$f" Thump.xcodeproj/project.pbxproj 2>/dev/null; then
echo "::error::Test file $f exists on disk but is NOT in ThumpCoreTests target"
MISSING=$((MISSING + 1))
fi
done
if [ "$MISSING" -gt 0 ]; then
echo "::error::$MISSING test file(s) missing from Xcode project. Add them to project.yml."
exit 1
fi
echo "All test files are in the project"

# -- Build iOS --
- name: Build iOS
env:
SIMULATOR: ${{ env.IOS_SIMULATOR }}
run: |
set -o pipefail
cd apps/HeartCoach
xcodebuild build \
-project Thump.xcodeproj \
-scheme Thump \
-destination "platform=iOS Simulator,name=iPhone 16 Pro" \
-configuration Debug \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
2>&1 | tee /tmp/xcodebuild-ios.log | xcpretty
- name: Show Build Errors (if failed)
if: failure()
run: grep -A2 "error:" /tmp/xcodebuild-ios.log || echo "No error lines found"

# -- Build watchOS --
- name: Build watchOS
run: |
set -o pipefail
cd apps/HeartCoach
xcodebuild build \
-project Thump.xcodeproj \
-scheme ThumpWatch \
-destination "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" \
-configuration Debug \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
2>&1 | tee /tmp/xcodebuild-watchos.log | xcpretty
- name: Show watchOS Build Errors (if failed)
if: failure()
run: grep -A2 "error:" /tmp/xcodebuild-watchos.log 2>/dev/null || echo "No watchOS error log"

# -- Run ALL unit tests --
- name: Run Tests
run: |
set -o pipefail
cd apps/HeartCoach
xcodebuild test \
-project Thump.xcodeproj \
-scheme Thump \
-destination "platform=iOS Simulator,name=iPhone 16 Pro" \
-enableCodeCoverage YES \
-resultBundlePath TestResults.xcresult \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
2>&1 | tee /tmp/xcodebuild-test.log | xcpretty
- name: Show Test Errors (if failed)
if: failure()
run: |
echo "### Test Failures" >> "$GITHUB_STEP_SUMMARY"
grep -E "error:|FAIL|failed" /tmp/xcodebuild-test.log | head -30 >> "$GITHUB_STEP_SUMMARY"
grep -A2 "error:" /tmp/xcodebuild-test.log 2>/dev/null || echo "No test error log"

# -- Validate test count to catch orphaned tests --
- name: Validate test count
if: success()
env:
MIN_TESTS: ${{ env.MIN_TEST_COUNT }}
run: |
cd apps/HeartCoach

# Count executed tests from xcodebuild output
EXECUTED=$(grep "Test Case.*started" /tmp/xcodebuild-test.log | wc -l | tr -d ' ')

# Count defined test functions in source
DEFINED=$(grep -rn "func test" Tests --include="*.swift" | wc -l | tr -d ' ')

echo "### Test Pipeline Report" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "| Metric | Count |" >> "$GITHUB_STEP_SUMMARY"
echo "|--------|-------|" >> "$GITHUB_STEP_SUMMARY"
echo "| Defined in source | **${DEFINED}** |" >> "$GITHUB_STEP_SUMMARY"
echo "| Executed by Xcode | **${EXECUTED}** |" >> "$GITHUB_STEP_SUMMARY"
echo "| Minimum required | **${MIN_TESTS}** |" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"

# Fail if executed count drops below minimum
if [ "$EXECUTED" -lt "$MIN_TESTS" ]; then
echo "::error::Only ${EXECUTED} tests executed, minimum is ${MIN_TESTS}. Tests may have been excluded or orphaned."
echo "FAILED: ${EXECUTED} tests executed < ${MIN_TESTS} minimum" >> "$GITHUB_STEP_SUMMARY"
exit 1
fi

# Warn if defined > executed (some tests not running)
DIFF=$((DEFINED - EXECUTED))
if [ "$DIFF" -gt 10 ]; then
echo "::warning::${DIFF} test functions defined but not executed. Check for excluded files in project.yml."
echo "WARNING: ${DIFF} tests defined but not executed" >> "$GITHUB_STEP_SUMMARY"
fi

echo "All ${EXECUTED} tests executed (minimum: ${MIN_TESTS})"
echo "PASSED: ${EXECUTED} tests executed" >> "$GITHUB_STEP_SUMMARY"

# -- Coverage report --
- name: Extract Code Coverage
if: success()
run: |
cd apps/HeartCoach
echo "### Code Coverage" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
xcrun xccov view --report TestResults.xcresult | head -30 >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: apps/HeartCoach/TestResults.xcresult
retention-days: 7
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ DerivedData/
.build/
build/

# Firebase config (contains API keys)
GoogleService-Info.plist

# Swift Package Manager
.swiftpm/
Packages/
Expand All @@ -29,6 +32,16 @@ Package.resolved
.ux/
.project/

# TaskPilot / Orchestrator (internal tooling, not part of the app)
TaskPilot/
ORCHESTRATOR_DRIVEN_IMPROVEMENTS.md

# Project docs (local only)
CLAUDE.md
PROJECT_HISTORY.md
TESTING_AND_IMPROVEMENTS.md
TODO.md

# IDE
.vscode/
.idea/
Expand Down
8 changes: 8 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"figma-remote-mcp": {
"type": "http",
"url": "https://mcp.figma.com/mcp"
}
}
}
Loading
Loading