Repository navigation
Smeldr v1.194.0 — webhook retry and check reopen
[1.194.0] - 2026-11-16
Security
- The bootstrap admin token is no longer kept by
CaptureLogsor served at/_logs(T1299). It still shows once on standard error at start, unchanged. This affected a Go program that callsCaptureLogsbefore the token store creates the bootstrap token; the release binary does not callCaptureLogs. - 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.ActingUserreads a stored token by its fingerprint: the user it acts as, its role and class, and whether it is still valid.User.ViaandProvenanceRecord.Vianote the client a request came through, beside the token's own signature.CreateProvenanceTableadds theviacolumn.
Changed
- The release workflow builds nothing unless
ci.ymlis green on the tagged commit (T1297). A first job,ci-green, runsscripts/ci-green.shwith 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 readsci.ymlonly, 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 andSHA256SUMSand 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 onCHANGE_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 withoutENABLE_SCHEMA_TOOLStoo, sosmeldr-cli content-type getansweredunknown tool: get_content_type_schema. Nowget_content_type_schemaandlist_content_type_schemasare listed wheneverENABLE_DYNAMIC_CONTENTis on. They only read, and their role requirement is unchanged. Nothing is removed:ENABLE_SCHEMA_TOOLSandENABLE_BLOCKSlist them as before. - The three approval roles read the place they approve in (D191, T1247). Before, a
domain-approverorarea-approverwith no reader grant beside it was refused the Decisions and Checks it was meant to approve, so anarea-approveralone could not answer its change checks.domain-approverandarea-approvernow holdreadover their place, asdomain-readerandarea-readerdo.approverreads 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_oforsmeldr-cli approvers <place>. - D97: nothing is removed. A call that was refused is answered.
- A role you register yourself with
ratifyorapprove-changeis unchanged, and needsreadto be usable.
Added
App.RecordCloseandApp.RecheckChangeChecks(D196, T1294).RecordClose(ctx, CloseInput)records that a change was closed without a merge (capabilityitem check_change). Its Check is no longer reopened, and its open requests are withdrawn.RecheckChangeChecks(ctx)is the sweep behind the reopen, returningRecheckResult{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 soretry_webhookandsmeldr-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 adeadorpendingjob, in one conditional statement. A delivered job is refused withwebhook.job_delivered(409,ErrConflict, valuesjobandstatus) and an unknown id withwebhook.job_not_found(404,ErrNotFound, valuejob); 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 orAPIOnlymodule (T1295). Before, the program panicked at start: theGET /{slug}/aidocpattern conflicted with every module'sGET /{prefix}/{slug}. A Standalone item's AI doc is now served by the catch-all, after the modules' own routes. So/posts/aidocis still the posts item with the slugaidoc, 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.NewModulewithout a Repo now says to passsmeldr.Repo(...)tosmeldr.NewModule.- A Decision's
ratification-requiredrequest is placed with the Decision (T1289). Before, it had no place, so adomain-approverorarea-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 thoseMigrateSignalKindsopens at boot (it does not place them itself), are placed byApp.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 callsSweepContradictionConditionsorSweepPremiseFlags. A request for an unplaced Decision stays unplaced until the Decision is placed. - A contradiction holds its
conflict-detectedrows only while both Decisions can still hold (D192, T1242). A Decision that isproposed,ratifiedorpending-re-evaluationcan still hold;superseded,retiredandarchivedcannot. 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 ofratifiedresolved 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 andthe contradicting Decision can no longer holdon the other. A moveratified -> pending-re-evaluationno longer resolves them, since the Decision still holds.App.SweepContradictionConditionsalso resolves open rows written since T928 whose contradiction no longer holds. Also:ratification-requirednames the Decision by its address instead of its internal ID, and re-asserting a livecontradictsedge from its other end is the same edge for the rev check (rev_missingwithout a rev,rev_conflictwith 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_descriptionoftitle, the deprecated number fields,sources,amendment_type,pilotandexternal_ref("an address such as D1"), the Task and Goal flow descriptions, thepremise-flaggedandchange-unapprovedSignal kinds, theno_commitfield 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 theschema.field_invalidtitle ("title over the 120-character limit"). Reasons already stored stay as they are. Tool and argument names, theruleof each problem type and theD110value 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 theD110wire 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 withratify.automated_class. They used to send it as a plain forbidden whose text named the place. MCP therefore answered onlyforbidden, with the type but no values, and the cli showed only that word, while retire showed its reason. The refusal is now aRefusalErrorwith 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 valuestoken_classandact.errors.Is(err, ErrForbidden)still holds. Nothing a caller saw before is removed: over MCP the old answer carried no values at all, and theplacevalue 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). Iftois already a stored rule'sfrom, 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/sqliteis 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.mdwrites the JSON keys as the blog does (Slug,Title,PublishedAt,Body). -
The README names the downloaded files
smeldr-serverandsmeldr-cliin 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.exefile,sha256sum -c,mvto.exe); - PowerShell (download, check, then
Rename-Item).
Every later command uses the one name, as the /docs pages do.
docs/SELF_HOSTING.mdrenames after its check, and its run line and systemd unit usesmeldr-server.scripts/gettingstarted/run.shfollows the README's line numbers and its Git Bash form, which has nochmod. - Linux and WSL (
-
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.jsonblock, what Claude Code enforces and what it does not, and a CLAUDE.md passage.docs/CLI_MCP_PARITY.mdnotes that the command has no MCP counterpart, since it is a client-side adapter around existing reads. The README'sinitoutput line no longer names a record address, as cli v0.39.0 prints it.
CI
- The macOS
docs-pagesjob runs docs' page runner at4bb5fdband a fifth sequence,decisions-before-an-edit(T1275, T1277).scripts/run-pagesis copied again from docs, whole:connect-an-agentandwhich-decisions-applynow run Getting started, then theexample-placespage, then their page, with no setup script (places.sh,mcp.shandwda.share gone), and the runner has a-draftsflag.decisions-before-an-editjoins the matrix, so the job runs five sequences on two runners. The guard step andGOTOOLCHAIN: localare unchanged. - The docs-pages job no longer downloads a Go toolchain (T1269).
setup-goinstalled Go 1.26.5 fromscripts/run-pages/go.mod, but itsgo envran in the repository root, whosego.modnamestoolchain 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 setsGOTOOLCHAIN: 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.shfollows 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 runssmeldr-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,grantandtransitionneed--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.ymlruns 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 -cwherevershasumexisted, also on Linux and in Git Bash, where the README sayssha256sum -c. Now the check is chosen byOS_ARCH, never by what is installed:shasum -a 256 -cfordarwin-*(the README's macOS bullet),sha256sum -cfor every other platform. The downloads are the README'scurl -LOandcurl -sL ... | grep ... |lines, and a failed download is caught by the check. Two report-only steps never fail the job: a probe of whatsha256sumandshasumare 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-pagesis docs' page runner, copied into core as it is from docs commit408d59c.COPIED_FROM.mdnames the commit and gives the one-line check that the copy matches it. A newdocs-pagesjob 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 thedocs-pagesjob.