Skip to content

Commit f10a5f5

Browse files
JOHNJOHN
authored andcommitted
merge: update paykit integration
2 parents e42ba07 + edd87ed commit f10a5f5

160 files changed

Lines changed: 30201 additions & 24495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursorrules

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,22 @@
99
- If unsure about a Git operation, verify the remote URL points to BitcoinErrorLog before pushing
1010
- Always check `git remote -v` before pushing to ensure you're pushing to the correct organization
1111
- Before any git push, verify the remote URL: `git remote get-url <remote-name>` must contain `BitcoinErrorLog`
12+
13+
# Plan Management Rules (CRITICAL)
14+
15+
## NEVER overwrite incomplete plans.
16+
17+
- Before calling `create_plan`, ALWAYS check if an existing plan for the same topic/codebase exists
18+
- If an existing plan has pending todos (not all completed/cancelled), read and EDIT that plan file directly instead of creating a new one
19+
- Only call `create_plan` when: (1) no existing plan for that topic exists, OR (2) the user EXPLICITLY instructs to create a new/replacement plan
20+
- When reviewing or auditing a codebase, first check the plans folder for existing related plans and incorporate their findings
21+
22+
# Self-Sufficiency Rules
23+
24+
## DO NOT ask the user to perform tasks you can do yourself.
25+
26+
- Run builds, tests, lints, and other verification commands directly using terminal tools
27+
- Install dependencies, set up environments, and run setup scripts without asking permission
28+
- Execute file operations, searches, and code modifications directly
29+
- Only ask the user for input when you genuinely need a decision, clarification, or information you cannot obtain programmatically
30+
- When in doubt, attempt the action first; if it fails due to permissions or other issues, then explain what happened

