Uh oh!
There was an error while loading. Please reload this page.
Fix/ios replay flicker - #555
Merged
Merged
Conversation
… onto Effect The CLI is Effect at the command layer but raw async below it. Three of those raw spots cost real correctness, so convert them and leave the rest alone. Leaves, each with only Effect callers: * credential-store spawns `security`/`secret-tool` through ChildProcessSpawner instead of Bun.spawn behind a bare catch. That catch made a broken keychain indistinguishable from a machine that has none; the cause is now logged before degrading. MapleConfig captures the spawner in `make`, the way it already captures `fs`, so MapleConfigValues keeps R = never. * `maple auth login --with-token` reads stdin through Stdio rather than a hand-rolled Promise over stdin events. Deliberately NOT Terminal.readLine: that waits for a readline "line" event and never resolves at EOF, so `printf tok | maple auth login --with-token` would hang forever. * update.ts drives tar/xattr through ChildProcess and its filesystem work through FileSystem. mapFsError detected EACCES via a bare `.code`, which a PlatformError does not expose, so the actionable "re-run the installer" message would have silently disappeared — it now also reads the PermissionDenied reason tag and the wrapped cause. Calibration child runner (archive.ts), converted as one unit so raw code never wraps Effect: * The `settled` flag, the setTimeout watchdog and the 500ms setInterval disk poller become a forked killer fiber racing a sleep against a sleep-first poll loop. The poll keeps its fail-loud catch INSIDE the poll so a read error still kills the candidate rather than silently killing the poller. * The group reap moves into a scope finalizer, so it runs on interruption and defects too. Previously it only ran from inside a timer callback, and a Ctrl-C mid-candidate orphaned the Maple grandchild. * `pgid` could be 0, and POSIX kill(0, sig) signals the CALLER's own process group — the CLI would have SIGKILLed itself. Guarded. * Completion still gates on the pipes draining, not on exit: exitCode alone resolves on "exit", which Node emits before stdio is guaranteed to drain. exitCode also FAILS on signal death, and every watchdog kill is a signal death, so that is collapsed to a null code — otherwise one killed candidate would abort all six signals instead of eliminating one matrix cell. * The closing reconcile keeps its ArchiveError instead of being orDie'd, and no longer masks a matrix failure the way the original `finally` did. runCandidateChild had no unit coverage at all (it was an unexported promise closure reachable only from the shell probes); it is exported now with four tests, including a group-kill test that fails if the reap is child-only. checkpoints.ts pins/locks, durable-files, serve.ts and the archives/migrations bulk stay raw: their callers are still promise-based, and converting them would mean either shims or a 15k-line diff.
The replay recorder snapshotted the key window with `drawHierarchy(in:afterScreenUpdates: true)`, which forces UIKit to commit and re-render the whole window off-screen, synchronously, before drawing. At the recorder's 1 fps that reads as a full-screen flash, so the app flickered constantly on every screen. Fixed in maple-swift 0.3.1. This picks it up, and with it 0.3.0's crash reporting as OTel exception spans and the foreground bound on `ui.screen`.
This branch carried its own copy of the CLI Effect refactor, which landed on main separately as #554. Every conflict was that duplicate, and main's copy is the later one in each case, so the conflicted files are resolved to main verbatim: - credential-store.ts — main writes the secret twice, because `security -w` asks the caller to retype it and a single piped line silently stores an empty password while exiting 0, then reads the credential back to prove the keychain actually owns it. This branch predates both. - update.ts — main's `__testables` also exports `extractTar` and `mapFsError`. - archive-candidate-child.test.ts — main splits drain-to-EOF and truncation into separate cases with a payload small enough that `/usr/bin/time`'s output cannot make the assertion platform dependent. What remains of this branch after the merge is one line: project.yml's MapleSwift pin, 0.2.1 -> 0.3.1. Main already resolved maple-swift to 0.3.1 in Package.resolved, so the pin was the half left behind.
🍁 Maple PR previewNote Preview resources were removed when this pull request closed. Final commit |
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 freeto 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.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.