Repository navigation
fix(cli): write the workflow for init --workflow without --ci #83
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish memory | |
| # ClawHub runs publish-time inspection inside a 512 MiB Node action. This gate | |
| # measures that path (packed OpenClaw target preparation, retirement | |
| # qualification, author-facing plugin check) on the largest official channel | |
| # plugins and compares it with the 0.4.5 release on the same runner, so a | |
| # change that regresses memory on a large plugin fails before release. | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish-memory: | |
| name: Publish-time peak RSS | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Locate scratch directories | |
| run: | | |
| echo "FIXTURES=$RUNNER_TEMP/publish-memory" >> "$GITHUB_ENV" | |
| echo "BASELINE=$RUNNER_TEMP/baseline-0.4.5" >> "$GITHUB_ENV" | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24.22.1 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Cache npm fixtures | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ runner.temp }}/publish-memory | |
| key: publish-memory-openclaw-2026.10.10-channels-2026.10.10 | |
| - name: Fetch OpenClaw target and channel plugins | |
| run: node scripts/fetch-publish-memory-fixtures.mjs --out "$FIXTURES" | |
| - name: Install the 0.4.5 baseline | |
| run: | | |
| mkdir -p "$BASELINE" | |
| cd "$BASELINE" | |
| npm init -y >/dev/null | |
| npm install --no-audit --no-fund --ignore-scripts @openclaw/plugin-inspector@0.4.5 | |
| # Every target is answered the same way: there is no per-release data, so | |
| # the published release and a modified snapshot exercise the same path. | |
| - name: OpenClaw 2026.10.10, at most 50% of 0.4.5 | |
| run: >- | |
| node scripts/publish-memory-benchmark.mjs | |
| --target "$FIXTURES/openclaw/package" | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" | |
| --baseline "$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js" | |
| --runs 5 --max-ratio 0.5 --diagnose --json publish-memory-released.json | |
| - name: Unseen OpenClaw snapshot, at most 50% of 0.4.5 | |
| if: success() || failure() | |
| run: >- | |
| node scripts/publish-memory-benchmark.mjs --uncached-target | |
| --target "$FIXTURES/openclaw/package" | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" | |
| --baseline "$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js" | |
| --runs 3 --max-ratio 0.5 --diagnose --json publish-memory-unseen.json | |
| # A later release adds new SDK entrypoints and declaration shapes; nothing | |
| # about it is known in advance. 0.4.5 type-checks it fully, so identical | |
| # outputs prove the certificates answered exactly. | |
| - name: Future OpenClaw release with new SDK surface, at most 50% of 0.4.5 | |
| if: success() || failure() | |
| run: | | |
| node scripts/make-future-openclaw-fixture.mjs --from "$FIXTURES/openclaw/package" --out "$RUNNER_TEMP/future/package" | |
| node scripts/publish-memory-benchmark.mjs --target "$RUNNER_TEMP/future/package" \ | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" \ | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" \ | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" \ | |
| --baseline "$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js" \ | |
| --runs 3 --max-ratio 0.5 --diagnose --json publish-memory-future.json | |
| # Replacement names computed from template literals over finite unions are | |
| # enumerated exactly, so this release is held to the same budget. | |
| - name: Future release with computed names, at most 50% of 0.4.5 | |
| if: success() || failure() | |
| run: | | |
| node scripts/make-future-openclaw-fixture.mjs --from "$FIXTURES/openclaw/package" --out "$RUNNER_TEMP/future-computed/package" --computed-names | |
| node scripts/publish-memory-benchmark.mjs --target "$RUNNER_TEMP/future-computed/package" \ | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" \ | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" \ | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" \ | |
| --baseline "$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js" \ | |
| --runs 3 --max-ratio 0.5 --diagnose --json publish-memory-future-computed.json | |
| # Names whose availability needs TypeScript's assignability (a conditional | |
| # type over object types) are answered by the exact type-checked fallback. | |
| # Outputs must stay identical to 0.4.5. Its memory does NOT meet the 50% | |
| # budget (an exact type check of the SDK closure cannot); this guards it | |
| # against regressions while that trade-off is decided. | |
| - name: Undecidable future names take the exact fallback (identical outputs, at most 85% of 0.4.5) | |
| if: success() || failure() | |
| run: | | |
| node scripts/make-future-openclaw-fixture.mjs --from "$FIXTURES/openclaw/package" --out "$RUNNER_TEMP/future-undecidable/package" --undecidable | |
| node scripts/publish-memory-benchmark.mjs --target "$RUNNER_TEMP/future-undecidable/package" \ | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" \ | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" \ | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" \ | |
| --baseline "$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js" \ | |
| --runs 1 --max-ratio 0.85 --json publish-memory-future-undecidable.json | |
| # ClawHub's Convex actions run the inspector from an esbuild bundle, so a | |
| # dependency hidden from bundlers would only fail after deploy. | |
| - name: Bundled like ClawHub's Convex actions, at most 50% of 0.4.5 | |
| if: success() || failure() | |
| run: | | |
| banner='import { createRequire as __createRequire } from "node:module"; import { fileURLToPath as __fileURLToPath } from "node:url"; import { dirname as __dirnameOf } from "node:path"; const require = __createRequire(import.meta.url); const __filename = __fileURLToPath(import.meta.url); const __dirname = __dirnameOf(__filename);' | |
| for implementation in candidate baseline; do | |
| entry=src/index.js | |
| if [ "$implementation" = baseline ]; then entry="$BASELINE/node_modules/@openclaw/plugin-inspector/src/index.js"; fi | |
| npx --yes esbuild@0.25.12 "$entry" --bundle --platform=node --format=esm --target=node24 \ | |
| --banner:js="$banner" --log-level=warning --outfile="$RUNNER_TEMP/bundled/$implementation/index.mjs" | |
| done | |
| node scripts/publish-memory-benchmark.mjs \ | |
| --target "$FIXTURES/openclaw/package" \ | |
| --plugin @openclaw/discord="$FIXTURES/plugins/discord/package" \ | |
| --plugin @openclaw/matrix="$FIXTURES/plugins/matrix/package" \ | |
| --plugin @openclaw/whatsapp="$FIXTURES/plugins/whatsapp/package" \ | |
| --inspector "$RUNNER_TEMP/bundled/candidate/index.mjs" \ | |
| --baseline "$RUNNER_TEMP/bundled/baseline/index.mjs" \ | |
| --runs 5 --max-ratio 0.5 --diagnose --json publish-memory-bundled.json | |
| # Certified answers must match the full type check for every name the | |
| # snapshot spells, not only the retirement inventory. | |
| - name: Retirement certificates agree with the full type check | |
| if: success() || failure() | |
| run: >- | |
| node --max-old-space-size=4096 scripts/verify-packed-sdk-certificates.mjs | |
| --target "$FIXTURES/openclaw/package" | |
| --target "$RUNNER_TEMP/future/package" | |
| --target "$RUNNER_TEMP/future-computed/package" | |
| --target "$RUNNER_TEMP/future-undecidable/package" | |
| # The runtime-import analysis reads scope facts from a light scope manager | |
| # driven by eslint-scope's Referencer; they must equal the full analysis on | |
| # every file of the plugin packages, dependencies included. | |
| - name: Scope facts agree with eslint-scope | |
| if: success() || failure() | |
| run: node scripts/verify-scope-facts.mjs "$FIXTURES/plugins" | |
| - name: Upload measurements | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: publish-memory | |
| path: publish-memory-*.json | |
| if-no-files-found: ignore |