Skip to content

fix(javascript): keep optional parameter input unknown - #687

Closed
rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:fix/rea-default-inputs-20261006
Closed

rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:fix/rea-default-inputs-20261006

Conversation

@rudycelekli

Copy link
Copy Markdown

What changed

Optional function parameters now retain unknown caller input instead of assuming their default expression was selected. This covers scalar, object-destructured, and array-destructured defaults. Concrete declaration inputs remain recoverable; catch bindings remain conservative.

Consumer evidence

The complete built public analyzeJavaScriptApplication workflow previously emitted an exact exported return field /mode: "safe" for launch(mode = "safe"). Native Node returns "fast" when a caller supplies that value. After the repair, the public return-shape projection keeps /mode unknown, while an unrelated guaranteed literal field stays exact. Native omitted-argument and caught-input controls were also exercised; the catch control was already unknown before this patch.

Verification

  • Three new optional-parameter regressions fail before the patch and pass after.
  • Focused semantic dataflow/structure, public semantic graph and export comparison suites: 66 passed.
  • npm run check, npm run check:fast, npm run build:cached, git diff --check: passed.
  • Complete built public application return-shape/native Node comparison: passed.

No new tool, schema or execution authority. Hopper/Ghidra verification was not run because no binary provider behavior changes. AI assistance was used for investigation, implementation and verification. Hosted checks are pending on publication.

@morluto morluto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approve: optional-parameter defaults now stay unknown for caller-missing inputs while declaration destructuring recovery is preserved; catch stays conservative. Scalar/object/array cases + declaration-vs-catch contrast covered. Checks green.

@morluto

morluto commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Superseded by #705, which cherry-picks this change (plus 13 sibling fixes) onto current main with conflict resolution and regenerated catalogs. Closing to keep one reviewable merge unit.

@morluto morluto closed this Oct 6, 2026
@morluto

morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks, @rudycelekli, for your work on “fix(javascript): keep optional parameter input unknown.” I appreciate your contribution to REA.

@morluto morluto added bug Something isn't working area: domain Domain logic, errors, and pure functions labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants