fix(doctest): detect a crashed lez_core instead of passing silently - #42
Draft
dlipicar wants to merge 1 commit into
Draft
fix(doctest): detect a crashed lez_core instead of passing silently#42dlipicar wants to merge 1 commit into
dlipicar wants to merge 1 commit into
Conversation
"Confirm the module is loaded" asserted the bare substring
'"status":"loaded"'. capability_module is always loaded and satisfies
that substring on its own, so a lez_core that loaded and then crashed
still passed this step. The failure only surfaced several steps later
at the first `call`, as a bare RPC_FAILED with nothing explaining why.
That is exactly what the nightly has been showing on both platforms:
load-module -> {"module":"lez_core","status":"ok","version":"0.3.0"}
status -> {"name":"lez_core","status":"not_loaded", ...} PASSED
module-info -> {"name":"lez_core","status":"not_loaded", ...} PASSED
call name -> RPC_FAILED
Match lez_core's own entry so the step fails where the problem is, and
add a `cat logs.txt` right after loading — when a module subprocess
dies, the host writes the dlopen error and "Module process crashed"
there, and the spec only ever cat'ed the log *before* loading.
This makes the failure legible; it does not fix the underlying crash.
That is a missing shared-library dependency: an .lgx is a gzipped tar,
so Nix records no references for it, and a cache-substituted .lgx
arrives without the store paths its binaries dlopen(). Fix in flight as
logos-co/nix-bundle-lgx#7.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dlipicar
marked this pull request as draft
July 23, 2026 02:28
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.
The blind spot
"Confirm the module is loaded" asserted the bare substring
'"status":"loaded"'.capability_moduleis always loaded and satisfies that substring on its own, so alez_corethat loaded and then crashed still passed the step. The failure only surfaced several steps later at the firstcall, as a bareRPC_FAILEDwith nothing explaining why.That is exactly what the nightly has been showing on both platforms (run):
What this PR does
lez_core's own entry ("name":"lez_core","status":"loaded") so the step fails where the problem actually is.cat logs.txtright after loading. When a module subprocess dies, the host writes thedlopenerror andModule process crashedthere — and the spec only ever cat'ed the log before loading, so CI never captured the reason.What it does not do
This makes the failure legible; it does not fix the underlying crash.
The crash is a missing shared-library dependency. An
.lgxis a gzipped tar, so Nix's reference scanner sees no store paths inside it and records an empty closure for the.lgxderivation. A cache-substituted.lgxtherefore arrives without the store paths its binariesdlopen()— forlez_corethat iswallet_ffi'spyo3→libpython3.13. Cache miss (built locally) = green, cache hit = dead module, which is why this looked like a ~1/3 flake for months.Fix in flight as logos-co/nix-bundle-lgx#7 (verified against
logos-storage-module, which hits the same defect vialibcxx-16.0.6on macOS). Once that lands and this module re-pins, the crash should go away — and with this PR, if it doesn't, CI will say why.🤖 Generated with Claude Code