<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://docs.limitr.dev/blog</id>
    <title>Limitr Docs Blog</title>
    <updated>2026-05-14T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://docs.limitr.dev/blog"/>
    <subtitle>Limitr Docs Blog</subtitle>
    <icon>https://docs.limitr.dev/img/logo.png</icon>
    <entry>
        <title type="html"><![CDATA[v0.6.15 — Governor, Calendar Resets & Rate Intelligence]]></title>
        <id>https://docs.limitr.dev/blog/v0-6-15</id>
        <link href="https://docs.limitr.dev/blog/v0-6-15"/>
        <updated>2026-05-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Limitr v0.6.15 ships three major additions to the enforcement and metering layer, plus an expanded Time library in Stof.]]></summary>
        <content type="html"><![CDATA[<p>Limitr v0.6.15 ships three major additions to the enforcement and metering layer, plus an expanded Time library in Stof.</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="governor-proactive-rate-enforcement">Governor: proactive rate enforcement<a href="https://docs.limitr.dev/blog/v0-6-15#governor-proactive-rate-enforcement" class="hash-link" aria-label="Direct link to Governor: proactive rate enforcement" title="Direct link to Governor: proactive rate enforcement" translate="no">​</a></h2>
<p>Hard limits now support an optional <strong>token bucket governor</strong> — a rate ceiling below the hard limit that shapes consumption before the wall is reached. Instead of cutting customers off, the governor throttles them.</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">limit</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">credit</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> ai_token</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">mode</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> hard</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">value</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">1000000</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">resets</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">true</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">reset_sch</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'monthly:1'</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">governor_enabled</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">true</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">governor_capacity</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">50000</span><span class="token plain">       </span><span class="token comment" style="color:#999988;font-style:italic"># max burst</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">governor_refill_rate</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">0.5</span><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic"># tokens per ms (~500/sec sustained)</span><br></div></code></pre></div></div>
<p>When the governor fires, a new <code>meter-governed</code> event fires with token balance, capacity, and requested amount — distinct from <code>meter-limit</code> so you can route them differently.</p>
<p>Use <code>policy.allowance()</code> to pre-size operations against the current governor state before submitting them.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="calendar-reset-schedules">Calendar reset schedules<a href="https://docs.limitr.dev/blog/v0-6-15#calendar-reset-schedules" class="hash-link" aria-label="Direct link to Calendar reset schedules" title="Direct link to Calendar reset schedules" translate="no">​</a></h2>
<p>Meters and grants can now reset on calendar boundaries rather than fixed durations. Set <code>reset_sch</code> instead of <code>reset_inc</code> on any limit or topup:</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">reset_sch</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'monthly:1'</span><span class="token plain">           </span><span class="token comment" style="color:#999988;font-style:italic"># 1st of every month</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">reset_sch</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'monthly:last'</span><span class="token plain">        </span><span class="token comment" style="color:#999988;font-style:italic"># last day of every month</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">reset_sch</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'weekly:mon'</span><span class="token plain">          </span><span class="token comment" style="color:#999988;font-style:italic"># every Monday</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">reset_sch</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'nth_weekday:1:tue'</span><span class="token plain">   </span><span class="token comment" style="color:#999988;font-style:italic"># first Tuesday of every month</span><br></div></code></pre></div></div>
<p>All schedules use UTC. Calendar resets are mutually exclusive with <code>reset_inc</code> — the schema validator enforces this at policy load time.</p>
<p>Grant resets now also support <code>reset_sch</code>. Calendar-based grants reset exactly once per period with no catch-up behavior — the right default for billing-aligned credit allocations.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="rate-intelligence">Rate intelligence<a href="https://docs.limitr.dev/blog/v0-6-15#rate-intelligence" class="hash-link" aria-label="Direct link to Rate intelligence" title="Direct link to Rate intelligence" translate="no">​</a></h2>
<p>Every meter now tracks a short consumption history, exposing:</p>
<ul>
<li class=""><strong><code>policy.rate(customer, entitlement)</code></strong> — instantaneous consumption rate (units/ms)</li>
<li class=""><strong><code>policy.acceleration(customer, entitlement)</code></strong> — rate of change between recent intervals</li>
<li class=""><strong><code>policy.projectedExhaustion(customer, entitlement, smoothed?)</code></strong> — estimated ms until the meter is exhausted. Pass <code>smoothed: true</code> for an EWMA-based projection that doesn't overreact to bursts — suitable for alerting from <code>meter-changed</code> notification handlers</li>
<li class=""><strong><code>policy.allowance(customer, entitlement)</code></strong> — binding constraint of governor token balance and period remaining; use to pre-size operations</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="grants_apply-on-limits"><code>grants_apply</code> on limits<a href="https://docs.limitr.dev/blog/v0-6-15#grants_apply-on-limits" class="hash-link" aria-label="Direct link to grants_apply-on-limits" title="Direct link to grants_apply-on-limits" translate="no">​</a></h2>
<p>Hard and soft limits now support <code>grants_apply: false</code> to prevent credit grants from extending the limit. Set this on enforcement entitlements (governors, rate ceilings) where grants should never punch through, or on observe-mode entitlements where you want a clean, unmodified consumption signal.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="stof-time-library">Stof Time library<a href="https://docs.limitr.dev/blog/v0-6-15#stof-time-library" class="hash-link" aria-label="Direct link to Stof Time library" title="Direct link to Stof Time library" translate="no">​</a></h2>
<p>The Stof <code>Time</code> library now includes calendar primitives used by the reset scheduling layer:</p>
<p><code>Time.year</code>, <code>Time.month</code>, <code>Time.hour</code>, <code>Time.minute</code>, <code>Time.second</code>, <code>Time.day_of_month</code>, <code>Time.day_of_week</code>, <code>Time.days_in_month</code>, <code>Time.start_of_day</code>, <code>Time.start_of_week</code>, <code>Time.start_of_month</code>, <code>Time.add_days</code>, <code>Time.add_months</code>, <code>Time.start_of_period</code></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="breaking-changes">Breaking changes<a href="https://docs.limitr.dev/blog/v0-6-15#breaking-changes" class="hash-link" aria-label="Direct link to Breaking changes" title="Direct link to Breaking changes" translate="no">​</a></h2>
<p>None. All changes are additive and backward compatible. Existing policies with <code>reset_inc</code>, no governor, and no <code>grants_apply</code> field continue to work exactly as before.</p>]]></content>
        <author>
            <name>CJ Cummings</name>
            <uri>https://www.linkedin.com/in/christopher-cummings-89590353/</uri>
        </author>
        <category label="release" term="release"/>
    </entry>
</feed>