Changelog
All notable changes to bide are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. While bide is pre-1.0, a minor version (0.x.0) may include breaking API changes, which are marked Breaking: below; the journal format can change between pre-releases without a version bump. Curated highlights for each release are in docs/releases.
Unreleased
Unreleased changes are in changes/unreleased/.
0.26.0 - 2026-10-28
Added
Flow.Runtakesagent.WithUntrustedInputandagent.WithTrustedInput(a flow run refused them withErrConfigbefore): the source or reason is recorded inrun:start's settings, a later drive that states another source isErrConfig, and an untrusted source is the first mark of a run under a flow taint policy. Experimental.- Plan flows enforce a taint policy (experimental, Go only).
Builder.WithTaintPolicy(orplan.WithLoadedTaintPolicy) gives a flow anagent.TaintPolicy, andplan.Untrusted,plan.Trusted,plan.TaintExempt, a tool's own declarations and theuntrustedkey of a config node say what each node's results carry. Once a run has read untrusted content (a node that declares a source, the run's input whenWithUntrustedInputnames it, or what a flow a node started brought up), a node that can have a side effect needs the policy's escalation gate on a second subject,node:<name>:taint, before its attempt claim, or is refused underRefuse(plan.ErrTaintRefused). The run records its declarations inrun:start, a drive under other declarations isErrConfig, andFlow.Conformchecks that every node that ran met its obligation. A flow a node's body starts inside a run under taint inherits the status and marks as an agent child does, and sends the marks it learned up to that node (taint-mark:andtaint-child:records), also whenResolveHaltrecords the node's result.Build,Load,Validateandbide checkno longer refuse a flow that declares taint, and a flow block whose tool declaresUntrustedorTaintExempt, refused before, is accepted. An agent a node's body runs hands the marks it read up to the node before the node is recorded, and a flow run as an agent's tool marks the tool resultsubflow:<tool>when it ended with a mark. A flow with no policy that declares a source records it inrun:start(taint_sources; nothing is added for a flow that declares none), so it marks what it read when it is run as a tool or as a node's child; a drive by a flow that declares other sources (a node gainingUntrusted, say) isErrConfiguntil the run is cancelled. Do not drive a run that started under a flow taint policy with v0.25.x or earlier: they do not read the taint records and run a node this release refused or held at its gate (see KNOWN-LIMITATIONS). plan.RegistryDescriptionis version 2: each block and merge carriesuntrusted,trustedandtaint_exempt, the description carriestaint_declared(so a block that lists none declares none) andtaint_policy(plan.TaintPolicyDescription, built from anagent.TaintPolicybyplan.DescribeTaintPolicy;Describeleaves it empty because the policy is the Builder's). A version 1 description is still read and says nothing about taint.bide doctor -declarationsand-diffread such a description as a flow's declarations: a removedUntrustedsource, a newTaintExempt, a lower gate orrequire_provenanceturned off is weakened, and a description that gives no policy cannot be compared with another (one weakened line). Experimental.plan.DescriptionVersionis 2 andDescribewrites it: a description written by v0.26.0 is version 2, which v0.25.x refuses; v0.26.0 reads version 1 and 2.bide editshows the static taint view: words and a ring under each node, the same words in the outline and the node's accessible name, a Taint section in the inspector with the path from a source, a Taint panel whose buttons select the nodes to look at, an announcement when it changes, and the banner UNTRUSTED EXPOSURE WIDENED when an edit makes a side-effecting node newly read untrusted data with no policy to cover it.flowedit.WithTaintPolicygives an embedded editor the flow's taint policy;bide edit -blocksuses the description's. Without the declarations the editor says "taint: not known without -blocks". Experimental.plan.ConfigReport.Taint(aplan.NodeTaintfor each node) is the static view of flow taint: which declared sources may run before a node, what the flow's taint policy would do to it (escalates,refused,exempt, orreads untrustedwhen the policy is not given), and what the view cannot know.plan.InspectTaintPolicygivesInspectConfigthe policy (the zeroagent.TaintPolicystates there is none);InspectConfigDescribedreads the description's.bide checkprints a taint section, or one line ("taint: not known without -blocks", or "taint: not known (reason)" when the blocks declare no taint), andbide check -diffreports a side-effecting node that newly reads a source (listed when the policy gates it or it is exempt, weakened asUNTRUSTED EXPOSURE WIDENEDwhen the policy is known to be absent, not certified when the policy is not given) and a source a node no longer declares. Experimental.agent.TaintPolicy.SeparateApprovers(experimental) makes a taint policy's escalation gate a second look by other people. On a call's escalation instance (<call>#taint, ornode:<name>:taintin a plan flow) the approvers whose decisions the call's own gate counted do not count, the tally records them asexcluded_by_sibling, and an instance left with too few approvers to reach the Gate'sNeedis denied instead of waiting.agent.NewandplanBuildareErrConfigfor a tool or node that can be escalated whose own gate is one decision or shares an approver ID with the policy's Gate, and for a policy that separates approvers with aSingleApprovalorRefuse. The field is in the declarations digest and thebide doctordocument only when set, andbide doctor -diffreports its removal as weakened.audit.ApprovalEvidencecarries the own gate's tally with an instance's evidence, andaudit.VerifyApprovalsrecounts it with the same exclusion underagent.ApprovalPolicy.SeparatedFrom;bide audit verify-approvalstakes-separate-approvers. The gate-reason record of such a call carriesseparate_approvers, and the approvals intake refuses (403,excluded_by_sibling) a decision by an approver the call's own gate counted,bide approveandbide approve -list, the run viewer and the notifier stop presenting that approver as eligible. A policy digest changes only for a policy that sets the field. New:agent.ApprovalPolicy.SeparatedFrom,agent.ApprovalTally.ExcludedBySibling,agent.ReasonSiblingandagent.ReasonNoSibling.
Changed
Step,ParallelandResolveHaltnow refuse a step name that starts withtaint-mark:ortaint-child:, which the engine reserves for the taint marks and child links of a plan flow (agent.IsReservedStepName).- A live model turn whose tool-use ID starts with
node:now fails withErrToolUseIDInvalid, as an ID that holds#does: plan flows key their nodes and the gates on them bynode:, and a node's escalation instance isnode:<name>:taint. A journal that already holds such an ID still replays and resumes; no other ID is affected.
0.25.1 - 2026-10-27
Fixed
bide audit verify-receipts,bide audit redactionsandbide audit notificationsnow refuse two-journalexports of the same run, as an unusable input (exit 4) naming both files and the run ID. Before, the later file on the command line silently replaced the earlier one, so the receipt or the tombstones were checked against whichever came last, and the verdict could change with the order of the flags (a redacted journal and the whole journal it came from gave PASS or FAIL depending on which was listed last). Pass one export per run. Fornotifications, two exports of one run taken at different times were both read, so the run's events were counted from each.bide migrate -hnow lists everything the migration creates: it named the tables,bide_next_seq_v1and the lease indexes, but left out thebide_holdstable and thebide_redact_v3function (which the Postgres guide already said it creates), and theEXECUTErevokes on older redaction functions. Help text only; the migration is unchanged.bide viewandbide editnow refuse two-journalexports of the same run, as a usage error (exit 2) naming both files and the run ID. Before, the later file on the command line silently replaced the earlier one, so a substituted or stale export of a run could be shown as that run with no sign. Exports of different runs are unchanged. Two exports of one run taken at different times used to resolve to the later file; to look at one of them, pass only that file.- A flow config that sets
safetyorapprovalon anedgeorswitchwiring element is now refused withErrConfignamingwiring[i](byLoad,ValidateandInspectConfig). The key has no node to apply to there and was accepted and dropped, so a config could look gated and not be.
Removed
- The
cmd/bide-viewmodule, a stub that only printed thatbide-viewis nowbide view, is removed and no longer tagged at a release. Its last tag iscmd/bide-view/v0.25.0, sogo install github.com/bide-ai/bide/cmd/bide-view@lateststill resolves to that stub, which prints that it moved; installcmd/bide(go install github.com/bide-ai/bide/cmd/bide@latestorbrew install bide-ai/tap/bide) and runbide view. Nothing else changes:bide viewis part ofcmd/bide, and a release tags one module fewer.
0.25.0 - 2026-10-26
Added
bide edit -run <id>with a store (-db,-postgres,-postgres-envor-journal, the flagsbide viewtakes, opened read-only) compares the file you are editing with the topology that run journaled, in a new panel, Compared with a run. It says SAME DIGEST (typed mode), NO DIFFERENCE SEEN (structural mode, where kinds, types and gates are not compared), DIFFERS FROM THE RUN with the changes the topology digest covers (including a change of order), or CANNOT COMPARE, and that a run paused under a different topology will not resume under the file. It compares topologies and nothing more: it does not say the run followed the file, and safety and assert lines, which are not in a journal or the digest, are not compared. It never blocks a save and does not change the weakened banner. A run that journaled no topology, has no digest yet, or journaled a topology that does not match its digest is named as such. The run is read once and again on Reload run. The page also draws the run's path on the flow (a ring and words per node: ran, started with no result recorded, paused at its approval gate; a dashed line over each connection taken), laid on the file by name with the session's renames, and lists what the file cannot show; the path is read by a few point reads per node. With a store, with or without-run, a second panel, Unfinished runs this file would refuse, lists the store's unfinished runs by the digest each recorded (one small record per run, never a history; at most 5000 runs, the first by run ID, said as "at least") and says which a drive under the file (resume, recovery or restart) would refuse: a different digest, or a topology that differs by what the digest covers; runs of another flow and runs that recorded no digest yet are counted apart.-runis no longer required with a store. See Compare with a run.plan.InspectTopology(t Topology) ConfigReportis the report of a declaredTopologyalone: its digest, its approval gates and which nodes every path to passes through a gate, computed by the codeInspectConfiguses. It is for a tool that holds a topology and no config, such as the topology a run journaled (JournaledTopology).SafetyandAssertionsare nil, since a topology carries neither; it does not validate (a dangling edge or a duplicate name is tolerated), never panics, costs time linear in the nodes and edges, and shares no memory with its argument. The editor's "compare with a run" (above; docs/design/visual-editor.md, "Phase 4 design") uses it.agent.RaisesSafety(reason)(experimental, withToolSpec.RaisesSafety):agent.Newnow refuses withErrConfiga wrapper whose declaredSafetyis safer than a tool it embeds or unwraps, at any depth (the order is a side effect, thenIdempotent, thenReadOnly), naming the wrapper, the tool and both levels; a wrapper that really does make the call safer declaresRaisesSafety(reason)(the reason follows the rules ofagent.Trusted). The reason is in the declarations document (raises_safety, andidempotentfor a retry-safe side effect) and, only when set, in the declarations digest, so existing digests are unchanged.bide doctor -declarationslists it andbide doctor -diffreports adding it as WEAKENED and removing it as strengthened.bide doctor -diffalso reports any tool that becomes safer to re-run (side effect toIdempotent, or either toReadOnly) as WEAKENED. Behavior change: an agent with such a wrapper (for example aReadOnlywrapper over a side-effecting tool) now fails atNewuntil the wrapper declares the inner tool'sSafetyorRaisesSafety. See docs/reference/extension-points.md and docs/guides/untrusted-content.md. The declarations format staysbide.declarations.v1(experimental), and every document the agent now dumps carries atracks_idempotentmember (and, where they apply,idempotentandraises_safety), so an olderbide doctor(v0.24.0 and earlier) refuses a new document as having an unknown member. In the other direction,bide doctor -diffof a baseline dumped by an older version against a new dump that has anIdempotentside-effecting tool reports one WEAKENED line, asking you to regenerate the baseline with the new version, instead of reading the missing member as "not Idempotent": a pipeline regenerates its baseline once after upgrading. Behavior change, broader thanSafety: the wrapper check on anUnwrapchain now also looks inside the tools each chain tool embeds, for every property it checks (approval gate,Timeout,Caps,UntrustedandSafety), so an agent whose wrapper reaches a tool byUnwrapthat in turn embeds a gated, capped, untrusted or less safe tool, and that was accepted before, can now fail atNewwithErrConfiguntil the wrapper declares the same.
Changed
- Amount caps are experimental:
agent.WithCaps,agent.WithCapNamespaceandToolSpec.Capsare marked experimental in their documentation and in the API reference, as the taint names are, anddocs/trust/stability.mdnow lists every experimental name and command of v0.23.0 and v0.24.0 (the caps names,WithTaintPolicyandTaintPolicy,GateReason,(*Agent).Declarations, theWhyfields,bide audit caps,bide doctor -declarationsand-diff,bide init -agentand-single-approver). Under that page, experimental means the Go names and the command flags may change in a minor release with a changelog entry; a configured cap still refuses the call it covers. No behavior changes.
Fixed
- The core module and its test code build on Solaris and illumos again (
go vet ./...was failing in the core,floweditandcmd/bide-anchor): the tests that make a named pipe are built only wheresyscall.Mkfifoexists (Linux, macOS, FreeBSD, NetBSD, OpenBSD, DragonFly), andnotify/relay's state-file lock, which usedsyscall.Flock, now builds everywhere. On Solaris and AIX (not illumos, which hasFlock) a relay refuses aStatePathat start withexclusive file locks are not supported on this platform, as on any platform without a file lock; it never runs two relays on one file unlocked. The SQLite-backed modules (store/sqlite,govern/sqlitelog,cmd/bideand the modules that import them) still do not build on DragonFly, Solaris and illumos, becausemodernc.org/sqlitedoes not support them. bide audit verify-evidenceandbide audit verify-decision-coveragename a step whose key holds a call ID by that ID. The line for the gate of callc2#taintreadstep "approval-pending:c2%23taint", the escaped form the engine stores in the key; it now readsstep "approval-pending" of call "c2#taint", and a key suffix stays (step "approval-tally:v3" of call "c2#taint"). This covers the approval gate's keys (pending, request, tally, deadline, decision, exec hold, identity, pause, reason). A key that is not that shape, or whose ID is a digest (an ID over 96 escaped bytes), is shown as stored, and so is a notification key (approval:<run>:<call>:<n>), which names a run before the call. Other commands that quote a stored record name in an error, and the key of an absence proof, still show it as stored. Display only: the stored key, the package and its seal are unchanged.bide viewsays why a gate's signatures were not checked when the-sthor-evidencegiven is for another run:signatures not checked: the proof given is for another run (signed head: "run-b"); give -sth or -evidence for this run. It used to saypass -approver-keys, with -sth or -evidence, which a user who had passed all three could not act on. The note appears only when no prover made a proof for the run; a proof for this run that fails is shown as the failure it is. The run IDs are shown escaped and cut at 64 characters. Nothing about what is checked changes: a run without a proof is still unchecked.
0.24.0 - 2026-10-25
Added
- The approve page lists why a call is held (the untrusted content a tainted turn read, or the cap rule that holds it, with this call's figures as of the ask) above the arguments, as text, labelled as the application's record and not part of what the approver signs, and marks the arguments as model-written and unverified (everything in them is chosen by the model). The intake's
GET /pendinganswer carries the reasons aswhy(approvals.Pending.Why, experimental). The page bundle changes: itsapprove-page.SHA256SUMSare new, so an organisation that pins the bundle reviews the update. The signed decision (bide.approval.v3) is unchanged. - Every attempt marker the engine,
ClaimAttemptorResolveHalt(for the next attempt) claims now carriesrecorded_at, the instant of the claim on the clock the run was driven with (WithClock, else the wall clock), readable asRecord.RecordedAt(). The marker'sAttemptedAtstays the wall clock, which the age of a halt is measured on, so a run clock that lags or leads does not move it. A caller cannot set it.bide audit capsdates a call's cap window by it. Markers written before keep their form. bide audit caps(experimental) audits the amount-cap ledgers of a store, read-only. Each ledger run must read under the ledger's own rules, and its window total must be the sum of its live reserves. Its slots must agree with thecap-reserverecords of the runs that made the calls (a deleted slot, a changed slot, a slot no run recorded) and with each attempt'scap-intent, which must fit the call's own time (a planted intent that moves a slot to another window fails) and the rule's index run. A release of a call whose tool produced a result fails, and any other release must be explained by the loop'scap-release:record or by the attempt's void (without either it fails when anchored and warns when not). With-sthand-pubkeythe ledgers and the runs' cap records must be what the newest signed heads commit to, and entries after them fail as not attested; with-unanchoredthe report says first that whoever can write the store can delete a slot or append a release undetected. It lists the slots counted over the limit under a waiver and the reconcile exposure, and-namespace,-rule,-windowand-runnarrow the audit and list what they left unchecked.bide samplenow writes a small cap ledger (bide audit caps -db sample.db -unanchored). The amount caps guide gains a worked configuration and the cost of a ledger on anAuditedStore. See docs/guides/amount-caps.md.- When the loop releases a call's cumulative-cap reservation because the tool never began, it first journals why, as a
cap-release:<attempt>record in the run that made the call (bide.cap-release.v1: the attempt and the reason, a cap refusal or a chain that returned without calling the tool). A write that fails releases nothing: the slot stays counted and the reconcile pass releases it after the void, as when a release fails. The name is reserved, soStepandClaimAttemptrefuse it.bide audit capsholds each release to this record or to a void. A release the reconcile pass makes is justified by the void and writes no record. bide doctor -declarations <file>reports on the taint and cap declarations a host dumps from its agent (side-effecting tools with no taint policy, exempt tools, cap-carrying tools, a weak escalation gate), andbide doctor -diff <old> <new>lists every change between two dumps as weakened, changed or strengthened (a raised cap limit, a removed or renamed cap rule, a removedUntrusted, a newTaintExempt, a lowerneed, a requester no longer excluded) and exits 1 if anything is weakened. A document with a member this version does not know, or whose digest is not the digest of what it declares, is refused.(*Agent).Declarationswrites the document. The first-run checks are unchanged. See docs/guides/untrusted-content.md.- The reasons a call is gated are shown to the approver.
bide approve -listand the decision screen printwhy:lines for the escalation gate of a tainted call (the untrusted content its turn read, where, and at which journal position),bide viewshows them in the gate's card,-list -jsoncarrieswhy, and the notifier payload carriesapproval.why(a cap reason's figures only for a tool named inArgs(...)). The reasons come from thegate-reasonrecord the engine writes; they are the application's record, no gate reads them, and the signed decision does not bind them.agent.GateReason(the type of one reason, experimental) and theWhyfields ofagent.NotifyApprovalandnotify.Approvalare new. bide init -agentscaffolds an agent project instead of a plan flow: a tool that returns an email and declares it untrusted (agent.Untrusted), a refund, and anagent.WithTaintPolicywhose escalation gate is two of three signed decisions that do not count the requester (ExcludePrincipal), so a side effect the model asks for after reading the email waits for a human decision.-single-approvermakes the gate one unsigned decision for a team of one (weaker, and the project's README says so). The project runs with no API key, checks its own story ingo test, and writesdeclarations.jsonforbide doctor -declarations. The plan-flow scaffold is unchanged; the taint policy does not cover plan flows. New flags: experimental.bide initalso refuses (a usage error, nothing written) a module name with an empty element, an element that begins or ends with a dot or holds.., or text spelled like a marker of its project template; its templates are filled in one pass.agent.TaintPolicy.RequireProvenance(experimental) makes the taint policy refuse a tool that states no provenance: a tool must declareUntrustedor the newagent.Trusted(reason)(the tool's results are the host's own; the reason is required, goes in the declarations digest, and writes no mark;ToolSpec.Trustedis the same declaration), elseagent.NewreturnsErrConfignaming the tool. A newRun,SendorSendOncemust stateWithUntrustedInputorWithTrustedInput, elseErrConfigat its first drive with nothing written (a sub-agent's run and a resume are not asked). The declarations document gainsrequire_provenanceandtrusted;bide doctor -diffreports turning the requirement off, or replacingUntrustedbyTrusted, as WEAKENED, and-declarationslists a tool with no provenance when the policy does not require one. The digest of a policy that does not set it is unchanged. Thebide init -agentscaffold sets it.Trusted,ToolSpec.TrustedandRequireProvenanceare experimental. See docs/guides/untrusted-content.md.- Taint now crosses run boundaries when a taint policy is in force (experimental). A sub-agent started by a call of a tainted turn records the marks that turn was shown in its
run:start(ext.taint_inherited) and starts tainted; a sub-agent whose run ended with a mark marks the parent'stool_resultfor the call (subagent:<tool name>), so the parent's next turn is tainted; and a session turn that ended with marks records them in the session journal (taint/turn/<n>), so every later turn starts with them. Runs that are not under taint record and pass nothing, and their journals are as before. No exported name is added. See docs/guides/untrusted-content.md. agent.WithTaintPolicyandagent.TaintPolicy(experimental): a run that read content marked untrusted needs an escalation gate for each later side-effecting call (or, withRefuse, is refused), in addition to the tool's own gate. The gate is a second instance on the call, under the subject<call>#taint, decided by its own approvers; an approval clears nothing. The approvals intake,bide approve,bide approve -list,bide viewand the audit evidence decide and show the instance by the gate its pause note records, never by the tool's own gate. Sub-agents and sessions inherit taint, in this release, as the taint inheritance entry describes. See the guide in docs/guides/untrusted-content.md.
Fixed
- A model stream that is cut partway through an event (a dropped connection) now ends with the read error, retried as before, in every adapter that reads SSE (Anthropic, OpenAI, Gemini). Before, the half event the cut left was decoded first, and the turn failed with a misleading "unexpected end of JSON input" decode error in place of the failed read. A reply over the response cap was already handled this way.
0.23.2 - 2026-10-25
Fixed
ClaimAttemptstamps a marker'sAttemptedAtfrom the wall clock again. v0.23.1 stamped it from the clock bound to the context (WithClock), so under a run clock that lagged the wall clock a marker claimed this instant looked old:ResolveHaltwithWithMinHaltAgeresolved it at once, and the notifier's sweep reported it as a halt beforeWithNotifyHaltAge, defeating the grace period they enforce. The engine's own claims for a tool call and aJournal.Stepwere always stamped from the wall clock. The age checks use the wall clock unless the resolver is given its own clock, so they see the true age again. WithoutWithClocknothing changes.
0.23.1 - 2026-10-24
Fixed
- The cap reconcile pass (
Recover,RecoverLoop) read the wall clock to decide whether a day or hour window was still open, while a run reserves by its own clock. It now reads the clock bound to its context, else the wall clock. No application could bind one toRecover, so a deployment saw no change in behavior; the wall-clock judgement and its over-count direction forWithClockagents are documented inRecover,RecoverLoopand the known limitations. (#512)
Security
agent.ClaimAttemptnow claims bare attempt markers only; it returnsErrConfigand writes nothing for anything else. Before, v0.23.0 and earlier let a caller with journal access plant records through it: a tool result (the next drive completed the call with the forged result and never ran the tool), a single-approver approval (the next drive ran the gated tool), and a record under a name the engine reserves, such as acap-intent:that pinned a cap reservation to an old window and so bypassed the cap, agate-reason:or anapproval-pending:. Now a name under a reserved prefix (cap-intent:,cap-reserve:,gate-reason:,approval-pending:,slot:,taint/and the rest thatSteprefuses, exceptattempt:), the engine-derivedattempt:not-started:andattempt:retry:forms, an empty name, a record whose kind is notattempt, a caller-setAttemptedAt(the claim stamps it from the context's clock now (changed in v0.23.2: the wall clock again); before, a caller could back-date a marker so a halt looked old enough forResolveHalt'sWithMinHaltAge), and an attempt record that carries a result, an approval, a model turn or a reconciliation are all refused. The engine's own paths (the halt resolution's claim included) do not go through the exported call and are unchanged. An approval of an m-of-n gate was never affected, since only signed decisions count. A caller with journal access can still pre-claim anattempt:tool:<call>marker, which halts the call and cannot admit it or release a cap.
0.23.0 - 2026-10-23
Added
- CI: a "Test (FIPS 140-3)" job runs the Go tests of the modules with
GODEBUG=fips140=onlyagainst Go's in-tree FIPS module and module v1.26.0 (in the merge queue, on main and on a pull request labelledfull-ci) and against module v1.0.0 (on main), with Postgres and Redis service containers and a live Redis and Postgres test required to pass. Not run under the mode: the SoftHSM2 and PKCS#11 suites, the MinIO Object Lock suite (anchor/awss3), the cloud KMS and GCS emulator suites, thestep-cacontainer recipe, the browser-driven suites (they have their own Chrome jobs) and the exhaustive or corpus-rewriting tests. Under v1.0.0, which has no ML-DSA, it skips the tests listed in.github/fips-v1.0.0-excluded.txtand nothing else, and a check fails when a listed test no longer fails with that error. It is not a required check. New tests ininternal/fipsmodeandcmd/bide/internal/approvecmdpin that the approved schemes (Ed25519, ECDSA P-256) work under the mode and that ML-DSA or hybrid under v1.0.0 is an error, not a panic. The documentation states what is tested; bide still makes no claim of FIPS validation. - Cumulative amount caps:
agent.WithCapsnow acceptssum N CUR per run|hour|day [by key] -> refuse(a tool that carries one reserves each call's amount in a cap ledger, a reserved journal run under@cap/, after its attempt is claimed and before the tool begins, and the call that would take the window over its limit is refused as a known failure the model reads, with the tool not called), andagent.WithCapNamespacenames the deployment's ledgers (defaultdefault). A store that cannot be read or written fails the call before the tool is begun, so a cap is fail closed; an amount of zero reserves nothing; a negative, absent or unparseable amount, a missing key, or a key with a byte outside ASCII is refused. A call that may have run stays counted, so a window only over-counts. The loop releases the slot of a not-retry-safe call it proved never began (it seals the call's began word first, and releases before it records the attempt as not started), andRecoverandRecoverLooprelease the slot of an attempt recorded as not started; a call that began, anIdempotentcall, aResolveHalted call and a saga's rollback are never released.-> gateis still refused at registration. See the amount caps guide. - Per-call amount caps:
agent.WithCaps(lines...)declares rules on a tool (name: tools.argument[minor, currency=member] > 500 USD -> refuse), andToolSpeccarriesCapsfor a tool that builds its own spec. The rules are checked against the tool's input schema when the tool is registered (an argument the schema lacks, one that is an array, object or boolean, a currency member that is not a string, a limit above 2^53 minor units, a rule with-> gateor-> gate(name), which arrives with the escalation gate, and a cumulativesumrule, which needs the cap ledger, areErrConfigand "not yet supported"), and every call is decided twice: on the arguments the model sent, before any gate or claim, where a refused call is answered with a tool error that names the rule and gives no figure, and again on the arguments the tool will receive after any tool middleware, where a call a middleware pushed over the limit is refused before the call begins. An amount that cannot be read with certainty (negative, absent, an exponent form, too many fraction digits, or arguments with a repeated or case-variant member) gets the rule's action, and a currency no rule covers gets the strictest action among the argument's rules, compared byte for byte; no float is used. The reasons are recorded ingate-reason:<call>, which can add a requirement and never remove one. A tool that carries caps cannot be a plan flow block:plan.Registry.RegisterToolandBuilder.ToolreturnErrConfig. See amount caps and the limits inKNOWN-LIMITATIONS.md(array shapes, no conversion, no totals). Break risk: none for existing code; the newToolSpecfield is nil for a tool that does not use it. - Reserved names for the cap and taint work that follows, and
agent.ErrToolUseIDInvalid. Run IDs that start with@cap/are reserved for cap ledger runs:Run,Stream,RunTypedandSessionreturnErrConfigfor one (Run,StreamandRunTypedalready did for@stop;Sessionstill accepts that id), as do the exported calls that write records to a run you name (Approve,SubmitDecision,Cancel,ResolveHalt,AnswerInterrupt,Signal,Enqueue,Ack,ClaimAttempt,Step,Parallel,Leaseand theaudit.Record*writers; reads such asHistoryandStatusare not refused, and these calls keep their existing behaviour for@stop), andagent.IsReservedRun(the stop control run or a cap ledger) andagent.IsCapRunreport them;Recover,RecoverLoop, the notification sweep and its backfill, the run viewer,bide approve -list,bide audit notificationsandbide audit redactionsskip such a run. Step names that start withslot:,cap-intent:,cap-reserve:,gate-reason:ortaint/are reserved as well (Step,ParallelandResolveHaltreturnErrConfig,IsReservedStepNamereports them, and redaction treats them as protected). A live model turn whose tool-use ID holds#now fails withErrToolUseIDInvalid, which wrapsErrModelandErrProtocol(somiddleware.Retryandmiddleware.Retryableretry it, and the rejected turn is not journaled); resuming a journal that already holds such an ID does not re-check it, butagent.Replayused as the model of a new run treats the recorded turns as live and fails withErrToolUseIDInvalidon a recorded#ID. Break risk: a deployment that already runs a run ID under@cap/can no longer start it, and the existing run is no longer recovered, listed by the viewer orbide approve -list, or read by the audit verbs, so a gate waiting in it would not be shown to an approver; rename such a run before upgrading. ASteporParalleltask named with one of these step prefixes in a run that resumes fails withErrConfig, and a model server that sends#in a tool-use ID fails every turn that calls a tool. - Untrusted-content marks (experimental, part of the design in
docs/design/untrusted-content-and-amount-caps.md):agent.Untrusted(source)declares that a tool's results are untrusted content, and the engine records the source with every result (Safety.Untrustedof the result record, including denials, errors and a saga's failure record);agent.WithUntrustedInputandagent.WithTrustedInputstate the provenance of a run's input inrun:start's settings, and a later drive that passes another isErrConfig;agent.RetrievalUntrustedmarks a retrieval layer's step;agent.TaintExempt(reason)is a Go-only exemption declaration. Marks are recorded with or without a taint policy and gate nothing yet. A tool that embeds or unwraps anUntrustedtool and does not carry the declaration is refused at registration (as for an approval gate, a timeout or caps),Steprefuses aSafetythat names an untrusted source, and a tool that declaresUntrustedorTaintExemptis refused as a plan flow node until flows have a taint rule. Records without marks are byte for byte as before; older binaries ignore the new members.
Changed
- CI: a push to main that is one commit changing only documentation or the changelog now skips the Go test jobs, as a pull request does (Lint, the docs checks and the changelog check still run, and the CI run still completes with success, so the release script's gates read it as before; the release script now checks the push run of the nearest commit at or below the release commit that changes code, so a documentation commit on a red code commit cannot be tagged). The commit is diffed against the push's before SHA; a push of several commits, a force push or a first push runs everything.
- CI: Test (windows-latest) is now skipped on every run that changes no code, not only on a pull request: a documentation-only push to main (and a documentation-only merge queue batch) no longer starts the Windows job that the Go jobs' skip was meant to save. The decision moved into
.github/scripts/windows-decide.sh, whose self-test runs in CI and covers each event and a failed diff. A skipped job still satisfies the required check, and any doubt still runs it. - CI: Test (windows-latest) now also runs on a pull request that changes a test file, testdata or a golden file, .gitattributes, a file that is not Go or documentation (go.mod, scripts, workflows), or a Go file named *_windows.go, with a go:build line naming windows or negating a constraint (!linux, !unix), or importing runtime, os, path, path/filepath, io/fs, syscall, mime, encoding or golang.org/x/sys, so Windows-only failures (line endings, MIME types, file identity, signals) show before the merge queue. Any other pull request still skips it, which satisfies the required check; the merge queue and main run it on every change as before.
Fixed
bide edit: anassertline the grammar cannot read is now judged to name a node by one rule, whatever punctuation surrounds the name. The name counts when it stands in the line as a whole word or span, with a space, any punctuation or any symbol (not a letter, digit or combining mark) on each side, so[audit],audit-,audit/x,*audit*,_audit_,audit|, a curly apostrophe or guillemets all nameaudit,auditsandaudit2do not, and a node name with spaces or punctuation is found as written. Removing or renaming a node such a line names is refused and names the line to fix first. The guide now says the refusal is a convenience and not a safety boundary: an unreadable line is never an assertion the check reads and stays reported as an error.bide edit: removing a node no longer leavesassertlines that name it behind to report as broken. The removal dialog (theremove_nodedry run) now lists the assertions that name the node, and the confirmed removal takes them with the edges and arms, so the confirmation covers exactly what goes. Removing an assertion is a weakening, so the weakened banner names each removed line and the save dialog asks for the weakening confirmation as for any removed assertion; Undo restores the node, its wiring and its assertions. An assert line the grammar cannot read is never guessed at: if one of its words (punctuation trimmed) is the node's name, the removal is refused and says which line to fix or remove first, the same rule a rename follows; a line with no such word is left alone.bide edit: renaming a gated node no longer reads as a weakening when it is combined with another change to that node. The editor now keeps the renames made in the editing session (old name to new name, in order; an Undo takes a rename back with its step) and compares the text with the baseline read as if those renames had been made in it, so the renamed node is matched to its baseline self, while a rename together with a lowered need, a lowered safety, a removed gate or a removedassertline is still reported, and a rename onto a name the baseline holds for a different node is not honoured. The page sends the list with each request and the verdict names the renames it matched (new exported API inflowedit:Rename,CompareRenamed,Weakening.Renamed, andEdited.Renames); the saved file andbide check -diffare unchanged (the classifier already paired a node renamed with the same block, kind and edges, so a pure rename was not reported by either; the guide andKNOWN-LIMITATIONS.mdsaid it was, and now say what is true: CI cannot know a rename and still reports one made beside another change to that node).- Three paths no longer panic under
GODEBUG=fips140=only: importinggovern/redislog(go-redis hashed its script with SHA-1 in package init; the script now usesNewScriptServerSHA, so Redis computes the digest and an append still works afterSCRIPT FLUSH, a restart or a Redis that refuses SCRIPT), verifying an RFC 3161 token that carries a SHA-1signingCertificateattribute (DigiCert's tokens do; the consistency comparison now runs with enforcement off and is still made), and a webhook secret shorter than 14 bytes (under that modenotify.NewWebhookreturnsagent.ErrConfigwrapping the newnotify.ErrShortSecret, a delivery that a secret cannot sign is not sent,notify.Verifyandnotify.VerifyBodyreturn it,notify.Signleaves the secret out,notify.CheckSecretis the rule, andrelay.Newand thebide notifyverbs refuse the secret at start; other deployments are unchanged, and 32 bytes or more is recommended). Correction: the documentation said FIPS mode and ML-DSA are mutually exclusive; that holds only for Go's FIPS 140-3 module v1.0.0 (crypto/mldsais unavailable there) and not for v1.26.0 and later, where ML-DSA and hybrid signing work underGODEBUG=fips140=only. bide makes no claim of FIPS validation.
Security
- A tool that wraps another through
Unwrapand does not carry anUntrusteddeclaration of the wrapped tool (the option, or a source inSafety) is now refused at registration withErrConfig, as one that weakens the wrapped tool's approval gate, timeout or cap rules is (#508). Before, a wrapper that held the inner tool in a named field and wrote its ownSpecregistered with the declaration gone. A wrapper that neither embeds the inner tool nor implementsUnwrapis still not seen. agent.New,Withand the plan registry'sRegisterToolnow refuse, withErrConfig, a tool wrapper (a tool with anUnwrap() Toolmethod) whose ownSpecweakens the approval gate, theTimeoutor the cap rules (Caps) of a tool on itsUnwrapchain, however it holds that tool (a named field was not seen before: the outerSpecwon, so a gate the wrapped tool declared silently did not apply). Weaker means no gate, fewer decisions needed, aSingleApprovalover an m-of-n gate, an approver the wrapped gate does not name, noExcludePrincipalwhere the wrapped gate has it, no gate deadline or a longer one, for the tool'sTimeoutnone or a longer one, and forCapsa rule line the wrapped tool has that the wrapper does not carry word for word. This changes behaviour for a wrapper that dropped or loosened a declaration: declare the same on the wrapper, or build its spec from the wrapped tool's. Not checked through the chain:Safety(a wrapper may legitimately raise it, so the rule needs a design decision; until then not declaring a weakerSafetythan the wrapped tool is the wrapper author's duty, as aReadOnlyclaim over a side-effecting tool loses at-most-once protection), andUntrustedis checked by its own entry. Also fixed: a wrapper whoseUnwrapreturns a typed nil pointer no longer panics registration or sub-agent lookup; it ends the chain.
0.22.0 - 2026-10-21
Added
- bide-anchor reads the Google Cloud Storage anchor with -backend gcs, taking -project (the project number) in place of -owner: verify and export work offline on a downloaded copy, and check and export read the bucket with read-only credentials, with the same exit codes as for S3 (1 for a finding, including a generation that vanished between the listing and the read, 3 when the audit could not finish, never 0 after an aborted audit). anchor/gcs gains the ErrWrongProject sentinel for a bucket another project owns (it is still an agent.ErrConfig error), which the command reports as a finding. With -backend gcs, -kms-key and -retention state the key and retention the anchor was configured with, so a bucket whose default key was swapped or whose locked retention is shorter is a finding (the S3 backend refuses the flags, since its reader checks neither). The command module now requires anchor/gcs, and a test checks the S3 and GCS object layouts cannot take each other's objects.
bide check,bide view -configandbide check -difftake-blocks <file>(a block it holds that the config does not use is not reported; with-diff,-old-blocksdescribes the earlier version, which otherwise is checked structurally) (and-old-blocks <file>with-diff): a description of the program's registered blocks, written withjson.Marshalofplan.Registry.Describe(). The check then covers block, predicate and merge names, types, safety, the approval gates blocks declare in Go and the digest, and a block swapped for one that declares no gate is reported as a weakening. The result is labelled as per the description file, not checked against the program.- bide edit can add, remove and rename a node and write the entry (the first step of the editor's structure phase). Each is a verified splice like the gate and safety forms: the result is checked against the data the operation should produce, computed from the operation alone. A rename rewrites the node's name in the entry, edges, switches, arms,
else, join inputs andassertlines (the last through the assertion grammar, refusing a line it cannot rewrite), and a rename of a gated node reads as weakened because the gate comparison follows names. A removal first lists what else goes (the edges, arms and comments that name the node) and is refused unless the same list is confirmed;assertlines naming the node are left in place for the check to report. The editor never changes the entry node without being asked: removing the entry, or the first node of a config with noentrykey, is refused with a pointer to set_entry. The API gains the operationsadd_node,remove_node,rename_nodeandset_entry, andOperation.DryRun,Operation.ConfirmandApplied.Cascade. - bide edit can add an edge by dragging from the small circle at a node's right edge in the flow onto another node (the last step of the editor's structure phase). It sends the same add_edge operation the inspector's Connections form does, so it has the same refusals, verification and weakened banner, and it is an extra: the circle is hidden from assistive technology and not in the Tab order, every connection can be made and removed from the inspector by keyboard, and dropping on the same node, on nothing or pressing Escape cancels with no change (as does losing the pointer or a redraw mid-drag). It works with a mouse, a pen or a finger (the touch target is at least 44 px, and a touch elsewhere on the flow still scrolls the page). The layout stays derived from the topology; nothing about where a node is drawn is stored.
- bide edit can set an arm's loop bound and add, change and remove joins (the fourth step of the editor's structure phase). A loop bound is a number above 0 on a switch arm (0 removes it); a join is added from a disclosure under the outline (a name, a merge block and its inputs) and edited on its own inspector: the merge block, the inputs in order (add, move, remove), the same safety and approval gate forms a node has (written on the join's wiring element), and edges out of it. Removing a join lists what goes with it (the edges out of it, a switch on it, its comments) and needs that list confirmed, as removing a node does, and a node that is an input of a join is still not removed. The editor checks what the config says (an input is a declared node or join, named once, not the join itself); it cannot check that a merge block is registered or that its arity and types fit the inputs, which plan.Load does with the registry. New joins are written as
inputs: [a, b]where the file has none to copy. The keyboard test no longer walks the whole page to the assertion form: it uses the skip links. The API gains the operations add_join, remove_join, set_join_inputs, set_join_merge and set_loop_max, Operation.Inputs and Operation.Max, and set_safety, set_approval and clear_approval accept a join's name. - bide edit can reorder nodes and wiring elements and set the flow's name and its in and out type names (the second step of the editor's structure phase). A move exchanges two neighbouring list items as one splice (new engine operation Swap): each item keeps its own text, the comments directly above it and its trailing comment byte for byte, and whatever lies between them stays; the result is checked independently of the splice (the data with the two items exchanged, the same lines in another order, every line outside the pair where it was, each item with the comments it had), and moving back restores the exact bytes. A move into or out of the first place is refused when the config has no entry key, since the first node is then the entry; write the entry first. The wiring list is one Tab stop with a single Move pair for the selected element, and the flow settings are a closed disclosure, so the page does not cost a Tab stop per element. The API gains the operations move_node, move_wiring, set_flow, set_in and set_out, and View.In and View.Out.
bide edit -blocks <file>andflowedit.WithRegistry/flowedit.WithBlocksmake the flow editor typed. The editor then checks the config asLoaddoes (by type name for a description file, labelled as not checked against the program), refuses an operation that connects what does not fit, adds the approval gate and safety a block declares in Go to the weakened banner without ever saying less than the structural check (so changing a block to one with no gate reads as the gate removed, and the structural "possibly" stays), and shows the digest, a palette of the program's blocks (a search, a filter for what fits the selected node, one Tab stop) and each node's types on the page; a connection by form, by drag or from the palette that does not fit is refused with plan's words, a target whose types differ is marked, and a text with errors against the blocks shows a NOT CERTIFIED banner. A port's drag handle no longer reaches over a neighbouring node in a dense or scaled-down flow.- bide edit can add and remove edges, make a node a switch and remove the switch, and add, change, move and remove arms and set the else (the third step of the editor's structure phase), from the inspector's Connections section. Targets are chosen from the declared nodes; the editor refuses what plan.Load refuses (an edge or arm to an undeclared node, an edge into a join, an edge from a switched node, a switch on a node with an edge out, a self edge, a duplicate edge or arm, a switch with no arm: the only arm is removed with the switch). A new edge or arm that reaches a gated node by another way shows the weakened banner, from the same classifier as bide check -diff. New wiring is written in the style of the file, and as edge: [a, b] and when: [{pred: p, to: t}] where the file has none to copy; a plain scalar with a quote character inside a flow list is now written quoted, so the engine can edit its own output. The API gains the operations add_edge, remove_edge, add_switch, remove_switch, add_arm, remove_arm, set_arm, move_arm and set_else, Operation.Pred and Operation.To, and View.Wires.
plan.AllowUnusedBlocks(), an option forplan.InspectConfigandplan.InspectConfigDescribed(both now take...InspectOption): a registered block the config does not use is no problem. Without it such a block is an error and the report has no kinds, types, safety or digest for the flow, because the check stops before it builds anything.LoadandValidatestill refuse an unused block. It is for tools that list the blocks a config could use, such as the flow editor's palette. Source-compatible, except for code that storesInspectConfigorInspectConfigDescribedin a variable of func type. Experimental forInspectConfigDescribed.plan.InspectConfigDescribedchecks a flow config against aRegistryDescriptioninstead of a Registry, with the same codeInspectConfigruns: blocks, predicates, merges, types, safety, approval gates and the digest are checked without the program that registered them.RegistryDescription.Validatereports why a description read from a file is not one this release reads. Types are told apart by name only, so two distinct types spelled the same are one type, and messages write a type with its package path. Experimental: may change in any 0.x release.plan.ConfigReporthas a newFindingslist: for each error inProblems, aplan.Findingwith aKind(plan.ProblemEdgeTypes,ProblemArmTypes,ProblemJoinInputTypes,ProblemTerminalTypes,ProblemSafetyAboveRegistration, the loop kindsProblemLoopNoExitArm,ProblemLoopMoreThanOneBackArm,ProblemLoopHeadNotAncestor,ProblemLoopBodyNotSimple,ProblemLoopInnerSwitch,ProblemLoopEdgeLeaves,ProblemLoopEdgeEnters, orProblemOther), the full names it is about,GotandWantwhere the kind has them, and the message. A tool tells problems apart by kind and names instead of reading messages, which shorten long names and name a wiring element by its position. Findings are complete (not capped at the first hundred type problems), are found beside any other error, and every error has exactly one;ConfigProblemis unchanged. A kind's name, names order andGotandWantformats are stable in 0.x, kinds may be added, andothermay become a specific kind in any release, so treat it like an unknown kind. See the plan flows guide (Findings).bide editnow reads findings instead of internal records. Findings are in the Go API only:bide checkand the JSON of the viewer and editor pages do not carry them. The errors ofLoadandValidatecarry no kinds; callInspectConfigorInspectConfigDescribedfor them. The node, edge or arm of a problem is set where the problem is made, no longer read from its message, so a node whose name holds the message's punctuation is attributed exactly.Registry.Describereturns aRegistryDescriptionof what a Registry has registered: each block's name, kind, input and output type names, declared safety and approval gate, each predicate's switched type, each merge's input types, and any registration errors. It is data only (no functions or reflect values), sorted by name, and is the first part of the visual editor's typed mode. Experimental: it may change in any 0.x release.- The theme file format for bide's visual pages and bide theme check: a theme is a small JSON file of typed values (colours as #rgb or #rrggbb, fonts from a fixed list, numbers in ranges) that names a shipped base and overrides some of it, with strict keys (an unknown, repeated or differently cased key is an error). bide theme check parses a file and measures the resolved theme: WCAG text contrast 4.5:1 and non-text contrast 3:1 (the focus ring and the control edge on the page, a panel, a nested panel and the graph canvas, and the focus ring also on a node's fill and the selected item's tint), CIEDE2000 distance between the status colours (ok, warning, alert, info at least 20; the gated, side-effect, idempotent and idle colours at least 10 from every other), a colour-blindness check (a warning for your theme; the shipped themes must pass it), and a polarity check (alert warm and nearer red than warning, ok not). It exits 1 on a theme that fails. See docs/guides/themes.md and docs/design/themes.md.
- bide edit draws from the checked themes, as bide view does. It takes -theme file.json (a custom theme that must pass bide theme check, refused before anything is served if it does not) and -theme-default name, its Theme button steps through light, dark, high-contrast and your theme (naming the next one and announcing the change to a screen reader), a reader whose system asks for more contrast gets high-contrast and one whose system forces colors gets the system's colors, and a program that embeds the editor can lock it to one theme (flowedit.WithThemeLock), which hides the button. The page's own colors now follow the contrast rules: the primary button's text is the theme's on_accent color, the edges of buttons, inputs and the source box use border_strong (3:1 against what they sit on, where the old 1.4:1 hairline did not reach it), every text control, wherever a form puts it, takes the theme's surface and edge, the dialog dims the page with a shadow of the theme's scrim color around it (it needs no support for custom properties in ::backdrop), its box keeps the theme's elevation and a border_strong edge and scrolls inside the screen when its content is tall (forced colors drop shadows, so there it keeps its border and does not dim), and the selected node in the graph is drawn with a 7 px ring in the focus color over its state (its fill and dashes still tell the state; before, a selected gated node was not marked in the graph at all). The Editor (Chrome) job now measures these colors in every shipped theme and system mode, and runs axe-core in high-contrast as well as light and dark.
- A Go program can choose the themes of the pages it embeds. The theme package (github.com/bide-ai/bide/theme, 0.x API; it was internal) parses and checks a theme file as bide theme check does (Parse, Load, Check, Report, Shipped, Lookup), and planview.Handler, planview.DiffHandler and flowedit.New take planview.WithThemes, WithDefaultTheme and WithThemeLock (the same three in flowedit): extra themes beside light, dark and high-contrast, the theme a reader starts in, and a lock that makes one theme the only one (no switch, no remembered choice). A host passes only values that passed the checks: it cannot give CSS or a selector, the stylesheet generators are not exported, and a reader whose system asks for more contrast or forces colors still gets those over a default and over a lock (a Chrome test holds both). Upgrading: planview.Handler and planview.DiffHandler now end in a variadic opts ...Option, so a call is unchanged but code that holds either function as a value of the old func type (a struct field, a variable, an interface method) no longer compiles; wrap the call in a closure. A bad set of themes (a nil or foreign theme, a repeated name, an unknown default or lock) panics when planview builds the handler and makes flowedit.New return an error. Measure has a String method, the line bide theme check prints for a measure.
Changed
- The awss3 Reader now audits the bucket itself: Audit reads its versioning, Object Lock configuration and default encryption and reports a finding for versioning that is not enabled, Object Lock off, a missing default retention or one under 24 hours, and, through the new ReaderConfig.KMSKeyID, Retention and Mode expectations, a default retention shorter than configured, a default mode weaker than configured, a default encryption that is not the expected KMS key, and an object that is not encrypted with it or is retained for less than the expected retention from its own write; bide-anchor -backend s3 takes the same as -kms-key, -retention and -lock-mode (a KMS alias is refused as the expected key, since S3 reports the key an alias resolves to and the check would match any key: pass the key ARN). The shipped reader policy gains exactly the three read actions this needs (s3:GetBucketVersioning, s3:GetBucketObjectLockConfiguration, s3:GetEncryptionConfiguration), so a reader whose policy lacks them now gets an access error on the bucket read, and bide-anchor check exits 3 (state unknown) instead of passing: add the actions to the reader role.
- awss3.New now accepts only a key ID (a lower-case UUID), a multi-Region key ID (mrk- and 32 lower-case hex digits) or a key ARN as Config.KMSKeyID, and refuses everything else, an alias (alias/name or an alias ARN) above all, with an error wrapping agent.ErrConfig, because S3 reports the ARN of the key an alias resolves to and the read-back that checks each head's key could not tell which key it was: an alias used to match any key. Upgrading: a deployment configured with an alias must switch Config.KMSKeyID to the key ARN, or New refuses to start with the error
awss3: Config.KMSKeyID: KMS key must be a key ID or key ARN (got "alias/..."): a lower-case UUID, mrk- and 32 lower-case hex digits, or arn:<partition>:kms:<region>:<account>:key/<one of those>, with no spaces or other characters; for an alias, pass the ARN of the key it points to: config, which you can search your logs for; an upper-case key ID, a key ID with a leading or trailing space and any other string that is not one of those forms are refused the same way (a key ID or key ARN in the forms above works as before). The Reader (ReaderConfig.KMSKeyID) and bide-anchor -kms-key apply the same allow-check. The key is an AWS KMS key, so a deployment on an S3-compatible server that was configured with a key name of that server (MinIO with a KES key, say) must switch to Config.EncryptionNone, which means the anchor does not check which key encrypts the heads. - The flow editor guide now shows typed mode (the Blocks region, the typed tag and the digest, the NOT CERTIFIED banner and the save dialog with its two confirmation boxes) and the themes guide shows one page in light, dark, high-contrast and a custom theme.
scripts/shots.shregenerates them, and the approve page images, in its default run. - bide edit's Undo and Redo are now tested over every kind of structure edit (the last step of the editor's structure phase before drag to connect): a node added, renamed and moved, an edge, a switch, a loop bound, a join, the flow's name and a gate removed. A Chrome test walks the history back to the file's exact text one step at a time, checks that the weakened banner follows each text (the server computes it again for every step), walks it forward again, and checks that the history survives a save (Undo past a save says
unsaved changes, and Redo back to the saved text sayssaved). The behaviour is unchanged from phase 1; the guide says what it covers. - gcs.LoadDir now uses the directory loader shared in audit/anchorobj (Layout.LoadDir) instead of its own copy: no change in behaviour (an empty directory, equivocation in one partition, a stray file, a symbolic link and an oversized file are still errors), and, as awss3.LoadDir already does, a path that is not a directory is an error wrapping ErrObject.
- The Google Cloud Storage real-run runbook and known limitations now record the teardown of the 2026-10-17 run: a delete after the retention ends goes through soft delete (the objects stay listed for the soft delete period), a bucket whose objects are only soft-deleted can be deleted, the Cloud Storage lien on project deletion is not removed when the bucket is deleted and has to be removed by hand before the project can be deleted, and the key version is destroyed after its 30-day delay while the key and key ring remain.
plan.LoadReaderreads at most 16 MiB and refuses a larger config with an error wrappingagent.ErrConfig, without reading past the byte that shows it is too large. It used to read its reader to the end however long that was, so a reader that never ended (an HTTP body, a pipe) filled memory. No real config is near the limit; to load a larger one, read it yourself and callplan.Load. The viewer's config readers (bide view -config,-diff, and the checks that share them) apply the same 16 MiB limit to a flow config file or a-diffgit revision; they allowed 256 MiB before.bide editalready refuses a config over 1 MiB. A-diffgit revision is read up to the limit andgit showis stopped there, rather than buffered whole before the size check; a named pipe given as a config file is refused instead of blocking.- A config approval block on a node whose registered block already declares an approval gate is now reported as one problem that says how to fix it (keep one, by removing approval from the config or the gate from the block) by Load, Validate and InspectConfig, and Build words a plan.Approval on a Tool with its own gate the same way; before, InspectConfig listed two problems for the one cause, neither with a remedy. The cause was that InspectConfig split an error's text at "; ", so any problem whose text held "; " (a node named "a; b", or a message with one in it) was cut in two and attached to no node: assemble, Build and the graph checks now carry their problems as a list that InspectConfig reads part by part, and the "; " workarounds in the loop and wiring checks are gone. The text of the errors Load and Validate return is unchanged, and the problems bide check and the viewer show that held "; " (such as "is fed by [...]; combine several producers with a Join") now keep Build's own wording instead of a comma rewrite, so they match Load's.
- plan's config reading (plan.Load, Validate, InspectConfig, and so bide check, bide view -config and bide edit) now refuses an identifier that holds a character that does not print: a control character, an invisible or direction-changing one (a zero-width space or joiner, a soft hyphen, the byte order mark, a bidirectional override such as U+202E), a space other than a plain one, a private-use or unassigned code point, any character with the Unicode property Default_Ignorable_Code_Point (the Hangul and Khmer fillers, the grapheme joiner, the Mongolian selectors, every variation selector, the zero-width joiner and non-joiner) or the Braille blank, a combining mark with nothing before it, or a space at either end. This also refuses some legitimate text, on purpose, because two names that differ only by an invisible character read the same and one can impersonate the other: a word spelled with a zero-width non-joiner (Persian, Urdu), an Indic conjunct spelled with a zero-width joiner, an emoji joined sequence (a family, a rainbow flag; a country flag, two regional indicators, is accepted), an emoji with a variation selector (a red heart), and a left-to-right or right-to-left mark. Transliterate the name or spell it without the joiner or selector. It applies to the flow name, entry, in and out, node names and blocks, every reference in edges, switches, arms and else, join names, inputs and merges, and the assert lines (whose words may still be separated by any whitespace). Such a name could read as another in a diff or a review, and was accepted and drawn as written. The error wraps agent.ErrConfig and names the field and the character written out, for example
nodes[2].name "ch\u{202E}gra" holds a character that does not print (U+202E). As a second line of defence bide check, bide check -diff, bide view, every page it serves and its error messages write any such character that reaches them (a file name, a journal's topology, a step or predicate name) as \u{XXXX}; its JSON endpoints and the other commands are not filtered. Upgrading: a config with such a name now fails to load with that error, which you can search your logs for; rename the node (or fix the block, flow or reference) to a name of printing characters and a plain space, everywhere the config uses it (edges, arms, assert lines). Renaming a node changes the topology digest, so a run paused under the old flow does not resume under the renamed one. - The approve page draws from the shipped themes, inside its pinned bundle: light and dark by the system's color scheme, high-contrast when the system asks for more contrast (prefers-contrast: more), and the system's colors under forced colors, instead of two hand-written palettes that never saw a contrast check. The page takes no theme from a script, a URL, config.json or its host (a test holds that, and another holds the bundle's hashes in a committed golden, so a later change to a shipped theme is a visible change to the signed bundle). Text is 4.5:1, a control's edge 3:1, a disabled button has a dashed edge as well as its color, and the focus ring is drawn. REJECT now differs from Approve in shape (a heavy double edge against a thin solid one), in every mode: before this release the two differed by color and by their words only, and under forced colors, where both take the system's button colors, by their words alone. Upgrading: the approve page's SHA256SUMS and the Subresource Integrity hash in its index.html change in this release. Anyone who pins the approve page by hash, or hosts it on their own origin, must update the pin from this release's signed approve-page.SHA256SUMS (verify it as before) and redeploy the new bundle; a copy built earlier no longer matches. app.css is about 5 KB larger (1.5 KB to 6.9 KB); the script, the protocol and the page's behaviour are unchanged.
- States that bide view's graph and lists told apart by color alone now differ in shape or words as well, so they stay apart in greyscale, in forced colors and for a color-blind reader: a changed edge in the diff is dash-dot (an added one stays solid, a removed one a longer dash), a counterexample path is a heavy dotted line (the path taken stays a dash), a problem edge is a short dash, a warning node has a dashed box and a diamond mark where a problem has a circle, a row added by live mode carries a "new" badge, the run list's keyboard row has a marker and aria-current, and a stat's colored number has a glyph (check, cross, bang) on its label. A test now fails when two of these differ by color alone. A test in real Chrome (the Viewer (Chrome) job) draws each of these states from the real pages and fails if the browser computes two of them as the same line, and a fast static test guards the stylesheet text.
- bide view answers the system's accessibility settings. A reader whose system asks for more contrast (prefers-contrast: more) gets the high-contrast theme (black on white, 7:1 text), over a dark system setting and over -theme-default, unless they chose a theme in the page; when the system forces colors (forced-colors: active) the system's colors win over every theme, and the graph tells the run states apart by the shape of each node's box (thin solid done, dashes attempted, dash-dot waiting, heavy solid halted, dots not reached) as well as its glyph and words. The edge of every input, select and button now uses a new border_strong color that reaches 3:1 against its surroundings in every theme (it was a 1.4:1 hairline), and the states the pages draw in the info color (waiting for a person, the path taken, the last node, live) use a separate --info token, which has the accent's value in the shipped themes and which a theme file can set apart. The Viewer (Chrome) test now runs under all of these modes.
- The docs now describe the finished theme work: the themes guide, the design note's status, the roadmap and the docs index say that bide view, bide edit and the approve page draw from the checked themes and that a Go program can pass themes to planview and flowedit; KNOWN-LIMITATIONS says the colour and contrast checks cover the editor too and that the manual pass with a real contrast theme, macOS Increase contrast and a screen reader is still owed, and that forced colours do not dim the editor's save dialog; the editor design note's accessibility section describes the themes, the switch, the selection ring and the dialog.
- bide view draws from checked themes: its colours, fonts, spacing and radii come from one generated stylesheet (light, dark and a new high-contrast theme) instead of palettes written in the page's CSS, the header button and the t key step through the themes and name the current one, and bide view takes -theme file.json (a custom theme, which must pass bide theme check and is refused before anything is served if it does not) and -theme-default name. The shipped light and dark colours are retuned slightly so the status colours stay apart for a colour-blind reader and the idempotent step is no longer the same blue as a waiting gate (idempotent steps are now teal); the flow editor, which shares the viewer's stylesheet, takes the same colours.
- The flow editor guide shows a drag to connect in progress, and
scripts/shots.shregenerates the picture (editor-structure) with the others.
Fixed
- Test only: the Go tests that drive a page in Chrome through a Node script (the editor, the run viewer and the approve page) ran the script with no deadline, so a Chrome or script that stalled held the test until the whole test binary timed out (one such run hung for 564 seconds with nothing said), and the approve page's client-certificate test, at its own limit, killed Node but left the Chrome it had started running. They now run the script under a five-minute deadline, kill it together with the Chrome it started, and fail with what it had printed. No behaviour of the product changes.
planview.CheckDiffandplanview.DiffHandler(a program's own diff check with its Registries; present since v0.15.0, reproduced on v0.21.0) passed a diff silently when a side had errors against its Registry: such a side has no gates to compare, so a gate removed by changing a block read as no change andCheckDiffreturned false, where the same diff without Registries reports it. A common cause was one Registry shared by both versions that holds a block the config does not use (an error inLoad). The diff is now made structurally, as without the Registry, so the weakening is reported as it would be without it; the result is labelled not certified (DiffView.Fallback), its verdict is never good, andCheckDiffreturns true. Every result also says how each side was checked (DiffView.OldBasis,NewBasis).bide check -diffandbide view -config -diffpass no Registry, so they were never affected. To protect a pipeline that runs an earlier release, upgrade; until then give each version its own Registry, holding exactly the blocks that version's config uses (plan.Loadrequires it), so neither side has errors.- bide edit's list edits kept only the items at the start and the end of a list, so an edit that replaced an item in the middle or that changed both ends deleted and re-wrote the items it meant to keep: the comments above or beside a kept item were lost, and a block list turned into a flow list. This affected an approval gate's approvers list (set_approval, from the first release of the editor) and the inputs of a join (set_join_inputs, new). A list edit now keeps the longest common subsequence of the old and the new list exactly as it is, with its comments and the list's style, inserts the new items where they belong and deletes only the old items that are not in the new list; removing one approver is one deleted item and adding one is one inserted item. If you saved a gate edit made with an earlier editor, check the diff of its approvers list for comments that went missing.
plan.InspectConfigwith a Registry no longer reports "Model step has no bound model" as an error for a config with a Model block (since v0.14.0, which added it). A check never runs the flow, so it does not need the model thatLoadbinds. The programs affected are those that check a config against their own Registry:planview.Handler,planview.Check,planview.DiffHandler,planview.CheckDiffand directInspectConfigcallers; they showed such a config as broken, with no digest.bide checkandbide view -configpass no Registry and were not affected.bide check,bide view -configandplan.InspectConfigwithout a Registry now make every checkplan.Loadandplan.Buildmake on the wiring alone, so a config thatbide checkpassed could not still fail to load for a reason that needs no Go code. New: a cycle that is not a loop, a node not reached from the entry (worded so it reads as work in progress: a node you have declared and not wired in yet is a config that will not load), a node fed by several producers without a join, join inputs on mutually exclusive arms of a switch or that a switch can skip, and the shape of a loop's body (no inner switch or nested loop, no edge leaving or entering it past its head, no node between the head and the switch that is not on the loop path). They are Build's own checks run over a spec with no types, in Build's order; with a Registry nothing changes (Build makes them itself, after the type checks). Upgrading: a config with one of these now fails bide check, and the editor shows it as a config error until it is wired. The examples had one: examples/plan/flows/refund-policy-bypass.yaml, the policy-bypass demo that the run viewer guide, bide sample (flows/refund-bypass.yaml) and bide check -diff use, routed a vip arm straight tocharge, which madechargefed by two producers, a config plan.Load has always refused; the earlier bypass example was a config Load refuses; it is now one that loads, with the bypass routed to an ungated node: the vip arm reaches a second charge step (charge_vip, block charge), so the violated assertion is now "every path to charge_vip passes approval >= 2 of 3" with the counterexample validate -> lookup -> charge_vip. A bypass of a gate on the same step cannot be a loading config, because a step with several producers needs a join.bide check,bide view -configandplan.InspectConfigwithout a Registry (the structural check) now report these things thatplan.Loadalready refused and the structural check showed no error for, so a config thatbide checkpassed could still fail to load: an edge that leaves a join, or a switch that is over a join, before the join's wiring element (a join is registered when its element is reached); an edge, an arm or an else into a join (a join is entered only by its inputs); a node that is switched over and has an edge out; two switches over one node; a join that reads a join defined after it in the wiring (Load registers a join when it reaches its wiring element, so the input is unknown; this includes a join that reads itself and a cycle of joins), a switch with more than one loop-back arm (an arm with loop_max above 0), a loop with no exit arm (no other arm and no else), and a loop-back arm whose target is not an ancestor of the switch in the forward graph (the edges, a join's inputs and the arms that do not loop back). Each is an error naming the wiring element. A config that bide check passed and Load refused for one of these now fails bide check too; fix it by defining the input join first, or by pointing the loop arm back at an earlier node of the loop. The rest of the wiring checks that Build makes, and the ones this list left out (a cycle that is not a loop, a node not reached from the entry, a node fed by several producers, the shape of a loop's body), are reported by the same check too since the structural check was completed later in this release; what a cleanbide checkstill cannot show is what needs the program's Go side (names, types, gates a block declares), which-blockscovers.- A named pipe given where bide expects a file no longer hangs it:
bide view(-sth,-evidence,-approver-keys,-stop-policy,-pubkeyas a file),bide edit(a config swapped for a pipe after its check),bide approve(-item,-approver-keys,-cert,-log-key,-verify-receipt,-tls-ca),bide stop -stop-policy,bide notify(-secret-file,-previous-secret-file,-client-ca,-certand-key,-ca), the webhook notifier's client certificate, key and server CA files,bide approve -tls-ca,-client-certand-client-key,bide journal redact(-pubkey, the JSON and signed-head files they read),bide identityand the identity preflight (-policy,-params,-expect, certificate chains, the files a policy names) andbide-anchor -pubkeyopen the file without waiting for a writer and refuse anything but a regular file, with the reason; a directory is refused the same way. Upgrading: these flags no longer accept a path that names a named pipe, a device or any other file that is not a regular file. A process substitution (-pubkey <(vault read ...)) still works on unix, as does/dev/stdinand a/dev/fd/Npath (/proc/self/fd/Non Linux): the form is matched as written, so a symbolic link to one is refused, and the stream is read up to the flag's size limit./dev/stdinis standard input and is owned like-. A flag that carries a secret or a policy also takes-for standard input, and one flag only can read it in a run (a second is refused, naming both):-pubkey(bide view, bide journal redact, bide-anchor),-sth,-evidence,-approver-keysand-stop-policy(bide view),-stop-policy(bide stop),-item,-approver-keysand-log-key(bide approve), and-secret-fileand-previous-secret-file(bide notify); bide approve needs-yeswith any of them, since the confirmation would read standard input too. A file named-is written./-. Files that had no size limit now have one, and a file over it is refused with a message naming the flag and the limit: 1 MiB for-pubkey(bide view, bide journal redact, bide-anchor) and-log-key; 16 MiB for-verify-receipt,-tls-ca,-client-cert,-client-key, thebide notifysecret, CA, certificate and key files,-params(bide identity and the preflight),-policyand the files a policy names,-expect, and bide journal redact's-sthand-authorization; and the signed-heads log (-head-out, bide journal redact) has no total limit, which would stop a log that only grows: it is read one head per line, and a head over 64 KiB is refused (the heads are held whole in memory, as before, because the redaction trail checks and signs over the full chain of prior heads: about 0.3 to 1 KiB each, so a 260 MiB log of about 650,000 heads takes a few hundred MiB). The limits already in place are unchanged (-item,-approver-keys,-stop-policy,-cert, bide view's-sth,-evidenceand journals). Errors that quote text from a document are bounded: the strict JSON reader quotes a field name escaped and cut to 64 characters, the decoding errors ofencoding/jsonthat pass through it are cut to 256 (theme, plan, tool-argument and audit documents), a theme's own messages quote a bad value the same way, a plan config's problem messages shorten each quoted name to 64 characters (the words around the names are kept) andplan.Load's error is cut to 8 KiB, so a name or value as long as the file no longer makes a message as long as the file; a short name is still quoted whole, to help find the mistake. The library readers (theme.Loadand the like) read regular files only, so what an error quotes comes from a file the caller could already read. Other messages of the audit and agent packages that quote verified fields are not cut. - Test only:
TestNewTombstone_ReadsBackbuilt its changed-hash case by replacing the first two hex digits of the leaf hash with "00", which changed nothing when the hash already began with "00" (about one run in 256, since the record carries the time it was made), so the test failed at random. It now flips the first byte. - Before release,
bide editagainst a Registry or a blocks description let an edit through that added a second problem of a kind the text already had: the config check (plan.InspectConfig,plan.InspectConfigDescribed) reported only the first type misfit, and the first of each wiring problem (a loop's shape, a node not reached from the entry, a join's routes), so the typed editor, which refuses an edit that adds a type problem or a loop-shape error by comparing the problems before and after, saw nothing new when a second one appeared. The check now reports every one of them: every edge, switch arm, join input and terminal whose types do not fit, up to 100 with a final line saying how many more there are, and every refusal of the wiring checks.plan.Loadandplan.Validatelist all the type problems in their error instead of the first.bide checkand the viewer show the longer lists. Where there are several problems the first still leads, so a message or an error that began with it still does;plan.Loadandplan.Validateerrors, which name the first problem as before, now go on to name the others after it. The editor compares the complete lists of type problems, not the first 100 a report lists, so an edit cannot hide a new problem past that cap. The refusals ofplan.Loadandplan.Validate(type problems and the checks Build makes) now wrapagent.ErrConfig, soerrors.Is(err, agent.ErrConfig)holds for them as it does for the other config errors; their text is unchanged. The editor identifies a problem by what it is about, taken from plan as structured records (class, kind, the full names, the types or levels), not by the text it shows, which shortens long names and names a wiring element by its position: so two problems whose names differ only past the 64th character are two, names with brackets or quotes cannot be confused, and moving an element does not make an old problem new. The type problems, the unsafe safeties and the loops' shape are found even when the config has another error (an unknown name, a safety above the registered one), so that error no longer hides them, and the editor compares them all (not the 100 a report lists). A safety stated above what the block registers is refused like a type problem. Building the topological order of a flow no longer scans every node for each node it frees, which made a flow of thousands of nodes slow to check. - Test only: the two anchor/awss3 tests that check what a changelog entry says read CHANGELOG.md once a release has assembled the fragments, instead of skipping (the integration job fails on a skipped test).
Security
- The strict JSON reader refuses a document whose structure nests more than 128 levels deep, and any document (JSON kept verbatim, such as a tool call's arguments or a tool's result in a journal record, included) that nests more than 10000, before any decoder runs, and no longer rebuilds the path to each value at every level. In v0.8.0 and later,
strictjson.Checkrebuilt a path string like$[0][0]...at each level, so its time and memory grew with the square of the nesting depth: 30 KB of[took 0.8 s and 2.1 GB underencoding/jsonv1 (GOEXPERIMENT=nojsonv2), 100 KB took 12 s and 30 GB, and 16 KB took about 160 MB in the default build. Every reader built on it was affected: agent tool-call arguments (input the model controls) and typed answers,plan.Load,plan.Validateandplan.InspectConfig(config loading),audit.UnmarshalStrict(signed tree heads, evidence and journal exports), and the stop-policy and approval-item readers (bide stop,bide approve) and theme files. A deeper document now fails with an error naming the limit and the offset (nesting deeper than 128 levels at offset N), at constant memory. Verbatim JSON is held to 10000, encoding/json's own limit and so the deepest a journal writer can record, so an export is never unreadable for what a model or tool put in a tool call or result. The deepest document bide itself reads or writes nests 5 levels (7 in the tests), so no valid input is affected; only a document whose structure is built to be deeper than 128 levels is refused. A very large flat document still costs memory in proportion to its size, andplan.LoadReaderand the audit export readers do not cap it: see KNOWN-LIMITATIONS.
0.21.0 - 2026-10-19
Added
- New module anchor/gcs: the second production audit.Anchor, which writes every signed tree head as an object in a Google Cloud Storage bucket whose retention policy is locked, with create-only writes, a read-back that refuses a retention, Cloud KMS key, hold or checksum weaker than configured, and a Reader that lists noncurrent generations so a deleted or overwritten newest head does not hide it, errors on two different signed heads of one size and on a well-formed head with a bad signature, and reports what it skipped. New refuses a bucket owned by another project, without a locked retention policy of at least the configured length, versioning, uniform bucket-level access, enforced public access prevention or the configured default key; the package ships least-privilege custom IAM roles (no delete, so no overwrite, and a separate hold-release identity), and builds on the new experimental audit/anchorobj. It was run once against a real bucket and is otherwise tested against an in-memory model; a locked policy cannot be undone, so read the runbook first, and a run or trail ID in an anchored head cannot be erased, so it must hold no personal data (guide).
- New module anchor/awss3: the first production audit.Anchor, which writes every signed tree head as an object in an S3 bucket under Object Lock (compliance mode by default, governance only with AllowGovernance), reads it back and refuses a lock, retention or encryption weaker than configured, and keeps keys derived from the head so that the latest head of a trail and the head of any size are prefix listings with no mutable index; New refuses a bucket without Object Lock, versioning or a default retention, every request carries the expected bucket owner, writes are idempotent, and the package ships least-privilege IAM and bucket policies and a Reader and the bide-anchor command (verify, export, check) that verify the objects offline or with read-only credentials. It is tested against MinIO and a fake, never against AWS, and a run or trail ID in an anchored head cannot be erased, so it must hold no personal data (anchoring guide).
bide approve -item FILE(andbide-hsm approve -item) takes the run and the call from one call ofbide approve -list -jsonoutput, a file or-for standard input (which also needs-yes), instead of-runand-call. The input is the call's object or an array of exactly one, decoded strictly (no repeated name, no invalid UTF-8), and the ids are used exactly as decoded, so an id that ends in a line break or holds a bidirectional or invisible character, which a pasted command line or a shell's$(...)cannot carry, can be decided from the command line.-itemwith-run,-call,-listor-verify-receiptis a usage error, and the input is limited to 1 MiB. The fallback texts ofbide viewandbide approve -listfor such ids, the run viewer and approval guides and the CLI references point to it.bide audit redactionsnow says how a run ended when its end marker was erased: for each run whose erased end marker the signed redaction trail accounts for (name, leaf hash and time all match), it printsrun r1: ended: completed (per trail)(or aborted, or cancelled), andaudit.RedactionReport.Endedcarries the run, the marker the trail recorded and the kind. The journal itself says only that such a run is over (agent.RunEnded), because a tombstone's name is outside the leaf hash and can be renamed with no key; the signed trail is the one source of the kind. A tombstone renamed to another end marker is stillNAME_MISMATCHand reports no kind, and a run whose end marker is kept reports none.- audit.CertIdentity now reports the certificate rules a request for a certificate must ask for: IDKind, EKU, AllowsEmailProtectionEKU, PolicyOID and MaxLeafLifetime (the effective value, 24 hours when the policy set none). They are read-only (EKU returns a copy) and change no verdict; they let a tool such as a certificate request command name what the gate will look for.
bide-hsm csr -key <ref>writes a PKCS#10 certificate signing request for a key held in an HSM or a cloud KMS, signed by that key through the same key sources asbide-hsm approve(PKCS#11, AWS KMS, Google Cloud KMS, Azure Key Vault; Ed25519 or ECDSA P-256 as the source has them), so an approver no longer needs the vendor's tooling to get a certificate for it. The request names nothing by default;-san-email,-san-uriand-ekuask for a SAN and a usage, and-policy <file> -as <approver>asks for exactly what the gate's identity policy looks for and prints what the CA must issue. Before it writes, it checks the request's signature, that its public key is the key source's, and that it carries only the names asked for; it writes to-outor standard output and never overwrites a file without-force.bide keygen -csrnow builds its request through the same code. Ed25519 and P-256 only: there is no RSA request.audit.CertApprover.CheckCertificatereturns the verdict a gate reaches on a decision's certificate chain without a journal, signature or signed head: whether the chain is accepted for the approver and what the revocation status rule makes of it, judged by the counting rule (audit.CheckCount) or the pre-execution rule (audit.CheckExec) at a given decision and provable time.VerifyCertDecisionandVerifyCertExecnow call the same function for that part, so there is no second copy of the verdict; their behavior is unchanged, and a test pins the two to the same answer across the identity tests.- A control mapping page,
docs/trust/control-mapping.md, for bank risk and procurement reviews: for SOC 2 (CC6 to CC8), ISO/IEC 27001:2022 Annex A, PCI DSS v4.0 requirement 10, DORA, the EU AI Act (Articles 12, 14 and 15) and SR 11-7 / OCC 2011-12, it lists what bide provides with links to the guide or code that shows it, what the institution must still provide, and what is not covered yet (a production anchor and a kill switch in progress, independent time not used by any gate, no external security review). It is not a certification or legal advice and says an assessor decides. It is linked from the docs index and the docs-site Trust sidebar. bide keygen -csrandbide-hsm csrtake-cn <name>, which makes the request's subject one common name (printable ASCII text of at most 64 characters, no leading or trailing space; a bad name is a usage error before any key is used or any billed signature made). The gate reads no subject, so the name changes nothing about who may approve; it exists for tools such asstep ca signthat refuse a request with an empty subject and take the certificate's content from the CA's template. Without-cnthe request is unchanged: an empty subject.- A legal hold's lift can need a second person:
bide journal hold authorizehas a second person sign, with a key of their own (a key file, or with the newbide-hsm journala key in an HSM or KMS), their consent to lift one hold, bound to the hold as it stood (matter, runs, tree setting), the placement's trail position and leaf hash, the deployment and a validity;bide journal hold lift -authorization FILE -authorizer-pubkey KEY -require-authorizationchecks it before anything is written and embeds it in the lift's signed trail record (audit.LiftLegalHoldtakesaudit.WithLiftAuthorization,WithLiftAuthorizersandRequireLiftAuthorization;audit.NewLiftAuthorizationandaudit.LiftAuthorizationmake and carry it; a refusal isaudit.ErrLiftUnauthorized). The authorizer's key must not be the key that signs the trail or share a component with it (a hybrid key's Ed25519 half is the same key holder).bide audit redactionschecks the embedded authorization offline: a bad signature, another hold or placement, a validity lapsed at the lift, the lifter's own key, or a key that is not one of the-authorizer-pubkeykeys is the new findingLIFT_UNAUTHORIZED, and-require-lift-authorizationmakes a lift with none one too.bide-hsm journalisbide journalwith its signing keys named by KMS or PKCS#11 reference. Placing a hold needs no second person. bide identity check -certreportscert.cdp: with CRLs loaded it fails when the issuer's CRLs carry an issuing distribution point (what step-ca stamps) that none of the leaf's plain CRL distribution points names, which is why no CRL covers the certificate and the gate waits, and it names the fix; it warns when the leaf has several plain distribution points with different names, since status is then read from a CRL covering any one of them, which suits mirrors of one CRL and not a CA that partitions.audit.PlainDistributionPointsreturns a certificate's plain distribution points, the ones a CRL's issuing distribution point is matched against.bide identity checkis the pre-flight for a certificate-bound approval setup, for a bank to run before go-live and an approver to run when a decision is refused. It reports one line per check, with the fix, or the same as JSON (-json): the policy file loads and its pinned CAs and intermediates are valid and match their certificates; the declared CA timings pass the gate's own configuration check; the policy file and-paramsagree member by member with the policy record the gate journals (-expect), with the members-paramscannot declare listed as not verified; the CRLs, read offline from afetch-crlarchive or a flat directory (-crl-dir, never written) or fetched with the refresher's own limits (-fetch), are fresh by the refresher's health model and the status rule's freshness test; and, for an approver's chain (-cert), whether the gate would accept it and let the call run, with the gate's own reason if not. It never reports ready while a part was left out:-no-statusand-no-expectgive a partial result (exit 4), a failed check exits 1, a usage error 2, an unreadable file 3. Every report lists what a pre-flight cannot check ahead of time. The chain verdict isaudit.CertApprover.CheckCertificate, the function the gate's counting and execution checks call.- Added the signed acknowledgement of a planted redaction-trail record:
audit.AcknowledgeRecordandbide journal acknowledge -position N -reason ... -ticket ... -deployment ... -sign-key ... -head-out ...append a record, signed with the redaction key and bound to its position, that names a leaf the tool did not write by its position and the hash of its bytes, with the reason, the ticket and who, and sign a new head.bide audit redactionsthen reports that leaf as acknowledged (a note, printed as INFO, that says who acknowledged it, the ticket, the time and the reason) instead of failing on its BAD_SIGNATURE, REORDERED or MALFORMED. It acknowledges only that leaf: the acknowledgement must come after it, a record the tool wrote or an erasure made by hand cannot be acknowledged, other bytes at that position fail again, and an unsigned or wrongly signed acknowledgement acknowledges nothing.audit.CheckRedactionTrailis the checkRedactJournalmakes before it appends, for the command. - Added
bide journal redact, the command that erases personal data from finished runs accountably, withagent.Compactor(implemented bystore/sqlite) behind its storage step. It lists a plan as a dry run (each record by position, key, kind, length and leaf hash, never content, with a digest), and with-execute -plan-digesterases the records of a finished run into tombstones: it refuses a run that is not over, is leased (checked before anything is written), has a live parent, belongs to a session or has events in the event store (-keep-event-copiesis recorded), refuses a run no verified signed journal head covers unless-allow-uncovered(recorded), and refuses a trail that does not match the heads in-head-out(a typo in-trail-db) or that holds records no earlier head attests (unless-accept-unheaded-trail). Every trail record is signed and bound to the deployment named by the required-deployment; the trail's head is signed with a key file and appended to-head-out, also after a failed pass. On SQLite the erasure runs withsecure_deleteon and the command then checkpoints and truncates the write-ahead log; when a reader holds the database open it says "STORAGE NOT COMPACTED" and exits 1 rather than claim success, and a test reads the database and WAL files for the erased bytes with another connection open. On Postgres the erasing role keeps its own DSN (-redact-postgres-env) because it can read nothing, the replaced row versions stay until the operator'sVACUUM(the report says so), and an end-to-end test erases through that role and passesbide audit redactions. The trail is signed from the command line with a key file; HSM and KMS signing go through the library untilbide-hsmgains it. The report ends with the copies the command cannot reach. There is no legal hold or second-person authorization yet. - Added the optional
agent.Redactorstore capability, implemented byMemStore,store/sqliteandstore/postgres, which replaces one entry of a finished run with a redaction tombstone that keeps its position and audit leaf hash, together withagent.PlanRedaction(a dry run that lists records by position, name and leaf hash and never their content, with a digest),agent.Redact,agent.NewTombstone(a tombstone is read only in the exact byte form it is written, and now carries an optionalnamemember, always written, that must equal the row it sits in, soaudit.JournalExport.Journal()recovers the name of a redacted record and decision coverage from an export still lists a redacted approval),agent.TombstoneName,agent.LeafHash,agent.CheckRedaction,agent.RedactionProtectedandstoretest.Redactor, the conformance suite. A store refuses, writing nothing, a run with no end marker, a run with a live lease, a sub-agent's run while a run above it is not over, a session's runs, a protected record (the journal header, end markers, attempt markers, saga failures the saga compensation records and the records an approval count rests on), a tombstone that does not keep the leaf hash of the bytes it replaces (the store recomputes it), and an entry that changed since the caller read it. The coreStoreport is unchanged.agent.Statusnow reports a run whoserun:startwas redacted as started rather than not started. On Postgres the migration (run as the schema owner) creates aSECURITY DEFINERfunction,bide_redact_v3, that repeats every check server-side and builds the tombstone; the erasing role holdsEXECUTEon it and no privilege on any table, so the application's role cannot erase and raw SQL by the erasing role cannot rewrite a record. A tombstone at a name a redaction never replaces is reported as corruption (ErrStorage) by every reader, and a tombstone's name, which is outside the leaf hash, is labelled "not attested" where a reader acts on it (audit.NoteRedactednow reads "redacted, name not attested";agent.RunStatus.StartRedacted). There is no command yet and the erasure is not yet recorded in an audit trail; see the retention guide's section on erasing personal data for what it does not reach. - Added
bide journal hold place|lift|listand the signed record of legal holds:audit.PlaceLegalHoldplaces a hold in the store and then records it in the redaction trail (signed with the redaction key, bound to its position, with the matter, the runs, the reason, the ticket and who), andaudit.LiftLegalHoldrecords the lift first and then lifts the hold, so a hold is never lifted without evidence and a failure to record never leaves a run unprotected.bide journal redactrefuses a held run and its dry run names the hold.bide audit redactionslists the holds the trail shows in force, compares them with the database's (HOLD_NOT_IN_STOREfor one lifted by hand,HOLD_NOT_IN_TRAILfor one placed by hand,HOLD_DIFFERS: other runs, tree setting or matter), reports a lift or placement the trail does not match (HOLD_UNMATCHED), and reports an erasure that began while the trail showed a hold over the run (REDACTED_UNDER_HOLD: when the pass replaced records, or has no end record to say it did not); on Postgres the reading role needsSELECTon the holds table. Two operators placing or lifting the same hold at once leave one record, not a duplicate that the audit would report asHOLD_UNMATCHED. Placing a hold again records one whose record failed, and lifting again finishes a lift whose store step failed, with no second record; a hold lifted by hand can be recorded as lifted. - Added legal holds at the store: the optional
agent.Holdercapability (PlaceHold,LiftHold,Holds;agent.Holdnames an ID, a matter, the runs it covers and whether it covers the sub-agent runs below them), implemented byMemStore,store/sqliteandstore/postgres, withstoretest.Holderas its conformance suite. A store's redaction now refuses a run an active hold covers (agent.ErrRedactHeld) in the same statement that would replace the record, so a hold placed while a pass runs either lands first or the record was already erased;agent.PlanRedactionnames the holds that cover a run and refuses it (RedactionPlan.Holds). SQLite and Postgres keep the holds in abide_holdstable the migration creates (a file or schema from before holds has none and no hold). On Postgres the redaction function moves tobide_redact_v3, which reads the table as its owner, so the erasing role can neither read nor change it and a third role withSELECT, INSERT, DELETEon that one table places and lifts holds; the migration createsv3beside any olderbide_redact_v1orv2(v1does not check holds), and revokesEXECUTEon every older version from PUBLIC and every role it was granted to (it never replaces or drops a function), and the store calls onlyv3, telling you to run the migration when it is missing.v3takes the holds table'sSHARElock first, so a placed hold stops every erasure that has not yet committed, and refuses to run unless its transaction is atREAD COMMITTED: a role whose default isolation is stricter needsALTER ROLE ... SET default_transaction_isolation = 'read committed'. There is no command for holds and no record of them in the signed redaction trail yet. - audit.AuditedStore.WithMinInterval and audit.AuditedEventStore.WithMinInterval publish at most one head per run or trail per interval, so an anchor that keeps every head for years (an S3 Object Lock bucket, say) no longer receives one per write: growth inside the interval is held back and published as one covering head by a timer, so while the process lives every record is covered within the interval, and a run's first head, its end marker (run:complete or run:aborted), Reanchor, Flush, ReanchorRuns and, for trails, ReanchorPending and AnchorTrails publish at once. A process that dies loses its timers, and what it held back stays unanchored until the next start or recovery pass: AuditedStore.ReanchorRuns is that pass for journals, and AnchorTrails already is for trails. The new AuditedStore.Flush and Pending, AuditedEventStore.Flush (which now also publishes held-back trails) and the default of no interval leave existing behaviour unchanged. A failed publish by the timer is retried with a doubling wait and reported to OnError once per streak, with the new OnRecovered hook ending it, and bide audit verify-decision-coverage and verify-receipts now say which of a journal's last records are under no signed head, and verify-decision-coverage takes -max-unanchored to fail on a tail whose newest head is older than a bound.
- The
-paramsfile ofbide identity fetch-crlandbide identity checktakes optional members for the values the gate's policy digest covers and a declaration could not state before:w,min_w,routine_grace,clock_tolerance,allow_holds,consecutive_numbers,retainedandeffective_from(named as in the policy record), beside the existingcoverage_tolerance. A file that states all of them builds an approver whose policy digest equals the gate's for the same declaration (audit.StatusDecl.MissingForDigestnames what a file lacks), so the digestfetch-crlprints in its start-up events is comparable, andbide identity check -expect-digestis a true equality; with a file that lacks some,fetch-crlsays which and that the digest cannot be compared, andcheckfails naming them. Existing files parse and behave as before, and unknown members are still refused. - Added the redaction trail and its check:
audit.RedactJournalerases the records of a plan accountably (it requires a reason, a ticket, an executor, a time and a signer, and signs every trail record with it, bound to its position, the hash of the record before it and a required deployment name (a replayed, copied or reordered record isREORDERED), so a record planted by someone who can append to the event store isBAD_SIGNATURE(orMALFORMED) under any head and accounts for nothing;audit.RedactJournalalso refuses (ErrRedactTrailUntrusted) before it appends or erases when the trail does not matchRedactionOptions.TrailHeads, but a record planted in the trail never blocks an erasure: it is reported and accounts for nothing;audit.SignRedactionTrailverifies the earlier heads before it signs a head over exactly the leaves it checked; refuses a run no verified signed journal head covers unlessAllowUncovered, which is recorded; appends a begin record before it erases and an end record after, to a trail namedredact:@login an event store thataudit.AuditedEventStoreoraudit.SignNotifyTrailcan sign and anchor),audit.VerifyRedactionsand the newbide audit redactionsverb. The check finds a deleted or changed trail record, records after the newest head, an unfinished pass, a tombstone no trail record names (an erasure made by hand), a tombstone whose name or leaf hash differs from the trail's (a tombstone's name is outside the journal's hashes, so the signed trail is what attests it), a record the trail lists that still holds content, a tombstone stamped at a time no pass that listed it carries, a run the trail names that has no journal in the input (a trail checked against no journal checked nothing), and an erasure that ran without a covering head; a tombstone is accounted for only by the pass that erased it (a later plan that lists it as already redacted does not launder an erasure made by hand), and a failed pass that the same plan later finished is a note.-trail-dband-trail-postgres-envread the trail from a store kept apart from the journal.agent.RedactUsinglets a different store than the journal's do the replacing.audit.SignRedactionTrailandbide audit redactionstake the deployment name too (-deploymentis required). There is no command to erase yet. - Releases now carry SLSA v1 Build Level 3 build provenance: the release workflow calls a reusable workflow of a separate repository (
bide-ai/release-builder, pinned by commit) that builds with goreleaser and attests every archive, every archive SBOM,checksums.txt,approve-page.SHA256SUMSand the module set SBOM with GitHub's artifact attestations, andrelease.ymlverifies that provenance with a pinnedgh(scripts/verify-provenance.sh) before it signs or publishes anything, failing the release if one file does not verify. The cosign signature identity is unchanged.docs/trust/verify-releases.mdhas thegh attestation verifycommands and states what the provenance proves and what it does not. docs/guides/sso-certificates.mdand theexamples/sso-certsmodule: a worked, tested recipe for short-lived approver certificates issued after a single sign-on login, with step-ca 0.30.2 as the reference CA (an OIDC provisioner and a certificate template that issue exactly what anIdentityPolicyrequires, the lifetime and backdate rule, an operator JWK provisioner for revocation) andscripts/renew.shfor the approver. The module's test runs the recipe against pinned step-ca, step CLI and mock OIDC identity provider containers: the real login, the certificate's shape, a login without MFA or with a malformed person id refused by the template,bide identity fetch-crlandbide identity checkover step-ca's CRL, a gated call approved withbide approve -certand counted by a realaudit.CertApprover, a revocation and the refused decision made after it. It runs in the Integration job withBIDE_REQUIRE_STEPCA=1and elsewhere only withBIDE_TEST_STEPCA=1; the guide states what the test does not cover (an HSM or KMS key, another identity provider, other CAs).bide audit notifications -db(and-postgres-env) checks the kill switch's notifications from the control run: every stop in force must have been told (stop_set), whatever its recorded time says (a record's time is its writer's own, so a backdated or future-dated stop is still owed;-stops-within, default 7 days and the notifier's window, limits only stops that are over, andNotifyPendingnow notifies every stop in force the same way), a lifted stop owes its all-clear and itsstop_lifted, and a stop set and lifted before any notifier looked owes only the lift; a stop or lift no notifier saw fails withnever_notified, and a control run the audit cannot judge (signed records and no-stop-policy) is refused with exit 4 instead of passing what it did not check.-stop-policyand-stop-rootread the control run as the deployment pins its policy.audit.VerifyNotificationstakes the control run's state asNotifyVerifyInput.Stops(judged withagent.StopNotifyEvents, which shares its window rule with the notifier) and reports a control run record dated in the future, or well before an earlier record, as a problem (StopAnomalies,agent.StopClockAnomalies); with-runthe command prints an INFO line that stops were not checked and now reads thestop_setandstop_liftedkinds, the all-clear reasonliftedand the stop key shapes, which it refused as unknown before (agent.ParseStopKey). Guide: docs/guides/notifications.md.bide stop, the kill switch's command line (andbide-hsm stopfor a key in an HSM or a KMS):-all,-tool,-flowand-agentset a stop (there is no default scope, and a barebide stoplists the active stops and exits 2),-list(with-json),-show,-lift,-reaudit,-apply-pending,-upgradeand-downgradework on it. Basic mode needs no keys; audited mode (-stop-policy,-as,-key) signs each record with an enrolled approver's key, checks the key and role before writing, and lifts by the policy's quorum. A stop is written without a prompt when-yesis given or stdin is not a terminal; a lift and the configuration operations ask on a terminal and refuse without one unless-yes. Exit statuses are 0, 1, 2, 3 and 5, where 5 means an audited record landed in the control run or on the trail but not both (-reauditand-apply-pendingcomplete it). No secret goes on the command line: a key is a file or a key reference, a Postgres journal is named by its DSN variable.bide audit stopsgains-sign-head -log-key -head-out, a schedulable job that verifies the stop trail against the control run, signs a head over exactly the verified records (audit.SignStopTrailExport) and appends it to a head file that-sthreads; a deployment must run it, or the audit fails on the unattested tail. Guide: docs/guides/kill-switch.md.- The control run of the kill switch (
agent.StopControl,StopPolicy,StopRecord): stop, lift, policy-transition and mode records under the reserved run ID@stop, which a recovery pass does not drive and no user run may use. The mode is each process's configuration: basic (no policy, the default) trusts the store, so anyone with store access sets and lifts and the records are plain; audited (a policy) counts only records signed by approvers of the policy in force at their position, lifts by a quorum of distinct lifters (one not the setter, configurable) and ignores plain and unsigned records. No store record can switch a process's mode or make it fail: mode records are evidence, andStopStatelists what it rejected. The deployment's root policy, which carries a deployment ID that every signed record repeats (so records do not replay across deployments), is the trust anchor, and signed policy transitions approved by a quorum of the policy in force carry later ones; a process pins the root policy (or a later one, naming the root it trusts withWithStopRoot) and walks forward from that root only, so a self-signed root a store writer appends never governs a record, so a rotation or an offboarding never drops a stop, and a chain it cannot walk (a pin no stored root reaches, a fork) makes the stops unknowable instead of silently dropping them, while a forged record in an audited deployment is only rejected; a basic process on an audited deployment does not lift a signed stop on a plain lift;ChangeModeto audited adopts the stops that are active in the basic view. every process declares its mode (WithStopMode), the chain is checked for forks and rollbacks (ErrConfig), and a control that cannot judge which stops are in force (a basic process on an audited deployment, an audited process whose pin the chain does not reach) reportsErrStopsUnknowablefor the engine to fail closed on;StopControl.Statefolds the log into the effective stops; nothing in the engine reads it yet, so no run is stopped by this change. Model 16 (spec/tla/stop) checks the fold and a call's read of it, with eight counterexample configurations. - The kill switch notifies: a stop that is set (
stop_set, keystop:<id>) and a stop that is lifted (stop_lifted, keystop:<id>:lifted) are notification kinds, observed from the control run so delivery has the notify trail's claim, acknowledgement, retry, overdue and escalation and survives the death of the process that set the stop.NotifyPendinggivenWithNotifyStops(ctl)reads the control run on each sweep (stops set or lifted withinWithNotifyStopsWithin, default 7 days), andNewStopNotifierwithWithStopObserveron aStopSwitchnotifies within the switch's poll interval; both name an event by its key, so any number of processes and both paths send one notification. The observer is handed each change through a single latest-state slot on a goroutine of its own, so a blocked or panicking observer or notifier never delays or fails a check point. Astop_setends with the usual all-clear (reasonlifted), an audited stop'sstop_liftedis raised once when the quorum lands, a rejected record raises nothing, and routing and escalation apply. The webhook payload gainsstop(id, scope, name, reason, setter, host, mode, signed, compensation, lifted_by; no key, signature or secret), the Slack relay escapes the operator text, PagerDuty sendsstop_setas critical andstop_liftedas info, andbide notify test -kind stop_setandstop_liftedsend samples. Guide: docs/guides/kill-switch.md. - The kill switch's engine side (
agent.StopSwitch,agent.WithStopSwitch,*agent.Stopped,agent.WithRecoverStop): an agent given a switch holds a covered run, as a pause, at a drive's start, at a turn's start, before a call's claim, after the claim and immediately before the call begins, so no side effect starts under a stop that was committed before the check; a won claim that is held is recorded as not started, a call that has begun finishes and is journaled, a written attempt marker is never fired again by a stop or its lift, and a saga's rollback continues unless the stop blocks compensation. A side-effect call reads the control run itself and is held (fail closed) when it cannot be read past a staleness bound, or when the stops cannot be judged; Recover and RecoverLoop list nothing during a global stop. An agent without a switch on a store whose control run holds a record fails its drives withErrConfig, which costs one extra Load per store every few seconds on a drive (the budget tests count it). Model 16 maps the check points. A plan flow takes a switch withBuilder.WithStopSwitch(orplan.WithLoadedStopSwitch): a flow-scope stop holds a run at its start and each node before its claim and after it, with the same not-started record, and a flow without a switch on such a store is refused. A multi-handle Postgres test shows a stop set by one process holds another's next side-effect call. Guide: docs/guides/kill-switch.md. - The kill switch's audit trail: an audited
agent.StopControlgivenWithStopTrail(audit.NewStopTrail(events))writes every signed record (a stop, a lift, a policy transition, the root, a mode change) to a stop trail of salted event leaves that anAuditedEventStoresigns and anchors, in an order that keeps the evidence at least as strong as the effect (a stop is in force first and evidenced second; every other record is evidenced first), reports a failed trail write as*agent.StopTrailError, andStopControl.Reauditappends what the trail lacks.bide audit stopsverifies a trail offline (-trail, or-dband-postgres-env) against the pinned policy (-stop-policy) and the chain of signed transitions from its root, against signed heads (-sth,-pubkey) so a deleted or reordered record is found, and, with a store, against the control run record for record.audit.VerifyStops,audit.ExportStopTrail,audit.SignStopTrailandagent.VerifyStopRecordsare the library side. A trail record that never reached the control run (a crash between the two writes) is listed as unapplied, andStopControl.PendingRecordslists it with its signer and age andStopControl.ApplyPendingapplies it, as a signedapplyrecord naming what was applied and by whom; an unattested tail fails by default and-max-unattestedrelaxes it. Guide: docs/guides/kill-switch.md. bide viewshows the kill switch: while a stop is in force every page of a store opens with a banner (scope, reason, setter, age, lifts held and needed, the mode), and the banner also appears when the stops cannot be judged, signed records cannot be checked, records were rejected, or the control run cannot be read, so a page never says "no stop" about a control run it could not read.-stop-policyand-stop-rootcheck the signatures as an audited deployment does; without them the banner says signatures are not verified. The run list and a run's page say which runs a stop holds (a global stop, a flow stop, a tool stop with a call the journal shows no result for; an agent stop only "may be held", since the agent identity is not journaled),/stops.jsonserves the banner (withread_at; a viewer given the policy on a deployment that has not upgraded says its plain stops are ignored by audited processes), andbide stop -liftshows how many runs the stop holds before it asks. The control run@stopis no longer listed as a run. Guide: docs/guides/kill-switch.md.bide-hsm audit stops -sign-head -log-key <key ref> -head-out <file>signs the kill switch's stop-trail head with a log key held in an HSM or a cloud KMS (apkcs11:URI,awskms:,gcpkms:orazurekv:reference), closing the gap thatbide audit stops -sign-headtook a key file only. It is the same verb asbide audit stops(one implementation ininternal/auditcli): it signs only the records it verified against the pinned policy and the control run, signs nothing when the audit is not clean, adds nothing when the newest head already commits to every record, opens the key only when there is something to sign and only after checking it is the key-pubkeynames, and has the same exit statuses; the heads it writes verify with the existing verifier. The reference holds no secret (a PKCS#11 PIN comes frompin-source), and the key flags ofbide-hsm approveapply.bide-hsm auditruns thestopsverb only. Guide: docs/guides/kill-switch.md.
Changed
- New package audit/anchorobj (experimental): the SDK-free half of an object-store audit anchor, extracted from anchor/awss3 so that the Google Cloud Storage anchor and any later one name, encode and check anchored heads the same way: the object layout (partition hash, inverted size, head digest), the canonical object body and the checks a Reader makes on it, the equivocation check and the tripwire for run IDs that look like personal data. A backend supplies its own object format and partition tag, so an object of one anchor never validates as another's, and its own error values, so errors.Is and the text of its messages are unchanged. anchor/awss3 now uses it with no change in behaviour: the existing tests pass unchanged and new tests pin the object keys, bodies and partition names byte for byte.
- The
bide checkwarning for a quotedassertname that contains a backslash sequence now reads as guidance: it says the name is read as written, names the node the line refers to now (the name with its backslash) and says to write the character itself if that was meant, instead of describing how the old reading would have unescaped it. The condition that triggers it is unchanged. - The bide-anchor command moves out of the anchor/awss3 module into its own module, github.com/bide-ai/bide/cmd/bide-anchor (install it with go install github.com/bide-ai/bide/cmd/bide-anchor@latest), and gains -backend, which names the object store the anchor wrote to; s3, the default, is the only backend built in, and others are added with their packages. It has not been in a release, so no published install path changes; the module is tagged with the others from the next release.
- Added docs/ARCHITECTURE.md, a "Reading the code" map of the source: for each main package (agent, audit, plan, approvals, notify, the stores, govern, flowedit and cmd/bide) the files to open first, in reading order, starting with the journal, step, claims and leases, the loop, approvals and the exec gate, the notifier and the audit log. The agent, audit and plan package docs now carry a "Where to start" paragraph, and the README, the docs index and the docs site link the page. Docs only; no code changed.
- A CRL whose critical issuing distribution point holds only a full name made of URIs (the shape step-ca stamps on every CRL it signs) is now read instead of refused. Because such a point narrows the CRL's scope (RFC 5280 section 5.2.5), it is evidence of absence only for a certificate whose own CRL distribution points name one of its URIs byte for byte, in a point with no reasons and no cRLIssuer; a certificate that does not name it gets no status from it and the gate waits, as before. A listing in any CRL the issuer signed still revokes, whatever its point. The CRL refresher refuses (an
unsupported-crlevent naming both URLs) a CRL whose point does not name the URL it was fetched from, andaudit.CRLgainsDistributionPoints. Every other issuing distribution point (a scope flag, a reasons field, a relative name, a name that is not a URI, a non-critical one) and any delta CRL with one are refused as before. - The kill switch, redaction and legal holds are labelled experimental in the API reference and the stability page: every symbol of
agentandauditdeclared for them (StopControl,StopSwitch, the stop records, policy and trail,Redactor,Compactor,PlanRedaction,Redact, the redaction trail,Holder,PlaceLegalHold,LiftLegalHoldand the rest) now carries (experimental) through the label table's symbol rules (internal/tools/apiref/labels.go), and the kill switch and retention guides anddocs/trust/stability.mdsay what it means: the Go API and the command flags may change in a minor release with a changelog entry, their records follow the pre-1.0 format policy of the stability page, the tombstone format and leaf hash stay core, and the stated guarantees (a stop in force holds the calls it covers, an erasure is accounted for in a signed trail) hold. No code behavior changes. - A redaction can now erase an end marker (
run:complete,run:aborted,run:cancelled), by naming it (bide journal redact -name run:complete), so the run's final answer, or its cancellation or failure text, can be erased.-payloadsdoes not select an end marker, and its dry run says so (end marker not selected by the Payloads preset: name run:complete to erase its content), so nothing is left behind silently. The tombstone keeps the marker's position, and every reader finds the run over by it, but none reads how the run ended from it, because a tombstone's name is outside the leaf hash and a rename would flip a completed run to cancelled:agent.Statusreports the new stateagent.RunEndedwithagent.RunStatus.EndRedactedset and noTerminaltext,IsCompleteis false,CancelreportsErrRunEnded,Recover,RecoverLoopand a drive treat the run as over and refuse to drive it, the notifier does not raise an abort from an erasedrun:aborted,bide viewshowsENDED (ERASED), and a flow'sConformdoes not compare an erased completion. Only the signed redaction trail records what the marker was (bide audit redactions,NAME_MISMATCHfor a rename).agent.RedactionProtectedno longer lists the end markers; a tombstone at any otherrun:name is still corruption. On Postgres the redaction function moves tobide_redact_v3, which allows the end markers; the migration creates it and revokesEXECUTEon every olderbide_redact_vNfrom PUBLIC and every grantee, so only the current function is callable, and you grant the erasing roleEXECUTEonv3(the store calls onlyv3). The lifecycle model gained the erasure (RedEnd, model 10):life-redactpasses,regress/redacted-not-endandregress/redacted-kind-from-nameshow the two bugs (reading an end by content, reading its kind from the name). - The release workflow handles pre-release tags (
vX.Y.Z-rc.N): the module set SBOM accepts a semantic version with a pre-release suffix (no leading zeros, no empty identifiers, checked the same way byscripts/module-sbom.shand the release builder), the release is marked a pre-release as before, and no Homebrew formula is generated or pushed for a tag with a hyphen, sobrewnever offers a pre-release as the current version. scripts/release.sh --pushnow waits for main's CI instead of failing at once when the release commit has no completed push run yet (right after an admin merge the run has often not started): it polls every 30 seconds (BIDE_CI_PREFLIGHT_POLL_SECS) for up to 45 minutes (BIDE_CI_PREFLIGHT_WAIT_SECS) with a progress line, stops at once on a failure, and still accepts a passed merge queue run of the same tree. A dry run asks once. The self-test covers waiting, failure, the time limit and the dry run.- A writer with store write access cannot stop a kill switch stop from landing, but can slow it: every full read of the control run folds every entry, so
SetStop,State()and aStopSwitch's first read grow linearly (a switch's later reads are incremental and stay cheap until new entries arrive) with the junk entries a writer adds under@stop/set/(measured, one globalSetStopwith 100,000 junk entries: 0.84 s on SQLite, 2.0 s on Postgres; with 10,000: 0.1 s and 0.15 s). This is now stated in the kill-switch guide and in the known limitations, and a guard test on SQLite (and on Postgres withPG_DSN) fails if 10,000 junk entries push any of these calls past 2 seconds or make one grow faster than linearly from 2,500 entries. Keep the control run's store writable only by the processes that operate the kill switch. - A kill switch stop is now named by its scope, its compensation and a generation (
@stop/set/<scope key>/<generation>, the generation in the signed record asgen) instead of by its content, and the insert is once-only, so two operators who set the same scope at the same instant can no longer leave it in force twice: the loser of the insert reads the control run again, finds the winner's stop in force, and writes nothing.StopControl.SetStopreturns the stop in force with an*AlreadyStoppedError(errors.Is(err, ErrAlreadyStopped)) when its scope and compensation are already stopped, andbide stopreports "already stopped" and exits 0 as before. A writer with store access and no key cannot block a stop: only a set that decodes, validates and is named by its own content moves the generation (a junk entry under a generation name is stepped over and never counted, a number past 2^31-1 or not canonical is not a generation), and a writer that loses the insert eight times, or finds no generation free, writes the stop under its content-derived name, as every stop was before generations, which cannot be taken (such a stop can duplicate one written at the same moment, the safe direction). An upgrade that meets plain duplicate stops of one scope adopts the scope once. Records written before generations keep their old names and are read as before; the fold is unchanged. Model 16 gains the generation rule (SetInsertable, the invariantOneActivePerScope, the configsstop-same-scopeandstop-same-scope-reachand the regressno-generation). Guide: docs/guides/kill-switch.md. - The fallback for a run or call id that cannot be shown or pasted safely (a control, bidirectional or invisible character) now says what to do instead of "no command (unsafe id)" or "decide from the application": take the ids from
bide approve -list -json(therunandcallmembers) and pass them to-runand-call, which a test shows records a decision on such a call. Inbide view's Needs attention list, a gate with both bare-key and certificate-bound approvers also names which approvers the missing command affects and how each kind decides (-key, or-certand-identity-policy). Thebide approve -listhelp and the guides say the same.
Fixed
scripts/release.sh --assemble-changelog(the changelog tool'sassemble) now accepts a pre-release version such asv0.21.0-rc.1, read asscripts/release.shreads versions (no leading zeros, a pre-release of non-empty dot-separated identifiers), and refuses a malformed one. The candidate's section sits above the last release, the[Unreleased]link moves to its tag, and a later assembly (the next candidate or the final release) finds the candidate's section and link as the release before it. Before, assembling a candidate failed with "version is not like 0.16.0" and its section had to be retitled by hand.- The CRL refresher's "no valid CRL obtained" error and
Health().LastErrornow say why a CRL that was fetched fine was not accepted (a rollback, a conflict between two CRLs of one number, a future-dated, unverifiable or set-aside CRL) instead of listing the URL as "ok"; the per-URL outcome kind isrefusedwith the reason in its detail. This also fixes an intermittent failure of the identity reset test, which republished a CRL under the same number with a thisUpdate one second later when it straddled a second boundary and so, correctly, hit the equivocation rule; the test now keeps one base time. - The status lines of three design notes no longer say nothing is built:
docs/design/approver-identity.mdnow says certificate-bound approvers work in gates (v0.19.0) with the CRL refresher (v0.20.0) and lists what is not built yet (RFC 3161 time in gates and SSO issuance;bide-hsm csrandbide identity checkare in progress),docs/design/visual-editor.mdsays phase 1 (bide edit) is built, anddocs/design/tooling-and-onboarding.mdsays it shipped in v0.14.0. - The certificate approvers guide and the
bide identity fetch-crlstart-up events told operators to compare the policy digest the command prints with the digest the gate records, but the two can never be equal: the digest coverseffective_from, which the command's stand-in approver sets to its start time, and values the-paramsfile cannot hold (w,min_w,routine_grace,clock_tolerance, holds, retention), which the command fills with defaults. The guide and the start-up event now say so, and a newdeclared valuesstart-up event prints the stand-in approver's policy record withouteffective_from, so the timings and pinned CAs can be compared field by field with the policy record the gate journals. - awss3.LoadDir, and so bide-anchor verify and export -dir, passed on an empty directory and loaded two validly signed heads of one size with different roots as two heads, without an error; an empty directory is now an error wrapping ErrNotFound (nothing to verify never passes), and such a pair in one partition is an error wrapping ErrEquivocation, as the online Reader already reported. The directory walk, the per-partition equivocation check and the empty-directory check now live in audit/anchorobj (Layout.LoadDir, with MaxObjectBytes) so that every object-store anchor gets them, and a directory copy still cannot show that it is complete: compare its newest head with the live bucket.
- The relay's state file write copes with another process holding the file open on Windows: replacing
relay.statefails with a sharing violation or access denied while a reader (an operator'stail, a virus scan) has it open, and the save is now retried on a timer within milliseconds (about 300 ms in all, not logged, no request waits for it). A save that fails for any other reason is no longer forgotten until the next event: the state stays pending and is written again after the flush delay (at least a second, doubling to 30 seconds while it keeps failing, logged once per streak and again when it recovers), or atClose. The test that polled the file for the flush no longer fails on the same transient open error. - Corrects the roadmap and
docs/KNOWN-LIMITATIONS.md, which still said gates do not use the certificate-bound approver checks: they have since v0.19.0 (v0.20.0 added the CRL refresher), and the roadmap now lists what is left (the RFC 3161 verifier is not called by any gate yet,bide identity check,bide-hsm csr, keys issued through SSO). - The stop trail's append now retries after losing a race for its position until its caller's deadline (30 seconds when the caller has none), waiting a jittered, growing time between tries, instead of giving up after eight tries. With ten operators writing at once the eight tries ran out (under the race detector, in a test), and a trail write that gives up turns a stop that is in force into exit 5 of
bide stop; thirty-two concurrent writers now all land. A stop's own trail write keeps trying for 5 seconds (the stop is already in force, and a write that gives up is exit 5, whichbide stop -reauditrepairs); a lift and the catch-up records before it share one 30-second budget; a caller that cancels gets an error that satisfieserrors.Is(err, context.Canceled)as well asErrTrailConflict; andbide stopprints "in force" the moment the stop is in the control run, before the trail write (agent.WithStopInForce). - The release's
go mod tidymadegithub.com/jackc/pgx/v5a direct requirement ofcmd/bideand failedTestDirectRequires, because a journalcmd test imported itsstdlibpackage directly whilego.modlisted it as indirect; the test now relies on the driverstore/postgresregisters, and the stale indirect requirements in four example modules are tidied. CI now runsgo mod tidyin every module and fails if it changes ago.modorgo.sum, so a direct import of a module marked indirect fails on the pull request and not at release time. bide editsays so when git did not answer within its 15 second deadline ("git did not answer within 15s and was stopped"), instead of the "signal: killed" the kill leaves, still falls back to the file as it was opened, and no longer waits on a helper process that a git left holding its pipes (the wait is bounded to 2 seconds; a git that answered and exited 0 still counts as an answer). Test only: the stand-in git of the baseline tests is written and run once before the test uses it, because the first run of a newly written executable took 18 seconds on a loaded machine and the release run killed every case at the deadline.
0.20.0 - 2026-10-16
Added
bide editaccessibility pass, the phase gate of the editor design: the outline is one Tab stop moved by the arrow keys, Home and End, the nodes in the drawing are buttons named by their drawn details, the save dialog returns the focus however it closes, and the controls meet the 24-pixel target size and name-contains-label rules. A Chrome test drives the whole path with the keyboard alone (select a node, set its safety, edit its gate, add an assertion, undo, save with the confirmation a weakening needs; the script never uses the pointer and bounds the Tab presses) and another runs axe-core (pinned by the lockfile) over the page in light and dark in five states and fails on any violation. The flow editor guide gains an accessibility section and a policy owner's workflow,docs/KNOWN-LIMITATIONS.mdsays no manual screen-reader pass has been done and lists what to check by hand, and the README and its four translations list the guide.bide edit's assertions panel lists the config'sassertlines with their verdicts and counterexamples and adds, edits and removes them from the six forms of the grammar as templates (every path to a node passes an approval gate of at least K [of N] [excluding the requester], every path to a node passes another node, every path to a terminal passes a node, no side effect after a node, a node reachable, a node unreachable). The page sends the form's parameters and the server writes the line the check reads (flowedit.Assertion,Assertion.Text,ParseAssertion), quoting a node name with a space and refusing one the grammar cannot hold; only declared nodes can be chosen and a line the config already has is refused. Each change to the form asks the server what the check says of the line and shows its verdict, with the counterexample path of a violation, before anything is added. Add, set and remove are splices (add_assertion,set_assertionandremove_assertionofflowedit.ApplyOperation; removing the last line takes the list), so a comment above a removed line goes with it. The panel says assertions are checked in CI and not at run time;POST /api/applyanswers a refused operation with a 200 and{"refused": reason}instead of an error status, so asking what an operation would do does not fill the browser console with failed requests.bide editcompares the file with a baseline, the committed policy (the file at gitHEAD, or at the revision-base <rev>names; for a file that is not in git, the file as it was when the editor opened it), with the classifierbide check -diff -check -fail-on-weakenruns. A text that is weaker than the baseline shows a banner (APPROVAL GATE WEAKENEDorSAFETY CHECK WEAKENED, each item in the classifier's words) that has no close control, stays until the text no longer weakens and is announced as an alert; a text that cannot be read says it cannot be compared. Thefloweditmodule gainsflowedit.ApplyOperation, the editor's operations on a config's text (a node's safety and block, and its approval gate:need, approvers,exclude_principal,timeout) as verified splices so the diff of an edit is the edit and a gate read back through the check is the gate asked for, an/api/applyendpoint for it,flowedit.Compareandflowedit.WithBase. The page does not offer the operations yet.bide edit's inspector has forms for the selected node's safety, block and approval gate. A form change is an operation the server applies to the file's text as a splice (flowedit.ApplyOperation), verified before it is returned, so the diff of an edit is the edit and comments, blank lines and the style of the lines around it stay; an operation the engine cannot splice safely is refused with the reason. The gate form edits a draft of the decisions needed, the approvers in policy order, separation of duties (exclude_principal) and the deadline (timeout), and each change to the draft asks the server whatbide checksays of the node with that gate and shows the answer under the form in the check's words (an out-of-rangeneed, a repeated approver, anassertline the draft would break), so there is no second validator in the page. Apply writes the draft, Remove gate removes the gate, Undo and Redo restore the exact earlier text, a change returns the focus to the control, and the weakened banner follows each change against the baseline. The node's gate as the config declares it is in the view (Node.Approval).bide editlets you edit the config's source in the page and save it. Typing asks the server for thebide checkverdict of the new text, so the graph, outline, assertions, problems and the weakened banner follow the text; nothing is written until Save, which opens a dialog with the plain unified diff of the bytes against the file on disk, every comment the diff removes, the number of errors (a file with errors can be saved, and the dialog says it will failbide check), and, for a text weaker than the baseline or one that could not be compared, the items to confirm: the server refuses a save without exactly that confirmation, and one made for an older text does not cover a newer one (HTTP 422, nothing written). The write is atomic (a temporary file in the same directory renamed over the file, keeping its permission bits, leaving the old file and no debris on a failure); the page carries the hash of the file as it read it, and a file that changed on disk since is a conflict (HTTP 409) that shows the file against the author's text and is never overwritten; the path is fixed at startup and checked again at write time (a symbolic link or a directory in its place is refused). The editor never runs git. New in thefloweditmodule:(*Server).Previewand(*Server).Save,UnifiedDiffandRemovedComments; the guide anddocs/KNOWN-LIMITATIONS.mdsay what a rename-over save does not keep (hard links, extended attributes, ACLs) and that the check is compare-and-swap, not a lock.- A CRL refresher for certificate-bound approvers, so a bank's platform team does not write its own CRL fetching loop.
crlrefresh.New(approver, sources, opts)keeps the approver'sStatusSnapshotsupplied with the newest CRLs of the issuers the policy pins (Run, orRefreshOncefrom cron): it fetches only from the URLs the policy file'scrlmember (oraudit.CRLSources) names, over HTTP or HTTPS (LDAP is refused), with a size limit, timeouts, no compression and redirects only to the same host; verifies each CRL against its own issuer's certificate (the policy pins intermediates by key, sointermediate_certssupplies their certificates) before adding it; refuses a CRL with a lower number than the highest accepted (rollback) and a same-number CRL with another TBSCertList (equivocation); asks every configured URL and keeps the highest valid one; pairs delta CRLs with their base; archives every accepted CRL in a dated, atomically writtencrlrefresh.DirArchiveand rebuilds its rollback memory and the snapshot from it at start; and never makes status look fresher, because freshness is read only from each CRL's own dates. Events and alarms go to hooks,Health()reports the age and the next expected CRL, and the alarm ismin(max(limit/2, CAPeriod + overlap + tolerance), limit - interval)with aCriticalstate that is exactly the status rule's own freshness test: a literal 50 percent of validity would alarm every cycle on a healthy weekly root, so the guide now advises a two-period validity for the root CRL with itsExecStatusAgeForset to it.bide identity fetch-crlruns the same code for cron (-once) or as a daemon,bide identity reset-high-waterandack-resetare the audited way out of a CA's mistaken huge CRL number, andbide approve -certstill fetches nothing. The CRL URLs are not part of the policy digest because they cannot change a verdict.
Changed
- A node name in double quotes in an
assertline is now read exactly as written: the assertion grammar has no escapes. Before,planread a quoted name withstrconv.Unquote, so a name such as"caf\u00e9"or"a\tb"was unescaped to the character, and a name with a backslash and a space (my\ node,x\n y) in quotes was read as an undeclared node or as a name with a newline in it;RenameAssertionandCompareAssertionsread it the same way. A quoted name is now read raw by the check, byRenameAssertionandCompareAssertions, and by the flow editor, which writes the same lines; a bare name was already raw. Upgrade note: an assertion that relied on an escape inside the quotes now names a different node; write the character itself ("café").bide checkwarns on every quoted name that contains a backslash sequence the old reading would have changed, so no assertion silently starts naming another node (a warning, not an error, unless-strict). A name that contains a double quote still cannot be written in an assertion.
Fixed
TestNotifier_AnAnchorOutageNeverFailsADeliveryfailed on Windows because it read the store'sOnErrorreports without waiting for the background publisher, and because a failed catch-up fromFlushNotificationscan open the anchor breaker first, in which case the outage is reported to the notifier's error handler and the publisher is skipped. The test now flushes the store and accepts the first report on either channel, a new test pins the breaker ordering, and theAuditedEventStore.Flushgodoc says thatAgent.FlushNotificationsdoes not wait for the publisher. No production behavior changed.- Counts in the
bide editpage and thebide viewpages now agree with their nouns: the config verdict reads "1 assertion holds" (not "1 assertion hold"), and the key numbers, the graph label, the audit proof summary, the gate status and the diff error note use the singular for a count of one ("1 node", "1 approval gate", "1 approver", "1 error"). A test pins both forms of each string.
0.19.0 - 2026-10-16
Added
bide edit flow.yaml, the first release of the flow editor (docs/design/visual-editor.md), is read-only: a local page, served by the binary on a loopback address, shows a flow config's declared graph, an outline of its nodes and wiring in config order, the selected node's block, safety, crash behavior and approval gate, the assertions with their verdicts and counterexamples, the problemsbide checkfinds and the source, all computed by the codebide checkandbide view -configrun and labeled as the structural check. The page is hand-written script and the viewer's styles, served from the binary under a Content-Security-Policy that allows only same-origin resources; every request is a POST of JSON from its own origin with a per-run session token (printed in the address's fragment), and the command reads only the file it is given (a.yaml,.ymlor.jsonregular file of at most 1 MiB). It is in the fullbidebinary and not in abide_audit_onlybuild. A Go program can embed the page:flowedit.New(path).Handler()is anhttp.Handler, andflowedit.BuildViewis the page's data for a text. A new Chrome job (Editor (Chrome)) drives the page and fails on a console error, a Content-Security-Policy violation or a request off the page's origin. Documented in the new flow editor guide.- New module
github.com/bide-ai/bide/flowedit, the edit engine of the planned flow editor (docs/design/visual-editor.md):flowedit.Applychanges one value, entry or item of a flow config's YAML or JSON text by splicing, so every byte outside the edit is the original byte, comments, key order, flow-style mappings and blank lines survive, and the diff of an edit is the edit. It returns text only afterVerifyre-parses it and checks that its data, key order, untouched lines and comment ownership are the old text with the operation applied; anything it cannot splice safely (an anchor or alias anywhere in the document, merge keys, a repeated key or a key that is not a string, NaN and infinity, a string that is not UTF-8, tags, more than one document or text after the document, mixed line ends, non-UTF-8 text, a document that is not a mapping) is a*Refusaland the text is untouched. A file with CRLF line ends or a byte-order mark is edited exactly as the same file with LF ends. All text leaves through one function that a test pins. Measured over 367 configs and 65,951 operations, 99.2 percent of operations applied and touched only the intended lines, against 18.4 percent for a re-emit throughyaml.Node, with no unverified output in 4.5 million fuzz executions. There is no command yet;bide editfollows. It is not published yet: it joins the published modules whenbide editrequires it. - Signing certificate-bound decisions from the command line, in the approver identity feature.
bide approve -cert chain.pem -identity-policy policy.json(andbide-hsm approvewith a key in a PKCS#11 token or a KMS) signs a decision over thebide.approval.v4bytes with the approver's own key and records it with the certificate chain, to a journal or through the approvals intake (-to). Before anything is signed it compares the key with the leaf certificate's key (the keys, not a signature), checks the certificate is valid now with at least-cert-min-leftleft, and checks the chain against the policy for-as; it reads the chain file before the HSM or KMS is opened, accepts only CERTIFICATE blocks (a private key block is refused unread, at most 8 certificates of 16 KiB), and never falls back to a bare-key decision. It refuses a bare-key decision by an approver the journal says is certificate-bound, and-certby one it says is not; through the intake it checks the gate's identity rule fromGET /pending, answers a 503 (revocation status not available yet) with a retry instruction and checks the returned receipt carries the chain and verifies under the leaf's key. Newaudit.CertDecisionKey. The browser approve page tells a certificate-bound approver to usebide approve -to ... -cert.bide keygen -csr request.pemalso writes a PKCS#10 certificate signing request for the new Ed25519 or ECDSA P-256 key (proof of possession, no names, never overwrites).bide approve -listand the Needs attention list ofbide viewoffer thebide approve -certcommand, with placeholders, to a certificate-bound pending approver (they offered none). The certificate-approvers guide gains a walkthrough from the CA's certificate to an approved call. - The counting rule for certificate-bound approvers in the planned approver identity feature (build step 1; nothing wires it into a gate yet, so no existing policy changes).
agent.CertDecisionVerifieris an optional extension ofApproverVerifier:TallyApprovalschecks a decision by the kind of the approver's verifier, never by what the record carries, and gives the verifier the whole journal and the record's position in it.audit.CertApproverimplements it: a decision counts when it carries a chain and is signed over thebide.approval.v4bytes, a signed head of the run covers it (the smallest covering head fixes the time it became provable, and heads that contradict each other refuse it), the chain is accepted for the approver at that time, and revocation status allows it. The seat is the verified identity (ident:and the canonical identifier), one leaf key fills one seat, and separation of duties excludes a requester by identifier. ADecisionCheckof such a decision carries the finding: identity, tier, basis, status time and when it became provable. Newagent.ReasonNoCoveringHeadandReasonHeadTimes. A gate with a certificate-bound approver needs the identity map to name every approver of the policy, bare-key ones included, and until the gate change is complete a gate refuses a certificate-bound approver at configuration (ErrConfig), so the counting rule is not reachable from a gate yet. Separation of duties also excludes a requester mapped to the decision's identifier through the roster (CertApprover.RequesterIdentity), with a warning on the finding for a requester it cannot map. - Conformance captures of two-tier approver PKIs for the planned certificate-bound approver identity status rule, with true delta CRLs: EJBCA Community 9.6.3 (an RSA-3072 root and an ECDSA P-256 issuing CA) and Microsoft AD CS on Windows Server 2025 (an RSA-3072 standalone root and standalone subordinate on two machines), captured by the manually dispatched workflow
crl-fixtures.yml, checked in underaudit/testdata/ejbcaandaudit/testdata/adcs, and exercised offline by tests that runVerifyChainand the status rule on the real certificates and CRLs, including the base and delta pairing, cumulative deltas, AD CS's ten minute back-dating ofthisUpdateandnotBefore, key compromise, supersession and hold release. NewIdentityPolicy.NotBeforeBackdatedeclares a CA's notBefore back-dating so a 24 hour certificate that spans 24 hours and ten minutes is not refused byMaxLeafLifetime, andStatusParams.MaxStatusAgeForgives an offline root's weekly CRL its own age limit; a CRL with an entry dated more than 30 minutes after its ownnextUpdateis now refused, and a declaredThisUpdateSkeworMaxStatusAgeForthat is negative or over its cap makes the status unknown. - Delta CRL merging for the planned certificate-bound approver identity status rule (build step 1, not yet used by the approval gate, so no behaviour changes).
StatusSnapshot.AddCRLaccepts a delta CRL with a critical DER INTEGER delta indicator; evaluating a chain pairs each delta with the highest qualifying base (RFC 5280 sections 5.2.4 and 6.3.3), reads the merged view as of the delta with the earlier of the two nextUpdate values, treats numbers as one sequence across bases and deltas, reads the listings of every delta that verifies (an unpaired delta gives no evidence of absence), and treats holds as unaccepted by default (a certificate that was ever on hold is refused unlessStatusParams.AllowHolds, which then refuses a decision only inside the hold). OpenSSL-written certificates and CRLs, including overlapping issuance and refusals on real output, are checked in as conformance fixtures (audit/testdata/openssl,gen.shregenerates them).StatusParams.ThisUpdateSkew(andThisUpdateSkewFor, per issuing CA) declares how much earlier than its real issue a CA stampsthisUpdate(Microsoft AD CS back-dates it by about ten minutes): the release of a hold by absence ends at the next CRL'sthisUpdateplus the skew, and a CRL's age is measured from the same moment; zero is never assumed. - Approver identity in the run viewer and the approval commands (build step E3 of the planned approver identity feature; the gate that writes the identity records is a separate step, so no existing gate changes).
bide viewshows, for a gate with a certificate-bound approver, the verified identifier, the certificate's display name, the tier (final as recorded with an independent or log-signer time, or PROVISIONAL), the basis, the status time S, when the decision became provable and a dispute (a keyCompromise voiding back to notBefore) on the run page, in the Needs attention list and in the JSON view; a gate paused for status appears as "paused: identity status unknown", and a call held before execution is listed. Nothing is drawn green or called verified without an audit result the viewer is given: the journal alone gives final as recorded, in a neutral style, and provisional, recorded-but-not-counted, held, incomplete (an identity tally with no record naming it) or policy-mismatched identity are each visibly non-final, so a finished run is never VERIFIED on the gate's word (COMPLETED, or IDENTITY NOT FINAL). A dispute is shown only from an audit result.bide approve -listprints the same and never shows an identity-bound gate as verified or settled.bide approve -verify-receipt(new-identity-policyand-log-key) andbide audit verify-receipts(new-identity-policy) now check a certificate-bound receipt against a certificate policy file at the time the decision became provable, and say that revocation status was not checked. Newaudit.ParseIdentityPolicy(the policy file) andaudit.DecisionReceipt.VerifyIdentity. - The check of certificate-bound approvers' decisions immediately before a gated call runs, and the operator guide, in the approver identity feature (this change turns the feature on for gates: a policy whose resolver returns an
audit.CertApproveris now accepted). One function,preExecute, re-verifies every counted certificate-bound decision of the gate's outcome with the execution ages and sits on every path to the tool: the base tool handler before the call is begun (so the first execution, a resume, crash recovery,RecoverLoopand a middleware retry all pass it) and a plan flow node before its body runs. A decision that is revoked (E <= A(d)) or no longer verifies for good writes an insert-once exec hold (ApprovalExecHoldStep, with the certificate serial,E, reason code and CRL hash) and the next generation is counted, so replacement decisions run the call; status that is missing or stale, or a decision no head covers right now, only pauses (agent.PendingIdentityStatus, no record, no approval notification).audit.CertApprover.VerifyCertExecapplies two tiers by position in the accepted chain: the leaf's issuing CA is judged byExecStatusAge, every CA above it by its ownExecStatusAgeFor, whichValidateConfigrequires withCAPeriodFor,MaxStatusAgeForand the newCAOverlapFor(CAPeriodFor + CAOverlapFor <= ExecStatusAgeFor <= MaxStatusAgeFor); the new values,MaxStatusAgeForandNotBeforeBackdateare in the recorded policy and its digest. NewCertApprover.ExecNow(the execution check's clock),agent.CertExecVerifier,agent.CheckExec,agent.CertRevocationandaudit.ExecLatencyBound. The guidedocs/guides/certificate-approvers.mdcovers declaring the CA's facts from a capture of your own CA, publishing the CRL right after revoking, provisional and final counts, and both revocation latency bounds. - The gate-side records of the planned approver identity feature (build step 1; certificate-bound approvers stay refused at gate configuration,
ErrConfig, until the last change of the feature, so nothing reaches a bare-key policy). A gate with a certificate-bound approver anchors first: a decision that verifies but has no covering signed head makes the gate ask the store to publish one (Reanchorer, at most once per 10 s per run), and "no covering head" is reported only for a decision whose chain, identifier, scheme and signature already verify, so a junk decision never makes the gate sign. It writes phase notes (awaiting-anchor,awaiting-status) and journals, before the tally, the CRLs the count rests on by hash (approval-status:<sha256>, a CRL above 256 KiB goes toCertApprover.StatusArchive) and anapproval-identity:<id>:<generation>record: the policy in force with every verdict-affecting parameter, the roster digest, and for each counted decision its chain hashes, anchor, covering head, time source, tier, basis and status hashes, bound to the tally by a digest of its stored bytes.StatusParams.ValidateandCertApprover.ValidateConfig(includingCAPeriod <= ExecStatusAge/2for the leaf's issuer and a bounded status snapshot or an archive) run when the gate is configured. - A certificate-bound approver's decision can be taken over HTTP and checked before it is written.
agent.WithDecisionCheckandSubmitDecisionnow verify a decision that carries a certificate chain through the approver's verifier (agent.CertIntakeVerifier, implemented byaudit.CertApprover.VerifyCertIntake: the chain accepted for the approver at the time of the write, thebide.approval.v4signature under the leaf's key, status usable now) instead of refusing it, and write nothing on any failure; status that is missing or stale is the newagent.ErrStatusUnavailable. The approvals intake takes the chain in the request (cert, a base64 DER array, leaf first, at most 8 certificates of 16 KiB, bounded before any parsing), answers 503status_unavailablewithRetry-Afterand writes nothing when status cannot be judged, 422 for an invalid or revoked chain or a downgrade (a certificate-bound approver without a chain, a bare-key approver with one), answers a replay of a held decision from the record even during an outage, and anchors after the write.counted: trueon a certificate-bound decision is not final: each decision carriestier,provisionalandbasis, the response carriesanchored,GET /pendinglists the identifier each certificate-bound approver's certificate must carry (gate.identity), and receipts carry the chain.agent.Journal.Reanchorasks the store to publish a head. - Model 15 (
spec/tla/identity) gains a CA tier: the leaf's issuing CA is certified by a root that publishes its own, slower CRL series, may withhold a CRL and may revoke the CA with a past effective time, and the count and the pre-execution check read each tier at its own status age (MaxAgeandExecAgefor the leaf's issuer,MaxAgeCAandExecAgeCAfor the CA, as the two-tierExecStatusAgeFordesign has it).NoExecAfterKnownRevocationis checked per tier (NoExecAfterLeafTierRevocation,NoExecAfterCATierRevocation) byid-ca-tier, and three counterexample configurations fail with the property they guard: a check that reads only the leaf tier, a count that ignores the root, and the leaf aged by the CA tier's longer age. A final verdict also reads the CA tier (a root CRL a window past the decision and none that lists the CA;id-final-ca,final-no-ca-tier), and the tally recheck covers the root archive. The nightly identity state counts in the model 15 README are re-measured. - A Go refinement test for formal model 15 (approver identity),
audit.TestModel15Refinement: each counterexample configuration of the model (spec/tla/identity/regressandlimits) has a scenario that runs the same situation through the real counting rule (agent.TallyApprovalswithaudit.CertApprover, a stdlib CA, signed heads and CRLs) and compares the counted set with what the model's rule gives, so a rule switched off in the model fails with the property it guards and the code keeps the rule on. Each scenario also runs a positive control (the same setup with the rule satisfied) that must count or be final, and the six pre-execution configurations run through the gate's one pre-execution path and the verifier's check, which must agree. A drift guard fails when a model configuration has no scenario (the alias limit is documented, not checked) or a scenario names none.CertApprover.VerifyCertDecisionis marked as model 15'sCount. - Formal model 15 (
spec/tla/identity) checks the approver-identity design's counting rule before its Go code lands: certificates with a holder, an identifier, a validity interval and a revocation effective time, a CRL series with numbers, signed journal heads, and decisions that carry a certificate, under a CA that may mis-issue, a CRL that may be withheld or rolled back, a head stamped out of order, and a decision with an earlierdecided_at. It checksIdentityBound,RevocationSound,FailClosed,NoBackdate,SeatPerPerson,SeatPerIdentifier,TerminalStable,StaleNeverUncounts,NoExecAfterKnownRevocation,FinalNeedsCompleteSeries,AbsenceOnlyInWindow,TallyClean,DeadStaysOutandEventuallyCovered(coverage by a head only, not that the gate then counts the decision), with a pruning CA, a gate crash, two seats under revocation and validity intervals that start late, and each rule has a counterexample configuration that switches it off and fails with the property it guards (no freshness rule, no non-decreasing head times, no name constraints, no series coverage, no gateAnchorstep, no pre-execution status check, noL(C)rule on the live count or the check, no tally recheck, no dead set). Model 1b gains a certificate-bound approver (a leaf whose validity can turn false at any step), the pre-execution status check on every path to the tool (NoExecAfterKnownRevocation, with crashes, redeploys and recovery, also for a path that skips the check), the identity re-ask that lets a replacement decision under another leaf execute after a revocation held the call (ReplacementSupersedes), and the decision relation (approver, verdict, decision time, leaf: two leaves are two decisions, two chains for one leaf are one;NoSquat,OneRecordPerDecision, each of the four fields in the name required by a configuration); its existing configurations are unchanged apart from three constants that default to nothing.modelsyncnow holdsauditVerifyChain,EvaluateStatusandAuditedStore.Reanchorandagent.TallyApprovalsto model 15's map. The models run in their own CI shards. - How a gate with a certificate-bound approver names its tally and asks again, in the planned approver identity feature (no run writes an exec hold yet). Such a gate records its terminal tally under
approval-tally:<id>:ident(agent.ApprovalIdentTallyStep) and treats a plain-name tally that passed as superseded: the call does not run on it,Runreturns*ApprovalPendingwith the newagent.PendingIdentReapproval, and the new count supersedes it. A valid exec hold of generationg(agent.ExecHold) supersedes the passed generation-gtally, so the gate has no outcome until it counts generationg+1underapproval-tally:<id>:ident-reask:<g+1>(agent.PendingExecHoldReapproval); a hold over a denial, with no tally under it, or of another call, generation or format is ignored.agent.RecordedTally, the gate,agent.EvaluateGate, the notifier (new event keyApprovalIdentReaskKey, decided names, journal events),agent.LatestPauseNoteandValidReaskNote(re-ask notesagent.ApprovalIdentReaskStep), the deadline check,planConform, andaudit.ApprovalEvidenceandVerifyApprovals(which now carry the superseded tallies, the holds and the notes) read the chain by one rule. A gate of bare-key approvers is unchanged. A certificate-bound gate whose count passed without excluding the requester refuses withErrConfigif the policy then excludes it. A certificate-bound gate is also never counted with bare keys: whether a gate is bound is read from its journal (an identity tally, an exec hold, or a note withidentity_bound) as well as from the policy, and a policy that lost the certificate-bound approvers or changed their kinds is refused withErrConfig. The dead end of separation of duties turned on after a bound count wraps the newagent.ErrGateNeedsNewRun. A plan flow gate no longer takes a pass from a plain-name tally, andSupersededTallieslists the whole chain. - The certificate-bound decision format of the planned approver identity feature (build step 1; the gate does not use it yet, so no behaviour changes for bare-key approvers).
agent.ApprovalDecisionBytesCert(bide.approval.v4) is the v3 layout plus the SHA-256 of the signer's leaf certificate (agent.CertLeafHash);agent.Decision.Certand the record memberapprover_certcarry the leaf-first chain (at most 8 certificates of 16 KiB),SubmitDecisionjournals it and adds the leaf hash to the decision's step name, andWithDecisionCheckrefuses a decision that carries one until its verifier exists. A bare-key verifier never counts a v4 signature.audit.DecisionReceiptgainscert;Verifyrefuses a receipt that carries a chain (audit.ErrCertificateBound), and the newVerifyCertificate(ci, logKey)checks the chain and identifier at the time of the head the receipt's own anchoring proof carries (AnchorTime), then the signature under the leaf's key. A decision's identity includes its leaf inWithDecisionCheckandHeldDecisionStep.
Changed
docs/KNOWN-LIMITATIONS.mdno longer says that nothing in the approval gate uses certificate-bound approvers (it does, since the gate change), and the certificate-approvers guide links the "A person with two identifiers fills two seats" entry through its section, Approval and quorum.- The run viewer guide's approver identity screenshots now come from records the real certificate-bound gate writes (a real audit.CertApprover on the agent runtime, in a test that runs only on request: cmd/bide/internal/identitydemo), not hand-written ones, and show only states the gate produces: a log-signer-clock final count, a provisional live count, a gate paused for revocation status, one waiting for a covering signed head, and a call paused before execution for current status. The viewer reads the identity records' RFC 3339 times with trimmed nanoseconds (they showed as "not a canonical time") and shows a counted gate whose newest phase note says exec-hold, with no hold record and no result, as paused for current status rather than final. The Needs attention list shows the bare-key approve command only for bare-key approvers and says so (and shows none when every pending approver is certificate-bound), and the demo test reads each run back and fails unless it is the state its caption says.
docs/ROADMAP.mdnow lists only work that is not done: shipped items (approval deadlines, HSM and KMS key custody, signed releases and SBOMs, the notifier, the checked formal models, the mechanized gsm theorems) are removed, approver identity is marked in progress, and the visual builder listsbide editas in progress.- The certificate verification core in
audit(IdentityPolicy,CertIdentity,ApproverCert,CertError,SPKIHash, the canonicalizer types) and theagentreasonsReasonNoCert,ReasonCertChain,ReasonCertIdentity,ReasonCertUsageandReasonCertWindoware no longer labelled "building block, not yet used by approval gates" in the SDK API reference and the stability page: since the gate change for certificate-bound approvers, approval gates use them, so they carry their packages' label (core).audit/rfc3161keeps the building block label, since no gate or command calls it.
Fixed
scripts/release.shno longer asks proxy.golang.org about a new module tag until the tag can be fetched directly (GOPROXY=direct, withGOSUMDB=off, so a miss caches nothing) and 300 seconds have passed since the push, then waits with growing intervals (5, 10, 15, 15 minutes) for at most 90 minutes (PW_SETTLE,PW_STEP,PW_MAX;scripts/proxy-wait.sh, also used byscripts/module-sbom.sh). In the v0.18.0 release every stage failed with "does not resolve": the proxy caches a miss for 30 to 60 minutes and polling every 30 seconds kept it fresh, so themodule-sbomjob gave up three minutes before the last module resolved.release.ymlnow gives that job a 270-minute timeout and--wait 240.- The store/sqlite write-fairness tests no longer fail on a heavily loaded machine: they start every writer queued on the file's gate and read the commit order from the file, instead of timing goroutines. Test change only; the internal write gate gains a
Waitingcount that the tests use, and its behavior is unchanged. - v0.18.0 did not publish the module set SBOM (
bide_0.18.0_modules.sbom.json) that its release notes described:scripts/module-sbom.shwrote the file relative to the temporary module it changes into, so the release workflow's signing step did not find it. The script is fixed in #343; the v0.18.0 release notes anddocs/trust/verify-releases.mdnow say that v0.18.0 has no module set SBOM, and the next release carries it.
0.18.0 - 2026-10-16
Added
- Generated SDK API reference:
docs/reference/api/lists every exported constant, variable, function and type of every package in the published modules (the core module one page per package, every other module one page), each with its declaration and the first sentence of its doc comment, a pkg.go.dev link and a stability label (core, experimental, or building block, not yet used by approval gates, the last foraudit/rfc3161and the certificate verification core inaudit). It is generated from the Go sources with the standard library only byinternal/tools/apiref;TestAPIReferencefails when a page is stale (go test ./internal/tools/apiref -run TestAPIReference -updaterewrites them), when an exported symbol has no doc comment, or when a package has no label, andTestStabilityPagefails when the new package table indocs/trust/stability.mddiffers from the labels the generator uses. The docs site lists the reference in its Reference sidebar. - Approval deadlines:
agent.ApprovalPolicy.Timeout(andtimeoutin a plan config'sapprovalblock) gives a gate a deadline, measured from the gate's recorded request and recorded once asapproval-deadline:<call>(agent.ApprovalDeadline,agent.RecordedDeadline), so a redeploy does not move it. A gate past its deadline with no terminal count records its expiry as its outcome, insert-once under the name a passing tally or a single decision would take (ApprovalTally.Expired,ExpiresAt), so an expiry and a passing tally cannot both be recorded: the call never runs (the model readsagent.ExpiredResult; a plan flow returnsplan.ErrApprovalExpired, which wrapsplan.ErrApprovalDenied), a decision recorded after the deadline never counts (agent.ReasonLate), andSubmitDecision,Approve, the approvals endpoint (stateexpired,expires_at) andbide approverefuse a decision past it (agent.ErrApprovalExpired).agent.EvaluateGatereportsExpiredandDeadline. The notifier sendsapproval_expiredand closes the pending approval with the reasonexpired. A decision written before a plan flow gate's request no longer blocks a single-approval gate:Approverecords the real decision under the gate's second name, which the gate honours. Model 1b gains the expiry (ExpiredNeverRuns,LateNeverCounts,ExpiryAfterDeadline,OutcomeOnce, configurationsap-deadline-m-crossandap-deadline-one-cross, regressionap-late-counts). Journal format: one new record name, and the tally and policy encodings gain optional fields, with no format version change before 1.0. - Two run viewer guide screenshots show approval deadlines: the Needs attention list with an overdue gate, one due soon and one due tomorrow, and a run whose gate expired.
assets/demo/shots-deadline.shregenerates them from a small journal thatassets/demo/setup/deadline.gowrites with the real agent runtime and a controllable clock. - Two runnable examples and the guide detail the v0.17.0 docs audit found missing.
examples/intakemounts the approval intake (WithGatePolicy,WithAuthbinding a bearer token to its approver,WithPage,OnRecorded) over an audited journal, takes a 2-of-3 refund gate with separation of duties through it, and checks the returned receipt against the signed heads;examples/notify-routingruns the notifier with routing by kind and approver, an escalation to a lead when on-call's endpoint is down, an all-clear, and a trail signed as it is written, and verifies it withaudit.VerifyNotifications, which passes, fails on a trail with a record removed and reports the late acknowledgement. Both are in the root module, run offline and are tested. The approval guide now namesWithRateLimit,WithGlobalRateLimit,PageFiles,PageSHA256,Handler.Wait,EvaluateGateandGateReask; the key custody guideawskms.Config.GrantTokensandazurekv.Config.HostSuffixes; the notifications guide the open trail andWithNotifyUpgradeWindow; the recovery guide thatRecoverLoopre-signs runs waiting on a decision; known limitations whatpostgres.WithoutMigrationdoes not check; Concepts the decision receipt; the READMEbide migrate; and the examples index the Azure Key Vault path ofhsm-signing. - The viewer and the read-only builder tools show approval deadlines and separation of duties.
bide viewshows a waiting gate's deadline and the time left, an expired gate asexpiredwith its deadline, and a decision written after the deadline as not counted (Gate.ExpiresAt,Timeout,Expired,Overdue,Due;runview.MarkDeadlines); the Needs attention list puts gates with a deadline first, nearest first, flags one due within the hour, and marks a gate past its deadlineOVERDUEwith no approve command, since it refuses decisions;bide approve -listshows the deadline too.bide view -config,plan'sRenderMermaid(which now labels a gated node with its gate) andbide check -diffshow each gate'stimeoutandexclude_principalnext to its need and approvers (plan.TopologyGate.TimeoutText), and-diffclassifies a timeout change: adding or shortening one is strengthened (the gate fails closed sooner), removing or lengthening it is weakened (a run can wait longer, and a late decision counts), and-fail-on-weakenexits 1 on the latter. audit.IdentityPolicyandCertIdentity.VerifyChain: the certificate half of the planned certificate-bound approver identity (build step 1, not yet used by the approval gate, so no behaviour changes). Given a decision's leaf-first chain, the time the approver signed and the time the decision became provable, it accepts exactly one chain from the policy's trust anchors through pinned intermediates, with the extended key usage nested along the chain, an algorithm and key profile (RSA 3072 or better, ECDSA P-256 or P-384, Ed25519, ML-DSA-65; never SHA-1), per-keyDistrustdates, one subject alternative name of the configured kind (an opaque person URI, or an email only by explicit choice) in a strict canonical form, a required certificate policy, and a leaf key whose scheme is derived from the certificate. Certificate policies nest along the chain (a CA that maps policies is refused, andRequirePolicyOnCAsoptionally refuses an issuing CA with no policies), the leaf's key and extended key usages are exclusive, leaf lifetime and the proof-window tolerances have ceilings, and chains that differ only in certificates for the same keys (a renewed root) are one chain. Failures are*audit.CertErrorcarrying one of the newagent.ReasonNoCert,ReasonCertChain,ReasonCertIdentity,ReasonCertUsageorReasonCertWindowand the precise cause. Revocation status, the v4 decision bytes and the gate wiring follow in later changes.audit.StatusSnapshotandCertIdentity.EvaluateStatus: the revocation half of the planned certificate-bound approver identity (build step 1, not yet used by the approval gate, so no behaviour changes). A snapshot reads CRLs and refuses what bide cannot read without guessing (issuing distribution points, indirect CRLs, critical extensions it does not process, SHA-1 signatures, a missing CRL number or nextUpdate, duplicate extensions, delta CRLs for now); a snapshot can be bound to its issuers (the signature is checked before the entries are built), is size-limited and evicts its oldest CRLs; evaluating an accepted chain checks every non-anchor certificate against CRLs that verify under its own issuing CA, computes the effective revocation time (the earlier of the invalidity date and the revocation time, retroactive to notBefore for a compromise with no invalidity date, with an optional grace for routine reasons), treats a listing in any CRL of the series as a revocation from its time on, reads absence only from CRLs issued after the decision and no later than the first CRL beyond notAfter, ignores status signed by a distrusted key, and reports a tier (no information, provisional, final: status reaching A plus the window over time coverage from the CRL in force at A, with L(C) needed only once the status falls after notAfter, and coverage shown by the CA's declaredCAPeriodrather than by nextUpdate) with the window, the CRLs relied on and the caveat that later reports are not covered. Newagent.ReasonRevoked,ReasonStatusUnknownandReasonStatusStale. A finding is verified only whenIsFinal(); itsBasissays what it rests on, and a live count (CountLive, never implied byNow) is provisional at most. A snapshot can be unbounded for audits and counts its evictions.- Each release now signs every SBOM and publishes one more. Each archive's SPDX SBOM gets its own keyless cosign signature (
<archive>.sbom.json.sigstore.json), andbide_X.Y.Z_modules.sbom.json(with its.sigstore.json) is the SBOM of the published Go module set: what an application gets withgo get, built by the newscripts/module-sbom.shfrom the release's consumer module (the core, every library, the commands as tools) resolved only through the public Go proxy, and checked to list every published bide module at the release's version. The release workflow'sverify-signaturesjob verifies each per-archive SBOM's signature, and a newverify-module-sbomjob verifies the module set SBOM's.docs/trust/verify-releases.mdshows how to verify the SBOMs and use them (grype, a CycloneDX conversion for Dependency-Track). The actions in the release jobs that can sign (cosign-installer, the syft installer and goreleaser-action) are pinned by commit SHA. - A retention and archiving guide,
docs/guides/retention.md, for the people who set a bank's retention policy and the operators who carry it out: the questions a policy has to answer, what each artifact is (journals, evidence packages, signed tree heads and anchor entries, decision receipts, notification trails including the open trail's segments, seals, checkpoints and yearly indexes, relay state, keys) and which of them to keep, how to archive them sobide auditstill verifies them offline years later (a manifest, the pinned verifier and the formats it reads, what each verb needs), how to rotate and retire keys without breaking old verification, what deleting does against the position-based detection of deletion (checked against a real journal: whole runs can be removed consistently, records and open-trail segments cannot, and bide ships no redaction), and storage on write-once media. It names no regulation as satisfied, and points to the approver-identity design (#302) for certificate and revocation-list archiving, which is not implemented. Linked from the trust pages, the docs index and the docs-site sidebar. - New package
audit/rfc3161: a strict, standard-library-only verifier for RFC 3161 time-stamp tokens, the independent time source that the approver identity design requires for gates above the top tier; it reads one narrow DER profile (oneSignerInfo, SHA-256 or better, ECDSA P-256/P-384, RSA of 3072 bits or more, or Ed25519, thecontentType,messageDigestandsigningCertificateV2signed attributes, a critical time-stamping-only TSA certificate chained to the auditor's anchors atgenTime) and refuses everything else with a namedReason, checked against OpenSSLtsand DigiCert tokens, differentially againstopenssl ts -verify, with a negative vector per refusal, a fuzz target and a fixed mutation budget; it is not called by any command or gate yet, and tokens from DigiCert, GlobalSign, QuoVadis, SSL.com, Microsoft and SwissSign verify by default, tokens from Sectigo, Entrust and FreeTSA (SHA-1signingCertificateonly) verify only with the opt-in, off-by-default per-TSAPolicy.AllowESSV1(the result is labelledESSV1), and Apple's (SHA-1 digest algorithm) never.
Changed
- Documentation catch-up for the unreleased approval deadlines and gate diff work.
docs/GUARANTEE.mdnow states the expiry rule (a gate with aTimeoutreads its request time and the run's clock; the expiry is insert-once like a pass, so whichever outcome is recorded first stands; an expired gate never runs its call; a decision after the deadline does not count; a recorded deadline is not moved by a redeploy),docs/CONCEPTS.mdgains an approval deadline entry, the tour and its four translations gain a deadlines paragraph and the weakened-policy list forbide check -diff, the translated READMEs match the English run viewer entry, the refund recipe and getting started mention deadlines,SECURITY.mdmentions the signed SBOMs, andexamples/approval/flowsetstimeout: 48hon its gate (with a test that the deadline is recorded). The godoc ofaudit/rfc3161andaudit.IdentityPolicynow says no gate uses them yet. - The four translated READMEs now carry what the English README has: the Run viewer entry with its Needs attention list, the paragraph on deciding from a terminal and checking that people were told (with decision receipts and
bide audit verify-receipts), and the CLI reference and module structure links; and the English tour and its four translations have a stop each for separation of duties (ExcludePrincipal),bide approveand notifier routing and escalation, scoped like the guides they link. Documentation only. agent.Notifieris now documented to be called from several goroutines at once, and a custom Notifier must be safe for concurrent use. The engine has always run the rounds of different events concurrently (up to eight at a time, and an event alongside the steps of its escalation chain), so a Notifier that keeps an unguarded counter, map or buffer has a data race; check yours and guard its state with a mutex or atomics. One event still has at most one call in flight, except that a call abandoned at its time limit may still be running when the next is made. bide's own notifiers (notify.Webhook, the relay's Slack and PagerDuty sinks) hold no per-call state and are tested under the race detector with concurrent calls.- The run viewer guide's expired-gate screenshot now shows the approvers and the timeline of a gate that expired while a second approval, stamped before the deadline, was written after the expiry, which the page labels "not counted: written after the gate expired";
check -diff -checkhas a light screenshot beside the dark one, embedded in the run viewer and plan flows guides with<picture>.assets/demo/cli.shtakesTHEME=lightandONLY=<shot>and writes optimized PNGs, andassets/demo/setup/deadline.gowrites the late-written decision.
Fixed
- The approve page's DOM tests (approvals/page/test) no longer sleep a fixed 200 ms for the page to load the call: they wait until the page shows the call or says why not. On a slow Windows runner the fixed sleep ended before the page had rendered, which failed the check that every argument is on display once in CI; the page itself was not at fault and ships unchanged.
bide check -diffcloses four gaps in how it comparesassertlines. An assert line that held and now holds only vacuously (no terminal, or no path to its node, as when a new edge makes the flow cyclic) is reported as weakened;plan.AssertionResultgainsVacuous(set for such a hold, with a message saying why), andbide view -configshowsholds vacuously. A line written twice is one assertion, with one weakened entry and one change line. Respelling a node name in quotes (or spacing) is no change in any assertion form, where only the approval form was recognised before (plan.CompareAssertions;plan.RenameAssertionwrites a line with its node names renamed and quoted). A node renamed together with its assert line is a rename, not a removed assertion: the line follows the node the diff pairs as renamed, is still decided under the new name, and a rename the check is not sure of (its edges changed too) still reads as removed.bide check -diff(andplanview.CheckDiff) now reports weakenings it missed, and-fail-on-weakenexits 1 on them. Behaviour change: a node that may have an effect (safetyside_effect, or not stated) and is reachable without an approval gate, when it was not such a node before, is now a weakening, whether through a new arm around a gate, a gate removed upstream, a raised or droppedsafety, or as a new node, so a config that leavessafetyout will see-fail-on-weakenfail on new or changed unknown-safety nodes; statesafety: readonlywhere it holds (the example refund flows now do). Also reported: anassertline removed or loosened (an approval assertion with a lower K, a larger N, or withoutexcluding the requester; a tightened one is a strengthening); a Switch arm condition changed beside an arm that leads to an ungated effect (predicates are not readable, so it asks for a review); and, without aplan.Registry, a block changed on an ungated effect node. A node renamed with the same block, safety and edges is reported asrenamed(with its gate change, if any), not as a removed node and a new one.DiffViewand eachChangegain aweakeningfield (gate,path,block,conditionorassertion), the page's verdict readsSAFETY CHECK WEAKENEDwhen no gate policy itself was weakened, andplangainsCompareAssertionsandConfigReport.UngatedPath.bide check -diff(andplanview.CheckDiff) now reports anassertline that the new config keeps as it was but that no longer holds as a weakening: a line that held in the old config and is now violated (with the counterexample path), cannot be decided, or no longer reads makes-fail-on-weakenexit 1 and the page read SAFETY CHECK WEAKENED. Before, only a removed or loosened line was reported, so a new arm around a gate leftevery path to charge passes approval >= 2 of 3as written and false, and the diff said nothing. A line that did not hold before is not reported.bide check -diff -fail-on-weaken(andplanview.CheckDiff) now exits 1 when a change makes a node reachable around an approval gate whatever the node'ssafety: any node that every path reached through an approval gate before, and that some path now reaches without one, is reported as weakened, with the node, its safety and the shortest ungated path. Before, only nodes labeledside_effector not stated counted, so anidempotentnode that moves money, or the same edit relabeling the nodereadonlyand adding the bypass, exited 0. Asafetymoved toward read-only (side effect or unknown to idempotent or read-only, idempotent to read-only) is itself reported as weakened (Change.Weakeninggainssafety), the old label counts as well as the new one in the effect checks (the new-effect rule and the Switch-arm rule), and a node renamed together with a safety change is still paired as the same node and judged on both; a new node that shares a removed node's block and kind is also judged against it, and a new node reachable without a gate that uses a block every node used only behind a gate before is reported whatever its name and label. A configuration that wires a read-only node in around a gate will now see-fail-on-weakenfail where it did not.docchecknow checks that every relative link inREADME.md,examples/README.mdanddocs/names a file that exists and, with a#fragment, a heading that exists (doccheck -linksruns only this, on every pull request including documentation-only ones, because the docs site setsignoreDeadLinks). It found two broken links, in the notifications and approval guides, now fixed. The trust page on stability now names evidence formatbide.audit.evidence.v6(it said v5), states that a v5 package still verifies, and lists the decision receipt and notification trail export tags; the v0.17.0 release notes no longer say the approval intake requiresWithAuth(onlyWithPageandWithCORSdo),approvals.New's godoc says thatWithGatePolicyis required, and the docs index and README link thebide-hsmreference and list everybidecommand.- A notification call that had returned could still be counted as in flight for a moment, so a retry made at once in the same round was refused as "an earlier call was abandoned" although nothing was abandoned. The attempt was lost: the sink saw one call fewer than the round made, and a sink that fails a fixed number of calls then failed a later, unrelated notification instead (seen on Windows, where it made a test see an all-clear delivered twice, the first attempt having failed). The engine now records that a call is over before it hands the answer back, so the next call is never refused spuriously; a call that really is stuck is still not repeated until it returns.
TestStartFailureStopsTheCommand(thebide sampletest helper) could fail on a loaded runner with "1 bide sample command(s) still running after the failed start": its running count was decremented by a deferred call that runs after the exit status is sent, so the test could read the count in between. The count now drops before the status is sent. Test code only.- The
bide sampletests (TestServe,TestLive) waited 20 seconds for the viewer to come up, which a loaded Windows runner did not always meet, and on that failure leftbide samplerunning over the test directory, so its cleanup failed with a sharing violation onsample.db. They now wait up to two minutes for the printed address, and every path stops the command and waits for it to return before the directory is removed; a test covers the failed start. - The SQLite store's and the shared store suite's timing assumptions no longer break on a slow disk: the lease-under-load test sizes its TTL from the commit time it measures and tells a disk stall from a starved renewal, the suite's "writes inside a Runs loop" deadline scales with the store's measured write cost (a shared Windows runner took 30ms and more per commit, which exceeded the fixed one minute), and
docs/KNOWN-LIMITATIONS.mdand theAcquireLeasegodoc now say that a lease TTL must exceed the disk's worst commit latency, since a renewal is a committed write that cannot finish faster than the disk. - Two places released a resource after handing the result to a caller that could act on it at once.
audit.AuditedEventStoreheld a trail's slot until a deferred release ran after the head's answer was sent, so a caller that published the next head right away could find the slot taken; the slot is now released before the answer.agent.RecoverLoopcalled theWithRecoverErrorshandler while the failing run still held its slot and in-flight mark, so a handler that waited on other work (with a smallWithRecoverConcurrency) stalled it; the handler now runs after both are released. A new repository check,internal/tools/sendcheck, fails the Lint job when a goroutine sends or closes a result and only then runs a deferred decrement, release or unlock, with an allowlist for the orders that are safe, each with its reason. A flush of the notifier (FlushNotifications,RunNotifier.Flush) called from inside theWithNotifyErrorshandler used to wait for the round that was calling the handler, a deadlock; it now returns an error wrappingErrConfigat once, and theWithNotifyErrorsgodoc and the notifications guide say the handler must be short and must not flush. bide check,bide view -configand the YAML flow of abide initproject now refuse a YAML flow config that holds more than one document (errormore than one YAML document), where the converter read the first document and silently ignored the rest, so a second flow or policy in the same file was read by no check and no loader; the JSON path already refused data after the value. This is a behaviour change: a multi-document YAML flow file that was accepted is now an error, and a leading---with a closing...is still one document. Programs that convert YAML themselves (as the scaffold did) should decode with ayaml.Decoderand require the next decode to returnio.EOF.
0.17.0 - 2026-10-15
Added
agent.EvaluateGatesays where an approval gate stands on a call (waiting, decided, single, ungated, or misconfigured, with the tally, the classification of each decision and why a gate asks again), reading the journal, the live policy and the approver verifiers exactly as the agent's own gate does: the gate's counting is now one function (countGate) used by both, andagent.GateReaskis the rule for a recorded tally the gate supersedes.bide viewusesGateReask. No behavior of the gate changes.- Separation of duties for m-of-n approval gates:
agent.ApprovalPolicy.ExcludePrincipal(a flow config'sapproval: {..., exclude_principal: true}) makes the gate never count a decision by a requester of the run, its journaled principal (Identity.OnBehalfOf) or that of any run above it (a sub-agent's, a delegation's, a flow started from a tool), compared ignoring ASCII case, withagent.ReasonRequester; the tally recordsExcludePrincipal,Requestersand the excluded approvers inExcluded, and the gate refuses withErrConfiga run with no requester or an ancestor that records none, a requester that is not printable ASCII, a principal journaled after the call's request (a run an earlier version started), or a policy whoseNeedis out of reach without the requesters; a passing tally recorded without the exclusion does not decide a gate whose policy now excludes the requester (it asks again,agent.PendingSoDReapproval, and recordsagent.ApprovalSoDRetallyStep), and a recorded excluding tally must name the run's requesters. A run's first drive now recordsrun:principal(agent.RunPrincipal: its principal and its ancestors', nothing of its input) beforerun:start, which also records the ancestors (RunStart.Ancestors);plan.Flow.Runnow takesagent.WithIdentity(any other run option isErrConfig), and a plan flow run journals the principal of that identity, or of the one its context carries, and a later flow drive under another principal isErrConfig(a flow run recorded with none, as every earlier one was, keeps none).audit.ApprovalEvidencediscloses the run'srun:principal(not itsrun:start) for such a gate,audit.VerifyApprovalsrecounts with the same exclusion (ApprovalVerdict.Requesters),bide audit verify-approvalsandbide viewtake-exclude-principal,bide approverefuses a requester's decision and counts under the exclusion,bide viewmarks a requester's card as excluded, the approval notification lists the excluded approvers (approval.excluded), and a config diff reports dropping the exclusion as a weakened gate, the flow assertionevery path to X passes approval >= K of N excluding the requesterchecks it on the graph, model 1b checksSeparationOfDutiesup a delegation chain, andexamples/approval/makercheckerruns a maker-checker refund. New exported API:agent.RunPrincipal,agent.ApprovalSoDRetallyStep,agent.SupersededTallies,agent.PendingSoDReapproval,agent.SameApprover,agent.NotifyApproval.Excluded,agent.RecordedPrincipal,agent.IsRunPrincipal,agent.ReasonRequester,agent.ReasonNoRequester,plan.TopologyGate.ExcludePrincipal. - A gate that asks again over a recorded tally it does not act on (one that predates
bide.approval.v3, or one that passed without excluding the requester under a policy that now excludes it) records a re-ask note,approval-pending:<id>:v3or:sod(agent.ApprovalReaskStep): anagent.ApprovalWaitwith the policy it asks under, why (Reask) and the tally it asks over (Supersedes), written only if absent by every drive that pauses at the re-ask.bide view,bide approve, the approvals intake's note fallback, notifications andaudit.ApprovalEvidenceread the newest note (agent.LatestPauseNote), so after a redeploy addsExcludePrincipaland a crash leaves a passing tally under the old policy, the CLI and the viewer show the gate waiting for the re-approval and take the approvals it needs. A re-ask notifies as an event of its own (agent.ApprovalReaskKey,NotifyApproval.Reask,reaskin the webhook payload),audit.ApprovalVerdictgainsReaskandReaskedAt, andplan.Flow.Conformaccepts re-ask notes. A re-ask note counts only where the journal proves it (agent.ValidReaskNote: a recorded tally the gate would ask again over, which the note names), so a note pre-inserted by a journal writer without approver keys is ignored by every reader, and the notifier's catch-up scan, escalations andagent.JournalNotifyEvents(soaudit.VerifyNotifications) keep the re-ask's own key and question. The record is additive: earlier readers ignore it, except an earlierConform, which reports it as unexpected. - The approval intake has a browser page: an approver opens a link from a notification, sees the call, and signs a decision with an Ed25519 key held non-extractable in the browser (WebCrypto, IndexedDB). The page computes the SHA-256 of the canonical arguments itself from what it displays and signs that, signs nothing if the call or its gate changes between the display and the signature, and checks the receipt the endpoint returns.
approvals.PageFilesandgo run github.com/bide-ai/bide/approvals/cmd/approvepagegive a deterministic bundle with published hashes for an organization to host on an origin of its own;approvals.WithCORSlets that origin call the intake (the preflight is answered before authentication);approvals.WithPageserves it from the application for development and says so on its face. Both needWithAuth. The canonical-arguments encoding and the decision bytes have golden vectors generated by Go (agent/testdata/canonical_args_vectors.json) that the page's script is tested against. The page shows every argument (none is clipped), shows a re-asked gate's reason, and offers no decision on a gate the endpoint reports aserror,singleordecided; its requests carry the page origin's credentials, andconfig.jsoncan ask forincludewithapprovals.WithCORSCredentialsfor a cookie or a client certificate cross-origin; the CORS preflight is rate limited and answered without waiting for a body; the browser's CSP block of a changedconfig.jsonintake is reported. Passkeys (WebAuthn) are a separate, later design; gates for high-value actions should wait for them. A CI job (Page mTLS (Chrome)) drives the page in real Chrome on Linux with a TLS client certificate, same-origin and cross-origin with credentials include (approvals/page_mtls_test.go). - Package
approvalsis anhttp.Handleran application mounts to take approvers' signed decisions over HTTP:GET /pendingshows a gated call from the journal (tool, arguments, the arguments' SHA-256, the gate), andPOST /decisionsverifies a signed decision against the recorded call and the approver's enrolled key, then records it through the application's own journal, so anaudit.AuditedStoresigns it as it is written, and answers the gate's standing (from the gate's recorded tally once it has settled, with separation of duties honored), whether the decision counts, and its receipt.WithGatePolicyis required and gives the handler each tool's live policy; the handler evaluates the gate with the newagent.EvaluateGate, the function the agent's own gate evaluates with (a gate the gate would refuse is stateerrorand409 gate_misconfigured, a one-decision gate is statesingle), so a policy changed after the first pause (ExcludePrincipalturned on) is honored and the new approvals are not refused asnot_waiting. A gate that asks again (its recorded tally passed on decisions of an earlier format, or without excluding a requester the policy now excludes) iswaiting, not decided. Every response sent without reading a request body (a refusal, a 404 or 405, a GET that carries one) closes the connection instead of waiting for the body, and every path, those that route to nothing included, is rate limited; IPv6 clients are limited by their /64; the authorization hook's two calls for a POST are told apart byAccess.Phase. A POST is authorized from its headers before its body is read, the body is read in a bounded pool under a deadline, and only then does the request take a slot for work on the journal; requests are strict JSON, size-bounded, rate limited per client and overall, and capped in concurrent work;WithAuthtakes a mutual-TLS or identity check; a replay is a no-op;OnRecordedruns once for the request that wrote the decision and whose record the gate counts (a randomized signature can journal one decision twice under a racing retry; the duplicate is superseded), to re-run the run. It addsagent.DecisionStep(the journal name of a decision),agent.RootRunID, andagent.ReportWritten(an option forSubmitDecisionthat says whether this call's insert stored the record, so of concurrent identical submissions exactly one acts). Single-approver gates and plan flow node gates are refused. audit.DecisionReceipt(formatbide.audit.decision-receipt.v1,audit.ReceiptFormat) is the signed decision an approver keeps, with the journal record's name and position and when it was recorded, and no key material:NewDecisionReceiptmakes one,Verifychecks it on its own, andaudit.CheckReceiptdecides whether the signed tree heads of the journal commit to the decision, asanchored,redacted (anchored),pending,receipt not matched by the journal,decision deleted after signing(only for a receipt with an anchoring proof,AnchorReceipt) orunchecked, by the receipt's journal position and never by time.bide audit verify-receiptsruns it from files and, with-update, stores the anchoring proof in each receipt, andbide approvewrites a receipt for each signed decision (-receipt) and checks one with-verify-receipt.audit.ErrRootMismatchis a new sentinel wrapped by the error of a proof whose signed tree head's root is not the root of the run's journal (the message is unchanged);bide demouses it to explain a failed verification in plain words.bide-hsmtakes anazurekv:https://<vault>.vault.azure.net/keys/<name>/<32-hex-version>key reference for an approver key in Azure Key Vault or Managed HSM: the version is pinned (a base identifier, a port, credentials, a query, a fragment, an upper-case host or a host outside the Azure public, China and US Government Key Vault suffixes is refused, and the error repeats no value from the reference), the key is ECDSA P-256 (-alg ed25519is refused), only an HSM-protected key is used unless-allow-software-key, and credentials are the Azure SDK's default chain. Tested against the Azure SDK's fake Key Vault server in the test-only modulecmd/bide/bide-hsm/azuretest, never against Azure.bide-hsmtakes agcpkms:projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>key reference for an approver key in Google Cloud KMS: the numeric version is pinned (an alias,latest, a query or a malformed name is refused, and the error repeats no value from the reference), credentials are Google's application default credentials, only an HSM-backed version is used unless-allow-software-key(Cloud KMS has no HSM-backed Ed25519 key, andbide-hsm approvesays beside the key when it is at protection level SOFTWARE), and-verify-attestationrequires the version's Cloud HSM attestation. Tested against gcp-kms-emulator v0.10.0 in the test process (in the test-only modulecmd/bide/bide-hsm/emulatortest, which keeps the emulator out of bide-hsm's module graph), never against Google Cloud.bide-hsm, a companion tobide approvefor approvers whose signing keys are in an HSM, on a smart card or token, or in AWS KMS:bide-hsm approveis the same command (one implementation of the display, confirmation, signature, record and receipt) with-keynaming the key by an RFC 7512pkcs11:URI or anawskms:key ARN, andbide-hsm pubkeyprints the-approver-keysentry that enrols it. References are parsed strictly (a PIN in the URI, an unknown attribute or a repeated one is refused, and no error repeats a value from the reference), the PIN comes from a file, an environment variable or a prompt on the controlling terminal (never a pipe), the token's own PIN pad (pin-source=protected), and a PKCS#11 key the token does not mark non-extractable is refused unless-allow-extractable. It is its own module undercmd/bideand needs cgo for PKCS#11 keys, so thebidebinary stays pure Go and reproducible; it is installed from source (go install github.com/bide-ai/bide/cmd/bide/bide-hsm@latest), not in the release archives, and is tested against SoftHSM2 and a fake KMS client only.bide approverecords your signed approval, or with-rejecta rejection, of a call that waits at an approval gate: it reads the run, tool, arguments and gate from the journal (SQLite-db, or Postgres by-postgres-env), shows the SHA-256 of the arguments the signature binds, asks you to confirm (it will not sign arguments longer than its view unless-fullshows them all), signs with your Ed25519 key and records the decision withagent.SubmitDecision(agent.Approvefor a single-approver gate, unsigned). It refuses a call with no waiting gate, a gate already decided, an approver not in the policy, an approver who already decided, and on Unix a key file readable by group or others; an m-of-n decision requires-approver-keys(the enrolled public keys, the filebide viewreads), refuses a key that is not the one enrolled and verifies the tally, and-unverifiedopts out with a warning and an unverified tally.bide approve -listlists the waiting calls with the command that decides each, andbide keygencreates an approver key pair (mode 0600, never overwritten;-algpicksed25519,ml-dsa-65or theed25519+ml-dsa-65hybrid) and prints the public key policies and verifiers read. Both commands hold the key as anaudit.Signer.bide approve -to <url>(andbide-hsm approve -to) decides through an application's approval intake (approvals.Handler) instead of writing a journal: it fetches the pending call from the endpoint, shows it, signs the digest of the arguments it computed from what it showed (and refuses an endpoint whose own digest differs, or whose tool, arguments or gate differ after the confirmation), and posts the decision, so the application records it through its own journal and its audit log signs it as it is written. A decision the endpoint says does not count is a failure, as in the local flow. The URL must be https (http only to loopback), a redirect is not followed, and-tls-ca,-client-certwith-client-key, and-token-envcover a private CA, mutual TLS and a bearer token. The endpoint returns the decision's receipt, which the command checks against what it signed, and refuses if it carries an anchoring proof, before writing it.auditsigns and verifies with ECDSA P-256 (ecdsa-p256,audit.ECDSAP256Signer) beside Ed25519, ML-DSA-65 and the hybrid, for the HSMs and cloud KMS (AWS KMS, Azure Key Vault, PKCS#11) that cannot sign Ed25519: SHA-256 over the message, a 64-byte low-Sr || ssignature (a high-S or non-canonical one is refused), and a 65-byte uncompressed SEC1 public key writtenecdsa-p256:<hex>, withECDSAP256SignatureFromDER,ECDSAP256SignatureFromRawandECDSAP256PublicKeyFromSPKIfor adapters; it works for approval decisions, tree heads, evidence, run certificates and grants, in the standaloneaudit/verifypackage and in every-pubkeyand-approver-keysflag ofbide auditandbide view. P-256 is not a hybrid half, and hybrid post-quantum keys inside an HSM stay deferred. No format changes for this: the scheme is a string in each artifact, and an older verifier refuses anecdsa-p256artifact as malformed.- The records that resolve something a person was told about now note when they were written (
recorded_at,Record.RecordedAt, canonical RFC 3339 UTC to the millisecond): a single approver's decision (agent.Approve, which now takesWithClock), an interrupt answer and a signal (AnswerInterruptandSignal, which takeWithClocktoo), the resultagent.ResolveHaltinjects (the resolver signs nothing, so the time is the writing process's unsigned claim), a run'srun:complete,run:abortedandrun:cancelledmarkers and a saga'srun:cancel-requested(agent.Cancelnow takesWithClock;agent.StatusreportsRunStatus.EndedAt). The clock isWithClock, else the run's, else the wall clock; the first write sets the time. It is informational likestarted_at: no gate, claim, replay or recovery pass reads it, the journal format tag is unchanged, a record from an earlier version has none and is reported as having none, and a clock with no canonical form records none.bide viewplaces these records on the timeline and shows the end and resolution times in the verdict, theended_atand eventrecorded_atin its JSON view;bide audit verifyprints a proven record's time andbide audit verify-evidenceadds it to a tool call's or step's line.bide audit notificationsnow judges an all-clear owed for a single-approver gate or aResolveHalt-resolved halt against-gracefrom that record's time, soall_clear_untimedis reported only for a journal an earlier version wrote;agent.JournalNotifyEventsreturns aResolveHalt-resolved halt as an event that is no longer current. Behaviour change: aResolveHalt-resolved halt that the trail never observed is now reported as the warningunobserved_resolved, sobide audit notifications -strictcan fail on journals that passed before. bide keygen -alg ecdsa-p256creates an ECDSA P-256 approver key (the file holdsecdsa-p256:and the 32-byte private scalar as hex, mode 0600), andbide approvesigns with it, so an approver can use the scheme their HSM or cloud KMS signs; a key file whose scalar is zero or not below the group order is refused without echoing it.- The notifier now sends an all-clear. When an
outcome_unknown,approval_pendingorrecovery_failingevent that a receiver was, or may have been, told of stops being current (the halt was resolved, the gate decided, the run ended, recovery recovered), aresolvednotification (agent.NotificationResolved) is delivered with the same audited claim and acknowledgement trail, at-least-once delivery, stable ID and retry as any event, so a PagerDuty incident, ticket or Slack thread can be closed. It names the event it ends inNotification.Clears(Key,ID,Kind) and the reason inNotification.Reason; in the webhook payload that is aclearsobject (id,key,kind, null on every other kind) and the existingreasonfield, anddeadline_atis null. The ID of the event is final: a receiver treats every delivery of that ID, before or after the all-clear, as superseded, which is how an all-clear that arrives first is matched. It is never overdue (no deadline, no overdue notice) and is retried like any delivery. An event never claimed, andrun_aborted, get none. It is found by a scan of the run's trail after every drive of a root run, every recovery pass and every unfinished runNotifyPendinglists (one trail read each, off the drive's path), and, for a run that completed while nobody scanned, through the new open trail (watchandunwatchrecords, written before an event is observed and when nothing more is owed) that every sweep,Recoverpass andRecoverLooppass reads; it is kept in daily sealed segmentsnotify:@open:<date>with checkpoints and a yearly index, so a read does not grow with history, and the first sweep or recovery pass lists events observed before it existed. A plan flow's run is now its own root on both the hook path and the sweep, so a flow whose ID holds a>files its gate under one trail. Theobservedrecord of a halt or approval gainsop_run,op_kindandop_id(additive), so an ID too long to encode in the key can still be checked. Receivers that treated every webhook POST as a new alert should filter onkind. TLA+ model 14 gains the all-clear (Clears, keyr_<event>) with its safety and liveness properties, regression configurations and the ordering limit (limits/clear-before-event). The open trail is verified for its time: every record is dated in its segment's UTC day, a seal may not skip an indexed segment, an index names segments of its year, and each segment is indexed in the index of its own year even when a writer repairs a gap. An open-trail record written by a process whose clock is behind its segment (another process's clock ran ahead and sealed into a later day) has its time moved later, never earlier, and keeps its own clock reading in a newclock_atfield, which the verifier checks. During a rolling upgrade, any scan lists an event an older process delivered without listing it, and a second backfill pass afterWithNotifyUpgradeWindow(a day by default; set it to how long your staged rollout takes) after the first (the first pass records the window inbackfill_window, the checkpoint carries it withbackfillsandbackfill_at, and the verifier requires the second pass no earlier than the first plus that window) lists what no scan reached. A panic in aNotifyTrailorNotifiernow fails the round or call instead of the process, and a flush stops waiting for the catch-up scans and the backfill after ten seconds, so a slow trail store cannot hold aRecoverpass. - The notifier routes events and escalates the ones nobody handles.
agent.WithNotifyReceivernames additional receivers (each its ownNotifier, typically its own webhook and relay),WithNotifyRoutesends an event kind to one (approvals to the approvers' channel, halts and recovery failures to on-call), andWithNotifyApproverRouteroutes an approval by approver ID; a gate whose approvers map to several receivers is delivered to each under its own key (to:<receiver>:<key>), so one receiver's acknowledgement never stands for another's. An approver with no route is reached through the route of the kind, which is delivered to as well when any approver of the gate is unrouted.WithNotifyEscalationgivesoutcome_unknown,approval_pendingandrecovery_failinga chain of up to four steps: when the event is not acknowledged by its deadline (an approval: not decided by it) the next receiver is told in anescalatednotification (agent.NotificationEscalated,Notification.Escalates) with a deadline of its own, and the chain stops when the event stops being current or, for an event that is not an approval, is acknowledged; receivers already told get the all-clear. Routing lives in the engine and not in a fan-outNotifier, so every receiver has its own auditedobserved,claimedandackedrecords, retries and overdue in the run's one trail. The trail gains two additiveobservedfields,receiver(empty for the default receiver, so trails written without routing are unchanged) andlevel, the event kindescalatedand the keysto:<receiver>:<key>andescalated:<level>:<key>;NotifyEvent.Receiver,NotifyEvent.LevelandNotifyState.ByReceiverread them. The webhook payload gainsreceiverandescalates(null on every other kind). TLA+ model 14 gains routing (two receivers of one gate) and escalation (Levels,EscMode) with their safety and liveness properties, and regression configurations for a shared acknowledgement, an early step, a skipped step, a step after an acknowledgement, no escalation and a step that outlives its event. bide notifysets up and tests the webhook notifier.bide notify testsends one signed sample notification to a receiver through the notifier's own code path (payload, signature, TLS 1.2+, private CA, key pin, mutual TLS) and reports the TLS handshake, the HTTP status, whether the receiver acknowledged and the timing, with a next step for each failure;bide notify listenis a local HTTPS receiver with a self-signed certificate (it prints the CA file and pin) that verifies each request withnotify.Verifyand prints the event;bide notify relayverifies bide's webhooks and forwards them to Slack (a Block Kit message with the run, kind, summary, deadline and a viewer link) and PagerDuty (Events API v2 trigger keyed by the event ID, and a resolve on the all-clearresolvedkind using itsclears.id). The relay answers 502 when a forward fails so the notifier retries, drops redeliveries by delivery ID in a bounded cache, retries only the destination that failed, drops a trigger whose event it already saw cleared, never forwards error text or tool arguments, and never logs a secret or a webhook URL. Secrets are read from an environment variable or a file, never a flag. The relay is also a library, packagenotify/relay(relay.Handler,relay.Sink,relay.NewSlack,relay.NewPagerDuty), andnotify.Webhook.Probereports a delivery's handshake, status and timing for tools that test a receiver.- The notifier can now sign and anchor its notification trail as it is written: wrap the trail's event store in
audit.NewAuditedEventStore(store, signer, anchor)(new) and each growth of a run's trail publishes a signed tree head (kind events, run ID the trail's name, the headaudit.SignNotifyTrailsigns) with the sameaudit.Signerandaudit.Anchoras a journal, so HSM, KMS and P-256 signers work unchanged. Publishing is a background, best-effort side channel: a publish failure or a hung anchor never fails or delays a delivery or an acknowledgement (one attempt is abandoned afterWithTimeout, default 3s, and a failure pauses publishing forWithCooldown, default 30s), failures go toOnError, heads only grow per trail, andFlush,ReanchorandReanchorPendingpublish what an outage left out.NotifyPending,RecoverLoop,RecoverandFlushNotificationssign again any trail (the open trail's segments and index and the digest's trail included) that grew past its last head through the new optionalagent.NotifyTrailAnchorer(implemented byaudit.NotifyTrail).bide audit notificationsnow takes any number of-sthheads per trail (each must verify and match a prefix; the newest is used), reports how many records follow the newest head and how long the oldest has gone unattested, and fails a gap older than the new-max-unattested;audit.NotifyVerifyInput.MaxTailAgeand theHeads,TailSinceandTailAgereport fields are new. Model 14 is unchanged: anchoring is outside the delivery protocol. bide audit notificationsandaudit.VerifyNotificationscheck offline that every event that needed a person was notified and acknowledged, and when. The notification trail is read strictly (an unknown record kind or field is an error, not skipped) and must be a history a notifier writes (an event observed once and first, nothing after its acknowledgement or clearing, an acknowledgement after a claim, in-order times); with a signed tree head over the trail (audit.SignNotifyTrail, new, andaudit.ExportNotifyTrail, formatbide.audit.notify-trail-export.v1) a deleted, reordered or changed record is found, and a trail with no head is reportedUNANCHORED(the notifier does not sign its trail;-unanchoredaccepts one). Each event gets a verdict:ackedwith its times, attempts and authentication,acked_late,pending,failing,overdue,cleared_before_notification,cleared_unacknowledged,never_notified; the run journals are cross-checked (agent.JournalNotifyEvents, new) so an approval gate, unknown-outcome halt or aborted run with no notify record isnever_notified, and an overdue record without its notice, a long recovery failure episode without its event and a clearing without its all-clear are caught the same way. A gate decided by m-of-n decisions whose all-clear is missing past-graceof the newest decision'srecorded_atisnever_notified; one whose resolution the journal does not time is the warningall_clear_untimed, likeunobserved_resolved(a decided gate no notifier observed), and-strict(library:Strict) fails the audit on either. The verb exits 1 onacked_late,overdueandnever_notifiedand takes-max-ackas a bound;-dband-postgres-env(a variable holding the DSN) read every run, or-run, from a store in the fullbidecommand, and the audit-only build reads exported files.postgres.WithoutMigrationopens the Postgres store (andNew) without running the schema migration, so the application's database role needs noCREATEon the schema: it verifies the schema and refuses a missing one (postgres.ErrSchemaMissing) or one at another version (postgres.ErrSchemaVersion) without creating or altering anything.postgres.MigrateandMigrateDBrun the migration on its own and report the schema version before and after, what they created and the SQL (postgres.WithDryRunrolls it back), and the newbide migrate -postgres-env VAR [-schema S] [-dry-run]command runs it as the owner role with the DSN read from the environment.OpenReadOnlynow returns the same typed errors. Every way of opening the store, andMigrateafter migrating, now also checks each table's columns (type, NOT NULL, a deterministic collation), the lease indexes' definitions, that no generated or identity column, extra unique index or CHECK, EXCLUDE or foreign-key constraint, trigger, rule, row-level security, partition or inheritance affects the tables (each must be an ordinary table), in both Postgres modules, and refuses a schema that differs (agent.ErrConfig); a database that was altered that way is now refused at open.bide migraterequires-schemaand redacts a URL or keyword-form DSN from errors. The Postgres store guide (docs/guides/postgres.md) documents the owner, application and reader roles; the governed log has the same split (postgreslog.WithoutMigration,postgreslog.Migrate,postgreslog.ErrSchemaMissing), and the log now records a schema version ingoverned_events_schema_version(a log without the table is version 1, andMigrateor a migratingOpenadds it) and refuses another withpostgreslog.ErrSchemaVersion.bide migrate,bide approveandbide doctornow refuse a-postgres-envvalue that is not an environment variable name (a DSN given by mistake) as a usage error that does not echo it, via the newapproveline.ValidEnvName.agent.RecoverLoopandagent.Recoverre-sign a run whose drive ended waiting on an approval or a halt resolution, including each of several joined pauses from parallel sub-agents (agent.Reanchorer, implemented byaudit.AuditedStore, found throughUnwrap;agent.WithReanchornames another function or turns it off;agent.WithReanchorTimeout, half the lease TTL by default, bounds each call so a hung anchor cannot hold a lease and a slot), so a decision another process wrote straight into the database is under a signed tree head within one pass instead of at the application's next write to the run.audit.CheckDecisionCoverageandbide audit verify-decision-coveragecheck a journal export against signed heads and flag a decision no head covers past a bound stated in journal positions (-max-records) or, as the weaker basis, age (-max-age, under which a decision with no recorded time is over the bound); a head the log key signed for the run that does not match the export is divergent and fails the check, so a deleted or truncated decision cannot pass.- Each release publishes the approve page bundle's SHA-256 sums,
approve-page.SHA256SUMS(theSHA256SUMSthatgo run ./approvals/cmd/approvepage -out <dir>writes), signed keylessly with cosign likechecksums.txt(approve-page.SHA256SUMS.sigstore.json), because Subresource Integrity pins the page's script and stylesheet but cannot pin its entry document. The release workflow builds the bundle from the tag and checks it, theverify-signaturesjob verifies the signature, and thereprojob rebuilds the bundle on macOS and fails unless its sums equal the published ones.docs/trust/verify-releases.mdshows how an organization that hosts the page checks the files it serves against them. - Audit-log and approver signing keys can live in Azure Key Vault or Managed HSM: the new module
signer/azurekvsigns ECDSA P-256 only (Key Vault has no Ed25519), sending the SHA-256 digest withES256, folding the service's 64-byter||sto the low-S form audit verifies and checking every signature against the key's public key, with one self-test signature at open. It pins a full key identifier with its version (a version-less identifier is refused) and refuses a key that is disabled, expired, not yet valid, without thesignoperation, exportable or on another curve; an HSM-protected key (EC-HSM, or any Managed HSM key) is required unlessConfig.AllowSoftwareKeyis set. Credentials come fromazidentityonly, and errors carry only the operation, HTTP status and Azure error code, never a response body or token. It is tested against a fake client and the Azure SDK's in-process fake server, never against Azure;examples/hsm-signinggainsBIDE_AZURE_KEY_ID. See the key custody guide. gcpkms.Config.VerifyAttestationmakes the Google Cloud KMS signer verify the Cloud HSM attestation of its key version atOpen, following Google's reference verifier: the manufacturer (Marvell) and owner (Google) certificate chains must build from pinned roots, both partition certificates must verify the attestation signature, and one attested EC object must carry the public keyGetPublicKeyreturned, be non-extractable and generated on the HSM, and name the key version; otherwiseOpenfails withgcpkms.ErrAttestation. The roots are built in with pinned fingerprints and replaceable throughConfig.AttestationRoots; certificate validity periods are not enforced (Marvell's root has expired), the parser is bounds-checked and size-limited, and the check is off by default and needs an HSM key version. It is tested against the real attestation, chain and public key of a Cloud HSM P-256 key version, a real version 1 chain, and synthetic attestations and chains, and not against a live key service call.- The new module
signer/gcpkmsis anaudit.Signerwhose Ed25519 (EC_SIGN_ED25519) or ECDSA P-256 (EC_SIGN_P256_SHA256) key lives in Google Cloud KMS, selected byConfig.Scheme(default P-256, the scheme Cloud KMS offers in an HSM) like the PKCS#11 and AWS KMS signers: it pins a fullCryptoKeyVersionname (no "latest" alias), refuses a version of the other algorithm or one that is notENABLED, is fail-closed about protection level (onlyHSMandHSM_SINGLE_TENANTopen by default;Config.AllowSoftwareKeyandConfig.AllowExternalKeyopt out, and because Google offers Ed25519 in software only the Ed25519 scheme needsAllowSoftwareKey, so a bank that needs an HSM key uses P-256), follows Google's data integrity guide (request and response CRC32C checks, a signature checksum mismatch retried up to three times), signs once atOpen, verifies every signature against the public key (Config.Timeoutbounds eachSign, retries included), and reduces a Cloud KMS client error to its gRPC status code (gcpkms.CodeError) so no credential text reaches an error. It is tested through the real Cloud KMS Go client against gcp-kms-emulator v0.10.0 running in the test process (no Docker, no credentials; the separate test-only modulesigner/gcpkms/emulatortest) and a fake client for the failures the emulator cannot produce, never against Google Cloud itself;examples/hsm-signingtakesBIDE_GCPKMS_KEY_VERSIONto use it, and the key custody guide gains a Google Cloud KMS section with the custom IAM role. - Signing keys can live in an HSM or a cloud key service behind
audit.Signer: the new modulessigner/pkcs11(Ed25519 through PKCS#11CKM_EDDSA, tested against SoftHSM2, PIN from an environment variable or a file, never an argument, withpkcs11testfor SoftHSM2-backed tests) andsigner/awskms(Ed25519 through AWS KMSECC_NIST_EDWARDS25519, tested against a fake client) sign tree heads, evidence seals, grants and approver decisions without the private key entering the application (pkcs11.Config.RequireNonExtractablemakes the token confirm the key is non-extractable), and each signer signs once at open and checks every signature against the key's public key. Both refuse a token or key that cannot do Ed25519 instead of substituting another algorithm. KMS signs at most 4096 bytes, so a large evidence package cannot be sealed with it. The core module gains no cgo and no cloud SDK; see the key custody guide andexamples/hsm-signing. - The PKCS#11 and AWS KMS signers take
Config.Scheme,audit.AlgEd25519(the default) oraudit.AlgECDSAP256, for HSMs and key services that cannot sign Ed25519: PKCS#11 signs the SHA-256 of the message withCKM_ECDSAon a P-256 key, and KMS signs the digest withECDSA_SHA_256on anECC_NIST_P256key; both return bide's canonical low-Sr||s, and a key of the other scheme is refused (ErrNoP256,ErrNoEd25519) instead of used under the wrong one. Under P-256 KMS has no message-size limit.pkcs11.CKRErrorand the new P-256 tests are covered in the key custody guide. - Trust documentation for security and risk reviewers in
docs/trust/: a threat model (assets, actors, trust boundaries, and for each threat what bide prevents, detects and does not address), stability and support (the 0.x versioning policy, format versions, what stays verifiable across versions, deprecation), a comparison with Temporal, LangGraph and retries with idempotency keys, operations guidance (key custody, journal retention and archiving, backups, clocks, least-privilege Postgres roles), and release verification. Release archives andchecksums.txtare now signed keylessly with cosign (GitHub OIDC), each archive has an SPDX SBOM generated by syft, and the release workflow verifies the published signatures in averify-signaturesjob;scripts/repro.shnow checks only the archives, since the release also holds SBOMs and signature bundles. bide viewhas a Needs attention list at/attention(and/attention.json), linked from the run list's headline and its "need a person" count: every run that is waiting for approval (the call, the gate's k of n, who approved and who is pending, how long it has waited), halted with an unknown outcome (with theagent.ResolveHaltcall), or aborted, newest first, and, from-dbor-postgres, whether the notifier told someone and the sink acknowledged it, plus runs whose recovery keeps failing (read from the notification trail in the same database). The page reloads itself in live mode and works without JavaScript;internal/runviewhas theOptions.Events,Options.ApproveCommandandOptions.Nowfields andStores.Events. The run list is ALL CLEAR only when the notification trail was read for every run and none has a failing recovery; without the trail it says "nothing in the journals needs a person" and that recovery failures are not visible.bide samplenow seeds a notification trail (sample.WriteNotifyTrail) with acknowledged, failing and overdue examples. A page that did not read everything is never clear: a store that cannot list its runs (CANNOT LIST), a failed listing or run, runs past the run list's 5,000 cap, or a filter give a headline that says what was not read, and the JSON of both lists carriesstatus,unread,truncatedandlistable. The Needs attention list reads only runs withoutrun:complete(no cap), matches a sub-run's notification in its root run's trail, and both lists are cached for two seconds. The list shows thebide approvecommand for each pending approval (quoted, with a fallback for an unsafe id), andbide viewtakes-postgres-env <VAR>to read the DSN from the environment.bide view's-postgres-envrefuses a value that is not an environment variable's name without echoing it.
Changed
bide approveexits 0 withalready recorded: your approve at <time> counts; nothing to dowhen the approver's verified, counted decision is the one they are making again (approve after approve, reject after reject), instead of refusing it as already decided; it signs and writes nothing, points to the existing receipt, and still refuses the opposite verdict, so a retry after a lost response is safe under every signature scheme, including the randomized ecdsa-p256.awskms.Opennow bounds its self-test signature by the context passed toOpenas well as byConfig.Timeout, so cancelling that context stops a slow or stalled self-test instead of waiting out the timeout (Signis unchanged). The signer's tests now also run, through the AWS SDK, against the in-process aws-kms-emulator for both Ed25519 and ECDSA P-256, in the new test-only modulesigner/awskms/emulatortest(never tagged, so the emulator is not in the signer's module graph), in addition to the fake client.bide demonow opens with the same crash without bide, where a naive retry charges the fake provider twice (provider charges: 2), and ends on the bide run's single charge. On the halt it tells ops with a signed webhook (the realagent.WithNotifierandnotifywebhook) delivered to an in-process HTTPS receiver that verifies the signature, and after the proofs it changes one amount in a copy of the journal and shows the real verifier failing on it.assets/crash-demo.gifis re-recorded with thebide viewpage live from the first frame.- The README and the approval, notifications and audit guides now show real recordings of
bide approve(a refund at a 2-of-3 gate: the requester refused, then finance reviews the call and its SHA-256 and signs, then risk completes the gate) and ofbide audit notifications(one run passing on a signed trail, one failing on an approval nobody was notified of), each in dark and light.assets/demo/approve.shandassets/demo/notifications.shregenerate them fromassets/demo/setup/, which drives the real runtime and notifier, andassets/demo/optimize-png.pyshrinks screenshots. - The evidence format is
bide.audit.evidence.v6: its seal signs the tag and the SHA-256 of the package (60 bytes) instead of the whole JSON, so a KMS with a 4096-byte limit can seal a package of any size. A v5 package still verifies under its original seal (bide audit verify-evidenceprints a NOTE),Sealrefuses to re-seal one, and v4 and older are refused withErrFormatas before. - bide now describes itself as a Go framework for AI agents that move money ("risky calls approved, every action recorded and verifiable"), with a fifth guarantee, people in control, beside the four it already had: the README, its four translations, the docs site home page and description, Concepts, Getting started, the
agentpackage documentation and thebidehelp text lead with crash-safe execution, k-of-n signed approvals with separation of duties, a notifier that records its delivery (with routing, escalation, an all-clear and an optionally signed trail), an approval intake and browser page that the application or organization serves, and proof of everything, and say that bide is built toward what a bank asks of such software (keys in an HSM or a cloud KMS, a tamper-evident trail, explicit failure modes) without being certified against or claiming compliance with any standard. No behavior changes; the first line ofbidewith no command now reads "bide: build AI agents that move money, and account for every action." agent.Approveandagent.Canceltake a trailing option (...ApproveOption,...CancelOption;Journal.AnswerInterruptandJournal.Signaltake...AnswerOption), so they no longer assign to a variable of the old function type without a wrapper; andRecord.ApproverSignatureis no longer non-nil only for a signed m-of-n decision: it also carries a lonerecorded_aton single approvals,ResolveHaltresults, end markers, interrupt answers and signals, so test for a signed decision withRecord.Approver() != ""(orIsApprovalDecision), not withApproverSignature != nil.bide notify relaytakes-state <file>(relay.Config.StatePath), which keeps the delivery IDs it forwarded and the event IDs it saw cleared across restarts, written atomically and bounded by-dedupe, so a trigger retried after a restart that comes after its clear no longer reopens the PagerDuty incident; the file is synced with its directory after each rename (Unix) and written at most once per-state-flushwindow (1 s by default, clears at once; a crash can lose the last window of forwarded-delivery entries), duplicate IDs in the file are merged on load, a second relay on the same file is refused by an exclusive operating-system lock (released if the holder crashes), and without-statethe memory still resets on restart, and a state file that cannot be parsed is refused at start. A refusal from Slack or PagerDuty now logs only an allow-listed error token (relay.StatusError.Code, replacingBody) instead of the first 200 bytes of the reply.signer/pkcs11:Config.RequireNonExtractablenow also refuses a key whose token reportsCKA_NEVER_EXTRACTABLEorCKA_ALWAYS_SENSITIVEas false (ErrExtractable), since a key that was extractable once, or not sensitive, may have been copied out before it was marked otherwise; a token that does not report these two attributes is taken at its word onCKA_EXTRACTABLEandCKA_SENSITIVEas before;Openalso refuses a PIN shorter thanMinPINLength(4 characters, SoftHSM2's minimum) withagent.ErrConfig, so the PIN scrubbing of error messages cannot garble them.Config.ProtectedAuthPathlogs in with no PIN on a token with a PIN pad (CKF_PROTECTED_AUTHENTICATION_PATH), is refused withErrNoProtectedAuthPathon a token without one, and is exclusive withConfig.PIN. A key withCKA_ALWAYS_AUTHENTICATEis now signed with: the signer logs in as the context-specific user betweenC_SignInitandC_Signwith the same PIN source (it failed before), andOpenskips its self-test signature for such a key.
Fixed
- Corrected the docs' statement that an approver decision signs the tool call's arguments when stating AWS KMS's 4096-byte Ed25519 limit: it signs the SHA-256 of the arguments plus the run, call, tool and approver names, so a call with large arguments is decided under a KMS Ed25519 key.
bide approvealso no longer builds a default receipt file name over the 255-byte file name limit for very long run, call or approver ids (each part is cut at 56 characters, was 80), and refuses a key file that is a named pipe instead of blocking on it. - The browser approve page showed the "Note" label of a call with no note, which shifted every label after it one row away from its value (Gate beside "Decided", and so on); the label is now hidden with its value. Found in a real Chrome screenshot; a DOM test covers it.
audit.VerifyApprovalsandaudit.ApprovalEvidencehonor a re-approval tally (approval-tally:<id>:v3) only over a tally that predatesagent.DecisionFormat, asagent.RecordedTallydoes at runtime, so a re-tally injected beside a current-format denial no longer replaces it.audit.ApprovalEvidencenow includes the superseded tally beside a re-approval tally, andVerifyApprovalsrefuses a re-approval tally without it.signer/awskms:Openpinned whatever key ARNGetPublicKeyreturned, so a redirected endpoint or a wrong answer naming another key, or another account's, was accepted and signed with; it now requires a key ARN or key ID to come back as that key, and an alias ARN to resolve to a key in its own partition, region and account (an alias name to a key ARN), and refuses otherwise withagent.ErrConfigbefore signing.bide approveandbide-hsmalso refuse a key file or PIN file that another user owns, and open it without blocking so a named pipe is refused rather than waited on.agent.SubmitDecisionnames a decision's journal step by the decision (call, approver, verdict, scheme and decided_at), never by its signature bytes, so re-signing and resubmitting one decision concurrently with a randomized scheme (ECDSA P-256 from a KMS or HSM) journals one record instead of two, andagent.ReportWrittenreports exactly one write;agent.DecisionStepreturns the new name. Journals written under the old signature-derived names read, count and verify unchanged, a resubmission of such a decision writes nothing more, and a record that is not the approver's valid decision never takes the name the real decision needs (it is then journaled under the signature-derived name). An unchecked resubmission of a decision recorded under the old name is still a no-op that reports no write, andagent.HeldDecisionStepfinds the record that holds a decision wherever it is (with a verifier it also reports whether the record verifies and can count) (DecisionStepis the name written first, not a lookup key). The approvals endpoint andbide approve -tofind a decision's record by what it is rather than by its derived name, so a record under the fallback or an old name is returned as itself; the endpoint answers a request whose bytes equal a record that verifies under no current key and that the gate does not count as an invalid approval rather than a replay, and omitsreceiptfrom a replay answered from the recorded tally after a key rotation (Response.Receiptis now a pointer).agent.IsDecisionStepNamechecks the shape of a decision record name, andbide approve -torefuses a record name the endpoint returns that does not have it, and says when the receipt carries a different signature than the one sent.Agent.FlushNotificationsrechecks the events it deferred to a peer under one shared 2 s budget (or the caller's deadline if sooner), not 2 s per event, so a flush with no deadline and a hung trail no longer waits 2 s times the number of deferred events; the events it could not recheck are reported as they are.- The notifier's holder no longer sends the overdue notice from its own round while a peer's claim on the notice is live, so a slow holder and a peer no longer both send it; the holder sends it in a later round if the peer's send never lands.
bide audit notificationsno longer lets a verdict rest on records nothing attests. An event whose observation, acknowledgement or clearing is only among the records after the newest signed tree head is nowunattested(a problem) and fails the audit, because anyone who can append to the stored trail could have written it; the report gives the tail's size and time range, and a nonzero-max-unattested(libraryMaxTailAge) accepts it, without a signature, when its tail records are that recent; a tail-onlyfailing_sinceorrecoveredrecord, which has no event key, is judged the same way as anunattestedrecovery-state verdict. New-routing(libraryRouting; write it with the newagent.RoutingOffrom the notifier's own options, whoseNotifyRouting.Receiversthe notifier now routes by) requires each event a delivery to the receivers it routes to, and each due escalation step a delivery to its receiver, elseno_delivery; without it per-receiver completeness is not checked, which is documented. The verifier also reads the notifier's own fan-out and escalation trails: a delivery to several receivers (to:<receiver>:<key>, the default receiver recorded as no name) and an escalation step (which carries its event's operation) no longer fail the operation and receiver checks, and an end-to-end test runs the real engine under every routing shape and verifies the trail, signed and unsigned.WithOutputModeon an untyped run is nowErrConfigat the run's first drive, before anything is journaled or any model call is made, as the documentation says; only a later drive of the run refused it before.- The Release workflow used
sigstore/cosign-installer@v4, a tag that does not exist (the action publishes only full versions such asv4.1.2), so the first tag pushed since release signing was added would have failed before building anything; it now pinsv4.1.2. Aworkflow_dispatchdry run of the workflow showed it. bide viewandbide approveshow a gate whose recorded tally passed without excluding the requester, under a policy that now excludes it, as waiting for approval again (agent.PendingSoDReapproval), with the requester's decision not counted, instead of as decided.govern/sqlitelogandstore/sqliteno longer fail withSQLITE_BUSY("database is locked") when many writers in one process append to one file at once, which a slow disk (the Windows CI runner) made the shared conformance test hit after its 30 second wait: SQLite's busy handler is not a queue, so a writer that had just released the lock won it back and one unlucky writer waited out everyone else's whole run; the writers in a process now take turns on each file in the order they ask, andgovern/sqlitelogsets its busy timeout in the connection string so that every connection the pool opens has it (it was set on the first connection only). Writers in different processes are still not ordered, whichdocs/KNOWN-LIMITATIONS.mdstates. Lease statements (store/sqliteacquire, renew and release) go ahead of the queued journal writes, so a renewal is not starved by a burst of writers; files are matched by identity (device and inode, volume and file index), so every spelling of a path shares one queue.store/sqliteandgovern/sqlitelognow open the canonical path (symlinks resolved), and refuse a file with more than one hard link with anErrConfigerror, because two handles reaching one WAL-mode file by different names make SQLite derive different -wal and -shm names and corrupt it (seen on Windows as "database disk image is malformed" through a symlink, and as a disk I/O error through a hard link on macOS).
0.16.0 - 2026-10-13
Added
- A JSON Schema (Draft 2020-12) for flow configs, at
plan/schema/flow.schema.json($idhttps://raw.githubusercontent.com/bide-ai/bide/main/plan/schema/flow.schema.json), so editors complete and check a config as it is typed: keys with hover descriptions, thesafetyvalues, the edge/switch/join forms of a wiring element, the approval block, and a pattern for each form of theassertgrammar. Point an editor at it with a# yaml-language-server: $schema=<url>first line (now on every config inexamples/plan/flows), a VS Codeyaml.schemasmapping or a JetBrains JSON Schema mapping (see the "Editor support" section of the plan flows guide).plan/schema_test.gokeeps it the same as the code: every keyplan.Loaddecodes is in the schema and no other, its enums and assertion patterns are the code's own, a table of good and bad configs is accepted and refused alike by the schema and byLoad, and every sample config is valid under it. The schema checks the file's shape only; names, types and whether an assertion holds are still decided byLoadandbide check. - A run made of
Journal.Stepcalls alone has norun:start;bide viewlisted it as "not started" even when it had halted and been resolved. It is now labeled "steps only (no run:start)" in the run list and on the run page, with a state read from the journal: halted (a live attempt marker with no result), resolved (agent.ResolveHaltrecorded an outcome) or steps done. A journal holding only its header is still not started. The run list's kind for such a run isstepsin/runs.jsonand/run.json. agent.NotifyPending(ctx, j, notifier, trail, opts...): one catch-up sweep for the notifier, for an application that drives runs withRunalone and so has noRecoverLoopto find an event whose process died before it was recorded. It reads every unfinished run and delivers, asWithNotifierwould and under the same event keys (so an event a drive also saw is delivered once), each run waiting at an approval gate and each run halted on an effect whose outcome is unknown. A halt is a marker with no result and no voiding not-started record, older thanWithNotifyHaltAge(default 5 minutes), because a sweep cannot see a process that is still running the call. It returns the deliveries that failed, which the next sweep retries (design).bide doctor: checks what a first run depends on and prints a result with a fix hint for each: the Go version (1.27 or later),bideagainst the latest release (skipped offline), that SQLite works in a temporary directory, a Postgres DSN fromBIDE_POSTGRES_DSN(or the variable-postgres-envnames) if set, which model API key variables are set (names only, never values), thatGOPATHand the module cache are writable, and in abide initproject that it builds. Colored on a terminal like the other commands (-color,NO_COLOR). Exit 1 only when a check failed.bide samplewrites a sample journal and opensbide viewon it, with no code, no API key and no network: 14 runs produced by the real runtime on a scripted model and fake tools (refund agent runs completed, halted with an unknown outcome, halted and resolved, waiting at a 2-of-3 approval gate, approved with signatures, in progress, aborted and cancelled; plan flow runs completed, waiting, approved and halted; a run of durable steps only), two evidence packages with the log and approver keys that verify them (bide audit verify-evidence,bide view -evidence -approver-keys), three flow configs (a v1, a v2 that weakens the approval gate, and one with a violated assertion, forbide view -config,bide checkandbide check -diff -fail-on-weaken), and aREADME.txtof what is inside and the commands to try.bide sample -out DIR -no-browserprints the viewer's address instead of opening a browser, and-livekeeps one more run progressing while you watch. The runs are the same on every call (run IDs, states, start times and records), except for the random salt each record carries, so digests differ; the keys are fixed sample keys, not for anything real. The run viewer guide's run list, halted flow, risk map and violated-assertion screenshots are taken of it (assets/demo/shots.sh).bide viewshows the proof and the approvals, and gets its finishing touches. An approval gate's approvers are cards: initials, what they decided, whether their signature verified (and why not), the fingerprint of their key (with-approver-keys), and when they decided (signed) and when bide recorded it. With a signed head or an evidence package the run page draws a proof path: the last covered record's leaf hash, the sibling hash at each level of its RFC 6962 audit path and the signed root, built from the proof the audit package verified (the page re-climbs the path for the intermediate hashes and draws nothing if it does not end at the root). A light and dark toggle (remembered in local storage, guarded for blocked storage), keyboard shortcuts (jandkthrough the records or runs,/to filter,t,s,?for help), a filter box on the timeline, a tab icon colored by the verdict and a title per page (VERIFIED · refund-42 · bide view), empty states for a list or filter with nothing, and a loading bar while a live page fetches. Share this run saves a 1200 by 630 PNG of the verdict, key numbers, graph or proof path, and proof line, drawn in the browser from the page with nothing sent anywhere. The pages still ask for no other host and carry no inline script or style.- A durable
audit.EventStoreinstore/sqliteandstore/postgres:(*Store).EventStore()keeps a run's event trail in the same database as its journal, in abide_eventstable (created onOpen/New; the table prefix and schema apply; the schema version is unchanged and an older database gains the table).Appendis one insert-if-absent statement on primary key(run_id, seq), committed before it returns, so it is crash-safe and writers racing for a position across connections or nodes have exactly one winner. Newaudit.ErrSeqTaken, wrapped byEventStore.Appendwhen a different leaf already holds the position, lets a caller tell a lost race or a fork from a real failure (MemEventStorereturns it too); a negativeseqis now refused. Newaudit/eventstoretest, a conformance suite for anyEventStore(append and load, byte fidelity, the same-leaf no-op,ErrSeqTaken, gaps, racing writers), run against the in-memory store and both new ones (#239). examples/stripe-refund: a refund agent against Stripe's TEST mode API, killed mid-refund. It looks up a payment intent (read-only), gates a refund over a threshold on 2-of-3 approval, sendsPOST /v1/refundswith anIdempotency-Keyand metadata naming the run and call, and writes a receipt, on a SQLite journal.-crash-after-sendexits the process right after the request is sent and before its result is journaled; the restart halts withOutcomeUnknowninstead of refunding again, and a reconciler lists the payment intent's refunds, matches the step's key in their metadata, and resolves the halt withResolveHalt(WithMinHaltAge, the refund as evidence), so exactly one refund exists. It resolves nothing when Stripe has no such refund. The example calls Stripe withnet/http(no SDK, no new dependency), readsSTRIPE_SECRET_KEYfrom the environment and refuses anything but ansk_test_key. Its tests run the binary as separate processes against a fake Stripe that honors idempotency keys and need no key;demo.shand the README do the kill and restart against the real test API by hand. A new example module (examples/stripe-refund), listed in CI,go.workand the release script's repo-only modules.- Hardening from an independent review: the overdue notice is derived from the trail and sent inside the round that holds the event's claim (so it survives a restart and a failed first delivery); every
Notifycall is bounded by a quarter of the claim and rounds of different events run concurrently, so one hung sink does not stall the rest, andRecoverLoopreturns on cancel; another holder's claim counts as live for a skew margin past itsuntil, and a new round is paced by the trail, so the claims of an undelivered event stay near four an hour whatever the number of sweeps; a decided gate (single decision, tally, tool or node result) is cleared, not reported;NotifyPendingalso finds aborted runs; any pause closes a recovery failure episode, a run noResumerdrives alerts, and a shutdown's cancellation does not;recovery_failingcarries a class, never the Resumer's error text; an idle notifier holds no goroutine;FlushNotificationsreturns what it could not deliver; a plan flow keeps one notifier per store. A peer sends the overdue notice, under a short claim of its own, when the holder that was to send it may be gone, and a round's budget counts its backoff and acknowledgement retries so it ends inside its claim. plan.Builder.WithNotifier(notifier, trail, opts...)andplan.WithLoadedNotifiertell anagent.Notifier, at least once and with a stable ID, when a run thatFlow.Rundrives halts on an unknown outcome, waits at an approval gate, or is aborted, asagent.WithNotifierdoes for an agent run. The binding is runtime only (the digest is unchanged), is validated byBuild, and keeps one notifier per journal the flow runs against;Flow.FlushNotificationswaits for deliveries in flight.agent.NewRunNotifierandRunNotifier.DriveEndlet code that drives its own runs do the same.- Recipe: get notified when a run needs a human. A complete program that posts one JSON message to a webhook (a Slack incoming webhook, say) the first time a run halts on an unknown outcome or waits for approval, from the three places bide reports it (the error
Runreturns, theResumerthatRecoverLoopcalls, and aMemWakerwakeup), and not again on every recovery pass. It says plainly what its in-process dedupe cannot do (a restart may notify again, a crash before the POST may drop the message) and points to the built-in notifier, which closes those gaps. Linked from the recipes index, the docs site sidebar, the README and its translations, and getting started. - Recipes: five complete flows in
docs/recipes, each runnable with no API key and with a real model, with whatbide viewshows and what a crash does. A refund with a 2-of-3 approval over a threshold (frombide init), invoice approval (a model extracts, a person approves, then the invoice is booked), support ticket triage (a read-only model call routes to side-effect nodes), updating a customer record safely (the attempt marker, the halt on an unknown outcome,agent.ResolveHalt, and an idempotent write), and an ambient agent (a durableagent.Sleepthat survives a restart). Linked from the docs site nav and sidebar, the docs index, the README and its four translations, and getting started. CI compiles every Go block (docsnip). - The
bidecommand colors its text output on a terminal, for a reader who scans it.bide checkmarks each error with a red ✗, splits a violated assertion over the assertion, its reason and its counterexample path (in red, with the node it reaches in bold), so each line fits the terminal, colors risk classes as the risk map does (side effect red, read-only and idempotent green, an approval gate amber) and the verdict counts, and marks a config whose assertions all hold with a green ✓;bide check -diff -checkcolors added lines green, removed red and changed amber, and calls out a weakened approval gate first, in bold red, with the summary's counts and digest on lines of their own.bide auditmarksPASS/OKlines with a green ✓ andFAILlines with a red ✗, and a verify verb ends with aVERIFIED(green, with the signed tree's size and Merkle root dimmed) orFAILED(red) banner; the noteverify-evidenceputs on every approver decision line is said once, before the banner.bide demogives each step its color (the crash red, the halt amber, the resolution blue, the proofs green) and now names the halt and the resolution in words ("halted: outcome unknown", "resolved with ResolveHalt");bide viewandbide initprint the address to open and the next commands in bold cyan. Status is never carried by color alone: the words stay, and a mark is added beside them. Written to a file or a pipe, and underbide audit -json, the output is the plain text it was (golden tests pin it byte for byte).init,demo,view,checkandaudittake-color=auto|always|never(defaultauto);autocolors a terminal only, not withNO_COLORset to any value orTERM=dumb, and on Windows only a terminal known to read ANSI escapes (Windows Terminal, ConEmu, ANSICON, VS Code, or aTERMsuch asxterm-256color). The styles are packageinternal/term, standard library only, sobide auditand thebide_audit_onlybuild stay core-only. Help (-h) is unchanged. Screenshots in the run viewer and audit guides, recorded byassets/demo/cli.sh;assets/crash-demo.gifis re-recorded in color. - The notification trail, the first building block of the built-in notifier (design):
agent.NotifyRecordand its kinds, the key builders (HaltedKey,ApprovalKey,AbortedKey,RecoveryKey,NotifyID),agent.FoldNotify(a pure fold of a trail to the state of each event and of the run's recovery failure episode), theagent.NotifyTrailport withagent.MemNotifyTrail, andaudit.NewNotifyTrail, which stores a trail as salted, Merkle-committed event leaves on anyaudit.EventStoreand turns a lost append race intoagent.ErrTrailConflict.agenttest.NotifyTrailContractis the contract test for a trail. Nothing sends a notification yet. - The notifier core:
agent.WithNotifier(notifier, trail)tells aNotifier, at least once and with a stableNotification.ID, when a run halts on an unknown outcome, waits for approval, or is aborted (a saga whose rollback finished), and when recovery keeps failing for a run. It applies to anAgent(the event is raised where a drive ends), and toRecoverandRecoverLoop(which also raiserecovery_failing, counted in time from afailing_sincerecord in the trail so a crash loop that restarts the process still alerts). Delivery state lives in aNotifyTrail, never in the run's journal: observed, claimed, acknowledged, failing, overdue and cleared records, so two processes cannot both deliver while a claim is live, a restart does not repeat an acknowledged event, a halt resolved or a gate decided before delivery is cleared instead of sent, and an event not acknowledged by its deadline (WithNotifyDeadline, default 5 minutes) raises an overdue notice toWithOverdueNotifierand keeps retrying. Retries never give up (capped backoff,WithNotifyRetry), andWithNotifyErrorshears when a delivery is failing.Agent.FlushNotificationswaits for deliveries in flight. A Notifier reports how a delivery was authenticated withagent.ReportNotifyAck. The webhook notifier, theNotifyPendingsweep andbide auditverification follow (design). - The
notifypackage ships bide's webhook notifier,notify.NewWebhook, anagent.Notifierthat delivers a notification as a signed HTTPS POST of abide.notification.v1JSON payload. The payload holds structured fields only (kind, run, step and tool name, the approval gate's approver IDs and k of n, the run's principal, times and abide viewpointer): no error text, tool arguments or approve link, unless the operator names fields inWithFields(notify.ErrorText, notify.Args("refund")). Each request carriesBide-Delivery(the stable notification ID),Bide-TimestampandBide-Signature: v1=<hex HMAC-SHA256(timestamp.body)>, one entry per secret so a secret can be rotated withWithSecrets(current, previous).notify.Verify(r, secrets, tolerance)checks a request in one call for a receiver (5 minute default timestamp tolerance, constant-time compare, one MAC per secret and at most 8 signature entries examined, theBide-Deliveryheader required to equal the signed body'sid, body left readable). Transport is HTTPS only (httponly for localhost, 127.0.0.1 and [::1]), never follows redirects, times out per request, makes one request perNotifycall (the notifier core runs the rounds;WithRequestsPerCallallows up to 3 with backoff), honorsRetry-Afteron a 429 or 5xx within the call's deadline, and requires TLS 1.2 or newer. Optional mutual TLS (WithClientCert, reloaded when the files change without a restart, keeping the last good pair if a reload fails),WithServerCA(replaces the system roots) andWithServerPin(SPKI SHA-256, up to two) add to the signature and never replace it. Each accepted delivery reports how it was authenticated (signature scheme and secret slot, never a secret; the client certificate's SPKI hash; custom CA or pin; negotiated TLS version) for theauthfield of the trail'sackedrecord. See the new notifications guide for Slack and PagerDuty adapters. - TLA+ model 14 (
spec/tla/notify) of the notifier's notify-once trail (observed, one claim per delivery round, acked, failing, overdue, cleared, failing_since, recovered) and its overdue notice, sent by the event's holder inside its round or by a peer under a short claim on the notice's key, over processes, crashes, lost replies, trail appends that error, claims that lapse mid-send and the lost append race. It checks no silent drop, a duplicate bound of 1 + crashes + lost replies + mid-round lapses (2 + the same for the notice), no concurrent double under a live claim, overdue by the deadline and its notice sent even when the holder is dead,recovery_failingunder a crash loop, idempotentackedandcleared, and, composed with model 10, that the notifier never changes the run lifecycle. A regression configuration per property breaks its rule and must fail. It found N1, adopted by the core: a failure count kept in process memory is reset by a restart, sofailingcame late and, under a crash loop, never.spec/tla/check.shgainsSPEC,LIBRARYandEXPECT: actionconfiguration lines, and a pull request that changes model 10 re-checks model 14.
Changed
- A second color pass over the CLI, on a terminal only (piped output is byte for byte what it was). Every error
bideprints to stderr opens with a bold rederror:(a hint after a semicolon is dim, inbide init's messages),bideandbide helpshow bold headings and command names over dim summaries, andbide versionis lightly styled.bide versiontakes-colorlike the other commands. The projectbide initwrites gets acolor.gothat colors its story (paused at the gate, approvals, done) with the same rules (a terminal, notNO_COLOR, notTERM=dumb), with a test of them;examples/approvalandexamples/stripe-refundcolor their narration the same way. - Breaking: every signed m-of-n approval decision now carries two times, kept apart.
decided_atis when the approver decided, by their clock, and is inside the signature:ApprovalDecisionBytestakes it (ApprovalDecisionBytes(subject, approverID, approved, decidedAt)),Decision.DecidedAtis required (SubmitDecisionrefuses a zero one withErrConfig), and the signed encoding is nowbide.approval.v3(agent.DecisionFormat), which appendslen32(decided_at) decided_atafter the decision byte (the m-of-n design note works one decision through to its exact bytes, pinned byTestApprovalDecisionBytes_Vector). It is signed in one form only, RFC 3339 in UTC to the millisecond with aZ, years 0001 to 9999 (agent.FormatTimestamp, 24 bytes, the form ofstarted_at); a verifier parses it, formats it again and refuses the decision unless the two are byte for byte the same (agent.ParseTimestamp,agent.ReasonDecidedAt), so a decision whose time was changed after signing does not verify. Decisions signed under the previous encoding (bide.approval.v2) no longer verify: the gate andaudit.VerifyApprovalsignore them withagent.ReasonNoDecidedAt, there is no fallback, and they must be signed again. A run whose gate passed on v2 decisions before the upgrade, and whose call has not run, does not run it on resume: the gate asks again (*ApprovalPendingwithReasonagent.PendingReapproval, itsQuorum.Supersedesnaming the old tally), and once approvers sign under v3 it records the new outcome underagent.ApprovalRetallyStep, which the gate,audit.ApprovalEvidence,audit.VerifyApprovalsandbide viewread in place of the old tally (agent.RecordedTally); a v2 denial stays final. Every journaled tally now names its format (ApprovalTally.DecisionFormat).recorded_at(Record.RecordedAt) is whenSubmitDecisionjournaled the decision, by the submitting process's clock (WithClock, now also anApproveOption, else the run clock on the context, else the wall clock; one with no canonical form isErrConfig): that submitter's claim, not signed, anchored by the journal's Merkle trail once a signed head covers it.ApprovalWait(approval-pending) records when the run paused, and a plan flow gate'sApprovalRequestwhen it recorded the request: when approvers were asked. Both times are display only:TallyApprovalschecksdecided_atonly as signed bytes and orders decisions by journal position, so the same decisions count the same whatever their times (TestTally_IgnoresTimes), and a decision signed a day ahead still counts (TestApprovalTimes_FlagsNeverUncount). A decision's journal name now hashesdecided_attoo, so a copy of a valid signature journaled first under another time cannot take the name the real decision needs, and an approver whose identical decision was recorded before a flow gate's request signs again at a new time and counts (the seat is no longer lost;Flows.tla'sADecideand the newflows/flow-gate-earlyconfiguration, which replaces thegate-early-stucklimit);WithDecisionCheckreads, as the gate does, only decisions after a flow gate's request.audit.ApprovalEvidenceincludes the gate'sapproval-pendingrecord (astepitem) when the journal holds one, andaudit.VerifyApprovalsreports each counted decision's two times (ApprovalVerdict.Times,AskedAt,HeadAt) with sanity flags that never change the verdict (audit.CheckDecisionTimes, toleranceDefaultDecisionTimeTolerance, 5 minutes):FlagDecidedAfterRecorded,FlagDecidedBeforeAsked,FlagAskedUnknown,FlagRecordedAtInvalid,FlagRecordedOutOfOrderandFlagRecordedAfterHead.bide audit verify-approvalsprints both times, the gap and anote:per flag, with-decision-time-tolerance, and prints any time that is not canonical quoted, so an unsigned field cannot add lines to its report;bide view's approver cards show the times in place of the signed head's time, and only the counted decision's when an approver has several.SubmitDecisionrefuses anApproverIDthat is not printable ASCII (no policy can name one), bothbide auditverbs print any text from an input file that holds a control character quoted, and a plan flow run with a re-approval tally conforms (Flow.Conform).ApproveOptionis now an interface (WithDecisionCheckandWithClockimplement it). An RFC 3161 trusted timestamp per decision is possible future work. bide auditerrors a first verification meets say what to do next: a missing evidence file, a-pubkeythat is not a key (it takesed25519:<hex>, 64 hex digits or a file such askeys/log.pub), a file that is not the JSON a flow orbide auditwrites (such as the journal database), and an evidence package that did not verify (check the key came from out of band and the file is unmodified). Exit statuses are unchanged.- Errors a newcomer is most likely to hit now say what to do next, with their sentinels (
errors.Is) unchanged. A halted run (*OutcomeUnknown) namesagent.ResolveHaltand re-running the run; a run waiting for approval (*ApprovalPending) namesSubmitDecision; resuming a run with another input, flow, kind or saga mode suggests the original or a new run ID;agent.Newwith a nil model or journal names what to pass; aplan.Loadconfig that names an unknown block says to register it and lists what is registered, and an unused block or duplicate node says how to fix it; a flow run recorded under another flow or topology digest says the flow changed and to resume with the original or start a new run ID; a provider's 401 or 403 says to check the API key and a 404 the model name and base URL;sqlite.Open,sqlite.OpenReadOnlyandpostgres.Openfailures say what to check (a missing directory or file, a file that is not a journal, the DSN). Message text only: no behavior changes. run:abortedrecords when a saga's finished rollback ended the run: its value is now an object with the reason (reason, as before) andaborted_at(UTC, RFC 3339 with milliseconds, by the drive's clock), where it was the reason as a JSON string. The time is informational, likestarted_at: no drive, resume or recovery pass reads it,agent.Statusreads the reason from either form, and arun:abortedan earlier version wrote loads and behaves the same. The notifier's catch-up sweep uses it to bound which aborted runs it raises.- The
bide viewpages are redesigned. Every page opens with a verdict in large type, with a glyph and a line of why, and three or four key numbers: a run isVERIFIED,COMPLETED,HALTED,WAITING FOR APPROVAL,FAILEDorIN PROGRESS; a config isN POLICY VIOLATIONSorALL ASSERTIONS HOLD(or errors, undecided assertions, none); a diff opens withAPPROVAL GATE WEAKENEDwhen a gate was weakened; the run list opens with what needs a person. The cards under it are condensed to a label, a value and a line, with the detail indetails. The flow graph (run path overlay, risk map, diff) is a hand-drawn layered SVG from an in-house layout, replacing the earlier grid: rounded nodes with a glyph per risk class or state, a2/3gate badge, edges routed around nodes, and the run path or counterexample as a flowing dash (still underprefers-reduced-motion). Hovering a node highlights the paths through it, clicking shows its details, and the graph pans and zooms; without JavaScript it stays a complete static SVG. The timeline has a glyph per record type, an anchor (#record-N) on every row, a collapsible payload with highlighted JSON and a copy button, and, for the records the journal timestamps (the start and attempt markers), an offset from the start with the UTC time on hover and a span bar. One set of design tokens (color, space, type scale) serves both themes, which keep followingprefers-color-scheme. The JSON views (/runs.json,/run.json,/config.json,/diff.json) are unchanged, and the pages make no request to another host.
Fixed
- A notification's
view.commandwasbide view -run <id>, which fails becausebide viewneeds a store. The webhook notifier now takesnotify.WithViewDB(path)and the command isbide view -db <path> -run <id>; without it the command is the marked templatebide view -db <journal.db> -run <id>rather than one that fails when pasted. The notifications guide and its Slack adapter say so. - An audit verb run without a required flag, such as
bide audit verify-approvalswithout-call,-needor-approvers, printed about 95 lines of usage for every verb and no line saying what was missing. It now prints one line that names the missing flags and says to runbide audit <verb> -h, and exits 2 as before. Every audit verb does the same. bide demo -fast, documented as for CI, served the viewer until Ctrl-C. It now exits 0 when the demo is done, without serving or opening a browser; with-keepit prints thebide viewcommand that reopens the run.bide doctorfailed on a Go older than 1.27 even whereGOTOOLCHAIN=auto(the default) lets go fetch 1.27 itself inside a bide project. It is now a warning there, and still a failure underGOTOOLCHAIN=localor a pinned older toolchain. The fix text namesGOTOOLCHAIN=go1.27.0as the getting-started guide does, long lines wrap so the output fits 120 columns, and in color the check names line up whether a row has a mark or not.MemWaker.Startno longer runs aFireafter its context is cancelled. A select picks at random among ready cases, so a ready tick could win over the done context, and the loop would resume due runs with a cancelled context during shutdown (still before the stopped channel closed); it now checks the context again after each tick (TestMemWaker_StartNothingFiresAfterCancel).RecoverLoopno longer starts a drive or a recovery pass after its context is cancelled. A select picks at random among ready cases, so a free drive slot or a pass tick could win over the done context, and the loop could lease a run and call theResumerwith a cancelled context during shutdown (still beforeRecoverLoopreturned); it now checks the context again after each wait (TestRecoverLoop_NothingStartsAfterCancel).- The run viewer's proof-path diagram clipped the signed-time label ("UTC" read "UT"). The SVG is wider, and the label sits on the side of the root with no sibling hash.
0.15.0 - 2026-10-13
Added
bide viewwith no-runopens on a run list: each run's ID (linking to its page), kind, state (completed, halted: outcome unknown, waiting for approval, in progress, aborted, cancelled; the state the run page shows), when it started (RunStart.StartedAt; "none" for a run journaled by an earlier version, which recorded no start time) and its record count, newest first. It filters by state (with counts), kind and run ID substring, shows 50 rows with a "show more" link, and serves the same list as JSON at/runs.json. It reads SQLite, Postgres and exported journals, read-only, on loopback only, with no JavaScript. One load classifies at most 5,000 runs and says when it stops short. The guide's screenshot is of a demo journal any checkout can write (BIDE_RUNLIST_DEMO=$PWD/runs.db go test ./cmd/bide -run TestRunListDemo).- A run's
run:startrecords when its first drive started:RunStart.StartedAt(started_at), UTC, RFC 3339 with milliseconds, by the drive's clock (WithClock, else the wall clock), for agent runs, session turns and plan flow runs;RunStart.Startedreads it as atime.Time. It is informational, for tools that list runs: no drive, resume, recovery pass or at-most-once check reads it, and a later drive neither rewrites it nor is held to it. A run whoserun:startwas written by an earlier version has none and loads and resumes as before (TestRunStart_StartedAtIsNotReaddrives the same journal with the time as written, absent, different and not a time, and checks every drive does and journals the same;TestRunStart_EarlierJournalLoads). A replayed run (Replay) records its own start time, so its journal matches the original's but for that member. The recovery pass's fast decoding of the commonestrun:startreads the new member too. Journal format: one new optional member, with no format version change before 1.0. - Risk map and policy assertions for flow configs.
bide view -configcolors each node by its crash behavior (side effect: the resume halts and asks; read-only or idempotent: it re-runs; unknown without the Registry), marks its approval gate, and sums up side effects behind a gate and not ("1 side-effect step, 1 gated, 0 ungated"). A config's newassertlist, whichplan.Loadignores, states policy about the graph:every path to <node> passes approval >= K [of N],every path to <node> passes <node>,every path to a terminal passes <node>,no side effect after <node>,<node> reachableand<node> unreachable, each decided by reachability over the declared graph (loops included). A violated assertion is an error with a shortest counterexample path, drawn in red on the page and printed bybide check, which exits 1; an ill-formed, unknown-node or undecided assertion is an error too.plan.InspectConfigreports them inConfigReport.Safety,.Gatedand.Assertions(plan.NodeSafety,plan.AssertionResult).examples/plan/flows/refund-policy.yamlandrefund-policy-bypass.yamlshow a holding and a violated policy. bide viewlive mode: the page of a run in progress, read from a SQLite or Postgres journal, follows the run. Its timeline rows appear as records land, and END STATE, the approval gates and the flow graph update in place (scroll position kept), with a "live" mark, until the run journals its end marker. The page's one embedded script polls the new/run/live?id=<run>&after=<cursor>about once a second; the viewer answers from oneLoadof the entries after the cursor (the store sequence of the last record shown) and returns only the new records' rows. Read-only and loopback-only like the rest of the viewer; an exported journal stays static, and the page is complete without JavaScript.examples/approval run -turn-delayholds each model turn so it can be watched;assets/demo/live.shrecords the guide's GIF.bide check flow.yaml -diff <old>compares a flow config with an earlier version: a read-only page draws the new flow with added nodes and edges in green, removed ones as dashed red ghosts and changed nodes in amber (block,safety, approval gate:approval 1 of 3 -> 2 of 3), with a summary card (counts, the digest before and after) and a weakened approval policy called out first.<old>is a file or, when no file has that name, a git revision (<rev>:<path>, or a bare<rev>for the same path).-checkprints one line per change and a summary, for CI, and exits 0 unless-fail-on-weakenfinds a gate removed or weakened (a set of approvals the new gate accepts would not have passed the old one).bide view -config <file> -diff <old>is the same page, and packageplan/planviewserves it (DiffHandler,CheckDiff) with each version'splan.Registry, for the digests.bide checknow accepts flags after the file names. Samples:examples/plan/flows/refund-v1.yamlandrefund-v2.yaml.
0.14.1 - 2026-10-13
Changed
- A plan flow
Modelnode (Builder.Model,Registry.RegisterModel) isReadOnlyby default, so a model call whose outcome is unknown (a crash lost its result, or the call failed: the provider errored or the reply did not decode) is made again on the next drive instead of halting with "unknown outcome and is not retry-safe". A model node calls no tool and changes nothing outside the run; a re-call costs tokens and may answer differently, and nothing saw the lost answer. A configsafety: side_effectkeeps the old halt. A node a v0.14 process already attempted keeps its attempt marker and still halts; resolve it withResolveHaltor start a new run. Found by a fresh-eyes run of thebide initproject on a real model.
Fixed
- A plan flow
Modelnode now sends its output type's JSON schema as the request's response format to a model that honours one (agent.ModelInfoOfreportsResponseFormat:model/openai,model/gemini), asBuilder.Modeldocumented, so the provider's structured output returns the type's JSON. It sent none, and a real model (gpt-4o-mini) wrapped its JSON in a code fence and put a number in a string field, failing thebide initproject's model step. A model that does not honour a response format (model/anthropic, or one that does not describe itself) is still sent none. - The
bide initproject: its prompt names each field's type; its README has a "Start over" command that runs in zsh (it named globs that zsh refuses when nothing matches) and removesevidence.jsontoo, and says to start over after switching to a real model (a finished run is read back, so the new model was never called); its test runs the story onmodel/openaiagainst a fake provider that answers as a real model did (a fenced reply, a number in a string field) unless sent the schema, and runs the reset command in sh and zsh. The root README saysbide viewprints the address to open (it opens no browser and takes no-no-browserflag). Found by a fresh-eyes run on a real model. - Documentation: every guide, reference page, translation and example README was checked against the current code and corrected where it had drifted;
docs-site/no longer tracks its synced copies oftour.mdandformal-verification.md(the site build copies them fromdocs/).
0.14.0 - 2026-10-13
Fixed
eval.Runcould start executions after its context was cancelled: the launcher's select between a free concurrency slot and the done context picked at random when both were ready. It now checks the context again after taking a slot. Found as a CI flake inTestRun_CancelledEvalIsAnError;TestRun_NoExecutionStartsAfterCancelreproduces it.
Added
- The
bide initproject recovers from a crash: it starts with anagent.Recoverpass whose Resumer drives the plan flow again from its journaled input, so a run an earlier process left unfinished completes, with its refund still made once.BIDE_CRASH=notify go run .kills the process mid-run to try it; the project's test does the same in a child process and checks one refund.model()has a marked block that swaps in a real model (model/openai, for OpenRouter or OpenAI) whenOPENROUTER_API_KEYorOPENAI_API_KEYis set; the scripted model stays the default. bide init <dir>scaffolds a project that runs with no API key: a plan flow (flow.yaml, checked bybide check) with a model node on a scripted model (and the lines that swap in a real one), a refund node behind a 2-of-3 approval gate, a SQLite journal, and ago run .that pauses at the gate, records two signed approvals with keys it generates, refunds once and writes the evidencebide viewandbide audit verify-approvalsread. The project requires bide at the command's own release version (-dev <checkout>for a build from source). Its own test runs in CI against the checkout, andscripts/release.shruns the releasedbide initand builds and tests the project against the released modules.- Approval gates on plan flow nodes. A node gated with
plan.Approval(policy), by the agent tool it wraps, or by a configapproval: {need, approvers}block (on a node or ajoin) pauses before it runs with*agent.ApprovalPending, whoseToolUseIDis the node's key (node:<name>, ornode:iter:<n>:<name>in a loop body, where each iteration is approved on its own) and whoseArgsare the node's input; approvers decide withagent.SubmitDecisionoragent.Approve, and the nextRuncounts them with the agent's own gate (the same records,TallyApprovals, the terminal tally before the node runs,approval-pending:). A denied gate stops the run withplan.ErrApprovalDenied.Builder.WithApproverVerifiersandplan.WithLoadedApproverVerifiersbind the approver keys;Buildrefuses an m-of-n gate without them and an option or config block that would replace a tool's own gate. The gate records its request underapproval-request:<node key>(agent.ApprovalRequest,agent.ApprovalRequestStep), whichagent.FindToolCallreturns for a plan node key;approval-request:is a reserved step-name prefix. Only decisions recorded after that request count, and in a flow's runagent.Approveandagent.SubmitDecisionrefuse (ErrConfig) a decision on a node key with no request yet, since node keys can be known before a run reaches the gate; an identical decision whose name a record written before the request already holds is reported (ErrConfig) rather than silently dropped.Topologyreports each node's gate (TopologyNode.Gate) and the digest commits to it (written only for gated nodes, so an ungated flow keeps its digest).audit.ApprovalEvidence,audit.VerifyApprovalsandbide audit verify-approvals -call node:<name>verify a gated node's decisions, with the node's record as the result;bide viewshows the gate on the node (waiting, approved, signatures verified). The flows TLA+ model checks that a gated node never runs before k approvals, across crashes (GateHeld,GatedResults,TallySound, regressionsgate-missing,gate-unscopedandgate-request-order). Runnable:examples/approval/flow. Journal format: one new record name, with no format version change before 1.0. bide view -config flow.yamlshows a flow definition without running it: the declared graph, approval gates ("2 of 3: ops, finance, risk") and every problem marked on its node, edge or arm;-checkprintsfile:node: messagelines and exits 1 on errors (-strict: on warnings too), for CI;examples/plan/flowsholds a sample config and one with a marked problem. From the command line the check is structural; packageplan/planviewserves the same page (andCheck) with a program'splan.Registry, forplan.Load's full checks and the digest the flow journals. Both use the newplan.InspectConfig. The command reads YAML configs too.bide demo, a one-command crash demo (no API key): a payment agent with a 2-of-3 approval-gated charge runs in a child process over an audited SQLite journal; the demo kills the process after the charge reaches a fake provider and before its result is journaled, the restart halts withOutcomeUnknowninstead of charging again, the demo resolves it from the provider's record (ResolveHalt), verifies the evidence, the anchored head and the approval signatures, and serves the run in the bide view page. CI runs it headless and fails unless the provider holds exactly one charge. The README opens with a recording of it (assets/crash-demo.gif, regenerated byassets/demo/record.sh).- A plan flow run's first drive journals its declared topology under
flow:topology(plan.TopologyStep), asTopologyJSON, one Insert just beforeflow:digest; a resume writes neither again, and a run started earlier is not given one.Topologygains the digest's inputs (each node'sblock, each arm'spred, and*_canonicaltypes with package paths), andFlow.Digestis computed through the newplan.TopologyDigest, so the journaled digest recomputes from the journaled topology;plan.JournaledTopologyreads the record and checks it. The record is informational:Run, resume, routing and recovery do not read it, andConformchecks its digest.bide viewdraws a flow run from it with no flags ("Topology from journal (digest verified)");-topologystays as an override and for older runs, and its digest is computed from the file when-digestis not given. Journal format: one new record name, with no format version change before 1.0.
Changed
- Breaking: approver ids are printable ASCII (bytes 0x21 to 0x7E: letters, digits and punctuation, so emails and URIs are valid ids).
ApprovalPolicy.Validaterefuses any other id (a space, a control character, anything outside ASCII) withErrConfignaming it, and two ids that differ only by ASCII case, naming both. This replaces the NFKC case-folding comparison: it also refuses homoglyphs (a Cyrillic "о" for a Latin "o"), which NFKC case folding let through, and it drops the core module's last dependency,golang.org/x/text, so the core module requires only the standard library. A plan flow config'sapprovalblock andbide audit verify-approvals -approversfollow the same rule. - Homebrew:
brew install bide-ai/tap/bideinstalls thebidecommand on macOS and Linux. The release workflow generates the formula from the release'schecksums.txt(scripts/brew-formula.sh, self-tested in CI) and pushes it to bide-ai/homebrew-tap, replacing the hand-maintainedbide-auditformula and recording the rename (formula_renames.json), sobrew upgrademovesbide-auditusers tobide. - Release binaries are reproducible:
.goreleaser.yamlbuilds with-trimpath,-buildvcs=falseand commit-time file stamps, the release workflow pins Go 1.27.2 (GOTOOLCHAIN=local), and a newreprojob rebuilds every published binary from the tag on macOS and compares the bytes (scripts/repro.sh vX.Y.Z, which anyone can run).scripts/repro.sh --self-testruns in CI: two builds ofcmd/bidefrom copies of the tree at different paths are identical, and.goreleaser.yamluses the flags the script rebuilds with. The archives also carry LICENSE, NOTICE and README.md. The security model documents the audit-only build (go install -tags bide_audit_only ...) and the rebuild. - Docs follow the product's order (start, build, inspect, prove). The README is the pitch: the hero recording, the four guarantees, a four-step start (
bide demo,bide init,bide view,bide audit verify-evidence) and a documentation map; its API sections (graphs through federated governance) moved, unchanged, to A tour of bide, and each translation's todocs/i18n/tour.<lang>.md. The flows guide is now Plan flows (the old path redirects), and the docs index and the site's navigation are grouped as Start here, Concepts, Guides (build, inspect, prove and govern), Reference (with the CLI reference) and Proofs. - Breaking: one command,
bide, replacesbide-audit,bide-viewandbide-demo(design note).bide demo,bide view(everybide-viewflag),bide check [-strict] <file>...(thebide-view -config -checkcheck, for several files),bide audit <verb>(everybide-auditverb and flag, with the same exit statuses),bide version [-json]andbide help [command]. Each command parses its flags with the standard libraryflagpackage, so command lines keep their single-dash flags; usage errors exit 2 andbide help <command>orbide <command> -hexit 0 (bide audit <verb> -hstill exits 2, since audit reserves 0 for verified). Messages and the-jsonreport namebide audit/bide view;bide audit -versionandbide versionprintbide <version>. The module isgithub.com/bide-ai/bide/cmd/bide(go install github.com/bide-ai/bide/cmd/bide@latest; Homebrewbide-ai/tap/bide); its direct requirements are pinned by a test to bide's modules and the YAML library. Built with-tags bide_audit_onlyit holds onlyaudit,versionandhelpand links nothing outside the standard library and the core module, which a test checks.docs/reference/cli.mdis generated from the commands' flag sets and a test fails when it is stale.cmd/bide-viewis tagged once more at v0.14.0 as a deprecated module whose program only points tobide view, and is removed afterwards;cmd/bide-auditand the never-taggedcmd/bide-demoare removed. The release archives arebide_<version>_<os>_<arch>. - The
bide-auditcommand's code moved fromcmd/bide-audittointernal/auditcli(auditcli.Main);cmd/bide-auditis a three-line program over it, so the command, its flags, output and exit statuses are unchanged. A new allowlist test,TestDepsAreCore, fails if the audit command's import graph reaches past the standard library and the core module. This prepares the singlebidecommand (design note). - The core module no longer requires
golang.org/x/sync: the agent loop's parallel tool calls run oninternal/errgroup, a standard-library equivalent of the errgroup subset it used (WithContext,SetLimit,Go,Wait, with the same semantics).Group.SetLimitpanics when called while functions are running, as x/sync's does (without the panic, they would release their slots into the new semaphore and block). Nested modules that requiredx/synconly through the core no longer list it.
0.13.0 - 2026-10-12
Changed
govern, its log adapters,integrationandexamples/governrequire gsm v0.14.0 (was v0.13.0), and the gsm machine gate pins its release commit. gsm v0.14.0 adds the XU check for deployments that merge component projections; bide replays one shared event log (gsm'sFedMachinemodel), so it does not rely on XU. Nothing that built on v0.13.0 fails to build, and every governance example runs unchanged.- The doccheck allowlist is empty (it held 44 entries): every exported identifier the check covers has a doc comment, and CI keeps the list empty (#178).
- Runnable
Exampletests for the main API: an agent with a tool, resuming a run,ReadOnlyand side-effect tools after a lost result, an approval gate,ResolveHalt, andaudit.NewAuditedStore(#179). - Godoc describes current behavior only: P-numbers, "the 1.0 rewrite" and a migration note are removed, and the godoc of
WithSafetyno longer mentions a Safety argument ofFunc(#178). - The README shows the chaos results as the benchmark card: bide never repeated the charge, while LangGraph (SQLite and Postgres), adk-go, trpc-agent-go, langchaingo and eino each charged again (#175).
- README section 4 and the governance guide frame gsm's theory as convergence by compensation, with the exact-regime-map line from normalization-confluence (#176).
- README section 4 is shortened to the guarantee and its scope; the details are in the governance guide and known limitations (#183).
- README: plainer wording; no claims changed. "The craft underneath" is now "Other details", and unverified comparisons with other projects are removed; the translations match.
Added
- A run viewer guide (
docs/guides/run-viewer.md, also on the docs site): installing and runningbide-view, its flags, what each part of the page means, the crash, resolve and verify demo, and what it cannot show, with screenshots; a short section in the README and its translations.bide-view -hprints a synopsis and the exit statuses, andsqlite.OpenReadOnly's godoc covers reading beside a writer. - A run that pauses at an approval gate journals
approval-pending:<call>(agent.ApprovalPendingStep, anagent.ApprovalWaitwith the call and the gate's k-of-n and approvers), once, in the drive whose model turn made the call. It is informational: no decision, resume or recovery reads it.bide-viewshows such a run as "waiting for approval" and lists its gate before any decision.approval-pending:is a reserved step-name prefix, so a userStepnamed with it isErrConfig. bide-view(go install github.com/bide-ai/bide/cmd/bide-view@v0.13.0, its own module): a read-only local page for one run, served on a loopback address only: an agent run's timeline (model turns, tool calls with their Safety, attempts, approvals with k-of-n status, halts with theirHaltRef, end state), a plan flow's declared topology with the run's path and conformance, and whether the journal verifies against a signed tree head or evidence package; with-approver-keys, whether each m-of-n approval gate's signatures verify (audit.VerifyApprovals, asbide-audit verify-approvalsruns it), shown in the Approval gates table and the AUDIT PROOF card with the reason for any failure, against the recorded policy or, with-needand-approvers, against the policy you expect, flagging a recorded policy that differs. It reads a SQLite file (-db), a Postgres journal (-postgres), or exported journals (-journal).sqlite.OpenReadOnlyandpostgres.OpenReadOnlyopen a journal without writing to it.examples/approvalgainsrun -crashandresolve, andexamples/plangains-topology-out, for the demo in the debugging guide.- A LangGraph crash-injection harness for the chaos benchmark, on SQLite and on Postgres (
PostgresSaver) (#166, #167). - Design only, nothing implemented: a design note on probes for unknown outcomes and TLA+ model 13 (
spec/tla/probes), which found that a provider's void must be monotonic: a void that sets rather than raises the watermark lets a stalled prober re-open an attempt a newer prober voided (#181, #182).
0.12.0 - 2026-10-05
Fixed
Correction: the godoc of
govern.FederatedGovernorandgovern.FederatedEventToolsaid cross-registry conflicts resolve without coordination by the authority argument. That is false (normalization-confluenceFederationGRS.v,fed_thm_fed_convergence_refuted). The authority argument makes the federated repair terminate in a unique valid normal form; event order across registries is safe because gsm v0.13.0'sFederation.Buildchecks cross-registry CC (C1) and repaired CC (C2) and rejects a federation that fails either. Under gsm v0.12.0, which bide required, a federation could build whose agreed state depended on which event was appended first. The godoc, README, governance guide, concepts and known limitations now say so (#172).Documentation: the governance guide called
Federation.CoordinationPlanminimal. It is a correct plan of size at most the number of independent cycles, not necessarily the minimum, and each point names the registry its cycles are driven from (CoordinationPoint.Authority) (#172).Documentation: the formal verification overview said the TLA+ models caught 29 bugs, all before release. They found 28 and confirmed one more found in review, and four (L1, S1, S2, S4) shipped in releases up to v0.9.0 and were fixed in v0.10.0. The overview, the README and the docs index now say so.
Changed
govern, its log adapters,integrationandexamples/governrequire gsm v0.13.0 (was v0.12.0), which checks event order across federated registries (C1, C2) and reports delivery obligations; no federation in bide's examples fails the new checks. gsm behavior changes that reach bide's API:Machine.Applynormalizes an invalid input before applying the event, andEmbedno longer copiesAllowMonotoneCyclesto the parent (gsm v0.13.0 release notes). The gsm machine gate is pinned to the v0.13.0 release commit (#172).- The README and governance guide state convergence under causal delivery and the exact scope of gsm's in-process oracle gate (a federation is oracle-gated per component only) (#172, folding in #170).
Added
govern.ConfluenceCertificaterecords gsm's delivery obligations:PairsUndeclared,CausalOrderRequired(undeclared pairs that do not commute, so need causal order),NotIdempotent(events a duplicate delivery would change) andSaturations, with the new typesgovern.EventPairandgovern.Saturation;String()reports them.bide-audit verify-convergenceandverify-runprint them without changing the verdict. A certificate written by an earlier version still verifies, with a note that it records no obligations; a certificate this version writes has keys an earlierbide-auditrejects, so verify it with this release'sbide-auditor later (#172).
0.11.1 - 2026-10-04
Fixed
- A failed model call's error said
(model) (model): the run wrappedErrModelaround an adapter error that already wrapped it. It wraps it only when it is missing (#160). model/openaiwith an empty API key: a server that needs a key refuses the request with 401 or 403, which read like a bad key or a provider fault. The*agent.APIErrornow says no API key was set (openai.Newwas given an empty key); a server that needs none, such as Ollama, works as before (#160).
Changed
- Getting started works without an API key: an
agenttestscripted model runs the first agent offline. The install step gets theagentpackage (go get github.com/bide-ai/bide/agent@latest), since getting the module root leftgo.sumincomplete; the core examples run withgo run github.com/bide-ai/bide/examples/<name>@latest; and the guide says what a run prints and how a crashed run continues (#161). - The examples name a
*agent.Journaljournal, notstore, soagent.New(model, journal, ...)does not read like the removedNew(model, store, tools...)(#159).
0.11.0 - 2026-10-04
Changed
Breaking: the API redesign's new names (P15, docs/design/api-v1.md section 10.2, #156). The transitional names and the old API they stood beside are gone. The list below is the upgrade path, name by name; a module that used
github.com/bide-ai/bide/mcprequiresgithub.com/bide-ai/bide/mcptoolsinstead.- Construction:
BuildisNew(model, journal, opts...) (*Agent, error); the oldNew(model, store, tools...)and the builder methods (Use,UseTool,WithMaxTurns,SetMaxConcurrency, ...) are removed: passWithTools,WithMiddleware,WithToolMiddlewareand the other options, or derive a copy withWith.Newmakes every checkBuildmade (two tools with one name, a non-object schema, an m-of-n policy's keys), so a configuration problem fails at construction rather than at a run. - Runs:
RunMessage,StreamMessage,ResumeRun,RunTypedMessageandSession.SendMessage/SendMessageOnceareRun,Stream,Resume,RunTypedandSession.Send/SendOnce, each taking aMessage(agent.UserText(s)) and run options and returning a*Result. The string entry points they replaced (RunandStreamon a string,RunSaga,RunResult,RunSagaResult,StreamSaga, theRunTypedandRunTypedNativefunctions,AgentStream.Final) are removed: a saga isRun(..., WithSaga()), native structured output isWithOutputMode(OutputNative).AgentStreamandAgentEventareRunStreamandRunEvent;audit.Recordisaudit.RecordStream, which returns(*agent.Result, error). - Journal: the
Durableinterface and the stores'Do,HistoryandJournalshims are removed. Every function that took aDurabletakes a*Journal(agent.NewJournal(store)); a test fake that wrapped aDurablewraps theStoreinstead (and implementsUnwrap() Store, whichCapabilityand the run's identity follow). The journal verbs are generic methods:j.Step,j.Parallel,j.Signal,j.Enqueue(the channelSend) andj.AnswerInterrupt(theResume[T]wrapper). - Pauses and halts: the aliases
PendingApproval,Interrupted,Awaiting,SleepingandResumeHaltareApprovalPending,InterruptPending,SignalPending,TimerPendingandOutcomeUnknown;ResolveHaltRefisResolveHalt(ctx, j, HaltRef, Outcome), and the wrappersResolveStepHaltandApproveAsare removed (SubmitDecisionrecords one approver's decision). - Context decorators:
ContextWithIdentity,ContextWithWakerandContextWithClockare removed; passWithIdentity,WithWakerorWithClockas a run option.WithIdentityrefuses an empty identity (ErrConfig), whichContextWithIdentitybound. - Tools: the
Toolinterface isSpec() ToolSpecandCall; the old method set (Name,Description,ArgsSchema,Safety) andSpecOfare removed.Functakes its safety as an option (WithSafety) and, likeCompensatedFunc,SubAgentandRetrievalTool, returns(Tool, error);MustFunc,MustCompensatedFunc,MustSubAgentandMustRetrievalToolpanic instead.SubAgent(nil)isErrConfig. A decorator that embeds aToolinherits itsSpec, and with it the gate and the timeout; it overrides in its ownSpec(s := d.Tool.Spec(), then the fields it changes).New, and a plan flow registering a tool, refuse (ErrConfig) a tool whoseName,Description,ArgsSchema(compared as JSON) orSafetymethod disagrees with itsSpec, including a pointer-receiver method on a tool registered by value, one of another signature, and one two embedded fields declare; a method of one of those names that means something else is refused too (rename it): written for the old interface, such a method no longer overrides anything (a decorator'sSafety()declaring a side effect would be ignored, and a resume would run it again). - Packages:
mcpismcptools(github.com/bide-ai/bide/mcptools); the scripted model and its turns (ScriptedModel,NewScriptedModel,ToolTurn,TextTurn,ErrorTurn) moved toagent/agenttest, besideMemJournal,MustJournal,MustNew,Must,AnswerandIdentityContext; plan'sRegister*functions are methods of*plan.Registry.
- Construction:
Breaking:
RunwithoutWithSagaon a run journaled as a saga drives it as the saga it is (its rollback included), whereRunSaga's absence wasErrConfig;WithSagaon a run that is not a saga is stillErrConfig. A session turn and a sub-agent still refuse a drive that differs.Breaking:
audit.AuditedStorewraps aStore(not aDurable): it anchors after everyInsertbut the journal header's (also one that found its entry stored, or failed: an A3 write that committed while reporting an error is anchored), the header together with the run's first record, and never a head of the header alone; a publish that failed is covered by the run's next write (a replay no longer retries it), andAuditedStore.Reanchor(ctx, runID)anchors a run whose last write's publish failed (call it onOnError).cmd/bide-auditrefuses an export whose first record is not a journal header.
Fixed
- An
audit.AttenuatingSubAgentdelegation whose sub-run held only its journal header (its first record failed to write) was taken for a sub-run with records but no journaled authority, and every later call refused it; a sub-run holding only its header is now one that has not started.
Added
audit.AuditedStore.Reanchor(ctx, runID): anchors a run's journal now if no published head covers it, the recovery for a run whose last write's publish failed, or whose write landed under a context that was done, whichInsertcannot anchor and reports toOnErrorwith the context's error (OnErroris the signal).- CI checks that no removed name appears in Go code, godoc or docs (
internal/tools/oldnames).
0.10.0 - 2026-10-03
Added
Run API, cancellation and recovery dispatch (P14)
- The Run API, under transitional names (P14):
Agent.RunMessage(ctx, runID, input Message, opts...),Agent.ResumeRun(ctx, runID, opts...),Agent.StreamMessagewithAgentStream.Result(),Agent.RunTypedMessage[T](a Go 1.27 generic method),Session.SendMessageandSession.SendMessageOnce, which the 1.0 rewrite renamesRun,Resume,Stream,RunTyped,SendandSendOnce. Each returns aResultwhenever the run ID is valid (agent.ValidateRunID), whatever the error;Result.Outputholds a typed run's answer as journaled. The input is aMessage, so a run can start from text and images (#138). - Run options (P14): the agent-and-run options (
WithMaxTurns,WithTokenBudget,WithSystemPrompt,WithSampling,WithToolChoice,WithWaker,WithIdentity,WithMaxConcurrency,WithClock) now apply per run, andWithSaga(),WithToolFilter(names...)andWithOutputMode(OutputTool | OutputNative)are new. The journaling rule: a run's first drive journals its input and options inrun:start(RunStartgainsSession,Typed,Settings,Principal,ToolsandExt, and the kindsession_turn), and every later drive, a recovery drive included, runs under them. A later drive's different turn limit or token budget is journaled as an amendmentrun:limits:<n>; any other different setting (input, saga, tool filter, system prompt, sampling, tool choice, output mode, typed schema, principal) isErrConfig, before any model call. The tool filter is enforced at dispatch: a call outside it records an error result and never runs (model 10, finding L5). The principal (OnBehalfOf,AuthorityRef) is journaled and restored; theActorstays live (#138). agent.Cancel(ctx, j, runID, reason)andagent.Status(ctx, j, runID)(RunStatus,RunState) (P14, D1 and D8).Cancelwritesrun:cancelled, or on a saga the rollback requestrun:cancel-requested, which the saga's drive answers by rolling the run back and writingrun:cancelled. A drive checks for the cancellation when it starts (and again once it has writtenrun:startor a limit amendment, or lost therun:startinsert to another drive: model 10'sDStartandDAmendreturn toDOpen), at every turn boundary after its first, and after each won side-effect claim, before the call (model 10, L2); calls in flight finish, and a retry-safe call already dispatched in the current turn may still run (noGetper retry-safe call). A sub-run (a sub-agent's, aSubRunForrun, a delegation) reads its tree root's cancellation too, at each of those checks and from the root's own store (a sub-agent outside a saga may journal to another), so aCancelof the root stops the whole tree (model 11,NoFireAfterRootCancel). Aplanflow honoursCancel: its open reads its end markers, a node readsrun:cancelledonce it will run (after a side-effect node's claim is won), and itsrun:completeis read back. The first end marker in journal order is a run's end for every reader, and each writer of one reads the markers back (L3).Cancelof a run already cancelled returns nil, of a run otherwise overErrRunEnded.Statusreads oneLoad(L6). New errors:ErrRunCancelled,ErrRunEnded,ErrNotStartedandErrNotResumable, none in a category (ErrNotStartedis often a race with a run's first drive) (#138).- Recovery dispatch (P14):
agent.Resumer(func(ctx, runID, start RunStart) error),agent.ResumeAgent(a, opts...),agent.ResumeTyped[T](a, opts...)andagent.ResumeAny(rs...). A recovery pass reads each run'srun:startunder its lease; a run with none is skipped and reported once per process (ErrNotStarted), and read again on every pass (L7); a run noResumerdrives is reported once (ErrNotResumable); the process remembers its 65,536 most recent reports. A run a pass drove to its cancelled end (a saga's cancellation rollback included) is recovered, not a failure.ResumeAgenttakes only the deployment's options (a Waker, a clock, a concurrency cap, an identity'sActor) (#138).
Sessions
- Sessions (P14, model 12's S3): a Send turn whose run was cancelled is recorded closed, with no answer and outside the transcript, by the next message's
Send;Sendof the cancelled message (the same text) returnsErrRunCancelled. A saga turn'sCancelwrites only its rollback request: the next message'sSenddrives the turn's rollback itself, under the turn lease and without holding the session handle's mutex (other callers on the handle are not blocked behind its compensators: while it is in progress, another worker or a second caller on the same handle getsErrTurnContended), and then reads the journal again and records the turn closed. Over a store with noLeaser, the handle's mutex stays held across the rollback, so two callers on one handle never drive it at once (#138). agent.ErrTurnContended: aSession.SendorSendOncewhose turn run another holder leases returns at once with an error wrapping it, having driven nothing (no category, likeErrLeaseLost); send the message again later.Agent.Session(ctx, id, opts...)takesLeaseOptionvalues (WithLeaseHolder,WithLeaseTTL) for that lease (#137).
Tools (P12)
agent.ToolSpec(Name,Title,Description,Input,Output,Safety,Approval,Timeout), everything the agent knows about a tool, andagent.SpecOf(t), which reads a tool'sSpec() ToolSpecmethod or, for a tool without one, itsName,Description,ArgsSchemaandSafety(deprecated from the start: see Deprecated). The agent reads each tool's spec once, when it is registered, and decides every call from that copy (#117).- Tool options:
agent.ToolOptionwithWithSafety,WithApproval,WithTimeout,WithTitleandWithOutputSchema, andagent.SingleApproval(), the one-decision gate.FuncandCompensatedFunctake trailing options;SubAgent(name, description, sub, opts...)takesWithApproval, so a parent can require approval before it delegates, and refusesWithSafetyandWithTimeout. An invalid option panics with an error wrappingErrConfig, asFuncdoes for an argument type it cannot describe, until the 1.0 rewrite returns errors (#117). - Tool timeouts (
WithTimeout,ToolSpec.Timeout): the call, tool middleware included, runs under the deadline. A result returned after the deadline is recorded; an error returned after it has an unknown outcome: a side effect records nothing, fails the drive withErrToolOutcomeUnknownand halts on resume, and a retry-safe tool records the error. It bounds only tools that honor their context (#117). agent.ToolCall(Use,Spec,RunID) andToolCall.ErrorText(err), what tool middleware receives (#117).agent.ErrToolNotCalled, a condition (no category) for a tool call known never to have reached its tool. A tool middleware that ends a call without callingnextreturns an error wrapping it, and only then;middleware.ToolRateLimitandmiddleware.ToolRetrydo. The agent tracks each call's state by compare-and-swap (reached, refused by the base handler, or closed when the chain returned without entering it): a call counts as not called only when refused, or closed withErrToolNotCalled; any other closed call leaves a side effect's outcome unknown and the run halts. The base handler refuses an invocation that comes after the chain returned. TheToolMiddlewarecontract: reach the tool only throughnext(#117).- Tool-result, denial and saga-failure records journal the
Safetyand approval gate the call ran under (Record.Safety,Record.Approval); a saga rollback reads the recorded safety (#117). - A tool that wraps another says so with an
Unwrap() Toolmethod; the agent follows it to find a wrappedSubAgent, so a saga rollback and the tree's token budget recurse into its sub-run (#117). mcp.WithApproval(name, policy):Toolsfails withErrConfigwhen the policy is nil or invalid, or when the server lists no tool of that name, so a misspelt gate never leaves the real tool ungated. Each MCP tool's spec:Title(its title, else its annotations' title),Output(itsoutputSchema) andTimeout(WithCallTimeout) (#117).govern.EventToolConfigandgovern.FederatedEventToolConfig, whoseOptionspassagent.ToolOptions to the tool;audit.AttenuationConfig, and trailingagent.ToolOptions onaudit.AttenuatingSubAgent, which go to itsSubAgent(#117).
Construction under Build (P13)
agent.Build(model, journal, opts...) (*Agent, error), construction from options, andAgent.With(opts...), which returns a configured copy and leaves the agent unchanged.BuildandWithreturn every configuration problem asErrConfigwhen the agent is built: a nil model, journal, option, tool, middleware or function; two tools with one name or one namedfinal_answer; a tool name the agent's model refuses, when the model declares its rule (ToolRules); a non-object input schema; an invalid approval policy, an m-of-n policy with noWithApproverVerifiersor with two approvers on one signing key; a negative limit; aWithRetrievalk below 1; and a tool choice with an unknown mode or a tool the agent lacks.Buildis the transitional name of the 1.0New.Agent.Journal()returns the agent's journal (#127).- Agent options:
WithTools,WithMiddleware,WithToolMiddleware,WithApproverVerifiers,WithToolErrorRedactor,WithSystemPromptFunc(its function gets the run'sRunInfoand may fail),WithRetrieval,WithOptions, andWithMaxTurns,WithTokenBudget,WithSystemPrompt,WithSampling,WithToolChoice,WithWaker,WithIdentity,WithMaxConcurrencyandWithClock. The last value given for a setting wins;WithSystemPromptandWithSystemPromptFuncshare one slot. The agent'sWithIdentity,WithWakerandWithClockapply to a run whose context carries none (#127). - Option scopes are interfaces with unexported methods (
Option,RunOption,ParallelOption,StepOption,ResolveOption,LeaseOption,RecoverOption,RecoverLoopOption,RetrievalOption, andToolOption), and a setting for several scopes returns one of the combination typesAgentRunOption,ConcurrencyOption,ClockOption,SafetyOptionorLeaseControl, so an option passed where it does not apply does not compile.RunOptionvalues are type-checked now and taken by the run API in the next redesign step (#127). agent.RunInfo(RunID,RootRunID,ToolUseID,Saga) andRunInfoFrom(ctx), which describe the tool call a context belongs to, andRunInfo.SubRunFor(name), the run ID of a programmatic sub-run (<scope>>step:<name>), whichRunaccepts from that call's context (#127).agent.WithRetrievalRetry(n, base, max), aRetrievalOptionforWithRetrieval(r, k, opts...): a failedRetrieveis retried up to n more times within the retrieval step, with exponential backoff and full jitter, and only the attempt that succeeded is recorded.agent.RetrieverFuncadapts a function to aRetriever, which is how a policy wraps one (#127).agent.WithSubRuns(agentFor), a tool option that declares the agent each of the tool's programmatic sub-runs (RunInfo.SubRunFor(name)) runs with. A saga's rollback walks every programmatic sub-run a call started, latest first and after the call's own compensation, as it walks a sub-agent's: a run in a saga's tree (a saga, or a plain run started from one's call) links each one in its journal (@subrun/<call>/<name>) before the sub-run records anything, and the rollback compensates the sub-run's writes with the declared agent's compensators, or, with none declared, reports them inSagaAborted.Uncompensated. A declared agent it cannot use (on another store, or aWithSubRunsfunction that panics) is listed there with the reason. A sub-run in a saga's tree must journal to the saga's store:Runrefuses another withErrConfig(#127).agent.ToolRules, an optional interface aModelimplements (itself or throughUnwrap() Model) to declare the tool setups its provider refuses:ToolNameRule() *regexp.RegexpandRequiresToolsForRequired() bool.BuildandWithrefuse a tool name the declared rule does not match, and check nothing for a model that declares no rule.model/openaiandmodel/anthropicdeclare^[a-zA-Z0-9_-]{1,64}$, andmodel/geminiits own^[a-zA-Z_][a-zA-Z0-9_.:-]{0,63}$, so a dotted MCP tool name still builds for Gemini. Tool choicerequiredon an agent with no tools of its own is left to the run, sinceRunTypedsupplies an answer tool: a run with nothing to call, under a model that declares it needs one, fails withErrConfigbefore it opens the journal or calls the model (#127).
Recovery and leases
agent.RunFilter.LeaseLapsedadmits only the runs whose lease has lapsed, by the comparisonAcquireLeasemakes;MemStore, SQLite and Postgres evaluate it over their leases table, andstoretestchecks it (Lister_LeaseLapsed) (#126).agent.WithRecoverLapsedConcurrencycaps how many lapsed runsRecoverLoop's lapsed loop drives at once (16 by default), apart fromWithRecoverConcurrency(#126).Leaser.ReapLeases(ctx, ended)deletes the lapsed leases no recovery pass takes over (a finished run's, or one on a run the store does not hold), checking the expiry in the same statement;RecoverLoop's lapsed loop calls it on each pass, so a holder that died between its run's last write and its release no longer leaves a lease every later pass reads.MemStore, SQLite and Postgres implement it, andstoretestchecks it (Leaser_ReapLeases) (#126).- Postgres:
Opencreates two indexes on the leases table when they are missing (<prefix>leases_expiryand<prefix>leases_run_c, onrun_idunder the "C" collation), so the lapsed listing reads only lapsed leases, or pages through many in order without sorting; on a store whose role does not own the tables, the owner opens it once to create them (#126).
Delegation
audit.WithRollbackGrants(ctx, signer, grants...)binds further grants a saga rollback verifies its delegations against, beside the acting grant (WithGrant): a saga whose delegations were minted under several grants (the root grant expired or was rotated between drives) rolls back with all of them bound. Each journaled child grant is verified against its own parent among the bound grants, under that grant's signer; a grant bound this way is never minted from (model 11, finding D1) (#133).
Governance (gsm)
- The gsm machine gate, a required CI check: every gsm machine the
examples/governprograms make is checked by the two checkers extracted from gsm's Coq/Rocq proof (checkeron a machine's step tables,astcheckeron its rules), built at a pinned gsm commit. gsm'sgsmgatebuilds each program.github/gsm-gate/machines.txtlists and runs it twice with no arguments in a fixed environment; the job fails when a checker rejects a machine listed as accepted or verifies oneBuildrejects, a program makes a machine the list does not hold or misses one it holds, a run fails or the two runs make different machines, the scan finds a program or package that makes machines outside the list, or the pinned commit is not on gsm'smain. It checks the examples' machines in CI, not the machines an application builds (.github/gsm-gate, #144).
Formal models
- A TLA+ model of the tool-call state machine of P12 (model 9,
spec/tla/toolcall): the call state and began word, the base handler entered by several invocations (retries, anextleft running), the tool middleware, the loop's record decision, the errgroup, retry-safe steps that change state, and the saga rollback's re-run and compensation, under store faults, crashes, cancellations and deadlines. It found six bugs in #117 before it merged (T1 to T6: a known failure or a result recorded for a call whose tool began, did not itself fail, or was still running; "already ran" for a tool that never began; an earlier attempt of a retry-safe saga step listed nowhere; a retry-safe tool begun after its chain returned), and a rollback re-run with no end; each is a regression configuration (#123). - A TLA+ model of the run lifecycle and recovery (model 10:
run:complete,run:abortedand the reservedrun:cancelled; leased and plain runs,RecoverandRecoverLooppasses with the end-marker re-check under the lease, halts, pauses andResolveHalt, under lease expiry, stalled holders, ambiguous writes and crashes), checked in CI. It shows the pickup latency the v0.9.0 docs describe (a dead holder's run waits behind the halted runs listed before it), checks a proposed fix, and states the property P14'sCancelmust satisfy (#124). Extended for P14 before any of P14's code was written:Cancelon plain runs and sagas,Status, the per-run tool filter, per-run options that survive recovery, and not-started runs in recovery, with findings L4 to L7, whose rules P14 adopted (#129). - A TLA+ model of delegation, sub-run authority and saga trees (model 11,
spec/tla/delegation):audit.AttenuatingSubAgentgrants (minting from the bound grant, reuse on resume, expiry at mint, at reuse and before every call, the subject check, a resume under the wrong authority), programmatic sub-runs (RunInfo.SubRunFor: the saga-tree link written before the child's first write, one store per saga tree, a sub-run started after its call returned refused), the rollback's recursion into sub-agents and linked sub-runs,BindRollback, and halts propagating from sub-runs, under ambiguous writes, crashes, transient read errors, lost outcomes and the clock. It found D1 to D3, fixed in #133, each now a regression configuration (#130). - A TLA+ model of sessions (model 12,
spec/tla/sessions):SendandSendOnceturns as runs of their own seeded with the shared history, several callers per handle and handles per process, redeliveries, error replies on every session-journal write, crashes, pauses, the per-turn budget, and P14'sCancelof a turn's run. It found S1 to S4: S1, S2 and S4 are fixed in #137 and S3 by rule 16 of P14's contract (#138); each is a regression configuration (#135). - P14 implements model 10's adopted rules L2 to L7 and model 12's S3 (rule 16 of the P14 contract):
findings/cancel-saga-marker,filter-request-only,status-gets,not-started-remembered(model 10) ands3-cancel-wedge(model 12) are regression configurations now, each still failing under its old rule; the drive,Cancel,Statusand session code carries theprotocol:lifecycleandprotocol:sessionsmarkers of the actions that were on the no-code lists (#138). - Code and models are kept in step (milestone M4 of the formal-models plan): the Go code models 1, 1b, 7, 8 and 10 describe is wrapped in
// protocol:<model> begin <Action> .../// protocol:<model> endregion markers, and the Lint job runsinternal/tools/modelsync, which fails a pull request that touches a marked region without changingspec/tla/<model>/(unless the description or a commit message holdsProtocol-Impact: none (<reason>), printed as a warning), and any disagreement between the markers, the model-to-code maps inspec/tla/README.mdand the specs' action names.TestProtocolVocabularychecks that the claim code's key constructors and record kinds match the record kindsClaims.tladeclares, and runs in the same job (#125). - Apalache (v0.62.2, pinned with its SHA-256 in
spec/tla/tools.lock) checks the claim model nightly, beside TLC:spec/tla/check.sh apalache [model|file.cfg]downloads and verifies it, unpacks a fresh copy, and removes its work directories on exit, failure and interrupt. A typed wrapper (ClaimsApalache.tla) instantiates the model unchanged, and an inductive invariant (ClaimsInductive.tla) proves, for two drivers over two processes,AtMostOnceandNotStartedExclusiveon one call (attempts 0..3, 8 claim ids) and all four ofAtMostOnce,NotStartedExclusive,NoLiveOverrideandAtMostOncePerIntentwith halt resolution and the caller's second call (attempts 0..3, 6 claim ids), without the approval gate, and, under the lease check, assuming no plain run holds the live attempt at the check (PlainRunIdleAtCheck), at any depth and for any number and mix of faults within the run's 8 (6) claim ids and attempts 0..3 (claim ids are never reused, so this bounds the number of claims), with every placement of the drivers, kind of call and late-commit setting left to the solver; the drivers, processes, calls, attempts and claim ids stay bounded (Apalache results). A regression check must find #90's F2 (NoLiveOverride) symbolically, TLC checks the invariant as a plain invariant of every reachable state of three configurations, and Apalache type-checks model 9's wrapper. The new Apalache (nightly) job runs them; the required Models job is unchanged. Model 9 has a typed wrapper (ToolCallApalache.tla) and no Apalache check of its properties yet. To type model 1,Claims.tlachanged three expressions without changing their meaning; TLC passes every configuration as before (#148).
Documentation, testing and tooling
- Formal verification, an overview of bide's TLA+ models: why bide model-checks, what each model guarantees and which code it covers, the bugs the models caught before release (F1 to F5, P1, P2, T1 to T6, L1 to L3) and where each was fixed, what runs on a pull request and nightly, how the models and the code stay in step, the models planned next, and what the models do not cover. The formal-models plan's status markers and the roadmap are brought up to date (models 9 and 10, M4 done) (#128); a section explains TLA+, PlusCal, TLC and model checking for readers new to them (#131).
- The gsm convergence-proof claims (README section 4, the governance guide and its translations) state what the mechanization proves: CI-verified on Coq 8.18, 8.20 and Rocq 9.3; the federated result machine-checked for the acyclic structural core and the monotone-cycle case; the cohomological layer through the cycle basis, with the full H¹ classification paper-proven (#139).
- The gsm convergence wording states the final state once. gsm v0.11.0, which bide required until this release, had a
Buildgap: its commute shortcut did not check what event guards and effects read, so a machine where one event's guard or effect reads a variable another event writes (pay/ship) could be certified convergent when it is not. #142 scoped the docs to that while it held (no "Buildproves every interleaving converges", no proof-derived re-check claimed). With gsm v0.12.0, which fixes the gap (#154), the README section 4 and its comparison-table footnote, the four i18n READMEs, the governance guide,CONCEPTS.mdand the docs-site front page say what backs convergence now:Buildreturns a machine only after the table oracle generated from gsm's Rocq proof re-checks it in-process (and, for combinator rules inside its fragment and within a cost cap, the rules oracle), a federation's own conditions are checked by gsm's Go code, and the required gsm machine gate runs the proof's checkers on every machine the governance examples build.KNOWN-LIMITATIONS.md("Governed state (gsm)") gives the exact scope, including which pairs CC covers and that a verdict recorded under v0.11.0 is not covered by the fix (#155). - The roadmap is brought up to date: P12 to P14 done, models 11 and 12, and gsm convergence (#153).
- Tests: the tool-timeout tests that need their tool to run use a
testing/synctestbubble, so a short deadline can no longer pass while the call is being dispatched (#134). - Tests:
modelsync's fixture git repositories are isolated from auto-gc, maintenance, fsmonitor and the global and system git config, so no background git process races a test's cleanup (#136).
Changed
Run API, cancellation and recovery dispatch (P14)
- Breaking:
agent.Recoverandagent.RecoverLooptake anagent.Resumer(func(ctx, runID, start RunStart) error) instead offunc(ctx, runID) error. Migration: passagent.ResumeAgent(a), or add thestart agent.RunStartparameter to your own callback; a run an earlier version started is not driven byResumeAgent(see the kind entry below) (P14, #138). - Breaking:
RunStart.Inputis aMessage(a user message of one text part is still journaled as a JSON string, so existing records read back unchanged); read its text withstart.Input.Text()(P14, #138). - Breaking:
agent.Samplingandagent.ToolChoicemarshal with snake_case JSON names (temperature,top_p,max_tokens,stop,seed;mode,name), as run:start journals them (P14, #138). - Breaking:
RunTypedandRunTypedNativejournal the typed start (output mode and the answer type's schema), so resuming a typed run started under this version throughRun, or with another type, isErrConfig(P14, #138). - Breaking: a run's first end marker in journal order is its end for every reader (P14, L3): a run whose
run:cancelledprecedes itsrun:completereturnsErrRunCancelled, not its answer, andIsCompletereports it not complete (#138). - Breaking:
ErrNotStartedwraps no category (it wrappedErrConfigearlier in this release cycle) (#138). - P14 writes the kind of every run it starts in
run:start(RecordedStart(...).Kindisagentfor an agent run). Arun:startan earlier version wrote, with no kind and no typed start, is driven by any agent entry point, as before: a session turn, aSendOnceturn or a typed run in flight across the upgrade still resumes through its session orRunTyped(its input is still held). Upgrading: recovery does not drive such a run throughResumeAgentorResumeTyped: the record does not say whether a plain run or a typed one started it, so both returnErrNotResumablefor it (Recoverreports it once per process). Finish the runs in flight before upgrading, or recover them with aResumerof your own, afterResumeAgentinResumeAny, that knows which entry point started each (RunTypedMessagefor a typed run,ResumeRunfor a plain one) (#138). WithToolChoice(ToolChoice{Mode: "none"})is enforced at dispatch: a tool call the model makes anyway is refused with an error result, as a call outside the tool filter is (a typed run's answer tool excepted) (#138).- A saga's rollback request is read before a recorded failure, and a failure's rollback of a saga whose rollback request exists ends
run:cancelled(one moreGet, on that rollback only), and so does a saga sub-run's failure rollback once its tree root was cancelled (up to twoGets more, from the root's store). A drive withoutWithSagaof an aborted saga (RunMessage,ResumeRun) reports*SagaAborted, notErrConfig; a cancellation's rollback that findsrun:abortedfirst reports the abort (#138). - Breaking: a finished agent run returns its recorded answer only to a drive with the input its
run:startrecorded;Run,RunSaga,Streamand the rest with another input areErrConfig, as for an unfinished run (#70) and a finished flow's run. Before, a finished run answered any input with its own answer, so aSendOncekey reused for another message, whose run had finished and was not yet recorded, was answered with the first message's reply and recorded as that message's turn (#137, review R137-2).
Sessions
- A session's turn run is driven under its lease when the store implements
Leaser(MemStore, SQLite, Postgres), asagent.Leasedrives a run: the run loads its journal only once it holds the lease. A worker that finds another holder leasing the run returns its recorded answer if the run has finished, andErrTurnContendedotherwise (model 12, finding S4,TurnLease). Cost: a firstSendturn overMemStoretakes about 14 µs, 25 allocations and 1.7 KiB more (BenchmarkSession_Send, the lease's renewer goroutine and timer), and over SQLite or Postgres two more single-row statements (the lease's acquisition and release) (#137). Leaser.ReapLeasesalso deletes the lapsed leases of runs whose ID contains>(a session's or a sub-agent's run), which no recovery pass takes over, so a worker that died mid-turn does not leave a lease every later lapsed pass reads.MemStore, SQLite and Postgres implement it, andstoretest'sLeaser_ReapLeaseschecks it. A customLeasermust do the same (#137).
Tools (P12)
- Breaking:
agent.Safetyis plain data,{ReadOnly, Idempotent}: comparable, and journaled. The approval gate isToolSpec.Approval, set withagent.WithApproval(agent.SingleApproval())(forSafety{RequiresApproval: true}) oragent.WithApproval(&agent.ApprovalPolicy{...})(forSafety{Approval: ...}).ApprovalPolicyencodes asneedandapprovers(#117). - Breaking:
agent.ToolHandlerisfunc(ctx, ToolCall) (json.RawMessage, error): tool middleware readscall.Useandcall.Spec, and passesnexta copy with otherUse.Argsto rewrite arguments (#117). - Breaking:
agent.Request.Toolsis[]agent.ToolSpec, sorted by name, andToolsDigesttakes[]ToolSpec(the digest is unchanged) (#117). - Breaking: a tool result's
read_onlyfield is replaced bysafetyandapproval(Record.ReadOnlyis replaced byRecord.Safety, andRecord.Approvalis new); a result journaled by an earlier pre-release carries nosafety, so a rollback over it treats every completed call as a write (the safe reading); resuming across pre-releases is not guaranteed (the journal format staysbide.journal.v1-dev) (#117). - Breaking:
govern.EventTool(gov, EventToolConfig{...})andgovern.FederatedEventTool(gov, FederatedEventToolConfig{...})replace their positional forms;audit.AttenuatingSubAgent(name, description, sub, AttenuationConfig{Store, Narrow, Rules}, opts...)replaces its positional form (#117). - Breaking:
mcp'sToolsfails withErrProtocolwhen a server lists a tool whoseoutputSchemais not an object schema (a null one is no output schema) (#117). - Breaking: new construction panics, each with an error wrapping
ErrConfig:audit.AttenuatingSubAgenton a nilAttenuationConfig.StoreorNarrow, or an optionagent.SubAgentrefuses;govern.EventToolandgovern.FederatedEventToolon an invalidagent.ToolOptionin theirOptions(andEventToolonAttestedwith an emptyPolicyDigest) (#117). - Breaking:
mcp.WithSafetysets onlyReadOnlyandIdempotent; gate an MCP tool withmcp.WithApproval.WithCallTimeoutalso sets the tool'sToolSpec.Timeout, which the agent applies (#117). - Breaking: only
agent.SingleApproval()asks for the one-decision gate; it is a distinct value, never inferred from a policy's shape, so anApprovalPolicyliteral with no approvers ({Need: 1}included) isErrConfig, inagent.WithApprovalandmcp.WithApproval.ApprovalPolicy.Clonecopies a policy, aSingleApprovalincluded.ApprovalPolicyhas an unexported field, so an unkeyed literal (ApprovalPolicy{2, approvers}) no longer compiles: name the fields (#117). - Breaking: tool middleware passes
nexttheToolCallit was given (or a copy with otherUse.Args); a call whoseUse.NameorUse.IDit changed, or aToolCallit built itself, fails withErrConfigand the tool is not called (#117). - Breaking:
SagaAborted.UnknownOutcomelists saga steps that failed with an unknown outcome (a retry-safe step that returnedErrToolOutcomeUnknown, or an error after its deadline), which may have committed; their failure records carryoutcome_unknown. The rollback reports them rather than take them for steps that changed nothing, and does not run their compensators on a result they never returned (#117). - Breaking:
Newrefuses (asErrConfig, before any model call) a tool that unwraps (Unwrap() Tool) and is aCompensator, and one that wraps a sub-agent and has aTimeoutor gives it anotherSafety(#117). Newvalidates every tool'sToolSpec.Approval: a policy a customSpec()returns that no option would build (aSingleApprovalwhose fields were changed, an m-of-n policy with no approvers) fails every run withErrConfigbefore any model call, where it used to be approved, fire, and then fail to encode its result (#117).- Breaking: a decorator that embeds a tool (
struct{ agent.Tool }, overridingCall) has noSpecmethod, so its spec, read from the old method set, would have no approval gate and no timeout, and the gated tool inside would run ungated.New(and plan's tool check) now fails closed: a tool that embeds, at any depth, a tool with anApprovalor aTimeoutits own spec lacks isErrConfig("decorator hides the approval gate; implement Spec or Unwrap"). A decorator keeps them by implementingSpec, orUnwrap() Tool:SpecOfof a tool with noSpecmethod takesTitle,Output,ApprovalandTimeoutfrom the first tool on itsUnwrapchain that has one. The check walks the wholeUnwrapchain, inNewand in plan'sBuilder.Tool(atBuild) andRegisterTool(#117). - Behaviour change for
mcp.WithCallTimeoutusers: an error the server reports after the call's deadline (a late JSON-RPC error, a known failure) now has an unknown outcome under the agent's timeout rule, so a side effect records nothing and halts on resume instead of recording the failure. The agent cannot tell a late failure from a late answer to a call that took effect, and takes the safe side (#117). - The journal encodes
SingleApprovalas{"single":true}, the bide protocol's form (ApprovalPolicyhasMarshalJSONandUnmarshalJSON); m-of-n policies encode as before (#117). - The approval policy decodes strictly:
{"single":true}alone isSingleApproval;singlewith any other value or besideneedorapprovers, a policy with noneed, and duplicate, unknown or mistyped members areErrProtocol. That isApprovalPolicy.UnmarshalJSON, for a policy being configured or received; the approval inside a storedRecord(DecodeStoredRecord,DecodeRecord, and so a proof bundle'sRecord()) is read leniently, ignoring members this version does not know, so a journal a newer version wrote stays readable (#117). - A call that reached the base handler but returned before its tool's
Callbegan (a saga-arguments write cut off by the saga's cancellation) counts as not called: a per-call word, set by compare-and-swap immediately before the tool and sealed by the loop when the chain returns, proves no call began and none can (#117). - A tool call's state is terminal once the middleware chain returns (a refused call too), so a
nextleft running cannot reach the tool after the loop recorded the call; its saga arguments are journaled only once it reaches the tool, and "already ran" (ErrToolReinvoked) is decided by the compare-and-swap that begins the tool, so it is said only of a tool that began. Once the chain has returned, no invocation ofnextbegins the tool, even a retry-safe one an earlier invocation reached: it used to begin again after the call's result was recorded, and after a saga's compensation (found by the TLA+ tool-call model, T5) (#117). - Breaking (behaviour): a side effect whose tool began and did not itself fail is never recorded as a known failure. When the chain returns an error for it (a middleware turned its success into an error, or returned a retry's refusal, or left the call running) and the context is live, the error wraps
ErrToolOutcomeUnknown, nothing is recorded, and the run halts. TheToolMiddlewarecontract says so. Found by the TLA+ tool-call model. In a saga the same holds for a retry-safe step that changes state (Idempotent, notReadOnly): its failure is recorded with an unknown outcome and listed inSagaAborted.UnknownOutcome, never skipped by the rollback as a step that made no change; outside a saga a retry-safe tool's error stays an ordinary failure (#117). - In a saga, a compensable retry-safe step that changes state (
Idempotent, notReadOnly, aCompensator) journals its accepted arguments before each call whether or not a middleware changed them: the record is the step's "may have begun" marker, since such a step writes no attempt marker. When an earlier drive's attempt journaled it and left no outcome, a later known failure of the step (the tool's own error, a middleware's refusal,ErrToolNotCalled) is recorded with an unknown outcome and listed inSagaAborted.UnknownOutcome, and a rollback reports such a step that was later denied; within one drive the same holds for any retry-safe write a middleware ran again after an invocation that did not itself fail. A store fault writing that record (or a rewritten call's arguments) fails the run and records nothing, so a re-drive calls the tool; it used to be recorded as a known failure. Found by the TLA+ tool-call model (T3) (#117). - Breaking (behaviour): a result needs positive proof: a tool middleware chain that returns a result while any invocation of the call's tool is still running in the process (a middleware that left
nextrunning and answered itself, from a cache say; a sibling invocation; one a cancelled drive left behind, counted per run and call) has an unknown outcome (ErrToolOutcomeUnknown), so a side effect halts and a retry-safe saga step is listed inSagaAborted.UnknownOutcomeand never compensated, where it used to be recorded as succeeded and could be compensated before its effect landed. A saga rollback that re-runs a retry-safe step to learn the result to compensate, and gets an unknown outcome (a result check that rejects every success, say), reports the step inSagaAborted.UnknownOutcomeand finishes, instead of stopping on every drive. A rollback re-run that a middleware answered without reaching the tool is not taken for the step's result either. The count is read whatever state the chain ends in, so a re-drive's cache answer while the earlier drive's invocation still runs is unknown too (T6). Found by the TLA+ tool-call model (T4) (#117). - Tool timeouts are judged by the deadline itself (a context's error lags its timer), for the tool's timeout and the run's own deadline; only a call whose tool was actually called can be late or unknown: a call a tool middleware ended first is a known failure, and a tool whose deadline passed in the middleware is not started. Plan flows' Tool nodes apply the wrapped tool's
ToolSpec.Timeoutwith the same rule (#117). NextOnceKeyandSafety.Idempotentdocument that once keys are scoped to one tool call: a retry the model makes is a new call with new keys, so dedup across the model's retries needs a business key from the arguments (#117).
Construction under Build (P13)
- Breaking:
agent.WithRetrieval(r, k)is an agentOption, not a model middleware: the agent retrieves for the run's user message as a journaled engine step, at a drive's first model call, and every model middleware sees the request with the documents in it. Migration:a.Use(agent.WithRetrieval(r, k))becomesagent.Build(model, j, agent.WithRetrieval(r, k))ora.With(agent.WithRetrieval(r, k)). A retrieval outside an agent run no longer exists. The retrieval runs before the model middleware chain, so model middleware neither retries it nor prevents it:middleware.Retryno longer retries a failed retrieval (useagent.WithRetrievalRetry), and a model middleware that refuses the call (a policy gate, a spend cap) runs after the query has reached theRetrieverand the documents are journaled. A policy that must keep a query from the store wraps theRetriever(seeagent.RetrieverFuncand the RAG guide) (#127). - Breaking:
agent.RetrievalTool(name, description, r, k, opts...)takes the tool's name and description and the tool options, asFuncdoes;RetrievalOption,RetrievalNameandRetrievalDescriptionare removed (#127). - Breaking:
trace.Instrument(tracer, opts...)returns anagent.Option. Migration:trace.Instrument(a, tracer)becomesagent.Build(model, j, trace.Instrument(tracer))ora.With(trace.Instrument(tracer))(#127). - Breaking: the context decorators
agent.WithIdentity(ctx, id),agent.WithWaker(ctx, w)andagent.WithClock(ctx, now)are renamedContextWithIdentity,ContextWithWakerandContextWithClock(transitional), and theWithnames are the options. A value bound to the run's context takes precedence over the agent's option (#127). - Breaking:
agent.WithNow(aResolveOption) is replaced byagent.WithClock, andagent.StepSafetybyagent.WithSafety, which a tool and aStepboth take.WithClock(nil)isErrConfig(WithNow(nil)was ignored) (#127). - Breaking:
agent.Parallel(ctx, d, runID, tasks, opts...)takes the tasks as a slice and the concurrency cap asWithMaxConcurrency(n)(a negative n isErrConfig); the positionalmaxConcurrencyis removed (#127). - Breaking:
LeasetakesLeaseOptions,RecoverRecoverOptions andRecoverLoopRecoverLoopOptions.WithLeaseHolderandWithLeaseTTLfit all three;WithRecoverInterval,WithRecoverConcurrencyandWithRecoverErrorsfit onlyRecoverLoop, so passing one toRecoverorLease, which ignored it, no longer compiles (#127). - Breaking:
agent.RunScopeandagent.InSagaare replaced byRunInfoFrom:SubRunID(info.RunID, info.ToolUseID)is a call's sub-agent run ID, andinfo.Sagawhether its run is a saga. A saga rollback's re-run of a retry-safe call now carries that call'sRunInfo(it carried whatever scope the rollback's context held) (#127). - Breaking (behaviour): whether a tool call is in a saga is its own run's flag (
RunInfo.Saga). A plain run started from a saga's tool call (child.Runwith aSubRunForID) is not a saga, and neither are its calls: they no longer inherit the saga mode of the call that started the run, so such a run's compensable calls do not journal their accepted arguments, and its sub-agents run as plain runs. Start the sub-run withRunSagato keep it a saga. A sub-agent (SubAgent) called from a saga runs as one, as before (#127). - A programmatic sub-run is refused (
ErrConfig) once the tool call whose context names it (SubRunFor) has returned, so a goroutine that outlives its call cannot start a sub-run no call owns, which no rollback and noRecoverwould reach. In a saga, a programmatic sub-run's name must be at most 96 bytes once escaped, so its link can name it (#127). Agent.WithSystemPromptandAgent.WithSystemPromptFuncshare one slot: the later call wins (the function used to win whatever the order) (#127).- The system prompt function (
WithSystemPromptFunc) is called once per drive just before the drive's first model request, and not at all by a drive that sends none: reading back a finished run, or a resume whose pending tool calls pause or halt, no longer fails when the function does. A resumed turn's pending tool calls now run before the prompt function is called (it was called first, before them) (#127).
Recovery and leases
- Breaking:
agent.RunFilter.Admitstakes a third argument,lapsed func() bool, which reports whether the run's lease has lapsed; it is called only when the filter setsLeaseLapsed(#126). - Breaking:
agent.Leaserhas a fourth method,ReapLeases(#126).
Delegation
audit.AttenuatingSubAgentreuses the grant a resumed delegation journaled instead of minting another, journals a delegation that ran without a grant, and refuses a delegation resumed under other authority, from an expired bound grant, or onto a sub-run that has records but no journaled authority, with anErrConfigthat records nothing (the run stops once siblings in flight finish; a sibling's pause is joined to it), so a re-drive under the right grant continues it. A delegation cannot run past its grant'sNotAfterUnix: every tool call in its sub-run is refused, recorded, once the child grant has expired, and a delegation resumed after its journaled grant expired fails, recorded (a saga rolls back). A child grant's subject must be the sub-agent's name. Its rollback binding verifies the journaled grant (signature under the bound signer's key, attenuation of the bound parent, its subject) and stops withErrConfigwhen no grant and signer are bound. A failure to read or write the delegation's authority in the store records nothing, so a resume retries the delegation, as for a plainSubAgent; only value records count as journaled authority (#117).- Breaking (journals): a saga journaled by an earlier pre-release that holds an ungranted
audit.AttenuatingSubAgentdelegation cannot be rolled back after the upgrade: its sub-run records no authority, and the rollback stops (ErrProtocol) rather than guess. Finish or roll back such sagas before upgrading; journals are not promised across pre-releases (#117).
Performance
- The counting-store budget (docs/design/api-v1.md, 10.3) is raised by P14's reads, a maintainer decision: every model turn after a drive's first costs one more
Get(run:cancelled), a side-effect call one more (run:cancelledonce its claim is won), a completion one more (two on a saga: the end markers read back), and a recovery pass fourGets per driven run (itsrun:start). The #138 review added oneLoadafter a first drive writesrun:start(and after a limit amendment), reading the entries' names only; a sub-run's checks read its tree root's cancellation (up to twoGets each); a flow node that runs readsrun:cancelled(oneGet), and a flow's completion and its resumed open read the end markers. Over a transitionalDurablewith noJournal, each of these reads is aHistory(P14, #138). - A recovery pass costs less than it did before P14 although it reads each driven run's
run:start(rule 14): the commonest start (a plain text agent start, with or without its kind) is read without the JSON decoder, exactly, its salt checked as the full decoding reads it (anything else takes the JSON decoding, into a pooled record whose name, kind and salt are matched without decoding strings; a record with any member but those and its result, or one of them twice, takes the full decoding, so a start either path reads is the start the full decoding reads, which a fuzz target checks), and a leased drive starts its renewal goroutine at the first renewal (half the TTL) rather than with the drive, so a short visit (a halted run, a run over since the listing) starts none.BenchmarkRecoverPass10kagainstmainin the bench workflow's A/B on the final code: -33.6% and -30.8% time, -6.6% B/op, -5.9% allocs (runs 36957790848 and 36957793253; +95% with the first P14 draft). Every leased drive (Lease, a session turn) gains the renewer change. - P14's per-run reads (the
Loadafterrun:start, the turn boundary'srun:cancelled, the end marker's read-back) cost the closed-loop fanout scenario its tail onMemStore, whose one mutex every read and write takes: a drive's own cancellation checks and a writer's read-back no longer look the run up in the journal's known-runs set on a miss (the drive opened, or the writer just wrote to, the run),MemStorecopies entry data outside its mutex (entries are never modified once appended),run:startis encoded in one pass, the input in place (the bytes unchanged), and a drive grows its goroutine's stack once, before it starts (probeDriveStack, sized against the drive's stack need, whichTestDriveStackHighWaterpins), rather than twice deep inside it. The bench workflow's A/B againstmainon the final code (runs 36957790848, AMD EPYC 9V45, and 36957793253, AMD EPYC 7763; 21 interleaved runs per binary, medians):cmd/benchoverhead (mean, p90, p99) -2.5%, -30.4%, -37.5% and -1.9%, -16.7%, -14.3%; fanout -1.1%, -9.5%, -5.2% and -5.6%, -9.4%, -13.7%; benchstat (10 runs per ref)BenchmarkRunTurns+4.0% and +2.1% time, neither significant (p=0.165, p=0.280), +0.3% B/op, +0.9% allocs (8 per run);BenchmarkToolCallSideEffect-1.7% (not significant, p=0.796) and +3.3% (p=0.035) time, +0.5% B/op, +2.6% allocs (8 per call). Before these changes fanout was +3.4% to +10.6% at p99. - Breaking:
agent.Recordshrinks from 368 to 256 bytes, from the 384-byte Go size class to the 256-byte one, so each heap copy of a record (a decode, an encode, a store's put) is smaller. Two groups of rarely set fields move behind embedded pointers:*agent.ModelTurnholdsFinish,RawFinish,Model,PromptDigestandToolsDigest(set onStepModelrecords only), and*agent.ApproverSignatureholdsApprover,ApproverAlgandSignature(set on decisionsSubmitDecisionrecords only). Direct access to those fields no longer compiles. Migration: read them with the nil-safe methods of the same names (rec.Finish(),rec.Approver(), ...), which return the zero value for a record that carries none, and build a record withModelTurn: &agent.ModelTurn{...}orApproverSignature: &agent.ApproverSignature{...}. The journal encoding is byte for byte the same: the members keep their names, order andomitemptybehaviour, and existing journals decode as before. Measured A/B against main on two 4-vCPU runners (bench.yml, 21 interleaved runs per binary, AMD EPYC 7763 and 9V74): the overhead scenario ran +0.7% and +1.6% runs/s, mean latency -0.4% and -1.6%, p90 -1.0% and -9.1%, p99 -4.4% and -7.8%; the fanout scenario ran -1.4% and +1.2% runs/s, within the runners' noise, with mean, p90 and p99 within 2% either way. In the Go benchmarks (benchstat, 10 runs per ref),RunTurnsallocates 4.4% fewer bytes (73.2 to 70.0 KiB/op) andToolCallSideEffect6.0% fewer (26.1 to 24.5 KiB/op), with 1.3% more allocations (a model record'sModelTurnis its own allocation);RecoverPass10kis unchanged, and no time per op changed significantly (#140).
Governance (gsm)
- Upgrade: bide requires gsm v0.12.0 (
govern,govern/postgreslog,govern/redislog,govern/sqlitelog,examples/governandintegration; was v0.11.0), so an application that usesgovernbuilds with gsm v0.12.0. ItsBuildchecks every pair it checks for CC (every event pair, or only the pairs declared withIndependent) exactly, with no footprint shortcut, which fixes v0.11.0's gap for guards and effects that read another event's writes, and returns a machine only after the table oracle (and, within its fragment and cap, the rules oracle), generated from gsm's proof, re-checks it in-process (scope in known limitations). Upgrade impact, from gsm's upgrade notes: rebuild every machine, sinceBuildmay now reject one v0.11.0 accepted; event names, variable names and enum labels must be unique; closures (effects, repairs, morphism maps) must return states of their machine;Machine.MergeProjectionreturns an error for out-of-domain values;BuildOrSynthesizefalls back to synthesis only when the compensation failed; re-issue gsm certificates withCertify;Report.Stringtext changed;Buildcosts more (no measurable slowdown for the governance examples).PolicyDigestis unchanged, so anchored policy digests stay valid. A convergence verdict orConfluenceCertificaterecorded under v0.11.0 is not covered by the fix: rebuild and record a new one. The gsm machine gate pins ecaf453, the v0.12.0 release commit (#154). - Behaviour change:
govern.CertifyConvergencereportsConvergesonly for a machineBuildreturned (Report.Assuranceset). Under gsm v0.12.0 a machine can pass gsm's WFC and CC checks and still be refused by the in-process oracle gate (Report.OracleDisagreement); its certificate now saysConverges: false(#154). - Three governance examples declare the gsm rules of six registries with combinators instead of closures (
examples/govern/compose's inventory,coordination's two registries,mesh's three lines), so both of gsm's extracted checkers, not only the table checker, certify them in the gsm machine gate. Their behaviour and output are unchanged (#146). - The gsm machine gate's pinned gsm commit followed gsm's
main: 219dcaa, whose rules checker carries normalization-confluence#11's fixes (#147); 150133b, whose table checker carries normalization-confluence#12's speed-up (#149); c2eecd6, which runs the proof's table oracle in-process on every successfulBuild(gsm#12), so the examples also Build under it (#150); fcf884a, which records only the synthesized machines a program receives, not the candidate synthesis certifies (gsm#16), so the gate reads 23 machine records again (#151); and 031db4e, whoseBuildalso runs the proof's rules oracle in-process (gsm#17), so every registry the governance examples build withBuildis certified by both oracles (the synthesized machine incoordinationby the table oracle), with no measurable change in run time (#152).
Formal models, CI and dependencies
- The required Models job checks four configurations at a time (one TLC worker each) and, on a pull request, only the models whose
spec/tla/<model>/directory the pull request changes; the merge queue and main still check every model. The largest passing pull-request configurations of models 1, 2, 7 and 8 (1.4 to 2.9 million states) and two of model 1's liveness checks run nightly, each safety one with a smaller pull-request counterpart of the same invariants, so every path keeps a passing configuration and its vacuity run on pull requests. The job takes about 6 minutes, down from 9 to 15.5 (#132). - CI runs its two slowest jobs in parallel shards, with no check dropped: the Models configurations in six shard jobs by configuration directory (
check.sh's newTLC_DIRS), and the Linux Go tests in four jobs (the core'sagentpackage, the rest of the core, the other modules, and thenojsonv2run), each with the same flags as before. The required check names are unchanged: a final Models and Test (ubuntu-latest) job needs every shard and fails unless each succeeded (or nothing needed checking)..github/scripts/shards.shfails CI unless every module, every package of the split core and every pull-request configuration is in exactly one shard, naming the line to change, and its self-test proves it catches a missing, doubled or unknown entry. With every model and every module checked, the Models workflow took 3.5 to 4.1 minutes on this pull request's runs, against 7.6 to 7.8 on pushes to main and 9.8 to 10.7 in the merge queue before, and the CI workflow 5.2 to 6.0 minutes, against 7.5 to 8.4 on main (each from the run's creation to its last update) (#143).
Deprecated
- The string entry points are transitional (P14):
Agent.Run(ctx, runID, input string),RunSaga,RunResult,RunSagaResult,Stream,StreamSaga,AgentStream.Final,Session.SendandSession.SendOnce(strings), and the functionsRunTypedandRunTypedNative. The 1.0 rewrite removes them forRun,Stream,RunTypedandSession.Send/SendOncewith aMessageand run options (#138). agent.SpecOfis transitional: the 1.0 rewrite givesToolaSpecmethod, andt.Spec()replacesSpecOf(t)(#117).agent.Newand the builder methods (Use,UseTool,WithSampling,WithToolChoice,WithSystemPrompt,WithSystemPromptFunc,WithMaxTurns,WithTokenBudget,SetMaxConcurrency,WithApproverVerifiers,WithToolErrorRedactor) are transitional: the 1.0 rewrite removes them and renamesBuildtoNew. They still change the agent they are called on.Newkeeps its lenient checks; onlyBuildandWithrefuse a reserved tool name and a non-object input schema (#127).agent.ContextWithIdentity,ContextWithWakerandContextWithClockare transitional: the run API takes the identity, Waker and clock as run options (#127).
Removed
- Breaking:
Safety.IdempotencyKey(the SDK never called it;Idempotentsays the same, and the tool derives its own downstream key or usesNextOnceKey),Safety.RequiresApprovalandSafety.Approval(seeWithApproval) (#117). - Breaking:
agent.ToolSafety,agent.WithToolSafetyandagent.ToolErrorText: tool middleware readsToolCall.SpecandToolCall.ErrorText, and no tool data travels in the context (#117). - Breaking:
govern.AttestedEventTool; anEventToolConfigwith aPolicyDigestis the attested form. Migration:AttestedEventTool(gov, name, desc, event, digest, safety)becomesEventTool(gov, EventToolConfig{Name: name, Description: desc, Event: event, PolicyDigest: digest, Attested: true, Safety: safety}). The old form accepted an empty digest and still recorded the state digest and acting identity;EventToolConfig{PolicyDigest: ""}is the plain tool, which records neither, so a config that setsAttestedwith an emptyPolicyDigestis refused (EventToolpanics withErrConfig) rather than silently dropping the attestation (#117).
Fixed
Run API (P14)
plan: a Tool node called a tool whose context's deadline had already passed (its timer not yet run), which the agent's base handler refuses; it now fails withErrToolNotCalledwithout calling the tool (P14, #138).
Sessions
ResolveHaltRef's live-driver check leased everything before the first>of the halted run's ID. It did not see a live session turn's driver, which leases the turn's run (<id>>@turn/<n>), so it could resolve a call the turn was running, and it took a root run named like the session for a live driver (*HaltInFlight). It now leases the halted run's tree root: the turn's run for a session turn and every sub-run inside it, the root run otherwise, the runRunInfo.RootRunIDnames (#137, review R137-1).- A stale
Sessionhandle refused every new message for a turn another handle had finished: a handle whoseSendof that turn's message failed or paused kept the turn open in its own view, andSendof another message returnedErrConfigwithout reading the journal. It now reads the journal once before it refuses (model 12, finding S1) (#137). - Two callers on one
Sessionhandle sending one message (a redelivery, or a retry while the first still ran) recorded its turn twice, forSendand for oneSendOncekey: the second caller's append started past the slot the first had recorded and reloaded. A handle now skips the append of any run among the turns it has loaded (model 12, finding S2) (#137). - Two workers given one session message both drove its turn's run, and each counted only the spend it had seen, so a turn under
WithTokenBudgetspent up to its budget once per worker (twice its budget in the test). Over a store with leases one worker drives a turn at a time (model 12, finding S4) (#137).
Tools (P12)
agent.Newread a tool's spec twice, once for its name and once for the rest, so a tool whose answers differed had its calls decided by the second (#117).
Delegation
- A saga rollback did not recurse through a tool that wraps a sub-agent (
audit.AttenuatingSubAgent): the sub-run's compensable writes were left in place and the delegation reported uncompensated. A resumed tree's token budget missed such a sub-run's spend the same way (#117). - A saga rollback into an
audit.AttenuatingSubAgent's sub-run now compensates under the child grant and identity the sub-run journaled (none, if the delegation ran without a grant), never the parent's broader authority (#117). - A saga rollback into a resumed
audit.AttenuatingSubAgentdelegation whoseAttenuateFuncgave each grant its own ID stopped: the sub-run held two grants. The delegation now keeps its first grant (#117). - A saga whose
audit.AttenuatingSubAgentdelegations were minted under two grants (the root grant expired or was rotated between drives) could never finish its rollback: each journaled grant was verified against the one grant bound, and the walk stopped at the first minted from the other, whichever was bound. Bind every such grant (WithGrantandWithRollbackGrants); a journaled grant whose parent is none of them is still refused (ErrNotVerified). Minting from an expired bound grant now says to keep it bound for the rollback beside the live one (model 11, finding D1) (#133). - A saga rollback into an
audit.AttenuatingSubAgent's sub-run ran a retry-safe write of the sub-run again after the delegation's grant had expired: the rollback rebound the child grant without the mark the expiry guard checks. The mark is kept, and a re-run the guard refuses is listed inSagaAborted.UnknownOutcomeand the rollback goes on (model 11, finding D2) (#133). - An
audit.AttenuatingSubAgentdelegation under a grant bound with a nil or typed-nil signer (a nil pointer in theSignerinterface) panicked: a typed nil when it minted or resumed, a nil one when it resumed, and a nil one was recorded as a failure when it minted.WithGrantnow binds the grant with no signer, and the delegation is refused withErrConfigand records nothing;WithRollbackGrantsbinds nothing without a signer (#133). - A saga rollback skipped a sub-agent call with an error result (in a plain run inside the saga's tree, a sub-agent whose run failed after a compensable write), so the sub-run's writes were neither compensated nor listed. The rollback now walks a sub-agent call's sub-run whatever its result (model 11, finding D3) (#133).
Governance (gsm)
examples/govern/meshwas not convergent (each signal event set the level, so order mattered); gsm v0.11.0 wrongly certified it; signals now only raise the level (max), which commutes.TestSignalsCommutechecks every pair of signals in both orders, and the example no longer shows a line standing down, which no order-independent event can do (#145).
Recovery and leases
RecoverLooptook over a dead holder's run late when halted runs were listed before it: each pass visited every unfinished run in order, halted ones included, so the takeover waited about one visit per halted run, and a lease that lapsed just after the pass tried the run waited for the whole next pass (finding L1 of the run-lifecycle model, #124). It now runs a second loop on the same interval, with slots of its own, that drives only the runs whose lease lapsed, so a dead holder's run is taken over within about one interval of its lease lapsing however many halted runs the store holds. The full pass is unchanged and still re-drives halted runs and runs that held no lease (#126).
0.9.0 - 2026-10-01
Added
Formal models
- A TLA+ model of the claim protocol (attempt claims, not-started records, numbered retries, remembered claims, the resume gate, the Step flight and halt resolution), checked with TLC in CI by the new Models workflow, a required check on every pull request; see spec/tla (#100).
- The claim model also covers
ClaimAttempton a single key (plan flows), thependingClaimseviction, and a halt resolution running in a driver's process (#106); it follows the Store/Journal core as merged, including the claim on the lease path (#107). - The claim model covers the approval gate (1-of-1
Approveand m-of-nSubmitDecisiontallies) together with halt resolution (#108). - A TLA+ model of flow semantics (switch and loop replay, per-iteration keys,
run:complete,Flow.ResolveHalt), checked in CI (#110). - A TLA+ model of spend accounting (
@llm,@spend,@spend-late, hedged losers, two drivers), checked in CI (#111). - A TLA+ model of the bide protocol's claim rules for remote tool calls (claim at assignment, begin records, abandons), checked in CI (#112).
- The approval model covers approvers' key sets (refused on any overlap) and a verifier resolver that changes between the gate's check and its count (#115).
- The design and plan for formal models of the coordination protocols, docs/design/formal-models.md (#99).
Store and Journal
agent.Store, the storage port (Insert,Get,Loadof anEntrywith an opaque, commit-orderedSeq), with its requirements A1 to A8 documented on the type, andagent.Journalover it (NewJournal,Get,History,Records,Format): the journal owns memoization, the record encoding and salt, the journal format header, attempt claims, not-started records and recording an outcome after the caller's context is cancelled (#92).- The journal format header: every run's journal starts with an
@journalrecord (agent.StepHeader) namingagent.JournalFormat(bide.journal.v1-dev, the one tag every pre-release writes until 1.0, which switches tobide.journal.v1and refuses every pre-release journal); a run in another format, or with no header, is refused with*agent.JournalVersionError(wrappingagent.ErrJournalVersion) before anything is read or written (#92). agent.RunFilter(After,Prefix,ExcludeHolding), which SQL stores evaluate in their query (#92).agent/storetest: every store requirement (64 goroutines racing one name through three handles, prefix-closed reads, byte fidelity, context, iterator hygiene), the header checks, shared in-flight steps, claim reuse, record fidelity, andCheckWrapper, which checks, given at least two contexts that differ in what the wrapper reads from a context, that a store wrapper's mapping of run IDs and names does not depend on the context (A1), and its use ofUnwrap(#92).agent/agenttest.CountingStore, and a test that holds the engine to an exact budget of store round trips per operation (#92).Record.Raw(the stored bytes),Record.Salt(),Record.ClaimID(),Record.Format,Record.Redacted(the reserved redaction tombstone), andRecord.MarshalJSON, which writes the journal encoding (#92).store/sqliteimplementsagent.Leaser, on a lease connection of its own with a short busy timeout and expiry from the database's clock;Openopens a writer, readers and a lease pool (#92).store/sqlite.Newandstore/postgres.Newover a*sql.DB,WithTablePrefix, and a schema version row: a database with a newer schema is refused (#92).- Journals in one process over one store share in-flight steps. A claim whose insert failed (it may have committed) records that its attempt did not start, keyed by its claim (
attempt:not-started:<claim>:<marker>), so a re-drive in any process re-attempts the effect instead of halting over one that never ran. If that record cannot be written either (or is written and reported failed), the process remembers the claim, and the next claim of the marker in the process, or a resume that meets it, writes the record again; every claim takes a fresh id, so an effect never runs under a marker that is, or can become, recorded as not started.plan's conformance check ignores not-started records (#92). - Benchmarks
BenchmarkRunTurns,BenchmarkToolCallSideEffect,BenchmarkStep,BenchmarkRecoverPass10k,BenchmarkAnchoredInsert,BenchmarkSQLiteInsertandBenchmarkPostgresInsert(#92).
Pauses and halt resolution
agent.Pause, the sealed interface every pause satisfies, withagent.RunRef,IsPauseandAsPause. Its five kinds areApprovalPending,InterruptPending,SignalPending,TimerPendingandOutcomeUnknown; code outside the package cannot add one (#90).agent.ResolveHaltRef(ctx, store, HaltRef, Outcome, ...), one resolution for tool andStephalts, withOutcomeUnknown.Ref,HaltRef,OpRef,OpKind(OpTool,OpStep),HaltCause(HaltCrashed,HaltContended) andOutcome(whoseEvidencemarks the resolution reconciled). The 1.0 rewrite renames itResolveHalt(#90).- Verbs named for the pause they answer:
SubmitDecisionwithDecision,AnswerInterruptandEnqueue;agent.Wake(#90). agent.HaltInFlight,agent.HaltAlreadyResolved,agent.ErrAlreadyResolved(wrapsErrConfig) andagent.WithoutLiveDriverCheck(#90).
Flows
agent.RunStart.Kind(agent.RunKind:RunKindAgent,RunKindFlow) andagent.RunStart.Flow(agent.FlowRef): aplanflow's run recordsrun:startwith kindflow, its flow's name and its input as JSON, andRecordedStartreads them back. An agent run'srun:startrecords no kind, which reads asRunKindAgent(#103).plan.Flow.ResolveHalt:agent.ResolveHaltReffor a node of the flow, which first checks that the halt names a node of this flow, that the run is a run of this flow (its recorded start names the flow and its recorded topology digest is the flow's), and that a successful outcome decodes as the node's output type, since a resolution is final and one the flow could not read would leave the run unable to continue (#103).agent.ErrNoLiveAttempt(wrapsErrConfig) (#103).plan's fault-schedule exploration of flow lowering (crashes, store errors that did or did not commit, and cancellations at every write, across processes) as a permanent test, bounded by default (BIDE_EXPLORE=1explores every process plan) (#103).
Model calls and spend
agent.ModelCall(Request,Model,RunID,Turn),ModelCall.AddHookandModelCall.Attempt,agent.ModelResponse(Message,Usage,Finish,RawFinish) andagent.ModelAttempt(what a hook'sAftersees, includingDiscarded, the discarded spend a replayed turn reports) (#104).agent.CallModel(ctx, model, req, mw...)sends one model call outside an agent through the same model handler an agent uses: hooks, clipped request slices and the response checks (#104).- Model records journal
Record.Finish,Record.RawFinish,Record.Model(theModelInfoof the model that answered) and per-turnRecord.PromptDigestandRecord.ToolsDigest(agent.PromptDigest,agent.ToolsDigest: SHA-256 of the system prompt and of the tool set the turn was sent, after middleware).ModelInfohas JSON tags (#104). middleware.CostMeter.Snapshot()returns aCostSnapshot(Answer,Spend,AnswerUSD,SpendUSD) read under one lock (#104).trace.Modelrecordsgen_ai.response.finish_reasons; an empty reason is recorded asstop, as the journal records it (#104).agent.ModelCall.OnAnswer(key, fn):fnruns once per recorded turn with the turn's answer, after the journal holds it, however many targets or attempts a middleware sees; it reports whether the call belongs to a turn (#104).- A run that ends (completes, pauses or fails) waits, for at most two seconds in all and not past its context, for model requests still in flight (a hedge loser, a request a middleware left running) and journals their usage in a late spend record,
@spend-late/<id>, whichResult.Spend, the budget andReplaycount. A driver whose model record another driver of the run recorded first journals its request's spend there too (#104).
Proofs and signatures
audit.Signerandaudit.Verifiername their scheme with a typedaudit.Alg(an alias of the newagent.Alg) and exposePublicKey(), and aVerifierreports itsKeyIDs(), so everyaudit.Verifieris anagent.ApproverVerifier;audit.NewVerifierandParsePublicKey(andverify.NewVerifier) refuse a weak Ed25519 key (audit.ErrWeakKey);audit.NewVerifier(alg, pub),audit.VerifierOf(signer), and the<alg>:<hex>key text form (audit.FormatPublicKey,audit.ParsePublicKey). The standaloneaudit/verifypackage gainsverify.Head,verify.Verifierandverify.NewVerifier, and checks tree heads under ed25519, ML-DSA-65 and the hybrid (#105, #109).audit.ErrNotVerifiedandaudit.ErrMalformed(wrapsagent.ErrProtocol;audit.ErrFormatnow wraps it), the sentinels every verifier's error wraps (#105).audit.JournalExport(formatbide.audit.journal-export.v1) andaudit.ExportJournal: a run's journal as each record's stored bytes, the input ofbide-audit proveandprove-absent.audit.JournalLeafHash, the leaf hash a redaction tombstone records; a redacted record keeps its place in every tree (#105).- Format constants
audit.STHFormat,audit.AnchorEntryFormat,audit.GrantFormat,audit.JournalExportFormat;audit.EvidenceKind(a typed string) withKindRunCertificateandKindConsistency;agent.ReasonAlg(#105). agent.Decision.Algandagent.Record.ApproverAlg: an m-of-n decision is journaled with the scheme it was signed under (#105).
Approval key identity
agent.ApprovalPolicy.ValidateKeys,agent.ApprovalTally.Excluded,agent.ReasonSharedKey,agent.ReasonNoKeyID,audit.KeyID,audit.CheckEd25519PublicKeyandaudit.ErrWeakKey;KeyIDsonaudit.Ed25519Verifier,MLDSAVerifierandHybridVerifier(#109).
Documentation, testing and tooling
- The
RecoverLoopdocumentation (godoc, the recovery guide, known limitations) states that a dead holder's run is picked up within about one interval of its lease expiring only while a pass is short: a pass costs about five store round trips per unfinished run it lists, halted runs included, so a long pass delays pickup. Bounding a pass's cost follows v0.9.0. - The bide protocol (
bide.protocol.v1), an accepted design for SDKs in other languages, with its claim rules checked by model 2; not implemented yet (docs/design/protocol.md, #95). - The pre-1.0 API redesign proposal, docs/design/api-v1.md (#64); the roadmap adds bide underneath other agent frameworks (#102).
scripts/release.shpushes at most three tags per push,release-modules.ymlchecks a module tag on manual dispatch, andbench.ymlhas an A/B mode that runs two refs interleaved in one job (#101).- Tooling: a nightly Explore workflow (
.github/workflows/explore.yml, also on demand) runs the claim and flow-lowering fault-schedule explorations at their full bound (BIDE_EXPLORE=1) and keeps the schedule signatures (BIDE_EXPLORE_SIGS) as an artifact kept 30 days; it is not a required check (#119, #121). - The concurrent claim exploration is deterministic: its scheduler finds quiescence with
testing/synctestinstead of timers, runs one driver at a time, and branches on the races between drivers that share a step call in flight, so every run explores the same schedules (more than before, with each one the timing-based scheduler reached) and no longer slows or times out under CPU load (#118). bench.ymlandcmd/bench/README.mdreport latency as the mean (concurrency / throughput), p90 and p99; the p50 stays in the raw output only, since the closed-loop harness's p50 is bimodal (#116).
Changed
Store and Journal
- Breaking: every journal starts with the
@journalheader, soHistoryreturns it first and record indices (audit leaves,ProveRecord) shift by one; journals written by v0.8.0 and earlier have no header and are refused, not resumed (#92). - Breaking:
agent.Lister.Runstakes aRunFilterand returns an iterator of run IDs in ascending order;RecoverandRecoverLoopask the store for the runs holding no terminal marker and read none of the finished ones (#92). - Breaking:
agent.Capabilitytakes aStoreand followsUnwrap() Store; the engine still finds capabilities behind aDurable(#92). - Breaking:
Record.SaltandRecord.Claimare read-only: useSalt()andClaimID(); the journal sets them (#92). - Breaking: a
Stepthat is not retry-safe and returns a pause (Interrupt,Sleep,Await, a pending approval) isErrConfig; its marker stays, so its next attempt halts. Inside a tool call the error is not recorded as a tool failure, so the call halts on resume rather than being retried under a new id. Put the pause in a retry-safe step of its own (#92). - Breaking:
store/sqlitenames its tablesbide_steps,bide_leasesandbide_schema_version, andstore/postgresits leases tablebide_leases.sqlite.Openrefuses a file whose v0.8.0-or-earlier journal table (steps) holds rows, withErrJournalVersion, rather than open it as empty; Postgres refuses each such run on its first read, without writing to it. Stop every v0.8.0 (or earlier) node before starting this version: the two do not share leases, and v0.8.0 cannot read the new journals (#92). - Breaking: a store wrapper whose
DoandHistorycome fromMemStore, a SQL store or an embeddedagent.Durable(directly or through another wrapper) while itsInsert,GetorLoadcomes from elsewhere isErrConfigwhere aDurablegoes, since thoseDoandHistorywould write past its methods; passagent.NewJournal(wrapper)instead (#92). agent.Durableand theDoandHistorymethods ofMemStoreand the SQL stores are transitional: they go through a Journal over the store, so existing code keeps working.*JournalimplementsDurable.agent/durabletestisagent/storetestunder its former name (#92).MemStorehonors its context, and lists runs in order (#92).- A live tool result, a claim and a completion are written with one Insert, without a read first (#92).
- A
Stepthat loses its claim to a call of the step in flight in this process, and finds that call failed, halts withHaltContended(its claimant was live); aStepthat loses its claim with no call in flight still halts withHaltCrashed.ResolveHaltReffinds aLeaserthrough aJournaland through store wrappers, so its live-driver check uses the lease onstore/sqliteas onMemStoreandstore/postgres(#92). ResolveHaltRef(and its wrappers) claims the attempt after the live one before it records the outcome, on a store that leases runs as on one that does not, and returns*HaltInFlight(whose newAttemptfield names that attempt) if a driver holds it already, so a resolution cannot override a driver that revived a remembered claim and ran the effect: afterWithMinHaltAge, or under the lease, which a plainRundoes not hold. If recording the outcome then fails, the resolution's claim stays live, and the operation halts until it is resolved again (#92).- A
SagaAbortederror lists its uncompensated writes without saying each lacked a compensator: the list also holds a call whose outcome is unknown and a call whose tool is gone (#92). - The DST and reference-model crash suites inject their crashes at the storage port, under a Journal, so they cover the journal header, claims and not-started records;
agentalso carries an exhaustive fault-schedule exploration of the claim protocol, bounded by default (BIDE_EXPLORE=1runs the full exploration) (#92).
Pauses and halt resolution
- Breaking: the pause types are renamed:
PendingApprovaltoApprovalPending,InterruptedtoInterruptPending,AwaitingtoSignalPending,SleepingtoTimerPendingandResumeHalttoOutcomeUnknown. The old names stay as deprecated aliases until the 1.0 rewrite, so code that names the types or matches them witherrors.Askeeps compiling, but composite literals and the removed fields break: each type embedsRunRef(RunID,RootRunID), so a composite literal namesRunRef;Interrupted.KeyisInterruptPending.Name,ResumeHalt.ToolUseIDandToolNameareOutcomeUnknown.Op.IDandOp.ToolName, and the never-setAwaiting.Promptis gone (#90). - Breaking:
Waker.Schedule(ctx, Wake) error. A failed schedule fails the run with an error wrappingErrStorageand records nothing for the sleeping call (it used to pause with no wake registered), andRecoverLoopschedules it again on its next pass.MemWakerkeys a wake by itsRunIDandNameand resumes itsRootRunID(#90). OutcomeUnknown.Causesays why a run halted:HaltContendedwhen another driver won the claim during this drive, otherwiseHaltCrashed(no live claimant known to the halting driver, which is not proof). Breaking:ResolveHaltRef, and theResolveHaltandResolveStepHaltwrappers, refuse to resolve an effect a driver may still be running: on a store that leases runs they hold the root run's lease while resolving and return*HaltInFlightwhile a driver holds it; on a store that cannot (a custom store with noLeaser) they requireWithMinHaltAge(measured from the live attempt), unlessWithoutLiveDriverCheckis given; aHaltContendedhalt always requiresWithMinHaltAge. A resolution that conflicts with an outcome already recorded returns*HaltAlreadyResolvedinstead of nil (#90).ResolveHalt,ResolveStepHalt,Resumeand the channelSendare deprecated wrappers ofResolveHaltRef,AnswerInterruptandEnqueue(ApproveAs, the wrapper ofSubmitDecision, is removed below);ResolveHaltandResolveStepHalttake the cause asHaltCrashed(#90).- The loop,
Recover,RecoverLoopandMemWakerdetect pauses withIsPause(#90).
Flows
- Breaking:
planlowers every node ontoagent.Stepthrough the engine's step hook: a node runs as the Step named by its node key,node:<name>(node:iter:<n>:<name>in a loop body), so it has the Step's claim protocol (a fresh claim id, the not-started record, numbered re-attempts) and pause guard. A node that halts returns*agent.OutcomeUnknownwithOp: agent.OpRef{Kind: agent.OpStep, ID: "node:<name>"}, a pause thatRecoverLoopdoes not report as a failure, andagent.ResolveHaltRefclears it with the node's output. A node cancelled after its claim and before its body is re-attempted on the next drive instead of halting. A node's body that returns a pause from a node that is not retry-safe isErrConfig. A node reads the journal by point reads, never by loading the run.plan.HaltAmbiguousis removed (#103). - Breaking: the keys a flow writes change: a node's result is
node:<name>(was<name>), its attempt marker the Step'sattempt:step:node:<name>(wasattempt:<name>, aStepValuerecording{"retry_safe":...}, which is no longer written or read: the Step marker is itself the attempt's recorded safety), and a loop iteration's keys arenode:iter:<n>:<name>(wasiter:<n>:<name>). A retry-safe node writes no marker, so a node attempted as retry-safe and relabelled a side effect since runs again under a claim, as aStepdoes; a node attempted as a side effect still halts if it is relabelled retry-safe (#103). - Breaking: a flow's
Runrecordsrun:startbeforeflow:digest; resuming a flow run with an input whose JSON differs, under another flow's name, or driving it with anAgent(or a flow over an agent's run) isErrConfig, and records nothing.Conformrequiresrun:startto name the flow and recognizes the Step markers; it ignores the journal header and not-started records (#103). - Breaking: a flow's run records
run:completewith the flow's name and its output when its terminal node finishes, soRecoverandRecoverLoopskip it (they re-drove every finished flow run on every pass) andagent.IsCompletereports it; a later drive with the run's input returns the recorded output with one point read, whatever the flow's topology is now. AnAgentrefuses a finished flow run, and a flow a finished agent run (#103). - Breaking: a flow's input is compared with the recorded one as canonical JSON (keys sorted, each number as the exact decimal value it denotes, with no rounding through a float, so
1,1.0and1e0match and 2^53 and 2^53+1 do not), so decodingRecordedStart'sInputwithout loss and passing it toRunresumes the run (#103). - Breaking: a flow input whose JSON has a repeated object key, an escaped lone surrogate or invalid UTF-8 is refused with
ErrConfig, since two different texts would compare as one input; numbers compare exactly whatever the size of their exponent (#103). - Breaking: a
Step's value, and every other value the engine journals (an interrupt answer, a signal, a channel message, a timer's wake time, anAwaitFordeadline and outcome, a session's turn records, a saga's failure text, a resolution's evidence), is journaled without HTML escapes (<, not\u003c), as the journal encoding andResolveHaltRefwrite values, andResolveHaltRefcompares an outcome with the recorded one as JSON values (whitespace, key order, number spelling and string escaping aside), so resolving the recorded outcome again is not a conflict whichever way it was escaped (#103). - Breaking:
agent.Step, aParalleltask and a Step's resolution refuse an empty step name withErrConfig, inside a flow node or not (#103). - Breaking:
ResolveHaltRef(andResolveHalt,ResolveStepHalt) refuse an operation with no live attempt marker, one that never halted, withErrNoLiveAttempt, so a resolution cannot record an outcome for an effect that never ran (#103). - Breaking: an
agent.Steporagent.Paralleltask a flow node's body runs for the flow's run is recorded under the node's key (node:<node>:step:<name>, and per iteration in a loop body): a loop body's Step used to replay its first iteration's result in every later iteration, so its effect ran once (#103). - Breaking:
Conformreplays the run's routing from its recorded choices: a record of a node on an untaken arm, of a loop iteration the run did not reach, or of a node under the wrong kind of key (an iteration outside a loop, or a loop body node outside one) is a divergence, and so is a journal that records nodes withoutrun:startandflow:digest, a completed journal that lacks a node, choice or loop iteration its routing reaches, and arun:completewhose output is not the recorded output of the terminal node the run reached (compared as JSON values, so HTML escaping does not matter); a Step a node's body ran is recognized as the node's (#103). - Breaking:
Flow.Runrefuses (ErrConfig) the run IDsagent.Runrefuses: an empty one, or one in the form reserved for sub-agents and session turns (#103). - A loop whose body is one node (the head is the switched node) feeds the head its forward predecessor's value; it used to get a nil input (#103).
- Breaking:
node:,switch:andflow:are reserved step-name prefixes, so aStepinside a flow body cannot collide with a flow's records.ResolveHaltRef(andResolveStepHalt) accept a flow node's key as a step name (#103).
Model calls and spend
- Breaking:
agent.ModelHandlerisfunc(ctx, ModelCall) (ModelResponse, error), andMiddlewarewraps it. A middleware passes on the call it received or a copy with fields changed; the model handler refuses aModelCallbuilt from scratch withErrConfig, since it would drop the hooks outer middleware added.Request.MessagesandRequest.Toolsarrive clipped at every handler, so an append in one hedged branch never writes into another's backing array (#104). - Breaking: hooks are added with
ModelCall.AddHook(append-only) and have the signaturesBefore(ctx, ModelCall) errorandAfter(ctx, ModelCall, ModelAttempt); a hook whoseBeforereturned nil gets exactly oneAfter, also when a later hook'sBeforerefuses the request. The run's spend meter is not a hook, so no middleware can hide a request fromWithTokenBudgetorResult.Spend. Requests are numbered per turn across every retried attempt and hedged target (ModelCall.Attempt); a request is numbered when it reaches the model handler, before its Before hooks, so a request a Before hook refused keeps its number (#104). - Breaking: the stream sink is claimed by one request per turn at a time. A failed claimer releases it and the next claimer emits
TurnRestarted; when the turn's response is not the one that streamed (a hedge target that was not the claimer, a fallback, a cache), the agent emitsTurnRestartedand replays the response; nothing a request sends after its turn returned reaches the caller. WithHedge, the first target to start streams live, where before a hedged turn was delivered only once the winner was chosen (#104). - Breaking: an empty finish reason from a custom
Model, or in a response a middleware built, is recorded asFinishStop; a response a middleware built withFinishLength,FinishFiltered, an unknown reason, orFinishToolUsewithout a call is the error the model's own would be. The loop still decides whether to run tools from the message's calls, never from the reason (#104). agent.Replayends each turn with the finish reason and raw reason its record journaled, and reports the turn's discarded spend inFinish.Discarded, where it used to reach the run through the context;middleware.Coston a replaying agent counts it too (#104).middleware.Hedgeisc := call; c.Model = backupand has no streaming code;Retryloopsnext(ctx, call);RateLimitandCostadd hooks, and count requests outside an agent only throughagent.CallModel;trace.Modelnames the provider and model fromagent.ModelInfoOf(call.Model);WithRetrievaljournals through the call's run, not the context (#104).middleware.Costcounts each call's answer once, the response the agent records, wherever it sits: inside aHedgea losing target's response is no longer counted as an answer (#104).agent.Replayjournals the replayed turn with the model its original record named (Record.Model), not the replaying Model, also through a Model that wraps the replay model and forwards its events; late spend journaled before any turn is reported with the first (#104).- A model turn whose record write reports an error is settled from the journal: a record that landed is the turn's (its answer functions run, and the rest of the spend is late), one that did not is a failed call's
@spend/<id>, and when the journal cannot be read the spend and the answer functions are kept by the process for the run's next drive in it, which decides from the journal; a spend record whose write failed is kept and written by that drive too. Nothing is counted twice (#104). - The engine tells its own model record from another driver's by the salt the journal stamps (it draws that salt itself;
JournalEntrykeeps it), not by comparing content, so a tool call whose arguments are not compact JSON, text with invalid UTF-8, or two drivers' records equal in every field no longer make it take its own record for another's (#104). - Spend kept for a run's next drive is keyed by the store's identity, so any Journal over the store in the process sees it, and bounded at 4096 entries, oldest runs dropped first. It follows a Durable wrapper's
Unwrap() Durable(asaudit.AuditedStoreoffers) to the store beneath it, so the run's next drive through another wrapper or Journal over the same store sees it; the list of runs holding kept spend never outgrows the entries (#104). - A claim through a Durable the engine drives by its
Do(a wrapper such asaudit.AuditedStore) now behaves as through a Journal: a claim whose marker write fails records that its attempt did not start, and if that record cannot be written either the process remembers it, under the identity of the store beneath the wrapper, so the next claim or resume in the process writes it and re-attempts the effect instead of halting over one that never ran (#104). - A
Stepdriven through a Durable wrapper (such asaudit.AuditedStore) over a Journal follows the Journal's loser rule: a driver that lost the step's claim only joins a call of the step in flight and otherwise reads the result, and never starts a call, so the claim's winner in the same process cannot take the loser's halt as its own and halt (the claim model'sWinnerNeverHalts); a joined call that fails halts withHaltContended. (#104). Unwrap() Durableis a contract, asUnwrap() Storeis: only a Durable wrapper that passes run IDs and step names through unchanged may implement it, since the engine follows it for capabilities and for the per-run state the process keeps; a key-rewriting wrapper must not.storetest.CheckDurableWrapperchecks a Durable wrapper against it (#104).- The
DurableandStorecontracts state what the engine's accounting relies on: a record is written at most once under a name,fnis called at most once per record, and every record's bytes, its salt among them, are kept exactly (#104). - Breaking:
agent.Finishhas an unexported field (the replayed turn's marker), so an unkeyed composite literal of it outside the package no longer compiles; use field names (#104). - Breaking: spend records are keyed by a fresh id,
@spend/<id>(a replayed run keeps the original's), so two drivers of one run never write their spend under one key (#104). - Breaking: a request of a model turn that is over (its call already returned, so nothing would record it) is refused with
ErrConfig(#104).
Proofs and signatures
- Breaking: proofs commit to raw stored bytes. A journal leaf is its tag followed by the bytes the journal stores for the record (
Record.Raw), never a re-encoding, so a record written by a later release with fields this one does not know verifies.ProofBundle.Recordis replaced byRecordBytes(record_bytes, base64) and aRecord()method that decodes them leniently for display and role checks only;EvidencePackageandCurrentGrantProof.Leafcarry record bytes through their bundles.VerifyInclusiontakes the record bytes. A record built in memory has no leaf (#105). - Breaking: new artifact formats, and before 1.0 a verifier reads only the current one (an older artifact is
ErrFormat; re-create it from the journal):bide.audit.proof.v3,bide.audit.absence.v3,bide.audit.runcert.v3,bide.audit.current-grant.v3,bide.audit.event-inclusion.v3,bide.audit.evidence.v5,bide.audit.sth.v5,bide.audit.anchor-entry.v1. Grant canonical bytes arebide.audit.grant.v2(tag included in the signed and digested bytes), and event leavesbide.audit.event-leaf.v3.audit.UnmarshalStrictchecks the format of every artifact it meets, including one carried inside another, and wraps any other decoding error inErrMalformed(#105). - Breaking: STH v5: a
SignedTreeHeadcarriesformat(bide.audit.sth.v5) and always itsalg, and the scheme is part of the signed bytes.TreeHead.TimestampisTimestampNanos(timestamp_nanos). Each component of a hybrid signature signs its own label (bide.hybrid.ed25519.v1,bide.hybrid.mldsa65.v1) before the message, so a stripped ed25519 half verifies neither as hybrid nor as plain ed25519 (#105). - Breaking: every ed25519-only entry point takes a
SignerorVerifier:SignTreeHead(th, Signer) (SignedTreeHead, error)(SignTreeHeadWithand everyVerifyWithare gone),Sign(head, Signer) ([]byte, error),VerifySignature(head, sig, Verifier) error,SignAbsenceRoot(..., Signer, ts),Evidence(ctx, store, runID, Signer, ts, ...),EvidencePackage.Seal(Signer)andVerify(Verifier, ...),CertifyRun(ctx, store, runID, sth, RunCertSpec)withRunCertSpec.SignerandTimestampNanos(the signer must hold the key that signedsth),VerifyRun(cert, approved, Verifier),VerifyApprovals(..., Verifier),VerifyCurrentGrant(..., Verifier), andNewAuditedStore(inner, Signer, anchor) (*AuditedStore, error)(it no longer panics on a bad key). AnEvidencePackagenames its key as{alg, public_key}instead ofpublic_key_hex, andVerifyrefuses a verifier of another scheme or key (#105). - Breaking: verifiers return
error(nil means verified):SignedTreeHead.Verify,ProofBundle.Verify,AbsenceBundle.Verify,VerifyInclusion,VerifyConsistency,VerifyAbsence,VerifyEventInclusion,VerifyAnchorInclusion,SignedGrant.Verify,VerifyDelegationChain,VerifyCurrentGrant. The report verifiers (EvidencePackage.Verify,VerifyRun,VerifyApprovals) return their report and an error wrappingErrNotVerifiedwhen it is not OK.CheckTimestampandCheckTimestampOrdererrors wrapErrNotVerified(#105). - Breaking:
agent.ApproverVerifierhasAlg(),SubmitDecisionrequiresDecision.Alg, and the m-of-n gate (andTallyApprovals, soVerifyApprovals) counts a decision only when its journaled scheme is its approver key's. The deprecatedApproveAsis removed; useSubmitDecision(#105). - Breaking:
Grant.NotAfterisNotAfterUnix(not_after_unix), andGrant.Expiredtakes Unix seconds (#105). - Breaking: the stream event types (
TurnStarted,ModelEvent,AssistantTurn,ToolStarted,ToolCompleted,ApprovalRequired,Finished,TurnRestarted) and the model events (TextDelta,ReasoningDelta,ToolCallDelta,Finish) have snake_case JSON tags, and event leaves name their kind in snake_case (turn_started,model_event/text_delta); an event of an unknown type is refused (#105). - Breaking:
audit.PoliciesUsed(records) ([]string, error)andaudit.AbsenceRoot(records, set) (root []byte, size int, err error)return an error (audit.ErrRedacted,audit.ErrMalformed) for a journal they cannot project, instead of a set that silently omits a redacted record, so an auditor's recomputation cannot confirm a head that omits what the journal commits.audit.KeyFuncreturns the record's keys ([]string, nil for none), so one model turn adds a key per call it requested;ToolUseKeyandPolicyUsedKeyfollow (#105). - Producers and verifiers of proofs read every record by its stored bytes (#105): producers that project a journal (the absence key sets,
CertifyRun's used-policy set,EventLogFromJournalandPersistJournal) refuse one holding a redacted record with the newaudit.ErrRedacted, instead of omitting it (an absence proof of a redacted call, a certificate missing a redacted action's policy); a proof'srecord_bytesmust read one way to every JSON reader (no duplicate or case-variant names, invalid UTF-8 or escaped lone surrogates; unknown fields tolerated) or they areaudit.ErrMalformed; the tool-use key set also holds every call a model turn requested, attempt markers and saga failures, so a call that was started cannot be proven absent, a retry-safe call whose result was lost included; every producer and recomputation of a key set (NewAbsenceTreeHead,SignAbsenceRoot,ProveAbsent,ProveAbsentBundle,AbsenceRoot,PoliciesUsed,CertifyRun) checks each record's stored bytes as a proof does, and so doEventLogFromJournalandPersistJournal, so a record that reads two ways isaudit.ErrMalformedrather than projected one way; each projects what a record's stored bytes (Record.Raw, which the journal tree binds) decode to, and refuses a record whose fields do not say what its stored bytes say (audit.ErrMalformed) (event leavesPersistJournalwrote before a redaction keep the redacted content: redact the event trail too);VerifyAnchorInclusion,VerifyRunandEvidencePackage.Verifycheck the format of every artifact they carry, at any depth, on a Go value asUnmarshalStrictdoes on JSON (a run certificate's heads included, when the certificate is for another run andVerifyRunis never reached);VerifyApprovalsandApprovalEvidenceread the journaled tally withUnmarshalStrict, so a tally that reads two ways isaudit.ErrMalformed, and the gate reads a recorded tally by the same rule (a tally it cannot read strictly isErrStorage, and the tool does not run);bide-audit verify-approvalsrefuses an approver-key file that gives two ids one key, compared by key identity (KeyIDs), whether or not both ids are in the policy (exit 4). bide-audit verify-approvalstakes-approved/-approved-file, the allowlistverify-evidencetakes, so a package that carries a run certificate can pass (#105).- Breaking:
bide-auditreads keys as<alg>:<hex>(or bare ed25519 hex) for-pubkeyand the approver keys, reads aJournalExportfor-journal, and maps the audit sentinels to its exit codes:ErrNotVerifiedis 1,ErrFormatandErrMalformedare 4 (#105).
Approval key identity
- Breaking:
agent.ApproverVerifierhas a second method,KeyIDs() []string: the identities of the signing keys behindVerify, derived from the public key's bytes (one per key; a hybrid reports each component). A custom verifier must implement it. An approver whose verifier reports no key identity, including anaudit.Ed25519Verifierover a wrong-length key, used to count as unable to sign and is nowErrConfigat the gate (#109).
Removed
- Breaking:
agent.DetachModelSink,agent.EmitMessage,agent.WithModel(ctx, m)andagent.WithModelCallHook(ctx, h): the model call path carries no engine data in the context. UseModelCall.Modelto retarget a call andModelCall.AddHookto add a hook (#104). - Breaking:
middleware.CostMeter.Total,Usage,SpentandSpentTotal; useSnapshot(#104). - Breaking:
trace.WithSystemandtrace.WithModel; the chat span reads the provider and model from the call'sModel(agent.Describer) (#104).
Fixed
store/postgressends each lease call (AcquireLease,RenewLease,ReleaseLease) and eachInsertas one statement that Postgres commits before it replies, instead of a transaction ofBEGIN, the statement andCOMMITin separate round trips. A holder stalled between its statement and itsCOMMIT(a SIGSTOP, a suspended VM, a long GC pause) kept the lease row, or the run's insert lock, locked, so another node'sAcquireLeaseof the expired lease, or its next insert into the run, blocked for as long as the stall lasted instead of taking the run over one TTL after the last committed renewal. An insert now takes its position from<prefix>next_seq_v1(run_id), a VOLATILE plpgsql function thatOpencreates when it is missing: called inside the insert's one statement, it takes the run's transaction-level advisory lock (the key earlier versions used, so both queue on one lock during an upgrade) and then readsMAX(seq)+1with a snapshot taken after the lock, so inserts into one run queue instead of racing for a position.Opennever replaces the function and refuses one with another definition. A statement that a repeatable read or serializable deployment fails with a serialization failure (40001) is run again, reads included, so the default isolation still does not change the outcome. Retries wait a capped, jittered exponential backoff (1ms up to 100ms) and continue until the context ends, so a caller that needs a bound on a call sets a deadline.Openrefuses, withErrConfig, existing tables that lack a uniqueness the statements depend on ((run_id, seq)and(run_id, name)on the journal,run_idon the leases), since it never alters an existing table. The schema migration, the one remaining multi-statement transaction, setsidle_in_transaction_session_timeoutso a node stalled inside it cannot hold the migration lock (#113).govern/postgreslog.Appendis one statement for the same reason: a process stalled inside an append held the entity's advisory lock, and every other append to the entity waited for as long as the stall lasted. It takes its position fromgoverned_events_next_seq_v1(entity)the same way, its retries back off the same way, andOpenrefuses agoverned_eventstable without unique(entity, seq)and(entity, append_id)indexes, or a next_seq function with another definition (#113).store/postgresandgovern/postgreslogopen in a schema whose name has an upper-case letter: the next_seq lookup castcurrent_schema()toregnamespace, which folded the name to lower case. The lookups now readpg_catalog's tables by name with the statement's snapshot, never throughto_regclassorto_regprocedure(#120).Openin both packages uses one schema for every statement: the oneWithSchema(new instore/postgresand, as an option ofgovern/postgreslog.Open, in the log) pins, or else the first schema on the search path holding the store's steps table (orgoverned_events), else the first schema on the path, with a warning logged throughlog/slog, since discovery runs again at everyOpenand a role that can create a schema earlier on the path can redirect a restarting node.WithSchemarefusesinformation_schemaand everypg_name, and a pinned schema that does not exist failsOpenwithErrConfig;Opennever creates a schema. Every table reference, the next_seq call and the migration's DDL name that schema. Agoverned_eventstable in a later schema than an empty one is now migrated in place: the migration's unqualifiedCREATE TABLE IF NOT EXISTSused to create a second, empty table in the first schema and move the log to it.Openrefuses, withErrConfig, a first relation of that name that is not an ordinary or partitioned table: a view namedgoverned_eventsbefore the table had appends go through it to another table (#120).Openin both packages refuses a next_seq function owned by another role than the table's owner, or one withoutSET search_path = pg_catalog, pg_temp, withErrConfig. The statement check now tokenizes every statement and holds it to allowlists: calls only to listedpg_catalogbuilt-ins (a function named like an unreserved keyword,conflict, counts as a call) or to next_seq under its exact schema-qualified name, once, in a one-rowINSERTinto its own table; operators only asOPERATOR(pg_catalog.<op>)from a list, and no keyword operator orARRAYconstructor; relations only the store's own tables orpg_catalog's; casts only to listedpg_catalogtypes (a domain'sCHECKcan call anything); ASCII only outside literals; no comments, dollar quotes, backslashes, typed literals or semicolons (#120).RecoverandRecoverLoopcallresumeonly for a run that is still unfinished: holding the run's lease, the pass checks the terminal markers (run:complete,run:aborted,run:cancelled) again before it callsresume, so a run another driver finished after the pass listed it is left alone and not counted as re-driven (nor is a run whose check failed, which is reported). The check covers every driver that holds the run's lease; a finish by a driver with no lease, or during a stall past the lease TTL between the check andresume, can still reachresume, which replays the finished run. Budget: a recovery pass makes three point reads (Store.Get) for each run it drives; the finished runs the listing excludes still cost nothing (#114).- Tests: the multi-process HA harness in
store/postgresgives each cluster a schema of its own. Its workers' recovery passes walked every incomplete run the package's other tests left in the shared schema, so taking over a stalled worker's run slowed with that count rather than the lease TTL, andTestHA_MultiProcessStallPastTTLtimed out in the Integration job's second pass. Its wait for the take-over is now derived from the lease TTL, the recover interval and one drive (#122).
Security
- An m-of-n approval gate counts one seat per signing key. Two approvers whose verifiers resolve to one key let that key's holder meet the quorum alone; the gate now refuses such a policy with
ErrConfigon every evaluation,TallyApprovalsnever counts either approver,audit.VerifyApprovalsreturns an error, andbide-audit verify-approvalsexits 4. Found by the TLA+ approvals model (finding F5) (#109). Upgrading: the check covers tallies this version counts. A terminal tally already in a journal is reused, not recounted, so a passed tally recorded by an earlier version stands even if two of its approvers shared a key, and its tool runs when the run resumes. Journals are not promised to resume across pre-releases; before upgrading, finish the runs paused on an m-of-n gate, or audit each one that holds a recorded tally (audit.VerifyApprovalsunder the new rules refuses a shared key) and resolve it by hand if two approvers shared a key. - Weak Ed25519 public keys are refused.
crypto/ed25519accepts keys that are not canonically encoded, small order, or mixed order: under a small-order key (such as any of the identity point's four accepted encodings) anyone can forge a signature for any message, and a mixed-order keyA + Tis a second public key forA's secret, which gave one secret two approval seats.audit.Ed25519Verifier(and soHybridVerifier),audit.VerifySignatureandaudit/verify.TreeHeadnow verify nothing under such a key,Ed25519Verifier.KeyIDsreports no identity for it (so the approval gate refuses it withErrConfig), andbide-auditrefuses it as-pubkeyor in-approver-keys(exit 4). The check costs 1 to 4 ms of CPU per new key; results are cached (a 1,024-key LRU, single-flight), so an application that resolves Ed25519 keys from untrusted input should bound or rate-limit those lookups. Found in the adversarial review of #109. store/postgresandgovern/postgreslog, in v0.8.0 and earlier as well: three kinds of role could run their code with the store's privileges, and some could choose the run's lock key. A role withCREATEon the database could create a schema named like the store's role, which the default search path ("$user", public) puts first, at any time afterOpen, with anext_seqfunction (or, for v0.8.0, tables) that the store's unqualified names then resolved to. A role that can create functions in any schema on the search path, even one after the store's own (publicon Postgres 14 and earlier lets every role create there), could definehashtextextended(text, integer), which matched the lock callhashtextextended(r, 0)better thanpg_catalog's. And a role that can create operators in any schema on the path could define=fortext[]or foroidandregtype, whichOpen's catalog checks compared and whichpg_cataloghas no exact match for, so the operator ran at everyOpen,pg_catalogsearched first or not. Now every name in every statement is qualified: the tables and next_seq with the store's schema, and every function, type, collation and operator withpg_catalog(operators asOPERATOR(pg_catalog.<op>)); the statement check refuses anything else, keyword operators (LIKE,IS DISTINCT FROMand the like) andARRAYconstructors included; the next_seq functions qualify every name and operator in their body and also run withSET search_path = pg_catalog, pg_temp; andOpenchecks the function's owner and definition. WithWithSchema, the search path plays no part in which schema the store uses; without it, discovery still trusts every schema on the path, so pin the schema. The lock key's value is unchanged, so v0.8.0 nodes still queue on it during an upgrade. The stores trust the owner of their schema and every role that can create objects in it, as they trust the tables' owner; any role that can connect can still stall a run's inserts by holding its advisory key, as before (#120).
0.8.0 - 2026-09-30
Added
agent.RecoverLoopwithWithRecoverInterval,WithRecoverConcurrencyandWithRecoverErrors: runs recovery passes until its context ends, so a dead holder's runs are taken over without another call (#58).agent.ErrLeaseLost: a lost lease cancels the drive with a cause that wraps it; failed renewals retry every ttl/20 and give up at 3/4 of the TTL (#58).agent.ErrToolOutcomeUnknown: a call lost mid-flight on a tool that is not retry-safe records no result and halts on resume (#57).mcp.WithSafety,mcp.WithCallTimeout,mcp.WithMaxResultBytes,mcp.WithMaxDescriptionBytes, with defaultsDefaultMaxResultBytes(1 MiB) andDefaultMaxDescriptionBytes(8 KiB) and the errormcp.ErrResultTooLarge(#57).modeltest.ToolNamesconformance check for provider tool-name rules (#57).agent.StepNotStarted: a tool call orStepcancelled after winning its claim but before its effect ran is recorded as not started and re-attempted, instead of halting (#65).agent.Result.Spend,agent.Record.DiscardedUsage,middleware.CostMeter.SpentandSpentTotal: usage of retried, hedged and failed requests is journaled and reported (#55).agent.TurnRestartedstream event, sent before a retried attempt's output when the previous attempt streamed any (#55).agent.ModelCallHook,agent.WithModelCallHookandagent.WithModelfor hooks around every request and per-call model routing (#55).agent.ErrNegativeUsageandagent.Usage.Validate(#55).agent.ToolErrorTextandagent.RedactURLs, so middleware can record exactly the error text the journal holds (#54).agent.Capability[T]finds an optional store capability through wrappers;audit.AuditedStoreimplementsUnwrap(#66).agent.ResolveStepHalt,agent.IsReservedStepName,agent.SubRunIDandagent.ToolResultStep(#60).agent.FinishStop,FinishToolUse,FinishLength,FinishFiltered,ErrOutputTruncatedandErrOutputFiltered(#68).provider.DefaultMaxResponseBytes(32 MiB),provider.LimitResponseandWithMaxResponseByteson each model adapter (#68, #76).agent.Describer,agent.ModelInfoandagent.ModelInfoOf, implemented by the Anthropic, OpenAI and Gemini adapters (#76).Finish.Rawcarries the provider's own finish reason, andFinish.Discardedthe usage of discarded responses (#76).modeltest.CheckFinish(#76).agent.DecodeStoredRecordforDurableimplementations to read rows back (#68).audit.CheckTimestamp,CheckTimestampOrder,DefaultClockSkew,WithVerifyTime,WithClockSkew, andbide-audit -max-clock-skewand-max-input-bytes(#68).audit.PolicyLeafName,ConvergenceLeafName,GovernedPolicyDigestandaudit.ErrFormat(#66, #68).plan.BlockName,Arm.Named,Flow.DigestV1and the config safety valueside_effect(#68).RetrievalTooloptionsRetrievalNameandRetrievalDescription, so one agent can search several stores (#62).eval.ReportFormat,eval.ErrFormat,eval.MetricDirectionandRunOutput.TraceErr(#74).- A multi-process HA test harness on Postgres that kills, stalls and restarts workers (#58).
bide-audit -jsonand-version(#79).eval.CompareoptionsWithUnscoredToleranceandWithCaseSetMismatchAllowed,Comparison.Gate,ErrRegression,ErrInconclusiveandDirectionInconclusive(#78).- CI enforces doc comments on every exported identifier with
internal/tools/doccheck(#73). agent.RunStartandagent.RecordedStart: a run's input and entry point are journaled at its first drive and can be read back, for example by aRecovercallback (#70).agent.Record.ReadOnly(read_only): a tool result records whether its call ran ReadOnly (#70).- The library modules (
govern,store/sqlite,store/postgres,mcp,trace,codec/gcf,govern/sqlitelog,govern/redislog,govern/postgreslog) are tagged<dir>/vX.Y.Zwith each release byscripts/release.sh, so they install withgo get(#85). - CI checks that every Go block in the README and
docs/compiles against the current code, and that API listings match the packages, withinternal/tools/docsnip(#88).
Changed
- Breaking: journal keys for tool results, attempt markers, approvals, compensations and sub-agent runs encode the tool-use id (
tool:<id>, sub-run<parent>><id>); runs journaled by v0.7.0 do not resume (#60). - Breaking:
ResolveHaltresolves only tool calls; useResolveStepHaltfor aStep(#60). - Breaking: step names with a reserved engine prefix are
ErrConfig, run and session ids may not contain>,planstep names may not contain:, andRecoverskips sub-runs (#60). - Breaking:
Finish.Reasonuses the neutral valuesstop,tool_use,lengthandfiltered; a cut-off or filtered turn fails withErrOutputTruncatedorErrOutputFiltered, and any other reason withErrStreamProtocol(#68). - Breaking: a reply over the response cap fails with
ErrResponseTooLarge, and atool_useturn with no call fails (#68). - Breaking: tool arguments for
Func,SubAgentandfinal_answerdecode strictly: a missing required field, an unknown or case-variant name, a duplicate or trailing data isErrToolArgs(#61). - Breaking:
schema.Fordescribes whatencoding/jsondecodes (Unmarshaler,TextUnmarshaler, integer bounds) and returnsErrUnsupportedTypefor chan, func, complex and similar kinds (#61). - Breaking:
RunTyped[T]returnsErrConfigwhenTis not an object, andRunTypedNativeon Anthropic returnsErrConfig(#61). - Breaking:
WithRetrievalsends context as a user message just before the latest user turn, one JSON object per document, journaled once per run as@retrieval/<layer>;RetrievalToolandWithRetrievalpanic for k < 1 (#62). - Breaking:
WithTokenBudgeton a parent covers its sub-agents, andResult.UsageandResult.Spendreport the whole run, including earlier invocations and sub-agents (#69). - Breaking:
agent.EmitMessagetakes the turn'sUsage(#52). - Breaking:
planstep and join functions (Builder.Step,Join2,Join3,RegisterStep,RegisterJoin2,RegisterJoin3) take acontext.Context(#66). - Breaking: audit proof JSON uses snake_case names and a
formatfield (bide.audit.proof.v2and siblings,bide.audit.evidence.v4); verifiers reject other formats withaudit.ErrFormat(#66). - Breaking:
plandigests move tobide.plan.topology.v2, so flows started under v1 do not resume; config JSON decodes strictly, and a configsafetycan lower retry safety but not raise it or clear approval (#68). - Breaking:
planconfigs must state"version": 1(plan.ConfigVersion) and use snake_case keys (loop_max);TopologyJSON keys are snake_case andTopologyNode.KindisTopologyNodeKind; config parse errors wrapErrConfig(#75). - Breaking: signed tree heads need a positive nanosecond timestamp within the clock skew, empty evidence packages fail, and
bide-auditinput is capped at 256 MiB (#68). - Breaking:
ApprovalPolicy.Validaterefuses approver ids that are equal under Unicode normalization and case folding, and invalid UTF-8 (#68). - Breaking:
middleware.RetryandToolRetrywith n < 0 returnErrConfig;Quorumwith k above the voter count isErrConfig;EventLog.EventsreturnsErrProtocolon a gap in positions (#68). - Breaking:
eval.Judgepasses only on an exactPASS, and a failed run never passes (#68). - Breaking:
eval.RequiredRunsreturns(int, error), andeval.Runreturns an error for duplicate metric names (#53). - Breaking:
eval.Matchestakes a*regexp.Regexp,eval.AgentRunnerreturns(RunFunc, error),eval.Comparereturns(Comparison, error), andGovernanceHeldpredicates take a context (#74). - Breaking: the provider HTTP kit moves from
agentto the new packagemodel/provider(ClassifyHTTPError,ClassifyStreamError,NewSSEScanner,ParseRetryAfter,ToolResultCodec,JSONToolResultCodec,EncodeToolResultOrand others);WithToolResultCodectakes aprovider.ToolResultCodec(#76). - Breaking:
Finish.Reasonis the typedagent.FinishReason(#76). - Breaking:
evalMetric.Fnreturns(bool, error); a metric that cannot score a run leaves it unscored,MetricStatreportsScoredandUnscored, and reports arebide.eval.report.v2(#78). - Breaking:
bide-auditexit statuses follow one scheme: 0 verified, 1 not verified, 2 usage, 3 no verdict, 4 input unreadable or unusable (#79). - Breaking: a session's journal and turn runs move to
"<id>>@session","<id>>@turn/<n>"and"<id>>@event/<encoded key>"(from"<id>","<id>/t<n>"and"<id>/e/<key>"), so no run ID passed toRuncan name one:Run("chat/t0")and session"chat"'s first turn shared a journal, and whichever finished first handed the other its answer. A session journaled before this change opens empty. Session ids may contain/(#56 had refused it) and anySendOncekey is allowed;agent.IsSessionRunreports a session's run IDs, andRecoverskips them, since the session resumes a turn when its message is sent again (#86). - Breaking: every run journals
run:start(its input and whether it is a saga); resuming an unfinished run with another input, or throughRunfor a saga (orRunSagafor a run), isErrConfig, and so isSendOncewith a different input on a key whose turn is still open (#70). - Breaking:
planattempt markers record whether the node was retry-safe; a node re-runs on resume only if it was retry-safe when attempted and is now, and a marker written before this halts (#70). - Breaking: a recorded approval denial is final even if the tool's gate is later removed, loosened or made m-of-n (#70).
- Breaking: saga rollback treats a completed call as a write unless its result records that it ran ReadOnly, and reports calls whose tool is no longer registered as uncompensated (or halts on one attempted with no result) (#70).
WithTokenBudgetcounts discarded and failed requests;RateLimitandCostcount every request sent;Hedgeruns each backup through the inner middleware chain;Retryableno longer retriesErrTruncatedToolArgs(#55).- A resume halts on any attempt marker without a result, whatever the tool's current safety; a tool no longer registered halts instead of failing with
ErrUnknownTool(#57). mcp.ToolsreturnsErrProtocolfor malformed or duplicate tool names, non-object schemas and oversized descriptions; an agent with two tools of the same name returnsErrConfig(#57).Leaseclaims, renews and releases under a per-call token (<holder>#<token>), so drivers sharing a holder name do not share a lease (#58).ToolStartedfires immediately before the tool is called (#65).- The OpenAI adapter merges consecutive user messages into one turn (#62).
bide-auditexits 2 for stray arguments, unknown flags,-h, or both-tooland-index, and 3 when a-checkergives no verdict (#54).middleware.LogErrorTextlogs the journaled, redacted error text (#54).docs/KNOWN-LIMITATIONS.mdis rewritten for users, grouped by area with impact and workaround (#49).- The approval guide is now Human approval (human-in-the-loop) (
docs/guides/hitl-approval.md); the olddocs/guides/approval.mdand its site URL point to it.
Removed
- Breaking:
plan.Retryableand the config safety spelling"retryable"; useplan.Idempotentand"idempotent"(#75).
Fixed
store/postgresandgovern/postgreslogrun every write transaction at read committed, whatever the deployment'sdefault_transaction_isolation. At repeatable read or serializable, concurrent steps of one run failed with a duplicate(run_id, seq)(23505) because each insert computed its position from a snapshot taken before it held the run's lock, so a tool result could go unrecorded and the run halt on resume; racing nodes and lease calls failed with serialization errors (40001), and concurrent governed appends failed with 23505 or 40001 (#93).- A timer (
Sleep,WaitUntil,AwaitFor) inside a sub-agent registers its wake under a name qualified by the sub-run, so two sub-agents of one root waiting on timers of the same name no longer share one wake that the later replaced, which left the first sleeping past its wake time (#91). examples/signals: the Await scene's resumed run no longer fails with a reused tool-use id; the example's scripted model now decides from the conversation (#91).- Recording a step costs about half what it did:
MemStore.Dodecodes a record it writes once, and a message part is tagged with its type without a decode and re-encode. The journal bytes do not change. This restores thecmd/benchthroughput lost since v0.7.0 (#89). - Resuming a run that crashed after its final answer returns the recorded answer without another model call (#59).
Replaykeeps redacted reasoning, empty thinking blocks and Gemini thought signatures (#51).Replaycarries each turn's recorded usage, and a finish reason derived from the turn, so a replayed run stops at the same token budget (#52).- A hedged stream's
Finishcarries the winner's usage (#52). - A response substituted by middleware or a hedge backup is checked for missing or reused tool-use ids (#55).
NewRateLimiterwith a non-positive interval does not block, and a cancelled call keeps its token (#55).- One
*Sessionshared by concurrent callers is safe, and a resumed session turn keeps the transcript it started with (#56). - An MCP result carrying only
structuredContentreaches the model (#57). - A retry-safe
Stephalts when an earlier side-effect attempt left a marker (#57). - SQLite and Postgres record a step's outcome even when the driver's context is cancelled while the step runs (#58).
LeaseandRecoverreturnErrConfigfor a non-positive TTL instead of panicking (#58).- The lease renewer stops before the lease is released (#58).
- A tool-use id containing
/,:or an engine key name no longer collides with other journal records, and aStepcannot mark a run complete by its name (#60). Recoverno longer hands sub-runs to the resume callback (#60).Lease,RecoverandRecoverLoopfind theLeaserandListerof a store wrapped inAuditedStore(#66).- Saga compensation undoes the arguments the tool accepted after middleware, including in rollback re-runs (#67).
RunTypedreturns the argumentsfinal_answeraccepted, and its text fallback decodes the final turn (#61).schema.Forterminates on recursive named maps and slices and on self-referential pointer types (#61).- Retrieved context stays in every model call of a run, including after resume, and a retrieved document cannot forge another entry (#62).
- A non-finite retrieval score is reported as 0 (#62).
- A panicking model or tool call marks its span failed without exporting the panic value (#54).
- A turn cut off at its token limit or stopped by a filter is an error, not the run's answer (#68).
- Stream parsers reject a second call at the same index, Anthropic deltas for unknown or stopped blocks, and OpenAI choices other than index 0 (#68).
- A negative or overflowing
Retry-Afteris clamped (#68). - Model text quoted in errors is bounded (#68).
- In-process step keys are length-prefixed in
MemStore,MemWakerand the SQL stores, so run ids and step names cannot collide (#68). - Event-log reads detect a missing position, and a negative
Appendposition isErrProtocol(#68). Quorumchecks that each recorded vote names its slot's voter and recomputes the tally (#68).planrefuses empty node and join names, and edges into a join other than its declared inputs (#68).- Mermaid labels are entity-encoded (#68).
WithMinHaltAgetreats a non-positive attempt timestamp as missing (#68).- Signing with an ed25519 key of the wrong length fails before anything is written (#68).
eval: a repeated tag no longer double-counts, Wilson bounds are exact at 0/n and n/n, andHashCasesreports encoding errors (#53).eval.AgentRunnerreports a failed journal read, and trajectory metrics fail such a run (#74).chaos.Verifyalso requires a completed run to fire exactly once (Report.Missed), andBide().Writes()counts the completion marker (#53).cmd/benchrejects non-positive-runsand-concurrency(#53).- The example store in the extension-points reference records through
agent.JournalEntry, so it salts every record and passesagent/durabletest(#87).
Security
bide-auditchecks that each bundle is a record of the role it is read as (#68).bide-audit -pubkeyalways reads a 32-byte hex value as the key, never as a file name (#68).audit.VerifyAnchorInclusionbinds an entry's sequence and run to its proof, andverify.TreeHeadrefuses the head shapes theauditpackage refuses (#68).EventLog.AddandVerifyEventInclusionrefuse invalid UTF-8 (#68).- One strict reader (
audit.GovernedPolicyDigest) decodes the governed-action digest for both the agent andbide-audit(#68). bide-audit verify-quorumrejects a tally that lists one voter twice (#54).- With content capture on, trace spans and
ToolLogrecord the redacted error text the journal holds (#54).
0.7.0 - 2026-09-29
Added
agent/durabletestconformance suite forDurablestores, and one journal encoding (agent.EncodeRecord,DecodeRecord) used by every store (#36).- Salted journal records (
Record.Salt,agent.JournalEntry) and salted event-log leaves (bide.audit.event-leaf.v2,agent.ProjectEvents), so a proof discloses nothing about neighbouring records (#42, #46). Agent.WithToolErrorRedactor; URL credentials are redacted from tool error text before it is journaled (#42).middleware.ErrorSummaryand theToolLogoptionLogErrorText(#42).audit.VerifyCurrentGrantandProveCurrentGrantfor a current-grant ledger (#35, #40).governApplyOnceon every governor, andagent.NextOnceKeyfor exactly-once operations inside a call (#34, #40).ErrQuotaExhausted,ErrResponseTooLarge,ErrStreamProtocol,ErrToolUseIDReusedandagent.ClassifyStreamError(#41, #44).schema.Gemini,schema.ErrStrictUnsupported,openai.WithMaxCompletionTokensandmodeltest.ToolConfig(#36, #41).- Fuzz targets for the SSE scanner, adapter stream parsing, journal encoding, strict JSON, every audit verifier, the
planconfig loader and the GCF codec (#44). govulncheckin CI (#38) and a manual Benchmark workflow on a standard runner (#45, #47).- How bide is verified (#32).
Changed
- Breaking: audit heads sign
bide.audit.sth.v4with versioned, salted leaves and commit to their tree kind and run; re-anchor heads made with earlier versions (#35, #40, #42). - Breaking: new signatures for
VerifyRun,VerifyDelegationChain(withScopeRules),SignAbsenceRootand the absence proofs,EvidencePackage(Seal,WithConsistencyFrom),ProveCurrentGrantandVerifyCurrentGrant(#35, #40). - Breaking:
EventLog.ProvereturnsEventInclusion, andVerifyEventInclusiontakes it (#46). - Breaking:
govern.EventLog.Appendtakes an append id,Governor.Applycan return an error,Quorumtakes a name, andbide-audit verify-quorumrequires-name(#34). - Breaking: Redis event-log keys are
govern:{<len>:<entity>}, and channel and quorum step names change; drain in-flight runs before upgrading (#34, #40). - Breaking: Postgres keeps its journal in a
bide_stepstable stored asbytea, with one position per step (#25, #36, #40). - Breaking:
agent.MemWaker.Startreturns a channel that closes when the loop has stopped (#24). - Breaking: a live model turn with a missing or reused tool-call id is an error, and Gemini tool-call ids are the provider's own or random (#41).
- Breaking:
schema.ForandOpenAIStrictcan return errors, strict schemas make optional fields nullable, andagent.Funcpanics on an argument typeForcannot describe (#36, #40). - Breaking:
RunTypedends at the first acceptedfinal_answer(#36). - Breaking:
plan.Buildrejects shapesRuncannot execute as declared, and approval-gated nodes (#30). - Breaking:
Stream.Eventsfails on any event after aFinish, and an Anthropic stream withoutmessage_stopis incomplete (#44). - Quota and billing exhaustion is
ErrQuotaExhaustedand not retried, andRetryableno longer retriesErrConfig(#41). - OpenAI sends
max_completion_tokenson api.openai.com and for o-series and gpt-5 models (#41). - With content capture off, trace spans and
ToolLogrecord an error's category, not its text (#42). - Signers,
AuditedStoreand the model adapters print a redacted string for every format verb (#42). audit.UnmarshalStrictuses onlyencoding/json, so bide builds withGOEXPERIMENT=nojsonv2(#37).- The SQLite store and event log wait up to 30s for another writer's lock (#29).
golang.org/x/textis v0.39.0 instore/postgresandgovern/postgreslog(#38).- Published benchmark numbers come from the Benchmark workflow and a labelled Mac run (#47).
Fixed
- A losing driver is never told it won a step when its reload fails (#25).
- Postgres keeps records byte for byte, accepts NUL and invalid UTF-8, and gives each step its own position (#25, #36).
Leasereleases on shutdown instead of holding until the TTL (#25).- A resumed run sends the model the same bytes the live run did, on every store (#36).
- A cancelled
Stepdoes not start (#24). - A pause in one parallel tool call lets its siblings finish and record their outcomes (#26).
- Saga rollback covers calls its abort cut off, including sub-agents, and reports idempotent writes without a compensator (#27).
- A pause or halt inside a sub-agent carries
RootRunID, and aSleeporAwaitForin a sub-agent wakes the root (#28, #34). Recoverskips a saga whose rollback finished (#31).planresumes only under the flow a run started with (#30).- A tie for the most votes is never quorum agreement (#33).
- An unknown governed event name is rejected before it is appended (#34).
- Governed appends and
EventToolcalls land once when retried (#34). AwaitForrecords its outcome once per call (#34).- Channel names containing
:no longer read each other's messages (#34). - Each
Quorumin a run keeps its own tally (#34). - Two applies inside one tool call are both recorded (#40).
- SQLite and Postgres event-log migrations are safe under concurrent opens, and Postgres opens take no table lock when the schema is current (#40).
- The Redis event-log script works on Redis Cluster (#40).
- A negative Merkle leaf index is rejected (#35).
- Wrong-length keys verify nothing instead of panicking (#35).
codec/gcfcarries integers above 2^53 exactly and rejects trailing data (#36, #44).schema.Foragrees withencoding/jsonon promoted fields,,string, arrays and embedded pointers (#36).RunTypedends atfinal_answerand does not fall back to unrelated prose (#36).- Gemini requests group parallel tool results, skip empty parts and carry thought signatures (#41).
- Anthropic requests keep
redacted_thinkingblocks and tools undertool_choice"none" (#41). - Empty OpenAI tool arguments are sent as
{}(#41). - An OpenAI or Gemini turn ends only on the provider's finish signal, not on a chunk carrying usage (#44).
bide-auditdecodes committed leaf content strictly (#44).
Security
- Journal heads and absence heads are signed under distinct domains, so a head for one tree cannot prove absence from another (#35).
VerifyRunrequires the used-policy head to belong to the certificate's run, with an auditor-supplied allowlist (#35).EvidencePackage.Verifychecks every field and authenticates the run id (#35).- Delegation chains enforce issuer continuity, expiry and full scope attenuation; demoted earned-authority grants stop verifying (#35, #40).
- Records and grants with invalid UTF-8 are refused, and audit bundles are decoded strictly (#35, #40).
golang.org/x/textv0.39.0 fixes GO-2026-5970, reachable fromstore/postgresandgovern/postgreslog(#38).
0.6.0 - 2026-09-28
Added
agent.StepSafetyandTask.Safetyto declare a durable step retry-safe (#18).Session.SendOnceanswers each inbound message once per key (#20).Agent.WithTokenBudget, rebuilt from the journal so it holds across resume; each model call's usage is recorded with its turn (Record.Usage) (#15).Usage.TotalInputTokensandUsage.TotalTokens(#14).agent.ToolSafety,agent.WithToolSafety,Safety.RetrySafeandErrToolReinvoked(#16).agent.NewStreamFuncandStream.Close(#12).agent.ErrIncompleteResponse(#13).model/modeltestconformance checks for adapter streaming (#12, #13).mcp.TrustAnnotations(#21).
Changed
- Breaking:
middleware.TokenBudgetis removed; useAgent.WithTokenBudget(#15). - Breaking:
agent.Stepis a side effect unlessStepSafetysays otherwise: it claims an attempt marker and halts after a crash (#18). - Breaking:
Parallelrequires unique task names (#18). - Breaking:
Usage.InputTokensis the uncached input on every provider (#14). - Breaking:
eval.Runreturns(Report, error)(#19). - Breaking:
mcp.Toolsapplies server annotations only withTrustAnnotations()(#21). ToolRetryretries only retry-safe tools,ToolCachecaches only read-only tools, and a tool that is not retry-safe runs once per call whatever the middleware does (#16).- Breaking out of
Stream.Eventscloses the stream (#12). Session.Sendrecords which message started each turn; a different message while a turn is open isErrConfig(#22).
Fixed
MemWakerretries a wake whose resume failed (#10).- A cancelled tool call records no outcome, and a cancelled run stops before its next turn (#11).
- A stream the consumer abandons releases its HTTP response (#12).
- A response that ends without a
Finishis an error, not the answer (#13). - Cached tokens are counted once on OpenAI and Gemini, so cost matches across providers (#14).
trace.Modelreports total input tokens, including cached input (#14).- A token budget applies per run and has no data race (#15).
- A cancelled parent waits for its sub-agent to finish (#17).
- A crash after a
Step's effect does not repeat it (#18). - Each eval samples the model afresh, and a cancelled eval returns an error (#19).
- A session turn answers its own message, and concurrent handles lose no turn (#22).
- A run's anchored tree heads only grow, and a failed anchor publish is retried (01a9afd).
0.5.0 - 2026-09-28
Added
agent.ClaimAttemptandRecord.Claim: an exclusive attempt claim keeps side effects at most once when two drivers overlap (f71efd6).govern/eventlogtestconformance suite forEventLogimplementations (f3fd665).- Log-backed governors gain
Sync(ctx)(f3fd665). agent.DetachModelSinkandagent.EmitMessagefor middleware that delivers a chosen response to a streaming caller (317c98b).- CI runs the Postgres and Redis integration suites (afc0fe6).
Changed
- Breaking:
EventLog.Appendreturns the event's position, andEventstakes a starting position (f3fd665). - Breaking:
Applier.ApplyreturnsApplied{State, Position}, andFederatedApplier.ApplyreturnsFedApplied(f3fd665). - Breaking: the Postgres event log uses a
governed_eventstable; write Redis event-log streams only through the adapter (f3fd665). MemStorestores records as JSON and returns independent copies, like the SQL stores (4912fbf).- With backup models,
Hedgestreams only the winning response (317c98b).
Fixed
- Governors sharing an event log fold in each other's events as they act, and each governed action records its log position (f3fd665).
- The Postgres event log keeps each entity's events in a fixed order under concurrent writers (7efece5).
- A hedged stream cannot panic the process after the run ends (317c98b).
0.4.0 - 2026-09-28
Added
- m-of-n signed approval:
Safety.ApprovalwithApprovalPolicy,ApproveAs,ApprovalDecisionBytes,Agent.WithApproverVerifiersandPendingApproval.Quorum(78f8db6, 3262cd1). WithDecisionCheckonApproveAs, withErrInvalidApprovalandErrAlreadyDecided(3262cd1).audit.ProveApproval,audit.ApprovalEvidenceandaudit.VerifyApprovals, andbide-audit verify-approvals(78f8db6, 994721b, 3262cd1).- A
planconfigapprovalblock (78f8db6). examples/approval, a cross-process walk-through (994721b).SECURITY.mdwith a private reporting contact.
Changed
- Breaking: calling
Runon a finished run id returns its recorded answer; useSessionto continue a conversation (c6deb76).
Fixed
- Re-invoking a finished run returns its recorded answer without calling the model, so a repeated tool request cannot run again (c6deb76).
0.3.0 - 2026-09-28
Added
ResolveHaltoptionsWithMinHaltAgeandWithNow, the error*HaltTooYoung, andResumeHalt.AttemptedAt(#2).ResolveHaltoptionWithEvidence, recorded asRecord.ReconciledandRecord.Evidence(#2).- README translations in Simplified Chinese, Russian, Hindi and Arabic under
docs/i18n.
Changed
- The
bide-auditHomebrew formula inbide-ai/homebrew-tapis maintained by hand instead of by the release pipeline.
0.2.0 - 2026-09-28
Added
agent.ToolResultCodec,JSONToolResultCodecandEncodeToolResultOr, andWithToolResultCodecon the OpenAI, Anthropic and Gemini adapters (#1).codec/gcfmodule: opt-in GCF encoding of model-facing tool results (#1).bide-auditHomebrew formula (brew install bide-ai/tap/bide-audit).
0.1.0 - 2026-09-28
First public release.
Added
agent: durable agent loop on an append-only journal, with at-most-once side effects keyed by tool-use id (Agent.Run,RunResult,Stream,RunSaga,StreamSaga,Session).agent:Safetyclassification,ResumeHaltandResolveHaltfor unknown outcomes.agent: durableStep,Parallel,SubAgent, and sagas withCompensatedFunc.agent: typed output withRunTyped[T]andRunTypedNative.agent: human-in-the-loop (Interrupt,Resume,Approve), durable timers (Sleep,WaitUntil,MemWaker), and durable signals (Signal,Await,AwaitFor, ordered channels withSend,Receive,Ack).agent: crash recovery and leasing (Recover,Lease,WithLeaseTTL,WithLeaseHolder).agent:WithSystemPrompt,WithSystemPromptFunc,WithMaxTurns,WithSampling,WithToolChoice, prompt caching, and multimodal image input.agent: retrieval seams (WithRetrieval,RetrievalTool),Replay,RenderMermaid, and sentinel error classification.model/anthropic,model/openai(any OpenAI-compatible endpoint) andmodel/geminiadapters.store/sqliteandstore/postgresdurable stores, withListerandLeaseron Postgres.middleware:Retry,Hedge,RateLimit,Cost,TokenBudget, per-attempt timeouts, and tool middleware (UseTool,ToolLog,ToolCache,ToolRetry,ToolRateLimit).trace: OpenTelemetrygen_aispans andtrace.Instrument.mcp: Model Context Protocol tools, with pagination, elicitation and tool-list changes.schema: reflection-based JSON Schema andOpenAIStrict.plan: typed flow builder (Step,Tool,Model,Edge,Switch,Join2,Join3,LoopBack), declarative config (Load), conformance checks and a topology digest.govern: convergent governed state on gsm, durable event logs (govern/sqlitelog,govern/redislog,govern/postgreslog), federation, identity binding andQuorum.audit: tamper-evident journal, RFC 6962 inclusion and consistency proofs, signed tree heads, proof bundles, absence proofs, ML-DSA signatures, anchoring (AuditedStore), run certificates (VerifyRun),EvidencePackage, signed grants and delegation (AttenuatingSubAgent, earned authority).bide-auditstandalone verifier, prebuilt for Linux, macOS and Windows on amd64 and arm64.evalstatistical evaluation harness,chaoscrash-injection harness, andcmd/bench.