fix: make CI Format pass (format broken baseline + add pre-commit hook)#1190
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 536d31c | Commit Preview URL Branch Preview URL |
Jun 28 2026, 09:38 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 536d31c | Jun 28 2026, 09:39 PM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Adds .githooks/pre-commit that runs oxfmt --write on staged JS/TS/JSON and re-stages them, and wires git config core.hooksPath .githooks into bootstrap so every fresh checkout and worktree activates it. Commits now land already-formatted, so the CI format job (oxfmt --check) stops failing on contributions that skipped running format manually. The hook only touches staged files, matching the existing rule to stage just your own files. It honours .oxfmtrc.json ignorePatterns and no-ops when oxfmt is not yet installed.
origin/main was already failing oxfmt --check on 20 package.json files (publishConfig key order: access sorts before exports), so every PR inherited a red Format check regardless of its own contents. Format them once to make the baseline green.
c0aae4b to
536d31c
Compare
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.
The real problem
origin/mainitself was already failingbun run format:check(oxfmt --check .): 20package.jsonfiles were unformatted (publishConfig key order,accesssorts beforeexports). Because the Format job runs on the merge result, every PR inherited a red Format check no matter what it changed. That is whyfmtappeared to fail on essentially every agent PR; it was not the agents' diffs.A secondary gap: the repo had no git hooks, so nothing formatted commits locally before they were pushed either.
What this does
chore: format package.json publishConfig- formats the 20 unformattedpackage.jsonfiles so the baseline is green. The change is a pure, idempotent key reorder (verified by re-running oxfmt). The existingchangeset:versionscript already runsoxfmt ., so the release flow keeps them formatted going forward.ci: auto-format staged code with a pre-commit hook- prevention so this cannot silently come back via locally-authored commits:.githooks/pre-commit: formats staged JS/TS/JSON withoxfmt --writeand re-stages them. Touches only staged files (matching the existing 'stage just your own files' rule), honours.oxfmtrc.jsonignorePatterns, NUL-safe, and no-ops when oxfmt is not installed yet.scripts/bootstrap.ts: setsgit config core.hooksPath .githooks. hooksPath is local config that is never cloned or copied into worktrees, so bootstrap re-applies it on every fresh checkout / agent worktree.Test
oxfmt --check .passes across all 1533 files locally.oxfmt --check.