Skip to content

docs(pool): document trusted task function sources - #266

Merged
jerome-benoit merged 1 commit into
masterfrom
docs/task-function-sources
Dec 1, 2026
Merged

jerome-benoit merged 1 commit into
masterfrom
docs/task-function-sources

Conversation

@jerome-benoit

@jerome-benoit jerome-benoit commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What / Why

Port of poolifier/poolifier#3452 at 82df056a2 (merged upstream during this port, head unchanged). One paragraph in docs/api.md: only trusted functions may be passed to `addTaskFunction()` because the pool evaluates the function's `toString()` output as JavaScript in the workers; untrusted input may select a task only through an allowlist of registered names, payload via `execute()`.

The paragraph is inserted verbatim (verified: normalized upstream hunk lines vs local lines 184-188 are byte-identical modulo wrapping) at the upstream position, right after the capture-time paragraph. The local `api.md` paraphrases upstream prose elsewhere; the new paragraph keeps upstream wording.

Verification

  • `deno fmt --check docs/api.md`, `deno lint`: clean.
  • Docs-only change; no code path touched.

PR Checklist

  • Conventional Commits title, upstream reference in the commit message.

State that only trusted functions may be passed to addTaskFunction(): the
pool captures the functions toString() output and evaluates it as JavaScript
in the workers, so that source must never be built from untrusted input.
Untrusted input may select a task only through an allowlist of registered
names, with the payload carried as task data through execute().

Port of poolifier/poolifier#3452 at 82df056a2 (open upstream). Inserted
verbatim after the local capture-time paragraph of the addTaskFunction
section; the local api.md paraphrases upstream prose, the inserted
paragraph keeps the upstream wording and sits at the upstream position.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T00:17:18.456177Z 5ba6d2b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@jerome-benoit
jerome-benoit merged commit 8aeb1ae into master Dec 1, 2026
15 checks passed
@jerome-benoit
jerome-benoit deleted the docs/task-function-sources branch December 1, 2026 00:29
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