Skip to content

[APPS-2945] Update: build dev:verify bundles like uploads, and explain an oversized-bundle rejection - #558

Open
tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2945-dev-verify-terrapin
Open

tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2945-dev-verify-terrapin

Conversation

@tyffical

@tyffical tyffical commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

  • dev:verify should send the bytes an upload builds: minified, and with production settings even though the dev server runs under NODE_ENV=development. (APPS-2945, design page)
  • Datadog rejects an over-limit jsFunctionWithActions script with a generic 400, which the dev server passed on as a 500; the developer should learn which function is too large.
  • The server stays the only source of the limit, so the plugin keeps no copy and makes no lookup.

Architecture

flowchart TD
    R["dev:verify, /__dd/executeActionViaCloud, /__dd/debugBundle"] --> B["getBaseBackendBuildConfig (minify, keepNames) + withProductionSettings"]
    B --> P["POST preview-async: jsFunctionWithActions, inline script"]
    P -->|"200"| L["GET execution-long-polling: result"]
    P -->|"400 INVALID_INPUT_PARAMETER on .script"| E["413 naming the function and its size; warned once per function"]
Loading
  • withProductionSettings pins what Vite derives from NODE_ENV: export conditions, import.meta.env.DEV/PROD and esbuild.jsxDev.

Changes

7 changes across vite/build-config.ts, vite/dev-server.ts, README.md and tests
What changed File
Minify cloud bundles with names kept, as uploads do, from one shared config. build-config.ts, build-backend-functions.ts
Pin production settings for dev-server bundles. build-config.ts
Pass Vite's defaultServerConditions to the middleware. index.ts, dev-server.ts
Turn an oversized-script 400 into a 413 naming the function and its size, warned once. dev-server.ts
Document cloud execution's bundle and the 413. README.md
Require byte-identical upload and dev:verify bundles. dev-server.integration.test.ts
Test the settings, the 413, warn-once and pass-through errors. dev-server.test.ts, build-config.test.ts, index.test.ts

QA Instructions

yarn typecheck:all && yarn lint && yarn cli integrity
# Expected: all exit 0, integrity leaves no file changes ✅ VERIFIED
TMPDIR=/private/tmp yarn workspace @dd/tests test:unit packages/plugins/apps
# Expected: Test Suites: 39 passed, 39 total; Tests: 921 passed, 921 total ✅ VERIFIED
TMPDIR=/private/tmp yarn workspace @dd/tests test:unit
# Expected: Test Suites: 131 passed, 131 total; Tests: 1 skipped, 3512 passed, 3513 total ✅ VERIFIED
  • TMPDIR=/private/tmp keeps the manifest-tags and parameters suites passing on macOS.
  • Manual QA ran 2026-10-20 on this head: a Vite 8.3.3 scaffold, a Datadog staging org and this branch's packed plugin; set DD_SITE=<staging site>, DD_API_KEY and DD_APP_KEY first, and run the scripts from QA_DIR.
QA helper scripts
  • install-plugin.sh:
#!/usr/bin/env bash
# Usage: install-plugin.sh <pr-number> <build-plugins-checkout>
# Builds the worktree's packages, packs @datadog/vite-plugin to vite-plugin-<pr>.tgz here, and installs it into the
# QA scaffold (QA_APP, default ../qa-app beside this script). Prints the commit it was built from.
set -eu
QA_DIR="$(cd "$(dirname "$0")" && pwd)"
W="$2"
echo "building $(git -C "$W" log --oneline -1)"
(cd "$W" && yarn build:all > "$QA_DIR/logs/build-$1.log" 2>&1)
(cd "$W/packages/published/vite-plugin" && yarn pack --out "$QA_DIR/vite-plugin-$1.tgz" > /dev/null)
cd "${QA_APP:-$QA_DIR/../qa-app}"
npm install "$QA_DIR/vite-plugin-$1.tgz" > "$QA_DIR/logs/install-$1.log" 2>&1
echo "installed @datadog/vite-plugin $(node -p "require('@datadog/vite-plugin/package.json').version") from vite-plugin-$1.tgz"
  • qa-run.sh:
#!/usr/bin/env bash
# Usage: [QA_PORT=5174] [QA_REPEAT=1] qa-run.sh <development|dev-verify> <fixture>...   (needs DD_SITE, DD_API_KEY, DD_APP_KEY)
# Starts the scaffold's Vite dev server (QA_APP, default ../qa-app beside this script) in the given mode with every
# fetch the process makes logged, transforms each src/<fixture>.backend.ts, calls each exported function QA_REPEAT
# times through /__dd/executeAction (dev-verify sends it to the cloud), and prints the plugin's warnings and cloud
# log lines, then every request the process made.
set -u
MODE="$1"; shift
PORT="${QA_PORT:-5174}"
REPEAT="${QA_REPEAT:-1}"
QA_DIR="$(cd "$(dirname "$0")" && pwd)"
mkdir -p "$QA_DIR/logs"
LOG="$QA_DIR/logs/vite-$MODE-$$.log"; NET_LOG="$(node -p "require('os').tmpdir()")/qa-net-$MODE-$$.log"; : > "$NET_LOG"
cd "${QA_APP:-$QA_DIR/../qa-app}"
if [ -n "$(lsof -ti tcp:"$PORT" -sTCP:LISTEN)" ]; then echo "port $PORT is busy"; exit 1; fi
env -u DD_OAUTH_ACCESS_TOKEN -u DATADOG_OAUTH_ACCESS_TOKEN QA_NET_LOG="$NET_LOG" \
    NODE_OPTIONS="--import $QA_DIR/log-requests.mjs" \
    npx vite --mode "$MODE" --port "$PORT" --strictPort < /dev/null > "$LOG" 2>&1 &
for _ in $(seq 1 90); do curl -s -o /dev/null "http://localhost:$PORT/" && break; sleep 1; done
for fixture in "$@"; do
  module="$(curl -s "http://localhost:$PORT/src/$fixture.backend.ts")"
  if ! printf %s "$module" | grep -q executeBackendFunction; then
    echo "$fixture: rejected"
    continue
  fi
  echo "$fixture: accepted"
  for fn in $(sed -n 's/^export async function \([A-Za-z0-9_]*\).*/\1/p' "src/$fixture.backend.ts"); do
    FN="$(printf %s "src/$fixture" | shasum -a 256 | cut -d' ' -f1).$fn"
    for _ in $(seq 1 "$REPEAT"); do
      resp="$(curl -s -m 120 -w '\n%{http_code}' -X POST -H 'Content-Type: application/json' \
        -d "{\"functionName\":\"$FN\",\"args\":[\"QA\"]}" "http://localhost:$PORT/__dd/executeAction")"
      echo "  $fn: $(printf %s "$resp" | sed '$d' | cut -c1-400) [HTTP $(printf %s "$resp" | tail -1)]"
    done
  done
done
echo "plugin log:"
sed 's/\x1b\[[0-9;]*m//g' "$LOG" | grep -E "\|(warn|error)\||Executing action via cloud|larger than production" | cut -c1-400
echo "requests made:"
sed -E "s#https://(api\.)?${DD_SITE}#<staging>#" "$NET_LOG" | sed -E 's#/execution-long-polling/[^ ]+#/execution-long-polling/<receipt>#' | sort | uniq -c
kill "$(lsof -ti tcp:"$PORT" -sTCP:LISTEN)" 2>/dev/null
sleep 2
lsof -ti tcp:"$PORT" -sTCP:LISTEN || echo "server stopped"
  • qa-parity.sh:
#!/usr/bin/env bash
# Usage: [QA_PORT=5174] [QA_EXT=ts] qa-parity.sh <fixture> <function>
# Runs `vite build` in the scaffold (QA_APP, default ../qa-app beside this script) with every fetch logged, unzips the
# upload bundle for <fixture>.<function>, then fetches the same function's bundle from a dev-verify server's
# /__dd/debugBundle, and compares the two byte for byte. No Datadog credentials are set, so neither step authenticates.
set -u
FIXTURE="$1"; FUNC="$2"
PORT="${QA_PORT:-5174}"
EXT="${QA_EXT:-ts}"
QA_DIR="$(cd "$(dirname "$0")" && pwd)"
OUT="$(mktemp -d "$(node -p "require('os').tmpdir()")/qa-parity-XXXXXX")"
NET_LOG="$OUT/requests.log"; : > "$NET_LOG"
cd "${QA_APP:-$QA_DIR/../qa-app}"
CLEAN_ENV=(env -u DD_API_KEY -u DD_APP_KEY -u DATADOG_API_KEY -u DATADOG_APP_KEY -u DD_OAUTH_ACCESS_TOKEN
  -u DATADOG_OAUTH_ACCESS_TOKEN QA_NET_LOG="$NET_LOG" NODE_OPTIONS="--import $QA_DIR/log-requests.mjs")
