| feat: 大类重构,文件操作全部改为异步 Signed-off-by: gyange <gyange@163.com> | 4 months ago |
| chore: bump quality-toolkit — bypass protection + push guard + AI review - bump .quality-toolkit to latest (b65cd89): * push-guard: pre-push validates ALL commits in push range * bypass-detector: detects --no-verify usage patterns * AI review gate: Critical + Major block commit * AGENTS.md bypass protection - .husky/pre-commit: AI review gate after lint-staged - .husky/pre-push: push guard Impact: framework unchanged; quality gates strengthened. Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[36%] Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago |
| docs(framework): fix stale roadmap labels, cross-repo dead links, skill version tag P3 minor items from the docs audit, each verified against the source: - framework README UI comparison checklist: ignoreRegions and the per-pixel diff (perPixelTolerance / diffThreshold) are implemented in visual-comparator.ts (with the compareRegions intersection semantics) but were still labeled "0.3.0 roadmap" — mark them done - framework README: three links pointed at ../../../app/tests/ (COMPARISON-GUIDE.md does not exist in this repo nor in rnoh_test; app/ lives in the companion rnoh_test repo, not in the CPTF monorepo). Point readers at in-repo docs (UI-COMPARISON.md, USER-GUIDE.md) and describe the sample project location honestly - docs index: BASELINE-MANAGEMENT.md entry advertised "0.3.0 roadmap" while the doc itself documents the shipped --rn-version segmentation and .history backup flow - cptf-test-api skill: "v0.2.1+" tag was two minor versions stale; update to v0.3.x and correct the collect field note (memory/cpu are raw channels, not PerfMetricType members) test case: pnpm harness (advisory-only, unchanged) + docs image check AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Signed-off-by: liu_wentao <liuwentao57@h-partners.com> Co-authored-by: opencode2 (unknown) <ai@local> | 30 days ago |
| chore: bump quality-toolkit — profile system + remote config + AI review gate - bump .quality-toolkit -> 6ef7f91: profiles, remote config, Major blocks - .quality/harness.config.json: uses atomgit-standard profile + remote config - .husky/pre-commit: AI review gate after lint-staged - package.json: review:staged script Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[59%] Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago |
| docs(framework): fix stale roadmap labels, cross-repo dead links, skill version tag P3 minor items from the docs audit, each verified against the source: - framework README UI comparison checklist: ignoreRegions and the per-pixel diff (perPixelTolerance / diffThreshold) are implemented in visual-comparator.ts (with the compareRegions intersection semantics) but were still labeled "0.3.0 roadmap" — mark them done - framework README: three links pointed at ../../../app/tests/ (COMPARISON-GUIDE.md does not exist in this repo nor in rnoh_test; app/ lives in the companion rnoh_test repo, not in the CPTF monorepo). Point readers at in-repo docs (UI-COMPARISON.md, USER-GUIDE.md) and describe the sample project location honestly - docs index: BASELINE-MANAGEMENT.md entry advertised "0.3.0 roadmap" while the doc itself documents the shipped --rn-version segmentation and .history backup flow - cptf-test-api skill: "v0.2.1+" tag was two minor versions stale; update to v0.3.x and correct the collect field note (memory/cpu are raw channels, not PerfMetricType members) test case: pnpm harness (advisory-only, unchanged) + docs image check AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Signed-off-by: liu_wentao <liuwentao57@h-partners.com> Co-authored-by: opencode2 (unknown) <ai@local> | 30 days ago |
| chore: bump quality-toolkit for vendored-link relativization Advance the vendored toolkit to the merged main tip (MR !10) so generated agents resolve toolkit links relative to the consumer repo layout. The target commit is reachable from origin/main. Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (unknown) <ai@local> | 30 days ago |
| !46 merge main into feature/device-native-driver 增加pnpm发布必要文件 Created-by: lalhanOrz Commit-by: LalHan Merged-by: gyange Description: ## 变更类型 请在对应类型(请勿多选)前打 √,**仅可选择一项**: - [ ] feat(新增功能,对应 Changelog Added) - [ ] fix(修复 Bug,对应 Changelog Fixed) - [ ] docs(文档变更,对应 Changelog Documentation) - [ ] refactor(代码重构,对应 Changelog Changed) - [ ] perf(性能优化,对应 Changelog Performance) - [ ] test(测试相关,不进入 Changelog) - [ ] chore(构建/工具链/依赖,不进入 Changelog) - [ ] deprecated(标记弃用,对应 Changelog Deprecated) - [ ] removed(移除功能,对应 Changelog Removed) - [ ] security(安全修复,对应 Changelog Security) ## 变更内容 - 简要描述本次变更的具体内容、解决的问题; - 若为**破坏性变更**,请详细说明: - 影响范围(哪些 API/配置/功能被修改); - 用户适配方案(旧版→新版的替换步骤) ## 测试步骤 <!-- 如何测试这条PR。例如: 1. 在 Demo/Test 工程中引入变更后的库。 2. 执行 npm run start 命令,验证相关页面。 ... --> ## 测试情况 - [ ] 已通过本地完整测试(单元测试/集成测试) - [ ] 已通过 CI 自动构建与测试 - [ ] 已补充/更新对应的测试用例 - [ ] 已在目标环境(如 手机/平板)验证功能 - [ ] 已在最低兼容API版本验证可用性 ## 合入前自检 <!-- 请在合入前根据以下条例进行自检 自检完成后在[ ]内填入"x", 例如: - [x] 不涉及非兼容性变更;若涉及,已通过相应评审。 --> - [ ] 不涉及非兼容性变更;若涉及,已通过相应评审。 - [ ] 不涉及性能或已进行性能测试且无性能劣化。 - [ ] 符合对应的编码规范。 - [ ] 无敏感信息泄露,如密码、密钥等。 - [ ] 不涉及文档更新,或已更新了文档。 - [ ] 针对可测试性要求,已增加必要的自测用例、合理的日志记录或Trace信息。 - [ ] 不存在非法的文件引入,包括图片和代码等 See merge request: CPF-RN/CPTF!46 | 30 days ago |
| chore: integrate quality-toolkit (standards + skills + tools) - add .quality-toolkit submodule (gitcode react-native/quality-toolkit @ caa2a02): 185-rule compliance harness, commitlint baseline, gitleaks, lint-staged, cspell wiring, 14 AI agents - .husky hooks (commit-msg commitlint / pre-commit gitleaks+lint-staged / pre-push harness); postinstall sets core.hooksPath + commit template - package.json: preinstall pnpm version gate (plain Node), harness suite, commitlint, agents:gen; devDependencies declared for CI/dev machines - commitlint.config.js extends the toolkit baseline; root lint-staged.config.js forwards to the toolkit config - .quality/harness.config.json phased adoption: 1392 historical Chinese comments + log literals + missing templates surface as WARN (exit 0); tighten per batch by removing advisoryChecks entries - .opencode/agent/: 14 agents generated from the toolkit skills - AGENTS.md: quality-toolkit section (commands, phased-debt policy) Impact: no runtime change to the framework; hooks/scripts only. Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[36%] Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago |
| style(framework): 建立 prettier 格式化基线 lint-staged 门禁依赖 prettier,但仓库从未落地格式化配置(门禁此前从未 真正执行过)。先行建立基线,使后续源码提交不再携带意外的大规模重排: - 新增 .prettierrc:singleQuote / printWidth 120 / arrowParens avoid, 取自现有代码的主流风格(无括号单参箭头 939:231;行长绝大多数 ≤120) - 对 parallel-test-runner、compare-executor 及两个测试文件应用格式化 - 源内容与 HEAD 完全一致——纯机械重排(长行折行/三元加括号/空行合并), 无任何语义变化 impact scope: 纯格式化;typecheck 状态与 HEAD 相同(TS 5.3 存量错误仍在, 由紧随其后的 chore 提交修复) Signed-off-by: gyange <gaoyang36@huawei.com> | 1 month ago |
| chore(commitlint): enforce English commit subject and body - add subject-english (reuses the toolkit rule factory) and body-english plugin rules on top of the baseline config; CJK is only allowed inside backticks or fenced code blocks (quoted logs or identifiers) - declare the English policy for commits, PRs, and issues in AGENTS.md; PR and issue titles derive from the commit subject via the submit flow impact scope: commit-msg hook and push-guard validation for all future commits; toolchain config only, no runtime code involved test case: none required; existing test cases need no modification Signed-off-by: gyange <gaoyang36@huawei.com> | 1 month ago |
| feat: Android Native 全链路 + 统一端口管理 + metric 事件总线 + 稳定性修复 Android Native 完整化(实测通过): - AndroidNativeDriver: L3 sendCommand 重试 / L2 tryReconnect / L4 recoverFromCrash / reconnectCount - DeviceDriver.java: 设备端性能采集(Timer: gfxinfo帧差分fps+meminfo PSS+top CPU)、 screenshotFile(getExternalFilesDir)、startMonitoring前kill ATX(UiAutomation单例冲突) - WebSocketClient.java: RFC6455 client帧mask修复(必现握手失败) - NativeTestDriver.ets: startMonitoring/stopMonitoring/collectMetrics 实装(SP_daemon+hidumper降级), 替代stub; WS close清理Timer; findComponents('*')全树支持 - 录屏: host托管spawn(adb shell screenrecord)替代设备端nohup(Android sh不可靠)+which检查 统一端口管理: - 新增 base/utils/port-pool.ts: PortManager移出harmony专属目录, allocate异步化+ net listen实际占用探测(可发现外部进程占用)+preferredPort范围隔离 - 删除MetricPortPool, acquireMetricServer复用PortManager; setupFport/Rport/AdbReverse统一 - connect失败清理规则(两平台): 关WS server+release端口+清_actualPort (修复进程内Map泄漏→端口漂移18081→18082→instrumentation永连不上) - WS server maxPayload 256MB metric事件总线(D3修复): - 新增 base/utils/metric-event-bus.ts(复用benchmark的global.__metricEventBus协议) - external的MetricWebSocketServer与native的nativeDriver WS双推送源统一汇入 - RenderTime/UnmountTime collector从永远UI文本fallback变为真WS事件驱动 - subscribeNativeMetricStream三路分流: renderTime/unmountTime→bus; type:'metric'→仅latestMetric缓存(防全0脏数据); fps/memory/cpu→history 稳定性与降级: - L1: DriverModeArbiter接入TestRunner(harmony 5 mixin全量remount); android分支内联同语义(成功remount+u2.destroy防ATX复活, 失败auto→切external) - L4 wiring: 失败用例+nativeDriver断连→自动recoverFromCrash - overallSuccess纳入迭代success(修复录屏降级/迭代失败时报告假阳性) - startMonitoring幂等守卫+startCollectionLoop清旧timer(修复双setInterval) - harmony collectFPS/Memory/CPU加native分支; startDeviceMonitoring去500ms钳位 - watchdog估算: 解析用例源码sleep累加+perIterTotal下限15s(修复5迭代用例稳定撞120s) - stopScreenRecord/录屏pull失败降级不中断迭代(两平台) TestResult新字段: driverMode/effectiveDriverMode/driverFallback/driverFallbackReason/driverReconnects 死代码清理(被替代): framework RenderTime/UnmountTimeCollector(benchmark WS事件版替代)、 native driver invalidateLayoutCache/screenshotCache三件套、AndroidNativeDriver.getLayout(XML误用JSON.parse, 改dumpLayout+parseUILayout)、DeviceDriver startMarker/endMarker 验证: typecheck/52 suites/776 tests/verify全绿; Android双模式全量实测 (functional 109采样+performance 18全量): 功能判例100%一致(0分歧), native平均2.6s vs external 4.4s(快41%), renderTime偏差<8%, 全程0 fallback/0 reconnects, L2重连与L4崩溃恢复实测触发可用 已知残留: Android native高交互场景(持续动画)命令通道并发性 (DeviceDriver单线程receive循环被采集Timer抢占→卡死超时), 动画类用例暂用external Signed-off-by: gyange <gaoyang36@huawei.com> | 2 months ago |
| feat: 更新开源协议为MIT Signed-off-by: gyange <gyange@163.com> | 4 months ago |
| docs(readme): cover the full CLI surface and add 0.2->0.3 migration P1 documentation follow-ups from the docs audit: - root README: both CLI listings only showed a subset of the command surface. Add the missing options verified against command-base.ts / run.ts / compare.ts: --driver (native/external/auto), --strategy, -C/--category, --timeout, --include-unsupported, --force-baseline, plus the cptf index and cptf install commands - MIGRATION.md: add the 0.2.x -> 0.3.x chapter (deepLinkScheme now required, driver modes, monitoring -> collect, timeout system, unified metrics, behavior-change digest, upgrade steps) alongside the existing 0.1.x -> 0.2.x chapter; update the doc header and the docs index entry accordingly AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Signed-off-by: liu_wentao <liuwentao57@h-partners.com> Co-authored-by: opencode2 (unknown) <ai@local> | 30 days ago |
| chore(commitlint): consolidate body-english into the toolkit rules library - bump .quality-toolkit to 62bc6b7 (feat(commitlint): add bodyEnglish rule factory, react-native/quality-toolkit!1) - replace the inline body-english implementation with R.bodyEnglish() from the shared rules library; behavior stays the same (CJK is only allowed inside backticks or fenced code blocks) impact scope: commitlint config and toolkit submodule pointer; rule behavior identical test case: none required; existing test cases need no modification Signed-off-by: gyange <gaoyang36@huawei.com> | 1 month ago |
| chore: integrate quality-toolkit (standards + skills + tools) - add .quality-toolkit submodule (gitcode react-native/quality-toolkit @ caa2a02): 185-rule compliance harness, commitlint baseline, gitleaks, lint-staged, cspell wiring, 14 AI agents - .husky hooks (commit-msg commitlint / pre-commit gitleaks+lint-staged / pre-push harness); postinstall sets core.hooksPath + commit template - package.json: preinstall pnpm version gate (plain Node), harness suite, commitlint, agents:gen; devDependencies declared for CI/dev machines - commitlint.config.js extends the toolkit baseline; root lint-staged.config.js forwards to the toolkit config - .quality/harness.config.json phased adoption: 1392 historical Chinese comments + log literals + missing templates surface as WARN (exit 0); tighten per batch by removing advisoryChecks entries - .opencode/agent/: 14 agents generated from the toolkit skills - AGENTS.md: quality-toolkit section (commands, phased-debt policy) Impact: no runtime change to the framework; hooks/scripts only. Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[36%] Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago |
| feat: 完成性能压测的规格和能力,补充对应的测试用例 | 5 months ago |
| chore(build): align engines.pnpm with the pinned pnpm 11.21.0 Review feedback on the sibling unify MRs: the unify commit raised engines.pnpm only to >=10.0.0 while pinning packageManager to pnpm@11.21.0, so a non-Corepack pnpm 10.x passed the engines check although the repos are unified on 11.21.0. - engines.pnpm: >=10.0.0 -> >=11.21.0; pnpm fails the install itself when engines.pnpm is not satisfied, so the floor now matches the pin - .quality-toolkit -> 33e6bbf: the preinstall version gate enforces the packageManager pin (single source of truth) instead of the hardcoded v10+ floor; self-managed pnpm switches are detected via npm_config_user_agent and pass (toolkit change tracked in react-native/quality-toolkit!1) - preinstall: warn when the .quality-toolkit checkout differs from the recorded pointer, so a stale vendored gate no longer loads silently; no auto-sync on purpose - resetting a checkout that intentionally sits ahead of the pointer would break toolkit development - postinstall hook setup (_setup:hooks): guarded node one-liner; when git or the repository is unavailable the setup degrades to a warning instead of failing the install; commit.template is only set when the vendored template file exists, so an uninitialized submodule cannot break git commit with a fatal template-read error Verified in a sandbox: pnpm 10.x self-switches to the pinned 11.21.0 and the gate sees the effective version; a below-floor version fails fast with fix instructions; the fresh-clone self-heal still initializes the submodule and loads the gate. Build-toolchain declaration only; no framework or test-code impact. Signed-off-by: gyange <gaoyang36@huawei.com> | 1 month ago |
| chore(build): 统一 pnpm 至 11.21.0 并适配 v11 行为变化 - packageManager pnpm@8.15.0 → 11.21.0;engines.pnpm >=8 → >=10 - preinstall 自愈式初始化 .quality-toolkit:仅 git submodule status 显示未初始化(前缀 -)时 update --init;git 不可用降级 warn, fresh clone 不再因门禁脚本缺失中断 - pnpm-workspace 增加 onlyBuiltDependencies: [ffmpeg-static] (pnpm v10+ 默认拦截依赖构建脚本,全依赖图仅此一个需执行) - devDependencies 增加 prettier@2.8.8(lint-staged 门禁依赖) - framework eslint 下界 ^8.56.0 → ^8.57.0(对齐 @typescript-eslint 8.x peer 区间) - 修复 lowest-direct 解析引入 TS 5.3.3 暴露的 4 处类型问题: let+try/catch 闭包收窄丢失改 const+.catch/守卫快照 (resolvedConfig/harmonyConfig/nodesDir),隐式 any 补显式标注(s) impact scope: 构建工具链与类型修复;异常路径运行时行为等价 ((error as Error) 断言改为回调参数类型标注,日志措辞不变) Signed-off-by: gyange <gaoyang36@huawei.com> | 1 month ago |