style: 格式化 CI 检查范围内漂移文件(转绿 Code Quality)#10
Conversation
之前 PR#2/#3/#4/#8 合入时带进了未格式化文件:aastar/src/userop/dto 2 个、 aastar-frontend 12 个(phase0/tasks/CommunityNav/roles/cosTx/webauthn-assert/ config/modules/node-onboarding)。CI 的 Code Quality(aastar format:check 扫 src/**/*.ts、frontend 扫 workspace)因此长期 red。 仅对两个 workspace 跑 prettier --write(= CI format:check 的写侧),不动 docs/ README/根级文件,保持 diff = CI 实际检查范围。format:check + type-check 两 workspace 均绿。 Claude-Session: https://claude.ai/code/session_01MCxVCnKkpzi5sCGf1FZ4CH
前端 Code Quality 的 red 实为 lint:check(eslint)而非格式化:cos72 lockfile 把 `^7.0.0` 浮解析到 7.1.1,其新规则 "access before declared" 卡住继承自上游、 且逐字节相同的 app/address-book/page.tsx 等文件。上游 YAA 用 7.0.1、CI 全绿。 改直接 devDep 精确钉 7.0.1(= 上游 lockfile 版本),不改继承文件、不制造分叉。 lockfile 仅新增 frontend 嵌套 7.0.1 条目(+21/-1),viem/ox/react/next 均未动。 lint:check -w aastar-frontend + build 均绿。待上游 bump 7.1.x 修码后再解钉。 Claude-Session: https://claude.ai/code/session_01MCxVCnKkpzi5sCGf1FZ4CH
🤖 Codex review(Tier 1)结果:APPROVE对全部 1245 行 diff 做了逐块审查: style commit(14 文件格式化):逐块核对无任何语义变化——JSX 换行点(OnboardingWizard/phase0/tasks)均验证渲染等价; fix(deps) commit(react-hooks pin 7.0.1):lockfile 改动最小且自洽(仅新增 frontend 嵌套条目,无其他包被搅动);peer 无 race condition / 错误处理 / 安全问题。CI 14/14 全绿(Security Audit 已随 Dependency Graph 启用转绿)。待 review 合并。 |
clestons
left a comment
There was a problem hiding this comment.
✅ APPROVE — verified semantically no-op (real Prettier, no logic smuggled in)
A "style:" PR touching 16 files with a net +439 lines is exactly the shape that can hide a real change, so I checked it properly — a whitespace-and-quote-insensitive diff (git diff -w, then normalizing '↔") between master and the branch. Result: every surviving delta is Prettier, nothing else.
- The
dryRunflags are preserved — the one thing that would actually matter.masterhasonboard({… dryRun: true})(preview) anddryRun: false(real submit); the branch has the same two values, just reflowed onto their own lines. No flag flipped. - All other changes are pure formatting:
'…'→"…", arrow-param paren removal ((e) =>→e =>), and single-line JSX/calls wrapped multi-line (which is where the net line-adds come from). Values, comparisons, conditions, handlers all identical — e.g.wallet.chainId !== CHAIN_ID[cfg.network],CHAIN_ID.op-sepolia = 11155420, the@Matches(/^0x[0-9a-fA-F]+$/)guardian-signature validator — unchanged. - The userop DTO changes (
prepare-userop,submit-userop) are only@ApiProperty({...})decorator reflow; no validation semantics touched.
So it does what the title says — reformats drift files to green Code Quality — and nothing more. CSS/package-lock churn is non-executable formatting.
Verdict: APPROVE. Confirmed no behavior change. Not merging — yours.
🤖 Reviewed by clestons (PR-Daemon). Verified via git diff -w + quote-normalization on the local checkout; dryRun and all logic tokens confirmed unchanged.
目的
清掉长期挂红的 Code Quality CI(
prettier --check),让后续 PR 不再被基线红干扰。在首位:这笔是低风险纯格式化,先落地。根因
之前 PR#2/#3/#4/#8 合入时带进了未格式化文件。CI 的两个 Code Quality job:
Code Quality (aastar)→prettier --check "src/**/*.ts":src/userop/dto/{prepare,submit}-userop.dto.ts2 个Code Quality (aastar-frontend)→prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}":phase0 / tasks / CommunityNav / roles / cosTx / webauthn-assert / config/modules / node-onboarding 共 12 个因此这两个 job(及聚合门
CI Success)在 master 上长期 red。改动
仅对 aastar / aastar-frontend 两个 workspace 跑
prettier --write(= CIformat:check的写侧),不动 docs / README / 根级文件——保持 diff 严格等于 CI 实际检查范围(14 文件),避免整仓重格的 4000+ 行噪音。验证
npm run format:check -w aastar✅ exit 0npm run format:check -w aastar-frontend✅ exit 0npm run type-check -w aastar✅ /-w aastar-frontend✅归属说明
这些是 cos72 自己的文件(userop 为 PR#4 原创、前端均 cos72 authored/diverged),非继承自 upstream YAAA,故在 cos72 修、不甩给上游。
未含(单独处理)
Security Auditred 是 PR-only 的dependency-review-action(非npm audit,critical 门本就过);装着的ws@8.18.3/8.21.0已高于 advisory 修复线。本 PR 不碰依赖,观察其在纯格式化 PR 上是否自动转绿,再决定是否需要精确处理。https://claude.ai/code/session_01MCxVCnKkpzi5sCGf1FZ4CH