Skip to content

Smeldr v1.194.0 — webhook retry and check reopen

Choose a tag to compare

@xxwink xxwink released this 16 Nov 14:51
· 16 commits to main since this release

[1.194.0] - 2026-11-16

Security

  • The bootstrap admin token is no longer kept by CaptureLogs or served at /_logs (T1299). It still shows once on standard error at start, unchanged. This affected a Go program that calls CaptureLogs before the token store creates the bootstrap token; the release binary does not call CaptureLogs.
  • What core needs so that an OAuth access token stands for exactly the Smeldr token pasted at sign-in (D195, T1287). This is the core part. The fix lands with smeldr.dev/oauth and smeldr.dev/mcp, and their CHANGELOGs say what a client and a server must do.
    • TokenStore.ActingUser reads a stored token by its fingerprint: the user it acts as, its role and class, and whether it is still valid.
    • User.Via and ProvenanceRecord.Via note the client a request came through, beside the token's own signature. CreateProvenanceTable adds the via column.

Changed

  • The release workflow builds nothing unless ci.yml is green on the tagged commit (T1297). A first job, ci-green, runs scripts/ci-green.sh with the workflow's own token (actions: read): green passes; red stops; a run still going is waited for up to 45 minutes; no run is waited for up to 10 minutes, then stops. When it stops, nothing is built or attached and the release stays a draft. It reads ci.yml only, not the macOS getting-started or pin-currency workflows. It gates a tag on a commit that carries it; a tag on an older commit runs that commit's workflow, ungated. A release on a green commit builds the same five binaries and SHA256SUMS and publishes as before. cli's release workflow has the same gate.
  • A change in the Decisions in force reopens the open pull request Checks of the Area (D196, T1294). Before, an approved Check stayed approved when a Decision for one of its Areas was superseded, retired or newly ratified, so a pull request could merge on an approval given against a Decision that no longer held. Now:
    • Every open Check of the Area is checked again as a new Check of the same commit. Where an Area requires approval it waits again, with new requests to its approvers.
    • The old Check is superseded, and its answers stay readable.
    • The host's status goes from passing to waiting.
    • It happens in the call that changed the Decision, and a sweep is the guarantee (App.RecheckChangeChecks; the example server runs it on CHANGE_CHECK_RECHECK_SCHEDULE, default every 5 minutes, whenever governance records are on). After a failed step, an approval can stand until the next sweep.
    • Checks made before this release are not reopened, since their changes may have been merged without core knowing.
    • Update smeldr.dev/github with core. Until then, a pull request closed without a merge is not reported, and its Check can be reopened when a Decision of its Area changes, asking approvers about a change nobody will merge.
  • The release binary lists the schema tools with ENABLE_DYNAMIC_CONTENT (T1292). Before, a server could define a runtime type but not show its schema without ENABLE_SCHEMA_TOOLS too, so smeldr-cli content-type get answered unknown tool: get_content_type_schema. Now get_content_type_schema and list_content_type_schemas are listed whenever ENABLE_DYNAMIC_CONTENT is on. They only read, and their role requirement is unchanged. Nothing is removed: ENABLE_SCHEMA_TOOLS and ENABLE_BLOCKS list them as before.
  • The three approval roles read the place they approve in (D191, T1247). Before, a domain-approver or area-approver with no reader grant beside it was refused the Decisions and Checks it was meant to approve, so an area-approver alone could not answer its change checks.
    • domain-approver and area-approver now hold read over their place, as domain-reader and area-reader do.
    • approver reads every place and what is placed in it: every Organization's hierarchy, not every record.
    • Nothing else widens: no write, manage or administer, and no read outside the place.
    • At the upgrade, existing grants of these roles read their place from the first boot. A token's event subscriptions may then deliver events they did not deliver before, because delivery follows read. To see who holds the three roles first, use approvers_of or smeldr-cli approvers <place>.
    • D97: nothing is removed. A call that was refused is answered.
    • A role you register yourself with ratify or approve-change is unchanged, and needs read to be usable.

Added

  • App.RecordClose and App.RecheckChangeChecks (D196, T1294).
    • RecordClose(ctx, CloseInput) records that a change was closed without a merge (capability item check_change). Its Check is no longer reopened, and its open requests are withdrawn.
    • RecheckChangeChecks(ctx) is the sweep behind the reopen, returning RecheckResult{Checked, Reopened, Failed}. Call it every few minutes if you use the change check.
  • ContradictionSweep.Stale: how many open contradiction rows written since T928 the sweep resolved because their contradiction no longer holds (T1242).

Fixed

  • Webhook retry refuses a delivered job and an id that names no job (T1266). WebhookJobQueue.RetryDead (and so retry_webhook and smeldr-cli webhook retry) set any job it was given back to pending with no condition: a delivered job was delivered a second time, and an unknown id answered "retried": true. It now updates only a dead or pending job, in one conditional statement. A delivered job is refused with webhook.job_delivered (409, ErrConflict, values job and status) and an unknown id with webhook.job_not_found (404, ErrNotFound, value job); nothing changes then. Still retried as before: a dead job, a pending job in its backoff (sent now) and a pending job past its delivery window (sent again). A claim is not visible to a retry, so retrying a job while a worker delivers it can still deliver it twice, as before.
  • A Standalone() module now starts beside a default or APIOnly module (T1295). Before, the program panicked at start: the GET /{slug}/aidoc pattern conflicted with every module's GET /{prefix}/{slug}. A Standalone item's AI doc is now served by the catch-all, after the modules' own routes. So /posts/aidoc is still the posts item with the slug aidoc, and nothing that answered before answers differently.
  • app.Content(&T{}, smeldr.Repo(...)) with a typed Repo panics with what to write (T1295): app.Content(smeldr.NewModule(&T{}, smeldr.Repo(...), smeldr.At(...))). Before, it said "use smeldr.Repo(...) or App.Content", which is what the reader had done. NewModule without a Repo now says to pass smeldr.Repo(...) to smeldr.NewModule.
  • A Decision's ratification-required request is placed with the Decision (T1289). Before, it had no place, so a domain-approver or area-approver (who read their place since T1247) did not see the request they are there to answer. It now moves with the Decision as its other conditions do. Requests already open, and those MigrateSignalKinds opens at boot (it does not place them itself), are placed by App.SweepContradictionConditions, which example/server runs at boot and on the structural sweep's schedule. On a server that runs neither, such a request is placed when its Decision's place changes, or when the server calls SweepContradictionConditions or SweepPremiseFlags. A request for an unplaced Decision stays unplaced until the Decision is placed.
  • A contradiction holds its conflict-detected rows only while both Decisions can still hold (D192, T1242). A Decision that is proposed, ratified or pending-re-evaluation can still hold; superseded, retired and archived cannot. Before, an edge asserted when a side was already superseded opened two rows that nothing would close, and a proposed side archived without being ratified left both rows open, because only a move out of ratified resolved them. Now such an edge opens nothing, and any move out of play resolves both rows: D5 can no longer hold (archived) on its own row and the contradicting Decision can no longer hold on the other. A move ratified -> pending-re-evaluation no longer resolves them, since the Decision still holds. App.SweepContradictionConditions also resolves open rows written since T928 whose contradiction no longer holds. Also: ratification-required names the Decision by its address instead of its internal ID, and re-asserting a live contradicts edge from its other end is the same edge for the rev check (rev_missing without a rev, rev_conflict with a stale one); before, it skipped the check.
  • Field and flow descriptions, Signal-kind descriptions, provenance reasons and a problem type's title no longer name a record of Smeldr's own instance (T1222). Texts such as "Required (D112): one line ..." or the reason "founder of the organization (D142)" cited a record on smeldr.dev's instance; on a self-hoster's instance that address is another record or none. Each text now says what it means without the address: the smeldr_description of title, the deprecated number fields, sources, amendment_type, pilot and external_ref ("an address such as D1"), the Task and Goal flow descriptions, the premise-flagged and change-unapproved Signal kinds, the no_commit field and the task_plan schema change reason, the reasons core writes on the founder's grants, the approval-role rename, the default places, a reworded contradiction, a restored edge and a resolved premise flag, and the schema.field_invalid title ("title over the 120-character limit"). Reasons already stored stay as they are. Tool and argument names, the rule of each problem type and the D110 value of the deprecated-field warning are unchanged. A guard test now reads every string literal in the package, with an allow-list of five, each with its reason: four log lines and the D110 wire value.
  • An agent or a job refused on a Decision's or an Area's place now gets the reason, not a bare forbidden (T1236). Supersede (either form), repair, placing or moving a Decision or an Area, deleting an Area, changing an approval mode, a coverage rule or sources, and confirm_premise all refuse an agent or a job with ratify.automated_class. They used to send it as a plain forbidden whose text named the place. MCP therefore answered only forbidden, with the type but no values, and the cli showed only that word, while retire showed its reason. The refusal is now a RefusalError with a reason that names no item ("an agent token never ratifies, so it cannot supersede; a person with ratify over the place does") and the values token_class and act. errors.Is(err, ErrForbidden) still holds. Nothing a caller saw before is removed: over MCP the old answer carried no values at all, and the place value it had in Go is left out because the place may be one the caller cannot read.

