Skip to content

fix: declare includedFiles for recurring jobs to resolve packaging - #2784

Merged
mrkoreye merged 3 commits into
mainfrom
korey/fix-recurring-jobs-bug
Aug 11, 2026
Merged

fix: declare includedFiles for recurring jobs to resolve packaging#2784
mrkoreye merged 3 commits into
mainfrom
korey/fix-recurring-jobs-bug

Conversation

@mrkoreye

Copy link
Copy Markdown
Contributor

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 its config omitted includedFiles. Builder's publish packager (ai-services netlify-lite) only accepts an omitted includedFiles for 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.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

builder-io-integration[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: ["**"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this overinclude files and bloat things out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mrkoreye
mrkoreye merged commit 86a9c74 into main Aug 11, 2026
95 of 96 checks passed
@mrkoreye
mrkoreye deleted the korey/fix-recurring-jobs-bug branch August 11, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants