Repository navigation
fix(id): refuse time.tick subscriptions below WorldLimits.min_tick_ms (#1546) - #2927
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #1546 (queue task 1818, per triage task 1600's ruling).
Problem
WorldLimits.min_tick_ms(default 1000, architecture doc promisestime.tick:<ms>>= 1000ms) was never read anywhere:Subscription::parseaccepts any ms > 0 and the actor armed/delivered/journaled at the raw interval —time.tick:1drives ~1,000 journaled program updates/sec.Fix (triage ruling: refuse, never clamp)
WorldActor::apply_subscriptions: aTickbelowcore.limits.min_tick_msis refused through the existing denied path — spec recorded indenied_subs, onesubscription_refused_eventwith the existingbad_argscode and a reason naming the interval and the floor — and never armed, however it was granted.arm()and the presence-join re-arm path carry the same floor guard, so no path can arm a sub-floor tick.WorldCore::newvalidatesmin_tick_msnonzero like the other limits; the field doc is corrected ("Slowest tick" → minimum tick interval, refused at subscription time). No dead config remains; the architecture doc's >= 1000ms contract now matches the code at the default.min_tick_ms: 20explicitly — which also proves the configured field is what gets read.Tests
sub_floor_ticks_are_refused_at_the_default_and_custom_floors: at the default floor,time.tick:999is refused (indenied_subs, never armed, never delivered) andtime.tick:1000arms and delivers; at a custom floor of 250,249is refused and250arms/delivers.cargo test --lib world::— 118/118 pass.Need help on this PR? Tag
@codesmith-botwith what you need.