fix: declare includedFiles for recurring jobs to resolve packaging - #2784
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Incremental Code Review Summary
I reviewed the latest PR #2784 state against the prior clean reviews. The change remains limited to Netlify deployment generation: both single-template and workspace recurring-job emitters declare includedFiles: ["**"], satisfying dependency tracing for generated entries that import node:crypto. Regression assertions cover both emitters, and the patch changeset remains correctly scoped to @agent-native/core.
Risk assessment: Standard. The implementation preserves the existing cron schedule, bundler setting, and durable-background handoff, with no new UI or application behavior. Two independent reviews found no new confirmed bugs. Focused verification passed, including the affected deployment tests (134 tests reported passed); broader local failures involving unavailable h3 remain unrelated environment issues. No previous review comments required resolution.
🧪 Browser testing: Skipped — PR only modifies backend/config/docs/tests, no UI impact
| generator: "agent-native build", | ||
| schedule: "* * * * *", | ||
| nodeBundler: "none", | ||
| includedFiles: ["**"], |
There was a problem hiding this comment.
will this overinclude files and bloat things out?
There was a problem hiding this comment.
no, it shouldn't, and also this is a server side function so bundle size is probably not as sensitive as an app shipped to a browser client app

Problem
Publishing any agent-native app to Netlify through Builder hosting fails:
Function "agent-native-recurring-jobs" is outside the supported packaging slice:
agent-native-recurring-jobs requires dependency tracing because its entry file
contains an import, re-export, or require edge; omitted includedFiles is only
supported for self-contained scheduled functions.
The emitted recurring-jobs function's entry imports
node:crypto, but itsconfigomittedincludedFiles. Builder's publish packager (ai-servicesnetlify-lite) only accepts an omittedincludedFilesfor scheduled functions with zero import/require edges, and there is no fallback, so the whole publish fails. The emit is unconditional for the netlify preset, so this broke publishing by default. The per-app workspace-deploy variant had the same defect.Fix
Add
includedFiles: ["**"]to both recurring-jobs configs, matching every other emitted function in core and templates. The function dir holds only its entry file, so the bundle is unchanged in substance and the cron schedule still registers.