"${CLEAN_ENV[@]}" DATADOG_APPS_PACKAGE_DIR="$OUT" npx vite build > "$OUT/build.log" 2>&1
echo "vite build exit $?, requests made: $(wc -l < "$NET_LOG" | tr -d ' ')"
NAME="$(printf %s "src/$FIXTURE" | shasum -a 256 | cut -d' ' -f1).$FUNC"
unzip -p "$OUT/datadog-app-assets.zip" "backend/$NAME.js" > "$OUT/upload.js"
"${CLEAN_ENV[@]}" npx vite --mode dev-verify --port "$PORT" --strictPort < /dev/null > "$OUT/dev.log" 2>&1 &
for _ in $(seq 1 90); do curl -s -o /dev/null "http://localhost:$PORT/" && break; sleep 1; done
curl -s -o /dev/null "http://localhost:$PORT/src/$FIXTURE.backend.$EXT"
curl -s -X POST -H 'Content-Type: application/json' -d "{\"functionName\":\"$NAME\"}" \
  "http://localhost:$PORT/__dd/debugBundle" > "$OUT/dev-verify.js"
kill "$(lsof -ti tcp:"$PORT" -sTCP:LISTEN)" 2>/dev/null
echo "upload bundle: $(wc -c < "$OUT/upload.js" | tr -d ' ') bytes, $(wc -l < "$OUT/upload.js" | tr -d ' ') newlines"
echo "dev:verify bundle: $(wc -c < "$OUT/dev-verify.js" | tr -d ' ') bytes, $(wc -l < "$OUT/dev-verify.js" | tr -d ' ') newlines"
cmp "$OUT/upload.js" "$OUT/dev-verify.js" && echo "identical"
echo "requests made, both steps:"; sort "$NET_LOG" | uniq -c
  • log-requests.mjs:
// Preloaded with --import: appends the method and URL of every fetch the process makes to $QA_NET_LOG.
import { appendFileSync } from 'node:fs';

const realFetch = globalThis.fetch;
globalThis.fetch = (input, init) => {
    const url = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;
    const method = init?.method ?? (typeof input === 'object' && 'method' in input ? input.method : 'GET');
    appendFileSync(process.env.QA_NET_LOG, `${method} ${url.split('?')[0]}\n`);
    return realFetch(input, init);
};
  • capture-oversize.mjs:
// Usage: node capture-oversize.mjs <scriptChars>   (needs DD_SITE, DD_API_KEY, DD_APP_KEY)
// Submits a jsFunctionWithActions query whose script is <scriptChars> characters long to staging's
// preview-async endpoint, then prints the raw status and body of the submit (and of one long poll, if accepted).
import { randomUUID } from 'node:crypto';

const length = Number(process.argv[2]);
const prefix = 'export async function main($) { return "';
const suffix = '"; }';
const script = prefix + 'y'.repeat(length - prefix.length - suffix.length) + suffix;
const headers = {
    'Content-Type': 'application/json',
    'DD-API-KEY': process.env.DD_API_KEY,
    'DD-APPLICATION-KEY': process.env.DD_APP_KEY,
};
const body = JSON.stringify({
    data: {
        type: 'queries',
        attributes: {
            query: {
                id: randomUUID(),
                name: 'oversize-capture',
                type: 'action',
                properties: {
                    spec: {
                        fqn: 'com.datadoghq.datatransformation.jsFunctionWithActions',
                        inputs: { script, allowedConnectionIds: [], context: { backendFunctionArgs: [] } },
                    },
                    onlyTriggerManually: true,
                },
            },
            template_params: {},
        },
    },
});
const base = `https://api.${process.env.DD_SITE}/api/v2/app-builder/queries`;
const submit = await fetch(`${base}/preview-async`, { method: 'POST', headers, body });
console.log(`script length: ${script.length}`);
console.log(`submit: HTTP ${submit.status} ${submit.statusText}`);
const submitText = await submit.text();
console.log(submitText);
if (submit.ok) {
    const id = JSON.parse(submitText).data?.id;
    const poll = await fetch(`${base}/execution-long-polling/${id}`, { headers });
    console.log(`poll: HTTP ${poll.status} ${poll.statusText}`);
    console.log((await poll.text()).slice(0, 2000));
}
QA fixtures
  • src/getGreeting.backend.ts:
