Skip to content

fix(ci,build): repair v2.1.0 Windows installer build and CI test failures - #6

Merged
yswef merged 6 commits into
mainfrom
arena/414efc0b-faster-pc
Nov 30, 2026
Merged

yswef merged 6 commits into
mainfrom
arena/414efc0b-faster-pc

Conversation

@yswef

@yswef yswef commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

ملخص

يصلح هذا الطلب فشل بناء الإصدار v2.1.0 وفشل اختبارات CI على main، مع معالجة مشاكل محتملة مرافقة.

1) فشل بناء الإصدار v2.1.0 — خطوة Build Setup.exe with Inno Setup

السبب الجذري: packaging/installer.iss (أُضيف في #4) لا يطابق مخرجات البناء الفعلية:

  • SetupIconFile=..\assets\faster_pc.ico → الملف غير موجود (الحقيقي app_icon.ico).
  • [Files] Source: ..\dist\Faster PC\* → المجلد غير موجود؛ faster_pc.spec يبني ملفًا واحدًا dist\FasterPC.exe.
  • MyAppExeName "Faster PC.exe" → الاسم الخاطئ (الصحيح FasterPC.exe)، فكل اختصارات [Icons]/[Run] تشير لملف غير موجود.
  • نتيجةً لذلك فشلت الخطوة، وتخطّى سير العمل رفع المخرجات وإرفاقها بالإصدار (لا يوجد release باسم v2.1.0).

الإصلاح: تصحيح المسارات/الأسماء، وجعل الخطوة تفشل برسالة واضحة (pwsh مع بحث عن ISCC)، وتشغيل بناء ويندوز على كل PR حتى لا يفشل الإصدار متأخرًا، وتحديث version_info.txt إلى 2.1.0.0، ودعم بناء Setup.exe اختياريًا من build_exe.bat.
✅ تم التحقق: سير العمل Build Windows executable على هذا الفرع أكمل كل الخطوات بنجاح (مخرج 97 MB يتضمن FasterPC.exe وFaster-PC-Setup.exe).

2) فشل اختبارات CI على لينكس (main و #5)

السبب الجذري: test_list_running_apps_returns_current_process يفترض أن اسم العملية الحالية يبدأ بـ python. عند تشغيل pytest كسكربت مباشر على لينكس يكون الاسم pytest، ففشل الاختبار على كل runner لا توجد عليه عملية python* أخرى (ونجح على ويندوز لأن pytest.exe يشغّل python.exe كعملية ابن).
الإصلاح: المطابقة بالـ PID. ✅ CI أخضر على 3.11 و3.12.

  • CI ينشر الآن تقرير pytest الكامل في ملخص الوظيفة (Job Summary) ليسهل تشخيص أي فشل قادم.

3) مشاكل محتملة أُصلحت

  • LoginWindow._lock(): مؤقت العد التنازلي لا يتوقف بعد انتهاء القفل → كان سيستمر بمحو أي رسالة خطأ جديدة كل ثانية. أُصلح مع اختبار انحدار.
  • سطر logger.warning("Login temporarily locked…") كان مُزاحًا إلى نهاية handle_register() (يُسجَّل خطأً عند إغلاق حوار إنشاء الحساب) — أُعيد لمكانه.
  • إزالة first_run_wizard_required الميتة وتحديث التوثيقات الداخلية بعد إلغاء المعالج.
  • جدول العمليات: تخطّي جلب الأيقونة لمسارات الشبكة (UNC) التي قد تحجب الواجهة.
  • سكربتات ويندوز: chcp 65001 في .bat وBOM في .ps1 حتى تظهر الرسائل العربية بشكل صحيح.
  • README/docs/CHANGELOG: تحديث ليعكس الدخول بحساب الأدمن الافتراضي وطريقة بناء Setup.exe، وإضافة سجل 2.1.0.

ملاحظة أمنية (لم تُغيَّر لأنها قرار تصميمي في 2.1)

حساب الأدمن الافتراضي yswef / yswef1234 ثابت في المصدر ويُعاد إنشاؤه عند كل تشغيل، ولا توجد واجهة لتغيير كلمة المرور — يُنصح بإنشائه في أول تشغيل فقط + إضافة تغيير كلمة المرور.

للنشر

بعد الدمج: إعادة توجيه الـ tag إلى commit الدمج (git tag -f v2.1.0 <merge> && git push -f origin v2.1.0) أو إنشاء v2.1.1، وسير عمل البناء سيرفع FasterPC.exe وFaster-PC-Setup.exe إلى الإصدار تلقائيًا.

yswef and others added 6 commits November 30, 2026 22:05
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…output

The v2.1.0 release build failed at the 'Build Setup.exe with Inno Setup' step,
so the artifact upload and the release attach were skipped. installer.iss pointed to
a non-existent icon (assets/faster_pc.ico), packaged a non-existent folder
(dist/Faster PC/*) although the spec produces a single-file dist/FasterPC.exe, and
referenced the exe under the wrong name ('Faster PC.exe').

- installer.iss: correct icon, exe name and [Files] source; add AppVerName and
  UninstallDisplayIcon.
- build-windows.yml: compile the installer with a hard failure (PATH fallback for
  ISCC), and also run the Windows build on pull requests so release tags cannot fail.
- version_info.txt: stamp the exe as 2.1.0.0 instead of 2.0.0.0.
- build_exe.bat: optionally compile the Setup.exe when Inno Setup is installed.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
test_list_running_apps_returns_current_process asserted that some running app name
starts with 'python'. When pytest is launched through its console script on Linux,
psutil reports the process as 'pytest', so the test failed on CI runners that had
no other python* process (both CI jobs on main failed, 2026-11-25). Matching on the
PID is launch-method independent.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…cons

- LoginWindow._lock(): the countdown QTimer was never stopped, so after the lock
  expired it kept firing every second and cleared any new error message shown by the
  form. It is now kept on the window and stopped when the lock ends (regression test).
- handle_register() ended with a stray 'Login temporarily locked' warning that had
  been displaced from _lock(); moved back.
- Remove the dead first_run_wizard_required() helper (the wizard flow was replaced by
  the default admin in 2.1) and refresh the module docstrings.
- Processes table: skip icon lookups for UNC/network exe paths that can block the UI.
- Add a test that ensure_default_admin() is idempotent.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The .bat scripts echo UTF-8 Arabic text but never switched the console to UTF-8
(mojibake on Windows consoles); the .ps1 scripts had no BOM, so Windows PowerShell
5.1 decoded their Arabic messages/shortcut description as ANSI. Added 'chcp 65001'
and a UTF-8 BOM respectively.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…2.1.0 changes

README/docs still described the first-run wizard that 2.1 replaced with a default
admin account, the badge still showed 2.0.0, and the CHANGELOG had no 2.1.0 entry.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@yswef
yswef marked this pull request as ready for review November 30, 2026 22:18
@yswef
yswef merged commit 24b55a2 into main Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant