docs(windows): explain native pilot execution, signing limits and EXE build
davoodmehraban89 committed
Oct 30, 2026 at 23:41 UTC
0787382bc2e949b8296faa8f12a43621f1203539
1 file changed
+54
backend/desktop/README.md
new
+54
@@ -0,0 +1,54 @@
1
+# ARAM Native Windows Desktop Pilot — UNRELEASED
2
+
3
+**This is an early, native Windows desktop window, not the finished financial-statement application, not a website in a webview and not a released or approved accounting tool.**
4
+
5
+## Actual supported features (all read-only)
6
+
7
+- Native Python **Tkinter/ttk** Persian desktop window. Three functional notebook tabs: validation, financial-workflow limitations and help.
8
+- Five implemented native menu actions: **File → Choose XLSX (Ctrl+O); Run preflight (Ctrl+R); Clear selection (Ctrl+L); Exit (Ctrl+Q); Help → About (F1)**.
9
+- Three native buttons are alternate handles for Choose XLSX, Run preflight and Clear selection. Run preflight is **disabled** before choosing an eligible file. Canceling the picker does not discard an existing selection.
10
+- Uses the existing authoritative `aram_backend.pilot_workbook.preflight_pilot_workbook` in memory to display all reported issue counts and the first 3,000 issue details with sheet, row, field and error code. Warns if more than 3,000, rather than silently hiding them.
11
+- Accepts a local existing regular `.xlsx` file up to **20 MiB**, rejects symlinks and malformed/nonexistent paths; bounds XLSX ZIP metadata to 500 entries and **128 MiB uncompressed** before openpyxl processing. Does not import workbook rows, connect to SQL, post ledger entries, alter files, upload data, sign decisions, or generate financial statements.
12
+- A passing format preflight is **NOT proof of accounting truth**, completed mapping, approved notes/subnotes, approval, reconciliation, statement correctness or authorization to export/print. All those workflows are explicitly marked **not implemented**, without dead buttons.
13
+
14
+## Run from source on Windows 10/11 (Python 3.12 x64)
15
+
16
+Install a trusted 64-bit Python 3.12 distribution with Tcl/Tk. In PowerShell from the repository root:
17
+
18
+```powershell
19
+cd backend
20
+py -3.12 -m venv .venv
21
+.\.venv\Scripts\Activate.ps1
22
+python -m pip install -e ".[test]"
23
+python -m pytest tests/test_desktop_pilot.py
24
+python -m aram_backend.desktop_pilot
25
+```
26
+
27
+No SQL Server or FastAPI HTTP server needs to run for **this isolated preflight pilot**. That does **not** mean the eventual full financial application will not require a secure database or service architecture.
28
+
29
+## Build the unsigned Windows EXE
30
+
31
+```powershell
32
+cd backend
33
+python -m pip install "pyinstaller>=6.10,<7"
34
+.\desktop\build_windows_exe.ps1
35
+.\dist\AramPilot-UNRELEASED.exe
36
+```
37
+
38
+The script uses native Windows PyInstaller to create **`backend/dist/AramPilot-UNRELEASED.exe`** as a one-file, windowed application. It does not build an MSI, add an installer wizard, sign the binary, create a production release or modify the accepted Git branch. You must build on Windows for a Windows EXE; compiling on Linux is not equivalent.
39
+
40
+The dedicated `.github/workflows/desktop-windows-ci.yml` builds this same unsigned file on GitHub's Windows x64 runner for Draft PRs, runs Python tests, verifies `--self-test` and **programmatic Tk native menu/button/tab invocation** `--ui-smoke`, then attaches a short-retention **UNRELEASED** Actions artifact for inspection. An artifact is **not an approved release**. Windows SmartScreen warnings may appear for unsigned builds; do not bypass organizational security controls to execute it.
41
+
42
+## Automation boundaries and what has NOT been tested
43
+
44
+- `python -m aram_backend.desktop_pilot --self-test` is a **headless** smoke of the imported app/controller and rejection of invalid XLSX.
45
+- `python -m aram_backend.desktop_pilot --ui-smoke` invokes **real Tk menu/button callbacks** and traverses all existing tabs on a synthetic workbook. It does not click physical pixels, test real financial user data, or attest to desktop accessibility or layout across machines.
46
+- **Full mouse and keyboard GUI E2E** (Windows clean VM, 100% physical hit-target traversal, Microsoft UI Automation, accessibility, scaling 100/150/200%, focus order, error messages, I/O race and protected financial workflows) is **not yet verified**. User's original all-buttons request cannot be called complete merely because this small shell passes its current smoke.
47
+- One-file PyInstaller dependencies are not signed, pinned to exact hashes or audited for enterprise deployment. An external security and license compliance review is required.
48
+- Source data is never copied into the repository, GitHub artifacts or test fixtures. The synthetic XLSX generated by the smoke test is disposed of after the run.
49
+
50
+## Mandatory next product stages
51
+
52
+Native UI modules for real company/year selection, authorized login, ledger import, variance mapping and notes/subnotes; explicit review/approve with a real IdP and segregation-of-duties, atomic DB version/CAS apply and audited irreversible history; traceable primary statements, reconciliation and controlled XLSX/PDF export; then an independently signed Windows installer, clean-environment tests, backup and restore, software updates and three genuine C1/C2/C3 independent reviews.
53
+
54
+Keep Draft PR #59 **unmerged** and the protected accepted branch unchanged. See [Issue #58](https://github.com/davoodmehraban89/Aram/issues/58) for the full UI test coverage acceptance gate.