Skip to content

v1.0.16 — Fewer silent failures

Choose a tag to compare

@xanojustin xanojustin released this 23 Oct 16:42
· 18 commits to main since this release

This release is about failures that used to pass quietly. The compiler now refuses shapes the engine runs wrong, export() warns on about 30 more patterns that deploy fine and then misbehave, and the types now match what the engine actually binds. The grounding docs were fact-checked and shortened. Some calls that compiled before now fail to type-check or throw at build; each one was a runtime 500 or a wrong answer.

npm install @xano/sdk@1.0.16

⚠️ A where must be a comparison, and auth() needs a path

A query whose where was a value (c.bool(true), a text clause, or one built at run time such as inp("clause")) ran with no filter and returned every row. Every value where now throws at build. Bind run-time values as operands instead: expr(col("status"), "=", inp("status")).

A bare auth() also throws now. The engine can't read it: as a response member it was dropped, and in a stack it caused a 500. Pass a path: auth("id") or auth("extras.<key>").

lock on a count, an aggregate, or a list with paging.totals is refused too.

⚠️ Types now match what the engine binds

  • s.function.call / s.tool.call results now include the error envelope ({ code, message, payload } or { payload, statement }). Outside a workflow test, these calls bind a failed target's envelope at HTTP 200 instead of raising. s.function.run still raises on failure.
  • An omitted optional input types as its empty value ("", 0, false, [], {}), not null, because the engine binds the empty value.
  • An f.enum column reads back as members | "".
  • An input.geo.* reads back as WKT text ("POINT(10 20)"), not { type, data }.
  • fl.null() is an is-null check that returns a boolean. Use c.null() to produce a null.
  • Corrected result types for some/every/find/findIndex/reduce, bitwise_not, strpos/stripos, epochms_transform and url_hasarg.

A type error here points at code that was reading the wrong shape at runtime.

export() warns on about 30 more silent-failure shapes

New warnings cover, among others:

  • a nested drill into a db.get row that may be null (stack.drill-maybe-null)
  • a variable bound only on some branches (stack.var-conditionally-bound)
  • a returned get_env binding (stack.env-secret-in-response)
  • a bare-string precondition error, which the engine replaces with a generic message
  • crypto statements left on weak defaults
  • an optional expiration on create_auth_token, which can mint tokens that never expire
  • ===/!== in a database where
  • a constant by on the array set operations
  • includes against a list column
  • a returned stream binding
  • a middleware pre "replace" that drops an input the query reads
  • an s.return body outside InferResponse

--strict turns every one into a build failure.

s.realtime.kick evicts a revoked member

A channel's join gate runs once, so revoking access later left the socket subscribed. s.realtime.kick({ server, channel, authTable, authId, reason? }) removes every socket for that identity from the channel and tells each one { left: true, kicked: true, reason }.

s.throw takes a status

s.throw({ …, status }) (100–599) sets the response status of an uncaught throw, including through s.function.run. Without status, a throw still answers 200.

xanosdk local update downloads a current pin the machine lacks

On a fresh machine whose pin was already the latest, local update said "Already on vX — nothing to update" and downloaded nothing, so the next local run had no engine. It now fetches the pinned engine when it isn't cached (a cached one is still read from disk, with no request), and its JSON reports downloaded. CI that worked around this can drop the workaround.

s.api.request accepts method: "QUERY"

QUERY (RFC 10008) is the safe HTTP method that sends params as the request body. Before this, the build-time enum guard refused it.

routes.gen.ts exports a dependency-free routeQuery()

A frontend can serialize a GET route's typed inputs with routeQuery(key, input) without importing the 85 kB SDK runtime.

s.util.send_email's built-in provider sends only to the workspace owner

The docs said service_provider: "xano" needs no setup, but not that it ignores to/cc/bcc and delivers only to the workspace owner. Use "resend" for email to users. A failed send doesn't raise: as binds { status: "error", error }.

Grounding docs fact-checked and condensed

About 120 docs changes cover engine behavior, mostly silent failures, such as:

  • an empty 200 for a NaN math result
  • table triggers that run after commit and can't veto
  • not in [] matching no rows
  • a bare count of zero answering an empty body

An audit fixed contradictory claims, removed changelog-style wording, and cut the router llms.txt to 9,880 tokens.

Notes

  • Test runner. test run-all no longer stops when one test answers 401/403 or a labelled 501; that test fails and the run continues. active: false workflow tests are skipped.
  • Agents. An agent with structured output now runs its tools first. allowToolExecution defaults to true.
  • xano/.env. A bare NAME= line is refused on a replace deploy. Values with leading or trailing whitespace are quoted on write, and an unquoted # warns.
  • Capabilities. A deploy lists an async run mode as an instance capability the target must have, and reports private file storage as unavailable on the Xano Engine.