Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
51 changes: 51 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"

reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true

path_filters:
- "!**/target/**"
- "!Cargo.lock"
- "!**/node_modules/**"
- "!**/.next/**"
- "!docs/IBM_SPSS_Statistics_Algorithms.pdf"
- "!specs/**"
- "!.specify/**"

path_instructions:
- path: "crates/**"
instructions: |
- Enforce 100% Safe Rust (no `unsafe`) and zero panics in non-test code (no `unwrap()`, `expect()`, `panic!()`, `unreachable!()`, `todo!()`, `unimplemented!()`).
- Verify strict downward architectural layering: L0 (statcraft_io) -> L1 (statcraft_core) -> L2 (statcraft_algo) -> L4 (statcraft_reporting) -> L5 (statcraft_syntax) -> L6 (statcraft_app).
- Ensure all Cargo build/test commands respect the `-j 1` Resource Guard.

- path: "crates/statcraft_app/src/**"
instructions: |
- Enforce Zero-Hardcode i18n: all user-facing strings, labels, and table headers must use Fluent `t!(...)` keys from `locales/en.ftl` and `locales/ru.ftl`.
- Enforce Vector-First UI: no emoji or unsupported Unicode symbols (`●`, `•`, `✓`, `✔`, `✕`, `✖`, etc.) that cause tofu squares in egui.
- Dialogs must use `DialogKit` (`DialogShell`, `VariablePicker`, `TransferButton`, `DialogActionBar`, `GroupBox`) rather than raw `ui.button` OK/Cancel controls.
- Respect file size limits (500 lines for dialogs/output_view, 1000 lines for editors, 1500 lines for `app.rs`).

- path: "crates/statcraft_algo/**"
instructions: |
- Ensure clean-room numerical stability (handle NaN, empty inputs, zero variance, and singular matrices via `Result`) and verify Golden Oracle tolerances (`<= 1e-6`).

- path: "website/src/**"
instructions: |
- Check Next.js App Router / React / TypeScript strict typing, SSR safety (`typeof window`), and English/Russian UI parity.

tools:
clippy:
enabled: true
gitleaks:
enabled: true
markdownlint:
enabled: true

chat:
auto_reply: true
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@ jobs:

- name: Run CI Quality Gates
run: cargo run -p xtask -j 1 -- ci

check-windows-arm64:
name: Cross-Check (Windows ARM64)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain (ARM64 target)
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-pc-windows-msvc

- name: Check StatCraft for Windows ARM64
shell: pwsh
run: cargo check --package statcraft_app --target aarch64-pc-windows-msvc -j 1
65 changes: 61 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
workflow_dispatch:
inputs:
tag:
description: 'Release Tag (e.g. v0.4.10)'
description: 'Release Tag (e.g. v0.4.11)'
required: false
default: 'v0.4.10'
default: 'v0.4.11'

permissions:
contents: write
contents: read

jobs:
build-windows:
Expand Down Expand Up @@ -63,6 +63,61 @@ jobs:
dist/statcraft-windows-x64-installer.exe
if-no-files-found: error

build-windows-arm64:
name: Build Windows (ARM64 Cross-Compile)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain (ARM64 target)
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-pc-windows-msvc

- name: Build StatCraft for Windows ARM64 in Release Mode
shell: pwsh
run: cargo build --package statcraft_app --release --target aarch64-pc-windows-msvc -j 1

