GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id-worlds: charge an installed account fuel-rate budget per update (#1067 slice 2) by dezren39 · Pull Request #12557 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Stacked PR

Base is xaltha/id-f1210-account-quota (PR #12539, slice 1) — this slice builds directly on its FuelRateBudget. Retargets to main when #12539 merges.

What

F12.10 slice 2 — the invocation-boundary half of the slice-1 contract. WorldInstance (the sandbox, the one place a guest invocation's fuel is actually set and metered) gains an optional FuelRateBudget:

  • set_fuel_rate_budget(...) installs the owning account's budget; fuel_rate_budget() exposes it for reporting.
  • Every update admission charges the budget the invocation's fuel allowance (limits.fuel — what the store is about to be handed) before the guest runs. A FuelRateRefusal means the invocation never happens, nothing is metered, and the instance is not poisoned — the same call can succeed once the window rolls.
  • Metered consumption stays in CallMetrics; the two accounts answer different questions (may it run vs what did it burn). Read-only projections (view/layout/records/wants/snapshot) are not charged in this slice.
  • Default is no budget installed, so every existing host behaves exactly as before.

The budget is per-world for now (one instance, one world). Sharing one budget across an account's worlds at hub open is the next slice: it first needs a world→account key at the hub, which does not exist yet — accounts today are per-world directory identities (Principal::Account in each world's own DirectoryAuth), and the hub boundary presents an admin token or a signing key, no account. Recorded on #1067.

Verification (laptop, via fleet shell + fleet-build-lock)

  • cargo test -p id-worlds --features sandbox --lib sandbox:: — 38 passed, 0 failed, 2 ignored (988 filtered out), including the two new tests:
    • an_account_at_its_fuel_rate_refuses_the_next_update — typed refusal fields, refused call never metered, instance still serves reads afterwards.
    • a_fuel_rate_budget_accounts_each_admitted_allowance — three admissions accounted at allowance price, fourth refused.
  • Mutation check: disabling the charge call makes both new tests fail (verified on the laptop, then discarded).
  • Module-reach OK (819 files); rustfmt clean on both touched files; no new warnings from the touched files.

Refs #1067


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
id-worlds: charge an installed account fuel-rate budget per update (#…
6f8221f
…1067)

F12.10 slice 2: the invocation-boundary half of the slice-1 contract.
WorldInstance gains an optional FuelRateBudget (id-caps account_quota),
installed with set_fuel_rate_budget. Every update admission charges
the budget the invocation's fuel allowance (limits.fuel, what the
store is about to be handed) before the guest runs; a FuelRateRefusal
means the invocation never happens, nothing is metered, and the
instance is not poisoned, so the same call can succeed once the
window rolls. Metered consumption stays in CallMetrics; read-only
projections (view/layout/records/wants/snapshot) are not charged.

Default is no budget installed, so every existing host behaves
exactly as before. The budget is per-world for now — one instance,
one world; sharing one budget across an account's worlds at hub
open is the next slice, which first needs a world-to-account key at
the hub (accounts today are per-world directory identities; the hub
boundary presents an admin token or a signing key, no account).

Tests: two new sandbox tests on the ECHO fixture — refusal at the
rate with typed-refusal fields and recoverability, and per-admission
accounting across a three-allowance window.

Refs #1067
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 13:31
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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 35 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: 5db6b271-d8a7-48dd-8580-0243c454f525
Commits

Reviewing files that changed from the base of the PR and between 745326c and 69742c4.

Files selected for processing: 8

  • pkgs/id/crates/id-caps/src/account_quota.rs
  • pkgs/id/crates/id-worlds/src/sandbox.rs
  • pkgs/id/crates/id-worlds/src/world/actor.rs
  • pkgs/id/crates/id-worlds/src/world/actor/execution.rs
  • pkgs/id/crates/id-worlds/src/world/actor/execution/portal.rs
  • pkgs/id/crates/id-worlds/src/world/handle.rs
  • pkgs/id/crates/id-worlds/src/world/mod.rs
  • pkgs/id/crates/id-worlds/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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 22, 2026
id: F12.10 fair scheduling and per-account quotas #1067
Closed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T18:41:10.357816Z d233bb2 New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f8221f22c

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 22, 2026
fleet: ready PRs are left unmerged (20 open; the merge sweep has filed nothing since 2026-11-17) #12280
Open
@dezren39
id-worlds: answer Codex review on fuel-rate admission (#1067)
069e5e3
Three threads on #12557:

- Validate message size before debiting the fuel budget:
  WorldInstance::update now runs check_message_size before
  charge_fuel_rate, so an oversized event consumes no allowance.
  Example test an_oversized_event_does_not_consume_the_fuel_budget
  pins it.

- Property coverage for admission accounting: a proptest over
  generated allowance, quota, event size, and admission/refusal
  sequences, checked against an explicit oracle after every event:
  bounded charges, exact refusal contents, metrics counting admitted
  invocations only, and refused calls neither executing nor poisoning
  the instance (reads still serve). Examples stay as smoke coverage.

- Preserve actor health on fuel-rate refusal: the Input and
  EntityInput handlers now distinguish a FuelRateRefusal (checked
  before any .context is applied, when the refusal is outermost)
  from a guest failure, leaving program_healthy true so the same
  input can succeed once the window rolls. Handle-level test
  a_fuel_rate_refusal_keeps_the_actor_healthy covers refusal,
  health, and recovery.

Addresses Codex review threads PRRT_kwDOJWP47866kM4D,
PRRT_kwDOJWP47866kM4E and PRRT_kwDOJWP47866kM4J on #12557.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 069e5e36f2

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-worlds/src/sandbox.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

dezren39 added 3 commits November 22, 2026 16:19
@dezren39
id-worlds: fix the admission proptest's range types (#1067)
13da187
The oversized-event range literals defaulted to i32, mismatching
the usize arm of the prop_oneof. Suffix them usize.
@dezren39
id-worlds: the admission proptest must not pin the echo view bytes (#…
c6bab8a
…1067)

The echo fixture's plaza_alloc returns 0, so an event longer than
32 bytes overwrites its 'hello' data at offset 32 and the view
legitimately returns 'eello'. The proptest's not-poisoned check
only needs the view to succeed, not to return the pristine fixture
string; pin the Ok, not the bytes.
@dezren39
fix(id-worlds): answer Codex review on #12557 — recoverable refusals …
d233bb2
…in batch/system paths, rollover-aware oracle

Thread 1 (P1): handle_input_batch and deliver_system now distinguish
a FuelRateRefusal from a guest failure via is_fuel_rate_refusal, like
the single-input handlers: the program stays healthy, the refused
batch input is answered with the refusal, remaining inputs go through
the single path, and a refused host event is dropped with the schedule
left pending. Tests: a_fuel_rate_refusal_in_a_batch_keeps_the_actor_healthy
and a_fuel_rate_refusal_of_a_host_event_keeps_the_actor_healthy.

Thread 2 (P2): the admission proptest pins the admission clock with a
test-only fuel_now override on WorldInstance, so the budget window can
only roll when the case steps it — never because the test process was
descheduled mid-case. Each case then steps the pinned clock two seconds
forward and asserts the fresh-window admission/refusal deterministically.

Thread 3 (P1): already answered by c6bab8a — the proptest no longer
pins the echo view bytes, which the fixture legitimately overwrites for
events longer than 32 bytes; no code change here.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d233bb2846

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/crates/id-worlds/src/world/actor/execution.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-worlds/src/world/actor/execution.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
fix(id-worlds): queue fuel-refused capability results; back off sched…
2a56ca3
…ule fires (#1067)

Codex review on #12557 (threads r4659428216, r4659428220):

- A capability result whose delivery was refused at the account's
  fuel rate was lost: the side effect had already run, the request
  id stayed in handled_requests, and the guest waited indefinitely.
  deliver now returns DeliveryOutcome, and deliver_result queues a
  fuel-refused result in pending_results for retry after the window
  rolls, without re-executing the capability. The same queue covers
  restarted/client-provider refusals and broker completions.
- A due schedule whose fire was refused woke the loop immediately
  and retried on every pass until rollover. A refusal now records
  fuel_retry_not_before (one full window past the refusal, which is
  guaranteed to land in a fresh window); fire_schedules skips
  attempts before it, next_schedule_wake holds a due schedule's
  wake there, and next_deadline wakes the loop there while results
  are queued.

Tests: FuelWindowProgram oracles for both (queued result delivered
exactly once after rollover; refused fire attempts nothing before
its deadline and fires exactly once after), plus
next_schedule_wake backoff cases. Not compiled or run locally (no
Rust toolchain in the sandbox; laptop fleet-shell leg down) — CI is
the first verification.
@dezren39
dezren39 removed the request for review from a team November 23, 2026 05:56
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
Base automatically changed from xaltha/id-f1210-account-quota to main November 24, 2026 03:59
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
[pkgs/id] B16 ScopedLedger reserve() never reclaims expired open reservations: OverCap deadlock (B20/B21 prune-on-full) #14207
Closed
dezren39 added 2 commits November 24, 2026 15:18
@dezren39
Merge origin/main into xaltha/id-f1210-ownership for Batch D verifica…
6713ab6
…tion (task 21625, lane oc-code-03)

Resolves structural conflicts from main's F12.14 portal split
(command.rs, execution/portal.rs), charge-config/burn-admission
refactor (run_guest_call, account_charge), and device_input/blob
changes against slice-2 fuel-rate admission:
- sandbox.rs: keep both fuel_rate budget and charge_key/burn paths;
  update() charges fuel_rate then runs via burn-admitted update_inner
- actor.rs: adopt main's mod command, keep is_fuel_rate_refusal,
  pending_results, fuel backoff, recoverable input branches
- execution.rs: drop inlined portal (now in execution/portal.rs),
  keep DeliveryOutcome/deliver_result/retry_pending_results
- execution/portal.rs: adapt deliver() bool check to .delivered()
  for DeliveryOutcome
@dezren39
fix(id-worlds): restore method boundary after Batch D merge
c2fbc0d
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch D progress — lane oc-code-03, Fleet task 21625: merged main by merge commit 6713ab6 and fixed a malformed method boundary in sandbox.rs introduced during that resolution (c2fbc0d). Scoped fmt audit of run dezren39/fleet#45495568041 found 15 pre-existing formatting-drift files identical to the main parent; left unrelated files unchanged. Targeted sandbox verification is now running remotely at https://github.com/dezren39/fleet/actions/runs/45500233903 (branch ref; previous short-SHA checkout did not resolve). Not merging without a successful verification result.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dezren39 added 2 commits November 24, 2026 16:36
@dezren39
fix(id-worlds): close merged impl and prioritize queued results
47ddd8b
@dezren39
fix(id-worlds): handle notification variant in fuel-window test program
69742c4
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch D verification — oc-code-03 / task 21625: successful remote run https://github.com/dezren39/fleet/actions/runs/45503879118 at exact head 69742c4. cd pkgs/id && cargo test -p id-worlds --features sandbox --lib: 1185 passed, 0 failed, 3 ignored. Follow-up fixes close both malformed merge boundaries, prioritize already-executed queued results before recurring timer deliveries, and make the fuel-window test fixture exhaustive over the Notification variant from main. Workspace formatting drift is pre-existing and unchanged; no Clippy success claimed. Read-only merge review of actor module split completed. Proceeding with merge commit only.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 0aec704 into main Nov 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/id-f1210-ownership branch November 24, 2026 23:07
developing-today-fleet Bot pushed a commit that referenced this pull request Nov 27, 2026
@dezren39
#1067 F12.10: enforce per-account world-count limits at hub open/create
27a9e49
Next slice after #12539/#12557/#12739/#16002/#16033: AccountQuotas
defined max_worlds but nothing enforced world counts. This slice adds
a deterministic AccountWorldQuota ledger (account_charge.rs) beside
FuelRateBudget, a HubLimits::max_worlds_per_account ceiling (0 =
unbounded, preserving current behaviour), and WorldHub::lease_as /
create_as account-carrying paths enforced atomically with slot insert
in acquire_slot (TooManyWorlds refusal, reusing the global ceiling's
handling; reopening an already-known world is never a new hold; a
creation that never opens rolls its hold back via the lease guard).
Pre-quota lease/create delegate with no account and are unchanged;
serve keeps 0 until a CLI flag lands. Storage-byte accounting and
ownership persistence across restarts remain follow-ups.
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
#1067 F12.10: enforce per-account world-count limits at hub open/create #16151
Merged
developing-today-fleet Bot added a commit that referenced this pull request Nov 27, 2026
@developing-today-fleet @dezren39
#1067 F12.10: enforce per-account world-count limits at hub open/crea…
7a22f95
…te (#16151)

Next slice after #12539/#12557/#12739/#16002/#16033: AccountQuotas
defined max_worlds but nothing enforced world counts. This slice adds
a deterministic AccountWorldQuota ledger (account_charge.rs) beside
FuelRateBudget, a HubLimits::max_worlds_per_account ceiling (0 =
unbounded, preserving current behaviour), and WorldHub::lease_as /
create_as account-carrying paths enforced atomically with slot insert
in acquire_slot (TooManyWorlds refusal, reusing the global ceiling's
handling; reopening an already-known world is never a new hold; a
creation that never opens rolls its hold back via the lease guard).
Pre-quota lease/create delegate with no account and are unchanged;
serve keeps 0 until a CLI flag lands. Storage-byte accounting and
ownership persistence across restarts remain follow-ups.

Co-authored-by: Drewry Pope <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.