| 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> | 1 month 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 |
| chore(npm): sync source and docs to the published @liu_wentao/cptf-* names Align the trunk with the npm reality: the six packages are published as @liu_wentao/cptf-framework, cptf-schema, cptf-benchmark, cptf-benchmark-rn, cptf-native-harmony and cptf-plugin-rn (0.2.0). The bare @cptf/* names cannot exist on npm — the "cptf" org/scope is taken — so keeping them in source meant every publish required a sed-rename branch and source/registry drift. - package.json name/dependencies, source imports, root script filters, READMEs, BUILD docs, spec/guide docs and the architecture svgs that reference the real packages now use the published names - version fields move 0.1.0 -> 0.2.0, matching the registry version line - nativeharmony oh-package name/version follow - intentionally unchanged: CHANGELOG history lines (they record the @cptf names as they were at the time) and the detox analysis docs + design-phase svgs whose @cptf/* names are unimplemented placeholders, not references to real packages - CHANGELOG gains the rename-sync entry under today's date With this, the publish branch needs no renaming step: source and published artifacts are name-identical (zero diff). test case: pnpm install resolves the renamed graph; schema build + framework build + typecheck clean; jest excluding the four upstream-known-broken suites — 271 suites / 6829 passed (one transient worker-leak flake on first run, green on rerun); zero @cptf/* six-package references remain outside CHANGELOG history and the detox placeholder docs 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> | 1 month ago |
| fix(build): force replace install and target first device for UDID - installToDevice now passes -r to hdc/adb installs so replacement is explicit instead of relying on hdc version behavior for existing bundles - resolve the install path (signed to unsigned fallback) before building cmdArgs; the spawn previously kept the stale signed path when the fallback fired, failing installs despite a valid unsigned artifact - setup-signing getDeviceUdid resolves the first hdc target when no device flag is given; bare hdc shell fails whenever multiple devices are attached, which deadlocked signing on fresh checkouts Surfaced and verified on the rnoh_test three-device deploy chain: bare install only replaced existing bundles because the local hdc version tolerates it, and multi-device hosts deadlocked signing on fresh checkouts. test case: packages/framework/src/__tests__/system/app-installer.test.ts Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[24%] Co-authored-by: opencode (unknown) <ai@local> | 1 month ago |
| chore(npm): sync source and docs to the published @liu_wentao/cptf-* names Align the trunk with the npm reality: the six packages are published as @liu_wentao/cptf-framework, cptf-schema, cptf-benchmark, cptf-benchmark-rn, cptf-native-harmony and cptf-plugin-rn (0.2.0). The bare @cptf/* names cannot exist on npm — the "cptf" org/scope is taken — so keeping them in source meant every publish required a sed-rename branch and source/registry drift. - package.json name/dependencies, source imports, root script filters, READMEs, BUILD docs, spec/guide docs and the architecture svgs that reference the real packages now use the published names - version fields move 0.1.0 -> 0.2.0, matching the registry version line - nativeharmony oh-package name/version follow - intentionally unchanged: CHANGELOG history lines (they record the @cptf names as they were at the time) and the detox analysis docs + design-phase svgs whose @cptf/* names are unimplemented placeholders, not references to real packages - CHANGELOG gains the rename-sync entry under today's date With this, the publish branch needs no renaming step: source and published artifacts are name-identical (zero diff). test case: pnpm install resolves the renamed graph; schema build + framework build + typecheck clean; jest excluding the four upstream-known-broken suites — 271 suites / 6829 passed (one transient worker-leak flake on first run, green on rerun); zero @cptf/* six-package references remain outside CHANGELOG history and the detox placeholder docs 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> | 1 month ago |
| chore(npm): fix package metadata and unify pack scripts on pnpm Prepare the six packages for npm publishing with a metadata pass that applies regardless of the final scope name: - repository.url: every package pointed at the dead atomgit.com/react-native/CPTF URL; switch to gitcode.com/CPF-RN/CPTF with per-package directory fields so npmjs pages link back to the right monorepo subtree - description + keywords for all six packages (registry search discoverability) - add the missing LICENSE (root MIT file) and minimal READMEs for schema / native-harmony / plugin-rn — their files whitelist already declared both, and the npmjs pages would have rendered empty - pack scripts: unify on pnpm pack. npm CLI does not resolve workspace: protocols and would pack a literal workspace:* into the tarball manifest — that breaks consumers with EUNSUPPORTEDPROTOCOL (hit during the first publish attempt of the fork-side packages) - .gitignore: exclude packages/framework/tests/.cptf/ — a device statusbar cache (contains device serials) that a local full test run writes and that must never leak into a commit The package names themselves stay @cptf/* on this branch; the npm-side scope decision is tracked separately. test case: for each package.json — repository/description/keywords present and valid, pack script contains no npm pack; cspell over the new READMEs reports 0 issues with the project dictionary 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> | 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 |
| 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> | 1 month 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(npm): sync source and docs to the published @liu_wentao/cptf-* names Align the trunk with the npm reality: the six packages are published as @liu_wentao/cptf-framework, cptf-schema, cptf-benchmark, cptf-benchmark-rn, cptf-native-harmony and cptf-plugin-rn (0.2.0). The bare @cptf/* names cannot exist on npm — the "cptf" org/scope is taken — so keeping them in source meant every publish required a sed-rename branch and source/registry drift. - package.json name/dependencies, source imports, root script filters, READMEs, BUILD docs, spec/guide docs and the architecture svgs that reference the real packages now use the published names - version fields move 0.1.0 -> 0.2.0, matching the registry version line - nativeharmony oh-package name/version follow - intentionally unchanged: CHANGELOG history lines (they record the @cptf names as they were at the time) and the detox analysis docs + design-phase svgs whose @cptf/* names are unimplemented placeholders, not references to real packages - CHANGELOG gains the rename-sync entry under today's date With this, the publish branch needs no renaming step: source and published artifacts are name-identical (zero diff). test case: pnpm install resolves the renamed graph; schema build + framework build + typecheck clean; jest excluding the four upstream-known-broken suites — 271 suites / 6829 passed (one transient worker-leak flake on first run, green on rerun); zero @cptf/* six-package references remain outside CHANGELOG history and the detox placeholder docs 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> | 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 |