mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
2.3 KiB
2.3 KiB
Phase 2 Summary
Scope
Executed the IPC and process-management phase only.
Documentation used as source of truth:
docs/refactor/ARCHITECTURE_AUDIT.mddocs/refactor/ARCHITECTURE_RULES.mddocs/refactor/TARGET_ARCHITECTURE.mddocs/refactor/MIGRATION_PLAN.mddocs/refactor/SESSION_HANDOFF.md
IPC And Preload Decision
No IPC or preload layer was added.
This is intentional. The current architecture defines a zero-surface IPC model as the secure target because there is no custom renderer and no product requirement for desktop APIs to cross into web content.
To make that decision enforceable, a regression test now scans src/main and fails if main-process source introduces:
ipcMainipcRenderercontextBridgepreload
Process Management Changes
- Narrowed
NodecgProcessManagersostartNodecgProcessno longer returns the rawChildProcess. - Removed the public internal
getProcessescape hatch fromNodecgProcessManager. - Added explicit NodeCG process states:
idlestartingrunningstoppingstoppedfailed
- Added
getStateas the narrow observable process-management API. - Made NodeCG startup idempotent while an async startup is already in progress.
- Prevented new startup while process shutdown is in progress.
- Preserved process-tree termination through
platform-process-killer.ts. - Preserved
ELECTRON_RUN_AS_NODE,shell: false,windowsHide: true, and detached POSIX process-group behavior.
Security Notes
- No raw Electron IPC APIs are imported in production source.
- No preload script is configured or exposed.
- No renderer/main business logic boundary was added.
- No filesystem, process, shell, or update primitives were exposed to web content.
- BrowserWindow security settings from Phase 1 remain unchanged.
Verification
Commands run successfully:
npm run typecheck
npm test
npm run lint
Current test result:
55 tests passing
Additional sanity search:
rg -n "ipcMain|ipcRenderer|contextBridge|preload|nodeIntegration:\s*true|webSecurity:\s*false|\bany\b" src/main src/tests
Result:
- No production IPC or preload surface exists.
- No unsafe Electron settings were introduced.
- Remaining IPC/preload string matches are limited to the regression test that guards the zero-surface policy.