Skip to content

Smeldr v1.195.0 - OAuth sign-in and approver reads

Latest

Choose a tag to compare

@xxwink xxwink released this 24 Nov 14:34
· 4 commits to main since this release

[1.195.0] - 2026-11-24

Security

  • The release binary signs an OAuth client in with the pasted token (T1287). With OAUTH_ISSUER set, example/server wires smeldr.dev/oauth's ResolveBearer and TokenActive to TokenStore.ActingUser. The access token then stands for the pasted token, and a revoked or expired token ends the client's access at its next refresh. Clients signed in before this sign in again.

Changed

  • The release binary is built with smeldr.dev/mcp v1.78.0 (it was v1.77.3). It brings record_close, the OAuth sign-in that stands for the pasted token (T1287), clearer refusals in retry_webhook (T1266) and the grant tools (T1248), and tool descriptions that name no record of smeldr.dev's own instance (T1222); see smeldr.dev/mcp's CHANGELOG.
  • The release binary checks OAUTH_ISSUER at start (T1286). Before, any value was published as given, so not-a-url gave the endpoint not-a-url/oauth/authorize.
    • Now the start stops, naming OAUTH_ISSUER, when the value is not an absolute http or https URL with a host, or has a query or a fragment. With these, every OAuth endpoint answered 404.
    • OAUTH_ISSUER without ENABLE_TOKENS is refused, since an access token stands for a Smeldr token.
    • Public http, user info and a trailing slash still start, each with a warning from smeldr.dev/oauth.
    • An issuer on another origin than BASE_URL starts, with one Info line naming both values.
  • The taken-URL condition names the item by its address (T1308). Its message said Decision 01a1... is scheduled, but its URL "about" is taken; it now names the item's address where its type has one (Decision D9 ...), and its ID otherwise. The type, the receiver and the values are unchanged; a message written before stays as it is.

Fixed

  • A program that serves app.Handler() itself answers HTML like app.Run (T1317). Through Handler() a module with Templates answered JSON to every request, also to Accept: text/html and to a request with no Accept, because only Run parsed the templates; it now answers text/html to both, and a client that wants JSON sends Accept: application/json. Handler() parses the templates and the partials once, as Run does; Run still refuses to start on a template that does not parse. Under Handler() such a template is logged once at ERROR, naming the module's prefix and the file, and that module keeps answering JSON. The doc comment and REFERENCE say what Handler() still does not do: the webhook worker pool, scheduled publishing, the version line and graceful shutdown belong to Run.

  • A token holding only approver reads a Domain made after setup, and what is placed in it (T1321). On v1.194.0 an approver read nothing in such a Domain: create_domain (and POST /domains) stored the Domain without belongs_to_organization, so it lay outside the Organization and D191's approver, who reads the Organization's hierarchy, read none of it (get_domain answered item.not_found, get_area, get_decision and list_decisions capability.denied). A Domain is now created in the Organization, in the same transaction. At the first boot on this release, a Domain made before it is placed in the Organization too, and one Info line names how many and their addresses; a Domain whose edge was ended on purpose is left alone. An unplaced record stays unread by the approver, as D191 says: it is placed before it is ratified.

  • A grant of a role with a dynamic scope must name its anchor (T1248). Grant (and grant_role) with an empty or blank ScopeAnchorID on a dynamic role is refused with the new grant.anchor_required (422, field scope_anchor_id, value role), and nothing is stored. Send the place the grant is over as scope_anchor_id (its address, slug or ID). Before, it was stored and reached nothing: no read, no ratify or approve-change, and ApproversOf never listed it, so a caller who misspelt or left out the anchor was told a right had been granted when none was. A static or global role is unchanged, and an agent or job still gets the agent rule's own refusal first. Grants already stored this way are not deleted: the server logs their count and grant IDs once at boot (smeldr: dynamic grants with no anchor authorize nothing; revoke them); revoke them with revoke_grant.

  • A PUT cannot clear PublishedAt (T1300). A PUT whose body had no PublishedAt saved the zero time, also on an item that stayed published: RSS showed it as 1 January 0001 and sorted it last, the sitemap gave it year 1, and the AI doc left out its "Published:" line. A PUT now keeps the stored time when the body has none, and keeps a time the body sends. The move into published still stamps now.

  • An OnSignal handler registered after App.Run runs (T1300). With no handler, listener or event stream at start, no module got the signal hook, so a handler added later never ran; with one, it did. The hook is now always set; a write with nothing listening costs about half a microsecond and three small allocations. AddSignalListener still belongs before App.Handler or App.Run, as its doc comment now says.

  • A webhook retry never makes two workers deliver one job (T1304). A worker's claim only moved next_retry_at, so a job a worker held looked like one in its backoff: retrying it made it due, a second worker claimed it, both delivered, and the first then wrote over the row. Now the claim names its holder (claim_id) and its lease (claimed_until), the holder's update after its attempt applies only while its own claim is on the row, and a retry of a held job only leaves a request (retry_requested): the job is due now right after the attempt in flight if that attempt fails, and not sent again if it succeeds. If the holder dies, the next worker to claim the job after the lease honours the request. A job table without the new columns works as before.

Added

  • App.SignalsAddressedTo(ctx, state, limit, offset) lists the Signals addressed to the caller (T1308). It returns the Signals whose receiver is one of the caller's routing names, newest first, and the total: its User.ID, the operations it holds under governance (such as ratify) and the receivers its subscriptions name (a role subscription names its band), the same names the addressed_to_me subscription filter matches. So a caller can list what waits on it without knowing the receiver words. state empty means open and pending together, as list_signals. The read scope applies before the page and the total: a holder of ratify over one Domain sees that Domain's ratification conditions, not another's. One query over the names, on SQLite and Postgres. A caller with no identity is refused with the refusal type signals.no_caller (403).
  • EnsureOutboundJobClaimColumns(ctx, db) and OutboundClaimHolderSQL (T1304). The function adds claim_id, claimed_until and retry_requested to a job table from before them; CreateWebhookTables calls it, so example/server's boot adds them. OutboundClaimHolderSQL is the worker pool's claim with a holder; OutboundClaimSQL is unchanged.

Docs

  • Every environment variable the release binary reads is listed (T1310). main.go's doc comment gains CHANGE_CHECK_RECHECK_SCHEDULE (the re-check of open pull request Checks, default */5 * * * *, read when governance records are on). AGENTS.md's table gains the 25 variables it did not list, from ENABLE_GOVERNANCE_RECORDS and ORGANIZATION_NAME to the five cutover dates, each with its default written as its value; ENABLE_SIGNAL_EXPIRY_SWEEP is listed as retired, only logging that it does nothing. A new test in example/server reads every os.Getenv, os.LookupEnv, envOr, requireEnv and getenv call and fails, naming each variable and the file, when one is missing from main.go's doc comment, docs/SELF_HOSTING.md or AGENTS.md.
  • What a PUT keeps, and who the scheduler is (T1300). updateHandler's doc comment and REFERENCE say a PUT keeps the stored ID, slug and address, so a Slug in the body is ignored with a 200 (a PATCH refuses it), and keeps PublishedAt when the body has none. SignalEvent.ActorRole is guest also for a system path with no actor, such as the scheduler's publish: ActorID is empty and Surface is trigger.