Repository navigation
Ariadne: a load:ed module's init: has (has? ...) - #912
Merged
Merged
Conversation
run_mount_init ran the module's init: with no has? bound, so a module could not guard an optional host function the documented way (NameError at run time), while the load-time scan accepted the guard. It now binds Runtime::has, as the document's init: and every action do. Test: AriadneHostVerbs.AModulesInitAsksHas (fails without the fix).
added 2 commits
October 31, 2026 00:14
# Conflicts: # docs/ARIADNE.md
# Conflicts: # docs/ARIADNE.md
transfix
added a commit
that referenced
this pull request
Oct 31, 2026
…Requests no longer races the 10 s cap (#920) The test's work between two requests (a 30000-iteration loop) must outlast three drains, each a 0.1 s pump: 0.53 s optimized, but 9.5 s in a Debug build on an idle 32-core machine, so a Debug coverage lane on a busy runner ran past snapshot's 10 s settle and lost the second reply (seen on #912's package-linux / libcvc-debug, 3 of 3 retries). - --settle S (host_cli, any runtime): with the network on, snapshot waits at most S seconds for the document to go idle; default kDefaultSettleSeconds (10), as before. ari and arigl (window and --terminal) pass it to AppRuntime::settle. - The test keeps its workload and runs with --settle 120. Co-authored-by: nicotina-ci <[email protected]>
…nit-has # Conflicts: # docs/ARIADNE.md
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.
Found by cypkg's account window. A
load:ed module whoseinit:calls(has? "sha256-hex")failed withNameError: unknown function or special form: has?. The same call worked at the top level and in the module's own actions.Meanwhile the load-time free-head scan accepts
(has? ...)as the guard for an optional function. So a module couldn't use the documented guard without either a run-time error or a load warning, and that warning failsari test.Fix:
Runtime::Impl::run_mount_initnow passesRuntime::hastorun_init, as the document's owninit:and every action already do. A module's host is the same host, and its programs can already call every host verb, so answeringhas?there reveals nothing new.Test:
AriadneHostVerbs.AModulesInitAsksHasmounts a module whoseinit:asks about a registered verb (yes) and an absent one (no), with no warnings. It fails on master with exactly the reportedNameErrorand passes with the fix.ariadne_host_test(23) andariadne_runtime_test(217) pass locally.Docs: docs/ARIADNE.md §5.7 and §7.4.