fix(repair): recover unavailable state objects in ledger publish (#712) #2635
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "apply-report.json" | |
| - "repair-apply-report.json" | |
| - "jobs/**" | |
| - "records/**" | |
| - "results/**" | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: pnpm check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| config | |
| dashboard | |
| docs | |
| instructions | |
| prompts | |
| schema | |
| scripts | |
| src | |
| test | |
| .oxfmtrc.json | |
| AGENTS.md | |
| README.md | |
| package.json | |
| pnpm-lock.yaml | |
| pnpm-workspace.yaml | |
| tsconfig.dashboard.json | |
| tsconfig.json | |
| tsconfig.repair.json | |
| sparse-checkout-cone-mode: false | |
| - name: Validate workflow semantics | |
| env: | |
| ACTIONLINT_VERSION: "1.7.12" | |
| ACTIONLINT_LINUX_AMD64_SHA256: "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8" | |
| run: | | |
| actionlint_archive="${RUNNER_TEMP}/actionlint.tar.gz" | |
| curl --fail --show-error --silent --location \ | |
| "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \ | |
| --output "$actionlint_archive" | |
| printf '%s %s\n' "$ACTIONLINT_LINUX_AMD64_SHA256" "$actionlint_archive" | sha256sum --check - | |
| tar -xzf "$actionlint_archive" -C "$RUNNER_TEMP" actionlint | |
| "$RUNNER_TEMP/actionlint" \ | |
| -shellcheck= \ | |
| -ignore 'unexpected key "queue" for "concurrency" section' \ | |
| .github/workflows/*.yml | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Run check | |
| run: pnpm run check | |
| sparse-repair-builds: | |
| name: sparse repair build smoke | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Build each sparse repair checkout | |
| run: pnpm run test:workflow-sparse-checkout | |
| crawl-remote-toolchain: | |
| name: crawl-remote toolchain integration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| NODE_OPTIONS: "" | |
| NPM_CONFIG_IGNORE_SCRIPTS: "true" | |
| NPM_CONFIG_USERCONFIG: /dev/null | |
| TOOLCHAIN_ROOT: ${{ github.workspace }}/.github/deploy/crawl-remote-toolchain | |
| WRANGLER_VERSION: 4.107.1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| sparse-checkout: .github/deploy/crawl-remote-toolchain | |
| sparse-checkout-cone-mode: false | |
| persist-credentials: false | |
| - name: Setup pinned Node runtime | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 24.18.0 | |
| - name: Install pinned Wrangler from the committed lock | |
| working-directory: .github/deploy/crawl-remote-toolchain | |
| run: | | |
| npm ci --ignore-scripts --no-audit --no-fund | |
| actual_version="$(./node_modules/.bin/wrangler --version)" | |
| test "$actual_version" = "$WRANGLER_VERSION" | |
| - name: Exercise pinned Wrangler dry-run | |
| env: | |
| BUNDLE_ROOT: ${{ runner.temp }}/crawl-remote-toolchain-bundle | |
| FIXTURE_ROOT: ${{ runner.temp }}/crawl-remote-toolchain-fixture | |
| run: | | |
| rm -rf "$FIXTURE_ROOT" "$BUNDLE_ROOT" | |
| mkdir -p "$FIXTURE_ROOT" | |
| printf '%s\n' \ | |
| "export default { fetch() { return new Response('ok'); } };" \ | |
| > "$FIXTURE_ROOT/index.ts" | |
| node --input-type=module <<'NODE' | |
| import { writeFileSync } from 'node:fs'; | |
| import { join } from 'node:path'; | |
| writeFileSync( | |
| join(process.env.FIXTURE_ROOT, 'wrangler.json'), | |
| `${JSON.stringify( | |
| { | |
| name: 'crawl-remote-toolchain-fixture', | |
| main: 'index.ts', | |
| compatibility_date: '2026-07-12', | |
| }, | |
| null, | |
| 2, | |
| )}\n`, | |
| ); | |
| NODE | |
| ( | |
| cd "$FIXTURE_ROOT" || exit 1 | |
| "$TOOLCHAIN_ROOT/node_modules/.bin/wrangler" deploy \ | |
| --dry-run \ | |
| --outdir "$BUNDLE_ROOT" | |
| ) | |
| test -s "$BUNDLE_ROOT/index.js" | |
| while IFS= read -r entry; do | |
| case "$entry" in | |
| README.md | index.js | index.js.map) ;; | |
| *) | |
| echo "::error::unexpected Wrangler dry-run output: $entry" | |
| exit 1 | |
| ;; | |
| esac | |
| done < <(find "$BUNDLE_ROOT" -mindepth 1 -maxdepth 1 -printf '%f\n' | sort) | |
| windows-codex-launch: | |
| name: Windows Codex launcher | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Build process workers | |
| run: | | |
| pnpm run build | |
| pnpm run build:repair | |
| - name: Verify native Windows launcher | |
| run: > | |
| node --test --test-name-pattern | |
| "escaped Windows launchers|extensionless Windows node shebang shims|CODEX_BIN and preserves argv|timeout errors|app-server mode" | |
| test/codex-process.test.ts |