-
Notifications
You must be signed in to change notification settings - Fork 51
Daily branch 2025 12 01 #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR updates the Stripe API version to "2025-11-17.clover", restructures the system prompt generation from static multi-section concatenation to mode-driven dynamic assembly with new agent/ask mode sections, and bumps multiple dependency versions including a major Stripe version bump from 19 to 20. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
lib/system-prompt.ts (2)
32-62: Default sandbox description: ensure it stays in sync with the real environmentThe default
<sandbox_environment>section is clear and detailed. The only concern is that it hard‑codes OS, language versions, and tool list. If the underlying sandbox changes (e.g., Node/Python versions or installed tools), this prompt will become misleading.Consider centralizing this environment description (or generating it from config) so it’s easier to keep in sync with the actual sandbox, or at least adding a short comment pointing to the source of truth you check when updating these details.
64-163: Agent-mode section structure looks solid; minor extensibility noteThe new
getAgentModeSectioncleanly groups communication, tool‑calling, context‑gathering, code‑change, summary, and sandbox instructions and correctly parameterizes:
agentSpecificNoteandcodeChangesContentbased onmode- Sandbox usage via
${sandboxContext || getDefaultSandboxEnvironmentSection()}Logically this is sound given
ChatMode = "agent" | "ask". One thing to keep in mind:If you ever introduce additional
ChatModevariants, you may want to either:
- Narrow
modehere to"agent"(so other modes don’t accidentally reuse this section), or- Explicitly handle each mode with a
switchto avoid surprising prompt content for future modes.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
app/api/stripe.ts(1 hunks)lib/system-prompt.ts(4 hunks)package.json(4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
package.json
📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)
Add
@types/nodetopackage.jsonwhen using any Node.js built-in modules in Convex functions
Files:
package.json
🧠 Learnings (2)
📚 Learning: 2025-11-24T20:59:07.600Z
Learnt from: CR
Repo: hackerai-tech/hackerai PR: 0
File: .cursor/rules/convex_rules.mdc:0-0
Timestamp: 2025-11-24T20:59:07.600Z
Learning: Applies to package.json : Add `types/node` to `package.json` when using any Node.js built-in modules in Convex functions
Applied to files:
package.json
📚 Learning: 2025-11-12T15:23:01.117Z
Learnt from: fkesheh
Repo: hackerai-tech/hackerai PR: 92
File: lib/ai/tools/utils/sandbox-file-uploader.ts:10-10
Timestamp: 2025-11-12T15:23:01.117Z
Learning: In the hackerai codebase, NEXT_PUBLIC_USE_S3_STORAGE is intentionally used in both client and server code (including server-only files like lib/ai/tools/utils/sandbox-file-uploader.ts) to ensure the frontend and backend stay in sync regarding which storage backend (S3 vs Convex) is being used. This consistency is important for file upload flows that span both environments.
Applied to files:
package.json
🧬 Code graph analysis (1)
lib/system-prompt.ts (2)
types/chat.ts (1)
ChatMode(6-6)lib/ai/providers.ts (2)
ModelName(24-24)getModelCutoffDate(37-39)
🔇 Additional comments (4)
package.json (1)
42-43: Dependency bumps look reasonable; Stripe v20 is the main risk surfaceThe version bumps here are mostly minor/patch, with the notable exception of:
"stripe": "^20.0.0"(major)"next": "16.0.6"and"eslint-config-next": "16.0.6"(framework/tooling updates)Nothing stands out as obviously unsafe, but please:
- Review Stripe v20 release notes for breaking changes that might affect your usage patterns (webhooks, payment flows, idempotency, etc.).
- Run your usual CI (lint/tests/build) against this branch before merging to catch any subtle type/runtime regressions from these upgrades.
It’s also good to see
"@types/node": "^24"already present indevDependencies, which aligns with the guideline about using Node built‑ins in Convex functions. Based on learnings, this is correctly configured.Consider checking upstream changelogs for
stripe@20andnext@16.0.6to confirm there are no migration steps you’re missing.Also applies to: 71-71, 78-78, 86-87, 100-103, 128-128, 133-133
lib/system-prompt.ts (2)
165-221: Ask-mode section: confirmgetModelCutoffDatecovers allModelNamevaluesThe ask‑mode block cleanly covers product‑question handling, tone/formatting, and knowledge‑cutoff behavior. The only potential edge case is:
const knowledgeCutOffDate = getModelCutoffDate(modelName);will surface as"undefined"in the rendered prompt ifmodelNamedoesn’t have an entry in your cutoff map.Either ensure
getModelCutoffDateis total over allModelNamevalues, or defensively fall back to a default cutoff date if it returns a falsy value. If you’d like, I can sketch a small guard to avoid leaking"undefined"into the system prompt.
285-289: Mode-based section assembly: verify that ask-mode is intentionally sandbox/tool-lightThe new assembly logic pushes:
getAskModeSection(modelName)whenmode === "ask",getAgentModeSection(mode, sandboxContext)otherwise.This means only agent mode gets the
<tool_calling>and<sandbox_environment>sections; ask mode gets tone/formatting + knowledge‑cutoff but no explicit sandbox or tool‑usage guidance.Please confirm this is intentional. If ask‑mode conversations are still allowed to use tools or rely on sandbox context, you may want to share (or partially share) the tool/sandbox instructions between both modes to keep behavior consistent.
app/api/stripe.ts (1)
4-4: Verify Stripe account and webhook compatibility with the new API versionThe apiVersion
"2025-11-17.clover"is a valid Stripe Clover-series release. Ensure your Stripe account and webhook endpoints are configured to accept this API version to avoid unexpected behavior.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.