Skip to content

ci: d1-stress and Miniflare patch notes (#190 follow-up) - #197

Merged
Madraka merged 1 commit into
mainfrom
ci/d1-stress-followup
Nov 10, 2026
Merged

Madraka merged 1 commit into
mainfrom
ci/d1-stress-followup

Conversation

@Madraka

@Madraka Madraka commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #192 (review notes on #190).

Changes

  1. d1-stress.yml inputs. inputs.hogs || 4 treated a typed 0 as falsy, so the documented "0 = CI's own load" could not be selected. The same was true of runs.
    • Both now read github.event.inputs.*, which are strings: '0' is truthy and is used as given. Pull requests have no inputs and take the defaults.
    • runs is clamped to at least 1, because an empty matrix is a workflow error.
  2. max-parallel: 10 on the matrix, so a stress run of 20 jobs leaves job slots for other pull requests' CI.
  3. AGENTS.md patches/ entry now mentions both changes in the Miniflare patch: #15552, and the sync pool's keepAliveTimeout/keepAliveMaxTimeout of 1000 (#16445 A). Like the Kumo entry, it points to the upgrade recipe in ADR-0012. It also says that on a Miniflare bump the first signal is pnpm install --frozen-lockfile failing on the unused patch, not the guard test. ADR-0012's recipe says the same.
  4. miniflare-patch.test.ts child timeout. The child gets 20 s, below storage's 30 s testTimeout. It now runs as its own process group: on timeout or in afterEach, the whole group gets SIGKILL.
    • Why not execFile's timeout: it sends SIGTERM. A hung sync proxy call blocks the child's main thread in Atomics.wait, where Miniflare's SIGTERM exit hook never runs.
    • Checked locally: a child started with Miniflare and stuck in Atomics.wait survived SIGTERM with its workerd still running (6 workerd processes before and after). A group SIGKILL removed both (back to 5; the other 5 belong to other sessions).
    • Also fixed the shellcheck SC2034 warning: _ for the unused loop variable.

Checks

  • In packages/storage: pnpm exec vitest run test/miniflare-patch.test.ts passes (1 test), pnpm --filter @cloudhal/storage typecheck is clean, and Biome is clean.
  • actionlint .github/workflows/d1-stress.yml is clean.
  • The workflow file changed, so the d1-stress run starts on this PR.

🤖 Generated with Claude Code

- d1-stress: read `github.event.inputs.*` (strings), so `hogs: 0` and
  small `runs` are honoured instead of falling back to the default;
  clamp `runs` to at least 1 (an empty matrix is an error); cap the
  matrix at `max-parallel: 10` so a stress run leaves job slots for
  other pull requests; `_` for the unused loop variable (shellcheck).
- miniflare-patch.test.ts: the child gets 20 s, below storage's 30 s
  testTimeout, and runs as its own process group. On timeout or in
  afterEach the group gets SIGKILL: a hung sync proxy call blocks the
  child in Atomics.wait, where Miniflare's SIGTERM hook never runs, and
  workerd would linger.
- AGENTS.md: the Miniflare patch entry names both changes (#15552 and the
  sync pool's keepAlive 1000), points to ADR-0012's upgrade recipe, and
  says the first signal of a bump is the --frozen-lockfile install
  failing on the unused patch. ADR-0012 says the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka merged commit d5e5f26 into main Nov 10, 2026
29 checks passed
@Madraka
Madraka deleted the ci/d1-stress-followup branch November 10, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant