Skip to content

fix(id): refuse time.tick subscriptions below WorldLimits.min_tick_ms (#1546) - #2927

Merged
dezren39 merged 1 commit into
mainfrom
queue/1818-1546-min-tick
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/1818-1546-min-tick

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Fixes #1546 (queue task 1818, per triage task 1600's ruling).

Problem

WorldLimits.min_tick_ms (default 1000, architecture doc promises time.tick:<ms> >= 1000ms) was never read anywhere: Subscription::parse accepts any ms > 0 and the actor armed/delivered/journaled at the raw interval — time.tick:1 drives ~1,000 journaled program updates/sec.

Fix (triage ruling: refuse, never clamp)

  • WorldActor::apply_subscriptions: a Tick below core.limits.min_tick_ms is refused through the existing denied path — spec recorded in denied_subs, one subscription_refused_event with the existing bad_args code 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::new validates min_tick_ms nonzero 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.
  • Existing test worlds that tick at 20ms now set min_tick_ms: 20 explicitly — which also proves the configured field is what gets read.

Tests

  • New sub_floor_ticks_are_refused_at_the_default_and_custom_floors: at the default floor, time.tick:999 is refused (in denied_subs, never armed, never delivered) and time.tick:1000 arms and delivers; at a custom floor of 250, 249 is refused and 250 arms/delivers.
  • Laptop: cargo test --lib world:: — 118/118 pass.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 03:05
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1255b3ac-ca7b-47eb-b3d6-85e3dc9044cc
Commits

Reviewing files that changed from the base of the PR and between 1dd7cde and 4932d10.

Files selected for processing: 4
  • pkgs/id/src/world/actor.rs
  • pkgs/id/src/world/core.rs
  • pkgs/id/src/world/mod.rs
  • pkgs/id/src/world/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T03:47:55.589297Z 4932d10 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 4932d10c5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@dezren39
dezren39 merged commit 41390db into main Oct 31, 2026
19 of 30 checks passed
@dezren39
dezren39 deleted the queue/1818-1546-min-tick branch October 31, 2026 05:46
@dezren39
dezren39 restored the queue/1818-1546-min-tick branch November 1, 2026 07:55
@dezren39
dezren39 deleted the queue/1818-1546-min-tick branch November 1, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id(world): min_tick_ms (1000) is never enforced — a program can subscribe to time.tick:1 and drive ~1,000 journaled program updates per second

1 participant