small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

fix(links): guard linked summaries and key preparations on the link group

Two defects in the per-recipient memory summary from 7b09235f: A hung LinkedSummaryPlugin blocked every later recipient. The host ran each summary in the calling process with no deadline, inside links' serial recipient loop. Daemon.linked_summaries now takes every recipient at once and answers by session. daemon/linked_summaries reads every recipient's plugins in one runtime observation, so a link change takes one admission slot whatever its size, then runs the plugins under one guardian per call. The caller starts the guardian unlinked and monitors it; the guardian traps exits, monitors the caller, and starts each plugin on a helper linked to itself. A plugin crash, or a linked child's exit that takes its helper down, reaches only the guardian and costs only that plugin's answer. The caller collects answers for two seconds, then kills the guardian, and its helpers die with it; a guardian whose caller stops kills itself and its helpers. Links posts every note after that one call. A link made while a session prepared could leave its memory out for good: the preparation published the snapshot memory took from the old group. The link group of the session's workspace now joins the inputs key that build_cached already reads before and after composing, so in nearly every case such a composition is refused, closed in its worker, and its waiters get the existing "composition inputs changed during preparation" error; the session's next preparation reads the new group. Each preparation stays one attempt and nothing new runs on the runtime actor. The key is read at two instants, so a link after the second read, or a link undone between them, can still publish the old group; that session reads the new group at its next open or reload, and the docs say so. linked_summaries_test covers a plugin that never returns beside one that crashes across eight recipients, a plugin whose linked child crashes, a caller killed while a summary hangs (no helper or guardian survives), the deadline killing the guardian and its helpers, and many link changes during one preparation with no summaries call. The new cases fail on the previous helper design and the preparation case without the key.


Author aly.codes
Date Commit Parent ee501479