Skip to content

Ariadne: a load:ed module's init: has (has? ...) - #912

Merged
transfix merged 4 commits into
masterfrom
fix/ariadne-mount-init-has
Oct 31, 2026
Merged

transfix merged 4 commits into
masterfrom
fix/ariadne-mount-init-has

Conversation

@transfix

Copy link
Copy Markdown
Owner

Found by cypkg's account window. A load:ed module whose init: calls (has? "sha256-hex") failed with NameError: 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 fails ari test.

Fix: Runtime::Impl::run_mount_init now passes Runtime::has to run_init, as the document's own init: and every action already do. A module's host is the same host, and its programs can already call every host verb, so answering has? there reveals nothing new.

Test: AriadneHostVerbs.AModulesInitAsksHas mounts a module whose init: asks about a registered verb (yes) and an absent one (no), with no warnings. It fails on master with exactly the reported NameError and passes with the fix. ariadne_host_test (23) and ariadne_runtime_test (217) pass locally.

Docs: docs/ARIADNE.md §5.7 and §7.4.

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).
Joe Rivera 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]>
@transfix
transfix enabled auto-merge (squash) October 31, 2026 17:48
@transfix
transfix merged commit a995337 into master Oct 31, 2026
21 of 27 checks passed
@transfix
transfix deleted the fix/ariadne-mount-init-has branch October 31, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant