feat(limits): size & shape limits#14
Open
pinodeca wants to merge 1 commit into
Open
Conversation
f07c0fb to
0713605
Compare
6 tasks
45b95ae to
fe5525b
Compare
Add MAX_HISTORY_BYTES (5 MiB), MAX_PAYLOAD_BYTES (3 MiB), and MAX_SMALL_VALUE_BYTES (64 KiB). Enforcement is opt-in via two new RuntimeOptions toggles (enforce_size_limits, emit_limit_exceeded_errors), both defaulting false so upgrades preserve existing behavior. - Tier-1/2/3 checks at client, orchestration turn, and worker - Always-on: history_size_bytes(), history_pressure(), metrics - 16 new scenario tests; docs updated
fe5525b to
7377a04
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements the three-tier size & shape limits described in
docs/proposals/size-limits.md.New constants (
src/runtime/limits.rs):MAX_HISTORY_BYTES= 5 MiB — aggregate history cap per executionMAX_PAYLOAD_BYTES= 3 MiB — activity/orch inputs & outputsMAX_SMALL_VALUE_BYTES= 64 KiB — names, identifiers, error stringsEnforcement is opt-in via two new
RuntimeOptionstoggles (both defaultfalse):enforce_size_limits— gates all three enforcement tiersemit_limit_exceeded_errors— switches error shape toConfigErrorKind::LimitExceededAlways-on (independent of toggles):
history_size_bytes(),history_pressure(), and four new metrics (duroxide_history_bytes,duroxide_payload_bytes,duroxide_limit_violations_total,duroxide_history_terminated_oversize_total).Checklist
tests/scenarios/limits.rs, 16 new scenario tests)cargo ntpasses locally (1092/1092)docs/ORCHESTRATION-GUIDE.md— new Size Limits sectiondocs/continue-as-new.md— new Anticipating the History Limit sectiondocs/proposals/core-improvements-roadmap.md— §8 marked supersededLinks / Design notes
Full design:
docs/proposals/size-limits.mdImplementation progress:
docs/proposals-impl/PROGRESS-size-limits.md