export async function getGreeting(name: string) {
    return `Hello, ${name}! This greeting ran as a backend function.`;
}
  • src/hugeGreeting.backend.ts returns one character of a 1,050,000-character string literal, so its minified bundle is over the limit.
  • src/flavors.backend.ts, importing a local package node_modules/dd-conditional-flavor:
import { flavor } from 'dd-conditional-flavor';

export async function flavors() {
    const viteFlavor = import.meta.env.DEV ? 'vite-dev' : 'vite-prod';
    const nodeFlavor = process.env.NODE_ENV === 'production' ? 'node-prod' : 'node-dev';
    return [flavor, viteFlavor, nodeFlavor, import.meta.env.MODE];
}
cat node_modules/dd-conditional-flavor/package.json node_modules/dd-conditional-flavor/development.js node_modules/dd-conditional-flavor/production.js
# {"name":"dd-conditional-flavor","type":"module","exports":{".":{"development":"./development.js","production":"./production.js","default":"./production.js"}}}
# export const flavor = 'dev-export';
# export const flavor = 'prod-export';
  • src/markup.backend.tsx, with the scaffold's "jsx": "react-jsx" and React 19:
export async function markup() {
    const element = <section title="QA" />;
    return element.props;
}
  • src/App.tsx adds, so vite build packages both:
import { flavors } from './flavors.backend';
import { markup } from './markup.backend';

// Referenced so `vite build` packages them as uploads.
export const qaFixtures = [flavors, markup];
Staging's answer at and one past the limit
cd "$QA_DIR" && node capture-oversize.mjs 1048577
# script length: 1048577
# submit: HTTP 400 Bad Request
# {"errors":[{"status":"400","id":"8875bc1f-1bfb-4e8d-b398-11e9748c7411","code":"INVALID_INPUT_PARAMETER","title":"error running query","detail":"input parameter validation error: 1 error occurred:\n\t* .script: length must be \u003c= 1048576, but got 1048577\n\n"}]}
node capture-oversize.mjs 1048576
# script length: 1048576
# submit: HTTP 200 OK
# {"data":{"id":"CmHSYe86B4NaQt4AepHqtlkugoNvaTc8SZxd-U8egcO0OC-mWr3VDqjzzfvvtR7dc7vdxljdtHAsSYGzGuvle6cV7TGxcXnKzILQE6I7PdSu3NVI2XCv3gG2q3qzukOfjPiqEK8BGAE=","type":"executionReceipt"}}
# poll: HTTP 200 OK
# {"data":{"id":"00000000-0000-0000-0000-000000000000","type":"queryResult","attributes":{"done":true,"outputs":{"data":"<y…>
# Expected: 1048576 runs; 1048577 gets the 400 the dev server maps ✅ VERIFIED (poll output's run of y elided)
The dev:verify bundle equals the upload's bytes
cd "$QA_DIR" && ./install-plugin.sh 558 <build-plugins checkout of this branch>
./qa-parity.sh getGreeting getGreeting
# vite build exit 0, requests made: 1
# upload bundle: 2382 bytes, 0 newlines
# dev:verify bundle: 2382 bytes, 0 newlines
# identical
# requests made, both steps:
#       2 POST <the plugin's log intake>
./qa-parity.sh flavors flavors
# vite build exit 0, requests made: 1
# upload bundle: 2421 bytes, 0 newlines
# dev:verify bundle: 2421 bytes, 0 newlines
# identical
# requests made, both steps:
#       2 POST <the plugin's log intake>
QA_EXT=tsx ./qa-parity.sh markup markup
# vite build exit 0, requests made: 1
# upload bundle: 40619 bytes, 17 newlines
# dev:verify bundle: 40619 bytes, 17 newlines
# identical
# requests made, both steps:
#       2 POST <the plugin's log intake>
# Expected: each pair identical; `vite build` makes no Datadog API request ✅ VERIFIED
dev:verify against staging, including an oversized function
QA_REPEAT=2 ./qa-run.sh dev-verify getGreeting flavors hugeGreeting
# getGreeting: accepted
#   getGreeting: {"success":true,"result":{"data":"Hello, QA! This greeting ran as a backend function."}} [HTTP 200]
#   getGreeting: {"success":true,"result":{"data":"Hello, QA! This greeting ran as a backend function."}} [HTTP 200]
# flavors: accepted
#   flavors: {"success":true,"result":{"data":["prod-export","vite-prod","node-dev","production"]}} [HTTP 200]
#   flavors: {"success":true,"result":{"data":["prod-export","vite-prod","node-dev","production"]}} [HTTP 200]
# hugeGreeting: accepted
#   hugeGreeting: {"success":false,"error":"Backend function \"src/hugeGreeting/hugeGreeting\" is larger than production accepts: its minified bundle is 1052341 characters, and Datadog answered \".script: length must be <= 1048576, but got 1052341\". Shrink the bundle, for example by splitting the function or moving large data out of it."} [HTTP 413]
#   hugeGreeting: {"success":false,"error":"Backend function \"src/hugeGreeting/hugeGreeting\" is larger than production accepts: its minified bundle is 1052341 characters, and Datadog answered \".script: length must be <= 1048576, but got 1052341\". Shrink the bundle, for example by splitting the function or moving large data out of it."} [HTTP 413]
# plugin log:
# [Qa App|warn|vite|git] No git remotes available, skipping git plugin. This is expected for a repository that has not been pushed yet.
# [Qa App|debug|vite|apps] Executing action via cloud: src/getGreeting/getGreeting with args
# [Qa App|debug|vite|apps] Executing action via cloud: src/getGreeting/getGreeting with args
# [Qa App|debug|vite|apps] Executing action via cloud: src/flavors/flavors with args
# [Qa App|debug|vite|apps] Executing action via cloud: src/flavors/flavors with args
# [Qa App|debug|vite|apps] Executing action via cloud: src/hugeGreeting/hugeGreeting with args
# [Qa App|warn|vite|apps] Backend function "src/hugeGreeting/hugeGreeting" is larger than production accepts: its minified bundle is 1052341 characters, and Datadog answered ".script: length must be <= 1048576, but got 1052341". Shrink the bundle, for example by splitting the function or moving large data out of it.
# [Qa App|debug|vite|apps] Error handling /__dd/executeAction: Backend function "src/hugeGreeting/hugeGreeting" is larger than production accepts: its minified bundle is 1052341 characters, and Datadog answered ".script: length must be <= 1048576, but got 1052341". Shrink the bundle, for example by splitting the function or moving large data out of it.
# [Qa App|debug|vite|apps] Executing action via cloud: src/hugeGreeting/hugeGreeting with args
# [Qa App|debug|vite|apps] Error handling /__dd/executeAction: Backend function "src/hugeGreeting/hugeGreeting" is larger than production accepts: its minified bundle is 1052341 characters, and Datadog answered ".script: length must be <= 1048576, but got 1052341". Shrink the bundle, for example by splitting the function or moving large data out of it.
# requests made:
#       4 GET <staging>/api/v2/app-builder/queries/execution-long-polling/<receipt>
#       6 POST <staging>/api/v2/app-builder/queries/preview-async
#       1 POST <the plugin's log intake>
# server stopped
# Expected: flavors returns the production export, vite-prod and MODE production from the cloud (Node there reports a non-production NODE_ENV, as it would for an upload); both hugeGreeting calls get the 413 with one terminal warning; no manifest request ✅ VERIFIED
Local development mode makes no manifest request
./qa-run.sh development getGreeting
# getGreeting: accepted
#   getGreeting: {"success":true,"result":{"data":"Hello, QA! This greeting ran as a backend function."}} [HTTP 200]
# plugin log:
# [Qa App|warn|vite|git] No git remotes available, skipping git plugin. This is expected for a repository that has not been pushed yet.
# requests made:
#       1 GET <staging>/api/v2/app-builder/queries/execution-long-polling/<receipt>
#       1 POST <staging>/api/v2/app-builder/queries/preview-async
#       1 POST <the plugin's log intake>
# server stopped
# Expected: local execution runs; the only Datadog requests are the existing runtime-context query ✅ VERIFIED

Blast Radius

  • dev:verify and the cloud dev-server routes send minified, production-built bundles, so cloud stack frames point into minified code, as an upload's do.
  • Upload bundles are unchanged; an oversized rejection answers 413 instead of 500, and no request is added.
  • No feature flag.
  • Low risk.

Out of Scope / Follow-ups

7 items deferred
Item Status Next step
Vite 5's export conditions and Vite's missing-peer stub still follow the dev server's NODE_ENV Accepted None; the README says so
Past roughly 12-16 MB, staging's other answers stay a 500 Deferred Map them if a bundle gets that big
Cloud stack frames point into minified code Deferred Source-map them if needed
The match reads doRequest's formatted message and quotes only the .script line Accepted Expose structured errors if another caller needs them
The oversized reply uses 413 rather than 422 Deferred Switch if a client needs to tell it apart
vite build doesn't check bundle size, so an oversized function fails only when it runs Deferred Warn during the build
Bundles over the script limit in dev:verify Deferred until needed None; production preview rejects them too

Documentation

🤖 Generated with Claude Code

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5b97251 | Docs | View more details | Give us feedback!

@tyffical
tyffical added this pull request to stack #559 October 7, 2026 04:02
@tyffical
tyffical requested a balanced review from Copilot October 7, 2026 04:31
@tyffical

tyffical commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T15:01:25.852143Z 5b97251 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

Runtime selection and script-limit behavior are comprehensively covered; only a non-blocking test-description grammar nit remains.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Aligns dev:verify and cloud execution with each organization’s backend runtime while enforcing live action script limits.

Changes:

  • Uses the resolved v1/v2 runtime for cloud bundles and execution.
  • Fetches and caches runtime-specific script limits.
  • Adds documentation and comprehensive coverage.
File Description
packages/​plugins/​apps/​src/​vite/​index.ts Wires runtime resolution and limit prefetching.
packages/​plugins/​apps/​src/​vite/​index.test.ts Tests runtime and prefetch integration.
packages/​plugins/​apps/​src/​vite/​dev-server.ts Builds and submits runtime-specific cloud actions.
packages/​plugins/​apps/​src/​vite/​dev-server.test.ts Covers requests, limits, caching, and failures.
packages/​plugins/​apps/​src/​vite/​dev-server.integration.test.ts Updates middleware integration setup.
packages/​plugins/​apps/​src/​backend-runtime.ts Defines runtimes and action FQN mapping.
packages/​plugins/​apps/​src/​backend-runtime.test.ts Tests action FQN mapping.
packages/​plugins/​apps/​src/​action-script-limits.ts Resolves and caches live script limits.
packages/​plugins/​apps/​src/​action-script-limits.test.ts Tests authentication, parsing, caching, and fallback.
packages/​plugins/​apps/​README.md Documents runtime-aware cloud execution and limits.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/plugins/apps/src/vite/dev-server.test.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 5ca349e18e

ℹ️ 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".

