Diagnostic index
Every diagnostic code the compiler can emit, with a one-line summary of the cause, grouped by category. Each code links to its own page: what the code means, how to fix it and an example where an explanation is written, the grammar rules it governs, and the Book pages that explain it. bynk explain <code> prints a code’s explanation in a terminal, and in VS Code the diagnostic’s Explain quick fix (or Bynk: Explain Diagnostic Code…) shows the same text in a panel, offline.
There are 908 codes in total. Every code is an error unless it is marked Warning or Hint.
Actors
Section titled “Actors”bynk.actor.bearer_identity_not_string_constructible— ABeareractor’s identity is not a string-constructible type.bynk.actor.bearer_missing_secret— ABeareractor does not name its signing secret.bynk.actor.binder_shadows_param— Abyactor binder collides with a handler parameter of the same name.bynk.actor.by_on_agent— Abyactor clause was placed on an agenton callhandler, which has no actor.bynk.actor.caller_not_admitted— A call is made from a context the callee’sCallerrefinement does not admit.bynk.actor.duplicate_sum_scheme— Two peers in a multi-actor sum share an authentication scheme.bynk.actor.foreign_context_name_unkeyable— A context declaring aForeignactor has a name no call key can be named from.bynk.actor.foreign_duplicate_secret— AForeignactor’s secret is also another actor’s secret in the same context.bynk.actor.foreign_identity_unsupported— AForeignactor declares anidentity.bynk.actor.foreign_missing_secret— AForeignactor does not name the secret its calls are signed with.bynk.actor.foreign_name_is_context_name— AForeignactor’s name could be read as a context’s name.bynk.actor.foreign_reserved_secret— AForeignactor’s secret uses aBYNK_CALL_edge key’s name.bynk.actor.foreign_secret_not_string— AForeignactor’s secret is not a string.bynk.actor.identity_not_sealed— An actor identity type is not a context-ownable (sealed) value type.bynk.actor.missing_by_on_call— Anon callhandler lacks the requiredbyactor clause.bynk.actor.missing_by_on_http— An HTTP handler lacks the requiredbyactor clause.bynk.actor.oidc_identity_not_string_constructible— AnOidcactor’s identity is not a string-constructible type.bynk.actor.oidc_missing_audience— AnOidcactor does not name itsaudience.bynk.actor.oidc_missing_issuer— AnOidcactor does not name itsissuer.bynk.actor.oidc_missing_jwks— AnOidcactor does not name itsjwksendpoint.bynk.actor.oidc_not_in_sum— AnOidcactor appears as a member of a multi-actor sum.bynk.actor.oidc_trust_from_is_secret— AnOidcactor’strustFromnames an environment variable that an actor uses as itssecret.bynk.actor.oidc_trust_from_not_string— AnOidcactor’strustFromisn’t a string naming an environment variable.bynk.actor.outside_context— Anactorwas declared outside a context (e.g. in a commons).bynk.actor.refinement_base_unsupported— A refinement actor’s base is not aBeareractor (no claims to authorise against).bynk.actor.refinement_in_sum— A refinement actor appears as a member of a multi-actor sum.bynk.actor.refinement_predicate_unsupported— A refinement actor’swherepredicate is outside the closed claim-predicate set.bynk.actor.scheme_arg_kind— A scheme config value other thanSignedCookie’s is a duration or a bare name, which onlySignedCookietakes.bynk.actor.scheme_not_admissible— An actor’s scheme is not admissible on this handler’s protocol.bynk.actor.signature_identity_unsupported— ASignatureactor declared anidentity, which is not yet supported.bynk.actor.signature_missing_header— ASignatureactor does not name its signature header.bynk.actor.signature_missing_secret— ASignatureactor does not name its signing secret.bynk.actor.signature_requires_body— ASignaturehandler does not take abodyparameter.bynk.actor.signature_tolerance_without_timestamp— ASignatureactor settolerancewithout atimestampheader.bynk.actor.signed_cookie_bad_arg— ASignedCookieconfig value has the wrong kind.bynk.actor.signed_cookie_bad_name— ASignedCookiecookieis not a legal cookie name.bynk.actor.signed_cookie_bad_ttl— ASignedCookiettlis not a positive whole number of seconds.bynk.actor.signed_cookie_duplicate_key— ASignedCookieconfig repeats a key.bynk.actor.signed_cookie_identity_not_string_constructible— ASignedCookieactor’s identity is missing or not a string-constructible type.bynk.actor.signed_cookie_issue_needs_clock—Actor.issue(identity)on aSignedCookieactor is called where the handler does not listClockingiven.bynk.actor.signed_cookie_issue_outside_handler—Actor.issue(identity)on aSignedCookieactor is called outside a service handler (in a provider or an agent).bynk.actor.signed_cookie_missing_secret— ASignedCookieactor does not name its signing secret.bynk.actor.signed_cookie_missing_ttl— ASignedCookieactor does not declare attl.bynk.actor.signed_cookie_not_in_sum— ASignedCookieactor appears as a member of a multi-actor sum.bynk.actor.signed_cookie_public_cache— A@cache(scope: public)route is guarded by aSignedCookieactor.bynk.actor.signed_cookie_read_directly— A typedcookiesfield reads the session cookie that a route’sSignedCookieactor consumes.bynk.actor.signed_cookie_secret_shared— ASignedCookieactor’ssecretorpreviousis also used by another actor, or by itself.bynk.actor.signed_cookie_ttl_long— Warning ASignedCookiettlis longer than 30 days (warning).bynk.actor.signed_cookie_unknown_key— ASignedCookieconfig has a key outside the closed set.bynk.actor.signed_cookie_unprefixed— Warning ASignedCookiecookiedoes not start with__Host-(warning).bynk.actor.signed_cookie_write_directly— A cookie record’s typed write names the session cookie that aSignedCookieactor consumes.bynk.actor.signed_cookie_write_literal— An untypedCookieliteral is named like aSignedCookieactor’s session cookie.bynk.actor.sum_requires_binder— A multi-actor sumbyclause has no binder to match the resolved actor.bynk.actor.unknown_actor— A handler’sbyclause names an actor that is not declared.bynk.actor.unknown_context—IsContext(…)names something that is not a context of the project.bynk.actor.unknown_scheme— An actor declares an authentication scheme that is not compiler-known.bynk.actor.unreachable_sum_arm— A multi-actor sum has an arm unreachable after a catch-all (None) peer.
Adapters
Section titled “Adapters”bynk.adapter.consumes_context— Anadapterconsumed a context; adapter dependencies are adapter-to-adapter.bynk.adapter.consumes_requires_selection— Anadapterused a whole-unit or aliasedconsumes; adapters must select capabilities withconsumes U { Cap, … }.bynk.adapter.disallowed_item— Anadapterdeclared aservice,agent, or other item it may not contain.bynk.adapter.duplicate_binding— Anadapterdeclared more than onebindingclause.bynk.adapter.include_duplicate— An adapterbinding … includes [ … ]list names one file more than once.bynk.adapter.include_kind— An adapterbinding … includes [ … ]entry is not a.wasmfile; only WebAssembly modules can be included.bynk.adapter.include_missing— An adapterbinding … includes [ … ]entry names a file that could not be read.bynk.adapter.include_outside— An adapterbinding … includes [ … ]path is absolute or climbs out of the adapter’s directory with...bynk.adapter.no_binding— Anadapterdeclares an external provider but nobindingmodule to supply it.bynk.adapter.provider_has_body— A provider inside anadapterhas a Bynk body; adapter providers must be external.
Agent storage
Section titled “Agent storage”bynk.store.annotation_kind_mismatch— A storage annotation is used on a kind it does not apply to (e.g.@ttlon aMap).bynk.store.annotation_unsupported— A known storage annotation that nothing acts on yet (@bounded) is used; the others (@ttl,@retain,@indexed) are functional.bynk.store.cache_needs_clock— A handler performs aCacheoperation (TTL expiry reads the clock) without declaringgiven Clock.bynk.store.cache_ttl_required— ACachefield is missing its required@ttl(<duration>)annotation (a keyed store with no expiry is aMap).bynk.store.kind_arity— A storage kind was applied to the wrong number of type arguments (e.g.Cell[A, B]).bynk.store.kind_unsupported— A known storage kind (Queue) is used before the slice that supports it.bynk.store.log_needs_clock— A handler callsLog.append(which stamps the current time) without declaringgiven Clock.bynk.store.unkeyable_key— A storeSetelement orMap/Cachekey is not value-keyable — it must beString,Int, or a refined/opaque type over them (#1680).bynk.store.unknown_annotation— Astorefield carries an annotation outside the closed@indexed/@ttl/@retain/@boundedset.bynk.store.unknown_kind— Astorefield’s type is not a known storage kind.bynk.store.unknown_map_accessor— Astore Mapfield access is not one of its query accessors (entries/keys/values).bynk.store.unknown_op— A method called on astorefield (Map,Cache,Set,CellorLog) is not one of that kind’s storage operations.
Agents
Section titled “Agents”bynk.agent.class_conflict— An agent class has more than one fate: it is renamed twice, both renamed and removed, or renamed onto a class that already has its own recorded history inbynk.schema.lock.bynk.agent.class_removed— An agent class recorded inbynk.schema.lockis no longer declared, so a deployment’s stored instances of it would be orphaned. If the class was never deployed, delete its[agents]entry from the lock; renaming or removing a deployed class gets its own declaration in a later state-migrations slice.bynk.agent.construction_arity— An agent was constructed with the wrong number of key arguments.bynk.agent.handler_arity— An agent handler was called with the wrong number of arguments.bynk.agent.handler_not_found— Called a handler the agent does not declare.bynk.agent.key_mismatch— An agent key argument has the wrong type.bynk.agent.migrate_below_floor— Warning Amigratestep reads a schema version below the agent’s floor. A completebynk migrate sweepraised the floor past it, so no stored instance can hold that version: the step emits nothing and can be deleted (warning).bynk.agent.migrate_duplicate— Twomigratesteps in one agent read the same schema version.bynk.agent.migrate_duplicate_assignment— Amigratestep assigns the samestorefield more than once; each field takes at most one value per step (record-literal semantics).bynk.agent.migrate_impure— Amigratestep uses an effect, a capability,?,expect, or the agent’skey; steps are pure and key-free so a migration sweep can run them by object ID.bynk.agent.migrate_incomplete— Amigratestep does not account for every change between its version and the current shape: a removed field must be read (old.f) or dropped, and a retyped or re-kinded field must be assigned (or dropped, for aSet,LogorCachefield).bynk.agent.migrate_shape_mismatch— Amigratestep’s declared old shape (or adrop) names a field the lock does not record at that version, or records with a different structure.bynk.agent.migrate_unknown_version— Amigratestep reads a schema version the lock does not record below the agent’s current version.bynk.agent.non_additive_state_change— An agent’s stored state changed in a way deployed data cannot be read through — astorefield was removed, retyped (including inside a stored record or sum), or changed storage kind. A renamed field is a removed field plus an added one. If the class was never deployed, delete its[agents]entry frombynk.schema.lock; otherwise widen rather than narrow, or stage the change through a new field.bynk.agent.outside_context— Anagentwas declared outside a context.bynk.agent.refinement_changed— Warning A storedstorefield’s refinement changed while its structure did not. A widening is safe; a narrowing faults on load for any stored value that no longer satisfies it (RehydrationViolation), so migrate the data first (warning).bynk.agent.removed_live— Aremoved agentdeclaration names a class that is still declared; removing a class deletes its stored data.bynk.agent.replaces_live—agent New replaces Oldnames anOldthat is still declared; a rename moves the old class’s data to the new one.bynk.agent.replaces_unknown—agent New replaces Oldnames anOldthatbynk.schema.lockdoes not record for this context, so there is no recorded class to rename.bynk.agent.return_not_effect— An agent handler’s return type is not anEffect.bynk.agent.state_name_conflict— A type is named<Agent>Statebeside agent<Agent>; that name is the agent’s state record (itsCellfields), which its handlers and invariants see in place of the type.bynk.agent.version_without_path— Warning A schema version between the agent’s floor and its current version has no way forward: nomigratestep covers it and its path to the current shape is not entirely additive, so a stored record at that version faults on load withNoMigrationPath(warning).bynk.agents.bad_state_initialiser— An agentstorefield initialiser is not a static value of the field’s type.bynk.agents.non_zeroable_state_field— An agentstorefield has no initialiser and no implicit zero value.
Boundaries
Section titled “Boundaries”bynk.boundary.ambiguous_type— A value’s type is declared, with different shapes, by more than one consumed context, so its fields cannot be read.bynk.boundary.structural_mismatch— Data crossing a context boundary did not match the expected shape.
Capabilities
Section titled “Capabilities”bynk.capability.base_not_instantiable— A derived capability’s base is not a platform resource that can be instantiated.bynk.capability.derived_outside_context— A derived capability was declared outside a context.bynk.capability.instance_only— A platform capability that is used only through named instances (Service,R2,RateLimit,Queue,Analytics,D1,EdgeCache) was used bare, in agivenclause.bynk.capability.invalid_option— A derived capability’s option is not a single positional literal of its kind (string, positiveInt, or an offered window), is given twice, or is a value the kind refuses (an@workerthat is not a well-formed Worker name outside the project, a malformed queue@name, an unknown@jurisdiction).bynk.capability.missing_option— A derived capability lacks an option its base requires, such as aServiceinstance’s@worker.bynk.capability.not_provided— A capability a context requires has no provider in it, on the Workers target or in a bundle with a composition root.bynk.capability.op_arity— A capability operation was called with the wrong number of arguments.bynk.capability.outside_context— Acapabilitywas declared outside a context.bynk.capability.provider_agent_cross_context— On the Workers target, a context requires a capability whose provider, in another context, constructs that context’s agents; the consumer’s Worker would build the provider without a binding for those agents’ Durable Objects.bynk.capability.unknown_base— A derived capability’s base is not a capability the context consumes.bynk.capability.unknown_operation— Referenced an operation the capability does not declare.bynk.capability.unknown_option— A derived capability carries an option its base does not take.
Cloudflare
Section titled “Cloudflare”bynk.cloudflare.edge_cache_duplicate— A context declares a secondEdgeCacheinstance; the edge cache is one setting for the whole Worker.bynk.cloudflare.edge_cache_exported— An exported capability reaches anEdgeCacheinstance through its provider’sgiven; a consuming context would build it in its own Worker, whose purge misses this one’s cache.bynk.cloudflare.edge_cache_in_agent— An agent handler reaches anEdgeCacheinstance, directly or through a provider’sgiven; an agent’s purge would not reach the Worker’s cache.bynk.cloudflare.edge_cache_in_queue— A queue consumer reaches anEdgeCacheinstance; purge from a service handler instead.bynk.cloudflare.edge_cache_in_schedule— Anon schedulehandler reaches anEdgeCacheinstance; a cron run’s purge is accepted but clears nothing from the fetch cache, so purge from a service handler.bynk.cloudflare.edge_cache_public_authenticated— In a context withEdgeCache, a@cache(scope: public)route is served by an actor that authenticates; its response would be shared at the edge with every caller.
Consumes
Section titled “Consumes”bynk.consumes.alias_conflict— Twoconsumesaliases collide.bynk.consumes.capability_name_clash— Two flattenedconsumes U { Cap }capabilities collide, or one clashes with a local capability.bynk.consumes.capability_not_selected— A capability a consumed unit exports is named (agivenclause, a call,provides, astub) in a file whose ownconsumesdoes not list it.bynk.consumes.name_conflict— Aconsumesname collides with another name in scope.bynk.consumes.self_reference— A contextconsumesitself.bynk.consumes.service_arity— A consumed service was called with the wrong number of arguments.bynk.consumes.signature_type_unconsumed— A cross-context call reaches a service whose signature names a type the consumed context itself consumes from a third context, which the caller does not consume.bynk.consumes.target_is_commons—consumestargets acommonsinstead of a context.bynk.consumes.type_alias_capability— A capability was aliased inconsumes U { Cap as Alias }; only exported types can be aliased.bynk.consumes.type_alias_conflict— Aconsumes U { T as Alias }alias collides with a type or value in scope, or with another alias.bynk.consumes.type_alias_repeated— An exported type is aliased more than once, or is selected both bare and aliased, inconsumes U { … }.bynk.consumes.type_alias_unknown_export—consumes U { T as Alias }names a typeUdoes not export.bynk.consumes.type_not_selected— A type (or a bare variant of a sum) of a consumed unit is named in a file whose ownconsumesdoes not bring it in: it lists other names, or only another file of the unit consumes the unit.bynk.consumes.unit_not_consumed— A call to another unit’s service is written in a file whose ownconsumesdoes not name that unit.bynk.consumes.unknown_context—consumesnames a context that does not exist.bynk.consumes.unknown_service— Called a service the consumed context does not declare.
Contexts
Section titled “Contexts”bynk.context.consumes_cycle— Contexts form aconsumesdependency cycle.bynk.context.duplicate_binding— A Worker would declare two bindings with the same name, such as an agentKvand thebynk.cloudflareKV namespace (bothKV).bynk.context.external_construction— A context-owned type was constructed from outside that context.bynk.context.external_decode— A context decoded a type another context owns and exports opaque: throughJson.decode,Json.decodeSqlor aCodablewitness, or as the input of an HTTP, queue, event or WebSocket handler. Decoding creates a value, which only the owning context may do; its codec would check no more than the base type.bynk.context.external_provider— A bodiless (external) provider was declared outside anadapter.bynk.context.opaque_inspection— An opaquely-exported type was inspected from outside its context.bynk.context.rebrand_construction— A variant of auses-sourced commons sum type was constructed directly inside a context, where the emitter’s per-context rebrand leaves its constructors out of scope.
Contracts
Section titled “Contracts”bynk.contract.duplicate_name— A function declares two contract clauses (requires/ensures) with the same name.bynk.contract.impure_predicate— A contract predicate uses an effectful or test-only construct; a contract clause must be pure.bynk.contract.not_bool— A contract predicate does not have typeBool.bynk.contract.restated_by_test— Acase/propertymerely restates a contract clause already declared at the function; the test is redundant.bynk.contract.result_in_requires— A precondition (requires) referencesresult; the return value is only in scope inside anensures.
bynk.cron.bad_params— A cron handler declares more than one parameter, or a non-Instantone.bynk.cron.duplicate_schedule— Two cron handlers declare the same schedule.bynk.cron.invalid_schedule— A cron schedule is not valid Cloudflare cron syntax: a field is out of range or malformed, or the fields are not separated by exactly one space.bynk.cron.numeric_weekday— Warning A cron schedule names a day of the week by number, where Cloudflare’s1is Sunday, not standard cron’s0/7(warning).bynk.cron.return_not_effect_result— A cron handler does not returnEffect[Result[(), E]].bynk.cron.uneven_step— Warning A cron schedule’s*/nstep in the minute or hour field does not divide the field’s range, so the last gap is shorter thann(warning).
Deployment
Section titled “Deployment”bynk.deploy.agent_move_refused—bynk deployrefused to put a context that hosts agents on a different Worker script than it was last deployed to (into or out of a[deploy.workers.<key>]group, between groups, or after a group is renamed or re-keyed): an agent’s state belongs to its script, so it would start empty and the old data would stay behind. Start it fresh deliberately with--accept-fresh-agent <context>, which a move out of a group that stays cannot use.bynk.deploy.asset_path_conflict— Two members of one[deploy.workers.<key>]group serve a fixed asset path (at "/…") from different files, or one that would be a folder of the other; a group has one assets directory, so each fixed path names one file.bynk.deploy.binding_collision— Two members of one[deploy.workers.<key>]group declare different bindings under the same name; members share onewrangler.toml, so identical declarations share a binding and differing ones are refused.bynk.deploy.context_in_two_groups— A context is listed in two[deploy.workers.<key>]groups; a context is deployed in one Worker only.bynk.deploy.contract_skew— A worker was compiled against a contract its live dependencies no longer provide, or no longer provides the contract its live callers were compiled against, sobynk deploy --contextrefuses to ship it.bynk.deploy.duplicate_hostname— A route or custom domain is claimed twice across[deploy.workers.<key>]groups.bynk.deploy.empty_group— A[deploy.workers.<key>]group lists no context.bynk.deploy.foreign_contract_skew— A build breaks the contract a declared foreign caller’s client was generated at, as pinned inbynk.foreign.toml, sobynk deployrefuses to ship it.bynk.deploy.group_name_conflict— A[deploy.workers.<key>]group’s key or script name is another group’s, or is the Worker of a context in no group.bynk.deploy.multiple_websocket_members— More than one member of a[deploy.workers.<key>]group declares afrom websocketservice; an upgrade request names no path or service a group could route it by, so a group has at most one such member, which takes every upgrade request whatever the path.bynk.deploy.not_a_context— A[deploy.workers.<key>]group lists a unit that is not acontext; only contexts are deployed as Workers.bynk.deploy.route_conflict— Two members of one[deploy.workers.<key>]group declare the same HTTP method and path; a Worker answers a route with one handler.bynk.deploy.service_name_conflict— Two members of one[deploy.workers.<key>]group declare a service of the same name; a Worker answers its members’ services by name.bynk.deploy.unknown_context— A[deploy.workers.<key>]group lists a context the project does not declare.bynk.deploy.worker_cycle— Workers bind to each other in a cycle that involves a[deploy.workers.<key>]group: a group folds its members into one Worker, which can close a cycle among contexts that are themselves acyclic. A Worker is uploaded after the Workers it binds to, so the cycle cannot be deployed.bynk.deploy.workers_ignored_on_bundle— Warningbynk.tomldeclares[deploy.workers]groups, which only aworkersbuild uses; this build is abundle, which has every context in one program and ignores them (warning).
Doc comments
Section titled “Doc comments”bynk.doc.unresolved_link— Warning A[Name]doc link resolves to nothing in the unit’s scope (editor hint only).
Effects
Section titled “Effects”bynk.effect.bind_in_pure_context— An<-bind was used in a pure (non-effectful) context.bynk.effect.bind_on_non_effect— An<-bind was applied to a non-Effectvalue.bynk.effect.capability_in_pure_context— A capability was used in a pure context.bynk.effect.cross_context_in_pure_context— A cross-context call was made in a pure context.bynk.effect.do_discards_result— Adostatement was applied to anEffect[Result[_, _]], which would drop anErr; bind it, writelet _ <- eto discard it deliberately, ordo e.detach()to stop waiting and have a failure reported.bynk.effect.do_in_pure_context— Adostatement was used in a pure (non-effectful) context.bynk.effect.do_on_non_effect— Adostatement was applied to a non-Effectvalue.bynk.effect.fn_value_in_pure_context— An effectful function value was called in a pure context; like a capability call, it is legal only where the enclosing body is effectful.bynk.effect.unbound_effect— AnEffectvalue in an effectful body was built but not bound with<-, sequenced withdoor returned — in a plainlet, a list element or a constructor payload — so it runs eagerly and unawaited (#1658).
Embedded text
Section titled “Embedded text”bynk.embed.binary_content— Anembednames a file with a NUL byte, so it is binary, not text.bynk.embed.duplicate— Anembedname is declared more than once in the same unit.bynk.embed.invalid_encoding— Anembednames a file that is not valid UTF-8.bynk.embed.missing_file— Anembednames a file that is not in the project’sembeds/folder.bynk.embed.needs_project— A single-file build met anembeddeclaration, which needs a project’sembeds/folder.bynk.embed.outside_context_or_commons— Anembeddeclaration appears outside a context or commons.bynk.embed.outside_embeds_dir— Anembednames a file outside the project’sembeds/folder.bynk.embed.too_large— Anembednames a file over 256 KiB, or the project’s embedded files total over 1 MiB.bynk.embed.unreadable_file— Anembednames a file in the project’sembeds/folder that could not be read.bynk.embed.unsafe_path— Anembedpath is empty, absolute, or contains a..segment.
Events
Section titled “Events”bynk.event.bad_params— Anon eventhandler declared the wrong number of parameters, or a second parameter whose type is notEventEnvelope— it takes the event payload and, optionally, the runtime envelope.bynk.event.bad_schema_dispatch— Avia schema(...)dispatch clause’s argument is malformed — it must be a positiveIntliteral, a range of positiveIntliterals, or_.bynk.event.bad_schema_version— An event’s@schema(N)annotation is malformed —Nmust be a single, positive, positionalIntliteral, and@schemamay appear at most once on an event.bynk.event.duplicate_handler— Afrom Eventsservice declares more than oneon eventhandler; it has exactly one.bynk.event.emit_not_an_event—Events.emit[E]named a typeEthat is declared in this context, but is not itself anevent— only aneventtype may be emitted.bynk.event.emit_outside_owner—Events.emit[E]named an eventEnot declared in the emitting context — only an event’s declaring context may emit it.bynk.event.handler_param_type_mismatch— Anon event(e: T)handler’s declared parameter type does not match itsfrom Events(E)header’s event type.bynk.event.non_additive_schema_change— An event’s field shape changed in a way the schema registry cannot evolve additively — a field was removed, retyped, added without a default, or lost a default it previously had. Give the new shape a new event type name, or make the change additive.bynk.event.outside_context— Aneventwas declared outside a context.bynk.event.pattern_duplicate_field— Afrom Events(E { ... })subscription pattern listed the same field more than once.bynk.event.pattern_type_mismatch— Afrom Events(E { ... })subscription pattern field’s matched value is not compatible with that field’s declared type.bynk.event.pattern_unknown_field— Afrom Events(E { ... })subscription pattern named a field thatEdoes not declare.bynk.event.pattern_unknown_variant— Afrom Events(E { ... })subscription pattern’s variant value names a variant that does not exist on the field’s declared sum type.bynk.event.pattern_variant_payload— Afrom Events(E { ... })subscription pattern’s variant value names a variant that carries a payload — only nullary variants are admitted, since testing the tag alone would silently ignore the payload.bynk.event.return_not_effect_unit— Anon eventhandler returns anEffectof something other than(); emission is fire-and-forget, so it returnsEffect[()].bynk.event.schema_version_mismatch— An event’s@schema(N)annotation disagrees with the version the schema registry computes from the event’s build history.bynk.event.unknown_annotation— Aneventdeclaration carried an@-annotation other than@schema— event annotations are a closed set.bynk.event.unknown_subscription— Afrom Events(E)subscription namedE, which is not a declared event in this context or any consumed context.
Expectations
Section titled “Expectations”bynk.expect.faults_not_effect— A fault claim’s subject (expect <call> faults) is not an effectful call: a value, or a call whose type is notEffect[_].bynk.expect.impure_predicate— Anexpectpredicate contains an effectful call (a sub-expression of typeEffect[_]); a predicate must be pure.bynk.expect.not_bool—expectwas given a non-Boolpredicate.bynk.expect.outside_case—expectwas used outside acasebody.
Exports
Section titled “Exports”bynk.exports.capability_not_provided— An exported capability has no provider in its context.bynk.exports.conflicting_visibility— A type is exported with conflicting visibilities.bynk.exports.derived_capability—exports capabilitynames a derived capability, whose instance stays with its context.bynk.exports.duplicate_export— The same name is exported more than once.bynk.exports.duplicate_in_clause— A name appears twice in oneexportsclause.bynk.exports.undeclared_capability—exports capabilitynames a capability that is not declared.bynk.exports.undeclared_type—exportsnames a type that is not declared.
Generics
Section titled “Generics”bynk.generics.ambiguous_instantiation— A generic function with anOrdbound is used as a value, and its type arguments cannot be determined from the type expected at that reference; annotate the expected type (constrained-generics slice 1).bynk.generics.bound_on_capability_op— A generic capability operation’s type parameter carries a bound other thanKeyorCodable; operations take only those two (constrained-generics slices 2 and 3).bynk.generics.codable_op_return_not_first_party— A user-declared capability operation’sCodabletype parameter appears in its return type. A typed read, the call site decoding the provider’s reply as the instantiated payload, is accepted only for the standard library’s own operations (#3458, lifting ADR 0696 decision 5).bynk.generics.duplicate_type_param— Atypeorfndeclares the same type-parameter name more than once (v0.157, ADR 0183).bynk.generics.generic_non_record— Atypedeclaration carries type parameters on a refined, opaque or alias body; only a record (type Name[T] = { … }) or sum (type Name[T] = | … | …) body may be generic (v0.157/#593, ADRs 0183/0197).bynk.generics.generic_sum_embeds— A generic sum type carries anembedsclause; embedding into a generic sum is not supported (#593).bynk.generics.internal_op_annotation— A capability operation carries an annotation outside the standard library, or a first-party operation’s is not@onUndecodable(miss)or@onUndecodable(fault): the reply policy of a typed read is internal to first-party operations (#3458).bynk.generics.method_on_generic_type— A static method on a generic type never mentions one of the type’s parameters in its parameter or return types, so no call could determine it from the arguments or the expected type. Mention the parameter in the signature, or make the method a free function (constrained-generics slice 4; instance methods are supported, #594).bynk.generics.missing_codable_bound— A type parameter is encoded or decoded withJson.encode/Json.decode, or passed to aCodable-bounded parameter of another generic or of a capability operation, but is not declaredCodable([T: Codable], orwhere A: Codablefor a receiver type’s parameter). The diagnostic carries a machine-applicable fix that declaresCodable, beside an existingEq, whichCodabledoes not imply (constrained-generics slice 3).bynk.generics.missing_eq_bound— A type parameter is compared with==/!=, or passed to anEq-bounded parameter of another generic, but is not declaredEq([T: Eq], orwhere A: Eqfor a receiver type’s parameter). The diagnostic carries a machine-applicable fix (ADR 0430, amended by constrained-generics slice 0).bynk.generics.missing_key_bound— A type parameter keys aMaporSet(aMapkey, aSetelement, adistinct/groupBy/join key), or is passed to aKey-bounded parameter of another generic, but is not declaredKey([K: Key], orwhere A: Keyfor a receiver type’s parameter; on the type for a generic type’s own parameter). The diagnostic carries a machine-applicable fix that declaresKey, replacing an existingEq, whichKeyimplies (constrained-generics slice 2).bynk.generics.missing_ord_bound— A type parameter is ordered (<,<=,>,>=, an ordering kernel key), or passed to anOrd-bounded parameter of another generic, but is not declaredOrd([T: Ord], orwhere A: Ordfor a receiver type’s parameter). The diagnostic carries a machine-applicable fix that declaresOrd, replacing an existingEq, whichOrdimplies (constrained-generics slice 1).bynk.generics.polymorphic_recursion— A generic type refers to itself with arguments other than its own type parameters, in order (Weird[List[T]]insideWeird[T], orPair[B, A]insidePair[A, B]), or to a mutually recursive partner with an argument that wraps one of its own parameters (Inner[List[T]]insideOuter[T]). Such polymorphic recursion generates an unbounded set of instantiations and is refused at the declaration; a self-reference that passes the parameters through unchanged, and a partner applied to the declaration’s own parameters or to types that mention none (of any arity), are accepted (#3192).bynk.generics.recursive_generic_at_boundary— A recursive generic type (a record or sum that transitively contains itself, through any wrapper or generic argument) is used where a codec is required: a service or agent handler signature, an agent store field or key, an event field, an actor identity type, aJson.encode/decodetarget or aCodablewitness. It declares and works inside a context, but has no codec yet, so it cannot cross a boundary; when it is reached through another type, the note names the field path (#3192, ADR 0197).bynk.generics.redundant_eq_bound— Warning A type parameter is declared bothEqandOrd(orEqandKey);OrdandKeyimplyEq, so theEqis redundant. The diagnostic carries a machine-applicable fix that removes it (constrained-generics slices 1 and 2, warning).bynk.generics.type_arg_count— A user-declared generic type is applied to the wrong number of type arguments, or a generic type is named without its[…]arguments (v0.157, ADR 0183).bynk.generics.type_arg_mismatch— Inferred or explicit type arguments conflict, have the wrong arity, target a non-generic function, or a type parameter shadows a declared type.bynk.generics.uninferable_type_arg— A generic function’s type parameter could not be inferred from the arguments and was not given explicitly (name[T](…)); a bare generic function also cannot be passed as a value.bynk.generics.unknown_constraint— A bound, or aderivesentry, names something that is not a constraint; the constraints areEq,Ord,KeyandCodable.bynk.generics.unknown_where_param— A method’swhereclause bounds a name that is not a type parameter of the method or of its receiver type.
Given capabilities
Section titled “Given capabilities”bynk.given.cross_context_unknown_capability—given B.Caporconsumes B { Cap }names a capability the consumed context does not export.bynk.given.fn_outside_context— A function in a commons (or a suite) declaresgiven; only a context function can.bynk.given.fn_unsupported— Agivenclause on a method, on a function that does not returnEffect[T], or namingEvents.bynk.given.missing_for_call— A call to a function that declaresgivenfrom a body that does not declare those capabilities.bynk.given.undeclared_capability— A handler uses a capability it did not declare withgiven.bynk.given.unknown_capability—givennames a capability that does not exist.bynk.given.unused_capability— Warning Agivencapability is never used (warning).
bynk.http.body_kind_conflict— A handler carries both@rawand@form, which each fix the wire format of its onebody.bynk.http.body_on_get_or_delete— A GET or DELETE handler declares abodyparameter.bynk.http.cache_bad_immutable— A@cacheannotation’simmutableis not aBoolliteral.bynk.http.cache_bad_max_age— A@cacheannotation’smaxAgeis missing or not a positiveDurationliteral.bynk.http.cache_bad_scope— A@cacheannotation’sscopeis notpublicorprivate.bynk.http.cache_duplicate— A handler carries more than one@cacheannotation.bynk.http.cache_max_age_fractional_seconds— A@cacheannotation’smaxAgeis positive but does not resolve to a whole number of seconds.bynk.http.cache_on_non_get— A@cacheannotation is placed on a handler that is noton http GET.bynk.http.cache_public_reads_cookies— A@cache(scope: public)handler takes acookiesparameter, so a shared cache could replay one user’s response to another.bynk.http.cache_unknown_arg— A@cacheannotation has an argument outside the closed set (maxAge/scope/immutable).bynk.http.cf_wrong_type— An HTTP handler’scfparameter is not typedRequestCf.bynk.http.cookie_cross_site_without_credentials— Warning A service attaches aSameSite.Unrestrictedcookie but declares nocors { credentials: true }, so a cross-originfetchcan never send it back (warning).bynk.http.cookie_domain_widens— Warning A cookie literal outside the__Host-prefix sets adomain, so every subdomain receives it (warning).bynk.http.cookie_field_arity— A typed cookie write or deletion (Record.field.cookie(v),Record.field.expire()) is given the wrong number of arguments.bynk.http.cookie_field_list— A typed cookie write names aListfield of the cookie record.bynk.http.cookie_field_not_cookie_record— A typed cookie write names a record that is not thecookiesrecord of anon httphandler in this unit.bynk.http.cookie_field_unknown— A typed cookie write names a field the cookie record does not have.bynk.http.cookie_host_prefix— A__Host-cookie literal is notsecure, sets adomain, or uses apathother than/.bynk.http.cookie_partitioned_insecure— Apartitionedcookie literal is notsecure.bynk.http.cookie_samesite_none_insecure— A cookie literal withsameSite: SameSite.Unrestrictedis notsecure.bynk.http.cookie_script_readable— Warning A cookie literal setshttpOnly: false, so page scripts can read it (warning).bynk.http.cookie_secure_prefix— A__Secure-cookie literal is notsecure.bynk.http.cookie_untyped_has_field— Warning An untypedCookieliteral is named like a field of a cookie record of the unit (a warning).bynk.http.cookie_value_undecodable— An untypedCookieliteral’s value is one the record field that reads that cookie would reject.bynk.http.cookies_field_not_stringy— A field of an HTTP handler’scookiesrecord has a type a cookie cannot carry.bynk.http.cookies_not_http— ARequestCookiesappears on a handler that is not an HTTP route.bynk.http.cookies_wrong_type— An HTTP handler’scookiesparameter is not a record type.bynk.http.cors_invalid_field— Acorspolicy field (headers/credentials/maxAge) has the wrong value shape.bynk.http.cors_invalid_origins— Acorspolicy’soriginsis missing, empty, or not a list of string literals.bynk.http.cors_not_http— Acors { }policy appears on a service that is notfrom http.bynk.http.cors_unknown_field— Acors { }policy declares a field outside the closed set.bynk.http.cors_wildcard_credentials— Acorspolicy combinescredentials: truewith the wildcard origin["*"].bynk.http.duplicate_rejected— Afrom httpservice declareson rejectedmore than once.bynk.http.duplicate_route— Two handlers share the same method and route.bynk.http.error_status_position— AnErrorStatusname is used anywhere but asRawError’s first argument.bynk.http.extra_param— A handler parameter is not a path parameter,body,headersorquery.bynk.http.form_body_not_record— Thebodyof a@formhandler is not a record type.bynk.http.form_bool_without_default— Warning ABoolfield of a@formbody has no default, so an unchecked checkbox (which a browser sends as nothing) is a400(warning).bynk.http.form_duplicate— A handler carries more than one@formannotation.bynk.http.form_field_not_stringy— A field of a@formbody record has a type a form cannot carry.bynk.http.form_on_bodyless— A@formor@multipartannotation is placed on a handler that takes no body.bynk.http.form_on_sum_route— A@formhandler’sbyclause is a sum of actors, whose wrapper reads the body as JSON itself.bynk.http.form_unknown_arg— A@formannotation is given an argument; it takes none.bynk.http.header_question_not_found— Warning?onRequestHeaders.get(…)in anHttpResulthandler answers404 NotFoundfor a missing header, where400is meant (warning; auto-fixable to alet … elsethat answersBadRequest).bynk.http.headers_wrong_type— An HTTP handler’sheadersparameter is not typedRequestHeaders.bynk.http.invalid_path— An HTTP route path is malformed.bynk.http.json_duplicate— A handler carries more than one@jsonannotation.bynk.http.json_invalid_arg— A@jsonannotation’soptionsargument is missing or is nottaggedorplain.bynk.http.json_invalid_field— Ajson { }policy’soptionsis nottaggedorplain.bynk.http.json_not_http— Ajson { }policy appears on a service that is notfrom http.bynk.http.json_on_non_http— A@jsonannotation is placed on a handler that is noton http.bynk.http.json_unknown_arg— A@jsonannotation has an argument outside the closed set (options).bynk.http.json_unknown_field— Ajson { }policy declares a field outside the closed set (options).bynk.http.limit_bad_max_body— A@limitannotation’smaxBodyis missing or not a positiveIntliteral.bynk.http.limit_bad_max_file— A@limitmaxFileormaxPartsis not a positiveIntliteral.bynk.http.limit_duplicate— A handler carries more than one@limitannotation.bynk.http.limit_on_bodyless— A@limitannotation is placed on a handler that takes no body (a GET or DELETE).bynk.http.limit_on_non_multipart— A@limitmaxFileormaxPartsis placed on a route that is not@multipart.bynk.http.limit_unknown_arg— A@limitannotation has an argument outside the closed set (maxBody).bynk.http.limits_invalid_field— Alimitspolicy field (maxBody) has the wrong value shape.bynk.http.limits_not_http— Alimits { }policy appears on a service that is notfrom http.bynk.http.limits_unknown_field— Alimits { }policy declares a field outside the closed set.bynk.http.multipart_body_unbounded— A@multipartroute has no request-body cap (@limitorlimits { maxBody }).bynk.http.multipart_large_cap— Warning A@multipartroute’s body cap is over 32 MiB; the body is buffered with a parsed copy beside it, in a Worker’s 128 MB (warning).bynk.http.path_param_not_stringy— A path parameter’s type is not constructible from a string.bynk.http.query_field_not_stringy— A field of an HTTP handler’squeryrecord has a type a query string cannot carry.bynk.http.query_not_http— ARequestQueryappears on a handler that is not an HTTP route.bynk.http.query_wrong_type— An HTTP handler’squeryparameter is neither a record type norRequestQuery.bynk.http.raw_bad_content_type— A@rawannotation’scontentTypeis missing or not atype/subtype(or"*/*") string literal.bynk.http.raw_body_not_bytes— Thebodyof a@rawhandler is not typedBytesorStream[Bytes].bynk.http.raw_body_unbounded— A@rawroute has no request-body cap (no@limitand no servicelimits).bynk.http.raw_duplicate— A handler carries more than one@rawannotation.bynk.http.raw_error_status—RawError’s first argument is not anErrorStatusname (a 4xx or 5xxHttpResultvariant name).bynk.http.raw_on_bodyless— A@rawannotation is placed on a handler that takes no body.bynk.http.raw_unknown_arg— A@rawannotation has an argument outside the closed set (contentType).bynk.http.rejected_signature— Anon rejectedhandler is noton rejected(why: BoundaryRejection) -> HttpResult[()]with nobyand nogiven.bynk.http.reserved_prefix— A route uses a reserved prefix:/_bynk/(internal dispatch) or/_assets/(static assets).bynk.http.reserved_route_syntax— A route segment contains*,{or}, which are reserved for a future route form.bynk.http.return_not_effect_http_result— An HTTP handler does not returnEffect[HttpResult[T]].bynk.http.security_invalid_field— Asecuritypolicy field (hsts/nosniff) has the wrong value shape.bynk.http.security_not_http— Asecurity { }policy appears on a service that is notfrom http.bynk.http.security_unknown_field— Asecurity { }policy declares a field outside the closed set.bynk.http.stream_body_not_raw— AStream[Bytes]bodyis on a handler that is not@raw.bynk.http.stream_body_on_sum_route— A route with a streamedbodyhas abyclause that is a sum of actors, whose wrapper reads the body itself.bynk.http.stream_body_signature— A route with a streamedbodyhas aSignatureactor, which verifies an HMAC over the whole body first.bynk.http.unbound_path_param— A:nameroute segment has no matching handler parameter.bynk.http.unknown_handler_annotation— A handler carries an annotation outside the closed set (@cache/@limit).
History properties
Section titled “History properties”bynk.history.not_an_agent— Afor all run: History[T]names aTthat is not an agent — only an agent has handlers to sequence and reachable states to observe (testing track slice 7, ADR 0155).bynk.history.not_generable— Afor all run: History[Agent]targets an agent with a handler parameter whose type cannot be generated (e.g. aMatchesrefinement), so its call-history cannot be driven (testing track slice 7, ADR 0155).bynk.history.outside_property—History[Agent]appears outside aproperty’sfor allbinding — it is a test-only generator, not a value type (testing track slice 7, ADR 0155).bynk.history.restates_invariant— A history property merely re-checks a guarantee a declaredinvariant/transitionalready enforces on every reached state (testing track slice 7, ADR 0155).
Internal errors
Section titled “Internal errors”bynk.internal.missing_checker_fact— A compiler fault, not a mistake in the program: the code generator needed a fact the checker should have recorded (a type, a callee, an argument count, a field default) and found none. The diagnostic points at the construct being compiled; report it at https://github.com/bynk-lang/bynk/issues.
bynk.lex.bad_escape— An invalid escape sequence in a string literal.bynk.lex.bad_unicode_escape— A\u{…}escape names a surrogate or a value above U+10FFFF.bynk.lex.decimal_literal_too_large— A decimal literal has more than 100 fraction digits or more than 1000 characters, the most anyDecimalmay have (#2622).bynk.lex.float_literal_overflow— A float literal does not fit a finite 64-bit float.bynk.lex.integer_overflow— An integer literal is outside theIntrange, the JS safe integers ±(2^53 − 1).bynk.lex.interpolation_too_deep— A string interpolation\(…)nests deeper than the lexer’s fixed limit.bynk.lex.legacy_comment— A--line comment, the spelling before #2203; a comment is//(auto-fixable;bynk fmtrewrites it).bynk.lex.legacy_doc_line— A--|one-line doc, the spelling before #2203; a one-line doc is--- text(auto-fixable;bynk fmtrewrites it).bynk.lex.multiline_close_not_own_line— A"""inside a multi-line string literal is not on a line of its own.bynk.lex.multiline_in_hole— A multi-line string literal appears inside an interpolation hole, which must close on its own line.bynk.lex.multiline_indent— A line of a multi-line string literal is indented less than its closing""".bynk.lex.multiline_open— The opening"""of a multi-line string literal is not followed by a newline, or by a language tag ("""sql) and a newline.bynk.lex.slash_doc— A///doc comment first on its line; a Bynk doc is--- textor a---block (auto-fixable).bynk.lex.unclosed_doc_block— A documentation block is not closed.bynk.lex.unexpected_character— An unexpected character in the source.bynk.lex.unterminated_interpolation— An interpolation hole\(…)is not closed on its line.bynk.lex.unterminated_string— A string literal is not terminated.
Message bundles
Section titled “Message bundles”bynk.messages.format_mismatch— A code’s placeholder is formatted as a different ICU kind (plain/plural/select/number/date) across declared locales.bynk.messages.incomplete— A locale is missing a code the reference locale declares.bynk.messages.invalid_locale_tag— Amessagesblock’s locale tag is not a validLocaleTag(e.g.messages "xx"wherexxdoesn’t match the tag pattern).bynk.messages.malformed_icu_syntax— A message template’s ICU placeholder syntax is invalid — unbalanced arm braces, an unknown format keyword,#outside a plural arm, a missing mandatoryotherarm, or an explicitly out-of-scope construct (selectordinal,offset:/=N, a CLDR skeleton).bynk.messages.missing_locale_dependency— A commons declaringmessagesdoesn’tuses bynk.localeand/oruses bynk.locale.types, which its generatedrenderand the types its signature names need.bynk.messages.missing_reference— A message bundle has no@referenceblock.bynk.messages.multiple_reference— A message bundle has more than one@referenceblock.bynk.messages.outside_commons— Amessagesdeclaration appears outside a commons.bynk.messages.placeholder_mismatch— A locale’s template for a code uses a different set of{name}placeholders than the reference locale’s.
Observation
Section titled “Observation”bynk.observe.impure_with— Awithpredicate uses an effectful or test-only construct, or an effectful call (a sub-expression of typeEffect[_]); it must be pure.bynk.observe.not_a_seam— An observation targets a capability the unit under test does not consume.bynk.observe.trace_outside_test—trace(Cap.op)appears outside acasebody.bynk.observe.unknown_op— An observation names an operation the capability does not declare.bynk.observe.with_not_bool— Awithpredicate does not have typeBool.
bynk.cell.invalid_target— A:=write targets something that is not astore Cellfield.bynk.cell.self_reference— A:=right-hand side reads the cell being written (a read-modify-write); use.update.bynk.codegen.tsc_failed—tscrejected the TypeScript the compiler generated for a program that passed the checker. This is a bug in the Bynk compiler, not in the program: the diagnostic points at the Bynk code the failing generated line came from, with the TypeScript error attached (#3068).bynk.container.build_missing— AContainer’s@builddirectory holds noDockerfile, so there is no image to build.bynk.container.build_path— AContainer’s@buildis not a directory inside the project: it is empty, absolute, uses\, or leaves the project with...bynk.container.output_outside_project— A build with aContaineris written to an output directory outside the project, sowranglercannot reach the container’s Dockerfile from the Worker’s output directory by a relative path inside the project.bynk.d1.migration_invalid— Warning AD1migration does not apply to an empty in-memory SQLite, so the binding’s literal SQL is not checked against its schema (warning).bynk.d1.migration_name— A file in the project’smigrations/folder isn’tmigrations/<database>/NNNN_<name>.sql, or shares its number with another migration of the same database.bynk.d1.migration_unreadable— AD1migration in the project’smigrations/folder can’t be read, or isn’t UTF-8 text.bynk.d1.migrations_unused— Warning A directory in the project’smigrations/folder matches noD1instance’s database name, so its migrations are never applied, usually because the capability was renamed (warning).bynk.d1.select_field_missing— A record read from a literal D1 statement has a field with no column of that name. For aselect[T]/firstAs[T]row type, the column list the compiler writes fromTdoes not prepare against the schema the binding’s migrations build; for aJson.decodeSql[T]of the rows of a literalall/first, a required (non-Option) field ofThas no result column.bynk.d1.sql_invalid— A literal D1 statement does not prepare against the schema the binding’s migrations build: a syntax error, or an unknown table or column.bynk.d1.sql_param_count— A literal D1 statement uses a different number of bound parameters (?N) than the list literal passed with it holds.bynk.dependency.path_outside_root— A path dependency declared by a dependency resolves outside the workspace; a dependency’s own path dependencies are honoured only between members of one workspace.bynk.detach.in_agent_handler— Adetachwas used in an agent handler, which has no execution context to keep a detached effect alive.bynk.detach.in_pure_context— Adetachwas used in a pure (non-effectful) context.bynk.detach.store_op— Adetachtargets an agent store operation, which is part of the handler’s atomic commit and cannot be detached.bynk.duration.literal_overflow— ADurationliteral (<int>.<unit>) exceeds the representable millisecond range.bynk.duration.unit_agreement— ADurationliteral’s unit does not agree with its number:1takes the singular unit, every other number the plural.bynk.duration.unknown_unit— An integer literal is followed by a word that is not aDurationunit.bynk.email.bad_params— An emailon messagehandler does not take exactly oneInboundEmailparameter.bynk.email.duplicate_address— Twofrom emailservices claim the same recipient address.bynk.email.duplicate_handler— Afrom emailservice declares more than oneon messagehandler; it has exactly one.bynk.email.invalid_address— Afrom email("…")binding is not a recipient address a service can claim.bynk.email.return_not_email_verdict— An emailon messagehandler does not returnEffect[EmailVerdict].bynk.exec.unavailable— A call to, or reference to, a function that hands work to the execution context (detach,withinorrace, directly or through the functions it calls) appears where no execution context exists: an agent handler, a WebSocket handler or a provider operation.bynk.fault.todo— Warning Atodo(message)placeholder: the code type-checks but faults when it runs. A non-failing warning, socheck --deny-warningsrefuses unfinished code in CI (warning).bynk.fixture.binary_content— A suite’sfixturenames a file that contains a NUL byte, so it is binary, not text.bynk.fixture.duplicate— A suite declares twofixtures of the same name.bynk.fixture.invalid_encoding— A suite’sfixturenames a file that is not valid UTF-8.bynk.fixture.missing_file— A suite’sfixturenames a file that is not in the project’sfixtures/folder.bynk.fixture.outside_fixtures_dir— A suite’sfixturenames a file outside the project’sfixtures/folder.bynk.fixture.too_large— A suite’sfixturenames a file over the 4 MiB limit for one fixture file.bynk.fixture.unreadable_file— A suite’sfixturenames a listed file that could not be read.bynk.fixture.unsafe_path— A suite’sfixturepath is empty, absolute or contains a..segment.bynk.fixture.unused— Warning A suite declares afixturethat none of its cases, properties or helpers uses (warning).bynk.fmt.comment_loss— The formatter would drop a comment, so it leaves the file unchanged.bynk.fmt.mixed_comment_syntax— A file mixes the retired--comment or--|doc spellings with a line that reads differently under the old and new comment rules (#2203), so the formatter leaves it unchanged.bynk.fmt.roundtrip— The formatter’s output does not re-parse to the same program, so it leaves the file unchanged.bynk.held.branch_divergence— Branches of a conditional leave a held value (e.g.Connection[F]) in inconsistent ownership states — one consumes or stores it, another leaves it owned (§2.9.5, real-time track slice 2).bynk.held.consume_on_borrow— A consuming operation (close/put/take) is called on a borrowed held reference — borrows admit only non-consuming operations likesend(§2.9.3, real-time track slice 2).bynk.held.leak— A held value (Connection[F]) is still owned at scope exit — it must be disposed (stored, closed, or transferred) before the handler or function returns (§2.9.1, real-time track slice 2).bynk.held.query_accessor_on_held_map— A key-aware query accessor (.entries/.keys/.values) is used on a heldMap[K, Connection]— a held resource is iterated with the broadcast ops (forEach/parTraverse), not a key query.bynk.held.unsupported_map_op— A heldMap[K, Connection]is given anupdate/upsert— a held resource cannot be transformed by a(Connection) -> Connectionfunction; useput/get/remove(real-time track slice 3b-ii).bynk.held.unsupported_storage— A held value (Connection[F]) is stored in aSet/Log/Cache— held values may only live inCell[Option[Connection]]orMap[K, Connection](§2.9.3, real-time track slice 2).bynk.held.use_after_consume— A held value (Connection[F]) is used after a consuming operation (close/put/take) ended its lifetime (§2.9.2, real-time track slice 2).bynk.index.bad_argument— An@indexedargument is not aby: <field>label.bynk.index.missing— Warning A query filters a map by equality on a field that is not@indexed(a perf-hint warning).bynk.index.unkeyable_key— An@indexed(by: k)field is not value-keyable.bynk.index.unknown_key— An@indexed(by: k)field is not a field of the map’s value type.bynk.index.unused— Warning A declared@indexed(by: k)is never used by an equality filter (a hygiene warning).bynk.invariant.cross_agent_reference— An invariant predicate references another agent; invariants are per-agent.bynk.invariant.duplicate_name— An agent declares two invariants with the same name.bynk.invariant.impure_predicate— An invariant predicate uses an effectful or test-only construct.bynk.invariant.not_bool— An invariant predicate does not have typeBool.bynk.json.encode_plain_generic—Json.encodePlainis given a value whose type mentions a type parameter. A generic value encodes through itsCodablewitness, which always writesOptionin the tagged form, so plain encoding is available only at a concrete type.bynk.json.nested_option_plain— A plain-JSON route’s response type, or the argument ofJson.encodePlain, contains anOption[U]whose payloadUcan itself encode asnull(Option[T]or()), soSome(U)andNonewould both be writtennull.bynk.lambda.unannotated_param— A lambda parameter has no type annotation in a position where no function type is expected to infer it from.bynk.list.deprecated_function— Warning Abynk.listfree function is deprecated in favour of theListmethod form (warning; auto-fixable).bynk.list.par_traverse_unit— WarningList.parTraversenow returns the steps’ values, and its step returns(): that isparForEach(warning; auto-fixable).bynk.locale.multiple_message_bundles— A context consumesLocalebut its directusesreaches two or more message-bundle commons — there is no single bundle to negotiate against.bynk.map.deprecated_function— Warning Abynk.mapfree function is deprecated in favour of theMapmethod form (warning; auto-fixable).bynk.mysql.sql_invalid— Warning A literalMySqlstatement does not parse with the MySQL dialect of a pure-Rust SQL parser, or is more than one command, in a project that has aschema.sql(warning: the parser is not MySQL’s own, so it may refuse valid SQL).bynk.mysql.sql_param_count— A literalMySqlstatement has a different number of?placeholders than the list literal passed with it holds, in a project that has aschema.sql.bynk.par.invalid_statement— Apar { … }block holds a statement other thanlet x <- eordo e: a refutablelet … else, a plainlet,:=or a store write,expect,advance, a nestedpar, or anything that is not a statement.bynk.par.question_in_join— A?appears inside apar { … }binding.?takes aResultvalue, not an effect, so a binding’s own result is unwrapped after the block (let user = userR?), where the?lines run in source order; a?on an argument is computed before the block.bynk.par.sibling_name— Apar { … }binding mentions a name another binding in the same block binds, or binds a name twice. The bindings run together, so none can read a sibling’s result; the rule holds even where the name would resolve to an outer binding.bynk.par.single_binding— Warning Apar { … }block has a single binding, which is a plainlet x <- ewith extra syntax (warning).bynk.par.store_write_in_closure— A closure passed toparForEach,parTraverse,parTraverseAllorparTraverseTrywrites astorefield (put,remove,update,upsert,add,appendor:=). Its branches run concurrently, and agetthen aputacross them loses updates, so store writes stay sequential, as they do in apar { … }block.bynk.postgres.sql_invalid— Warning A literalPostgresstatement does not parse with the Postgres dialect of a pure-Rust SQL parser, or is more than one command, in a project that has aschema.sql(warning: the parser is not Postgres’ own, so it may refuse valid SQL).bynk.postgres.sql_param_count— A literalPostgresstatement uses a different number of parameters (its highest$n) than the list literal passed with it holds, in a project that has aschema.sql.bynk.query.join_key_mismatch— AjoinOn/leftJoinleft and right key function return different types.bynk.query.sum_needs_numeric— Asum/averagekey function does not return a numeric type (Int,Float, orDuration;sumalso takes aDecimal,averagedoes not).bynk.race.in_agent_handler—a.race(b)was used in an agent handler, which has no execution context to hand the losing effect to.bynk.race.in_pure_context—a.race(b)was used in a pure (non-effectful) context.bynk.race.outside_handler—a.race(b)was used outside a service handler’s body and outside a function (in a provider operation, a WebSocket handler or a testcasebody), where no execution context exists.bynk.registry.account_refused—bynk login,bynk logoutor abynk orgcommand didn’t go through: you aren’t signed in or your session expired, the registry has no account API (or is read through a mirror), the sign-in was declined or its code expired, or the registry refused the request (a taken or reserved name, not the owner, an unknown member or token).bynk.registry.bad_archive— A registry archive is malformed or hostile: not abynk-tree-v1stream, a path that is absolute or climbs out of the package, an out-of-order or repeated file, or past the size limits.bynk.registry.bad_signature— An index line isn’t signed by a key the trusted key’s rotation chain reaches, or its signed registryidor packagenameisn’t the one asked for (a forged or replayed line).bynk.registry.http_failed— A registry couldn’t be read: unreachable, an error status, a refused or missing token, a redirect from https to http, too many redirects, or a response past the size limit.bynk.registry.key_mismatch— A registry’s keys don’t lead from the key trusted for it (pinned in[registries], or recorded inbynk.lock), or it now declares a differentid.bynk.registry.nonconformant—bynk registry conformancefound a registry breaking the protocol: a check failed (a wrong status, an unsigned or mis-signed line, a checksum that isn’t the tree sent, a refusal without its JSON body, …); each failure names the check and the protocol section it holds the registry to.bynk.registry.publish_refused—bynk publishorbynk yankdidn’t go through: the project isn’t a versioned package, it has a path or git dependency, its registry has no publish API (or is read through a mirror), or the registry refused the request (no or wrong token, an existing version, an invalid upload).bynk.registry.source_mismatch—bynk.locklocks a package to one registry, but its organisation now routes to another; a misrouted organisation fails rather than resolving a same-named package elsewhere.bynk.registry.unavailable— No registry serves a package: its organisation isn’t listed by any[registries]entry (the first-party registry isn’t live yet), the registry has noconfig.json, or it has no such package or archive.bynk.registry.withdrawn—bynk.locklocks a registry version that its registry withdrew (a takedown: yanked, and its archive deleted), and its tree isn’t in the store.bynk.revert.agent_schema_older—bynk revertrefused because the target writes an older agent schema version than the live one while stored instances exist, are not known to be absent, or the target is below the class’s floor, so the older code would fault on newer records.bynk.revert.class_changed—bynk revertrefused because a Durable Object class was added, removed or renamed between the live version and the target, and Cloudflare cannot roll back across a class migration.bynk.revert.contract_skew—bynk revertrefused because the target’s contracts would no longer match another live Worker, judged as if every selected Worker were reverted together.bynk.revert.database_schema_ahead—bynk revertrefused because the live version applied D1 migrations the target was not built against, or the applied migrations could not be read; migrations only move forward, so the older code may not run on the newer schema.bynk.revert.facts_missing—bynk revertrefused because the live version or the target version carries no deploy facts (BYNK_DEPLOY_FACTS), or the facts could not be read, so nothing can be checked against them.bynk.revert.history_unplaceable—bynk revertrefused for one Worker because its deployment history cannot be placed: it has no earlier deployment, the live upload is outside the listed history, a gradual deployment is in progress, or the history could not be read.bynk.revert.id_unrecorded—bynk revertrefused because the target binds a KV namespace, database, limiter or Hyperdrive config that the deploy lock no longer records, usually because the resource was re-provisioned or replaced since.bynk.revert.layout_older—bynk revertrefused because the target writes an older agent storage layout than the live one while stored instances exist or are not known to be absent, so the older code could not read the newer records.bynk.revert.membership_changed—bynk revertrefused because a[deploy.workers.<key>]group’s target version held other contexts than the live one (a context moved into or out of the group since, or the version predates groups), so a rollback would take a member’s code out of the Worker.bynk.revert.secret_changed—bynk revertrefused because a secret changed after the target was live, so the rollback could restore an old secret value that its peers no longer accept.bynk.secrets.computed_name— Warning Abynk.Secretsread names its secret with a computed expression rather than a literal, sobynk deploycannot plan it (warning).bynk.set.deprecated_function— Warning Abynk.setfree function is deprecated in favour of theSetmethod form (warning; auto-fixable).bynk.target.browser_bundle_only— Thebrowserplatform builds only the in-processBundletopology;--target workersis not a browser build.bynk.target.vendor_conflict— One deployment unit’s in-process closure uses platform-native capabilities from two mutually-exclusive platforms.bynk.target.vendor_required— A deployment unit uses a platform-native capability but the build selects another--platform.bynk.visibility.private_in_public— A public declaration’s signature names aprivatetype of its own unit, which an importer could neither name nor build.bynk.visibility.private_item— A reference from another unit names aprivatedeclaration, which is visible only within its own unit and that unit’s suites.bynk.visibility.private_messages— Warning Amessagesblock in a commons isprivate. A bundle whose@referenceblock is private is never negotiated by a context that uses the commons, andprivateon another block of a bundle whose reference is public has no effect (warning).bynk.visibility.private_not_allowed—privatemodifies a declaration it does not apply to: anything but afn,type,messages,asset,embedorconstin a commons or context.bynk.wasm.panic— The in-browser compiler panicked internally (a compiler bug, reported as a diagnostic instead of crashing the page).bynk.wasm.strip_failed— The in-browser compiler could not strip the emitted TypeScript to JavaScript.bynk.within.in_agent_handler—e.within(d)was used in an agent handler, which has no execution context to hand the abandoned effect to.bynk.within.in_pure_context—e.within(d)was used in a pure (non-effectful) context.bynk.within.outside_handler—e.within(d)was used outside a service handler’s body and outside a function (in a provider operation, a WebSocket handler or a testcasebody), where no execution context exists.bynk.within.timed_out_not_in_scope—e.within(d)yieldsResult[_, TimedOut], but the unit does not consumebynk, soTimedOutis not in scope.bynk.ws.lifecycle_by_mismatch— A WebSocketon message/on closehandler’sbyclause does not name the same actor(s) ason open’s — the connection’s principal is verified once, aton open, and carried for its life, so the lifecycle handlers must be the same single actor or the same actor-sum members (binder names may differ).bynk.ws.message_frame_param— A WebSocketon messagehandler does not have exactly one parameter of the service’s inbound (in:) frame type — the decoded frame (real-time track slice 3b-iii).bynk.ws.open_given_unsupported— A WebSocketon openhandler declaresgivencapabilities — unsupported at v1, since on Workers the handler runs inside the connection-hosting Durable Object, which has no composition root to supply them (real-time track slice 3b).bynk.ws.open_transfer_cross_file— On the Workers target, a WebSocketon openhandler transfers itsconnectionto an agent declared in a different file of the same context — the open is hosted in the agent’s Durable Object, which is emitted from the agent’s own file, so the upgrade would never be handled; the service and the agent must share a file.bynk.ws.open_transfer_key— On the Workers target, the key of a WebSocketon openhandler’s connection transfer is not a route parameter, a constant of the context or of a commons it uses, or a literal — the upgrade is routed to the hosting Durable Object before the body runs, so the edge must be able to evaluate the key on its own.bynk.ws.open_transfer_shape— A WebSocketon openhandler does not transfer itsconnectioninto exactly one agent, so the Workers upgrade has no single Durable Object to route to (real-time track slice 3b).bynk.ws.route_param_mismatch— A WebSocketon message/on closeroute parameter does not match theon openparameter at the same position — route values are recovered positionally from the connection, so they must be a type-compatible prefix of theon openparameters (real-time track slice 3b-iii).
Packages
Section titled “Packages”bynk.package.alias_shadows_unit— A dependency alias in[dependencies]is also the first segment of one of the project’s own units, so<alias>.…would be ambiguous.bynk.package.checksum_mismatch— A git dependency’s store entry, or a freshly fetched commit, doesn’t hash to the checksumbynk.lockrecords;bynkrefuses to build it.bynk.package.dependency_cycle— The package graph has a cycle: a dependency depends, directly or not, on itself or on the project.bynk.package.dependency_not_found— A path dependency’s directory has no readablebynk.toml, itsbynk.tomlis invalid, or it has no[package].bynk.package.dev_dependency_in_source— A commons, context or adapter reaches a[dev-dependencies]alias, which only a suite may use.bynk.package.duplicate_source— One package is reached from two different directories; a build holds one copy of each package.bynk.package.git_failed—gitcouldn’t clone, fetch or check out a git dependency, or the revision it names doesn’t exist.bynk.package.lock_invalid—bynk.lockcan’t be read: it isn’t valid TOML, has noversion, is a version this toolchain doesn’t read, or locks a package to something that isn’t a commit.bynk.package.lock_out_of_date—--lockedwas given, and resolving the manifests would changebynk.lock.bynk.package.name_mismatch— A path dependency’spackagenames a different package than the directory’s[package] name.bynk.package.not_fetched— A git dependency has nobynk.lockentry, or its store entry is missing;bynk fetchfetches it (refused under--offline).bynk.package.unit_not_exported— Ausesorconsumesreaches a unit its dependency declares but doesn’t list in[package] exports.bynk.package.unknown_unit— Ausesorconsumesnames, through a dependency alias, a unit the dependency doesn’t declare.bynk.package.unsafe_source— A git dependency’s URL or revision looks like a command-line option, or uses a transport other thanhttps,ssh(orfile, from the project’s own manifests).bynk.package.unsupported_in_dependency— A dependency declares anassetor anembed, which would resolve against the consuming project’sassets/orembeds/; a per-package namespace for either isn’t designed yet.bynk.package.version_conflict— One package is reached at two different git revisions (or from git and a path); a build, or a workspace, holds one copy of each package.
Parser
Section titled “Parser”bynk.parse.bare_expression_statement— An expression stands alone as a statement, followed by more of the block; a block has no expression statements, so its value would be discarded. Bind it withlet _ <-(an effect) orlet _ =.bynk.parse.clause_after_statement— Astuborenvclause came after a statement in a test case; they lead the case body.bynk.parse.const_missing_type— Aconstdeclaration has no type annotation; a constant’s type is always written (const Name: Type = …).bynk.parse.consumes_after_decls—consumesappears after other declarations.bynk.parse.dangling_handler_annotation— A handler-position annotation (e.g.@cache) is not followed by anonhandler.bynk.parse.doc_block_contains_code— A documentation block’s content (outside Markdown code fences) parses as declarations, so a pair of dash dividers has turned code into documentation.bynk.parse.duplicate_cors— A service declares more than onecors { }policy.bynk.parse.duplicate_json— A service declares more than onejson { }policy.bynk.parse.duplicate_limits— A service declares more than onelimits { }policy.bynk.parse.duplicate_security— A service declares more than onesecurity { }policy.bynk.parse.empty_agent— Anagentbody is empty.bynk.parse.empty_capability— Acapabilitybody is empty.bynk.parse.empty_interpolation— An interpolation hole\(…)contains no expression.bynk.parse.empty_match— Amatchhas no arms.bynk.parse.empty_service— Aservicebody is empty.bynk.parse.event_pattern_empty— Afrom Events(E { ... })subscription pattern listed no fields — usefrom Events(E)(no braces) for an unfiltered subscription.bynk.parse.expected_agent_key— Expected akeydeclaration in an agent.bynk.parse.expected_agent_storage— An agent declares no storage — it has nostorefields.bynk.parse.expected_base_type— Expected a base type.bynk.parse.expected_capability_op— Expected a capability operation.bynk.parse.expected_expression— Expected an expression.bynk.parse.expected_handler— Expected a handler.bynk.parse.expected_item— Expected a declaration.bynk.parse.expected_predicate— Expected a refinement predicate.bynk.parse.expected_provider_op— Expected a provider operation.bynk.parse.expected_token— Expected a specific token.bynk.parse.expected_type— Expected a type.bynk.parse.expected_unit_header— Expected acommonsorcontextheader.bynk.parse.expected_visibility— Expected a visibility keyword.bynk.parse.exports_after_decls—exportsappears after other declarations.bynk.parse.extra_tokens— Unexpected tokens after an otherwise complete construct.bynk.parse.generic_arg_count— Wrong number of generic type arguments.bynk.parse.handler_in_agent— A protocol handler (on GET/schedule/message) was declared in an agent.bynk.parse.invariant_after_handler— Aninvariantwas declared after a handler; invariants precede handlers.bynk.parse.keyword_field_shorthand— A reserved keyword was used as a field shorthand, which would bind a variable of that name.bynk.parse.lambda_pattern_annotation— A lambda parameter with a record pattern carries a type annotation; the pattern’s type name already gives the parameter’s type.bynk.parse.lambda_pattern_not_record— A lambda parameter is a pattern other than a record pattern; only an irrefutable record pattern may stand in for a name.bynk.parse.lambda_pattern_refutable— A lambda parameter’s record pattern can fail to match some value of its type, and a lambda has noelseto fall back on.bynk.parse.let_else_on_binding— Anelsefollows a plainlet name = …binding, which matches every value, so theelsecould never run.bynk.parse.let_else_staircase— Hint Nestedmatches onOption/Resultthat each carry on in one arm and give up in the other, whichlet … elsewrites flat. A hint with a machine-applicable rewrite; never fails a build and is hidden from the terminal (hint).bynk.parse.let_pattern_annotation— Aletwith a pattern carries a type annotation; the pattern’s names take their types from the value.bynk.parse.let_pattern_without_else— Aletbinds a pattern but has noelsesaying what the block produces when the value does not match; only a record pattern that cannot fail may omit it.bynk.parse.list_rest_not_last— A..in a list pattern is not the final element; suffix forms such as[.., last]are not available.bynk.parse.malformed_float_literal— A float literal is missing a digit on one side of the.(1.,.5).bynk.parse.match_ends_block— Amatchends the block it is in, because a block has no expression statements; a secondmatchstraight after it cannot follow.bynk.parse.migrate_after_handler— Amigratestep is declared after an agent handler; migration steps precede the handlers.bynk.parse.migrate_item— Amigratestep’s body holds something other thanfield := value,letordrop field.bynk.parse.multiple_docs— A declaration or member has two docs directly above it; a target has one doc, so a doc of more than one line is a---block.bynk.parse.nesting_too_deep— An expression or type nests deeper than the parser’s fixed limit.bynk.parse.no_remainder_operator—%is not an operator; useInt.rem(the dividend’s sign) orInt.mod(the divisor’s).bynk.parse.non_associative— A non-associative operator was chained (e.g.a == b == c).bynk.parse.orphan_doc_block— Warning A documentation block is not attached to a declaration (warning).bynk.parse.policy_order— A service’scors/security/limitspolicy is out of order or follows a handler; they open the body in the ordercors,security,limits,json.bynk.parse.record_pattern_in_is_unparenthesised— A record pattern afterisis not parenthesised — writex is (T { f, .. }).bynk.parse.record_pattern_without_rest— A record pattern does not end with..; every record pattern is open.bynk.parse.refined_pattern_inner— A refined pattern’s inner form is something other than_.bynk.parse.removed_send_arrow— The~>send was removed; writedo e.detach().bynk.parse.reserved_keyword— A reserved keyword was used as an identifier.bynk.parse.self_outside_method—selfis the first parameter of a free function; only a method declaration,fn Type.method(self, …), has a receiver.bynk.parse.storage_after_phase— Agent storage (state/store) is declared after the invariants or handlers.bynk.parse.transition_after_handler— Atransitionis declared after an agent handler; step invariants precede the handlers.bynk.parse.unexpected_adapter— Anadapterappeared where it is not allowed.bynk.parse.unexpected_context— Acontextappeared where it is not allowed.bynk.parse.unexpected_eof— Unexpected end of input.bynk.parse.unexpected_suite— Asuiteappeared where it is not allowed.bynk.parse.unknown_effect_method— An unknown method onEffect.bynk.parse.unknown_handler_kind— An unknown handler form (expectedcall, an HTTP method,schedule, ormessage).bynk.parse.unknown_predicate— An unknown refinement predicate.bynk.parse.unknown_tier— Acase/suiteas <tier>clause names something other thanunit,integration, orsystem.bynk.parse.uses_after_decls—usesappears after other declarations.bynk.parse.variant_name_case— A sum-type or enum variant name is not capitalised.
Project
Section titled “Project”bynk.namespace.reserved— A user unit is namedbynkorbynk.*; thebynkroot is reserved for the toolchain.bynk.project.contracts_lock_corrupt—bynk.contracts.lock(the older service contracts a callee still accepts) is missing its version field, empty, truncated, unparseable, or of an unsupported version — restore it from version control rather than deleting it, since a callee that forgets the contracts it accepts refuses its live callers.bynk.project.contracts_lock_oversized— Warningbynk.contracts.lockhas one service accepting more older contracts than the build keeps comfortably (warning).bynk.project.contracts_lock_stale— Warningbynk.contracts.locklists an older contract the service no longer accepts, because it is unreadable or no longer compatible with the contract the service has now; the entry is ignored (warning).bynk.project.duplicate_compatibility_flag— Warningbynk.toml’s[workers] compatibility_flagslists a flag twice, or one every Bynk Worker already has; the duplicate is dropped (warning).bynk.project.duplicate_module_doc— More than one file of a multi-file unit carries a module doc.bynk.project.export_context—bynk.toml’s[package] exportslists a context: a package shares commons and adapters, never a context, which belongs to the project that deploys it.bynk.project.export_unknown—bynk.toml’s[package] exportslists a name that isn’t a commons or adapter the project declares.bynk.project.file_and_directory— A unit exists as both a file and a directory.bynk.project.inconsistent_commons_name— A source file’s path does not match its declared name.bynk.project.kind_conflict— A name is declared as both a commons and a context.bynk.project.no_root— No project root could be determined.bynk.project.no_sources— The project contains no source files.bynk.project.read_failed— A source file could not be read.bynk.project.schema_registry_corrupt—bynk.schema.lock(the schema registry for events and agent state) is missing its version field, empty, truncated, or otherwise unparseable — restore it from version control rather than deleting it, since deleting it would silently re-baseline every event’s and agent’s history.bynk.project.unstable_not_experimental— Warningbynk.toml’s[unstable] allowlists an item that nothing experimental lies in or under: it is stable now, so the entry can go (warning).bynk.project.unstable_unknown_item—bynk.toml’s[unstable] allowlists a path that names no standard-library unit, exported item or operation.
Properties (generative tests)
Section titled “Properties (generative tests)”bynk.property.restates_refinement— Apropertymerely re-checks a refinement its type already guarantees.bynk.property.where_not_bool— Afor all ... wherefilter does not type toBool.
Providers
Section titled “Providers”bynk.provider.agent_call_undeclared_capability— A provider calls an agent handler that needs a capability the provider’sgivendoes not list.bynk.provider.dependency_cycle— Providers form a capability dependency cycle throughgiven.bynk.provider.extra_operation— Aprovidesblock implements an operation not in the capability.bynk.provider.generic_op_requires_external— A Bynk-bodiedprovidesimplements a capability operation that declares its own type parameter — only an external (bodiless) provider can.bynk.provider.missing_operation— Aprovidesblock is missing a capability operation.bynk.provider.outside_context—provideswas declared outside a context.bynk.provider.signature_mismatch— Aprovidesoperation’s signature does not match the capability.bynk.provider.unknown_capability—providesnames a capability that does not exist.
bynk.queue.bad_params— Anon messagehandler does not take exactly onemessageparameter.bynk.queue.duplicate_consumer— Twoon messagehandlers, in one context or in two, consume the same queue.bynk.queue.invalid_name— Afrom queue("…")binding has an empty queue name, or one Cloudflare refuses.bynk.queue.return_not_queue_result— Anon messagehandler does not returnEffect[QueueResult].
Record spread
Section titled “Record spread”bynk.record_spread.field_type_mismatch— A record-spread override has the wrong type for the field.bynk.record_spread.non_record_base— The base of a record spread is not a record.bynk.record_spread.type_mismatch— A record spread’s base is a different record type.bynk.record_spread.unknown_field— A record spread overrides a field the record does not have.
Refinement
Section titled “Refinement”bynk.refine.literal_violates— A literal does not satisfy the refined type’s predicate.
Resolution
Section titled “Resolution”bynk.resolve.ambiguous_variant— A bare variant name is declared by several sum types in scope, and no expected type picks one.bynk.resolve.arity_mismatch— A function was called with the wrong number of arguments.bynk.resolve.bad_const_initialiser— Aconstinitialiser is not a static value of the declared type: only literals, constructors over static values,T.unsafe(lit),List.empty()/Map.empty()/Set.empty(),Durationliterals and references to other constants are allowed.bynk.resolve.const_cycle— Constants refer to each other in a cycle, so none of them has a value.bynk.resolve.const_name_case— A constant’s name is not upper-camel case (MaxRetries, notmaxRetries).bynk.resolve.const_outside_context_or_commons— Aconstdeclaration appears outside a context or commons.bynk.resolve.duplicate_actor— Two actors share a name.bynk.resolve.duplicate_agent— Two agents share a name.bynk.resolve.duplicate_capability— Two capabilities share a name.bynk.resolve.duplicate_const— Two constants share a name.bynk.resolve.duplicate_field— A record, or one variant’s payload, declares a field twice.bynk.resolve.duplicate_field_init— A record construction initialises a field twice.bynk.resolve.duplicate_fn— Two functions share a name.bynk.resolve.duplicate_message_code— A message bundle declares the same code twice in one block.bynk.resolve.duplicate_message_locale— Twomessagesblocks in one bundle declare the same locale tag.bynk.resolve.duplicate_method— Two methods share a name.bynk.resolve.duplicate_param— A parameter name is repeated.bynk.resolve.duplicate_provider— A capability is provided more than once.bynk.resolve.duplicate_service— Two services share a name.bynk.resolve.duplicate_type— Two types share a name.bynk.resolve.duplicate_variant— A sum type declares a variant twice.bynk.resolve.fn_without_call— A function was referenced without being called.bynk.resolve.let_shadows_fn— Aletbinding shadows a function.bynk.resolve.let_shadows_type— Aletbinding shadows a type.bynk.resolve.method_unknown_type— A method is defined on an unknown type.bynk.resolve.missing_field— A record construction omits a required field.bynk.resolve.name_conflict— Two declarations share a name.bynk.resolve.not_a_record_type— Record syntax was used on a non-record type.bynk.resolve.opaque_record_construction— An opaque type was constructed with record syntax.bynk.resolve.param_as_function— A value (such as a parameter) was called as a function.bynk.resolve.recursive_record_field— A record directly contains a field of its own type.bynk.resolve.reserved_builtin_type— A type declaration reuses a compiler-known built-in type name.bynk.resolve.reserved_host_name— A declaration is namedglobalThis, which the generated TypeScript uses to reach host globals.bynk.resolve.reserved_payload_field— A sum variant declares a payload field namedkind, the variant’s wire discriminant.bynk.resolve.self_outside_method—selfreferenced outside a method or handler.bynk.resolve.type_as_function— A type name was called as if it were a function.bynk.resolve.type_in_expr— A type name was used where a value is expected.bynk.resolve.unconsumed_context— A context’s service was called, or its capability named ingiven, without aconsumesdeclaration.bynk.resolve.unknown_field— A record construction names a field the record type does not declare.bynk.resolve.unknown_function— Called a function that does not exist.bynk.resolve.unknown_name— Referenced a name that is not in scope.bynk.resolve.unknown_static_member— Referenced an unknown static member (e.g.T.x).bynk.resolve.unknown_type— Referenced a type that does not exist.
Services
Section titled “Services”bynk.service.duplicate_call_handler— A service declares more than oneon callhandler; it has exactly one.bynk.service.missing_from— Afrom-less service has a handler other thanon call.bynk.service.mixed_protocols— A service mixes handler forms that do not match itsfrom <protocol>.bynk.service.outside_context— Aservicewas declared outside a context.bynk.service.return_not_effect— A service handler’s return type is not anEffect.bynk.service.unknown_protocol— Afrom <protocol>names an unknown protocol (e.g. a transport like Kafka).bynk.service.unknown_via_clause— Avia <name>(...)clause on afrom Events(...)header named something other thanschema—viaclauses are a closed set, and onlyvia schema(...)exists today.bynk.service.websocket_header— Thefrom websocketheader is malformed — it binds frame types aswebsocket(in: <type>, out: <type>)(real-time track slice 3).bynk.service.websocket_multiple— A context holds more than onefrom websocketservice — at v1 the Workers upgrade routes by theUpgrade: websocketheader alone, so one WebSocket service per context (real-time track slice 3b).bynk.service.websocket_open_arity— Afrom websocketservice must hold exactly oneon openhandler (the edge upgrade), and at most oneon message(inbound) and oneon close(real-time track slice 3/3b-iii).bynk.service.websocket_param_not_stringy— Afrom websocketservice’son openparameter has a type not constructible fromString; it arrives as a query-string value (#1657).
Stability
Section titled “Stability”bynk.stability.experimental— An experimental standard-library item is used without an[unstable] allowentry inbynk.tomlcovering it.
Static assets
Section titled “Static assets”bynk.asset.duplicate— Anassetname is declared more than once in the same unit.bynk.asset.invalid_at_path— Anasset’satpath is not a URL path naming one file, or lies under/_assets/or/_bynk/, or is a file the platform reads as configuration.bynk.asset.may_shadow_route— Warning A parameterised HTTP route matches a fixed asset path, so it never sees requests for that path (a warning).bynk.asset.missing_file— Anassetnames a file that is not in the project’sassets/folder.bynk.asset.needs_project— A single-file build met anassetdeclaration; assets need a project build.bynk.asset.not_served— Warning A deployable Bundle build met anasset; a Bundle ships no files, so its.urlwould not be served (a warning).bynk.asset.outside_assets_dir— Anassetpath does not name a file in the project’sassets/folder.bynk.asset.outside_context_or_commons— Anassetdeclaration appears outside a context or commons.bynk.asset.path_conflict— Two different asset files would be served at one fixed path by the same Worker.bynk.asset.shadows_route— A fixed asset path equals a literal HTTP route, in the same context or in another member of the same[deploy.workers.<key>]group, which the platform-served asset makes unreachable.bynk.asset.unreadable_file— Anassetnames a file in the project’sassets/folder that could not be read.bynk.asset.unsafe_path— Anassetpath is empty, absolute, or contains a..segment.
bynk.stub.after_type— A teststub … returns <value> after <d>latency is not aDuration.bynk.stub.at_system— A teststubis in asystem-tier case, or at the scope of asuite … as system(or a suite whose cases runas system); each context runs as the Worker it deploys as, which builds its own capability providers, so there is no seam to override.bynk.stub.bad_sequence— Astub … returns each […]sequence is malformed (e.g. empty).bynk.stub.generic_op— A teststubtargets a capability operation that declares its own type parameter — not supported at v1.bynk.stub.not_a_seam— A teststuboverrides a capability the unit under test does not consume.bynk.stub.rhs_type— A teststub … returns <value>right-hand side does not match the operation’s return type.bynk.stub.unknown_op— A teststubnames an operation the capability does not declare.
Suites and cases
Section titled “Suites and cases”bynk.suite.const_name_clash— A suiteconsthas the name of a declaration or sum variant already in scope in the suite’s cases.bynk.suite.duplicate_case_name— Twocases share a description.bynk.suite.duplicate_const— A suite declares twoconsts of the same name, or aconstwith the name of one of itstypes.bynk.suite.duplicate_env— Anenv { … }clause gives the same name twice at one scope (a suite’senvclauses, or one case’s); a case’senvmay override a suite’s name, but not repeat its own.bynk.suite.duplicate_fn— A suite declares two helperfns of the same name.bynk.suite.duplicate_type— A suite declares twotypes of the same name.bynk.suite.env_binding_clash— Asystem-tier suite’s or case’senvnames a binding a participant’s Worker already declares (a Service Binding, KV namespace, or Durable Object namespace), or a key the test harness sets on it (a call-edge key, aForeigncaller’s secret), so the entry would clash with it on the Worker’senv.bynk.suite.env_not_literal— Anenv { … }entry’s value is neither aStringliteral nor afixturethe same suite declares; a Worker’s variables and secrets are strings, given verbatim.bynk.suite.fn_effectful— A suite helperfnreturns anEffect; suite helpers are pure.bynk.suite.fn_method— A suite helperfnis a method (fn Type.name); suite helpers are free functions.bynk.suite.fn_name_clash— A suite helperfnhas the name of a declaration already in scope in the suite’s cases.bynk.suite.type_generic— A suite declares a generictype; a suite type is a plain, non-generic shape.bynk.suite.type_name_clash— A suitetype, or a variant of one, has the name of a declaration or sum variant already in scope in the suite’s cases, or of another suite item.bynk.suite.unknown_target— Asuitetargets a unit that does not exist.
Test tiers
Section titled “Test tiers”bynk.tier.cross_context_needs_system— Aunitorintegrationcase, or aproperty, reaches another context’s service, directly or through a target service or agent handler that calls one; belowsystemno other context is stood up to call, so the flow belongs in asuite … as system.bynk.tier.mixed_system_suite— A suite mixessystemcases withunitorintegrationones; asystemcase runs against deployed Workers and addresses services by context path, so it needs asuite … as systemof its own.bynk.tier.system_needs_wire— Anas systemsuite whose target has no serialisation edge: it consumes no other context and exposes nohttp,queueoremailservice, so there is no wire for asystemcase to cross.
bynk.test.actor_identity_required— A test omits the identity an identity-carrying actor requires: a bare call-siteby <Actor>, or nobyat all on a handler that binds itsCaller.bynk.test.actor_no_identity— A call-siteby <Actor>(x)supplies an identity to an actor that takes none — a unit-identity actor (e.g.Visitor) orNobody.bynk.test.advance_not_clock— Anadvancestatement names a capability other thanClock; the test harness owns one time source, the first-partyClock.bynk.test.advance_not_duration— Anadvance Clock bystatement’s amount is not aDuration.bynk.test.advance_outside_case— Anadvance Clock bystatement appears outside a testcasebody; only the test harness has a clock to move.bynk.test.asset_address_method— A suite fetches an asset with a method other thanGET; the platform serves assets toGETand answers other methods with 405.bynk.test.call_needs_in_process— Asystem-tier case calls anon callservice withsvc.call(…); anon callservice is internal to a deployment and has no public route for asystemcase to drive, so the case drives anhttproute that reaches it, or calls it atunitorintegration.bynk.test.credential_needs_system— A case drivesby Nobody(the no-credential principal, which tests the auth seam’s 401) outside asystem-tier case, where there is no real seam to reject it.bynk.test.event_needs_in_process— Asystem-tier case delivers an event withsvc.event(e); atsysteman event reaches a subscriber only through its publisher’s fan-out, so the case drives the emitting handler instead, or delivers the event atunitorintegration.bynk.test.event_not_subscribed— A test body’ssvc.event(e)delivers an event thefrom Events(E)service does not subscribe to.bynk.test.event_publisher_ambiguous— A test body’ssvc.event(e)omits the envelope, but the event’s publisher, which the default envelope names, is not one context the target declares or consumes.bynk.test.expired_needs_bearer_route— A case drivesby Expiredat an address that is not an http route with aBeareractor (alone, or as a member of an actor sum) or anOidcactor; it sends a correctly signed token whoseexphas passed, so only aBearerorOidcseam can refuse it.bynk.test.extra_headers_authorization— Asystemcase sendsAuthorizationas an extra request header to a route that declares noheaders:parameter; the case’sby <Actor>owns the credential the driver sends.bynk.test.faults_needs_in_process— Asystem-tier case claims a fault withexpect <call> faults, or a fault claim at any tier is drivenby Nobody,by Forged,by Stale,by Expired,by WrongIssuer,by WrongAudience,by WrongAlgorithmorby NoSubject; atsystema fault reaches the case as an error response from the deployed Worker, never a throw, so the claim belongs atunitorintegration.bynk.test.forged_needs_signature_route— A case drivesby Forgedat an address that is not an http route with aSignature,BearerorOidcactor, orby Staleat one with noSignatureactor (alone, or as a member of an actor sum); they send a bad credential, so only aSignature,BearerorOidcseam can refuse them.bynk.test.forged_needs_system— A case drivesby Forged,by Stale,by Expired,by WrongIssuer,by WrongAudience,by WrongAlgorithmorby NoSubjectoutside asystem-tier case; only thesystemdriver signs a request or mints a token, so only there does the realSignature,BearerorOidcseam see the bad credential.bynk.test.no_subject_needs_oidc_route— A case drivesby NoSubjectat an address that is not an http route with anOidcactor; it sends correctly signed tokens whosesubis empty and whosesubis missing, so only anOidcseam can refuse them.bynk.test.nobody_needs_secured_route— A case drivesby Nobodyat a route with no Bearer,Oidcor Signature actor (alone, or as a member of an actor sum) (e.g. a publicVisitorroute) — there is no auth seam to reject the missing credential.bynk.test.peek_not_a_database—D1.peeknames a capability that is not derived fromD1; only a D1 binding has a test database to read.bynk.test.peek_not_bound—D1.peekis used anywhere but as the value of alet; the handle is what a case reads through.bynk.test.peek_outside_case—D1.peekis used outside anintegrationorsystemcase; only those tiers stand up a participant’s test database.bynk.test.peek_unknown_capability—D1.peeknames a participant or a capability that the suite does not have.bynk.test.peek_write— AD1.peekhandle is asked to write, by a write operation (run,batch) or by a statement that would write; the handle is read-only.bynk.test.principal_claims_not_oidc— A call-site principal passes token claims for an actor that isn’tOidc.bynk.test.principal_identity_mismatch— A call-siteby <Actor>acts as an actor whose identity is incompatible with the addressed handler’s actor, or names no member of the handler’s actor sum.bynk.test.principal_on_asset— A suite’s asset fetch carries abyclause; an asset is public and served before the Worker runs.bynk.test.principal_on_wrong_method— A wrong-method405test carries aby <Actor>clause; it reaches no handler, so a principal is meaningless.bynk.test.principal_required— A test drives an identity-carrying handler, or one guarded by an actor sum, with no call-siteby <Actor>.bynk.test.remote_clock_dependent— Warning Underbynk test --against, asystemcase’sexpectcompares anInstantthat isn’t derived from the run (a constant such asInstant.fromEpochMillis(0)); in process the clock starts at the epoch, but a real runtime’s Workers read wall-clock time.bynk.test.remote_unsupported_advance— Asystemcase moves the harness clock withadvance Clock, which a run against a real runtime (bynk test --against) can’t honour: the deployed Workers read wall-clock time.bynk.test.remote_unsupported_asset— Asystemcase fetches an asset withsvc.GET(asset), which a run against a real runtime (bynk test --against) can’t honour: the fetch is answered in process.bynk.test.remote_unsupported_call— Asystemcase addresses anon callservice, which a run against a real runtime (bynk test --against) can’t honour: the service is internal, and each call is signed for one caller.bynk.test.remote_unsupported_env— Asystemcase’senvdisagrees with the named target it would run against (bynk test --against): it sets a secret, sets a name the target doesn’t declare undervarsor declares with another value, or leaves unset a name the target declares.bynk.test.remote_unsupported_peek— Asystemcase reads a participant’s test database withD1.peek, which a run against a real runtime (bynk test --against) can’t honour: a deployment has no in-process database.bynk.test.remote_unsupported_queue— Asystemcase delivers a queue message withq.message(m), which a run against a real runtime (bynk test --against) can’t honour: no public wire reaches a queue consumer.bynk.test.remote_unsupported_schedule— Asystemcase runs a cron handler withsvc.schedule(…), which a run against a real runtime (bynk test --against) can’t honour: no public wire reaches a cron handler.bynk.test.service_bad_address— A test body addresses a service the wrong way for its protocol (e.g. an http route without a leading path string).bynk.test.service_call_arity— A test body’ssvc.call(...)passes the wrong number of arguments for the service’son callhandler.bynk.test.service_no_call_handler— A test body invokessvc.call(...)on a service with noon callhandler (afrom http/cron/queueservice).bynk.test.service_unknown_route— A test body addresses an http route / cron schedule / queue message the service does not declare.bynk.test.smoke_undeclared_status— Warning A smoke case (bynk test --smoke) gets a non-5xx answer whose status is not among those its route’s handler declares; the case still passes (warning).bynk.test.snapshot_duplicate_name— A case takes two snapshots (expect v matches snapshot "name") under one name; a snapshot is keyed by its case and name.bynk.test.snapshot_in_property— Apropertytakes a snapshot; its body runs once per generated input, so the snapshot belongs in acaseover a fixed value.bynk.test.snapshot_name_not_literal—matches snapshotis not followed by a string literal; a snapshot is named by a literal so the compiler knows every snapshot a suite takes.bynk.test.snapshot_needs_unit_suite— A snapshot is taken in asystem-tier case or in an integration or system suite; snapshots are stored per unit suite file and compared in the unit harness.bynk.test.snapshot_not_codable— The value of anexpect … matches snapshotis notCodable: a snapshot stores the value’sJson.encodetext, so it must be in the domainJson.encodeaccepts.bynk.test.stale_needs_timestamp— A case drivesby Staleat aSignatureroute whose actor declares notimestampheader andtolerance, so there is no replay window for the seam to refuse a stale signature by.bynk.test.system_claims_need_literal— Asystem-tier case passes token claims to a call-site principal other than as a literalTokenClaims.of([…]); the driver mints theOidctoken’s claims from those lines, which aTokenClaimsvalue does not expose.bynk.test.unknown_actor— A call-siteby <Actor>names an actor the target context does not declare and that is not a prelude actor.bynk.test.wire_http_only— AWire(...)raw argument is passed to a queue, cron,on callor event address;Wiredrives an http body or path segment only, so a queue message, cron tick or event is passed as a typed value.bynk.test.wire_needs_system— AWire(...)raw argument is used outside asystem-tier service address;Wirehands pre-validation input to the boundary and is meaningless atunitor in any other position.bynk.test.wrong_algorithm_needs_oidc_route— A case drivesby WrongAlgorithmat an address that is not an http route with anOidcactor; it sends a token withalg: noneand anHS256token keyed with the JWKS public key, so only anOidcseam can refuse them.bynk.test.wrong_audience_needs_oidc_route— A case drivesby WrongAudienceat an address that is not an http route with anOidcactor; it sends a correctly signed token whoseaudis not the actor’s, so only anOidcseam can refuse it.bynk.test.wrong_issuer_needs_oidc_route— A case drivesby WrongIssuerat an address that is not an http route with anOidcactor; it sends a correctly signed token whoseissis not the actor’s, so only anOidcseam can refuse it.bynk.test.ws_lifecycle_by— A case’ssvc.message(tc, frame)orsvc.close(tc)on afrom websocketservice carries abyclause; the connection’s principal is given once, atopen, and carried from there.bynk.test.ws_needs_in_process— Asystem-tier case drives afrom websocketservice by address (svc.open(tc, …),svc.message(tc, frame),svc.close(tc)); a deployed WebSocket is a real upgrade through the Worker and a Durable Object, which asystemcase does not drive, so the case runs atunitorintegration.
Transitions (step invariants)
Section titled “Transitions (step invariants)”bynk.transition.cross_agent_reference— A transition predicate references another agent; step invariants are per-agent.bynk.transition.duplicate_name— An agent declares two transitions with the same name.bynk.transition.impure_predicate— A transition predicate uses an effectful or test-only construct; a step invariant must be pure.bynk.transition.may_violate— Warning A handler can make a move that an agent’stransitionrefuses, from a state the agent can be in after a commit; at run time that call faults withInvariantViolation(warning). Resolve it in code: refuse the move first, with amatcharm or anistest on the state field that the path can’t get past.bynk.transition.no_step_reference— A transition references neitheroldnornew; it constrains one state, so it is aninvariant, not a step.bynk.transition.not_bool— A transition predicate does not have typeBool.
Type checking
Section titled “Type checking”bynk.types.argument_mismatch— A call, method, capability, or constructor argument has the wrong type.bynk.types.asset_at_boundary— AnAssettype appears in a record field, boundary or store position; pass its.urlinstead.bynk.types.bad_field_default— A record or event field’s default expression (field: T = expr) is not a static, wire-representable value of the field’s declared type — a literal (including one admitted to a refined type), a sum variant of a type this context may construct (not auses-sourced commons sum, which isbynk.context.rebrand_construction),Some/None/Ok/Err, a record, a list literal,Map.empty()/Set.empty(), orT.unsafe(lit)for an opaque type whose literal also satisfies the refinement. A field whose type is a generic record’s type parameter has no default, and a default may not hold for one instantiation only: for a record field that applies a user generic (Page[String], orPage[T]inside a generic record; an event or old-state field may not) it is a closed-form value at the instantiated type, writing nothing of the enclosing record’s own type parameters. (Earlier versions reported this asbynk.event.bad_field_default.)bynk.types.call_arity— A function value, a built-inMap/Set/Cell/Cache/Logoperation, orunreachable/todowas called with the wrong number of arguments (a declaredfnisbynk.resolve.arity_mismatch).bynk.types.cannot_infer_option_type_param— The value type ofNonecould not be inferred.bynk.types.cannot_infer_result_type_params— The type parameters of aResultcould not be inferred.bynk.types.catastrophic_regex— AMatchespattern, or a regex method’s pattern, can match the same text in exponentially many ways (nested or ambiguous repetition, bounded or not), or cannot be analysed, risking catastrophic backtracking (ReDoS).bynk.types.claims_at_boundary—TokenClaimsappears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.bynk.types.combinator_return_mismatch— A callback passed to a combinator (map/andThen/flatMap/traverseAll/…) returns the wrong type.bynk.types.constructor_arity—T.of(orT.unsafe) on a refined or opaque type got the wrong number of arguments.bynk.types.constructor_base_mismatch— A.ofconstructor was given an argument of the wrong base type.bynk.types.decimal_division_unscaled—/was used onDecimaloperands. A quotient has no exact decimal answer, so division states its scale and rounding mode:a.div(b, 2, RoundingMode.HalfEven)(#2622).bynk.types.decimal_negation_too_large— A negated decimal literal would have more than 1000 characters of canonical text once its sign is counted, the most anyDecimalmay have (#2622).bynk.types.deprecated_json_error— WarningJsonErroris the deprecated spelling ofDecodeError(warning; auto-fixable).bynk.types.derives_automatic— Aderivesclause namesEq,KeyorCodable, which hold for a type automatically; onlyOrdis opted into. The diagnostic carries a machine-applicable fix that removes the name (constrained-generics slice 1).bynk.types.derives_field_not_orderable— A type declaresderives Ord, but one of its fields or payloads is notOrd(for example aMap, aSet, aBool, a function, or a record that does not itself deriveOrd); every part must be orderable for the declaration order to be a total order (constrained-generics slice 1).bynk.types.duplicate_example— A refinement carries more than one@example.bynk.types.duplicate_literal_arm— Amatchhas two arms for the same literal value.bynk.types.duplicate_pattern_field— A record pattern lists the same field twice.bynk.types.duplicate_variant_arm— Amatchhas two arms for the same variant.bynk.types.embeds_ambiguous— A type is embedded by more than one variant of a sum, so?’s conversion would be ambiguous.bynk.types.embeds_unknown_variant— Anembeds … as Vclause names a variant the sum does not declare.bynk.types.embeds_variant_shape— Anembeds E as Vtarget variant must have exactly one payload field, of typeE.bynk.types.empty_range_pattern— A range pattern orvia schema(...)range has its bounds inverted (lo > hi), so it can never match.bynk.types.empty_refinement— A refinement admits no values (contradictory predicates).bynk.types.err_value_mismatch— AnErrpayload has the wrong type.bynk.types.example_not_literal— An@exampleis not exactly one literal of the base type.bynk.types.example_on_named_field— An@exampleon a field whose type is a named type (it belongs on the named type).bynk.types.example_unneeded— An@exampleon a refinementValcan already generate (onlyMatchesandIsoDatetake one).bynk.types.example_violates— An@exampledoes not satisfy its refinement’s predicates.bynk.types.extensible_match_needs_wildcard— Amatchcovers an extensible standard-library enum (FetchError,Method) without a wildcard; it may gain variants in a minor release.bynk.types.field_access_on_non_record— Field access on a value that is not a record.bynk.types.field_annotation_unknown— A record field carries an annotation other than@name("…").bynk.types.field_default_on_variant— A sum variant’s payload field declares a default (field: T = expr). Only a record’s fields may; a variant is built like a call, with every payload field given.bynk.types.field_name_bad_arg— A field’s@namedoes not take exactly one string literal, or aStringconstant bound to one.bynk.types.field_name_case_conflict— Two fields of acookiesorqueryrecord have wire names that differ only in case.bynk.types.field_name_duplicate— A field has more than one@name, or two fields of a request record read the same wire name.bynk.types.field_name_invalid— A field’s@nameis not a valid name for where the record is read (a cookie name that is not a token, or an empty name).bynk.types.field_name_not_request_record—@nameis on a field of a record that is not thecookies,queryor@form/@multipartbodyrecord of an HTTP handler.bynk.types.field_name_record_not_boundary— A record with@namefields is used as a JSON body, a result, a store field, an event or a call argument.bynk.types.field_refinement_not_base— An inline field refinement requires a base or refined type.bynk.types.field_value_mismatch— A record field was given a value of the wrong type.bynk.types.file_at_boundary— AFile(a file part of a multipart request), or a type carrying one, is used where it would be persisted, sent across a boundary or returned.bynk.types.form_uncodable—Form.decodeorForm.encodenames a type that is not a record of form fields (aString,Int,Bool,Decimal, an enum, or a refined or opaque type over one, optionally in anOptionor aList).bynk.types.function_at_boundary— A function type appeared in a serialisable or boundary position (a record field, sum payload, service/agent handler signature, capability operation signature, agent state field, or agent key); functions cannot serialise or cross a boundary.bynk.types.guard_not_bool— A match-armifguard is not aBoolexpression.bynk.types.headers_at_boundary—RequestHeadersappears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.bynk.types.held_at_boundary— A held value (Connection[F]) appears in a serialisable or boundary position — a held resource is built and disposed in place, never persisted or sent across a boundary (§2.9, real-time track slice 2).bynk.types.held_not_comparable— A held value (Connection[F]) is compared with==/!=— held values have identity, not value-equality (§2.9.3, real-time track slice 2).bynk.types.if_branch_mismatch— The branches of anifhave different types.bynk.types.if_non_bool_cond— Anifcondition is not aBool.bynk.types.if_without_else_requires_unit— Anifwith noelsebranch has a non-unit then-branch; the missing else defaults to(), so the branch must be()orEffect[()].bynk.types.interpolation_non_scalar— An interpolation hole holds a value with no string form.bynk.types.invalid_regex— AMatchespredicate, or a regex method’s pattern (containsRegex, …), contains an invalid regular expression or malformed inline flags.bynk.types.inverted_range— AnInRangepredicate has its bounds inverted.bynk.types.is_base_mismatch— Anisrefinement check is applied to a value of the wrong base type.bynk.types.is_literal_pattern— A literal was used on the right ofis;istests type/refinement, not value equality (use==).bynk.types.is_non_sum—iswas applied to a value that is not a sum type.bynk.types.is_range_pattern— A range pattern was used directly on the right ofis;istests type/refinement, not value ranges (usematch, a guard orInRange).bynk.types.is_refined_pattern— A refined (where) pattern was used on the right ofis; refined patterns arematch-only.bynk.types.is_unknown_variant—isnames a variant the type does not have.bynk.types.json_uncodable— AJson.encode/Json.decodetarget type cannot pass through the typed JSON codec (functions, effects, streams or a type that carries one,bynk.cryptokeys, error builtins).bynk.types.key_at_boundary— Abynk.cryptoSigningKeyorVerifyKeyappears in a storable or boundary-crossing position — a key is held non-extractable and lives for the call that imported it, never persisted, logged or sent (standard-library K4).bynk.types.key_not_orderable— AsortBy/sortByDescending/min/maxkey function does not return an orderable type. The key must be anOrdtype, on aListand on a storageQueryalike.bynk.types.lambda_mismatch— A lambda’s parameter count, parameter annotations, or body type do not match the expected function type.bynk.types.let_annotation_mismatch— Aletvalue does not match its type annotation.bynk.types.list_element_mismatch— A list-literal element has a different type from the list’s element type.bynk.types.list_pattern_on_non_list— A list pattern is matched against a value that is not aList(a record, sum, base type,SetorMap).bynk.types.match_arm_mismatch— Amatcharm has a different type from the others.bynk.types.match_non_sum_discriminant—matchwas applied to a value that is not a sum type.bynk.types.method_arity— A method was called with the wrong number of arguments.bynk.types.method_not_found— Called a method the type does not have.bynk.types.method_on_non_named_type— A method was called on a built-in type that has no methods.bynk.types.mixed_pattern_bindings— A pattern mixes named and positional bindings.bynk.types.negative_length— A length predicate was given a negative value.bynk.types.never_inferred— An unannotatedletor<-binding has a type that is, or contains, the bottom type (never returns) because its value only faults (a faulting lambda bound this way included); the type cannot be written in source, so an annotation is needed.bynk.types.no_numeric_coercion—Int,FloatandDecimalwere mixed without an explicit conversion — in an operation, a comparison or refinement bounds.bynk.types.non_exhaustive_match— Amatchdoes not cover every value.bynk.types.not_codable— A type is instantiated at aCodable-bounded parameter (of a generic function, or of a capability operation) but is outside the domainJson.decodeaccepts: top-level(), a function,Effect,Query, aStreamor a type that carries one, a connection, the HTTP and queue result types,Asset, request headers, token claims, or an actor (constrained-generics slice 3).bynk.types.not_comparable— A value compared with==/!=contains a function,Effect, orQuerysomewhere inside it — those have no value equality, so the type is not equality-supporting (type-system §2.3.5, #1652).bynk.types.not_keyable— AMapkey,Setelement, ordistinct/distinctBy/groupBy/join key, or an argument to aKey-bounded parameter, is notKey.String,Int,Bool,Instant,Duration,Bytes,Option/Listof a key type, refined and opaque types over them, and records, sums and enums made only of key types are; aFloatis never one, at any depth, becauseNaNis not equal to itself (constrained-generics slice 2).bynk.types.not_orderable— A value is ordered (<,<=,>,>=), or passed to anOrd-bounded parameter, but its type is notOrd.Int,Float,String,Duration,Instant,Bytes,Option/Listof an orderable type, refined types over those, and types that declarederives Ordare; addingderives Ordis offered as a fix that is never applied automatically, because it makes declaration order significant (constrained-generics slice 1).bynk.types.ok_value_mismatch— AnOkpayload has the wrong type.bynk.types.opaque_raw_outside—.rawon an opaque type was used outside its defining commons.bynk.types.opaque_unsafe_outside—.unsafeon an opaque type was used outside its defining context.bynk.types.or_pattern_binding_mismatch— An or-pattern’s alternatives don’t all bind the same set of names.bynk.types.or_pattern_type_mismatch— An or-pattern’s alternatives give a shared binding different types (or refinements).bynk.types.pattern_arity— A pattern binds the wrong number of payload fields.bynk.types.pattern_type_mismatch— A pattern’s type does not match the matched value.bynk.types.polynomial_regex— AMatchespattern can split the same text between repetitions, so matching time grows polynomially with input length, and no length predicate bounds the input small enough for its degree; a regex method’s pattern has no bound to excuse it.bynk.types.polynomial_regex_capped— Warning AMatchespattern’s matching time grows polynomially with input length, but aMaxLengthorLengthpredicate bounds the input small enough for its degree (warning).bynk.types.predicate_base_mismatch— A predicate does not apply to the type’s base (e.g. a string predicate on anInt).bynk.types.query_at_boundary— AQuerytype appears in a storable or boundary-crossing position — a query is built and executed in place, never persisted or sent (ADR 0115).bynk.types.question_error_mismatch—?propagates an error type incompatible with the function’s.bynk.types.question_on_non_result—?was applied to a non-Resultvalue.bynk.types.question_option_outside_http—?lifts anOptiononly inside a handler returningHttpResult(NonebecomesNotFound); elsewhere use.okOr(err).bynk.types.question_outside_result—?used in a function that does not return aResult.bynk.types.range_pattern_on_non_int— A range pattern (lo..hi) was matched against a scrutinee that is not anInt.bynk.types.record_pattern_on_non_record— A record pattern names a type that is not a record (a sum, enum, refined or opaque type, or a built-in).bynk.types.regex_not_literal— A regex method’s pattern (matchesRegex,containsRegex,findRegex,findAllRegex,replaceRegex,splitRegex) is not a string literal, so its ReDoS check cannot run at compile time.bynk.types.rejection_at_boundary—BoundaryRejectionappears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.bynk.types.request_cookies_at_boundary—RequestCookiesappears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.bynk.types.request_query_at_boundary—RequestQueryappears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.bynk.types.return_mismatch— A returned value does not match the declared return type.bynk.types.rounding_mode_position—RoundingMode.<mode>was used outside the mode argument of aDecimal’sroundordiv. A mode is read where the rounding happens and is not a first-class value (#2622).bynk.types.select_tail_has_select— AD1,PostgresorMySqlselect[T]orfirstAs[T]statement does not start atFROM(for example it begins withSELECT,WITHor a parenthesis); the compiler writes theSELECTand column list fromT.bynk.types.sequence_needs_result—sequenceAll/sequenceTrywas called on a list whose elements are notResults. They collect aList[Result[T, E]].bynk.types.some_value_mismatch— ASomepayload has the wrong type.bynk.types.sql_not_literal— AD1orPostgresstatement’s SQL (the first argument ofall,first,run,selectorfirstAs, or thesqlof aSqlStatementor aPgStatement) is neither a string literal nor a bare reference to aStringconstant bound to one, so data could be spliced into it instead of bound as aSqlValueorPgValueparameter (standard-library P4c, Hyperdrive H1 and H3).bynk.types.sql_row_shape—Json.decodeSql[T]’s (orselect[T]’s,firstAs[T]’s)Tis not a SQL row: a record whose fields areInt,Float,String,BoolorBytes(or a refined or opaque type over one, or anOptionof either), or aListof such records (standard-library P4c). APostgresrow may also hold aDecimalor anInstant(Hyperdrive H3).bynk.types.sql_statement_at_boundary— Abynk.cloudflareSqlStatement,PgStatementorMySqlStatementappears in a storable or boundary-crossing position, or as aJsoncodec target — a statement from outside would carry SQL that was never a literal (standard-library P4c).bynk.types.stream_at_boundary— AStreamtype, or a record or sum carrying one in a field, appears in a storable or boundary-crossing position — a stream is a live value-over-time source, never persisted or sent across a boundary (real-time track slice 0; #2623 admits it in capability signatures and record fields).bynk.types.stream_not_comparable— AStreamvalue is compared with==/!=— a stream is a live value-over-time source, not a comparable value (real-time track slice 0).bynk.types.type_mismatch— An operator or built-in method got an operand of a type it does not accept, or two operands that had to match did not.bynk.types.uninferable_element_type— An empty[](orList.empty()/Map.empty()) has no expected type to infer its element type from.bynk.types.unknown_annotation— An annotation after a refinement is not@example.bynk.types.unknown_field— Referenced a field the record type does not declare.bynk.types.unknown_pattern_field— A pattern names a field the variant does not have.bynk.types.unknown_rounding_mode— ADecimalroundordivwas not given a rounding mode writtenRoundingMode.<mode>; the modes areDown,Up,Floor,Ceiling,HalfUp,HalfDownandHalfEven(#2622).bynk.types.unknown_static_member— A name afterHttpResult.that is not one of its variants. An unknown member of a type you declared isbynk.resolve.unknown_static_member.bynk.types.unknown_variant_in_pattern— A pattern names a variant the sum type does not have.bynk.types.unreachable_arm— Amatcharm is unreachable.bynk.types.variant_arity— A variant constructor got the wrong number of arguments for its payload fields (a pattern with the wrong number of bindings isbynk.types.pattern_arity).bynk.types.variant_missing_payload— A variant requiring a payload was used without one.bynk.types.variant_payload_mismatch— A variant payload has the wrong type.
bynk.uses.name_conflict— Two commons a unitusesdeclare the same type, function, constant, asset or embed; or a value crosses between a unit’s code and an imported declaration’s position whose type the unit shadows; or a reference names an import the unit’s own declaration shadows.bynk.uses.self_reference— A commonsusesitself.bynk.uses.target_is_context—usestargets a context instead of a commons.bynk.uses.unknown_commons—usesnames a commons that does not exist.
Value fabrication
Section titled “Value fabrication”bynk.val.agent_not_generable— Afor all/Valcannot generate an agent — fabricated agent states need not be reachable.bynk.val.arity—Val[T]was given the wrong number of pin arguments.bynk.val.generic_type— AVal[…]fabricates a value of a generic type; per-instantiation value fabrication is not yet wired (ADR 0197). The type itself may cross a boundary through its monomorphised codec (v0.174). Namedbynk.generics.generic_record_at_boundarybefore #3379.bynk.val.literal_violates— A pinnedVal[T]value violates the type’s refinement.bynk.val.needs_pin— A bareVal[T]cannot generate a value (e.g. aMatchesstring); pin one.bynk.val.outside_test—Val[T]was used outside a test case body.bynk.val.pin_not_literal— AVal[T]pin argument is not a compile-time literal.bynk.val.pin_unsupported— A pin was given for a type kind that does not support pinning.bynk.val.unknown_type—Val[T]names a type that does not resolve.bynk.val.unsupported_kind—Val[T]cannot fabricate a value for this kind of type.
npm requirements
Section titled “npm requirements”bynk.requires.conflicting_range— Two adapterbinding … requires { … }entries give different version ranges for one npm package.bynk.requires.unapproved— A reached adapter of a git or registry dependency requires an npm package, at a range, that the project hasn’t approved inbynk.lock; review it and runbynk approve <package>.bynk.requires.unpinned_dependency— An adapterbinding … requires { … }entry has an unpinned version range.