orca
orca copied to clipboard
fix: pr-bug-scan validated finding from #2549
Automated fix-PR from pr-bug-scan for parent #2549.
Fixer status: FIXED_WITH_CODE_PROOF
Summary:
Blocked proof link: src/main/persistence.ts:259-265 (post-PR normalizeSshTarget): relayGracePeriodSeconds = currentGracePeriodSeconds ?? (legacy fallback) — the existing 10800 wins via ?? before the legacy synced grace is even considered
Typecheck: ?
Proof (from validator)
- C1 — proof_type:
code_analysis- trigger: User profile from prior version had remoteWorkspaceSyncEnabled=true, remoteWorkspaceSyncGracePeriodSeconds=0 (unlimited), and relayGracePeriodSeconds=10800 (the form default written by pre-PR SshPane.handleSave even though it was unused at runtime). User upgrades and reconnects to the SSH target.
- observable: After upgrade, a remote PTY left running with the SSH target disconnected gets SIGKILLed after 10800s instead of being kept alive indefinitely (or whatever the user's prior synced grace was). The user returns to the host expecting their long-running terminal to still be there and finds it gone.
- path:
- src/renderer/src/components/settings/SshPane.tsx pre-diff: handleSave always writes relayGracePeriodSeconds: graceSeconds (form default 10800) regardless of sync setting
- src/main/ipc/ssh.ts pre-diff lines 41-50: relayGracePeriodForTarget returns remoteWorkspaceSyncGracePeriodSeconds when remoteWorkspaceSyncEnabled is true, ignoring relayGracePeriodSeconds
- src/main/persistence.ts:259-265 (post-PR normalizeSshTarget): relayGracePeriodSeconds = currentGracePeriodSeconds ?? (legacy fallback) — the existing 10800 wins via ?? before the legacy synced grace is even considered
- src/main/ipc/ssh.ts:40-42 (post-PR relayGracePeriodForTarget): now simply returns target?.relayGracePeriodSeconds, so 10800 is the effective grace
- src/main/ssh/ssh-relay-deploy.test.ts:120-135 confirms relay launches with --grace-time = relayGracePeriodSeconds value
Generated by pr-bug-scan (proof-machine architecture). Human approval required before merge.