@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 4495187 to 6164a77 Compare October 7, 2026 07:00
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch 2 times, most recently from 3ebc888 to 164b6c1 Compare October 7, 2026 18:15
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 6164a77 to a160fb7 Compare October 7, 2026 18:17
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 164b6c1 to 4bcaf66 Compare October 7, 2026 18:18
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 14c5415 to e898bea Compare October 7, 2026 18:33
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch 2 times, most recently from e4ce1c6 to f5ad4cf Compare October 7, 2026 20:35
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from e898bea to 481364f Compare October 8, 2026 03:14
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from f5ad4cf to 146e2df Compare October 8, 2026 03:25
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 481364f to e574841 Compare October 8, 2026 03:44
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 146e2df to f740f73 Compare October 8, 2026 05:19
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from e574841 to 34a9189 Compare October 13, 2026 00:52
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from f740f73 to 41a3a65 Compare October 13, 2026 01:09
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 34a9189 to abf34ad Compare October 13, 2026 20:08
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 41a3a65 to 1200bd8 Compare October 13, 2026 22:46
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from abf34ad to 892bda9 Compare October 15, 2026 01:04
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 1200bd8 to 87567b2 Compare October 15, 2026 01:43
@tyffical tyffical changed the title [APPS-2945] Add: dev:verify on the org's Terrapin runtime, with the action's live script limit [APPS-2945] Add: dev:verify as the upload's script action, with its live script limit Oct 15, 2026
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch 2 times, most recently from bd21790 to 2352fe9 Compare October 15, 2026 15:37
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch 2 times, most recently from e44fe4a to 141d960 Compare October 16, 2026 00:47
@tyffical
tyffical marked this pull request as ready for review October 16, 2026 01:26
@tyffical
tyffical requested a review from a team as a code owner October 16, 2026 01:26
@tyffical
tyffical requested review from setnilson and removed request for a team October 16, 2026 01:26
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 9c0e2e3 to 80eb07d Compare October 16, 2026 02:53
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 141d960 to 04671dd Compare October 16, 2026 04:18
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 80eb07d to 8da4921 Compare October 16, 2026 04:44
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 04671dd to 696d422 Compare October 16, 2026 16:37
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 8da4921 to e66dbb7 Compare October 16, 2026 16:37
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from 696d422 to a64a6ad Compare October 16, 2026 21:37
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch 2 times, most recently from e3817c8 to 3d136e8 Compare October 18, 2026 05:41
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-follow-terrapin-flag branch from a64a6ad to 31ea49f Compare October 18, 2026 05:41
@tyffical tyffical changed the title [APPS-2945] Add: dev:verify as the upload's script action, with its live script limit [APPS-2945] Add: check dev:verify bundles against jsFunctionWithActions's live script limit Oct 18, 2026
@tyffical
tyffical removed this pull request from stack #559 October 18, 2026 05:56
@tyffical
tyffical changed the base branch from tiffany.trinh/apps-2945-follow-terrapin-flag to master October 18, 2026 05:56
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch 2 times, most recently from dd2f262 to 4c83242 Compare October 20, 2026 22:58
@tyffical tyffical changed the title [APPS-2945] Add: check dev:verify bundles against jsFunctionWithActions's live script limit [APPS-2945] Update: minify dev:verify bundles like uploads, and explain an oversized-bundle rejection Oct 20, 2026
…rsized-bundle rejection

Cloud execution (dev:verify, /__dd/executeActionViaCloud) builds backend
functions with the shared base config's minify and keepNames settings, the
ones uploads use. It also pins the production settings Vite would otherwise
take from the dev server's NODE_ENV: export conditions, import.meta.env.DEV
and PROD, and the JSX dev transform. So it sends the bytes a `vite build`
upload writes.

When Datadog rejects a bundle as an invalid `script` input
(INVALID_INPUT_PARAMETER on `.script`), the dev server answers with a 413
that names the function, its size in code points and Datadog's answer, and
warns once per function, instead of passing the 400 on as a 500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2945-dev-verify-terrapin branch from 4c83242 to 5b97251 Compare October 21, 2026 02:07
@tyffical tyffical changed the title [APPS-2945] Update: minify dev:verify bundles like uploads, and explain an oversized-bundle rejection [APPS-2945] Update: build dev:verify bundles like uploads, and explain an oversized-bundle rejection Oct 21, 2026
@tyffical
tyffical requested review from ksun154 and a balanced review from Copilot October 23, 2026 14:57
@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI 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.

🟢 Approval recommended

No unresolved issues remain, focused tests cover the changed behavior, and the linked CI run succeeded for the reviewed commit.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 5b9725176d

ℹ️ 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".

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.

2 participants