.github/workflows/e2e-pubky.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: E2E Pubky Integration Tests
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'app/src/main/java/to/bitkit/paykit/**'
8+
- 'app/src/main/java/to/bitkit/ui/paykit/**'
9+
- 'e2e/**'
10+
- '.github/workflows/e2e-pubky.yml'
11+
pull_request:
12+
branches: [main, develop]
13+
paths:
14+
- 'app/src/main/java/to/bitkit/paykit/**'
15+
- 'app/src/main/java/to/bitkit/ui/paykit/**'
16+
- 'e2e/**'
17+
- '.github/workflows/e2e-pubky.yml'
18+
workflow_dispatch:
19+
20+
env:
21+
JAVA_VERSION: '17'
22+
ANDROID_API_LEVEL: 33
23+
ANDROID_BUILD_TOOLS_VERSION: 33.0.2
24+
ANDROID_TARGET: google_apis
25+
26+
jobs:
27+
e2e-pubky:
28+
name: Pubky Integration E2E Tests
29+
runs-on: macos-latest
30+
timeout-minutes: 60
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Set up JDK
37+
uses: actions/setup-java@v4
38+
with:
39+
distribution: 'temurin'
40+
java-version: ${{ env.JAVA_VERSION }}
41+
42+
- name: Setup Gradle
43+
uses: gradle/actions/setup-gradle@v3
44+
with:
45+
gradle-home-cache-cleanup: true
46+
47+
- name: Install Maestro CLI
48+
run: |
49+
curl -Ls https://get.maestro.mobile.dev | bash
50+
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
51+
52+
- name: Build Bitkit APK
53+
run: ./gradlew assembleDevDebug
54+
55+
- name: Checkout Pubky Ring
56+
uses: actions/checkout@v4
57+
with:
58+
repository: synonymdev/pubky-ring
59+
path: pubky-ring
60+
token: ${{ secrets.GH_PAT_READ }}
61+
62+
- name: Setup Node.js for Ring
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: '18'
66+
67+
- name: Build Pubky Ring APK
68+
working-directory: pubky-ring
69+
run: |
70+
npm install
71+
cd android
72+
./gradlew assembleRelease
73+
74+
- name: AVD Cache
75+
uses: actions/cache@v4
76+
id: avd-cache
77+
with:
78+
path: |
79+
~/.android/avd/*
80+
~/.android/adb*
81+
key: avd-${{ env.ANDROID_API_LEVEL }}-${{ env.ANDROID_TARGET }}
82+
83+
- name: Create AVD and run tests
84+
uses: reactivecircus/android-emulator-runner@v2
85+
with:
86+
api-level: ${{ env.ANDROID_API_LEVEL }}
87+
target: ${{ env.ANDROID_TARGET }}
88+
arch: x86_64
89+
profile: Nexus 6
90+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
91+
disable-animations: true
92+
script: |
93+
# Wait for emulator to be ready
94+
adb wait-for-device
95+
adb shell input keyevent 82
96+
97+
# Install APKs
98+
echo "Installing Bitkit APK..."
99+
adb install -r app/build/outputs/apk/dev/debug/app-dev-debug.apk
100+
101+
echo "Installing Pubky Ring APK..."
102+
adb install -r pubky-ring/android/app/build/outputs/apk/release/app-release.apk
103+
104+
# Inject test identities
105+
echo "Injecting test identities..."
106+
echo "${{ secrets.E2E_PKARR_PRIMARY }}" | base64 -d > /tmp/primary.pkarr
107+
echo "${{ secrets.E2E_PKARR_SECONDARY }}" | base64 -d > /tmp/secondary.pkarr
108+
adb push /tmp/primary.pkarr /sdcard/Download/test-primary.pkarr
109+
adb push /tmp/secondary.pkarr /sdcard/Download/test-secondary.pkarr
110+
111+
# Verify files
112+
adb shell ls -la /sdcard/Download/test-*.pkarr
113+
114+
# Run Maestro tests
115+
echo "Running Maestro E2E tests..."
116+
maestro test e2e/flows/ --format junit --output test-results/
117+
118+
- name: Upload Test Results
119+
uses: actions/upload-artifact@v4
120+
if: always()
121+
with:
122+
name: e2e-pubky-test-results
123+
path: test-results/
124+
retention-days: 30
125+
126+
- name: Upload Screenshots
127+
uses: actions/upload-artifact@v4
128+
if: always()
129+
with:
130+
name: e2e-pubky-screenshots
131+
path: |
132+
*.png
133+
e2e/**/*.png
134+
retention-days: 30
135+
136+
- name: Cleanup
137+
if: always()
138+
run: |
139+
rm -f /tmp/primary.pkarr /tmp/secondary.pkarr
140+
141+
# ==============================================================================
142+
# SECRETS REQUIRED:
143+
# ==============================================================================
144+
# E2E_PKARR_PRIMARY - Base64 encoded content of android-ai-tester-*.pkarr
145+
# E2E_PKARR_SECONDARY - Base64 encoded content of ios-ai-tester-*.pkarr
146+
# GH_PAT_READ - GitHub PAT with read access to synonymdev/pubky-ring
147+
#
148+
# To create the base64 secrets:
149+
# base64 -i credentials/android-ai-tester-backup-2026-01-01_12-18-17.pkarr
150+
# base64 -i credentials/ios-ai-tester-backup-2026-01-01_12-16-19.pkarr
151+
# ==============================================================================
152+

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
This file provides guidance to AI agents like Cursor/Claude Code/Codex/WARP when working with code in this repository.
44

5+
## Java Environment (CRITICAL)
6+
7+
Java is installed via Homebrew. Before running ANY gradle or java command, set the environment:
8+
9+
```sh
10+
export JAVA_HOME="/opt/homebrew/opt/openjdk@21"
11+
export PATH="$JAVA_HOME/bin:$PATH"
12+
```
13+
14+
Example: `export JAVA_HOME="/opt/homebrew/opt/openjdk@21" && ./gradlew compileDevDebugKotlin`
15+
16+
DO NOT claim Java is unavailable - it IS installed at the path above.
17+
518
## Build Commands
619

720
```sh

PAYKIT_INTEGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ lifecycleScope.launch {
420420

421421
## References
422422

423-
- Paykit Roadmap: `paykit-rs-master/PAYKIT_ROADMAP.md`
423+
- Paykit Roadmap: `paykit-rs/PAYKIT_ROADMAP.md`
424424
- iOS Integration: `bitkit-ios/PAYKIT_INTEGRATION.md`
425-
- Phase 3 Report: `paykit-rs-master/FINAL_DELIVERY_REPORT.md`
425+
- Phase 3 Report: `paykit-rs/FINAL_DELIVERY_REPORT.md`
426426

0 commit comments

Comments
 (0)