Repository navigation
ci: run format check on every PR, including markdown-only ones - #917
Merged
Merged
Conversation
pr.yml's Test workflow skips **.md/docs/** via paths-ignore, but its Check job runs pnpm check -> oxfmt --check, which also formats Markdown. A markdown-only PR therefore never ran the format check; the drift only surfaced later via formatting.yml's nightly auto-fix PR. Add format-check.yml: a small, always-run workflow (no paths-ignore, no native build) that runs oxfmt --check on every PR and push to main. Drop fmt:check from pr.yml's Check step so it isn't verified twice for code PRs; type-check and lint stay there, path-filtered with the rest of the heavy jobs. No required status checks are currently configured on main (classic branch protection's required_status_checks contexts/checks are both empty), so this can't leave a doc-only PR with a permanently pending required check. Dispatch-Task: rocksdb-js-md-format-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
Trim narrative comments (they restated mechanics instead of informing the next reader), fix a factual error (setup-deps already passes --ignore-scripts; the real difference is skipping its deps/rocksdb cache and GH_TOKEN), add contents:read permissions, and point at format-check.yml as the job to require instead of Test/Check if main ever gains required checks -- mirroring validate-caller-workflows.yml's existing note. Dispatch-Task: rocksdb-js-md-format-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
Split package.json's check script into check:code (type-check + lint) and check (check:code + fmt:check), and point pr.yml's Check job at check:code. Removes the hand-maintained sync comment entirely -- a future gate added to check:code is automatically picked up by CI, instead of silently only running locally/in lefthook. Scope cancel-in-progress in format-check.yml's concurrency group to pull_request only, so two merges to main in quick succession don't leave the first commit's push run cancelled with no reported status. Reword the "require THIS job" comment so it reads as what to require, not as advice against requiring the test jobs. Dispatch-Task: rocksdb-js-md-format-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
…roup Mirror the same group-splitting fix PR #915 applies to pr.yml: GitHub drops an older QUEUED run sharing a concurrency group when a newer one joins, regardless of cancel-in-progress. Three or more merges to main in quick succession could otherwise drop a push run's status. Push now gets a group keyed to github.run_id instead of the shared ref, so it never collides. Also trims the install-step comment per repeated review nits. Dispatch-Task: rocksdb-js-md-format-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
Dispatch-Task: rocksdb-js-md-format-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
Contributor
📊 Benchmark Resultsget-sync.bench.tsgetSync() > random keys - small key size (100 records)
getSync() > sequential keys - small key size (100 records)
ranges.bench.tsgetRange() > small range (100 records, 50 range)
realistic-load.bench.tsRealistic write load with workers > write variable records with transaction log
transaction-log.bench.tsTransaction log > read 100 iterators while write log with 100 byte records
Transaction log > read one entry from random position from log with 1000 100 byte records
worker-put-sync.bench.tsputSync() > random keys - small key size (100 records, 10 workers)
worker-transaction-log.bench.tsTransaction log with workers > write log with 100 byte records
Results from commit a3abdc9 |
kriszyp
marked this pull request as ready for review
October 12, 2026 17:39
cb1kenobi
approved these changes
Oct 13, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⊙ Problem
.github/workflows/pr.yml'sTestworkflow ispaths-ignored for**.md/docs/**/LICENSE/.gitignore, so a markdown-only PR never runs itsCheckjob -- which runspnpm check, includingoxfmt --check(oxfmt formats Markdown too, per AGENTS.md's Code Quality section). A markdown-only PR with a formatting problem therefore merges clean, and the drift only surfaces later viaformatting.yml's nightly auto-fix PR.💡 Solution
Added
.github/workflows/format-check.yml: a small workflow with nopaths-ignore, triggered on every PR and on push tomain. It needs no native build (oxfmt --checkdoesn't touchsrc/binding/**, and formatting runs identically with or withoutpnpm build), so its install step skips.github/actions/setup-deps'sdeps/rocksdbcache andGH_TOKENentirely.fmt:checkis moved out ofpr.yml'sCheckjob rather than duplicated there, so package.json splitscheckintocheck:code(type-check + lint) andcheck(check:code+fmt:check) --pr.yml'sCheckstep now runspnpm check:code,format-check.ymlrunspnpm fmt:check, and localpnpm check(and lefthook) still runs all three.Checked before choosing this shape:
gh api repos/HarperFast/rocksdb-js/rules/branches/main(the effective-rules endpoint, covering both classic branch protection and any ruleset) returns[]-- no status check is required onmaintoday. So adding an unfiltered job can't leave a doc-only PR with a permanently pending required check; it would only matter once/if a required check is configured.format-check.yml's header comment says which job to require if that ever happens (Format Check, notTest/Check-- paths-ignore meansChecknever runs on a doc-only PR), mirroring the existing note invalidate-caller-workflows.ymlfor the same class of problem.⚖️ Alternatives
'**.md'/'docs/**'frompr.yml'spaths-ignoreinstead of adding a new workflow -- rejected:paths-ignoregates the wholeTestworkflow, so this would run the full 3-OS x 3-Node build/test matrix plus native/Bun/Deno jobs on every doc-only PR, which is exactly the costpaths-ignoreexists to avoid.fmt:checkinpr.yml'sCheckjob and duplicate it in the new workflow -- rejected in favor of thecheck/check:codesplit: duplicating it costs a few redundant seconds on every code PR and leavescheck's command list defined in two places that can drift; the split keeps one definition and CI stays in sync withpnpm check/lefthook by construction.🔧 Changes
.github/workflows/format-check.yml(new) -- unfiltered format-check workflow..github/workflows/pr.yml--Checkstep now runspnpm check:codeinstead ofpnpm check.package.json--checksplit intocheck:code+check(check:code && fmt:check).✅ Verification
./node_modules/.bin/oxfmt --check(direct binary, bypassing a stale localpnpm/npminstall-lifecycle quirk in this worktree -- see Findings) -- clean on all touched files at every commit in this PR.package.json-- valid.gh api repos/HarperFast/rocksdb-js/rules/branches/main--[], confirming no required status checks exist today (see Solution).maincould drop each other's status, misleading/narrating comments). Converged on 3 recurring items, resolved below..github/andpackage.json, neither of which is path-ignored; the doc-only path this change targets will first be exercised by a future doc-only PR.No numbered GitHub issue was filed for this; it was worked from a dispatch task (
rocksdb-js-md-format-check).Open PR #915 also touches
pr.yml(addspush/scheduletriggers and a run-id-scoped concurrency group) but in theon:/concurrency:top-level blocks, not thejobs.checks.stepsregion this PR touches -- no line overlap, should rebase cleanly either direction.Related PRs: #915 overlaps, #382 independent
🤖 Generated with Claude Code
https://claude.ai/code/session_017oenufV4sz7QuQjeAXyuYP
Origin — the dispatch brief this PR was written from
.github/workflows/pr.yml has paths-ignore including **.md, but its Check job runs pnpm check -> oxfmt --check, which formats markdown (.oxfmtrc.json ignorePatterns is empty). A markdown-only PR therefore skips the format check and the error surfaces later (nightly formatting.yml). Move the format check into a small always-run workflow/job without paths-ignore, keeping the heavy test matrix path-filtered. Before choosing, check which checks are required on main so a skipped workflow does not leave doc-only PRs with a pending required check.
Acceptance
A markdown-only PR runs oxfmt --check; code PRs unchanged.
Dispatch: task
rocksdb-js-md-format-check· queued by finding-triage/wave-30 · ran by claude/sonnet/high · worker kzyp-xps-1Review-Coverage: authored=claude; ran=gemini,codex; adjudicated=domain; declined=cursor-grok,cursor-composer,cursor-kimi,cursor-muse; rounds=6; full=3 @ 4a1e139
Review-Attention: study ~13m (sensitive: format-check.yml; decisions: do-less-alternative, format-out-of-check-job, require-format-check-now) @ 4a1e139