Skip to content

test: lock CodeMode 2.2.5 for-in deletion break - #5

Merged
hyein-cbio merged 1 commit into
mainfrom
cursor/opencode-codemode-compatibility-6bdf
Nov 3, 2026
Merged

hyein-cbio merged 1 commit into
mainfrom
cursor/opencode-codemode-compatibility-6bdf

Conversation

@cursor

@cursor cursor Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Summary

No @opencode/codemode version change. Main and npm latest are both exact 2.2.5. This only records the downstream break that still justifies rejecting for...in.

Published artifact https://registry.npmjs.org/@opencode/codemode/-/codemode-2.2.5.tgz (sha512-oqZXynEO71nOpM9kOVacyRY6qOceYdk2p9Q0667kwSP4ZXgKSKtxV2HkI0iUBh3ci+TueO88BxIb2CgL1slpGw==), Effect 4.0.6 (single hoisted copy).

  • Inherited enumerable keys match the host: Object.create({ p: 1 }) plus own a yields ["a", "p"].
  • Keys deleted during iteration are still visited: own keys ["a", "b", "c"] and prototype keys ["p", "q"]. The same loops on Node omit the deleted keys (["a", "c"] and ["p"]).
  • Preflight still rejects ForInStatement before runtime construction or any host effect, including the prototype-deletion source. Admitted syntax was not expanded.

Starting main SHA: ca2e788b418c7843f02cf84046973aaea7d4e589. Test revision: 00c27b15aa404804eb216ba4688866f7a31bd84a.

Verification

npm test on Node v22.23.4, Linux x86_64, without PI_OPENCODE_SDK: 83 tests, 82 passed, 0 failed, 1 skipped (isolated real Pi SDK session). The Pi 0.99.0 / 1.3.0 / 1.4.0 matrix was not rerun. Hosted CI is still pending. This is not a live-model or performance check.

Open in Web View Automation 

Note

Low Risk
Only test and assertion changes; no production routing or runtime behavior is modified.

Overview
Test-only update documenting why for...in stays preflight-rejected for @opencode/codemode 2.2.5—no dependency or routing logic changes.

The for-in cases gain a fourth snippet that deletes a key on the prototype while iterating. route.test.js keeps asserting native routing with unsupported-syntax:ForInStatement for all four shapes.

preflight.test.js adds helpers to run the same snippets in the installed CodeMode runtime and on the host, then compares results: inherited keys still match Node, but keys deleted mid-loop are still yielded in CodeMode (["a","b","c"] / ["p","q"]) whereas Node skips them—locking in the behavioral break that justifies continued rejection without widening admitted syntax.

Reviewed by Cursor Bugbot for commit 00c27b1. Configure here.

The pinned interpreter still snapshots keys deleted during for...in,
including prototype keys, while inherited enumeration matches the host.
Keep preflight rejection and assert that divergence on the real runtime.

Co-authored-by: hyein.sophia.cho <hyein.sophia.cho@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 52411004-6e93-4a6b-b741-f8038f4ce67d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@hyein-cbio
hyein-cbio marked this pull request as ready for review November 3, 2026 10:19
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only PR appears safe to merge.

Summary

This PR adds tests that record why for...in remains rejected with CodeMode 2.2.5.

  • The tests show why for...in stays rejected.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "test: lock CodeMode 2.2.5 for-in deletio..." · Reviewed by Greptile

@hyein-cbio
hyein-cbio merged commit 8c4bd59 into main Nov 3, 2026
9 checks passed
@hyein-cbio
hyein-cbio deleted the cursor/opencode-codemode-compatibility-6bdf branch November 3, 2026 10:26
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.

2 participants