@davoodmehraban89 / Aram-2 Mirror · read-only
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 4, 03:00 UTC

codex/windows-native-pilot-shell-20261030
add-index-html-10623938925177053894 arena/094f314c-aram chatgpt-phase1b2-autopilot codex/adr-future-connectors-pi-v1 codex/aram-account-note-source-trace-20261031 codex/aram-actions-node24-maintenance-20261031 codex/aram-analyst-review-workbook-20261031 codex/aram-bs-candidate-statement-20261031 codex/aram-cash-flow-direct-candidate-20261031 codex/aram-clean-reference-year-integrity-20261030 codex/aram-cross-statement-controls-20261031 codex/aram-equity-changes-candidate-20261031 codex/aram-five-statement-cli-20261031 codex/aram-five-statement-integration-20261031 codex/aram-five-statement-orchestrator-20261031 codex/aram-gate3-coverage-target-guard-20261030 codex/aram-gate3-hidden-xlsx-guard-20261030 codex/aram-gate3-integration-validation-20261030 codex/aram-gate3-mapping-change-preview-20261030 codex/aram-gate3-stale-note-guard-20261030 codex/aram-income-statement-candidate-20261031 codex/aram-manifest-referential-integrity-20261031 codex/aram-mapping-source-parser-20261101 codex/aram-multidimensional-mapping-20261101 codex/aram-multistatement-mapping-20261031 codex/aram-pipeline-manifest-schema-20261031 codex/aram-readonly-mapping-coverage-20261031 codex/aram-reconciliation-review-gate-20261031 codex/aram-same-flush-fiscal-lock-20261030 codex/aram-synthetic-windows-demo-20261031 codex/aram-trial-balance-diagnostic-20261031 codex/aram-windows-background-detail-search-20261031 codex/aram-windows-detail-review-20261031 codex/aram-windows-five-statement-pilot-20261031 codex/aram-windows-statement-figures-20261031 codex/gate-2a-pilot-workbook codex/gate-2a-pilot-workbook-6864754244772568979 codex/gate3-authenticated-principal-boundary-20261030 codex/gate3-authored-draft-staging-20261030 codex/gate3-carry-forward-preview-20261023 codex/gate3-draft-staging-audit-20261030 codex/gate3-mapping-batch-freshness-20261030 codex/gate3-mapping-batch-review-20261030 codex/gate3-mapping-core codex/gate3-mapping-coverage-20261023 codex/gate3-mapping-excel-20261023 codex/gate3-note-mapping-review-20261023 codex/gate3-signed-year-scope-20261030 codex/gate3-unapproved-proposal-storage-20261030 codex/payvast-mapping-discovery-20261023 codex/phase-2a-backend-foundation codex/phase-2b-post-merge-record codex/phase-2b-source-registration codex/phase-2b-source-registration-12955190277775369594 codex/post-gate2a-control-reconciliation codex/post-pr18-acceptance-record codex/project-control-foundation codex/t1-repo-hygiene-20261023 codex/t2-ci-hardening-20261023 codex/t3-explicit-migrations-20261023 codex/t6a-readonly-diagnostics-20261023 codex/v1-01-safety-gate-hardening codex/v1-year-isolation-followup-20261023 codex/windows-native-pilot-shell-20261030 docs/aram-master-control-plan-20261111 docs/aram-roadmap-dashboard-20261030 docs/financial-statement-reconciliation-1402-1404-20261110 feat/gate3-governed-mapping-20261101 feat/gate3-package9-1-security-20261103 feat/gate3-package9-isolated-20261103 fix/password-unicode-validation-20261111 governance/aram-5-1-3-controls-20261030 governance/role-based-operating-model jules-1168663913887856558-73b8a885 jules-gate-2b-mapping-workflow-foundation-4137724387867065330 phase-1b1-audit-report-7365389436990903239 phase-2a-backend-foundation-10237597358138521261 phase1b2-postmerge-metadata-fix refactor/drg-parent-year-id-15088443704684163304 source-data-cleanup
md 6.73 KB

ARAM Windows native Desktop Pilot — safety and acceptance specification

Status: Proposed, unmerged Draft PR #59, child of unmerged Draft #57 exact head 6b6aca8883ad4902574cbf954d739e1a3bcf3967; ancestors #56→#55→#54→#53→#52→#51→#50→#26 and initial schema PR #25 also unmerged. Accepted source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914 unchanged.

User-authorized product goal

ARAM must ultimately ship as a Windows native desktop EXE/installer for preparing Iranian financial statements, rather than a mobile app, a fake "Coming Soon" template or a browser page merely wrapped by Electron/webview. The previous root index.html is quarantined, explicitly NOT approved for real accounting. There was no real GUI to click in audit Issue #58.

This focused PR builds the first real, explicitly limited native window using the Python standard library Tk/ttk and real existing Gate 2A in-memory XLSX preflight. It is a candidate shell, not a technology commitment for final production UX and not a financial application release. Tkinter enables fast, dependable proof of real Windows controls without adding a heavy web runtime or inventing financial reporting behaviors.

