Repository navigation
feat(cli): add functions skill topic - #7891
Prashansa-K merged 6 commits into
Conversation
Add `supabase skill display functions` with guidance for creating, serving in the background, deploying, and downloading Edge Functions, plus the secrets they depend on. Link it from the overview and tighten migrations wording so it stays within the rendered size cap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.7 MB, up 12.0 KB from 135.7 MB. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
There was a problem hiding this comment.
🤖 AI Review
CLI reference prose guidance: snapshot supabase/supabase@3dcb524 supplied to reviewers (advisory, not a style pass).
Both independent reviews were available. The most consequential findings concern hosted deployment approval and local readiness. The agent-mode approval error omits the function names, an approved rerun recomputes the deployment and deletion sets, and the readiness probe can succeed before the new runtime is available. The Docker fallback finding is advisory for next. The CLI-reference prose procedure excludes the changed skill content and registry metadata. Static byte counts fit all four topic caps. Unit tests were not run because the checkout lacks installed dependencies.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | apps/cli/src/commands/skill/content/functions.md:37 |
correctness |
claude | The deploy skill misstates what the agent-mode approval error shows. The error includes the target and action counts and omits the names of functions to deploy or delete. With --prune, the user can therefore be asked to approve deletions they have never seen listed. |
| 🟠 MAJOR | apps/cli/src/commands/skill/content/functions.md:39 |
approval-flow |
codex | Keeping the same arguments on the --yes rerun can deploy or delete a different set of functions from the one the user approved. |
| 🟠 MAJOR | apps/cli/src/commands/skill/content/functions.md:23 |
readiness |
claude+codex | The skill's any-HTTP-status readiness check can pass before the new Edge Functions runtime is ready. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:54 |
correctness |
claude | The troubleshooting section tells agents to match a telemetry fingerprint and treats an already-active Functions instance as a stopped stack. The same fingerprint also appears in the serving introduction at line 18. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:18 |
correctness |
claude | The startup warning says interrupting serve leaves a half-started runtime, even though both backends handle SIGINT and SIGTERM during startup. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:57 |
authentication |
codex | The local 401 guidance conflates runtime JWT verification with handler authentication and suggests a hosted change that cannot fix the local invocation. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:32 |
secret-handling |
codex | The secrets guidance points agents to an exact-command approval step that can expose a literal secret, while the next line forbids displaying secret values. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:20 |
process-lifecycle |
codex | The fallback background command omits the PID needed for the documented graceful stop. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/functions.md:64 |
examples |
codex | The unlabeled examples create the same function twice and place an all-functions API deploy immediately after a single-function deploy. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/migrations.md:24 |
correctness |
codex | The migration skill now asks for another dry run and approval when excluded seed or role files change. |
| 🟡 MINOR | apps/cli/src/commands/skill/content/migrations.md:50 |
command-syntax |
codex | The remote-history troubleshooting step drops the supabase executable from a command the reader is told to run. |
Next impact (advisory)
Possible conflicts with work on the next branch. Informational only; this does not affect merging.
- 🟡 MINOR
apps/cli/src/commands/skill/content/functions.md:43— The unconditional Docker fallback guidance conflicts withnextwhen the caller explicitly requests local bundling.
Stats
Claude findings: 4 · Codex findings: 9 · Confirmed: 12 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Correct the deploy consent, prune, 401, serve lifecycle, and stop guidance in the functions skill topic. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Coly010
left a comment
There was a problem hiding this comment.
Thanks for this! I traced most of the functions topic back through the code and the bulk of it lines up, which is great given how many claims are in there.
Requesting changes mainly for the --prune wording and the local 401 advice, since agents will follow those literally, and for the overview topic list now that the generated footer is gone. The rest are smaller - feel free to push back on any of them.
One more that didn't fit on a line: the stack backend refuses to serve unless edge_runtime is enabled in config (Enable edge_runtime in ... before serving Functions., serve.stack.handler.ts:209-214). Might be worth adding to the stack startup errors.
Otherwise, looks good to me!
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds the
functionstopic tosupabase skill display, covering Edge Functions for agents:functions new,serve,deploy, anddownload, and which of them are local-only or hosted-only.functions servein the background, how to tell it is ready, and how to stop it cleanly.secrets setcovered only as far as functions need it.The overview links to the topic.
This PR also replaces the "More topics" footer, which listed every other topic, with a short hand-picked "Related topics" list. Only
db-queryandmigrationslist related topics, each naming the other, and every topic other than the overview ends with a pointer tosupabase skill displayfor the full list. The old footer grew with every topic added and pushedmigrationstoward the rendered size cap, so topic PRs could pass alone and fail once merged together. The earlier trims tomigrations.mdmade for the cap are reverted.🤖 Generated with Claude Code