Repository navigation
Releases: rasuvaeff/context
Releases · rasuvaeff/context
Release list
v0.3.0
- Added:
Testing\FakeTimeSourceandTesting\SteppingTimeSource(#8). - Added:
Sleeper,UsleepSleeperandContext::sleep();background()
takes an optionalSleeper(#9). - Added:
Context::withoutCancel()(#10). - Added:
Context::withReserve()(#11). - Added:
Context::iterate()(#12). - Added:
ContextController::requestCancel()— deferred cancellation safe
from signal handlers; listener failures surface from the next check (#13). - Added:
Context::joinedWith()— the internal state is now a DAG; a
terminated node detaches from both parents (#14). - Added:
WireCodecandWireValue(#15). A missing or malformed incoming
budget falls back tomaxBudgetMs; bad input never lifts the limit. - Fixed:
withTimeout()truncated the duration to whole nanoseconds, so
withTimeout(1.015)reportedremainingMs() === 1014.0right away. - Docs: "Writing an adapter" — read the budget before
assertActive(). - Docs: the agent skill (
resources/skills/rasuvaeff-context/SKILL.md) is
rewritten for 0.3 — safety rules, decision table; it no longer mentions a
scheduler that does not exist.
v0.2.0
Context::onTerminate()returns an unsubscribe closure
(\Closure(): void) instead ofvoid; calling it removes the listener,
and it is a no-op once the listener ran. Source-compatible: callers that
ignore the return value are unaffected (#1).- A terminated context state detaches from its parent and releases its
listeners and children, so a long-lived parent no longer accumulates every
cancelled or expired child it derived.withValue()now shares its
parent's state instead of attaching a new child per call (#1). withTimeout()no longer overflows: a timeout beyond the representable
range saturates at aPHP_INT_MAXdeadline, and a zero or negative timeout
yields an immediate deadline (the context is expired on first
observation) (#2).ContextExpiredExceptionaccepts an optional$previousthrowable, so a
transport adapter can keep the underlying timeout as the cause.- Documented propagating a budget across a process boundary: send
remainingMs(), rebuild withwithTimeout($ms / 1000)on the receiving
side (#4). - README/llms.txt placeholders replaced with the real API reference, Russian
README added, property tests for subtree cancellation and nearest-ancestor
value lookup, regression-corpus caching in CI (#3).