- name: Package Windows ARM64 Artifacts (Portable & Installer)
shell: pwsh
run: |
# 1. Portable ZIP
New-Item -ItemType Directory -Force -Path staging
Copy-Item target/aarch64-pc-windows-msvc/release/statcraft_app.exe staging/
Copy-Item -Recurse locales staging/locales
Copy-Item README.md staging/
Copy-Item README.ru.md staging/
Copy-Item LICENSE-MIT staging/
New-Item -ItemType Directory -Force -Path dist
Compress-Archive -Path staging/* -DestinationPath dist/statcraft-windows-arm64.zip

# 2. Inno Setup Installer (ARM64)
$isccArgs = @(
"/DTargetArch=arm64",
"/DBinaryPath=..\..\target\aarch64-pc-windows-msvc\release\statcraft_app.exe",
"packaging/windows/installer.iss"
)
if (Get-Command iscc -ErrorAction SilentlyContinue) {
iscc @isccArgs
} elseif (Test-Path "C:\Program Files (x86)\Inno Setup 6\ISCC.exe") {
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" @isccArgs
} elseif (Test-Path "C:\Program Files\Inno Setup 6\ISCC.exe") {
& "C:\Program Files\Inno Setup 6\ISCC.exe" @isccArgs
} else {
choco install innosetup --no-progress -y
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" @isccArgs
}

- name: Upload Windows ARM64 Artifacts
uses: actions/upload-artifact@v4
with:
name: statcraft-windows-arm64
path: |
dist/statcraft-windows-arm64.zip
dist/statcraft-windows-arm64-installer.exe
if-no-files-found: error

build-linux:
name: Build Linux (x64)
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -287,7 +342,9 @@ jobs:

publish-release:
name: Publish GitHub Release
needs: [build-windows, build-linux, build-macos-arm64, build-macos-x64]
permissions:
contents: write
needs: [build-windows, build-windows-arm64, build-linux, build-macos-arm64, build-macos-x64]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
steps:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: SonarQube Cloud

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read

env:
CARGO_TERM_COLOR: always

jobs:
check-sonar-token:
name: Check SonarCloud Configuration
runs-on: ubuntu-latest
outputs:
has_token: ${{ steps.check.outputs.has_token }}
steps:
- name: Check SONAR_TOKEN secret
id: check
env:
SONAR_TOKEN_INPUT: ${{ secrets.SONAR_TOKEN }}
run: |
if [ -n "$SONAR_TOKEN_INPUT" ]; then
echo "has_token=true" >> "$GITHUB_OUTPUT"
else
echo "has_token=false" >> "$GITHUB_OUTPUT"
echo "SONAR_TOKEN is not configured yet. Skipping SonarQube Cloud upload." >> "$GITHUB_STEP_SUMMARY"
fi

sonarcloud:
name: SonarQube Cloud Scan
needs: check-sonar-token
if: needs.check-sonar-token.outputs.has_token == 'true'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Linux GUI Dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate Clippy JSON report
run: cargo clippy --workspace --all-targets -j 1 --message-format=json > clippy-report.json || true

- name: Generate LCOV coverage report
run: cargo llvm-cov --workspace --lcov --output-path lcov.info -j 1

- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
"-Dsonar.rust.clippyReport.reportPaths=clippy-report.json"
"-Dsonar.rust.lcov.reportPaths=lcov.info"
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [0.4.11] - 2026-12-02

### Added
- **Windows ARM64 Native Builds (`aarch64-pc-windows-msvc`, Spec 038):**
- Added automated Windows ARM64 cross-compilation job (`build-windows-arm64`) to `.github/workflows/release.yml`, publishing both Portable ZIP (`statcraft-windows-arm64.zip`) and native ARM64 Inno Setup installer (`statcraft-windows-arm64-installer.exe`).
- Parameterized `packaging/windows/installer.iss` (`TargetArch` / `BinaryPath`) to enforce `ArchitecturesAllowed=arm64` and `ArchitecturesInstallIn64BitMode=arm64` on ARM64 installers while preserving `x64compatible` defaults.
- Added `check-windows-arm64` cross-compilation check to `.github/workflows/ci.yml` so every Pull Request verifies `aarch64-pc-windows-msvc` compilation.
- Updated `website/` release matrix (`release.ts`, `use-release.ts`, `download-button.tsx`) with Windows ARM64 downloads and Chromium `userAgentData` high-entropy architecture auto-detection.
- **Automated PR Review & Static Analysis (CodeRabbit & SonarQube Cloud):**
- Added `.coderabbit.yaml` (schema v2) tailored to StatCraft's Safe Rust, Zero-Panic, `DialogKit`, Zero-Hardcode i18n, and Vector-First UI rules.
- Added `sonar-project.properties` and `.github/workflows/sonarcloud.yml` running `cargo clippy` JSON diagnostics and `cargo-llvm-cov` LCOV coverage upload to SonarQube Cloud (`kobaltgit_StatCraft`), plus README status badges.

---

## [0.4.10] - 2026-11-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.4.10"
version = "0.4.11"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["StatCraft Contributors"]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<img src="https://img.shields.io/badge/Oracle-SciPy%20(Δ%20%3C%2010⁻⁶)-blueviolet.svg" alt="Oracle: SciPy (Δ < 10⁻⁶)" />
<img src="https://img.shields.io/badge/i18n-EN%20%7C%20RU-informational.svg" alt="i18n: EN | RU" />
<a href="#4-statcraft-bridge--ai-agents-model-context-protocol--code-mode"><img src="https://img.shields.io/badge/MCP-Live%20Bridge%20%26%20Code%20Mode-6366F1?logo=anthropic&logoColor=white" alt="MCP: Live Bridge & Code Mode" /></a>
<a href="https://sonarcloud.io/dashboard?id=kobaltgit_StatCraft"><img src="https://sonarcloud.io/api/project_badges/measure?project=kobaltgit_StatCraft&metric=alert_status" alt="Quality Gate Status" /></a>
<a href="https://coderabbit.ai"><img src="https://img.shields.io/coderabbit/prs/github/kobaltgit/StatCraft?labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews" alt="CodeRabbit Pull Request Reviews" /></a>
<a href="https://remade.wiki/projects/statcraft/"><img src="https://remade.wiki/badges/listed-on-remade-classic.svg" alt="Listed on Remade" /></a>
<a href="https://app.lava.top/kobaltgit"><img src="https://img.shields.io/badge/Sponsor-Lava.top-FF5C35?logo=githubsponsors&logoColor=white" alt="Sponsor: Lava.top" /></a>
</p>
Expand Down
2 changes: 2 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<img src="https://img.shields.io/badge/Оракул-SciPy%20(Δ%20%3C%2010⁻⁶)-blueviolet.svg" alt="Оракул: SciPy (Δ < 10⁻⁶)" />
<img src="https://img.shields.io/badge/Локализация-EN%20%7C%20RU-informational.svg" alt="Локализация: EN | RU" />
<a href="#4-сетевой-мост-statcraft-bridge--ии-агенты-model-context-protocol--code-mode"><img src="https://img.shields.io/badge/MCP-Live%20Bridge%20%26%20Code%20Mode-6366F1?logo=anthropic&logoColor=white" alt="MCP: Live Bridge & Code Mode" /></a>
<a href="https://sonarcloud.io/dashboard?id=kobaltgit_StatCraft"><img src="https://sonarcloud.io/api/project_badges/measure?project=kobaltgit_StatCraft&metric=alert_status" alt="Quality Gate Status" /></a>
<a href="https://coderabbit.ai"><img src="https://img.shields.io/coderabbit/prs/github/kobaltgit/StatCraft?labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews" alt="CodeRabbit Pull Request Reviews" /></a>
<a href="https://remade.wiki/projects/statcraft/"><img src="https://remade.wiki/badges/listed-on-remade-classic.svg" alt="Listed on Remade" /></a>
<a href="https://app.lava.top/kobaltgit"><img src="https://img.shields.io/badge/Поддержать-Lava.top-FF5C35?logo=githubsponsors&logoColor=white" alt="Поддержать: Lava.top" /></a>
</p>
Expand Down
Loading
Loading