Releases: hayabusa-cloud/cove
Release list
cove v0.1.2 — Step-indexed Kripke evidence
Introduction
cove is the context layer of the nonblocking I/O stack. Around a kont computation that is advanced one suspension at a time, cove keeps ambient state — dispatch budget, ring capabilities, protocol phase, buffer-group validity, and similar runtime facts — as typed, composable data instead of hidden globals or ad-hoc side maps.
The package is policy-free by design: it carries context, checks requirements, and exposes the current suspension boundary, but it never schedules, retries, classifies outcomes, or talks to the kernel. Those responsibilities stay with takt, iox, and uring.
The public surface covers a comonadic View, a SuspensionView boundary over kont.Suspension, contextual Cmd composition, closure and defunctionalized requirement algebras Req / ReqExpr, named diagnostics Rule / RuleExpr with Report, requirement- and rule-gated value carriers Checked and Guarded, and now a generic step-indexed Kripke evidence layer for contextual worlds.
v0.1.2 builds on the v0.1.0 contextual stepping release and the v0.1.1 source-contract documentation patch by adding the Kripke/world vocabulary needed to express finite contextual observations directly in cove while preserving the existing runtime boundary: cove checks evidence, but it does not become a scheduler or event loop.
Usage
type RuntimeWorld struct {
Epoch uint64
}
leq := func(w, next RuntimeWorld) bool {
return w.Epoch <= next.Epoch
}
canObserve := cove.Force(leq, func(w RuntimeWorld) bool {
return w.Epoch > 0
})
_ = canObserve.MonotoneAt(RuntimeWorld{Epoch: 1}, RuntimeWorld{Epoch: 2})
rel := cove.Relate(leq, func(w RuntimeWorld, n cove.StepIndex, value int) bool {
return uint64(n) <= w.Epoch && value >= 0
})
later := cove.Later(rel)
_ = later.Holds(RuntimeWorld{Epoch: 8}, 3, 4)
_, sv := cove.StepExprWithIndex(RuntimeWorld{Epoch: 2}, 2, expr)
var val int
for sv.Extract() != nil {
result := dispatch(sv.Ask(), sv.Op())
next := sv.Ask()
next.Epoch++
val, sv = sv.ResumeTo(leq, result, next)
}
_ = cove.CheckCompletedRelation(sv, val, rel)Highlights
This release makes cove the generic Kripke evidence layer for contextual observations. Callers can now name worlds, preorder extension, monotone forcing, step-indexed relations, guarded delay, indexed contextual observations, monotone indexed resume, and completed finite-trace relation checks without moving scheduler policy or runtime state ownership into cove.
The public release lineage remains additive: v0.0.0 introduced the coalgebraic context layer, v0.1.0 stabilized contextual stepping for kont suspensions, v0.1.1 clarified source-level contracts, and v0.1.2 extends that surface with Kripke evidence rather than changing existing behavior.
What's Changed
Features
- Add
Worldas the Kripke reading of an ambient context type. - Add
StepIndexas the finite approximation level used by indexed contextual observations. - Add
Preorder,Extends,DiscreteWorlds, andTotalWorldsfor world-extension evidence and local preorder checks. - Add
Transition,CheckTransition,CheckForcingTransition, andCheckInvariantTransitionfor concrete world-edge checks. - Add
ForcingandForcingExprwith monotonicity checks overReqandReqExpr. - Add
Relation,Indexed,Relate,Later,CheckRelation, and indexed weakening helpers for step-indexed Kripke relations. - Add
IndexedView,IndexedSuspensionView,StepWithIndex,StepExprWithIndex,ResumeTo, andCheckCompletedRelationfor finite contextual suspension observations.
Compatibility
- Go: 1.26+
cove v0.1.1 — clarify source-level contract docs
Introduction
cove is the context layer of the nonblocking I/O stack. Around a kont computation that is advanced one suspension at a time, cove keeps ambient state — dispatch budget, ring capabilities, protocol phase, buffer-group validity, and similar runtime facts — as typed, composable data instead of hidden globals or ad-hoc side maps.
The package is policy-free by design: it carries context, checks requirements, and exposes the current suspension boundary, but it never schedules, retries, classifies outcomes, or talks to the kernel. Those responsibilities stay with takt, iox, and uring.
The public surface covers a comonadic View, a SuspensionView boundary over kont.Suspension, contextual Cmd composition, closure and defunctionalized requirement algebras Req / ReqExpr, named diagnostics Rule / RuleExpr with Report, and requirement- and rule-gated value carriers Checked and Guarded.
v0.1.1 is a documentation-only patch on top of v0.1.0; the public API and runtime behavior are unchanged, but the exported Go-surface comments now state the existing contracts more explicitly.
Usage
type Runtime struct {
Budget int
}
_, sv := cove.StepExprWith(Runtime{Budget: 8}, computation)
for sv.Suspension != nil {
result := dispatch(sv.Ask(), sv.Op())
_, sv = sv.ResumeWith(result, func(r Runtime) Runtime {
r.Budget--
return r
})
}
// Completion clears the suspension; the carried context is preserved.
_ = sv.Ask()Highlights
This release turns three source-level contracts from implied knowledge into explicit exported documentation. The stepping APIs now state their inherited nil-completion rule directly, the command surface states its identity/composition law, and the Req bridge docs now make the lossy quotation/evaluation direction explicit.
What's Changed
Documentation
- Document the inherited nil-completion convention directly on
Step,StepExpr,StepWith,StepExprWith,Resume, andResumeWithinstep.go. - Document
Cmdas the contextual command / coKleisli surface incmd.go, including the identity and composition laws already enforced by the implementation. - Document
ReifyReq/ReflectReqinbridge.goas lossy quotation/evaluation helpers rather than structural inverses, including theReifyReq(nil)invalid-input hazard.
Behavioural Contracts
SuspensionViewremains affine: each suspension is consumed exactly once viaResume,ResumeWith, orDiscard.- Completion still preserves carried context: when stepping reaches the terminal boundary,
sv.Suspensionbecomes nil whilesv.Ask()still returns the ambient context. Step,StepExpr,StepWith,StepExprWith,Resume, andResumeWithstill inherit kont's nil-completion convention: a nil completed payload denotes completion with the zero value ofA.Cmdcomposition still followsCompose(g, f)(v) == g(Extend(v, f)), withExtractCmdas the identity command onView.ReifyReqstill quotes a closure predicate into an Expr atom without preserving original Expr structure on the round trip back throughReflectReq.
Compatibility
- Go: 1.26+
cove v0.1.0 - Contextual stepping for kont suspensions
Introduction
coveis the context layer of the nonblocking I/O stack. Around akontcomputation that is advanced one suspension at a time,covekeeps ambient state — dispatch budget, ring capabilities, protocol phase, buffer-group validity, and similar runtime facts — as typed, composable data instead of hidden globals or ad-hoc side maps.- The package is policy-free by design: it carries context, checks requirements, and exposes the current suspension boundary, but it never schedules, retries, classifies outcomes, or talks to the kernel. Those responsibilities stay with
takt,iox, anduring. - The public surface of
covepackage:Viewas the ambient carrier,SuspensionViewas the contextual observation boundary overkont.Suspension,Cmdfor contextual commands,Req/ReqExprfor context predicates in closure and data form,Rule/RuleExprplusReportfor named diagnostics, and requirement-gated value carriersCheckedandGuarded.
Usage
type Runtime struct {
Budget int
}
_, sv := cove.StepExprWith(Runtime{Budget: 8}, computation)
for sv.Suspension != nil {
result := dispatch(sv.Ask(), sv.Op())
_, sv = sv.ResumeWith(result, func(r Runtime) Runtime {
r.Budget--
return r
})
}
// Completion clears the suspension; the carried context is preserved.
_ = sv.Ask()Highlights
cove ships an explicit context algebra for kont suspensions without becoming a runtime. The surface covers contextual stepping, contextual commands, composable requirements (closure and data forms), named rule diagnostics with reports, requirement- and rule-gated value carriers, and bridge helpers between the closure and expression worlds.
Features
Public Surface
- Ambient carrier.
View[C, A]withObserve,Extract,Ask,Map,MapContext,Replace,WithContext,Duplicate, andExtend. - Contextual commands.
Cmd[C, A, B]withRun,ExtractCmd,LiftCmd, andComposefor command composition throughExtend. - Contextual stepping.
SuspensionView[C, A],ObserveSuspension,StepWith,StepExprWith,Step,StepExpr,Op,Resume,ResumeWith, andDiscardfor steppingkontcomputations under ambient context;MapContextSuspensionandWithContextSuspensionfor explicit context transport on already-observed suspensions. - Requirements.
Req[C]withNeed,Pullback,All,Any,Not,True,False;ReqExpr[C]withNeedExpr,ExprAtom,ExprPullback,ExprAll,ExprAny,ExprNot,ExprTrue,ExprFalseas a defunctionalized Boolean algebra over predicates. - Diagnostics.
Rule[C],RuleExpr[C],Report,RuleError,Require,RequireExpr,PullbackRule,CheckRule,CheckRules,CheckRuleExpr, andCheckRulesExprfor named, ordered diagnostic checks. - Gated values.
Checked[C, A],CheckedExpr[C, A],Guarded[C, A], andGuardedExpr[C, A]as requirement-gated and rule-gated value carriers, withGuard,GuardExpr,GuardRule,GuardRuleExpr,IntoView,MustView,MapChecked,MapGuarded,PullbackChecked, andPullbackGuarded. - Bridges.
Reify,Reflect,ReifyReq, andReflectReqbetween the closure and expression worlds. - Gated suspensions.
CheckSuspensionandCheckSuspensionExprgate contextualization of a rawkont.Suspensionon a requirement.
Behavioural contracts
SuspensionViewis affine: each suspension is consumed exactly once viaResume,ResumeWith, orDiscard.- Completion preserves carried context: when stepping reaches the terminal boundary,
sv.Suspensionbecomesnilwhilesv.Ask()still returns the ambient context. coveperforms no scheduling, retry, or outcome classification; semantic outcome branching belongs toiox, kernel mechanics belong touring, and proactor advancement belongs totakt.
Laws
Duplicate(v).Extract() == vExtend(v, func(w View[C, A]) A { return w.Extract() }) == vCompose(g, f)(v) == g(Extend(v, f))Compose(ExtractCmd, f) == fandCompose(g, ExtractCmd) == g
Compatibility
- Go:
1.26+
cove v0.0.0 - Coalgebraic context layer for kont suspensions in Go
Introduction
covecarries ambient context acrosskontsuspension boundaries as explicit, typed data. It is designed for runtimes that step one suspension at a time while still needing budget, capability, phase, or buffer-state information at each boundary. Instead of side maps or hidden globals,covekeeps that context attached to values and suspensions throughViewandSuspensionView.covealso introduces two forms of context requirements: closure-basedReqfor direct use and data-basedReqExprfor composable boolean structure. On top of those requirements, the package provides named rules, diagnostics, and guarded values that can be checked before a step proceeds. The stepping helpers remain policy-free: they preserve and evolve context, but they do not schedule, retry, or dispatch. That keeps ownership clean across the wider stack while making contextual stepping easy to reason about and test.
Usage
type Runtime struct {
Budget int
}
_, sv := cove.StepExprWith(Runtime{Budget: 8}, computation)
for sv.Suspension != nil {
result := dispatch(sv.Ask(), sv.Op())
_, sv = sv.ResumeWith(result, func(r Runtime) Runtime {
r.Budget--
return r
})
}Highlights
cove launches with a contextual stepping surface for kont, including typed carriers for ambient context, guarded values, and suspension-aware resume helpers. The release also ships both closure and expression forms of the requirement algebra so callers can choose between direct predicates and data-first composition.
Features
View[C, A]andSuspensionView[C, A]to pair values and suspensions with ambient context.Req[C]andReqExpr[C]withAll,Any,Not,True,False, and pullback helpers for context predicates.Rule[C],RuleExpr[C],Report, and rule-checking helpers for named diagnostics.Checked,Guarded,CheckedExpr, andGuardedExprfor requirement-gated values.StepWith,StepExprWith,CheckSuspension,CheckSuspensionExpr, and resume helpers for contextual stepping.Reify,Reflect,ReifyReq, andReflectReqbridges between closure and expression worlds.
Compatibility
- Go:
1.26+