Skip to content

docs: use named arguments in the agent-docs examples and fix the 4.1 job examples - #4460

Merged
bpamiri merged 1 commit into
developfrom
peter/agent-docs-named-args
Oct 6, 2026
Merged

bpamiri merged 1 commit into
developfrom
peter/agent-docs-named-args

Conversation

@bpamiri

@bpamiri bpamiri commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Docs-only. Two corrections to shown-to-users examples:

  • The .ai agent-docs (and their byte-identical docs/consumer-ai/.ai/ mirrors) now use named arguments — afterCommit(methods="…", on="…") and .resources(name="products", except="delete") — matching the framework's "don't mix positional and named arguments" rule.
  • The 4.1 background-job examples call queueStats() on a variable receiver (worker = new wheels.Job(); worker.queueStats()) instead of (new wheels.Job()).queueStats(), which doesn't compile on Adobe CF.

No runtime/framework code changes. The two .ai mirror copies stay byte-identical (consumer-docs check passes).

…job examples

Signed-off-by: Peter Amiri <peter@alurium.com>
@github-actions github-actions Bot added the docs label Oct 6, 2026
@bpamiri

bpamiri commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Review: head 84db2ba. APPROVE (docs).

  • afterCommit("enqueueSearchIndex", on=...) → afterCommit(methods="enqueueSearchIndex", on=...), which matches afterCommit(string methods, string on) in model/callbacks.cfm.
  • .resources("products", except="delete") → .resources(name="products", except="delete"), which matches resources(required string name, ...) in mapper/resources.cfc.
  • Both edits are made identically in docs/consumer-ai/.ai and cli/lucli/templates/app/.ai, so the copies stay byte-identical. These were the only mixed positional/named Wheels calls in those trees.
  • v4.1 background-jobs.mdx: all three (new wheels.Job()).queueStats() calls now use a variable receiver, which compiles on Adobe CF. Nothing else changed.
  • Cosmetic, not blocking: the variable is worker here and jobs in the 4.2 guide (docs(web): use a variable receiver for wheels.Job in the 4.2 job examples #4458), and the trailing // comments in "queue health" no longer line up.

The final follows PR CI.

@bpamiri

bpamiri commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

FINAL: APPROVE. Head 84db2ba.

  • Docs only, 5 files: named arguments (afterCommit(methods=...), .resources(name=...)) in both .ai trees, which stay byte-identical, plus the variable-receiver rewrite in the v4.1 job examples. Unchanged since review.
  • PR CI: 24 pass, 0 fail, 0 pending, 2 skipping (consumer-docs sync and the guides build included).

@bpamiri
bpamiri merged commit d825b50 into develop Oct 6, 2026
26 checks passed
@bpamiri
bpamiri deleted the peter/agent-docs-named-args branch October 6, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant