Skip to content

engine: a library-wrapped function kept in a const is registered where the const is handed over - #1799

Merged
swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/typescript/value-wrapped-callback-registration
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/typescript/value-wrapped-callback-registration

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor
  • export const plugin = wrap(async (app) => …) then host.register(plugin): the registration did not reach the literal, and path said the two were independent, although the literal handed over bare was reached.
  • TypeScript (value-flow.dl): a const whose initializer is a boundary call handed a function passes that function on to a boundary call the const is handed to, by name or through an import. Excluded: a reassignment, a call through a project value, and a call whose typed result has no call signature.
  • JavaScript (callbacks.dl): the same for a call rooted at a package import, carried as a libwrap value that is never a callee, so call classification is unchanged.
  • Python has no hand-over edge even for a bare function, so it is not changed here.
  • Tests: extended TS case 78 / hof-callback-at-library-boundary and JS case 34, each with a control (a const built from a plain value registers nothing). The TS case said "independent" before the fix.
  • Checked: TS suite 97/97, JS suite 88/88, CLI cases (JS 236/236; TS 170/175, and those 5 fail identically on the base). Product: probes 29 → 31 of 73 with no regressions, edges 9988 → 10000 with none removed, index 43s vs 45s.

…egistered where the const is handed over

TypeScript: a const whose initializer is a boundary call handed a function (fp(async (app) => ...),
defineExtension(fn)) hands that function on to a library registration it is passed to, by name or
through an import. Not a reassignment, not a call through a project value, not a call whose typed
result has no call signature.
JavaScript: the same, for a call rooted at a package import, carried as its own value kind that is
never a callee.

path answered 'independent' for a plugin registered this way although the bare form was reached.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 7a3a5a2 into apps/integration-0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/typescript/value-wrapped-callback-registration branch September 30, 2026 02:00
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.

1 participant