Skip to content

style: 格式化 CI 检查范围内漂移文件(转绿 Code Quality)#10

Merged
jhfnetboy merged 2 commits into
masterfrom
chore/format-audit-baseline
Jul 14, 2026
Merged

style: 格式化 CI 检查范围内漂移文件(转绿 Code Quality)#10
jhfnetboy merged 2 commits into
masterfrom
chore/format-audit-baseline

Conversation

@jhfnetboy

Copy link
Copy Markdown
Member

目的

清掉长期挂红的 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.ts 2 个
  • 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(= CI format:check 的写侧),不动 docs / README / 根级文件——保持 diff 严格等于 CI 实际检查范围(14 文件),避免整仓重格的 4000+ 行噪音。

验证

  • npm run format:check -w aastar ✅ exit 0
  • npm run format:check -w aastar-frontend ✅ exit 0
  • npm run type-check -w aastar ✅ / -w aastar-frontend

归属说明

这些是 cos72 自己的文件(userop 为 PR#4 原创、前端均 cos72 authored/diverged),非继承自 upstream YAAA,故在 cos72 修、不甩给上游。

未含(单独处理)

Security Audit red 是 PR-only 的 dependency-review-action(非 npm audit,critical 门本就过);装着的 ws@8.18.3/8.21.0 已高于 advisory 修复线。本 PR 不碰依赖,观察其在纯格式化 PR 上是否自动转绿,再决定是否需要精确处理。

https://claude.ai/code/session_01MCxVCnKkpzi5sCGf1FZ4CH

之前 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
@jhfnetboy jhfnetboy requested a review from fanhousanbu as a code owner July 13, 2026 08:11
前端 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
@jhfnetboy

Copy link
Copy Markdown
Member Author

🤖 Codex review(Tier 1)结果:APPROVE

对全部 1245 行 diff 做了逐块审查:

style commit(14 文件格式化):逐块核对无任何语义变化——JSX 换行点(OnboardingWizard/phase0/tasks)均验证渲染等价;tasks/[taskId]:302 仅去冗余括号,|| 求值等价;CSS 仅声明拆行 + .9em→0.9em 规范化。

fix(deps) commit(react-hooks pin 7.0.1):lockfile 改动最小且自洽(仅新增 frontend 嵌套条目,无其他包被搅动);peer eslint ^8.0.0-0 与现 ^8.57.1 不冲突。唯一 Low:精确 pin 后 patch 不自动升级——这正是 pin 的目的(对齐上游 7.0.1,待上游修 7.1.x 兼容后解钉)。

无 race condition / 错误处理 / 安全问题。CI 14/14 全绿(Security Audit 已随 Dependency Graph 启用转绿)。待 review 合并。

@clestons clestons left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 dryRun flags are preserved — the one thing that would actually matter. master has onboard({… dryRun: true}) (preview) and dryRun: 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.

@jhfnetboy jhfnetboy merged commit 2265a55 into master Jul 14, 2026
23 of 25 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants