feat(jac-client): configurable PyInstaller sidecar build timeout via [desktop.bundle]#5576
Open
MusabMahmoodh wants to merge 7 commits intojaseci-labs:mainfrom
Open
feat(jac-client): configurable PyInstaller sidecar build timeout via [desktop.bundle]#5576MusabMahmoodh wants to merge 7 commits intojaseci-labs:mainfrom
MusabMahmoodh wants to merge 7 commits intojaseci-labs:mainfrom
Conversation
The PyInstaller sidecar build timeout was 10 minutes, which was too short for slow machines and first-run Windows builds where jaclang compiles ~20 modules on initial invocation. - SUBPROCESS_TIMEOUT_BUILD: 600 -> 7200 seconds (2 hours) - Update timeout warning message from '10 minutes' to '2 hours' - jaclang --version probe now uses SUBPROCESS_TIMEOUT_MEDIUM (60s) instead of SUBPROCESS_TIMEOUT_SHORT (5s); the probe can exceed 5s on first run when jaclang compiles its internal modules. Adds test_desktop_build_config.jac with two focused assertions and a release note under jac-client 0.3.13 (Unreleased).
Run 'jac format --lintfix' to satisfy the CI formatter. Cosmetic line-wrapping only; no behavioural changes.
Move the 0.3.13 unreleased bullet for the PyInstaller sidecar timeout raise into docs/docs/community/release_notes/unreleased/jac-client/5576.bugfix.md, per the new fragment-based release-notes process. The shared jac-client.md is restored to its pre-PR state; fragments are promoted into it at release time.
… via jac.toml Replace the hard-coded 2-hour bump with a 40-minute default that users can override per project. 2h was too long for genuinely stuck builds (you'd wait 2h before failing); 40m covers realistic cold-cache Windows + PyInstaller first runs while failing fast on stalls. - SUBPROCESS_TIMEOUT_BUILD: 7200 -> 2400 seconds (40 min default) - New [desktop.bundle] pyinstaller_timeout key in jac.toml, read via DesktopConfig.get_pyinstaller_timeout() - _bundle_sidecar / _bundle_sidecar_pyinstaller accept pyinstaller_timeout; the build call site reads it from DesktopConfig and plumbs it through - Timeout warning renders the actual configured value and points users to the jac.toml key so bumping it is discoverable - Tests cover: default value, config plumbing (class decl + impl + caller), and the warning text contract
Pre-commit hook 'ban-em-dashes' rejected the fragment and test on this branch. Both replaced with '--' to match the repo convention used in existing release notes and docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the hard-coded 2-hour timeout bump with a 40-minute default that users can override per project via
[desktop.bundle] pyinstaller_timeoutinjac.toml.Rationale
The original bug was a 10-minute timeout firing on first-run Windows builds (PyInstaller + cold Rust + ~20 jaclang modules compiling on first probe). The first cut bumped it to 2 hours, which fixes the immediate symptom but is a bad default:
40 minutes covers realistic cold Windows + PyInstaller first runs (typically 15–30 min) while failing fast on stalls. Users with unusually large plugin sets or slow hardware set their own limit in
jac.toml.Changes
SUBPROCESS_TIMEOUT_BUILD: 7200 → 2400seconds (40 min default).[desktop.bundle] pyinstaller_timeoutkey injac.toml, read viaDesktopConfig.get_pyinstaller_timeout()._bundle_sidecar/_bundle_sidecar_pyinstalleraccept apyinstaller_timeout: int = SUBPROCESS_TIMEOUT_BUILDparameter. The build call site reads the configured value fromDesktopConfigand plumbs it through.jac.tomlkey so raising it is discoverable:jaclang --versionprobe kept onSUBPROCESS_TIMEOUT_MEDIUM(60s) — unchanged from previous revision.Configuration
Test plan
test_desktop_build_config.jaccovers:SUBPROCESS_TIMEOUT_BUILDdefault is 2400.DesktopConfigdeclares and implementsget_pyinstaller_timeout().bundlesection withpyinstaller_timeout: 2400._bundle_sidecar_pyinstalleraccepts the parameter and uses it in the subprocess call.desktop_config.get_pyinstaller_timeout()and passes it through.jaclang --versionprobe still uses MEDIUM timeout.jac build --client desktopon a slow Windows host still completes within 40 min on a cold cache; if not, this is a signal that 40m is still too low and we should revisit.