2 Commits

Author SHA1 Message Date
icn5381
46fd5c8a00
refactor(sandbox): name the E2B ledger meta-field count (#4764)
Admission derived the live-entry count as `HLEN - 3`, where 3 was the number
of `meta:*` fields written 35 lines earlier in initialize(). Nothing tied the
two together, so adding a fourth meta field would shift the capacity ceiling
by one.

Name the offset `META_FIELD_COUNT` next to initialize(), and add a guard test
asserting a freshly initialized ledger holds exactly those three fields, plus
one pinning that a hard_limit of N admits exactly N reservations.

References #4575

Co-authored-by: icn5381 <255778606+icn5381@users.noreply.github.com>
2026-08-11 21:52:12 +08:00
MiaoRuidx
0cc28d2c42
fix(sandbox): enforce deployment-wide E2B capacity (#4575)
* docs: design deployment-wide E2B capacity

* fix(sandbox): enforce deployment-wide E2B capacity

* fix(sandbox): address E2B capacity review findings

* fix(sandbox): grace stale E2B capacity inventory

---------

Co-authored-by: MiaoRuidx <12540796+MiaoRuidx@users.noreply.github.com>
2026-07-31 17:13:12 +08:00