Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
04ffc31
feat(swift-sdk)!: freeze persistence schemas after App Store publication
llbartekll Sep 18, 2026
1598336
fix(swift-sdk): fold upstream V5 key limits into working V2
llbartekll Sep 18, 2026
6eb0ee3
fix(swift-sdk): strengthen schema release validation
llbartekll Sep 19, 2026
10e1062
fix(swift-sdk): isolate release generation and retain source history
llbartekll Sep 19, 2026
fe0da99
fix(swift-sdk): validate source tags during freeze dry runs
llbartekll Sep 20, 2026
6faa054
chore(swift-sdk): resolve release-freeze merge conflicts
llbartekll Sep 20, 2026
7de890a
fix(swift-sdk): bridge legacy unversioned stores into V2
llbartekll Sep 20, 2026
e1bf24d
fix(swift-sdk): limit legacy detection and locking to bridge stores
llbartekll Sep 20, 2026
2fe5826
fix(swift-sdk): recover migrations without scratch copies
llbartekll Sep 20, 2026
9597c0f
fix(swift-sdk): reclaim migration backups after a successful reopen
llbartekll Sep 20, 2026
27b943a
fix(swift-sdk): verify the migrated SQLite journal mode
llbartekll Sep 20, 2026
852d825
fix(swift-sdk): open and migrate stores on a dedicated queue
llbartekll Sep 20, 2026
8894142
fix(swift-sdk): handle unreadable release API responses
llbartekll Sep 20, 2026
a800920
fix(swift-sdk): check migration storage and clarify recovery failures
llbartekll Sep 20, 2026
bf50e1a
fix(swift-sdk): reclaim abandoned migration attempts under lock
llbartekll Sep 20, 2026
77f8c29
fix(swift-sdk): order freeze pull requests by latest attempt
llbartekll Sep 20, 2026
41642ca
fix(swift-sdk): validate stored value dependencies before freezing
llbartekll Sep 21, 2026
f882160
fix(swift-sdk): reconcile merged releases before closed pull requests
llbartekll Sep 21, 2026
209dff2
fix(swift-sdk): discard completed migration snapshots during wallet d…
llbartekll Sep 21, 2026
1645f9c
fix(ci): support spaced paths on the Swift SDK runner
llbartekll Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ end_of_line = lf
[*.rs]
indent_size = 4