Docs

  • App.Redirect's doc comment says the chain is followed forward (T1282). If to is already a stored rule's from, the new rule is stored with the end of the chain (B→C stored, then A→B gives A→C). A rule stored earlier is not rewritten: with A→B stored first, a later B→C leaves A→B, and a request to A is redirected twice. The comment described the second order as collapsed, which the code never did; the code, RedirectStore.Add's comment and Decision 24 are unchanged.

  • The blog example's sample posts say what README verifies about dependencies (T1282). The post "Why Smeldr Has Zero Dependencies" is now "Why the Smeldr Package Imports Only the Standard Library": the package imports only the standard library, and go.mod's modernc.org/sqlite is there for the package's own tests. Its unverified timings are gone, and the v1.0.0 post drops "Zero Dependencies" and its figures. example/blog/smeldr-pattern.md writes the JSON keys as the blog does (Slug, Title, PublishedAt, Body).

  • The README names the downloaded files smeldr-server and smeldr-cli in every shell, and macOS gets a block of its own (T1246). In "Start in three minutes", each step downloads under the release name, checks it, and renames it. There is one block each for:

    • Linux and WSL (sha256sum -c, mv, chmod +x);
    • macOS (darwin-arm64, with the Intel file named; shasum -a 256 -c);
    • Git Bash (the windows-amd64.exe file, sha256sum -c, mv to .exe);
    • PowerShell (download, check, then Rename-Item).

    Every later command uses the one name, as the /docs pages do. docs/SELF_HOSTING.md renames after its check, and its run line and systemd unit use smeldr-server. scripts/gettingstarted/run.sh follows the README's line numbers and its Git Bash form, which has no chmod.

  • REFERENCE and the skill file describe the Claude Code hook, smeldr-cli hook pre-edit (cli v0.39.0, T1207). Before an agent's first edit of a file an Area covers in a session, the hook shows it the Decisions in force there and their text. The docs give the .claude/settings.json block, what Claude Code enforces and what it does not, and a CLAUDE.md passage. docs/CLI_MCP_PARITY.md notes that the command has no MCP counterpart, since it is a client-side adapter around existing reads. The README's init output line no longer names a record address, as cli v0.39.0 prints it.

CI

  • The macOS docs-pages job runs docs' page runner at 4bb5fdb and a fifth sequence, decisions-before-an-edit (T1275, T1277). scripts/run-pages is copied again from docs, whole: connect-an-agent and which-decisions-apply now run Getting started, then the example-places page, then their page, with no setup script (places.sh, mcp.sh and wda.sh are gone), and the runner has a -drafts flag. decisions-before-an-edit joins the matrix, so the job runs five sequences on two runners. The guard step and GOTOOLCHAIN: local are unchanged.
  • The docs-pages job no longer downloads a Go toolchain (T1269). setup-go installed Go 1.26.5 from scripts/run-pages/go.mod, but its go env ran in the repository root, whose go.mod names toolchain go1.26.11, so Go downloaded that toolchain. A DNS timeout on the download failed one job before the runner started (run 43729182209). The job now sets GOTOOLCHAIN: local, so every step uses the installed Go and nothing is fetched.
  • README's "Start in three minutes" runs on macOS in CI (T1207). scripts/gettingstarted/run.sh follows the README's steps on the release binaries. It downloads the server and smeldr-cli for the platform, checks each against SHA256SUMS as the README does, starts the server and runs smeldr-cli init. It then makes the agent's token and grant, and makes the tool calls an agent would make with the agent's token. No AI agent runs. Without a terminal, grant and transition need --rev, so the script reads the rev first, which a terminal would ask for. The script stops at the first answer that differs from the README. The workflow .github/workflows/getting-started-macos.yml runs it on Apple silicon (darwin-arm64) and Intel (darwin-amd64): after every core release, on pushes that touch README.md or the script, weekly on Mondays, and by hand. On failure it uploads the server log with the bootstrap token removed. The script also runs in Git Bash on Windows, and was run there on core v1.193.2 and cli v0.38.1. The README and the script are kept in step by hand.
  • The job runs the README's hash check for each platform as written (T1253). Before, the script checked with shasum -a 256 -c wherever shasum existed, also on Linux and in Git Bash, where the README says sha256sum -c. Now the check is chosen by OS_ARCH, never by what is installed: shasum -a 256 -c for darwin-* (the README's macOS bullet), sha256sum -c for every other platform. The downloads are the README's curl -LO and curl -sL ... | grep ... | lines, and a failed download is caught by the check. Two report-only steps never fail the job: a probe of what sha256sum and shasum are on the machine, and the /docs pages' check line (sha256sum --ignore-missing -c SHA256SUMS). The script's header lists every place it departs from the README.
  • The published /docs pages' bash blocks run on macOS too (T1253). scripts/run-pages is docs' page runner, copied into core as it is from docs commit 408d59c. COPIED_FROM.md names the commit and gives the one-line check that the copy matches it. A new docs-pages job in the same workflow runs the runner's four sequences (getting-started, deploy, connect-an-agent, which-decisions-apply) on Apple silicon and Intel. That is eight jobs, on the workflow's triggers. Each fetches its pages from smeldr.dev and runs their bash blocks as written. The job uploads nothing, because the runner's work directory holds the run's tokens. A guard step after checkout fails the job if the workflow file names a secret, grants a write permission, uses a runner that is not GitHub's, pushes or releases, or uploads from the docs-pages job.