Repository navigation
docs(comments): mark publish-only capabilities - #8
Conversation
sf dev brokers no platform services, so the example's mutation fails at its first ctx.spam.check. Name the two calls that cannot run locally, the one Gravatar call that can, and the local transaction boundary.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe comments README now documents ChangesComments development documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change only clarifies which comment examples require a published Space and does not alter runtime behavior; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 752f882eba
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fail the same way with `zero_email_unavailable`. Posting a comment locally | ||
| needs those two calls guarded, or a published Space. `ctx.gravatar.avatarUrl` |
There was a problem hiding this comment.
Qualify when the email call needs guarding
With the documented default setup, COMMENTS_FROM_EMAIL and COMMENTS_NOTIFY_EMAIL are unset, so the if (from && notify) condition in comments/server/index.ts never invokes ctx.email.send; guarding only ctx.spam.check is enough to post locally. Saying both calls must be guarded incorrectly directs users to modify an unreachable call—clarify that the email call needs guarding only when both optional email variables are configured.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct. Fixed in f17d3f6.
ctx.email.send sits inside if (from && notify) in comments/server/index.ts, and both variables are unset until someone runs the optional sf env set pair the README documents further down, so the spam check is the only call that actually blocks a local comment. The text now says guarding that one is enough, and mentions zero_email_unavailable as what happens once the email variables are configured.
ctx.email.send sits behind if (from && notify) and the two email variables are unset by default, so guarding the spam check alone is enough. Naming both sent readers after an unreachable call.
Why
The comments README implied that
sf devsupported platform services that the local Zero server does not provide.Scope
ctx.spamandctx.emailas publish-only.ctx.transaction()behavior.ctx.gravatar.avatarUrlas the local exception.Verification
zeroDevServiceUnavailable.ctx.gravatar.avatarUrlremains pure and synchronous.ctx.transaction()remains a pass-through inside the invocation snapshot.