# Preserve the existing indentation of the Swift SDK Python scripts.
[packages/swift-sdk/scripts/*.py]
indent_size = 4
Comment thread
coderabbitai[bot] marked this conversation as resolved.

[*.{md,markdown}]
trim_trailing_whitespace = false
33 changes: 27 additions & 6 deletions .github/workflows/swift-sdk-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
|| github.event.pull_request.head.repo.owner.login == 'thepastaclaw'
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 90
defaults:
run:
# The runner's work/temp directory can be on a volume with spaces.
shell: bash --noprofile --norc -e -o pipefail "{0}"

steps:
- name: Checkout repository
Expand All @@ -36,7 +40,28 @@ jobs:

# Rust + Cargo cache to speed up FFI build
- name: Set up Rust toolchain (stable)
uses: dtolnay/rust-toolchain@stable
# Composite actions choose their own shell and do not inherit the
# quoted script path above. Keep setup here for space-safe execution.
env:
RUSTUP_PERMIT_COPY_RENAME: "1"
run: |
export CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
export PATH="$CARGO_HOME/bin:$PATH"
if ! command -v rustup >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused \
--location --silent --show-error --fail https://sh.rustup.rs \
| sh -s -- --default-toolchain none --no-modify-path -y
fi
rustup toolchain install stable --profile minimal --no-self-update \
--target aarch64-apple-ios --target aarch64-apple-ios-sim
{
echo "CARGO_HOME=$CARGO_HOME"
echo "RUSTUP_TOOLCHAIN=stable"
echo "CARGO_INCREMENTAL=${CARGO_INCREMENTAL-0}"
echo "CARGO_TERM_COLOR=${CARGO_TERM_COLOR-always}"
} >> "$GITHUB_ENV"
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
rustc +stable --version --verbose

- name: Restore cargo registry cache
uses: actions/cache/restore@v5
Expand All @@ -48,10 +73,6 @@ jobs:
restore-keys: |
cargo-registry-

- name: Add iOS Rust targets
run: |
rustup target add aarch64-apple-ios aarch64-apple-ios-sim

- name: Restore cached Protobuf (protoc)
id: cache-protoc
uses: actions/cache@v5
Expand Down Expand Up @@ -88,7 +109,7 @@ jobs:
- name: Verify protoc and export env
run: |
set -euxo pipefail
echo "$HOME/.local/protoc-32.0/bin" >> $GITHUB_PATH
echo "$HOME/.local/protoc-32.0/bin" >> "$GITHUB_PATH"
echo "PROTOC=$HOME/.local/protoc-32.0/bin/protoc" >> "$GITHUB_ENV"
"$HOME/.local/protoc-32.0/bin/protoc" --version

Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/swift-sdk-freeze-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Freeze SwiftData App Store release

on:
workflow_dispatch:
inputs:
release_id:
description: App Store version ID recorded by the iOS publication monitor
required: true
type: string
data_commit:
description: Full commit on dashwallet-ios/schema-release-data containing the publication proof
required: true
type: string
dry_run:
description: Validate and generate without committing, pushing or opening a PR
default: false
type: boolean

permissions:
contents: read

# Different releases may share a schema and therefore an automation branch.
concurrency:
group: swift-sdk-appstore-schema-freeze
cancel-in-progress: false

jobs:
freeze:
if: github.repository == 'dashpay/platform'
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout reviewed worker
uses: actions/checkout@v4
with:
ref: v4.2-dev
path: platform
# Include immutable swift-schema-source/* tags and their history.
fetch-depth: 0
persist-credentials: false
- name: Checkout publication records from the fixed iOS repository
uses: actions/checkout@v4
with:
repository: dashpay/dashwallet-ios
ref: schema-release-data
path: release-data
fetch-depth: 0
token: ${{ secrets.SCHEMA_RELEASE_TOKEN }}
persist-credentials: false
- name: Validate publication and prepare draft snapshot PR
env:
SCHEMA_RELEASE_TOKEN: ${{ secrets.SCHEMA_RELEASE_TOKEN }}
RELEASE_ID: ${{ inputs.release_id }}
DATA_COMMIT: ${{ inputs.data_commit }}
DRY_RUN: ${{ inputs.dry_run }}
working-directory: platform
shell: bash
run: |
set -euo pipefail
args=(--release-id "$RELEASE_ID" --data-commit "$DATA_COMMIT" --data-repo ../release-data)
if [[ "$DRY_RUN" == true ]]; then args+=(--dry-run); fi
python3 -I packages/swift-sdk/scripts/freeze_appstore_release.py "${args[@]}"
16 changes: 14 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ concurrency:
jobs:
check-secrets:
name: Check secret availability
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
if: >-
${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
|| !github.event.pull_request.draft
|| (github.event.pull_request.head.repo.full_name == github.repository
&& startsWith(github.head_ref, 'codex/freeze-swift-schema-v')) }}
runs-on: ubuntu-24.04
outputs:
has_ecr: ${{ steps.check.outputs.has_ecr }}
Expand All @@ -39,7 +43,11 @@ jobs:

changes:
name: Determine changed packages
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
if: >-
${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
|| !github.event.pull_request.draft
|| (github.event.pull_request.head.repo.full_name == github.repository
&& startsWith(github.head_ref, 'codex/freeze-swift-schema-v')) }}
runs-on: ubuntu-24.04
outputs:
js-packages: ${{ steps.override.outputs.js-packages || steps.prune-pr-matrix.outputs.js-packages || steps.filter-js.outputs.changes }}
Expand Down Expand Up @@ -307,6 +315,7 @@ jobs:
filters: |
swift-sdk-changed:
- .github/workflows/swift-sdk-build.yml
- .github/workflows/swift-sdk-freeze-release.yml
- .github/workflows/tests.yml
- packages/swift-sdk/**
- packages/dapi-grpc/**
Expand Down Expand Up @@ -495,6 +504,9 @@ jobs:
- name: Check the frozen SwiftData models match FREEZES
run: python3 packages/swift-sdk/scripts/freeze_schema_models.py --check

- name: Verify the historical migration fixture and pinned sources
run: python3 packages/swift-sdk/scripts/historical_schema_fixture.py --check

- name: Test the freeze generator
run: python3 -m unittest discover -s packages/swift-sdk/scripts -p 'test_*.py' -v

Expand Down
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ Platform uses data contracts to define application data schemas:
- Run linters: `yarn lint`

## Coding Style & Naming Conventions
- Editor config: 2-space indent (4 for `*.rs`), LF, UTF‑8, final newline (`.editorconfig`).
- Follow `.editorconfig`: 2-space indent by default; 4 spaces for `*.rs` and
`packages/swift-sdk/scripts/*.py`, preserving the existing Python script style.
Use LF, UTF‑8, and a final newline.
- JS/TS: ESLint (Airbnb/TypeScript rules via package configs). Use camelCase for variables/functions, PascalCase for classes; prefer kebab-case filenames within JS packages.
- Rust: Follow rustfmt defaults; keep code clippy-clean. Modules `snake_case`, types `PascalCase`, constants `SCREAMING_SNAKE_CASE`.
- Rust architecture rules live in The Dash Platform Book (`book/`). Read [book/src/contributing/coding-conventions.md](book/src/contributing/coding-conventions.md) before changing versioned behaviour, validation, errors, fees, or limits; it states each rule, why it exists, and links to the chapter with the mechanics. Key rules: shipped `vN` modules are frozen and new behaviour is a new `vN` selected only by the unreleased protocol version's tables; numbers go in `SystemLimits`, fees in named `FEE_VERSION*` schedules; `platform_version` is the last parameter; no `unwrap`/`expect` on block-execution paths (a panic halts the chain); imports at the top, no inline `crate::` paths; latest-generation tests use `PlatformVersion::latest()`.
Expand Down
Loading
Loading