[PR #3848] test(javascript): cover getter expansion and reference budgets #5944

Open
opened 2026-10-31 01:10:38 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3848
Author: @hannnnnnnny
Created: 10/15/2026
Status: 🔄 Open

Base: main ← Head: fix-getter-expansion-3839


📝 Commits (10+)

  • 44aa86d fix(javascript): append unbounded object references without argument spreading
  • 05bc96f fix(javascript): bound getter reference expansion and report unknown coverage
  • fbd86d1 fix(javascript): deduplicate getter queries and confine expansion fallback
  • fa41db4 fix(javascript): place getter coverage test after constants and helpers
  • 92313d7 fix(javascript): project getter-expansion coverage without duplicating existing limit unknowns
  • d38c491 fix(javascript): preserve direct writes during getter expansion retry
  • 0a85e63 test(javascript): pin single getter-limit reason on relationship evidence
  • 9ca6e75 fix(javascript): keep constructed getter results reachable after widened retry
  • fac6b71 merge: sync main and retain getter regression coverage
  • 31a289b fix(javascript): merge main and retain both getter regression suites

📊 Changes

3 files changed (+533 additions, -1 deletions)

View changed files

📝 src/domain/javascript/javascriptSemanticAnalysis.getter_expansion.test.ts (+367 -1)
📝 src/domain/javascript/javascriptSemanticObjectReferences.test.ts (+102 -0)
📝 tests/fixtures/javascriptGetterExpansion.ts (+64 -0)

📄 Description

Summary

Adds regression coverage for the getter expansion implementation already present on main. This PR now changes only two semantic-analysis test files and their shared fixture; it adds no production behavior.

The tests cover ordinary getter escapes, direct field writes during widening, constructed-value escapes, query-local expansion budgets, retained unrelated facts/provenance, and large reference lists. Production limits and partial-coverage semantics remain owned by the existing getter-query implementation.

Validation

On Node 24.18.0/npm 11.16.0:

  • npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.getter_expansion.test.ts: 36 passed.
  • npm run test:local -- src/domain/javascript/javascriptSemanticObjectReferences.test.ts: 9 passed.

The former review finding refers to the earlier SemanticGetterQuery.reserveResult implementation, which is absent from this residual diff. The current ordinary-escape expectations passed on the reviewed head. This pass ran source tests; no public CLI/MCP, providers, or performance benchmarks were rerun.

Author readiness

Human owner: @hannnnnnnny

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3848 **Author:** [@hannnnnnnny](https://github.com/hannnnnnnny) **Created:** 10/15/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-getter-expansion-3839` --- ### 📝 Commits (10+) - [`44aa86d`](https://github.com/morluto/rea/commit/44aa86d6fe376608bbb412d2f40ddaa73621d616) fix(javascript): append unbounded object references without argument spreading - [`05bc96f`](https://github.com/morluto/rea/commit/05bc96f24e3de7fb86e5f4b0a13e509d83b275a6) fix(javascript): bound getter reference expansion and report unknown coverage - [`fbd86d1`](https://github.com/morluto/rea/commit/fbd86d1aaec2ca5cd46254532ab0021699c1e2a1) fix(javascript): deduplicate getter queries and confine expansion fallback - [`fa41db4`](https://github.com/morluto/rea/commit/fa41db4b717b23ec9cb056fed7c0d3c276fceb64) fix(javascript): place getter coverage test after constants and helpers - [`92313d7`](https://github.com/morluto/rea/commit/92313d7ce5879b6c298264c2deef202861b00105) fix(javascript): project getter-expansion coverage without duplicating existing limit unknowns - [`d38c491`](https://github.com/morluto/rea/commit/d38c491007e16c91406d0f13efe00e4a80accfc0) fix(javascript): preserve direct writes during getter expansion retry - [`0a85e63`](https://github.com/morluto/rea/commit/0a85e63b007cbe144a2dadde41c69d8c96f74062) test(javascript): pin single getter-limit reason on relationship evidence - [`9ca6e75`](https://github.com/morluto/rea/commit/9ca6e75eb5fd0dd3f9efbff022dc3a850940e198) fix(javascript): keep constructed getter results reachable after widened retry - [`fac6b71`](https://github.com/morluto/rea/commit/fac6b7115aab180c2713ec5e5435294da3cb808d) merge: sync main and retain getter regression coverage - [`31a289b`](https://github.com/morluto/rea/commit/31a289b55f0027d441dced46cf278979c17fc64e) fix(javascript): merge main and retain both getter regression suites ### 📊 Changes **3 files changed** (+533 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptSemanticAnalysis.getter_expansion.test.ts` (+367 -1) 📝 `src/domain/javascript/javascriptSemanticObjectReferences.test.ts` (+102 -0) 📝 `tests/fixtures/javascriptGetterExpansion.ts` (+64 -0) </details> ### 📄 Description ## Summary Adds regression coverage for the getter expansion implementation already present on main. This PR now changes only two semantic-analysis test files and their shared fixture; it adds no production behavior. The tests cover ordinary getter escapes, direct field writes during widening, constructed-value escapes, query-local expansion budgets, retained unrelated facts/provenance, and large reference lists. Production limits and partial-coverage semantics remain owned by the existing getter-query implementation. ## Validation On Node 24.18.0/npm 11.16.0: - `npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.getter_expansion.test.ts`: 36 passed. - `npm run test:local -- src/domain/javascript/javascriptSemanticObjectReferences.test.ts`: 9 passed. The former review finding refers to the earlier `SemanticGetterQuery.reserveResult` implementation, which is absent from this residual diff. The current ordinary-escape expectations passed on the reviewed head. This pass ran source tests; no public CLI/MCP, providers, or performance benchmarks were rerun. ## Author readiness Human owner: @hannnnnnnny - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5944
No description provided.