Actual workflows and affordances

  • Real native RTL-friendly Persian UI: header and visible UNRELEASED / no accounting approval banner; tabs Workbook validation, Blocked finance workflows, Help; native File and Help menus.
  • Named actions: file.open, file.validate, file.clear, file.exit, help.about. All have actual callable implementations. File open/validate/clear duplicated as three real native buttons. UI must not display a nonfunctional Apply, Approve, Export or Print button.
  • Shortcuts Ctrl+O, Ctrl+R, Ctrl+L, Ctrl+Q, F1. Validate menu item/button is disabled until a local XLSX is selected; invalid file selection resets selection/result, cancel keeps previous choice; Clear affects GUI state only and never deletes source files.
  • Controller accepts only a local existing normal .xlsx file (case insensitive) of 1 through 20MiB, explicitly rejects symlinks, and reads at most 20MiB+1, detecting any file that grows after selection. Before invoking openpyxl, inspect ZIP central directory metadata to reject more than 500 entries or 128MiB total uncompressed file-size claims. An invalid/corrupted workbook is passed to existing validator for structured INVALID_WORKBOOK issues.
  • Call existing aram_backend.pilot_workbook.preflight_pilot_workbook(content) completely in memory. Display validator issue codes, sheets, rows, fields, severity, messages and total counts. Cap visible detailed rows at 3,000 with explicit disclosure; do not silently hide excess. A success means structural/contract preflight, NOT actual financial correctness.
  • No database imports, source editing, upload, network, SQL Server requirement for this pilot, financial decision, mapping apply, statement generation/export or actual user authorization. All financial workflows beyond preflight displayed as not implemented.
  • No fabricated account balances, source figures, dates, review identities or approval stamps.

Test and Windows artifact contract

  1. Unit tests in backend/tests/test_desktop_pilot.py cover actual original file-byte SHA stability, controlled file selection, size/mimetype/path/symlink handling, invalid XLSX structured errors, stale-result reset on file change/removal, state clear without deletion, ZIP metadata limits, five action bindings and headless self_test. All test workbooks are ephemeral generated bytes, never real customer inputs.
  2. Actual Windows GitHub Actions workflow added as .github/workflows/desktop-windows-ci.yml with Windows x64 Python 3.12, pytest tests/test_desktop_pilot.py, PyInstaller onefile AramPilot-UNRELEASED.exe, frozen EXE --self-test, and frozen EXE --ui-smoke.
  3. --ui-smoke instantiates a real Tk window and programmatically invokes every new button and menu action (both File and Help), cycles all three notebook tabs and checks keyboard mappings, enablement, selection, results and exit. The file picker and message box are injected with synthetic, controlled implementations to avoid OS modal prompts in unattended CI. This is real Tk callback invocation, NOT pixel-level mouse testing, keyboard accessibility or acceptance of financial workflows.
  4. Upload unsigned Windows executable only as a short-retention (7-day), clearly UNRELEASED workflow artifact; not a release, tag, accepted binary, code-signing evidence or production installer. No EXE/ZIP binary committed to repo. Confirm artifact SHA, successful exact-head run and clean Windows VM/SmartScreen inspection before making any distribution claim.
  5. Existing Linux backend CI must remain green on exact final candidate head; Alembic 01→02→03→04 and reverse downgrade pass on disposable DB, compileall passes. PR diff only scoped allowed files; original accepted branch must not move. Independent C1/C2/C3 review and finance owner sign-off still required.

Limitations and next real implementation work

  • Excel validation is synchronous, large permitted workbooks may block GUI for a period; future worker/progress and cancel must be tested before production use.
  • Tk's built-in RTL and number formatting support is limited; verify Persian accounting tables and mixed-direction digits, accessibility, DPI scaling, focus order and Windows screen-reader support. Decide independently between richer Qt/PySide6 and Tk after prototype usability testing; do not conflate this first GUI with a final design-system choice.
  • Review input ZIP-bomb caps (declared sizes are not a sandbox); large workbooks may need streaming validated worker isolation.
  • Missing real enterprise IdP, user session, company/year state, account explorer, source ingest, Mapping Studio, note/subnote hierarchy, BS/IS/CF/EQ generation, reconciliation, immutable review decision, atomic CAS, Excel direct-write bypass closure, PDF/XLSX output, backups, signed Windows installer, restore and update path. No finance approve/apply control in this candidate.
  • No full physical mouse traversal, visual QA, high DPI/RTL or clean Windows install verified by source tests alone. The earlier UI QA audit had zero clickable controls because the only HTML was a quarantine notice; this PR introduces a small new set and must be re-audited.
  • SQL Server/Postgres and financial Gate 3 provider-specific controls still pending, as are parent PR merges and migration conflict reconciliation.

Acceptance remains blocked: no formal Gate 3 user acceptance, release, production EXE, corporate deployment or qualification. Draft PR #59 must not be merged merely due green CI.