beck / Error indexSource

Error index

153 codes, every one the compiler can emit. beck explain error B0341 prints one at the terminal.

Reading the source B0100–B0122

CodeMeaning
B0100errorunrecognised character — The character is not a Beck token. Lexing continues past it so that one stray character does not hide every other problem in the file.
B0101errorinconsistent indentation — This line's indentation matches no enclosing block. Indentation is significant, and §2.6 fixes it as spaces only, four per level — a tab is a lint rather than a width question. Blank and comment-only lines have no indentation at all, so a comment at column zero does not close a block.
B0102erroran invisible control character in the source — A bidirectional formatting character (UTS #39 §4.1; CVE-2021-42574) or a zero-width no-break space away from the start of the file. These change how the text after them is *displayed* without changing what it means, so a reviewer and the compiler can read the same file differently. Write `\u{...}` if a string genuinely needs one.
B0103erroran identifier outside the ASCII profile — Beck's identifiers are `[A-Za-z_][A-Za-z0-9_]*`, which is UTS #39's ASCII-Only restriction level. Confusable and mixed-script identifiers are therefore not something the compiler checks for; they are something a program cannot contain.
B0110errorexpected a single form — `beck ast` and the macro-debugging paths read exactly one S-expression. A file with a second form at top level is a module, and is read with the module reader instead.
B0111errorunbalanced closing delimiter — A `)`, `]` or `}` with no matching opening delimiter.
B0112errorunclosed list — A list opened here and the file ended before it closed. The span points at the opening delimiter, which is the one worth looking at.
B0113errormismatched closing delimiter — The closing delimiter is not the one this form opened with — `(a]`. Both spans are reported: where it opened, and where it was closed wrongly.
B0114errorempty application — `()` has no meaning: an application's head is its first element, and there is none. Write `unit` for the unit value.
B0115errorunclosed string — A string literal opened and the line or file ended before the closing quote. Beck string literals do not span lines.
B0116errorunreadable character — The S-expression reader cannot begin an atom with this character.
B0120errorunexpected token — The Python-surface parser expected something else here; the message names what. One error per item: the parser recovers to the next top-level item, so a bad line does not make the rest of the file unparseable.
B0121errornesting is too deep to read — The source nests deeper than the front end follows — `beck_diag::depth::MAX_NESTING` levels of brackets, indentation or S-expression lists. The bound is a fixed count rather than a reading of the stack, so the same file is accepted or refused identically in every build; without it, deep enough input aborted the process with no span at all.
B0122erroran expression chains more operators than the reader will follow — A left-associative chain — `1 + 1 + 1 + …` — is flat in source and builds a left-leaning tree of the same depth, one level per operator. The Pratt loop that reads it does not recurse, so none of the parser's recursion counters sees the depth, and a long enough chain reached the end of the host stack in whatever walked the tree afterwards. The bound is `beck_diag::depth::MAX_BLOCK` — the same ceiling a block of sequential bindings takes, because it is the same axis: a flat run of things that costs one tree level each.

Macro expansion B0200–B0224

CodeMeaning
B0200errormacro is defined twice — Two macros in one module share a name, and a later definition would silently win.
B0201errormacro expansion did not terminate — Expansion ran past the depth limit — usually a macro that expands to a call to itself.
B0202errormacro expects an argument — A parameter of the macro received nothing at this call site. The macro's definition is reported as a secondary span.
B0203errortoo many arguments for macro — More arguments than the macro declares parameters.
B0204errormacro returns nothing — A macro body ends without `return quote: …`, so there is no template to instantiate.
B0205errora form is not available in a macro body — A macro body is pure compile-time computation — bindings, `if`, `for`, `while`, lambdas, calls and `quote:`. `match`, `try:`, `raise`, `parallel:` and declarations belong to the program the macro expands to, not to the expander.
B0206errorunquoting an unbound name — `$x` inside a template names something that is bound nowhere in this macro — usually a parameter that was renamed. `$e` evaluates `e` in the macro body's own environment, so anything the body bound is fair game.
B0207errora primitive may not be called while expanding a macro — Macro expansion is capability-restricted (`docs/02` §2.4): it is pure computation over the module's own definitions, so that what a compile produces depends on the source and on nothing else. The primitive named performs an effect — reading the clock, the environment, the network — and is refused *by name* so that reaching for one is a diagnostic rather than a spelling mistake.
B0208errorcannot find a name at compile time — The macro interpreter's environment is a whitelist: locals, the `def`s of this module and of the ones it imports, and the pure builtins. There is no name in it for a file, a socket or a process, which is the sandbox rather than an omission.
B0209errora macro body computed the wrong kind of value — A compile-time computation applied an operation to something it does not apply to — adding a Str to an Int, indexing past the end of a list, calling a value that is not a function. Macro bodies are evaluated before the checker runs, so these are caught by running rather than by typing.
B0210error`ui` needs an indented block — Write `ui:` followed by an indented element.
B0211error`ui` block is empty — A view must produce exactly one root element.
B0212error`ui` block has more than one root — An `Html` value is a single tree. Wrap the elements in one — a `div:` or `main:` block.
B0213errorthe form nests too deep to expand — The expander walks a form's arguments as deeply as they nest, and stops at the count the reader stops at. This is not `B0201`: nothing here says a macro failed to terminate — the two were one counter until they were separated, and a deep expression with no macros in it reported the wrong one.
B0214errormacro expansion produced too much — `B0201` and `B0213` bound how *deep* expansion goes; this bounds how much it makes. A macro that doubles its output at each of a few levels is shallow, terminates, and is enormous — eight nestings of a two-line macro is 256 copies of its argument — so the expander charges what it produces against a budget for the whole module. Reaching it means a macro is generating far more than any program in this repository does, and the fix is almost never a bigger budget.
B0215errora macro body ran too long — `B0214` bounds what expansion *produces*; this bounds what it *does*. A macro body is a Beck program running at compile time, so `while true:` in one is a compiler that does not finish — the budget is a bound on how long a compile takes, shared by the whole module because that is what a compile is.
B0216errora macro body recursed too deep — A compile-time call chain — usually a `def` that calls itself with no base case — went past the front end's nesting ceiling. A fixed count rather than a reading of the stack, for `adr/0012`'s reason: a diagnostic that depends on the build profile is not a diagnostic.
B0217errorthat is not an event the client listens for — A handler is a declarative attribute carrying a command, and the client interprets a closed set of them — `on_click`, `on_enter`, `on_submit`, `on_input`, `on_change`. Any other name reaches the browser as an attribute wired to nothing, which is why this is a refusal rather than a lint: there is no such thing as a custom event here.
B0218errorthat is not an HTML attribute — A `ui:` element carries its keyword arguments to the page as attributes, and a name HTML does not have is one the browser ignores — a page that quietly does less than it says. An attribute of your own is spelled `data_…`, which is HTML's own extension point; `aria_…` is admitted the same way.
B0219errorimage has no alt text — A screen reader announces an `img` by its `alt` attribute; without one it announces the file name, or nothing. `alt=""` is HTML's own spelling for an image that carries no meaning and is accepted — the check is for the attribute, not for a value, because a compile-time check knows the shape of the tree and not the text in it. `a11y_exempt="…"` turns it off on one element, with the reason written down.
B0220errorbutton has no accessible name — A `button` is named by its own text. One with no children and no `aria_label`, `aria_labelledby` or `title` announces nothing at all, which is the icon-button mistake. Any child is accepted, because whether an expression renders to empty text is not a question this stage can answer.
B0221errorform control has no label — An `input`, `select` or `textarea` is named by `aria_label`, `aria_labelledby`, `title`, or a `label(for=…)` pointing at its `id`. A **placeholder is not a label** — it disappears as soon as somebody types, which is WCAG 3.3.2's commonest real failure. An `id` is accepted as evidence of a label elsewhere, because a `ui:` block composes out of functions and this check sees one element at a time.
B0222errorclass is one slip from a utility — The class vocabulary is **open** — a name this compiler does not know is a name of your own, and is left alone — so this is a warning rather than a refusal. What it says is that the name is within one edit of a utility that would have had a rule, which is what `rounded-ful` is to `rounded-full`. `beck explain style` lists which of a page's classes are utilities and which are the program's own.
B0223errortyped macro over a declaration — A `typed macro` is expanded by the **checker**, and what its body is given is what the checker inferred an *expression* to be. A declaration has nothing inferred about it — a model's fields are in its syntax — so a macro that decorates one is an ordinary `macro`, which receives it before checking runs at all. `docs/02` §2.4 is the division, and `lib/json.beck`'s `derive_json` is the shape a declaration macro takes.
B0224errorrefused by a macro — A macro that reads a type and writes the code a value of it goes through meets types it has no rule for. `refuse("…")` is how it says so: the message is the macro author's, the position is the call, and the second label is the line in the macro body that decided. Without it such a macro emits code that fails to check for a reason nobody can trace back to the macro.

Names, types and effects B0300–B0399

CodeMeaning
B0300errornot a tier — `@on(…)` takes `client`, `server`, `data` or `any`.
B0301warningunsupported decorator — The compiler understands `@on(client|server|data|any)` and `@signal`. A warning rather than an error, so an unknown decorator does not stop a build — but it does nothing.
B0302errortype is declared twice — Two declarations in this module share a type name.
B0303errora top-level parameter needs a type annotation — Inference is intra-module and boundaries are declared (§3.6): a top-level definition's parameters are part of its published signature, so they are written rather than guessed.
B0304errorneeds a return type — Same reason as B0303: a top-level definition's result type is part of its contract.
B0305errorneither an effect nor a row — A `uses` clause names effect atoms and row aliases, and this is neither. `beck doc reference` lists the atom set; a `row Name = …` declaration in the module is what makes a name for a bundle of them.
B0306erroris not a rendering mode — `@render` takes `server` (Mode A: the server renders and the wire carries DOM patches) or `client` (Mode B: the browser renders and the wire carries the state).
B0307errorunsupported top-level item — This form is not something a module may contain at top level.
B0308errorexpected a type — A type position holds something that is not a type expression.
B0310errorcannot find type — No declaration, import or builtin of that name is in scope.
B0311errorwrong number of type arguments — A mention of a type carries one argument per declared parameter — `union Tree[T]` is written `Tree[Int]`, never bare `Tree`.
B0312errora type alias defined in terms of itself, or a name the language reserves — An alias is transparent, so a self-referential one describes no type — a `union` may be recursive, an alias may not. The same code covers a definition named after a reserved form such as `record`, which would compile and never be reachable.
B0313errora type parameter takes no type arguments — A type parameter of the definition or declaration being read names an unknown type, so it has no structure to apply arguments to: `T[Int]` says nothing, whatever `T` turns out to be at the call site.
B0314errora type parameter shadows an existing type — A type parameter is a name the definition or declaration invents, and one that shadowed an existing type would make its fields or its signature read as though they mentioned that type.
B0315errora type parameter is repeated — The same name appears twice in one type-parameter list, where the second would silently shadow the first.
B0316errora declaration cannot bound its type parameter — A bound says what a body may call, and a `model`, a `union`, a `newtype` and a `type` have no body. The definitions that take the type apart are where the bound belongs.
B0317errora declaration shadows a builtin type — `Int`, `Str`, `Bool`, `Float`, `Unit`, `Html`, `Attr`, `list`, `Map`, `Stream`, `Signal`, `Envelope`, `secret` and `internal` are the language's own type names, and a `model`, `union`, `newtype` or `type` may not take one. B0314 has refused the same shadowing for a type *parameter* since docs/27; a declaration was the production it did not cover, so the name meant the builtin in one signature and the declaration in the next (docs/63 §63.10).
B0320errortype mismatch — Unification failed; the message names what was being unified — an argument, a field, a result, or the two branches of an `if`. The branches of an `if` are reported as two alternatives rather than as actual-and-expected: typing one as the other's expectation is what refused SICP exercise 1.43 (docs/27 §27.2).
B0330warningstatements after `return` are unreachable — A `return` ends its block; anything after it never runs.
B0331errorloops are not available in Phase 1 — Everything is an expression and `var` is not yet mutable, so a loop has nothing to accumulate into. Use `map_list`, `filter_list` or `fold`.
B0332errora `quote` survived macro expansion — A template reached the checker, which means it was never instantiated. Quoted forms are data for a macro, not code.
B0333errora keyword argument outside a call — `name=value` is call syntax and has no meaning as an expression on its own.
B0334errorunsupported expression — This form has no meaning in expression position.
B0335errorhas no body — A bodyless `def` is a declaration, which is what a `.becki` interface file is made of; an ordinary module has to define what it declares.
B0340errorcannot find name in this scope — No local, parameter, top-level definition, import or prelude name matches — after hygiene, which means a name a macro introduced is not visible to code the macro did not write.
B0341errormatch is not exhaustive — The missing variants are listed. This is deliberate and load-bearing: adding a variant must break every fold that consumes it, which is what makes a missed migration a compile error rather than a 3 a.m. page.
B0342errorunsupported pattern — A `case` arm's pattern is a variant applied to field bindings, or `_`. This form is neither.
B0343errornot a constructor — The head of a pattern must be a variant of the union being matched.
B0344errorcannot tell which field this binds or sets — A pattern or record update names a field the compiler cannot resolve to the type in hand.
B0345errorthe tail of a list pattern is a name, not a pattern — The tail of a list pattern binds the rest of the list, so it takes a name or `_`. `[a, *[b, c]]` is `[a, b, c]` written twice over.
B0346errorcannot tell which model this record builds — A record literal's type comes from what is expected of it, and nothing here says which model it is.
B0347errorexpected a field or method name — The right-hand side of a `.` must be a name.
B0348error`with` takes named fields — Functional record update is written `t.with(done=…)`.
B0349errorno such field on this type — The field named in a `with` is not declared on the model being updated.
B0350errorno field or function for this type — A `.` reached neither a field of the receiver nor a function that could take it.
B0351errorwrong number of arguments — A call passes a different number of arguments than the function or constructor takes.
B0352errornot callable — The callee's type is not a function type.
B0353errorno such variant — The union being constructed or matched has no variant of that name. The type is named in the message.
B0354errorcannot construct this type — The name is a type, but not one with a constructor — an alias or a builtin.
B0355errorthis case can never match — Every value the arm matches is already matched by an arm above it, so it cannot run. A warning rather than an error: `case _` written after every variant of a union is a habit rather than a mistake.
B0356errorthe alternatives of an or-pattern bind different names — Every alternative of `a | b` has to bind the same names at the same types, because the body reads them without knowing which one matched.
B0357error`|` and `@` are only meaningful in a `case` pattern — Beck has no bitwise operators. `|` separates the alternatives of an or-pattern, `@` names the value a pattern takes apart, and neither means anything anywhere else.
B0358errorthe left of `@` is a name — `whole @ Circle(r)` binds `whole` to the value the pattern matched. What stands to the left of `@` is the name being bound.
B0359erroran identity declaration this compiler cannot derive a deployment from — `identity = external(issuer="https://login.acme.com")` and `identity = managed()` are the two forms, and a program declares at most one. An external issuer is an `https` URL — the key set's only integrity protection is the transport it arrives over — and its host has to be one an egress rule could name, because §6.5 derives the cluster's rule from it. `managed()` takes no arguments: it provisions a provider into the object graph, and the issuer is a Service the deployment names rather than the program.
B0360errorcannot be called inside a fold — A fold must be replay-pure, and this would make replay non-deterministic. Time is data on the envelope (`env.at`) and entity ids are minted at the edge: mint the id in the client's command and read it from the event.
B0370errorperforms more than its signature declares — The undeclared atoms are listed. A `uses` clause is the published bound, and widening it is a breaking API change — so the compiler will not widen it for you.
B0380errora trait cannot be declared here — The name already belongs to a type, the trait is declared twice, or the file is a `.becki` — a trait does not cross a module boundary, so an interface may not hold one.
B0381errora trait declaration is wrong — A trait holds `def` signatures with no bodies, each mentioning `Self` in a parameter so that a call has something to dispatch on. A method name belongs to one trait only.
B0382erroran impl does not match its trait — An impl writes bodies and parameter *names*; the types, the return type and the effect row are the trait's. Every method must be implemented, exactly once, and no others.
B0383errorcannot find the trait or the type this impl names — Both halves of `impl Trait for Type` have to resolve before the impl can be registered.
B0384errorconflicting implementations — Coherence: one impl per trait per type constructor, and no blanket impl over a type parameter — so what a call means never depends on which impls happen to be in scope.
B0385errororphan impl — An impl belongs with the trait or with the type. Implementing somebody else's trait for somebody else's type is what lets two modules supply one and disagree.
B0386errorno implementation can be chosen here — An implementation comes from a concrete type or from a bound on a type parameter — write `[T: Trait]` to say the parameter has one. A trait method and a bounded definition are both called rather than passed: the implementation is supplied at the call site, so a reference that is never called has nowhere to receive it.
B0387errorthe type does not implement the trait — There is no `impl Trait for Type` in scope for the receiver's type.
B0388erroran imported module implements a trait this program does not import — The impl is dropped, so its methods cannot be called here — a trait is a name, and a name is visible where its module is imported directly rather than through somebody else's import. A warning rather than a refusal, because a module may legitimately publish an impl for a trait the importer never names; import the trait's module to use it.
B0389errora block has more statements than the checker will follow — A block is a chain of `let`s however flat it looks in source, so the checker recurses once per statement and a long enough body reaches the end of the host stack. The bound is `beck_diag::depth::MAX_BLOCK` — much larger than the nesting ceiling, because 256 levels of nesting is pathological and 256 sequential bindings is merely a long function. It is a fixed count rather than a reading of the stack, so the same file is accepted or refused identically in a debug and a release build; without it, a long enough body aborted the process with no span at all.
B0390errorthe expression nests too deep to check — The checker walks an expression and a type as deeply as they nest, and stops at `beck_diag::depth::MAX_NESTING` levels — the same count the reader stops at, because the checker can be handed a tree a macro produced rather than one anybody typed. Everything downstream walks the `Core` this pass built, so it is bounded by the same number.
B0391errora raised value must have a declared type — `raise` performs `raises(T)`, and the atom names `T` so that a handler can say what it catches. A builtin will not do: `raises(Int)` would make every integer failure in a program the same failure, and a handler could not tell them apart.
B0392errornothing here can fail, and nothing says what this would catch — A `try:` reifies one failure into a `Result`, and it takes the error type from the enclosing signature's `Result[T, E]` where there is one and from the block's own row where there is not. Neither said anything here. Either the call you meant to make is not there, or the `try:` is left over from a signature that has stopped failing — which is the good case, and the diagnostic is how you find out.
B0393errorthe block can fail in more than one way, and nothing says which to catch — A `Result[T, E]` has one error type, and a `try:` catches one — the rest keep travelling, which is what makes a handler composable. Here nothing named which: give the enclosing definition a `Result[T, E]` return type, and the handler catches that `E`.
B0394errorthe row is declared twice — Two `row Name = …` declarations with the same name. A row alias is a name for a bundle of effect atoms, and a second one would make every `uses` clause mentioning it ambiguous.
B0395errorthe host of an outbound call has to be written at the call site — `http_fetch` performs `net.out(host)`, and §6.5 derives the cluster's egress policy from that atom and nothing else. A host computed at run time is an outbound call the deployment cannot be told about, so the argument is read where it is written. Compute the path, the port, the headers and the body; or take a closure, so the caller names its own host and the row carries the atom out.
B0396errorthat is not a host an outbound call can name — The host becomes a NetworkPolicy peer and a `uses net.out(…)` clause, both of which are written as bare DNS labels — so a scheme, a port or a path in it is a name neither could carry. `origin` is refused for a different reason: it is the one outbound atom a client tier discharges, and a client reaches its own server over the command channel.
B0397errora parallel scope has fewer than two children — A `parallel:` scope runs its bindings as children. With one there is nothing to run it alongside, and with none there is nothing to run — either way the form is claiming a concurrency it does not have, and an ordinary block says the same thing without the claim. The tail is everything after the last binding, so a scope written with its work in the tail has no children either.
B0398errora child of a parallel scope names another child — The children of a `parallel:` scope run together, so none of them can see another's result — a child that could would have to run second, and then it is not a child but a next line. Move the reader into the scope's tail, which runs after the join with every child's result in scope, or out into a second scope below this one.
B0399errora child of a parallel scope performs an effect another child could observe — The claim a `parallel:` scope makes is that its answer does not depend on the order its children ran in, and an effect on state the program holds — the log, the document, the merge point, a file, an external store — breaks it: two children appending to the log in the other order is a different log. `net.out(host)` is not on that list and is the case the form exists for. Do the shared-state part in the tail, which runs once, after the join.

Placement B0400–B0405

CodeMeaning
B0400errorperforms effects no single tier can discharge — Each tier discharges a fixed set (§3.3). A row no tier covers has to be split across definitions that can each be placed.
B0401errorplaced on a tier that cannot discharge an effect it performs — The written `@on(…)` and the inferred row disagree. The diagnostic names the atom, the tier, and the tiers that could discharge it. `ingress` is the merge point and only the server holds it; `durable` is the data tier's; `dom` is the browser's.
B0402errora fold function must be replay-pure — The function reached by a `fold` performs effects that replay would not reproduce. Both the fold and the definition are reported.
B0403errora program has exactly one merge point — A second `merge_clients()`. The merge point is where time and nondeterminism enter; two of them would mean two total orders, and replay would no longer be a function of the log.
B0404errorcannot be unplaced — `@on(any)` means every tier, and an atom in the row is not discharged on every tier. The fix-it names the tiers that can.
B0405erroronly a component can say where it renders — `@render` was written on something that is not a `Signal[Html]`. A definition is unplaced code compiled to every tier that needs it (§3.3); rendering is decided per component.

Placement and security B0410–B0412

CodeMeaning
B0410errorruns on the client, so its value must be Sendable — This value crosses to the browser, and §3.5's claim is that the compiler proves a secret cannot. The offending field and the path that reaches it are both named — `beck explain flow <Type>` prints the same walk.
B0411errordurable, so its state must be storable — The log is the only description of this program's history; a value it cannot read back is a state replay would not reproduce.
B0412errorrequires a capability nothing can discharge — A `Session` reaches exactly one place in a Beck program: the validator `decide` is given, which is the only function handed a `Proposal`. Authority is one chokepoint (§3.5), so a capability required outside it has no holder.

The signal graph and the slicer B0500–B0524

CodeMeaning
B0500errorthis program has no merge point — A Beck application is a fold over an event stream, and the stream starts at `merge_clients()`. Not an error for a library: this code, with B0501 and B0505, is what says a module is a domain module rather than an application.
B0501errorthis program has no durable state — `durable(fold(f, init, s))` is what makes the log a database.
B0502error`durable` must wrap a `fold` — Only a fold has an accumulator to persist.
B0504errorevents must come from `decide` — The fold has no chokepoint upstream of it. `decide` is the sole consumer of ingress and the one place a command becomes an event — §3.5's "authority is one chokepoint".
B0505errorno signal is placed on the client — `page` is the tier crossing: a `Signal[Html]` the browser subscribes to.
B0506errornot a signal — A signal's inputs are other signals. A function is applied *through* a construct — `signal_map(s, f)` — rather than named as an input.
B0507errornot a signal construct — §3.7's signal vocabulary is `merge_clients`, `filter_map`, `fold`, `durable`, `signal_map`, `map2`, `per_session` and `decide`.
B0508errorunsupported signal expression — A signal is a node in the dataflow, not a computation. The computation goes in a `def` and the signal names it: `summary: Signal[Summary] = signal_map(counts, summarise)`.
B0509errora signal defined in terms of itself — The cycle is printed. A cycle through a `fold` is sound — an accumulator is a value, so the recursion has a bottom, which is why `events → todos → events` is legal. One with no fold in it has no first value to compute from.
B0510errortwo signals are the page, and there is no router yet — The slicer will slice both; the runtime serves one document per connection, and choosing between them is routing — a Phase 3 client bullet that is not built.
B0511errora program has one authority chokepoint — A second `decide`. §3.5 rests on validation being one place: two of them are two answers to "may this actor do this", and the log would record whichever ran.
B0512errorthe chokepoint does not read a durable fold — `decide` threads the accumulator through validation, so what it reads has to be one — that is what makes first-writer-wins and ownership decidable (§3.7).
B0513errora fold that is not durable — Its accumulator has nowhere to live across a restart. The log is what survives, and `durable` is what says an accumulator is folded from it.
B0514errorrenders differently for each actor, so it cannot render on the client — The page reads who is asking — `session.actor` or `session.claims` — so it filters, scopes or hides by identity. `@render(client)` sends the browser the state rather than the page, which would hand every actor what the filter was removing (docs/94 §94.2). Reading `session.path` is not this: the browser chose the route and already holds the state, so a page that varies by route is eligible (docs/94 §94.3).
B0515errorthe chokepoint reads `presence`, which is not in the log — Who was connected when an event was recorded is written down nowhere, so a `validate` that decided from the roster would decide one thing now and another on replay. Record the fact instead: propose a command when a client arrives, and decide from the state that fold produces.
B0516errorreads `presence`, so it cannot render on the client — `@render(client)` sends the browser the accumulator, and who is connected is in neither the accumulator nor the log — it is a fact the server holds about its own sockets (docs/48 §48.9).
B0517errorthe chokepoint reads `freshness`, which is not in the log — How many of a client's commands were in flight when an event was recorded is written down nowhere, and on replay nothing is in flight at all — so a `validate` that decided from it would accept a command today and refuse it on the way back. Decide from the accumulator, which says the same thing now and on replay.
B0518errorreads `freshness`, so it cannot render on the server — §3.7's freshness dimension is a client's account of the commands it has proposed and not yet had confirmed. A server renders what it has recorded, so its answer is `Confirmed` at every position of every log and the page's other branch would be unreachable. This is `B0516` from the other side: `@render(client)` is what makes a guess possible, and therefore what makes saying so possible (docs/94 §94.5).
B0519errora fold over the log that is not `durable` — The stream this folds is the log's, so its accumulator *is* a function of the log whatever the program calls it: every event on it was validated and recorded, and replay would reproduce this state whether or not anybody asked. Declining to write it down does not make it ephemeral, it makes it a state the log can reconstruct and the process cannot. `docs/10` D30 is the rule this enforces — **ephemerality comes from the stream, never from the absence of a `durable` wrapper** — and it corrects D1, which named the right problem and the wrong mechanism. State that should not survive a restart folds gestures (`gestures(step, init)`), which are never recorded; state folded from events is `durable(fold(…))`.
B0520errorthe chokepoint reads `awareness`, which is not in the log — `B0515` for the roster that carries a payload. What each connection was contributing when an event was recorded is written down nowhere, so a `validate` that decided from it would decide one thing now and another on replay. Record the fact instead: propose a command when the thing you are deciding from happens, and decide from the state that fold produces.
B0521errorreads `awareness`, so it cannot render on the client — `B0516` for the roster that carries a payload. `@render(client)` sends the browser the accumulator, and what every *other* connection is contributing is in neither the accumulator nor the log — the runtime holds it, one row per socket.
B0522errorreads a `gestures` fold, so it cannot render on the server — `B0518` about the other fact only a client holds. A gesture is one client's movement of its own interface — not proposed, not validated, not recorded — so it never reaches a server, and a page rendered there would show the interface state's initial value at every position of every log with every gesture-dependent branch unreachable. `docs/10` D30 orders the homes for interface state and puts this one fourth: a page that reaches for a client-local fold and cannot render in the browser usually wants markup the platform already knows (`<dialog>`, `popover`, `<details name>`) or the route on the `Session`, both of which survive a server render and cost nothing.
B0523errorthe chokepoint reads a `gestures` fold, which is not in the log — `B0515` and `B0520` for D30's client-local interface state, and the clearest case of the three. A gesture is never proposed, so no `validate` ever saw one, and never recorded, so no replay can reach one — the log holds no trace that it happened. An event whose existence depended on whether somebody had a panel open would be unreproducible by construction. If interface state should decide an event then it is not interface state: propose a command when it changes, and decide from the fold over the events that produces, which is D30's fifth home.
B0524errora variant is both a command and a gesture — A handler in the page carries the constructor it builds — `on_click=Open` is the value `Open`, serialised — and the client routes on its variant name: a name in the gesture union is folded where it was made, and a name in the command union is proposed to the server. A name in both would make `on_click` mean whichever decoder ran first, which is a page whose buttons do one of two very different things for a reason nobody can read. The two unions are different types and the fix is to say so: rename one.

Modules and interfaces B0600–B0605

CodeMeaning
B0600errorhas a body, so it is not a signature — A `.becki` publishes what a module offers, not how it does it. Regenerate it with `beck iface`.
B0601errordefined in more than one module — Phase 2 links modules into one namespace and has no qualified reference to tell two definitions apart, so a clash is an error rather than a shadowing rule.
B0602errora module imports itself, directly or through a cycle — A module's interface is derived from its body, so a cycle would mean each module needed the other's contract before either had one. The cycle is printed.
B0603errorcannot find module — The loader looked for `<name>.becki` and `<name>.beck` beside the root module, and for a standard-library module of that name, and found neither.
B0604errorhas an interface but no implementation — An interface is enough to compile against and never enough to run. `beck check` and `beck iface` work against a `.becki` with no `.beck` beside it — that is what §3.6's separate compilation is — so this is reported where a runnable program is produced, and for the root module wherever it is read, because a project whose root is a contract is not a program at all.
B0605errordoes not match its published interface — The checked-in `.becki` and the module compile to different digests. Regenerate it with `beck iface`, and review the diff — the difference is an API change.

Tests written in Beck B0700–B0708

CodeMeaning
B0700errora test block performs effects — A test block's own row must be empty: an expectation is a pure question about a state, a log and a page. Effects belong to the *subject*, and §21.3 stubs those.
B0701errora property parameter needs a type — The generator is type-directed, so it works from the parameter's declared type. A `property` with no types has nothing to generate.
B0702errornot a tier, or not an effect atom — `expect place(name) == tier` takes a tier, and a `stub` names an effect atom.
B0703errornot something a stub can stand in for — Time, ids and persistence are not stubbed in Beck and there is nothing to write: the clock is data on the envelope, ids are minted at the edge, and the durable fold is real and in memory.
B0704errornothing in this program performs this atom — The stub would never be reached. The complete list of what a program touches is its effect rows, and this atom is not among them.
B0705erroronly `given`, `when`, `stub` and `expect` may appear in a test — §21.2: a test names a log, an input and an expectation — there is no fixture to build and no `setUp` to write.
B0706errora clause needs something this program does not have — The state a test arranges is a fold over the program's own event stream, so a program with no `merge_clients` → `decide` → `durable(fold(…))` has nothing for `given` and `when` to mean.
B0707erroran atom is performed by more than one definition, so a stub cannot answer from the call — The performers are named. A stub is a value for an effect atom; where two definitions perform the same atom with different result types, one value cannot serve both.
B0708errora stub raises what the definition it stands in for cannot — A stub stands in for a definition, so it may answer the way that definition may answer — failure included, because a `raises(E)` the signature declares is an answer rather than an act. Callers were type-checked against the row the signature publishes, so a raise it does not declare would unwind through code that provably cannot fail.