cove v0.1.1 — clarify source-level contract docs #5
hayabusa-cloud
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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, aSuspensionViewboundary overkont.Suspension, contextualCmdcomposition, closure and defunctionalized requirement algebrasReq/ReqExpr, named diagnosticsRule/RuleExprwithReport, and requirement- and rule-gated value carriersCheckedandGuarded.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
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
Step,StepExpr,StepWith,StepExprWith,Resume, andResumeWithinstep.go.Cmdas the contextual command / coKleisli surface incmd.go, including the identity and composition laws already enforced by the implementation.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.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
This discussion was created from the release cove v0.1.1 — clarify source-level contract docs.
All reactions