Repository navigation
fix(id/world): bound the oversized-layout ViewAt fallback by presentation_bytes (#942) - #5061
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou'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 9 minutes. View limit details
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. CodeRabbit Verify
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Resume (task 8051, lane code-e): fresh check state — Codex disposition: the Codex summary flag ( |
Fixes #942 (queue task 8051).
PR #927's oversized-layout fallback in
WorldCommand::ViewAtnever checked its own result againstpresentation_bytes: the non-screen text path returned the fallback text unmodified, the cropped-screen serialization was returned unchecked, and the serialization-failure path (unwrap_or(fallback_text)) returned the original unchecked text. An over-limit fallback was therefore delivered as success on the very path added to enforce the limit (#811).Changes:
pkgs/id/src/world/actor.rs— the fallback result is now bounded before return: a cropped screen is checked after serialization, non-screen text is checked as-is, and a serialization failure no longer returns the unchecked original. An over-limit (or unserializable) fallback incrementsview_failuresand returnsErr("world presentation exceeds N bytes"), matching the existing View/ViewAt error shape.pkgs/id/src/world/tests.rs— regression tests: a non-screen fallback text over the limit and a cropped 120x50 fallback screen whose serialization exceeds the limit; both assertErr,program_healthy == true, andview_failures == 2(oversized layout + bounded fallback).pkgs/id/src/world_session/mod.rs— the Resize clamp verdict is documented at the clamp: accepting up to the transport bound (500x200) and clamping to 120x50 is intentional per F14.2, not a validation gap.Verification (laptop worktree, origin/main 821c021):
cargo test -p id --lib oversized— 14 passedcargo test -p id --lib world::tests— 164 passed, 0 failedcargo fmt --check -p idreports pre-existing diffs across untouched files under the laptop rustfmt (version/config skew vs repo style); the touched code follows the surrounding file style and CI auto-format owns formatting.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.