scries: warn about scrying in +on-load

This commit is contained in:
Tinnus Napbus 2023-08-08 21:27:23 +12:00
parent b6c46f6c3b
commit 16e92f9324

View File

@ -3,8 +3,6 @@ title = "Scries"
weight = 40
+++
{% callout %}
This document mostly covers local scries. Remote scries have recently been introduced, and are documented in a [separate guide](/guides/additional/remote-scry).
## What is a scry?
@ -53,6 +51,15 @@ Gall has a single scry endpoint of its own to check for the existence of an agen
Gall agents can expose scry endpoints with any `care`, but most commonly they'll take a `%x` `care`. Gall handles `%x` scries specially - it expects an extra field at the end of the `path` that specifies a `mark`. Gall will attempt to perform a `mark` conversion from the `mark` returned by the scry endpoint to the `mark` specified. Note the trailing `mark` in the `path` will not be passed through to the agent itself.
{% callout %}
**Note:** you should not perform agent scries from within the
`++on-load` arm of your agent. All Gall agents are suspended during
kernel upgrade, and then reloaded one-by-one. If the agent you scry
wasn't reloaded before yours, the scry will fail.
{% /callout %}
## What is an endpoint?
"Endpoint" refers to a specific scry path in a vane or agent. They will sometimes informally be noted in documentation or source comments like `/x/foo/bar/baz` or maybe just `/foo/bar/baz`. The first part of the former example is the `care`, then the rest is the `path` portion as noted in the diagram earlier.