Skip to content

Add Thunk.force and use it in wf jrunscript tests - #2450

Merged
davidpcaldwell merged 1 commit into
mainfrom
davidpcaldwell/thunk-force-wf-jrunscript
Aug 2, 2026
Merged

Add Thunk.force and use it in wf jrunscript tests#2450
davidpcaldwell merged 1 commit into
mainfrom
davidpcaldwell/thunk-force-wf-jrunscript

Conversation

@davidpcaldwell

Copy link
Copy Markdown
Owner

Summary

  • add $api.fp.Thunk.force as a minimal thunk evaluator (Thunk<T> -> T)
  • add Fifty definition and test coverage for Thunk.force
  • update wf test.jrunscript flow in wf.js to use Thunk.force in the pipeline

Validation

  • pre-commit checks passed (ESLint, MPL header verification, TypeScript check)
  • branch pushed successfully

Copilot AI review requested due to automatic review settings August 2, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Preflight: loaded repository instructions from AGENTS.md; no personal instructions found at ~/.agents/README.md.

This PR adds a minimal thunk evaluator ($api.fp.Thunk.force) to the functional utilities and uses it to simplify the wf test.jrunscript flow by evaluating the produced thunk directly in the $api.fp.now(...) pipeline.

Changes:

  • Add $api.fp.Thunk.force(thunk) => thunk() to loader/$api-Function.js.
  • Extend the Fifty definitions/tests to cover Thunk.force.
  • Refactor wf.js’s test.jrunscript implementation to use Thunk.force in the pipeline instead of storing and calling an intermediate thunk.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
wf.js Refactors the jrunscript test runner to evaluate the thunk via $api.fp.Thunk.force within the existing $api.fp.now pipeline.
loader/$api-Function.js Introduces Thunk.force as a minimal thunk evaluator.
loader/$api-Function.fifty.ts Adds Thunk.force to the exported typings and includes Fifty test coverage validating repeated evaluation.

@davidpcaldwell
davidpcaldwell merged commit 3943f09 into main Aug 2, 2026
10 checks passed
@davidpcaldwell
davidpcaldwell deleted the davidpcaldwell/thunk-force-wf-jrunscript branch August 2, 2026 22:21
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