Repository navigation
Run the gates on bun 1.4.2, whose bun:ffi keeps OpenTUI alive on Windows - #31
Merged
Merged
Conversation
On Windows, bun 1.3.14 crashed at random in the tests of the app. The fault address was the entry of a native callback of bun:ffi: the event callback that opentui.dll calls when the text of an edit buffer changes. Bun 1.3 builds each callback with TinyCC in memory of the heap of Windows. A probe read the page of that callback during the tests: it started as PAGE_EXECUTE_READWRITE, and in a run that crashed it became PAGE_READWRITE before the call. Bun 1.4 builds its callbacks in the engine and no longer uses TinyCC for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy
The World and the TUI save four files whole: they write <file>.tmp and give it the name of the file. The error of a failed save was the error of the runtime. On Windows, bun 1.4.2 fails a write to a directory at the write, with "EISDIR: illegal operation on a directory, write" and no path, so the error no longer named the file. saveFile in @furb/engine is now the one save. Its error names the file and the file it writes first, and carries the error of the system as its cause. The World, the view of a session, the preferences and the workspace list save through it, and a test holds the law for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy
uael
marked this pull request as ready for review
September 24, 2026 07:04
uael
added a commit
that referenced
this pull request
Sep 24, 2026
…mage (#34) * Declare that the TUI needs bun 1.4.2 or later The bun:ffi of bun 1.3 builds its callbacks with TinyCC. On Windows, their pages lose the right to run code, and a call into OpenTUI then crashes the TUI (#31). The package of the TUI now declares bun 1.4.2 as its floor in engines. The README of the TUI and the root README say it too. The binding keeps bun 1.3.0 as its floor, since no file of it uses bun:ffi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy * Name the bun versions on which rejects hangs in the app test The test catches the rejection of an unknown model by hand, since the rejects of bun hangs on a rejection that a message of the worker brings. The comment named bun 1.3 alone. The plain rejects assertion also timed out after 30 seconds on bun 1.4.2, the version the gates run (#31), while the caught form passes there. So the catch stays, and the comment names 1.3.14 and 1.4.2, the two versions on which the hang was seen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy * Give the checkout of a python task the poetry of its image The steps of textual-kitty-key-phases and tomlkit-toml-table-converters call poetry, which this host does not hold. So the step failed, and the checkout had no pytest and none of the dependencies of the task. The verifier of tomlkit then ran no test, and its reference solution scored 0. The rig already reads what the python of the image holds from the layers of the image. Each of the four images whose Dockerfile names poetry holds poetry 1.8.2. So a seed now installs pip and poetry in the interpreter of the checkout, at the versions the image holds, under constraints.txt. This is done per task and not by the tools verb, since the version comes from the image of each task. With virtualenvs.create false, that poetry installs into the interpreter, as in the image. The config of poetry stands in the workroot, so a step does not change the config of the host. A seed of each of the two tasks now installs its dependencies, and the reference solution of each scores 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Main is red on Windows. Bun 1.3.14 crashes at random in tui/test/app.test.ts, with
panic(main thread): Segmentation fault at address 0x...AA2(for example main run 35958719955, job 107502670392). The stack is opentui.dll:editBufferSetTextFromMem, then the emit ofeb_content-changed, then a call through the event callback of the edit buffer into no module. #29 took OpenTUI out of the engine worker, and the crash stayed.The fault address is the entry of a bun:ffi callback. On Bun 1.3, every JSCallback and dlopen wrapper is code that TinyCC builds on a page boundary, so a callback entry has a fixed page offset. On Windows, OpenTUI's event callback is at
...aa2, the suffix of every crash. Bun 1.3.14 takes that code memory from the heap of the process on Windows (the defect that oven-sh/bun#32013 describes, closed unmerged). A probe (run 35959839788, job 107505859740) ran the app tests 6 times on 1.3.14 and read the page of each OpenTUI callback with VirtualQuery. The page starts as PAGE_EXECUTE_READWRITE. In a run that crashed, it became PAGE_READWRITE during the second test, as part of a larger read-write region, and the process then crashed on a callback entry. 3 of the 6 runs crashed. The probe does not show which call resets the protection. It shows that a live callback loses the right to run.Bun 1.4 builds dlopen, JSCallback and linkSymbols in the engine and uses TinyCC only for
cc()(oven-sh/bun#35246). This PR runs the gates on Bun 1.4.2, the latest release. The lockfile does not change under 1.4.2, and OpenTUI 0.5.11 and the napi addon pass every gate on it. On a probe branch of this PR (run 35962664973), the same 6-time loop of the app tests passed 6 of 6 in each of three Windows attempts (jobs 107514389389, 107519591645, 107524083112). The Windows job of this PR passed three times in a row (run 35962657648, jobs 107514362978, 107518493962, 107523705553).Bun 1.4.2 on Windows fails a write to a directory at the write, with
EISDIR: illegal operation on a directory, writeand no path. Two tests that expect the error of a failed save to name the file went red.saveFilein @furb/engine is now the one save: it writes<file>.tmp, gives it the name of the file, and throws an error that names the file, with the error of the system as its cause. The World, the view of a session, the preferences and the workspace list save through it, and each has a test.One test timed out once on Windows under 1.4.2: "Alt+Enter queues a message, and leaves Python input and a program under edit in the composer", at the 5 s default, in job 107508754737. It passed in every later Windows run, in about 0.9 s. The engine of the package keeps
"bun": ">=1.3.0", since the binding does not use bun:ffi.🤖 Generated with Claude Code
https://claude.ai/code/session_01WTTfvMcezhhJksW53iz2Vy