Skip to content

Accept a recursive Array wrapper in the Array own-key helpers - #8

Merged
dashersw merged 1 commit into
mainfrom
fix/array-keys-over-recursive-wrapper
Oct 20, 2026
Merged

dashersw merged 1 commit into
mainfrom
fix/array-keys-over-recursive-wrapper

Conversation

@puskuruk

@puskuruk puskuruk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Object.keys over a value typed as a recursive dictionary-or-array union refused to lower. The Array own-key helpers now accept the recursive wrapper.

  • 0cee453 Accept a recursive Array wrapper in the Array own-key helpers (gate: gained object-keys-over-recursive-dictionary-or-array-union, 0 moved)

Verification: npm run build passed, npm run gate -- --write exit 0, node scripts/run-runtime-tests.mjs --only object-keys-over-recursive 1 ok, prettier clean.

Related

Independent of the other three compiler fixes (#7, #9, #10); all four go into compiler release 1.0.38, which node-compat geastack/node-compat#8 (compile hello-nest ahead of time) needs.

Summary by CodeRabbit

  • New Features

    • Improved Object.keys support for arrays and array-derived types, including recursive dictionary/array data.
    • Added handling for retrieving enumerable keys, own-key checks, and property names from derived arrays.
  • Bug Fixes

    • Corrected key enumeration for recursive structures containing both objects and arrays, including undefined values.
  • Tests

    • Added runtime coverage verifying expected keys for recursive tree and branch structures.

Rebased onto main d281cde (1.0.41) on 2026-10-20; gate byte-identical and the runtime test green there.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7907e975-6ef8-4ff3-b7b8-25e15156bc2b
📥 Commits

Reviewing files that changed from the base of the PR and between 9779f8e and ea26069.

📒 Files selected for processing: 2
  • scripts/emitted-baseline-runtime.txt
  • src/targets/cpp/runtime/gea_runtime.h
🚧 Files skipped from review as they are similar to previous changes: 1
  • scripts/emitted-baseline-runtime.txt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The C++ runtime adds forwarding overloads for array key helpers when the array type is derived. A runtime test checks Object.keys results for recursive dictionary-or-array union data.

Changes: Recursive object and array keys

Layer / File(s) Summary
Derived-array key helper overloads
src/targets/cpp/runtime/gea_runtime.h
Added type detection for derived array objects and forwarding overloads for enumerable keys, own-key checks, and property names.
Recursive union key test
test/runtime/object-keys-over-recursive-dictionary-or-array-union.runtime.ts, scripts/emitted-baseline-runtime.txt
Added a runtime test for object and array key results in recursive union data. Added the test to the emitted baseline list.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: dashersw

Merge Risk: ⚪ Minimal · up to ea260

The recursive array key change is mergeable after normal checks; no concrete issue remains from this review.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating Array own-key helpers to accept recursive Array wrappers.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 1 unsupported, 1 too large.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ast-grep (0.45.3)
src/targets/cpp/runtime/gea_runtime.h

ast-grep timed out on this file

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.

@puskuruk

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@puskuruk
puskuruk force-pushed the fix/array-keys-over-recursive-wrapper branch from 9779f8e to 0cee453 Compare October 20, 2026 07:44
…gained object-keys-over-recursive-dictionary-or-array-union, 0 moved)
@dashersw
dashersw force-pushed the fix/array-keys-over-recursive-wrapper branch from 0cee453 to ea26069 Compare October 20, 2026 14:09
@dashersw
dashersw merged commit ea26069 into main Oct 20, 2026
3 checks passed
@dashersw
dashersw deleted the fix/array-keys-over-recursive-wrapper branch October 20, 2026 14:15
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants