Skip to content

Docs: three reference statements disagree with the runtime (reply, constant-time compare, call deadline) #3480

Closed

Description

@nicolas-maman

Three statements in the reference documentation disagree with what the code does. Found by the review of PR #3477 (which fixes the same misreadings where the learning path made them) and filed for the next batch.

  1. docs/language-reference.md, "Reply Statement" says that omitting reply in a handler invoked with ? makes the caller time out ("ask timed out after 5000 ms"). The runtime ends the ask at once when the handler returns without replying (AETHER_ASK_NO_REPLY, runtime/actors/aether_step_barrier.h, "A handler that took an ask and returned without replying"), with "the handler returned without replying". The error table a few screens up in the same file already says so; the timeout is for a handler that has not returned.

  2. docs/stdlib-reference.md, std.cryptography says equality checks are not constant-time and "callers comparing hashes for security-sensitive cases need their own constant-time helper". std.cryptography.ct has one: ct.bytes_eq(a, b, n) and ct.bytes_eq_slice(a, b). The note should point there (examples/03-std/11-cryptography.ae uses bytes_eq_slice for an HMAC tag since One way to learn Aether, and main's red Linux leg: the path, batch 9's examples, a glossary, Rosetta Code, #3432 and #3481 #3477).

  3. docs/emit-lib.md, "Per-call resource caps" calls aether_set_call_deadline(50) "50 ms wall-clock" and the knobs per-call. The deadline is one instant per thread, now + ms when it is set (aether_caps_set_deadline_ms, runtime/aether_resource_caps.c), not a budget each call gets: every call made after that instant is cut at its first safe point until the host sets a fresh one or 0. The section should say that, as the header comment in libaether.h nearly does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions