Skip to content

Assert projection call bases are evaluated once - #4145

Merged
aaronvg merged 1 commit into
canaryfrom
codex/upstream-projection-once-regression
Jul 23, 2026
Merged

Assert projection call bases are evaluated once#4145
aaronvg merged 1 commit into
canaryfrom
codex/upstream-projection-once-regression

Conversation

@aaronvg

@aaronvg aaronvg commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the nested projection assignment regression track calls to Store.require()
  • assert the assignment still mutates the expected nested field
  • assert the projection base is evaluated exactly once

Why

This is a test-only follow-up to the unresolved review on #4140. The original regression used a pure require() method, so it could not detect duplicate evaluation of the projection base.

Impact

No production behavior changes. The strengthened regression now guards both correct nested assignment and exactly-once evaluation.

Validation

  • cargo nextest run -p bex_vm --test projection_dest_calls method_call_result_can_be_the_base_of_nested_field_assignment
  • cargo nextest run -p bex_vm --test projection_dest_calls
  • cargo fmt --all --check
  • git diff --check

Note

Low Risk
Only updates an integration test; no compiler, MIR, or runtime behavior changes.

Overview
Test-only change to method_call_result_can_be_the_base_of_nested_field_assignment in projection_dest_calls.rs.

The nested assignment store.require().info.title = "triage" still must mutate the right field; the test now also proves the projection base is evaluated exactly once. Store gains a calls counter incremented inside require(), and main asserts store.calls == 1 in addition to the title check. A pure require() that only returned self.record could pass even if MIR evaluated the call twice.

Reviewed by Cursor Bugbot for commit 7f02714. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 23, 2026 1:36am
promptfiddle Building Building Preview, Comment Jul 23, 2026 1:36am
promptfiddle2 Ready Ready Preview, Comment Jul 23, 2026 1:36am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@aaronvg, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f9416893-4fe9-473f-9e74-09cac6485235

📥 Commits

Reviewing files that changed from the base of the PR and between 65ebcc0 and 7f02714.

📒 Files selected for processing (1)
  • baml_language/crates/bex_vm/tests/projection_dest_calls.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/upstream-projection-once-regression

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

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 23, 2026 01:29 Inactive
@aaronvg
aaronvg enabled auto-merge July 23, 2026 01:32
@aaronvg
aaronvg added this pull request to the merge queue Jul 23, 2026
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 23, 2026 01:36 Inactive
@github-actions

Copy link
Copy Markdown

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 25.6 MB 10.9 MB file 25.3 MB +353.7 KB (+1.4%) OK
packed-program Linux 🔒 17.2 MB 7.1 MB file 17.0 MB +164.3 KB (+1.0%) OK
baml-cli macOS 🔒 19.9 MB 9.5 MB file 19.6 MB +281.3 KB (+1.4%) OK
packed-program macOS 🔒 13.4 MB 6.2 MB file 13.2 MB +198.4 KB (+1.5%) OK
baml-cli Windows 🔒 21.4 MB 9.7 MB file 21.1 MB +303.6 KB (+1.4%) OK
packed-program Windows 🔒 14.3 MB 6.3 MB file 14.2 MB +159.7 KB (+1.1%) OK
bridge_wasm WASM 16.2 MB 🔒 4.4 MB gzip 4.4 MB +13.0 KB (+0.3%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

Merged via the queue into canary with commit 2a970bc Jul 23, 2026
68 of 69 checks passed
@aaronvg
aaronvg deleted the codex/upstream-projection-once-regression branch July 23, 2026 01:41
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 23, 2026 01:50 Inactive
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.

1 participant