Repository navigation
Release 0.3.0: sleep, iterate, reserve, detach, join, deferred cancel, wire codec - #16
Merged
Merged
Conversation
…, wire codec - Testing\FakeTimeSource / SteppingTimeSource ship in src (#8) - Sleeper + UsleepSleeper + Context::sleep() (#9) - withoutCancel(): values only, no state or parent link (#10) - withReserve(): the parent deadline minus a reserve (#11) - iterate(): checks before pulling each element, keeps keys (#12) - ContextController::requestCancel(): records the cause only; the next check of the subtree applies it, so listener failures surface in normal flow (#13) - joinedWith(): the state becomes a DAG; a terminated node detaches from every parent, addChild() ignores an already terminated child (#14) - WireCodec + WireValue: remaining budget and allow-listed values across a process boundary; decode() never throws on untrusted input (#15) - withTimeout() rounds seconds to nanoseconds instead of truncating: withTimeout(1.015) reported remainingMs() === 1014.0 - A process-wide pending counter keeps a check at ~0.2 us at any depth - minMsi 85 -> 90 (measured 92%) Fixes #8 Fixes #9 Fixes #10 Fixes #11 Fixes #12 Fixes #13 Fixes #14 Fixes #15
…resh the agent skill decode() built a context without any deadline when budget_ms was missing or malformed, so untrusted input could lift the receiver's own limit. It now falls back to maxBudgetMs. The agent skill is rewritten for 0.3: safety rules (read the budget before assertActive(), requestCancel() in signal handlers, derive vs join, untrusted wire budgets), a decision table; it no longer mentions a scheduler that does not exist. READMEs gain the llm/skills line. A test pins the fast-path counter balance; a probe on a real usleep() with SIGALRM confirmed requestCancel() wakes sleep() after 1.00 s and runs the listener outside the handler.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8
Fixes #9
Fixes #10
Fixes #11
Fixes #12
Fixes #13
Fixes #14
Fixes #15
Added
Testing\FakeTimeSource,Testing\SteppingTimeSourceshipped insrc/Sleeper,UsleepSleeper,Context::sleep();background(?TimeSource, ?Sleeper)Context::withoutCancel()— values only, no state or parent linkContext::withReserve()— the parent deadline minus a reserveContext::iterate()— checks before pulling each element, keeps keys,every:ContextController::requestCancel()— signal-safe: records the cause, the next check applies it, listener failures surface in normal flowContext::joinedWith()— the internal state becomes a DAG; a terminated node detaches from every parentWireCodec+WireValue— remaining budget and allow-listed values across a process boundary;decode()never throws on untrusted input, a missing/malformed budget falls back tomaxBudgetMsFixed
withTimeout()truncated seconds → nanoseconds:withTimeout(1.015)reportedremainingMs() === 1014.0right away. Nowround()(found by thewithReserveproperty).Notes
benchmarks/ContextBench.php: 0.9 µs → 0.22 µs at depth 10).usleep(): SIGALRM +requestCancel()endssleep(5)after 1.00 s; the listener runs outside the handler.sleep/iterate, signal handlers,WireCodec, "Writing an adapter" (read the budget beforeassertActive());llms.txt;AGENTS.mdinvariants; the agent skill rewritten for 0.3;examples/derivations.php.minMsi85 → 90.0.3.0 — 2026-10-15.