Skip to content

test(javascript): retain resource ownership in deep-return fixture - #1644

Merged
morluto merged 1 commit into
morluto:mainfrom
evenafterallisaid:test/javascript-deep-return-scope
Oct 10, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
evenafterallisaid:test/javascript-deep-return-scope

Conversation

@evenafterallisaid

Copy link
Copy Markdown
Contributor

summary

migrate the deep-return test's embedded child script to the existing JavaScript analysis helper that owns and closes an artifact resource scope. this repairs the test failure introduced by the caller-owned scope API migration.

problem and expected behavior

ffe0574 requires an ArtifactResourceScope for direct JavaScript analysis calls. this test's JavaScript string still called the compiled service without that argument, so typechecking did not catch the missed migration. it now fails with Cannot read properties of undefined (reading 'run') before exercising deep-source analysis.

the test should retain its default-stack regression while owning and awaiting artifact cleanup. the same failure appears in shard 4 of #1642: one test failed, 1523 passed, and 14 skipped. the source-map changes in that pr do not modify this call.

no issue is linked because this was identified directly from the ci failure; existing issues and prs were checked for overlap.

change and scope

the child imports analyzeJavaScriptApplicationWithOwnedScope from the existing verifier helper and reads its returned Evidence. the helper already passes a fresh scope to the real compiled analyzer, closes it on success or failure, and propagates analysis and cleanup errors. no new wrapper or production behavior is added.

contract and boundary impact

  • semantic owner and earliest changed stage: the test child script's direct analysis invocation.
  • CLI and MCP/tool-catalog contract: none.
  • provider, bridge, target-format, or platform compatibility: no production changes; the test follows the current caller-owned resource API.
  • evidence, artifact, provenance, or reconstruction contract: unchanged real analyzer Evidence and return-owner assertions.
  • process execution, authorization, cleanup, or containment impact: the child now awaits artifact cleanup before printing its result. process, memory, stack, timeout, and temporary-workspace bounds remain unchanged.
  • generated metadata, package, or installation impact: none.

evidence and regression coverage

  • test updated: the existing isolated child-process regression, retaining a 20,000-property chain, nested and class-method returns, and three distinct return-owner assertions.
  • base reproduction: the unchanged test fails on 0fa0b046 with the same undefined.run error as ci; it passes after the migration.
  • user-visible CLI/MCP output: not applicable; test-only migration.
  • remaining proof gaps: local verification ran on Windows; the Linux ci rerun is pending. no real disassembler behavior is claimed.

validation performed

  • npm run test:focused -- tests/boundary/filesystem/javascriptApplicationDeepReturns.test.ts before the edit — failed with the ci error.
  • the same command after the edit — one test passed, using the actual compiled analyzer in its isolated Node child.
  • npm run check — passed, including typecheck, lint, formatting, module boundaries, metadata, knip, and architecture guards; 635 lint warnings, zero errors.
  • git diff --check — passed.

compatibility, safety, and release

  • breaking changes or migration steps: none in this pr; test migration for the API change already on main.
  • real Hopper/Ghidra, browser, or OS coverage: pinned Node 24.18.0 and npm 11.16.0 on Windows, through a real analysis subprocess; no engine required.
  • package or release metadata impact: none.
  • security, privacy, process, or containment review: no runtime authority changes; the test now uses the existing cleanup owner instead of bypassing the required scope.

review checklist

  • this pr addresses a concrete ci failure.
  • the pr has one focused outcome and a conventional title.
  • the reason for not linking an issue is stated above.
  • the existing meaningful regression fails before and passes after the change.
  • no docs, contracts, or generated metadata require changes.
  • no user-visible CLI/MCP output changes.
  • the final diff was checked for secrets, unrelated cleanup, and unsupported claims.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 20:55
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@morluto
morluto merged commit 32d13c4 into morluto:main Oct 10, 2026
19 checks passed
@morluto

morluto commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Thanks for catching the missed caller-owned scope in the deep-return child, @evenafterallisaid. Reusing the owned-scope helper makes the regression await cleanup and still exercise the deep-return path, with no new production wrapper. That closes a real CI gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants