Uh oh!
There was an error while loading. Please reload this page.
style: Biome format baseline + check-mode CI gate (outside apps/desktop) (#415) - #1122
Conversation
2d7d1c7 to
da8915dCompareUncertaintyDeterminesYou4ndMe
commented
Jul 16, 2026
CI's test failure was real and informative — fixed and force-pushed. Root cause: desktop's source-contract tests don't only introspect desktop's own source — ~45 contracts read Also owning a verification gap on my side: locally Changes in the force-push:
Verified: This also sharpens the follow-up question: the source-contract web spans the whole UI surface (desktop + ui, 190+ single-line assertions), so making those contracts format-tolerant (or AST-based) is the real gate for ever formatting UI code — option (a)/(c) from the PR description. |
da8915d to
8ae99b6CompareThere was a problem hiding this comment.
Approved.
Non-blocking P3 follow-up: this repository squash-merges PRs, so the branch-only baseline hash in .git-blame-ignore-revs will not exist in a fresh clone after merge; git blame configured with the file then exits with "cannot find revision ... to ignore". Please remove the branch hash before merge and add the resulting squash commit hash in a follow-up, or otherwise update the entry immediately after merge.
8ae99b6 to
7417aacCompareUncertaintyDeterminesYou4ndMe
commented
Jul 17, 2026
Done — went with your first option. The branch hash is removed from One operational note: GitHub hasn't been starting CI runs on my last few pushes to this branch ("no checks reported", no check-suites on the head SHA — not the fork-approval gate). The commits are content-identical to the previously verified tree apart from the |
Astro-Han
commented
Jul 17, 2026
LGTM, but there is a lot of rebase to be done. |
likun666661
left a comment
There was a problem hiding this comment.
LGTM, but there is a lot of rebase to be done.
7417aac to
a385f96CompareUncertaintyDeterminesYou4ndMe
commented
Jul 19, 2026
已在最新 main(8b9d69a)上重建整个基线(force-push,a385f96b)。全仓机械格式化 PR 的 rebase 策略是重新生成而非解决 660 文件的文本冲突:配置 commit 重放 → 重新跑 重建中发现并处理了两个机械格式化的实际危害(已写进基线 commit message):
验证:format:check / lint / build / typecheck 干净,全套件通过——唯一失败是 |
…che#415) Follow-up to apache#1019, which introduced the linter but deliberately left the formatter out. Restores the formatter config (2-space, 100-col, single quotes, semicolons, trailing commas — matching dominant existing style), adds `format` (write) / `format:check` scripts, and a `npm run format:check` CI step in the typecheck job. Formatter-scoped exclusions (all still fully linted): - apps/desktop/** and packages/ui/**: the UI surface's source-contract tests read .ts/.tsx source (desktop's own and packages/ui's) and regex-match exact single-line shapes; a whole-tree reformat broke 145 desktop-source assertions plus ~45 contracts introspecting packages/ui. UI-surface formatting lands as a follow-up once those contract tests are format-tolerant. - Byte-sensitive provenance artifacts (SOURCE.json is SHA-256'd and size-checked by scripts/prepare-cua-driver.mjs) and bundled-tools.json. The mechanical baseline reformat is the next commit; the check gate goes green only with both included.
Regenerated on top of current main (the previous baseline commit was 90 commits stale and conflicting; a whole-repo mechanical reformat is rebased by re-running the formatter, not by resolving 660 files of textual conflicts). Same scope as before: biome.json excludes the apps/desktop UI surface. Two adjustments the reformat itself required: a @ts-expect-error in proxy-test.ts moved onto the property line it suppresses (the reformat split the fetch call, displacing the directive), and a second formatter pass over two files where Biome's first pass is not idempotent.
fc6899b to
3be9261CompareUh oh!
There was an error while loading. Please reload this page.
The formatter follow-up promised in #1019 — one atomic PR, structured for a merge moment of your choosing. Closes the formatter half of #415.
Structure (3 commits)
biome.jsonc(2-space / 100-col / single quotes / semicolons / trailing commas),format+format:checkscripts, andnpm run format:checkin the CI typecheck job (right after lint, before build).biome format --writeto fixpoint: 805 files, zero logic changes. This is the commit to point.git-blame-ignore-revsat..git-blame-ignore-revs— carries the baseline commit's branch hash.git log --oneline --grep 'Biome format baseline' -1) — happy to push the corrected hash post-merge instead if you prefer merge-commit-off.Running the baseline over the whole tree broke 145 assertions across 64 desktop test files. Desktop has a pervasive source-contract test style — tests read
.ts/.tsxsource and regex-match exact single-line shapes (e.g.account-auth-ui.test.tsmatches a full<div className=... aria-label=...>line). Any reformat — Biome's or a future hand edit — snaps them.Rather than scattering ~145
// biome-ignore format:comments through desktop source (which would exempt much of desktop from the formatter this PR introduces — self-defeating), this PR excludesapps/desktop/**from the formatter only (it stays fully linted), and defers desktop to a follow-up. Options for that follow-up, your call:main-process-contract-source-helpers.js, 20 files;provider-contract-source-helpers.js, 6 files) could centralize normalization, but many exact-spacing regexes are inline per test — non-trivial.Outside desktop, the same class of problem existed at small scale and IS handled in the baseline: 5 statements carry a
// biome-ignore format:guard — two@ts-expect-errordirectives that must stay adjacent to the line they suppress (proxy-test.ts,run-trace.ts— splitting the statement orphans the directive: TS2578 + the suppressed error resurfaces) and three single-line shapes asserted by source-contract tests (run-prompt-ab.mjs,run-prompt-optimization.mjs,run-harness-ab.mjs).Also excluded (byte-sensitive, not hand-authored):
apps/desktop/resources/licenses/**(SOURCE.jsonis whole-file SHA-256'd + size-checked byprepare-cua-driver.mjs) andbundled-tools.json.Verification
npm run lint✅ andnpm run format:check✅ (formatter run to fixpoint — Biome's formatter isn't idempotent on some multi-line generic signatures, so one extra pass was needed)npm run build✅,npm run typecheck✅npm test: scripts 109, core 1067, storage 287, runtime 1983, computer-use 135, desktop (untouched) all green; headless 1063/1067 with only the 2 known-flakyopencode stop runnersubtests (fail identically on unmodified main, pass in isolation)Merge timing
Touches ~805 files, so it conflicts with most open PRs — merge whenever suits; I'll rebase + re-run the baseline to fixpoint on request the same day you want it landed (regenerating is cheap and deterministic, ~1 min).
Heads-up per the #1019 thread:
biome lint --write --unsafestill hangs onapps/desktop(~100% CPU indefinitely; plainformatis fine) — upstream minimization still on my list, tracked separately from this PR.