Skip to content

test(id): schedule fire joiner-visibility + ceiling proving tests (#5239, #796 item 10-2) - #5298

Merged
dezren39 merged 2 commits into
mainfrom
queue/8991-5239-schedule-ceiling-tests
Nov 4, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/8991-5239-schedule-ceiling-tests

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Fixes #5239

Item 10-2 of the #796 phase-9/10 verification-debt inventory: schedule fire visibility + ceiling. Test-only; no production code changed.

Gap analysis (verified at origin/main 707689e32)

Assertion 1 — a schedule fire never reaches joiners (events_after): GAP (schedule-specific).
Generic host-System filtering is already proven (project_event_for drops System events; an existing test asserts a retained host event is filtered from events_after/snapshot), and the program-side delivery is proven (a_due_schedule_fires_once_and_the_program_receives_it). But nothing pinned the actual schedule-fired payload (schedule_fired_event) against a joiner's catch-up page. Added: a_schedule_fire_never_reaches_joiners_via_events_after — a retained schedule-fired System event plus a positive-control participant Input event; the joiner's events_after page carries only the input, and the fire payload string never appears.

Assertion 2 — schedule.at refused outside a set ceiling: GAP (schedule-specific).
Horizon refusal is already proven (schedule_bounds_refuse_each_violation_with_a_reason; refused_schedule_requests_pend_nothing), and ceiling refusal is proven for other caps (a_ceiling_change_denies_a_use_that_a_prior_grant_allowed, chat.say; caps_ceiling_is_admin_only_and_applies_at_once, time.now). But no schedule test set a ceiling. Added: a_schedule_outside_the_ceiling_is_refused_and_pends_nothing — schedule.at granted, ceiling set to ["time.now"] via SetCapsCeiling; the grant is kept but excluded from the effective set, the request returns cap_denied, the denial is counted in ledger usage, and nothing pends or journals a ScheduleSet.

Both tests live in pkgs/id/src/world/tests.rs (schedule_tests). Targeted tests pass in CI (this PR's checks).


Autofix with [code]smith
Open in [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 November 4, 2026 05:47
@coderabbitai

coderabbitai Bot commented Nov 4, 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 15 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: 5df8fd0e-4991-4f12-9efd-65b474a16e8f
Commits

Reviewing files that changed from the base of the PR and between d53b4b2 and e4cb9ef.

Files selected for processing: 1
  • 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 Nov 4, 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-11-04T07:06:05.835660Z e4cb9ef 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.

…production bugs)

First full run of the new tests (previous holder was cut off while compiling) failed both, and both failures are in the tests: (1) a_schedule_fire_never_reaches_joiners_via_events_after scanned the whole EventPage Debug for the schedule id nap, but nap is a substring of the field name needs_snapshot — the page itself was correct (only the participant Input event, fire filtered by project_event_for). Renamed the id to siesta and scan only page.events. (2) a_schedule_outside_the_ceiling_is_refused_and_pends_nothing asserted is_granted (allowed-and-granted, false under a ceiling by design) instead of the kept granted set, and expected cap_denied where the ledger refusal is outside_ceiling, which the actor returns verbatim. Both assertions corrected; the behaviors they prove (fire filtered from joiners; ceiling refusal pends nothing and counts a denial) hold in production code.

Verified: cargo test -p id --lib schedule_tests — 21/21 pass.
@dezren39

dezren39 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@codex review — new head e4cb9ef fixes the two proving tests' own assertions (see commit message); production code unchanged.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: e4cb9ef2ad

ℹ️ 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 8bb1e43 into main Nov 4, 2026
1 of 2 checks passed
@dezren39
dezren39 deleted the queue/8991-5239-schedule-ceiling-tests branch November 4, 2026 07:08
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 phase-9/10 verification (split from #796): 10-2 schedule fire visibility + ceiling proving tests

1 participant