diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95c087be14..475271c59b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,8 +86,56 @@ jobs: path: ${{ steps.openclaw-store.outputs.path }} key: ${{ steps.openclaw-cache.outputs.cache-primary-key }} + component-upgrade: + name: component-upgrade + runs-on: ubuntu-24.04 + timeout-minutes: 20 + env: + PLAYWRIGHT_LOCAL_AUTH_BACKEND_VERSION: precompiled-2026-10-22-1447815 + + steps: + - uses: actions/checkout@v7.0.1 + + - uses: ./.github/actions/setup-bun + + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24.22.1 + + - name: Fetch the pinned pre-upgrade application + run: git -c maintenance.auto=false -c gc.auto=0 fetch --no-tags --depth=1 origin 252a3f86d05331ea5944ad7749165fafb282097e + + - name: Cache the pinned Convex backend + uses: actions/cache@v6 + with: + path: ~/.cache/convex/binaries/${{ env.PLAYWRIGHT_LOCAL_AUTH_BACKEND_VERSION }} + key: ${{ runner.os }}-${{ runner.arch }}-convex-${{ env.PLAYWRIGHT_LOCAL_AUTH_BACKEND_VERSION }}-7be627d8a8c9175b + + - name: Prepare the pinned Convex backend + timeout-minutes: 5 + run: | + set -euo pipefail + backend_dir="$HOME/.cache/convex/binaries/$PLAYWRIGHT_LOCAL_AUTH_BACKEND_VERSION" + if [[ -x "$backend_dir/convex-local-backend" ]]; then + exit 0 + fi + scratch=$(mktemp -d) + trap 'rm -rf "$scratch"' EXIT + curl --fail --show-error --location --retry 3 --retry-all-errors \ + --retry-delay 5 --connect-timeout 15 --max-time 60 \ + --header 'Accept: application/octet-stream' \ + --output "$scratch/backend.zip" \ + https://api.github.com/repos/convex/convex-backend/releases/assets/667377511 + echo "7be627d8a8c9175b66a55cf6c4ab63c5f6bde1c412f59fbbe93f64a24a11bd13 $scratch/backend.zip" | sha256sum --check + unzip -p "$scratch/backend.zip" convex-local-backend > "$scratch/convex-local-backend" + install -D -m 755 "$scratch/convex-local-backend" "$backend_dir/convex-local-backend" + + - name: Prove component data survives a forward upgrade + run: bun run test:component-upgrade + unit: name: unit + needs: component-upgrade runs-on: ubuntu-24.04 timeout-minutes: 10 diff --git a/CHANGELOG.md b/CHANGELOG.md index f786ac138d..ce0b39d7ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Browser tests: retain the local Convex backend after its first push with Convex 1.51, while configuring test environment variables before publishing functions. + - Management: show Publisher abuse for unsupported view links instead of an empty page. Selected skill and plugin links keep their existing precedence. - Link previews: release the rendered image and renderer after PNG generation, including when rendering fails. diff --git a/bun.lock b/bun.lock index 34eb7f1a3a..98294a7b7f 100644 --- a/bun.lock +++ b/bun.lock @@ -7,9 +7,9 @@ "dependencies": { "@auth/core": "0.41.3", "@convex-dev/auth": "0.0.98", - "@convex-dev/migrations": "0.3.8", + "@convex-dev/migrations": "0.3.9", "@convex-dev/rate-limiter": "0.4.3", - "@convex-dev/workpool": "0.4.15", + "@convex-dev/workpool": "0.5.0", "@fontsource/bricolage-grotesque": "5.3.0", "@fontsource/ibm-plex-mono": "5.3.0", "@fontsource/noto-sans-sc": "5.3.1", @@ -32,20 +32,20 @@ "@resvg/resvg-wasm": "2.6.2", "@shikijs/rehype": "4.6.0", "@tanstack/react-router": "1.170.46", - "@tanstack/react-start": "1.169.5", - "@vercel/oidc": "4.0.8", - "arktype": "2.2.9", + "@tanstack/react-start": "1.169.7", + "@vercel/oidc": "4.0.9", + "arktype": "2.2.10", "class-variance-authority": "0.7.1", "clawhub-schema": "workspace:0.0.2", "clsx": "2.1.1", - "convex": "1.49.0", - "convex-helpers": "0.1.135", + "convex": "1.51.0", + "convex-helpers": "0.1.136", "fflate": "0.8.3", "franc-min": "6.2.0", "h3": "2.0.8", - "ignore": "7.0.14", - "jose": "6.2.17", - "lucide-react": "1.72.0", + "ignore": "7.0.16", + "jose": "6.2.18", + "lucide-react": "1.77.0", "mermaid": "^11.17.2", "mime": "4.1.2", "monaco-editor": "0.57.0", @@ -57,13 +57,13 @@ "rehype-raw": "7.0.0", "rehype-sanitize": "6.0.0", "remark-gfm": "4.0.1", - "resend": "6.38.1", + "resend": "6.39.0", "saxes": "6.0.0", "semver": "7.8.6", "sharp": "0.35.5", "shiki": "4.6.0", "sonner": "2.0.8", - "tailwind-merge": "3.7.0", + "tailwind-merge": "3.7.1", "tailwindcss": "4.3.5", "tw-animate-css": "1.4.0", "unified": "11.0.5", @@ -119,11 +119,11 @@ "dependencies": { "@clack/prompts": "1.9.0", "@openclaw/plugin-inspector": "0.4.6", - "arktype": "2.2.9", + "arktype": "2.2.10", "commander": "15.1.0", - "croner": "11.0.0", + "croner": "11.0.1", "fflate": "0.8.3", - "ignore": "7.0.14", + "ignore": "7.0.16", "json5": "2.2.3", "mime": "4.1.2", "ora": "10.0.0", @@ -147,10 +147,10 @@ }, "dependencies": { "@clack/prompts": "1.9.0", - "arktype": "2.2.9", + "arktype": "2.2.10", "commander": "15.1.0", "fflate": "0.8.3", - "ignore": "7.0.14", + "ignore": "7.0.16", "json5": "2.2.3", "mime": "4.1.2", "ora": "10.0.0", @@ -168,8 +168,8 @@ "name": "clawhub-schema", "version": "0.0.2", "dependencies": { - "arktype": "2.2.9", - "croner": "11.0.0", + "arktype": "2.2.10", + "croner": "11.0.1", "json5": "2.2.3", "unicode-case-folding": "1.1.2", "yaml": "2.9.1", @@ -203,9 +203,9 @@ "packages": { "@antfu/install-pkg": ["@antfu/install-pkg@1.1.0", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="], - "@ark/schema": ["@ark/schema@0.56.8", "", { "dependencies": { "@ark/util": "0.56.8" } }, "sha512-R05TOe85oQBGFFw2zKMuZpqkXibLKuC/aJt6VwFn5Cjc4x3NkWfhvGRpRDycNkj3ddcHnOPtIsmjVowJO9Yxdw=="], + "@ark/schema": ["@ark/schema@0.56.9", "", { "dependencies": { "@ark/util": "0.56.9" } }, "sha512-3kFUweE9PagqzEC9FEOirBRrVxBj0D6o8UiZDDrCyrcaBepRFHjUezf6MuTk8mKfJ4NKzSsaUCOVK+jzcm+dPw=="], - "@ark/util": ["@ark/util@0.56.8", "", {}, "sha512-XLiQyGfpJcws1zCtp2Cva8s1oheCdFn1Rt6JSyC4NnkDrpwCJnlaiawuuOc1Z97vMH+jEzW5vyyf0xOju5wUQA=="], + "@ark/util": ["@ark/util@0.56.9", "", {}, "sha512-/yA1me+AMmI75VaQ5owz1A1owopAJ0ZZFXy9SI1Q69kErJfxuglQBYjGeOTFyygJjZ9Rf4UjCtD5XTuEiNiGHw=="], "@auth/core": ["@auth/core@0.41.3", "", { "dependencies": { "@panva/hkdf": "^1.2.1", "jose": "^6.0.6", "oauth4webapi": "^3.3.0", "preact": "10.24.3", "preact-render-to-string": "6.5.11" }, "peerDependencies": { "@simplewebauthn/browser": "^9.0.1", "@simplewebauthn/server": "^9.0.2", "nodemailer": "^7.0.7 || ^8.0.5" }, "optionalPeers": ["@simplewebauthn/browser", "@simplewebauthn/server", "nodemailer"] }, "sha512-sJ3JMHHkXMD3aOjopv7mOBTO1Ocw4b0fAEXJBz6k7YHLpYQI6C40jCUPc5fNvUKxXRXNE1/sRISA15UrwWJBTw=="], @@ -257,11 +257,11 @@ "@convex-dev/batch-worker": ["@convex-dev/batch-worker@0.2.2", "", { "peerDependencies": { "convex": "^1.36.1", "react": "^18.3.1 || ^19.0.0" } }, "sha512-3knigElzTVhWw1sN28EYkGBTdrJZ03vMj2PJPuFq3V0Tg41i7tcv/EWDBFQWcUaKzBWWVw693hcJtxCF3CRtEw=="], - "@convex-dev/migrations": ["@convex-dev/migrations@0.3.8", "", { "peerDependencies": { "convex": "^1.42.0", "convex-helpers": "^0.1.115" } }, "sha512-+wI5pHQzvcLxBEMLl7yhClfaz6jXppI5RsP/+UOFl0fmCfnbYXMKNelr8u08KZAmCGPUkEjMb4teZsyYJH9sWQ=="], + "@convex-dev/migrations": ["@convex-dev/migrations@0.3.9", "", { "peerDependencies": { "convex": "^1.42.0", "convex-helpers": "^0.1.115" } }, "sha512-fU+S9FeF7Zb0ley8GHd4L7GgSY8/qFCsSoq64qKiPXp3bgCKf6fDOehlB3c6b3SU3wCtTTroQJStXiSvRVDmOQ=="], "@convex-dev/rate-limiter": ["@convex-dev/rate-limiter@0.4.3", "", { "dependencies": { "@convex-dev/batch-worker": "0.3.5" }, "peerDependencies": { "convex": "^1.43.0", "react": "^18.2.0 || ^19.0.0" }, "optionalPeers": ["react"] }, "sha512-IXIEGbZBANC5B23pGmIui7p49kSiltNWyJ7wX7nFmkR396X/Oj9ebgScgxSJMAW7DkhpUtt1NAnQHhjB0v6a/A=="], - "@convex-dev/workpool": ["@convex-dev/workpool@0.4.15", "", { "dependencies": { "@convex-dev/batch-worker": "^0.3.6" }, "peerDependencies": { "convex": "^1.43.0", "convex-helpers": "^0.1.94" } }, "sha512-eweNWj3nHnUpwT40S5qwtA/d9LbuVMXlBP6GqM5tE4+eAOkzWbudiiCz9bi1bBpFSjtnbdRfQ+PoBG/STqgj8A=="], + "@convex-dev/workpool": ["@convex-dev/workpool@0.5.0", "", { "dependencies": { "@convex-dev/batch-worker": "^0.3.6" }, "peerDependencies": { "convex": "^1.47.0", "convex-helpers": "^0.1.94" } }, "sha512-BKa4ZPOP22+IQGC09J3WvOI4sY4Yg0C1ZsitjfAYvP9UQRxRz4XnH77HeBwOkYO4TO3/hyy5HfSF5UtWUBBXXQ=="], "@edge-runtime/primitives": ["@edge-runtime/primitives@6.0.0", "", {}, "sha512-FqoxaBT+prPBHBwE1WXS1ocnu/VLTQyZ6NMUBAdbP7N2hsFTTxMC/jMu2D/8GAlMQfxeuppcPuCUk/HO3fpIvA=="], @@ -429,13 +429,13 @@ "@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.4.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-eIPGZIqC+8JKaeZmvnCANJQF4xWkkHqSnAAajtFxgwDMAOnCgxNvP52SeWZ41PyVwoe+Le/NQuZSaQ8j7YshSA=="], - "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA=="], + "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA=="], - "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA=="], + "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA=="], - "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ=="], + "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ=="], - "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA=="], + "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA=="], "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.4.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-U0p7/tEtqvHX2crhd841CDwKtp5CFkKXVjOhmfccR3Pvp64sj8KBwRqsvltqLOwVBbj0NtkxwXSDpEHYGbxeXQ=="], @@ -523,21 +523,21 @@ "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.78.0", "", { "os": "linux", "cpu": "arm" }, "sha512-lIK0XJi4JP1FnhuLjR/JWhQHGghZc+ghFNnbZTQC8kxsmrkW3ex8CeF7fp0FT+rEP0Nm6voCYkasL8poVWA9sQ=="], - "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.78.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-o2LJIHfW3ZADOjDVk5c7MM1M8CiAG43GTc4mlJAK23fOHgru4CvnqWedCoCXpIsKokoRdEa7XdQywPGZv1BAiA=="], + "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.78.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-o2LJIHfW3ZADOjDVk5c7MM1M8CiAG43GTc4mlJAK23fOHgru4CvnqWedCoCXpIsKokoRdEa7XdQywPGZv1BAiA=="], - "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.78.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-G+lUaQk94Vo+4byyd8X2+pPXtd7wObpdbvBC8xyozZD0ROSVBI3XpNNR6HECkJq4Q51AwLuJG81f4x+4eqvSrw=="], + "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.78.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-G+lUaQk94Vo+4byyd8X2+pPXtd7wObpdbvBC8xyozZD0ROSVBI3XpNNR6HECkJq4Q51AwLuJG81f4x+4eqvSrw=="], - "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.78.0", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-r76PAZf9/ZgF/iDRaIf8nLsr4x6ZHe/j2QLmWUjoQ46Sa11qMO68a5u5iux3y8vLzqYTS/xtKO9PjjMfyk5png=="], + "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.78.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-r76PAZf9/ZgF/iDRaIf8nLsr4x6ZHe/j2QLmWUjoQ46Sa11qMO68a5u5iux3y8vLzqYTS/xtKO9PjjMfyk5png=="], - "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.78.0", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-SQiXTt/c4aVoRXkJvhf4Y/sA1XYe3XjSMDbdX5PiAssBuHERoGtncQXz0KKWkXPejWTKlAL4mZSQZdHOCiw7TA=="], + "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.78.0", "", { "os": "linux", "cpu": "none" }, "sha512-SQiXTt/c4aVoRXkJvhf4Y/sA1XYe3XjSMDbdX5PiAssBuHERoGtncQXz0KKWkXPejWTKlAL4mZSQZdHOCiw7TA=="], - "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.78.0", "", { "os": "linux", "cpu": "none", "libc": "musl" }, "sha512-VNB3wFUx/rAqwVNW+uyXxb+c0HUrmcS51UPkFMDWJY95c6Tck6u6HOyVLsqiYoC8kh2mGlwanYmjb/R2McvN0A=="], + "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.78.0", "", { "os": "linux", "cpu": "none" }, "sha512-VNB3wFUx/rAqwVNW+uyXxb+c0HUrmcS51UPkFMDWJY95c6Tck6u6HOyVLsqiYoC8kh2mGlwanYmjb/R2McvN0A=="], - "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.78.0", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-1nbI0Y7SXwx2f4mJmKt58MaDdjAcoaYM90pBMGdcZCsTW2taFW1/MUi3uQGRPAN2n+3PldCdO9m+D6x+gU/heg=="], + "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.78.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-1nbI0Y7SXwx2f4mJmKt58MaDdjAcoaYM90pBMGdcZCsTW2taFW1/MUi3uQGRPAN2n+3PldCdO9m+D6x+gU/heg=="], - "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.78.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-I2z2ISPjrl3CSRF5fmQkNnoh46UVU1GjM1V0+COJyNZcj0SDNM4DrPP2/gXCX38YJ1P2BL6sF2VdsJ+pEYEbJQ=="], + "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.78.0", "", { "os": "linux", "cpu": "x64" }, "sha512-I2z2ISPjrl3CSRF5fmQkNnoh46UVU1GjM1V0+COJyNZcj0SDNM4DrPP2/gXCX38YJ1P2BL6sF2VdsJ+pEYEbJQ=="], - "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.78.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-YHt5nKKFxT4SruI57FHnEhGRSDuoFqNoAM3moYCClg70mjjS39gBBbdzaZv+N0otdzvQVuHTPu3jFu5tpqC3XQ=="], + "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.78.0", "", { "os": "linux", "cpu": "x64" }, "sha512-YHt5nKKFxT4SruI57FHnEhGRSDuoFqNoAM3moYCClg70mjjS39gBBbdzaZv+N0otdzvQVuHTPu3jFu5tpqC3XQ=="], "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.78.0", "", { "os": "none", "cpu": "arm64" }, "sha512-WH21lBMU+LYzF7aMeozTZlyc44oa2F+I5OtQ7RwuidCDoAxgTyN1s34rx0PBYrio56+2G88U9VOnYJsyV7VMHQ=="], @@ -573,21 +573,21 @@ "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.93.0", "", { "os": "linux", "cpu": "arm" }, "sha512-5pJ9NjMvH7WMUqXB6bTTOSemBm39w2cod27Hu3+Yom/GhbTeNXlYcpDx1o4CgBP6fhp0YHG66TNdVaUm6sHjsA=="], - "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.93.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-pRf+7jtbt2fHE23SX7qBxRgnBZicUgsoCK1PVIjnOk+t3a6UBkpt/GrKI99WlxsKUxftz/5nv/kfKvScmYywkw=="], + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.93.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-pRf+7jtbt2fHE23SX7qBxRgnBZicUgsoCK1PVIjnOk+t3a6UBkpt/GrKI99WlxsKUxftz/5nv/kfKvScmYywkw=="], - "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.93.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-zM8Fd/K8sqGvsBcJBZ3oVZ3ctGWbszA08IaGt5gFFF5RcunppAI/ZnAXbouABvnWeJ//S44KKlfPZnDDbeiphg=="], + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.93.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zM8Fd/K8sqGvsBcJBZ3oVZ3ctGWbszA08IaGt5gFFF5RcunppAI/ZnAXbouABvnWeJ//S44KKlfPZnDDbeiphg=="], - "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.93.0", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-7qKCnvhZKDXJG2pdbLazd2hw4FxjJHbZOFrrbzyy5PdHfPLH9vnNUa1le01A8uItZuYKPBPncH+HCoEiFT4SgA=="], + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.93.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-7qKCnvhZKDXJG2pdbLazd2hw4FxjJHbZOFrrbzyy5PdHfPLH9vnNUa1le01A8uItZuYKPBPncH+HCoEiFT4SgA=="], - "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.93.0", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-2pgulxC6G8V5wE750NJE/fRkf9aO6i6yoj10wyaR2EdiNtan4OemsOtsQ0ZTXGdY8Q3IoTmlND3GYvjJsvikYg=="], + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.93.0", "", { "os": "linux", "cpu": "none" }, "sha512-2pgulxC6G8V5wE750NJE/fRkf9aO6i6yoj10wyaR2EdiNtan4OemsOtsQ0ZTXGdY8Q3IoTmlND3GYvjJsvikYg=="], - "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.93.0", "", { "os": "linux", "cpu": "none", "libc": "musl" }, "sha512-yWsn6Gg2PnGG5jlyDz5+pHGiMTMiy4adaa4WRMzDgzB8efaShk1JMmTHIBSVLQMh0tYXRs4CN5uJCO79r4Mi4g=="], + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.93.0", "", { "os": "linux", "cpu": "none" }, "sha512-yWsn6Gg2PnGG5jlyDz5+pHGiMTMiy4adaa4WRMzDgzB8efaShk1JMmTHIBSVLQMh0tYXRs4CN5uJCO79r4Mi4g=="], - "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.93.0", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-WCn5plwp/ezS2RDPQKp0/EXEVRr9/dDexUdRKmsMFqzNM5xBSZ1wbsi3PuMk1VfkMRnI5BuazCsziCWMXRDOlw=="], + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.93.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-WCn5plwp/ezS2RDPQKp0/EXEVRr9/dDexUdRKmsMFqzNM5xBSZ1wbsi3PuMk1VfkMRnI5BuazCsziCWMXRDOlw=="], - "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.93.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-F2CGjb9LAkzH+IYTZSzd1klQ1vk5z6Utjax64WeLByCkYXbVDbsun+Oy2hLfW2MDSKCvW+jwy/9ld0EPgdeu+A=="], + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.93.0", "", { "os": "linux", "cpu": "x64" }, "sha512-F2CGjb9LAkzH+IYTZSzd1klQ1vk5z6Utjax64WeLByCkYXbVDbsun+Oy2hLfW2MDSKCvW+jwy/9ld0EPgdeu+A=="], - "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.93.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-plf5DE2objcG8Tf7mXRuRa8tT8rzDkpjqXQtKoGsKHWkpgsialbON1+cCtoSEUTVbQUjXvuAm8vV9+3rR0yCBw=="], + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.93.0", "", { "os": "linux", "cpu": "x64" }, "sha512-plf5DE2objcG8Tf7mXRuRa8tT8rzDkpjqXQtKoGsKHWkpgsialbON1+cCtoSEUTVbQUjXvuAm8vV9+3rR0yCBw=="], "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.93.0", "", { "os": "none", "cpu": "arm64" }, "sha512-Kp2yJrKvoTe9FfKdO/xwLNUbs2bYTMKx0+aoQD1s0h/Tx0kSgtHSdGmrk8tTKdluosjFbo88qYRIaNIX43AfFw=="], @@ -827,11 +827,11 @@ "@tanstack/react-router": ["@tanstack/react-router@1.170.46", "", { "dependencies": { "@tanstack/history": "1.162.5", "@tanstack/react-store": "^0.11.2", "@tanstack/router-core": "1.171.39", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-ez1iNIhsPjGlaDHg3BXWs67EWVIYzB2tbopEHYDESdkO7owgkGb5de52+5Kv2v1fxdkggcNzo35bdk4arTVGQw=="], - "@tanstack/react-start": ["@tanstack/react-start@1.169.5", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/react-start-client": "1.168.45", "@tanstack/react-start-rsc": "0.1.66", "@tanstack/react-start-server": "1.167.52", "@tanstack/router-utils": "1.163.0", "@tanstack/start-client-core": "1.170.39", "@tanstack/start-plugin-core": "1.171.56", "@tanstack/start-server-core": "1.169.45", "pathe": "^2.0.3" }, "peerDependencies": { "@rsbuild/core": "^2.0.5", "@vitejs/plugin-rsc": "*", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": ">=8.0.0" }, "optionalPeers": ["@rsbuild/core", "@vitejs/plugin-rsc", "vite"] }, "sha512-wbI+pitXm5J2uvFe9aLXVgIjY85ju4efsQ76reE19bZTkqyZzpSb+cBkNV5rZMSrsMzWUsbN5CRctHuWeMkRiA=="], + "@tanstack/react-start": ["@tanstack/react-start@1.169.7", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/react-start-client": "1.168.45", "@tanstack/react-start-rsc": "0.1.68", "@tanstack/react-start-server": "1.167.52", "@tanstack/router-utils": "1.163.0", "@tanstack/start-client-core": "1.170.39", "@tanstack/start-plugin-core": "1.172.0", "@tanstack/start-server-core": "1.169.45", "pathe": "^2.0.3" }, "peerDependencies": { "@rsbuild/core": "^2.0.5", "@vitejs/plugin-rsc": "*", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": ">=8.0.0" }, "optionalPeers": ["@rsbuild/core", "@vitejs/plugin-rsc", "vite"] }, "sha512-8/Qg9iVC2oTtAqSdLdML2K+MZ8eBZe00pe6k54CkWYA4nRmrNyN/n2zbMW+rtjDbLAPeQck/1hgS6QBlblPGnw=="], "@tanstack/react-start-client": ["@tanstack/react-start-client@1.168.45", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/router-core": "1.171.39", "@tanstack/start-client-core": "1.170.39" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-DzTCJS+TVFIEs08w9RQGOEp7dtVCEIUU3y6Oay+mXOqoRk62T0olohHbNR9A4Z1my2b3hVdMjg9KG18WOckQYg=="], - "@tanstack/react-start-rsc": ["@tanstack/react-start-rsc@0.1.66", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/router-core": "1.171.39", "@tanstack/router-utils": "1.163.0", "@tanstack/start-client-core": "1.170.39", "@tanstack/start-fn-stubs": "1.162.0", "@tanstack/start-plugin-core": "1.171.56", "@tanstack/start-storage-context": "1.167.41", "pathe": "^2.0.3" }, "peerDependencies": { "@rspack/core": ">=2.0.0-0", "@vitejs/plugin-rsc": ">=0.5.30", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "react-server-dom-rspack": ">=0.0.2" }, "optionalPeers": ["@rspack/core", "@vitejs/plugin-rsc", "react-server-dom-rspack"] }, "sha512-Utk9e3xJBZGvg0CcmiciW0m2dL45QOHFm/UGgQUcu1w32QvV6p5i8NmewwVcfr8utnexJXifDZZUWeO2NWiLpg=="], + "@tanstack/react-start-rsc": ["@tanstack/react-start-rsc@0.1.68", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/router-core": "1.171.39", "@tanstack/router-utils": "1.163.0", "@tanstack/start-client-core": "1.170.39", "@tanstack/start-fn-stubs": "1.162.0", "@tanstack/start-plugin-core": "1.172.0", "@tanstack/start-storage-context": "1.167.41", "pathe": "^2.0.3" }, "peerDependencies": { "@rspack/core": ">=2.0.0-0", "@vitejs/plugin-rsc": ">=0.5.38", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "react-server-dom-rspack": ">=0.1.1" }, "optionalPeers": ["@rspack/core", "@vitejs/plugin-rsc", "react-server-dom-rspack"] }, "sha512-vwJ41g2HMlxeF1ctnzORXBcpiXBij/IqENHKl1zOv8hsS0mslvqfio5SdCFo/4GKAOjcZWmxqG5GJoJWmryDbg=="], "@tanstack/react-start-server": ["@tanstack/react-start-server@1.167.52", "", { "dependencies": { "@tanstack/react-router": "1.170.46", "@tanstack/router-core": "1.171.39", "@tanstack/start-server-core": "1.169.45" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-131olF9oWx1CqZg8JYmIJbLNKqS/vN3UbYuc9a++pRtvfY67tpPmPzuYj4OXSxRAYalGW3f1yYlFozxqE1LE7w=="], @@ -849,7 +849,7 @@ "@tanstack/start-fn-stubs": ["@tanstack/start-fn-stubs@1.162.0", "", {}, "sha512-QWfUZ3Yo923tdQn38LyKMU8rcTw69zc+T4dAvgTWV4O56SqFRsGfS0lSWIMhJRwXIx/bvdi7nTUBDdZtTHtpTQ=="], - "@tanstack/start-plugin-core": ["@tanstack/start-plugin-core@1.171.56", "", { "dependencies": { "@babel/code-frame": "7.29.7", "@babel/core": "^7.29.7", "@babel/types": "^7.29.8", "@jridgewell/remapping": "^2.3.5", "@tanstack/router-core": "1.171.39", "@tanstack/router-generator": "1.168.0", "@tanstack/router-plugin": "1.169.0", "@tanstack/router-utils": "1.163.0", "@tanstack/start-server-core": "1.169.45", "exsolve": "^1.1.3", "lightningcss": "^1.33.0", "pathe": "^2.0.3", "picomatch": "^4.0.7", "seroval": "^1.6.7", "source-map": "^0.7.6", "srvx": "^1.0.0", "tinyglobby": "^0.2.17", "ufo": "^1.6.4", "vitefu": "^1.1.3", "xmlbuilder2": "^4.0.3", "zod": "^4.5.4" }, "peerDependencies": { "@rsbuild/core": "^2.0.5", "vite": ">=8.0.0" }, "optionalPeers": ["@rsbuild/core", "vite"] }, "sha512-xTzXpxfuBsJjBq4xLbQ0Go0/87SReVukjevkqNR3k/rgeKHfjt8nHJDMaQByS97ko+jmSoVY8+TXtRLaCYvI0A=="], + "@tanstack/start-plugin-core": ["@tanstack/start-plugin-core@1.172.0", "", { "dependencies": { "@babel/code-frame": "7.29.7", "@babel/core": "^7.29.7", "@babel/types": "^7.29.8", "@jridgewell/remapping": "^2.3.5", "@tanstack/router-core": "1.171.39", "@tanstack/router-generator": "1.168.0", "@tanstack/router-plugin": "1.169.0", "@tanstack/router-utils": "1.163.0", "@tanstack/start-server-core": "1.169.45", "exsolve": "^1.1.3", "lightningcss": "^1.33.0", "pathe": "^2.0.3", "picomatch": "^4.0.7", "seroval": "^1.6.7", "source-map": "^0.7.6", "srvx": "^1.0.0", "tinyglobby": "^0.2.17", "ufo": "^1.6.4", "vitefu": "^1.1.3", "xmlbuilder2": "^4.0.3", "zod": "^4.5.4" }, "peerDependencies": { "@rsbuild/core": "^2.0.5", "vite": ">=8.0.0" }, "optionalPeers": ["@rsbuild/core", "vite"] }, "sha512-8VbVDauTOvlersYJcJe/wlIQ3LqPV1oQnWiGwMKilA2Z9r1sDhts+7SCIHBHqr9BjK0Z8w1+X0CKvCygNeD/5g=="], "@tanstack/start-server-core": ["@tanstack/start-server-core@1.169.45", "", { "dependencies": { "@tanstack/history": "1.162.5", "@tanstack/router-core": "1.171.39", "@tanstack/start-client-core": "1.170.39", "@tanstack/start-storage-context": "1.167.41", "cookie-es": "^3.0.0", "fetchdts": "^0.2.0", "seroval": "^1.6.7" } }, "sha512-fKySLUGIy7aVYR6ZRgjC19TQdsZ+q/54M9hVfHrJQQVpM/T5qq5djZ3gsqhugmrWP+gyd9qpa9D6cxRtR6CJvg=="], @@ -1023,11 +1023,11 @@ "@upsetjs/venn.js": ["@upsetjs/venn.js@2.0.0", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="], - "@vercel/cli-config": ["@vercel/cli-config@0.3.8", "", { "dependencies": { "xdg-app-paths": "5", "zod": "^4.6.6" } }, "sha512-C6av1p4tN+rHIcD0rdlsx3y9SaosRUU67dbgrjbLG8KdAK8oNVzfKg0ckV+1qWh5VC/Ft1BN3Pg/PuXSKNFVOA=="], + "@vercel/cli-config": ["@vercel/cli-config@0.4.0", "", { "dependencies": { "xdg-app-paths": "5.1.0", "zod": "^4.6.6" } }, "sha512-7+DnWjfcHA/u2FjiPMknhlqZFmJZZq1qS5ziIxNH+3zNBo2U4NQjkJABKDGMZlLBlBLK94RXuA2dceC4SCFumA=="], "@vercel/cli-exec": ["@vercel/cli-exec@1.0.1", "", { "dependencies": { "execa": "5.1.1" } }, "sha512-g9XerViJ/paZujufXYcu5XYI2vU2rtB4sgdpjUHde5RnOkdmpu0ngH46LCFGHoPXO/C+qDPSczIHIRN+8Q2YKQ=="], - "@vercel/oidc": ["@vercel/oidc@4.0.8", "", { "dependencies": { "@vercel/cli-config": "0.3.8", "@vercel/cli-exec": "1.0.1", "jose": "^5.9.6" } }, "sha512-8wcmhuhrEsQlgTvPfRIeE4Y2geSaid0a1DP+um1PfNK4ETjqnfGTL5k5l7vS2T8A2gOx/MV7yNGxUJTs+0tqPQ=="], + "@vercel/oidc": ["@vercel/oidc@4.0.9", "", { "dependencies": { "@vercel/cli-config": "0.4.0", "@vercel/cli-exec": "1.0.1", "jose": "^5.9.6" } }, "sha512-LBNEPlKHv3ZAhOX2Dcj1hrxdmqYrdzxukGltouKbyjU8IeJvAFSuOHn5X0ZWg0qG2huANcgrHAb03giWeUyubQ=="], "@vitejs/plugin-react": ["@vitejs/plugin-react@6.3.0", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": ">=0.152.0 <0.157.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-H9E955aVvD2F4zNHCw4eIZbIfF6xKldlh7MNu+hSU7xwQzh65lI/N+CJWqmfhi0PEjDXIt/H7T7J/4wU63KJiw=="], @@ -1061,9 +1061,9 @@ "aria-query": ["aria-query@5.3.0", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="], - "arkregex": ["arkregex@0.0.14", "", { "dependencies": { "@ark/util": "0.56.8" } }, "sha512-G3I/uCtWE0IKQiPh0qqmmAFDdtjZKZQ5mNPR6gJBeAMZ7VqYCpoaDeXnLju2Zo6ywExtmxZJELeVFb0MPDjPyA=="], + "arkregex": ["arkregex@0.0.15", "", { "dependencies": { "@ark/util": "0.56.9" } }, "sha512-mu9vS4b8kTipqr2AfVIL1NYhGH47CZgPdYFzB762lu4/dsxm7hmNsN3ayDahcM9OhepOpTQc+W744yh4KE+mAw=="], - "arktype": ["arktype@2.2.9", "", { "dependencies": { "@ark/schema": "0.56.8", "@ark/util": "0.56.8", "arkregex": "0.0.14" } }, "sha512-Cja0IMEn19rB35on9da1i1z6QMasuS7ULffXbetCry09jvCGYT8Bi1KgYiqri5FymF4nQAXkM90yksYkgSK2EA=="], + "arktype": ["arktype@2.2.10", "", { "dependencies": { "@ark/schema": "0.56.9", "@ark/util": "0.56.9", "arkregex": "0.0.15" } }, "sha512-xfum3++1RGjULFBeeXph3XrejEhAfswZlpH/V5m324j8aZ/53tHUd8OPCXE1v5iU/2UEkn/ZDFUT0Exkjv96xA=="], "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="], @@ -1139,9 +1139,9 @@ "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], - "convex": ["convex@1.49.0", "", { "dependencies": { "esbuild": "0.27.0", "prettier": "^3.0.0", "ws": "8.21.0" }, "peerDependencies": { "@auth0/auth0-react": "^2.0.1", "@clerk/clerk-react": "^4.12.8 || ^5.0.0", "@clerk/react": "^6.4.3", "react": "^18.0.0 || ^19.0.0-0 || ^19.0.0" }, "optionalPeers": ["@auth0/auth0-react", "@clerk/clerk-react", "@clerk/react", "react"], "bin": { "convex": "bin/main.js" } }, "sha512-mkr9oXF8/arkCI1kvYyGytWd62oVXNABh4uwLeI4UQVN6Zuudm4DlmSzNUJKF63djk6f/uUXC+6ffuVSkPLvzA=="], + "convex": ["convex@1.51.0", "", { "dependencies": { "esbuild": "0.27.0", "prettier": "^3.0.0", "ws": "8.21.0" }, "peerDependencies": { "@auth0/auth0-react": "^2.0.1", "@clerk/clerk-react": "^4.12.8 || ^5.0.0", "@clerk/react": "^6.4.3", "react": "^18.0.0 || ^19.0.0-0 || ^19.0.0" }, "optionalPeers": ["@auth0/auth0-react", "@clerk/clerk-react", "@clerk/react", "react"], "bin": { "convex": "bin/main.js" } }, "sha512-Y5gS+JmT2JBq76S3CrQDrdL/Ijs4ZRKsvz3cu5EmHf/QxW18QrHunb5j9WC6lAbWbWc/gvmqpa5lvXzLXFQVJA=="], - "convex-helpers": ["convex-helpers@0.1.135", "", { "peerDependencies": { "@standard-schema/spec": "^1.0.0", "convex": "^1.46.0", "hono": "^4.0.5", "prettier": "^3.0.0", "react": "^17.0.2 || ^18.0.0 || ^19.0.0", "typescript": "^5.5 || ^6.0.0 || ^7.0.0", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["@standard-schema/spec", "hono", "prettier", "react", "typescript", "zod"], "bin": { "convex-helpers": "dist/bin.cjs" } }, "sha512-UX2f9j6pk90UyosPhnYQ1Q6nmUF/klUn/LZGp6BM8Ps5r+cZyY66ULhB1Vp3lUOY4EdjS3RLCKyaoTUg0BqhoA=="], + "convex-helpers": ["convex-helpers@0.1.136", "", { "peerDependencies": { "@standard-schema/spec": "^1.0.0", "convex": "^1.46.0", "hono": "^4.0.5", "prettier": "^3.0.0", "react": "^17.0.2 || ^18.0.0 || ^19.0.0", "typescript": "^5.5 || ^6.0.0 || ^7.0.0", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["@standard-schema/spec", "hono", "prettier", "react", "typescript", "zod"], "bin": { "convex-helpers": "dist/bin.cjs" } }, "sha512-GoveeoUdEyg0hpCNNAjAimgn4P3mx7f8Yy5oSISck9AquxfL3NbtQesUwhZLrDkCWasK2i1COjb7ZjQseonovA=="], "convex-test": ["convex-test@0.0.71", "", { "peerDependencies": { "convex": "^1.43.0" } }, "sha512-sHptDSWL0b2Og6to5R9/GoCHF7XGNXIAxQDJnA8UYYZa8yym9mfC03h3C47LS3Bj2BIO9lD0pKIv2H7dP+VKPA=="], @@ -1153,7 +1153,7 @@ "cose-base": ["cose-base@1.0.3", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="], - "croner": ["croner@11.0.0", "", {}, "sha512-T17ADjdttrVToyzLpLq9Xb9xzcMwpQ/M3Qs9szhh0MVNTbv6NWQ9OFYa2qlzPYXFMn+uoDlnW1IpIv6cAvFtyA=="], + "croner": ["croner@11.0.1", "", {}, "sha512-/fmHcoczPy5cMcmJ6ex7J7LAwb545V1dNmRrdDGP3hwStg/06IYP56YgBySCSdWGDz2PJYQyDukaR8b8R5o2HA=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], @@ -1297,7 +1297,7 @@ "es-toolkit": ["es-toolkit@1.47.0", "", {}, "sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw=="], - "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], @@ -1401,7 +1401,7 @@ "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], - "ignore": ["ignore@7.0.14", "", {}, "sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ=="], + "ignore": ["ignore@7.0.16", "", {}, "sha512-52N+Y4HRMOJmbLmr+DqO4iSRyyB7N52gm7PWCT6h0p978+oKbqHCB7gIJIwZvBUsjlSdWbrBFqUSmIFNZMpn0A=="], "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], @@ -1435,7 +1435,7 @@ "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], - "jose": ["jose@6.2.17", "", {}, "sha512-wOuK9V1yujQFH5S0ZWmLcDZN7+IKh9bUCC2ZPCf2HDlol3WWHy+PPyNjEI75FXRLMp3vDKQcupP59xhVU95hcg=="], + "jose": ["jose@6.2.18", "", {}, "sha512-doV4thUwgkrycJH4yLeqwTGIIZphHl+pk7CPReuMIhYhncmgzdko85MaCG4YQFTxqMFr1/oEH32tZuKKovcDEg=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], @@ -1499,7 +1499,7 @@ "lucia": ["lucia@3.2.2", "", { "dependencies": { "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0" } }, "sha512-P1FlFBGCMPMXu+EGdVD9W4Mjm0DqsusmKgO7Xc33mI5X1bklmsQb0hfzPhXomQr9waWIBDsiOjvr1e6BTaUqpA=="], - "lucide-react": ["lucide-react@1.72.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-fbF5i1GU8GODETa3Q7rXqrJrcx3iPYrQtxthom103zGx+Z0BGwKYAW9s+9435ohYJ7hQm0av0PoZcqI1CRwNrg=="], + "lucide-react": ["lucide-react@1.77.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-VS6sOi8ZUH1qm6swBL/tpI4xAhB6pFTdHvw3pfCJD+DaTJwpyynVzfOS6mdyMZ+OCdY/GMSQbqinOMOPbNSrQA=="], "lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="], @@ -1791,7 +1791,7 @@ "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - "resend": ["resend@6.38.1", "", { "dependencies": { "postal-mime": "2.7.6", "standardwebhooks": "1.1.1" }, "peerDependencies": { "@react-email/render": "*" }, "optionalPeers": ["@react-email/render"] }, "sha512-166POyY8qTbxQQwYXQJ6hx7y1vnL51iB9WW76Xe1/bJsW03lCOWYW3eJW7nNlfvWM5ohI3WtUHnqO3rofiO8Lw=="], + "resend": ["resend@6.39.0", "", { "dependencies": { "postal-mime": "2.7.6", "standardwebhooks": "1.1.1" }, "peerDependencies": { "@react-email/render": "*" }, "optionalPeers": ["@react-email/render"] }, "sha512-szNf/OR2I5rreOt5dQr7+aZLGFhkNJ0pSjzQIkU1oIrfh7kMZFDJQ3/Cc9s1yVeapafYFg0/aNyj41lsbHPeUw=="], "restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="], @@ -1893,7 +1893,7 @@ "tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="], - "tailwind-merge": ["tailwind-merge@3.7.0", "", {}, "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA=="], + "tailwind-merge": ["tailwind-merge@3.7.1", "", {}, "sha512-v7y4BV4FUlO8exj/4M5UXKeoowDiuugVUg3tkMNIyOUCOHy5xp8+5aWQeXCtZ2491sUV1YPsVeM9EveZ6/xuZQ=="], "tailwindcss": ["tailwindcss@4.3.5", "", {}, "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ=="], @@ -2019,7 +2019,7 @@ "ws": ["ws@8.23.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ=="], - "xdg-app-paths": ["xdg-app-paths@5.5.1", "", { "dependencies": { "os-paths": "^4.0.1", "xdg-portable": "^7.2.0" } }, "sha512-hI3flOB4PLZIy5prbtTpirobtPE2ZtZ52szO+2mM9Efp6ErM398La+C1lIpNWDfNoQk+6Lsi6nMcCwVB7pxeMQ=="], + "xdg-app-paths": ["xdg-app-paths@5.1.0", "", { "dependencies": { "xdg-portable": "^7.0.0" } }, "sha512-RAQ3WkPf4KTU1A8RtFx3gWywzVKe00tfOPFfl2NDGqbIFENQO4kqAJp7mhQjNj/33W5x5hiWWUdyfPq/5SU3QA=="], "xdg-portable": ["xdg-portable@7.3.0", "", { "dependencies": { "os-paths": "^4.0.1" } }, "sha512-sqMMuL1rc0FmMBOzCpd0yuy9trqF2yTTVe+E9ogwCSWQCdDEtQUwrZPT6AxqtsFGRNxycgncbP/xmOOSPw5ZUw=="], diff --git a/convex/componentUpgrade.test.ts b/convex/componentUpgrade.test.ts index 5fd41e3fac..0920beeb41 100644 --- a/convex/componentUpgrade.test.ts +++ b/convex/componentUpgrade.test.ts @@ -1,12 +1,10 @@ /// /* @vitest-environment edge-runtime */ import rateLimiter from "@convex-dev/rate-limiter/test"; -import workpool from "@convex-dev/workpool/test"; import { convexTest } from "convex-test"; import previousRateLimiter from "rate-limiter-previous/test"; import { expect, it, vi } from "vitest"; -import previousWorkpool from "workpool-previous/test"; -import { api, internal } from "./_generated/api"; +import { internal } from "./_generated/api"; import schema from "./schema"; type Modules = Record Promise>; @@ -24,7 +22,7 @@ function switchingModules(previous: Modules, current: Modules, upgraded: () => b ); } -it("retains consumed quota and queued reports when component implementations change", async () => { +it("retains consumed quota when rate limiter implementations change", async () => { vi.useFakeTimers(); vi.setSystemTime(Date.UTC(2026, 8, 16)); try { @@ -36,9 +34,8 @@ it("retains consumed quota and queued reports when component implementations cha rateLimiter.modules, () => upgraded, ), - searchReports: switchingModules(previousWorkpool.modules, workpool.modules, () => upgraded), }; - // Register once: replacing registrations would erase component data and queued jobs. + // Register once: replacing registrations would erase the consumed quota. // The candidate's additive schema is used throughout; this proves runtime continuity, // not a backend deployment or schema migration. const registration: typeof t = { @@ -47,7 +44,6 @@ it("retains consumed quota and queued reports when component implementations cha t.registerComponent(name, componentSchema, implementations[name] ?? modules), }; rateLimiter.register(registration, "rateLimiterV2"); - workpool.register(registration, "searchReports"); const quota = { name: "component-upgrade", @@ -57,18 +53,7 @@ it("retains consumed quota and queued reports when component implementations cha expect(await t.mutation(internal.rateLimits.consumeHttpRateLimitKeyInternal, quota)).toEqual({ ok: true, }); - const staff = await t.run((ctx) => ctx.db.insert("users", { role: "moderator" })); - const signed = t.withIdentity({ subject: staff }); - const queued = await signed.mutation(api.searchReports.start, { - view: "recommendations", - artifactKind: "plugin", - }); - expect(queued.status).toBe("pending"); - const before = await t.run((ctx) => ctx.db.query("searchReportRuns").unique()); - expect(before?.workId).toBeTruthy(); - upgraded = true; - expect(await t.run((ctx) => ctx.db.query("searchReportRuns").unique())).toEqual(before); const denied = await t.run(async (ctx) => ({ now: Date.now(), status: await ctx.runMutation(internal.rateLimits.consumeHttpRateLimitKeyInternal, quota), @@ -87,14 +72,6 @@ it("retains consumed quota and queued reports when component implementations cha expect(await t.mutation(internal.rateLimits.consumeHttpRateLimitKeyInternal, quota)).toEqual({ ok: true, }); - await t.finishAllScheduledFunctions(vi.runAllTimers); - const ready = await signed.action(api.searchReports.get, { reportId: queued.reportId }); - expect(ready.status).toBe("ready"); - const reused = await signed.mutation(api.searchReports.start, { - view: "recommendations", - artifactKind: "plugin", - }); - expect(reused).toMatchObject({ reportId: queued.reportId, status: "ready" }); } finally { vi.useRealTimers(); } diff --git a/package.json b/package.json index 5c282bb490..257aae995d 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "skills-sh:prove-trending": "bun scripts/skills-sh-catalog/prove-trending-test.ts", "skills:install": "npx --yes skills@1.5.16 add openclaw/carapace --skill openclaw-design openclaw-brand openclaw-carapace openclaw-design-system openclaw-marketing-pages openclaw-design-audit --agent codex --copy --yes", "test": "vitest run", + "test:component-upgrade": "bun scripts/test-component-upgrade.ts", "test:e2e": "vitest run -c vitest.e2e.config.ts", "test:e2e:local": "bash scripts/run-playwright-local.sh", "test:e2e:prod-http": "vitest run -c vitest.e2e.config.ts e2e/prod-http-smoke.e2e.test.ts", @@ -96,9 +97,9 @@ "dependencies": { "@auth/core": "0.41.3", "@convex-dev/auth": "0.0.98", - "@convex-dev/migrations": "0.3.8", + "@convex-dev/migrations": "0.3.9", "@convex-dev/rate-limiter": "0.4.3", - "@convex-dev/workpool": "0.4.15", + "@convex-dev/workpool": "0.5.0", "@fontsource/bricolage-grotesque": "5.3.0", "@fontsource/ibm-plex-mono": "5.3.0", "@fontsource/noto-sans-sc": "5.3.1", @@ -121,20 +122,20 @@ "@resvg/resvg-wasm": "2.6.2", "@shikijs/rehype": "4.6.0", "@tanstack/react-router": "1.170.46", - "@tanstack/react-start": "1.169.5", - "@vercel/oidc": "4.0.8", - "arktype": "2.2.9", + "@tanstack/react-start": "1.169.7", + "@vercel/oidc": "4.0.9", + "arktype": "2.2.10", "class-variance-authority": "0.7.1", "clawhub-schema": "workspace:0.0.2", "clsx": "2.1.1", - "convex": "1.49.0", - "convex-helpers": "0.1.135", + "convex": "1.51.0", + "convex-helpers": "0.1.136", "fflate": "0.8.3", "franc-min": "6.2.0", "h3": "2.0.8", - "ignore": "7.0.14", - "jose": "6.2.17", - "lucide-react": "1.72.0", + "ignore": "7.0.16", + "jose": "6.2.18", + "lucide-react": "1.77.0", "mermaid": "^11.17.2", "mime": "4.1.2", "monaco-editor": "0.57.0", @@ -146,13 +147,13 @@ "rehype-raw": "7.0.0", "rehype-sanitize": "6.0.0", "remark-gfm": "4.0.1", - "resend": "6.38.1", + "resend": "6.39.0", "saxes": "6.0.0", "semver": "7.8.6", "sharp": "0.35.5", "shiki": "4.6.0", "sonner": "2.0.8", - "tailwind-merge": "3.7.0", + "tailwind-merge": "3.7.1", "tailwindcss": "4.3.5", "tw-animate-css": "1.4.0", "unified": "11.0.5", diff --git a/packages/clawhub-admin/package.json b/packages/clawhub-admin/package.json index a7a0677b94..a6e89a71a4 100644 --- a/packages/clawhub-admin/package.json +++ b/packages/clawhub-admin/package.json @@ -30,10 +30,10 @@ }, "dependencies": { "@clack/prompts": "1.9.0", - "arktype": "2.2.9", + "arktype": "2.2.10", "commander": "15.1.0", "fflate": "0.8.3", - "ignore": "7.0.14", + "ignore": "7.0.16", "json5": "2.2.3", "mime": "4.1.2", "ora": "10.0.0", diff --git a/packages/clawhub/package.json b/packages/clawhub/package.json index a78fe9ae04..c3af5918b3 100644 --- a/packages/clawhub/package.json +++ b/packages/clawhub/package.json @@ -39,11 +39,11 @@ "dependencies": { "@clack/prompts": "1.9.0", "@openclaw/plugin-inspector": "0.4.6", - "arktype": "2.2.9", + "arktype": "2.2.10", "commander": "15.1.0", - "croner": "11.0.0", + "croner": "11.0.1", "fflate": "0.8.3", - "ignore": "7.0.14", + "ignore": "7.0.16", "json5": "2.2.3", "mime": "4.1.2", "ora": "10.0.0", diff --git a/packages/schema/package.json b/packages/schema/package.json index 95c2471da8..ce4ca4c1a5 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -90,8 +90,8 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "arktype": "2.2.9", - "croner": "11.0.0", + "arktype": "2.2.10", + "croner": "11.0.1", "json5": "2.2.3", "unicode-case-folding": "1.1.2", "yaml": "2.9.1" diff --git a/scripts/ci-workflow.test.ts b/scripts/ci-workflow.test.ts index 9c5e31a165..58a18a6759 100644 --- a/scripts/ci-workflow.test.ts +++ b/scripts/ci-workflow.test.ts @@ -32,7 +32,7 @@ describe("CI workflow", () => { } }); - it("runs required gates in parallel on available hosted runners", async () => { + it("keeps other gates parallel while units wait for component retention", async () => { const workflow = parseYaml(await readFile(".github/workflows/ci.yml", "utf8")) as { jobs: Record; }; @@ -48,11 +48,16 @@ describe("CI workflow", () => { expect(workflow.jobs["pr-gates"]).toBeUndefined(); for (const [name, command] of Object.entries(requiredGates)) { const job = workflow.jobs[name]; - expect(job.needs).toBeUndefined(); + expect(job.needs).toBe(name === "unit" ? "component-upgrade" : undefined); expect(job["timeout-minutes"]).toBe(name === "unit" ? 10 : 5); expect(job.steps).toContainEqual(expect.objectContaining({ run: command })); } + expect(workflow.jobs["component-upgrade"].needs).toBeUndefined(); + expect(workflow.jobs["component-upgrade"].steps).toContainEqual( + expect.objectContaining({ run: "bun run test:component-upgrade" }), + ); + expect(workflow.jobs.unit["runs-on"]).toBe("ubuntu-24.04"); expect(workflow.jobs.unit.steps).toContainEqual( expect.objectContaining({ diff --git a/scripts/playwright-local-auth-config.test.ts b/scripts/playwright-local-auth-config.test.ts index aeba566c2c..018634f317 100644 --- a/scripts/playwright-local-auth-config.test.ts +++ b/scripts/playwright-local-auth-config.test.ts @@ -85,6 +85,15 @@ describe("playwright local-auth runner config", () => { ); }); + it.each(["prod:production", "dev:shared-development", "local:fixture\nCONVEX_DEPLOY_KEY=key"])( + "rejects a non-local deployment selector: %s", + (deployment) => { + expect(() => resolveLocalAuthDeployment(deployment, null)).toThrow( + "Local-auth tests require a local or anonymous Convex deployment.", + ); + }, + ); + it("does not inherit the generic CI Convex URL", () => { expect( resolveLocalAuthRunnerConfig({ diff --git a/scripts/playwright-local-auth-config.ts b/scripts/playwright-local-auth-config.ts index 8bbbc70056..41cf018769 100644 --- a/scripts/playwright-local-auth-config.ts +++ b/scripts/playwright-local-auth-config.ts @@ -122,7 +122,12 @@ export function resolveLocalAuthDeployment( configuredDeployment: string | undefined, fallbackDeployment: string | null | undefined, ) { - return configuredDeployment ?? fallbackDeployment ?? DEFAULT_LOCAL_AUTH_CONVEX_DEPLOYMENT; + const deployment = + configuredDeployment ?? fallbackDeployment ?? DEFAULT_LOCAL_AUTH_CONVEX_DEPLOYMENT; + if (!/^(anonymous|local):[^\s]+$/.test(deployment)) { + throw new Error("Local-auth tests require a local or anonymous Convex deployment."); + } + return deployment; } export function resolveLocalAuthRunnerConfig( diff --git a/scripts/playwright-local-convex.test.ts b/scripts/playwright-local-convex.test.ts index a6249b9a6e..6ddd86b717 100644 --- a/scripts/playwright-local-convex.test.ts +++ b/scripts/playwright-local-convex.test.ts @@ -27,15 +27,23 @@ function probe(url: string): Promise { } it.skipIf(process.platform === "win32").each([ - { bootstrapExit: 0, disconnect: false }, - { bootstrapExit: 7, disconnect: false }, - { bootstrapExit: 0, disconnect: true }, -])("owns bootstrap descendants through cleanup: %j", async ({ bootstrapExit, disconnect }) => { + { bootstrapExit: 0, disconnect: false, serve: false, exitBeforeReady: false }, + { bootstrapExit: 7, disconnect: false, serve: false, exitBeforeReady: false }, + { bootstrapExit: 0, disconnect: true, serve: false, exitBeforeReady: false }, + { bootstrapExit: 0, disconnect: false, serve: true, exitBeforeReady: false }, + { bootstrapExit: 0, disconnect: true, serve: true, exitBeforeReady: false }, + { bootstrapExit: 0, disconnect: false, serve: true, exitBeforeReady: true }, + { bootstrapExit: 7, disconnect: false, serve: true, exitBeforeReady: true }, + { bootstrapExit: 0, disconnect: false, serve: true, exitBeforeReady: false, abrupt: true }, +])("owns Convex readiness and cleanup: %j", async (options) => { + const { bootstrapExit, disconnect, serve, exitBeforeReady } = options; const directory = await mkdtemp(join(tmpdir(), "clawhub-backend-owner-")); const serverPath = join(directory, "server.mjs"); const addressPath = join(directory, "address.json"); + const keeperPath = join(directory, "keeper.json"); let owner: ChildProcess | undefined; let serverUrl: string | undefined; + let keeperPid: number | undefined; try { await writeFile( serverPath, @@ -55,19 +63,43 @@ server.listen(0, '127.0.0.1', () => { join(directory, "bunx"), `#!/usr/bin/env bun import { spawn } from 'node:child_process'; +import { writeFileSync } from 'node:fs'; const backend = spawn(process.execPath, [${JSON.stringify(serverPath)}], { stdio: ['ignore', 'pipe', 'ignore'], }); -backend.stdout.once('data', () => process.exit(Number(process.argv[2]))); +backend.stdout.once('data', () => { + if (!${serve}) process.exit(Number(process.argv[2])); + if (${exitBeforeReady}) { + backend.once('exit', () => process.exit(Number(process.argv[2]))); + backend.kill('SIGTERM'); + return; + } + const start = process.argv.indexOf('--start'); + if (!process.argv.includes('--once') || start < 0) process.exit(9); + const keeper = spawn(process.argv[start + 1], { shell: true, stdio: 'inherit', detached: true }); + writeFileSync(${JSON.stringify(keeperPath)}, JSON.stringify(keeper.pid)); + keeper.once('exit', (code) => { + backend.kill('SIGTERM'); + process.exit(code ?? 1); + }); +}); `, { mode: 0o755 }, ); - owner = spawn("bun", [resolve("scripts/playwright-local-convex.ts"), String(bootstrapExit)], { - detached: true, - stdio: ["ignore", "pipe", "pipe", "ipc"], - env: { ...process.env, PATH: `${directory}:${process.env.PATH}` }, - }); + owner = spawn( + "bun", + [ + resolve("scripts/playwright-local-convex.ts"), + ...(serve ? ["--serve"] : []), + String(bootstrapExit), + ], + { + detached: true, + stdio: ["ignore", "pipe", "pipe", "ipc"], + env: { ...process.env, PATH: `${directory}:${process.env.PATH}` }, + }, + ); const bootstrapOwner = owner; const result = await new Promise((resolveResult, reject) => { bootstrapOwner.once("error", reject); @@ -76,16 +108,35 @@ backend.stdout.once('data', () => process.exit(Number(process.argv[2]))); ); bootstrapOwner.once("message", resolveResult); }); - expect(result.status).toBe(bootstrapExit === 0 ? "ready" : "error"); + const ready = bootstrapExit === 0 && !exitBeforeReady; + expect(result.status).toBe(ready ? "ready" : "error"); const { port } = z .object({ port: z.number() }) .parse(JSON.parse(await readFile(addressPath, "utf8"))); const url = `http://127.0.0.1:${port}`; serverUrl = url; - expect(await probe(url)).toBe("alive"); + if (serve && exitBeforeReady) { + await expect + .poll(() => + probe(url).then( + () => true, + () => false, + ), + ) + .toBe(false); + } else { + expect(await probe(url)).toBe("alive"); + } expect(owner.exitCode).toBeNull(); + if (serve && !exitBeforeReady) { + keeperPid = z.number().parse(JSON.parse(await readFile(keeperPath, "utf8"))); + } - if (disconnect) { + if ("abrupt" in options && options.abrupt) { + const exited = once(owner, "exit"); + process.kill(-owner.pid!, "SIGKILL"); + await exited; + } else if (disconnect) { const exited = once(owner, "exit"); owner.disconnect(); await exited; @@ -114,6 +165,19 @@ backend.stdout.once('data', () => process.exit(Number(process.argv[2]))); ), ) .toBe(false); + if (keeperPid) { + await expect + .poll(() => { + try { + process.kill(-keeperPid!, 0); + return true; + } catch (error) { + if ((error as NodeJS.ErrnoException).code !== "ESRCH") throw error; + return false; + } + }) + .toBe(false); + } } finally { if (serverUrl) await probe(`${serverUrl}/stop`).catch(() => {}); if (owner?.pid && owner.exitCode === null && owner.signalCode === null) { @@ -121,6 +185,13 @@ backend.stdout.once('data', () => process.exit(Number(process.argv[2]))); process.kill(-owner.pid, "SIGKILL"); await exited; } + if (keeperPid) { + try { + process.kill(-keeperPid, "SIGKILL"); + } catch (error) { + if ((error as NodeJS.ErrnoException).code !== "ESRCH") throw error; + } + } await rm(directory, { recursive: true, force: true }); } }); diff --git a/scripts/playwright-local-convex.ts b/scripts/playwright-local-convex.ts index d698893476..9573f264ad 100644 --- a/scripts/playwright-local-convex.ts +++ b/scripts/playwright-local-convex.ts @@ -1,31 +1,69 @@ import { spawn } from "node:child_process"; +import { createInterface } from "node:readline"; +import { fileURLToPath } from "node:url"; export type LocalConvexBootstrapResult = { status: "ready" } | { status: "error"; message: string }; -if (!process.send) throw new Error("Local Convex requires its runner's IPC channel."); -const send = process.send.bind(process); +const READY_LINE = "clawhub-local-convex:ready"; -// Keep the process-group leader alive after Convex's one-shot bootstrap exits. -process.on("message", () => {}); -process.on("SIGTERM", () => {}); -process.on("SIGINT", () => {}); -process.on("disconnect", () => { - process.kill(-process.pid, "SIGTERM"); - setTimeout(() => process.kill(-process.pid, "SIGKILL"), 5_000); -}); +if (process.argv[2] === "--ready-hook") { + // Convex runs --start only after its first successful push. With --once it + // waits for this child, retaining its backend without a development watcher. + // The CLI detaches this child but inherits stdin. Its pipe ties it to our owner even + // when that owner's process group is killed without running cleanup handlers. + process.stdin.once("end", () => process.exit(0)); + process.stdin.once("error", () => process.exit(1)); + process.stdin.resume(); + process.stdout.write(`${READY_LINE}\n`); +} else { + if (!process.send) throw new Error("Local Convex requires its runner's IPC channel."); + const send = process.send.bind(process); + const serve = process.argv[2] === "--serve"; + const args = process.argv.slice(serve ? 3 : 2); + const quote = (value: string) => `'${value.replaceAll("'", "'\\''")}'`; + if (serve) { + args.push( + "--once", + "--start", + `${quote(process.execPath)} ${quote(fileURLToPath(import.meta.url))} --ready-hook`, + ); + } -const bootstrap = spawn("bunx", process.argv.slice(2), { stdio: "inherit" }); -function report(result: LocalConvexBootstrapResult) { - if (process.connected) send(result); + // Retain the group leader until the runner has stopped all owned descendants. + process.on("message", () => {}); + const stopKeeper = () => bootstrap.stdin?.end(); + process.on("SIGTERM", stopKeeper); + process.on("SIGINT", stopKeeper); + process.on("disconnect", () => { + stopKeeper(); + process.kill(-process.pid, "SIGTERM"); + setTimeout(() => process.kill(-process.pid, "SIGKILL"), 5_000); + }); + + const bootstrap = spawn("bunx", args, { + stdio: serve ? ["pipe", "pipe", "inherit"] : "inherit", + }); + let reported = false; + function report(result: LocalConvexBootstrapResult) { + if (reported) return; + reported = true; + if (process.connected) send(result); + } + if (serve && bootstrap.stdout) { + bootstrap.stdout.pipe(process.stdout); + createInterface({ input: bootstrap.stdout }).on("line", (line) => { + if (line === READY_LINE) report({ status: "ready" }); + }); + } + bootstrap.once("error", (error) => report({ status: "error", message: error.message })); + bootstrap.once("exit", (code, signal) => { + report( + !serve && code === 0 + ? { status: "ready" } + : { + status: "error", + message: `Local Convex ${serve ? "server" : "bootstrap"} exited with ${signal ?? `code ${code}`} before readiness.`, + }, + ); + }); } -bootstrap.once("error", (error) => report({ status: "error", message: error.message })); -bootstrap.once("exit", (code, signal) => { - report( - code === 0 - ? { status: "ready" } - : { - status: "error", - message: `Local Convex bootstrap exited with ${signal ?? `code ${code}`}.`, - }, - ); -}); diff --git a/scripts/run-playwright-local-auth.ts b/scripts/run-playwright-local-auth.ts index 94f91fd596..a617e0b9d3 100644 --- a/scripts/run-playwright-local-auth.ts +++ b/scripts/run-playwright-local-auth.ts @@ -318,8 +318,13 @@ async function cleanupOwnedResources() { } } -async function runRequired(command: string, args: string[], env: NodeJS.ProcessEnv) { - const child = spawnManaged(command, args, env); +async function runRequired( + command: string, + args: string[], + env: NodeJS.ProcessEnv, + stdio: StdioOptions = "inherit", +) { + const child = spawnManaged(command, args, env, process.cwd(), stdio); // Keep signal handlers runnable while builds and browser tests are active. await new Promise((resolve, reject) => { child.once("error", reject); @@ -401,12 +406,17 @@ function runBuffered(command: string, args: string[], env: NodeJS.ProcessEnv) { }; } -async function startLocalConvex(args: string[], env: NodeJS.ProcessEnv, convexUrl: string) { +async function startLocalConvex( + args: string[], + env: NodeJS.ProcessEnv, + convexUrl: string, + mode: "provision" | "serve", +) { const maxAttempts = 3; for (let attempt = 1; attempt <= maxAttempts; attempt += 1) { const child = spawnManaged( "bun", - ["scripts/playwright-local-convex.ts", ...args], + ["scripts/playwright-local-convex.ts", ...(mode === "serve" ? ["--serve"] : []), ...args], env, process.cwd(), ["inherit", "inherit", "inherit", "ipc"], @@ -422,14 +432,20 @@ async function startLocalConvex(args: string[], env: NodeJS.ProcessEnv, convexUr else reject(new Error(result.message)); }); }); - await waitUntilReachable(convexUrl, "Local Convex", child); + if (mode === "provision") { + await stopManagedChild(child); + await waitUntilUnreachable(convexUrl, "Local Convex provisioner"); + } else { + await waitUntilReachable(convexUrl, "Local Convex", child); + } return; } catch (error) { await stopManagedChild(child); - rmSync(LOCAL_CONVEX_STATE_DIR, { force: true, recursive: true }); + // Serving retries must retain the environment configured before the push. + if (mode === "provision") rmSync(LOCAL_CONVEX_STATE_DIR, { force: true, recursive: true }); if (attempt >= maxAttempts) throw error; console.log( - `Local Convex did not start cleanly on attempt ${attempt}; retrying with fresh isolated state...`, + `Local Convex did not start cleanly on attempt ${attempt}; retrying ${mode === "provision" ? "with fresh isolated state" : "the configured local backend"}...`, ); await sleep(2_000 * attempt); } @@ -460,8 +476,8 @@ function isFunctionReadinessRetryableOutput(output: string) { } async function setLocalConvexEnv( - convexUrl: string, changes: Array<{ name: string; value: string }>, + env: NodeJS.ProcessEnv, ) { const config = readLocalDeploymentConfig(); if (!config) { @@ -470,18 +486,22 @@ async function setLocalConvexEnv( ); } - const response = await fetch(new URL("/api/update_environment_variables", convexUrl), { - body: JSON.stringify({ changes }), - headers: { - Authorization: `Convex ${config.adminKey}`, - "Content-Type": "application/json", - }, - method: "POST", - }); - if (!response.ok) { - throw new Error( - `Failed to configure local Convex environment: ${response.status} ${await response.text()}`, - ); + const valueFile = join(tempDir, "convex-env-value"); + try { + for (const { name, value } of changes) { + // File input preserves JSON/PEM bytes without exposing values in argv. + writeFileSync(valueFile, value, { mode: 0o600 }); + console.log(`Configuring local Convex variable ${name}.`); + await runRequired( + "bunx", + ["convex", "env", "set", name, "--from-file", valueFile, "--env-file", envFile], + env, + // Keep even CLI/server error diagnostics from exposing a submitted value. + "ignore", + ); + } + } finally { + rmSync(valueFile, { force: true }); } } @@ -585,30 +605,7 @@ async function main() { e2eEnv.DEV_AUTH_CONVEX_DEPLOYMENT = devAuthDeploymentMarker(deployment); } - writeFileSync( - envFile, - [ - `AUTH_GITHUB_ID=${e2eEnv.AUTH_GITHUB_ID}`, - `AUTH_GITHUB_SECRET=${e2eEnv.AUTH_GITHUB_SECRET}`, - "CLAWHUB_DISABLE_CRONS=1", - "CLAWHUB_SKILLS_SH_ROLLOUT_MODE=test", - `CLAWHUB_EMAIL_CAPTURE_FILE=${e2eEnv.CLAWHUB_EMAIL_CAPTURE_FILE}`, - `CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN=${e2eEnv.CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN}`, - ...(deployment ? [`CONVEX_DEPLOYMENT=${deployment}`] : []), - `CONVEX_SITE_URL=${convexSiteUrl}`, - ...(deployment ? [`DEV_AUTH_CONVEX_DEPLOYMENT=${devAuthDeploymentMarker(deployment)}`] : []), - "DEV_AUTH_ENABLED=1", - `JWKS=${authKeys.JWKS}`, - `JWT_PRIVATE_KEY=${authKeys.JWT_PRIVATE_KEY}`, - `SECURITY_SCAN_WORKER_TOKEN=${e2eEnv.SECURITY_SCAN_WORKER_TOKEN}`, - `SITE_URL=${appUrl}`, - `VITE_CONVEX_SITE_URL=${convexSiteUrl}`, - `VITE_CONVEX_URL=${convexUrl}`, - "VITE_ENABLE_DEV_AUTH=1", - `VITE_SITE_URL=${appUrl}`, - "", - ].join("\n"), - ); + writeFileSync(envFile, `CONVEX_DEPLOYMENT=${deployment}\n`, { mode: 0o600 }); await warmLocalAuthExternalNodeDependencies(e2eEnv); @@ -629,53 +626,45 @@ async function main() { ...buildLocalAuthBackendVersionArgs(), ]; // Deployment environment controls cron registration, so configure it before any push. - await startLocalConvex([...convexArgs, "--skip-push"], e2eEnv, convexUrl); activeConvexUrl = convexUrl; + await startLocalConvex([...convexArgs, "--skip-push"], e2eEnv, convexUrl, "provision"); console.log("Configuring local Convex environment for local-auth Playwright e2e."); - const localAuthDeployment = - readLocalDeployment() ?? deployment ?? DEFAULT_DEV_AUTH_CONVEX_DEPLOYMENT; + const localAuthDeployment = resolveLocalAuthDeployment( + readLocalDeployment() ?? deployment, + DEFAULT_DEV_AUTH_CONVEX_DEPLOYMENT, + ); e2eEnv.CONVEX_DEPLOYMENT = localAuthDeployment; e2eEnv.DEV_AUTH_CONVEX_DEPLOYMENT = localAuthDeployment; - await setLocalConvexEnv(convexUrl, [ - { name: "AUTH_GITHUB_ID", value: e2eEnv.AUTH_GITHUB_ID ?? "local-dev" }, - { name: "AUTH_GITHUB_SECRET", value: e2eEnv.AUTH_GITHUB_SECRET ?? "local-dev" }, - { name: "CLAWHUB_DISABLE_CRONS", value: "1" }, - { name: "CLAWHUB_SKILLS_SH_ROLLOUT_MODE", value: "test" }, - { name: "CLAWHUB_EMAIL_CAPTURE_FILE", value: e2eEnv.CLAWHUB_EMAIL_CAPTURE_FILE ?? "" }, - { - name: "CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN", - value: e2eEnv.CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN ?? DEFAULT_E2E_WORKER_TOKEN, - }, - { name: "DEV_AUTH_CONVEX_DEPLOYMENT", value: localAuthDeployment }, - { name: "DEV_AUTH_ENABLED", value: "1" }, - { name: "JWKS", value: authKeys.JWKS }, - { name: "JWT_PRIVATE_KEY", value: authKeys.JWT_PRIVATE_KEY }, - { - name: "SECURITY_SCAN_WORKER_TOKEN", - value: e2eEnv.SECURITY_SCAN_WORKER_TOKEN ?? DEFAULT_E2E_WORKER_TOKEN, - }, - { name: "SITE_URL", value: appUrl }, - ]); - - spawnManaged("bunx", ["convex", "logs", "--history", "0"], e2eEnv); - console.log("Pushing local Convex functions with the test environment configured."); - await runRequired( - "bunx", + writeFileSync(envFile, `CONVEX_DEPLOYMENT=${localAuthDeployment}\n`, { mode: 0o600 }); + await setLocalConvexEnv( [ - "convex", - "run", - "--push", - "--inline-query", - "null", - "--typecheck", - "disable", - "--codegen", - "disable", + { name: "AUTH_GITHUB_ID", value: e2eEnv.AUTH_GITHUB_ID ?? "local-dev" }, + { name: "AUTH_GITHUB_SECRET", value: e2eEnv.AUTH_GITHUB_SECRET ?? "local-dev" }, + { name: "CLAWHUB_DISABLE_CRONS", value: "1" }, + { name: "CLAWHUB_SKILLS_SH_ROLLOUT_MODE", value: "test" }, + { name: "CLAWHUB_EMAIL_CAPTURE_FILE", value: e2eEnv.CLAWHUB_EMAIL_CAPTURE_FILE ?? "" }, + { + name: "CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN", + value: e2eEnv.CLAWHUB_PLUGIN_INSPECTOR_WORKER_TOKEN ?? DEFAULT_E2E_WORKER_TOKEN, + }, + { name: "DEV_AUTH_CONVEX_DEPLOYMENT", value: localAuthDeployment }, + { name: "DEV_AUTH_ENABLED", value: "1" }, + { name: "JWKS", value: authKeys.JWKS }, + { name: "JWT_PRIVATE_KEY", value: authKeys.JWT_PRIVATE_KEY }, + { + name: "SECURITY_SCAN_WORKER_TOKEN", + value: e2eEnv.SECURITY_SCAN_WORKER_TOKEN ?? DEFAULT_E2E_WORKER_TOKEN, + }, + { name: "SITE_URL", value: appUrl }, ], e2eEnv, ); + console.log("Pushing local Convex functions with the test environment configured."); + await startLocalConvex(convexArgs, e2eEnv, convexUrl, "serve"); + spawnManaged("bunx", ["convex", "logs", "--history", "0"], e2eEnv); + console.log("Waiting for local Convex functions."); await runConvexFunctionWhenReady("appMeta:getDeploymentInfo", {}, e2eEnv); diff --git a/scripts/test-component-upgrade.ts b/scripts/test-component-upgrade.ts new file mode 100644 index 0000000000..b1533d5797 --- /dev/null +++ b/scripts/test-component-upgrade.ts @@ -0,0 +1,437 @@ +#!/usr/bin/env bun +import assert from "node:assert/strict"; +import { spawn, spawnSync, type ChildProcess } from "node:child_process"; +import { once } from "node:events"; +import { + cpSync, + mkdirSync, + mkdtempSync, + readFileSync, + rmSync, + symlinkSync, + writeFileSync, +} from "node:fs"; +import { createServer } from "node:net"; +import { tmpdir } from "node:os"; +import { join, resolve } from "node:path"; +import { + buildLocalAuthBackendEnv, + buildLocalAuthBackendVersionArgs, + resolveLocalAuthDeployment, +} from "./playwright-local-auth-config"; +import type { LocalConvexBootstrapResult } from "./playwright-local-convex"; + +// The last pre-uplift application and frozen dependency graph, not a generated mock. +const BASELINE = "252a3f86d05331ea5944ad7749165fafb282097e"; +const repository = resolve(import.meta.dirname, ".."); +const helper = join(repository, "scripts/playwright-local-convex.ts"); +const sleep = (ms: number) => new Promise((resolveSleep) => setTimeout(resolveSleep, ms)); + +function git(args: string[]) { + const result = spawnSync("git", args, { cwd: repository, encoding: "utf8" }); + if (result.status !== 0) throw new Error(`git ${args[0]} failed: ${result.stderr}`); + return result.stdout; +} + +function replaceOnce(source: string, from: string, to: string) { + assert.equal(source.split(from).length, 2, `Fixture source contract changed: ${from}`); + return source.replace(from, to); +} + +function pausedReports(source: string, legacy: boolean) { + source = replaceOnce(source, "maxParallelism: 1,", "maxParallelism: 0,"); + source = `import { makeFunctionReference } from "convex/server";\n${source}`; + source = replaceOnce( + source, + ' let phase = "report_read_failed";', + ' await ctx.runMutation(makeFunctionReference<"mutation">("componentUpgradeProbe:recordGeneration"), { reportId });\n let phase = "report_read_failed";', + ); + return legacy + ? replaceOnce(source, 'from "@convex-dev/workpool";', 'from "workpool-previous";') + : source; +} + +const probeSource = `import { Workpool, type WorkId } from "@convex-dev/workpool"; +import { v } from "convex/values"; +import { components } from "./_generated/api"; +import { internalMutation, internalQuery } from "./functions"; +const args = { reportId: v.id("searchReportRuns") }; +const pool = new Workpool(components.searchReports, { maxParallelism: 0 }); +export const recordGeneration = internalMutation({ + args, + handler: (ctx, { reportId }) => ctx.db.insert("componentUpgradeExecutions", { reportId }), +}); +export const snapshot = internalQuery({ + args, + handler: async (ctx, { reportId }) => { + const row = await ctx.db.get(reportId); + if (!row?.workId) throw new Error("Missing retained report/work ID"); + const executions = await ctx.db.query("componentUpgradeExecutions") + .withIndex("by_reportId", q => q.eq("reportId", reportId)).take(2); + return { row, work: await pool.status(ctx, row.workId as WorkId), executions: executions.length }; + }, +}); +`; + +function fixtureSources(read: (path: string) => string, legacy: boolean) { + let config = read("convex/convex.config.ts"); + if (legacy) { + config = replaceOnce( + config, + '"@convex-dev/workpool/convex.config.js"', + '"workpool-previous/convex.config.js"', + ); + config = replaceOnce( + config, + '"@convex-dev/rate-limiter/convex.config.js"', + '"rate-limiter-previous/convex.config.js"', + ); + } + return { + "convex/convex.config.ts": config, + "convex/searchReports.ts": pausedReports(read("convex/searchReports.ts"), legacy), + "convex/schema.ts": replaceOnce( + read("convex/schema.ts"), + "export default defineSchema({", + 'export default defineSchema({\n componentUpgradeExecutions: defineTable({ reportId: v.id("searchReportRuns") }).index("by_reportId", ["reportId"]),', + ), + "convex/lib/retentionPolicy.ts": replaceOnce( + read("convex/lib/retentionPolicy.ts"), + "export const RETENTION_POLICIES = {", + 'export const RETENTION_POLICIES = {\n componentUpgradeExecutions: ephemeral("Fixture generation counter.", { prune: "capsule teardown", retention: "Fixture lifetime." }),', + ), + "convex/componentUpgradeProbe.ts": legacy + ? probeSource.replace('"@convex-dev/workpool"', '"workpool-previous"') + : probeSource, + }; +} + +async function freePort() { + const server = createServer(); + server.listen(0, "127.0.0.1"); + await once(server, "listening"); + const address = server.address(); + assert(address && typeof address !== "string"); + await new Promise((resolveClose, reject) => + server.close((error) => (error ? reject(error) : resolveClose())), + ); + return address.port; +} + +type Snapshot = { + row: { _id: string; workId: string; state: string; previousAttempts?: number }; + work: { state: string }; + executions: number; +}; + +async function main() { + const baselineRead = (path: string) => git(["show", `${BASELINE}:${path}`]); + const candidateRead = (path: string) => readFileSync(join(repository, path), "utf8"); + const baselineManifest = JSON.parse(baselineRead("package.json")); + assert.equal(baselineManifest.dependencies.convex, "1.49.0"); + assert.equal(baselineManifest.dependencies["@convex-dev/workpool"], "0.4.15"); + const legacySources = fixtureSources(baselineRead, true); + const bridgeSources = fixtureSources(baselineRead, false); + const candidateSources = fixtureSources(candidateRead, false); + if (process.argv.includes("--check")) { + console.log("Component upgrade source contracts: PASS (no runtime started)"); + return; + } + const bunPin = candidateRead(".github/actions/setup-bun/action.yml").match( + /bun-version: (\S+)/, + )?.[1]; + assert.equal(process.versions.bun, bunPin, "Run with the repository's pinned Bun version"); + assert.equal(process.platform === "win32", false, "This fixture requires POSIX process groups"); + const node = spawnSync("node", ["--version"], { encoding: "utf8" }); + assert.equal(node.status, 0, "The local backend requires Node.js on PATH"); + assert.match(node.stdout.trim(), /^v24\./, "The configured local backend requires Node.js 24"); + // /tmp preserves short Unix-socket paths on macOS; this is one disposable source capsule. + const root = mkdtempSync( + join(process.platform === "darwin" ? "/tmp" : tmpdir(), "clawhub-upgrade-"), + ); + const project = join(root, "project"); + const selector = join(root, "selector.env"); + const children = new Set(); + mkdirSync(project); + mkdirSync(join(root, "tmp")); + mkdirSync(join(root, "bin")); + symlinkSync(process.execPath, join(root, "bin/bun")); + symlinkSync(process.execPath, join(root, "bin/bunx")); + const cloudPort = await freePort(); + let sitePort = await freePort(); + while (sitePort === cloudPort) sitePort = await freePort(); + const url = `http://127.0.0.1:${cloudPort}`; + const env = { + ...process.env, + ...buildLocalAuthBackendEnv(), + PATH: `${join(root, "bin")}:${process.env.PATH}`, + TMPDIR: join(root, "tmp"), + CONVEX_AGENT_MODE: "anonymous", + CONVEX_SITE_URL: `http://127.0.0.1:${sitePort}`, + VITE_CONVEX_URL: url, + }; + writeFileSync(selector, "CONVEX_DEPLOYMENT=anonymous:anonymous-agent\n", { mode: 0o600 }); + function track(child: ChildProcess) { + children.add(child); + child.once("exit", () => children.delete(child)); + return child; + } + function launch(command: string, args: string[], ipc = false) { + return track( + spawn(command, args, { + cwd: project, + env, + detached: true, + stdio: ipc ? ["ignore", "inherit", "inherit", "ipc"] : ["ignore", "pipe", "pipe"], + }), + ); + } + async function stop(child: ChildProcess) { + if (child.exitCode !== null || child.signalCode !== null) return; + const exited = once(child, "exit"); + process.kill(-child.pid!, "SIGTERM"); + await Promise.race([exited, sleep(5_000)]); + if (child.exitCode === null && child.signalCode === null) process.kill(-child.pid!, "SIGKILL"); + await exited; + } + async function command(args: string[], quiet = false) { + const child = launch(process.execPath, args); + let output = ""; + let errors = ""; + child.stdout!.on("data", (chunk) => { + output += chunk; + if (!quiet) process.stdout.write(chunk); + }); + child.stderr!.on("data", (chunk) => { + errors = (errors + chunk).slice(-2_000); + if (!quiet) process.stderr.write(chunk); + }); + const [code] = await once(child, "close"); + const detail = args.includes("--from-file") ? "" : `\n${errors}`; + assert.equal(code, 0, `Fixture command failed: ${args.slice(0, 3).join(" ")}${detail}`); + return output; + } + const cli = (args: string[], quiet = false) => + command(["x", "--no-install", "convex", ...args, "--env-file", selector], quiet); + const run = async (name: string, args: unknown): Promise => + JSON.parse(await cli(["run", name, JSON.stringify(args)], true)) as T; + const writeSources = (sources: Record) => { + for (const [path, source] of Object.entries(sources)) + writeFileSync(join(project, path), source); + }; + async function archive(ref: string) { + const file = join(root, "source.tar"); + try { + // A file avoids premature-close events in the streaming pipeline and + // gives the producer and extractor independently checked exit statuses. + for (const [command, args] of [ + ["git", ["archive", "--output", file, ref]], + ["tar", ["-xf", file, "-C", project]], + ] as const) { + const child = track( + spawn(command, [...args], { + cwd: repository, + detached: true, + stdio: ["ignore", "inherit", "inherit"], + }), + ); + const [code] = await once(child, "close"); + assert.equal(code, 0, `Fixture ${command} failed`); + } + } finally { + rmSync(file, { force: true }); + } + } + async function start(provision = false) { + const child = launch( + process.execPath, + [ + helper, + ...(provision ? [] : ["--serve"]), + "convex", + "dev", + "--env-file", + selector, + "--typecheck", + "enable", + "--codegen", + "enable", + "--local-cloud-port", + String(cloudPort), + "--local-site-port", + String(sitePort), + ...buildLocalAuthBackendVersionArgs(), + ...(provision ? ["--skip-push"] : []), + ], + true, + ); + await new Promise((resolveReady, reject) => { + const timer = setTimeout(() => reject(new Error("Local fixture startup timed out")), 300_000); + child.once("error", (error) => { + clearTimeout(timer); + reject(error); + }); + child.once("exit", () => { + clearTimeout(timer); + reject(new Error("Local fixture owner exited")); + }); + child.once("message", (result: LocalConvexBootstrapResult) => { + clearTimeout(timer); + if (result.status === "ready") resolveReady(); + else reject(new Error(result.message)); + }); + }); + return child; + } + let cleanup: Promise | undefined; + const clean = () => + (cleanup ??= (async () => { + await Promise.all([...children].map(stop)); + rmSync(root, { recursive: true, force: true }); + })()); + const interrupt = () => { + void clean().then(() => process.exit(130)); + }; + process.once("SIGINT", interrupt); + process.once("SIGTERM", interrupt); + try { + await archive(BASELINE); + await command(["install", "--frozen-lockfile"]); + writeSources(legacySources); + await stop(await start(true)); + const config = JSON.parse( + readFileSync(join(project, ".convex/local/default/config.json"), "utf8"), + ) as { deploymentName?: unknown }; + assert.equal( + typeof config.deploymentName, + "string", + "Provisioning did not record a local deployment", + ); + const name = config.deploymentName as string; + const deployment = resolveLocalAuthDeployment( + `${name.startsWith("anonymous-") ? "anonymous" : "local"}:${name}`, + "anonymous:anonymous-agent", + ); + writeFileSync(selector, `CONVEX_DEPLOYMENT=${deployment}\n`, { mode: 0o600 }); + const value = join(root, "value"); + writeFileSync(value, "1", { mode: 0o600 }); + for (const name of ["CLAWHUB_DISABLE_CRONS", "CLAWHUB_PREVIEW"]) { + await cli(["env", "set", name, "--from-file", value], true); + } + rmSync(value); + let owner = await start(); + const period = 24 * 60 * 60 * 1000; + const quota = { + name: "component-upgrade", + key: "retained-quota", + config: { kind: "fixed window", rate: 1, period, start: Date.now() }, + }; + assert.deepEqual(await run("rateLimits:consumeHttpRateLimitKeyInternal", quota), { ok: true }); + const request = { view: "recommendations", artifactKind: "plugin" }; + const queued = await run<{ reportId: string; status: string }>( + "searchReports:startInternal", + request, + ); + assert.equal(queued.status, "pending"); + const snapshot = () => + run("componentUpgradeProbe:snapshot", { reportId: queued.reportId }); + const before = await snapshot(); + assert.equal(before.executions, 0); + assert.equal(before.work.state, "pending"); + async function retained() { + const current = await snapshot(); + assert.deepEqual(current, before, "Report, work identity, or queue changed while paused"); + const denied = await run<{ ok: boolean; retryAfter: number }>( + "rateLimits:consumeHttpRateLimitKeyInternal", + quota, + ); + assert.equal(denied.ok, false); + assert(denied.retryAfter > 0 && denied.retryAfter <= period); + } + await retained(); + await stop(owner); + writeSources(bridgeSources); + owner = await start(); + // This fixture has one pending job (less than the migration's 64-row batch). + // Supplying `before` runs that batch synchronously instead of just scheduling it. + await cli([ + "run", + "--component", + "searchReports", + "migrations:backfillPendingStartIds", + JSON.stringify({ before: Date.now() }), + ]); + const workRows = JSON.parse( + await cli( + ["data", "work", "--component", "searchReports", "--limit", "2", "--format", "json"], + true, + ), + ) as Array<{ _id: string; pendingStartId?: string }>; + assert.equal(workRows.length, 1); + assert.equal(workRows[0]._id, before.row.workId); + assert(workRows[0].pendingStartId, "Pending-start backfill did not complete"); + await retained(); + await stop(owner); + // Overlay application files only. The single .convex directory and its database stay in place. + const deleted = git([ + "diff", + "--name-only", + "-z", + "--no-renames", + "--diff-filter=D", + BASELINE, + "HEAD", + ]); + for (const path of deleted.split("\0").filter(Boolean)) { + assert( + !path.startsWith(".convex/") && !path.startsWith(".env"), + "Local state cannot be a tracked source deletion", + ); + rmSync(join(project, path), { force: true }); + } + await archive("HEAD"); + for (const path of ["package.json", "bun.lock", "convex.json"]) + cpSync(join(repository, path), join(project, path)); + await command(["install", "--frozen-lockfile"]); + writeSources(candidateSources); + owner = await start(); + await retained(); + await cli(["run", "--component", "searchReports", "config:update", '{"maxParallelism":1}']); + const deadline = Date.now() + 120_000; + let finished = await snapshot(); + while (finished.work.state !== "finished" && Date.now() < deadline) { + await sleep(500); + finished = await snapshot(); + } + assert.equal(finished.work.state, "finished"); + assert.equal(finished.row._id, before.row._id); + assert.equal(finished.row.workId, before.row.workId); + assert.equal(finished.row.state, "ready"); + assert.equal(finished.row.previousAttempts ?? 0, 0); + assert.equal(finished.executions, 1, "Queued generation must execute exactly once"); + const ready = await run<{ status: string }>("searchReports:getInternal", { + reportId: queued.reportId, + }); + assert.equal(ready.status, "ready"); + const reused = await run<{ reportId: string; status: string }>( + "searchReports:startInternal", + request, + ); + assert.equal(reused.reportId, queued.reportId); + assert.equal(reused.status, "ready"); + assert.equal((await snapshot()).executions, 1); + await stop(owner); + console.log( + "Component upgrade: PASS (legacy → backfilled 0.4.15 → candidate, one database, retained quota/IDs, one generation)", + ); + } finally { + try { + await clean(); + } finally { + process.off("SIGINT", interrupt); + process.off("SIGTERM", interrupt); + } + } +} + +await main(); diff --git a/specs/ci.md b/specs/ci.md index 176feaa294..b4d91676b1 100644 --- a/specs/ci.md +++ b/specs/ci.md @@ -131,12 +131,16 @@ local Convex process before running it. Long or cross-filesystem scratch paths use a short writable ancestor on the workspace filesystem. Short `TMPDIR` overrides on that filesystem are preserved. This keeps module renames on one device and leaves room for Convex's Unix socket paths on macOS. -The runner starts the backend without publishing functions, configures the -backend environment, and then publishes once. Cron definitions read deployment +The runner provisions the local deployment without publishing functions, then +configures its environment through the CLI's short-lived local backend owner. +Environment values use private file input, and the CLI selector names only the +isolated local or anonymous deployment. Cron definitions read deployment environment variables during publication, so `CLAWHUB_DISABLE_CRONS=1` must be -set before the first push. Application readiness checks never republish code, -and no development watcher can push again while the app builds. A persistent -launcher retains ownership of the backend process group through cleanup. +set before the first push. The persistent launcher runs `convex dev --once` +with an owned `--start` keeper. Its ready signal comes after the initial push; +the keeper holds the backend alive without a development watcher. Application +readiness checks never republish code, and process-group cleanup retires the +launcher, keeper, and backend together. CI pins the local-auth backend with `PLAYWRIGHT_LOCAL_AUTH_BACKEND_VERSION`. Before bootstrap, it restores the versioned binary cache or downloads the Linux @@ -234,3 +238,26 @@ Vercel deployment URL when GitHub's Vercel status exposes it. Use these tags as the audit map for rollback selection. Vercel traffic rollback still happens through Vercel's deployment rollback/promote controls; the Git tag is the stable source pointer for the deployed build. + +### Component upgrade retention + +`bun run test:component-upgrade` runs an isolated local backend with one disposable +source capsule and one database. It starts the pinned pre-upgrade application +with Workpool 0.4.12 and rate-limiter 0.3.2, consumes quota and queues a real search +report with fixture-only capacity zero. It then pushes Workpool 0.4.15, runs its +pending-start backfill, and pushes the current frozen dependency graph without +replacing the database. The report and work IDs, pending row, and denied quota +must survive both transitions. Resuming capacity must generate and retrieve the +report exactly once, then reuse that same ready report. + +Only the capsule receives the paused capacity, execution counter, and probe +functions. The source checkout and production schema do not receive those hooks. +The command removes its capsule and owned processes on exit. The `component-upgrade` +CI job runs this proof before the required `unit` job; its baseline is fetched as +one pinned commit. Run with the repository-pinned Bun version. `--check` validates +the source transformation contracts without installing dependencies or starting +a backend. This is a forward-upgrade test; Workpool 0.5 does not support downgrades. + +The quota-only unit test keeps the additive rate-limiter implementation switch. +Workpool retention uses the real backend because `convex-test` cannot replace a +component schema without replacing that component's database.