Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request consists entirely of code formatting and style adjustments across various integration tests, unit tests, scripts, and source files, aligning them with the project's formatting rules. There are no functional code changes. As there were no review comments provided, I have no additional feedback to offer.
kriszyp
marked this pull request as ready for review
September 24, 2026 15:55
Contributor
|
Reviewed; no blockers found. |
kriszyp
force-pushed
the
fix/prettier-clean-main
branch
from
October 2, 2026 18:17
647d923 to
1b47912
Compare
npx prettier --check . currently errors on the core submodule's deliberately-malformed test fixtures and warns on 27 unformatted files in harper-pro's own tree. Add .prettierignore to exclude core/ (it's a separate repo with its own formatting/CI), then run prettier --write over the rest. Pure reformat, no semantic changes. Dispatch-Task: harper-pro-prettier-clean-and-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VWh88RGtbanyJqx6hB3b15
harper-pro had no format check in CI, so main drifted from prettier-clean and npm run format:write rewrote ~20 unrelated files for every contributor. Now that the tree is clean (previous commit), fail the existing lint job on formatting drift. Dispatch-Task: harper-pro-prettier-clean-and-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VWh88RGtbanyJqx6hB3b15
- Anchor .prettierignore's core/ as /core/ so it can't silently match a future nested Pro directory of the same name. - Route the CI check through npm run format -- --check instead of bare npx prettier --check ., so a future flag/ignore-path change to the format script reaches CI too. - Add permissions: contents: read to lint-code.yaml (the job runs PR-authored package.json scripts against a write-scoped default token; matches typecheck.yaml's existing pattern). - Drop the narrating comment restating what .prettierignore already says. Dispatch-Task: harper-pro-prettier-clean-and-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VWh88RGtbanyJqx6hB3b15
CONTRIBUTING.md already instructs recording formatting commits here; the file just didn't exist yet. Also drop a stale cross-reference from the permissions comment. Dispatch-Task: harper-pro-prettier-clean-and-check Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VWh88RGtbanyJqx6hB3b15
.claude/worktrees/ (this repo's own worktree convention) and the rest of .claude/ are untracked local state, excluded only via .git/info/exclude. Prettier reads .gitignore but not .git/info/exclude, so a whole-tree format run from the main checkout was recursing into every worktree, including each worktree's own nested core/ checkout and dist/ output. Found by the pre-push review's domain adjudication on this PR's rebase. Dispatch-Task: pr-maint-1ac41b4a39b4cea6189b4e615027add7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
main added this file, not prettier-clean, since this branch last rebased. Caught by npx prettier --check . after rebasing onto origin/main. Dispatch-Task: pr-maint-1ac41b4a39b4cea6189b4e615027add7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebasing onto main rewrote the formatting commit's SHA (3660c05 -> d125334) and this branch gained a second formatting commit (8d6b747, for a file that landed on main unformatted after the original push). The blame-ignore file still pointed at the old, now-unreachable SHA, which git/GitHub silently skip rather than error on, so blame on the 19 reformatted files would have kept crediting the formatting commit to its authors. Caught by prepush review (codex + gemini + cursor-composer, domain adjudication) on the rebased head. Dispatch-Task: pr-maint-1ac41b4a39b4cea6189b4e615027add7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same bug class as the .claude/ fix: integrationTests/cluster/qa-scratch/ is excluded only via .git/info/exclude (local QA-exploration scratch state), which Prettier doesn't read, so a whole-tree format:write from the main checkout would recurse into it on any machine that has it. Flagged by prepush review (harper-domain) on the rebased branch. Dispatch-Task: pr-maint-1ac41b4a39b4cea6189b4e615027add7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Flagged by prepush review (codex/gemini/domain, all three) as repeating the same per-clone-exclude rationale twice; one shared comment above both entries says it once. Dispatch-Task: pr-maint-1ac41b4a39b4cea6189b4e615027add7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kriszyp
force-pushed
the
fix/prettier-clean-main
branch
from
October 10, 2026 04:33
f7b9d34 to
b7c8431
Compare
This branch has not been deployed
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.
Bring harper-pro to prettier-clean and gate main on it in CI.
npx prettier --check .failed on origin/main: it hard-errored walking into thecoresubmodule's deliberately malformed test fixtures (nothing previously excludedcorefrom prettier's own default.gitignore/.prettierignorelookup — it's tracked as a submodule, not gitignored), and separately warned on 27 unformatted files in harper-pro's own tree. Because main wasn't clean, the guideline-mandatednpm run format:writerewrote ~20 unrelated files for every contributor, who then hand-reverted them. There was also no format check in.github/workflows/.For the human reviewer
format:write, and the CONTRIBUTING.md sync process already assumes clean formatting between drift-free commits.git blameon ~25 touched files now points at the reformat commit; mitigated by recording it in.git-blame-ignore-revs(see below). A second cost, surfaced by this PR's rebases: any open backport PR touching the same lines on a release branch will now hit whitespace-only conflicts againstmain; reversible by running the same reformat on each release branch if that becomes a problem. A third cost, surfaced by the Oct 10 rebase: a concurrent main PR can land an unformatted file after this branch's last push, which then fails the new gate until this branch rebases again and reformats it (happened once already — see thecherryPickPatch.test.mjsnote below)..git-blame-ignore-revsto keep working. Only an actual merge commit preserves the SHAs it records. GitHub's "Rebase and merge" also rewrites every commit (new parent → new SHA — the same mechanism this branch's own rebases ontomainhave twice demonstrated on its own commits), so it loses the blame-skip exactly like squash does; recentmainhistory (titled(#NNN)) suggests squash is this repo's usual strategy. Not blocking:git blame --ignore-revs-filedegrades gracefully on an unresolvable SHA (verified — exit 0, falls back to normal attribution) rather than erroring, so any non-merge-commit strategy just quietly loses the blame-skip until someone records the landed SHA in a follow-up. Whoever merges this PR needs to pick a merge commit, or plan that follow-up.integrationTests/cluster/replicatedStaticRedeploy.test.mjsuses.body.includes(...), not exact/byte equality, and both fixture versions ofcontrol.htmlremain byte-identical to each other pre- and post-format (this is a cross-fixture equality claim, not a claim that the bytes match the pre-Prettier fixture). Independently re-verified during this PR's cross-model review (a Gemini "major" finding claiming the opposite was checked against the actual assertions and dropped as factually wrong).runLinterjob, not a new workflow — reuses the job/runner instead of provisioning a second one for a single fast command. Tradeoff: a formatting failure now also hides whethercompanion-check.test.mjs(the step after it) would have passed, since the job stops at the first failing step. VerifiedrunLinteris actually enforced: it's a required status check onmainvia the repo's "Main - Force CI" ruleset, so this isn't advisory-only.npm ivsnpm ci --ignore-scripts— left as-is (pre-existing in this job,typecheck.yamluses the latter). Means the exact Prettier version resolved bynpm iisn't strictly lockfile-pinned the waytypecheck.yaml's is, thoughprettier ~3.9.0inpackage.jsonplus the lockfile's pinned3.9.8bound the practical risk. Flagging in case that inconsistency is worth reconciling separately — didn't fix here since it's pre-existing job behavior, not something this change introduces.git diff --name-onlyscoping if that trade ever stops being worth it.Changes
.prettierignore— excludes/core/(root-anchored) since it's a separate repo/submodule with its own formatting and CI, plus two local-only trees that are excluded from git only via the unversioned.git/info/exclude(which Prettier doesn't read):.claude/(this repo's worktree convention — found during the first rebase review) andintegrationTests/cluster/qa-scratch/(a local QA-exploration scratch dir — found during this round's rebase review). Without these a whole-tree format run from a checkout that has either directory silently recurses into it..github/workflows/lint-code.yaml— addspermissions: contents: readat the workflow level (this job runs PR-authoredpackage.jsonscripts against the repo's write-scoped default token; matches the existing pattern intypecheck.yaml), and a new stepnpm run format -- --check(reuses theformatscript frompackage.jsonrather than a barenpx prettier --check ., so a future change to that script's flags/ignore-paths reaches CI automatically)..git-blame-ignore-revs— new file,# Formatting Changessection per CONTRIBUTING.md's existing (previously unfulfilled) instruction, recording both formatting commits currently on this branch (the original baseline reformat and thecherryPickPatch.test.mjsfollow-up below) sogit blameon the touched files skips past them to the real authors. These SHAs shift on every rebase — see item Add CODEOWNERS file #3 above for the merge-method caveat and why that matters more now that there are two of them to keep in sync.licensing/usageLicensing.ts— layout only: reflows an existingsplice(...)call's arguments. No logic change.unitTests/github/cherryPickPatch.test.mjs— layout only. This file landed onmainafter this branch's previous push (via Skip a release cherry-pick whose change is already on the release branch), unformatted; the Oct 10 rebase caught it vianpx prettier --check .and reformatted it in its own commit, same as the original baseline reformat.Note:
CONTRIBUTING.md,scripts/patch-release.js, andsecurity/keyCustody.tswere part of earlier states of this PR's reformat commit but have since dropped out of the diff entirely — each becausemainsubstantively rewrote or reformatted the same file itself (first two: Oct 2 rebase;security/keyCustody.ts: Oct 10 rebase, file now identical tomain). This branch's formatting of their old content is moot.integrationTests/stress/largeClone.test.mjshit the same situation on the Oct 10 rebase but as a real conflict rather than a clean drop:mainhad rewritten the test's actual logic (added an exact-count check at the firstAvailabletick, not just at the end) since this branch's reformat commit, which had only reflowed the old logic's whitespace. Resolved by takingmain's content entirely — the reformat commit made zero semantic changes to begin with, so there was nothing of this PR's to preserve, andmain's version is itself already Prettier-clean.Verification
npx prettier --check .— exits 0 on this branch (was failing with parse errors + 27 warnings onmain).npm run typecheck— clean (covers the reformatted.tsfile above).npm run lint:required— clean.node build-tools/companion-check.test.mjs— passes (mirrors the CI job's last step).node --checkon every reformatted.mjs/.jsfile — all parse.main(Oct 2, Oct 10; core submodule pointer followsmain, untouched by this PR both times) — still clean.getFileInfo/ignore-matching API) that the/.claude/and/integrationTests/cluster/qa-scratch/ignore entries exclude exactly their intended local-only trees without affecting any real source path. The reformatted test/fixture files below, whitespace/layout only, were each individually confirmed to parse and preserve their assertions and token streams:integrationTests/cluster/aclConnectCrossNode.test.mjsintegrationTests/cluster/addNodeLeaderNoMeshLeak.test.mjsintegrationTests/cluster/addNodeStartTime.test.mjsintegrationTests/cluster/blobOrphanFullCopyConverges.test.mjsintegrationTests/cluster/cacheReplicationSource.test.mjsintegrationTests/cluster/copyModeBlobDeadlock.test.mjsintegrationTests/cluster/oversizedFrameCursorSafety.test.mjsintegrationTests/cluster/relayExclusionEffectiveConfig.test.mjsintegrationTests/cluster/replicationBlobIncompleteSource.test.mjsintegrationTests/cluster/replicationBlobRepairAuthoritative.test.mjsintegrationTests/cluster/replicationConflictDeterminism.test.mjs— includes the??/?:regrouping in the retry predicate; traced and confirmed equivalent (??binds tighter, parens added by prettier change nothing).integrationTests/cluster/selectiveTableSubscription.test.mjsintegrationTests/cluster/systemDbDynamicSendGate.test.mjsintegrationTests/cluster/typedStructReplicationDivergence.test.mjsintegrationTests/security/certificate.test.mjsintegrationTests/stress/wedgedPeerSubscribeStorm.test.mjsunitTests/github/cherryPickPatch.test.mjsunitTests/replication/copyBlobTransferMetadata.test.mjsintegrationTests/cluster/fixture-static-redeploy/web/control.html— byte-identical to its v2 counterpart before and after formatting.integrationTests/cluster/fixture-static-redeploy/web/existing.htmlintegrationTests/cluster/fixture-static-redeploy-v2/web/control.html— byte-identical to the non-v2 fixture before and after formatting.integrationTests/cluster/fixture-static-redeploy-v2/web/existing.htmlintegrationTests/cluster/fixture-static-redeploy-v2/web/new.htmlRelated PRs: 3 others independent
Complexity: easy
Origin — the dispatch brief this PR was written from
Bring harper-pro main to prettier-clean and keep it there: run the repo's prettier over the tree (respecting the existing ignore rules, which exclude the
coresubmodule), commit the pure-format result as its own commit, and add a CI step that runsnpx prettier --check .(ornpm run format -- --check) so formatting drift fails a PR.Acceptance
npx prettier --check .exits 0 on the PR branch; the format commit contains only whitespace/format changes (no semantic edits); a CI job fails on unformatted files and passes on the PR. Do not touch thecoresubmodule.Dispatch: task
harper-pro-prettier-clean-and-check· queued by finding-triage/wave-19 · ran by claude/sonnet/xhigh · worker kzyp-xps-1Review-Coverage: authored=claude; ran=codex,gemini; adjudicated=domain; declined=cursor-grok,cursor-composer,cursor-kimi,cursor-muse; rounds=10; full=4 @ b7c8431
Review-Attention: study ~11m (sensitive: lint-code.yaml, usageLicensing.ts; decisions: ignore-list-location, format-step-placement, whole-tree-reformat, blame-ignore-merge-method) @ b7c8431