| feat: 大类重构,文件操作全部改为异步 Signed-off-by: gyange <gyange@163.com> | 4 months ago |
| chore(hooks): forward hook args to the push-guard The pre-push hook invoked the toolkit push-guard without "$@", so validatePushFlow never saw the remote name and the MR-only origin-push rule stayed inert - the same one-line update quality-toolkit MR !13 asked consumers to apply. Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[0%] Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (unknown) <ai@local> | 21 days 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> | 27 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 |
| add totalInstructions and bgMemoryAvg Signed-off-by: changlp <chang_leipeng@hoperun.com> | 8 days ago |
| chore(tooling): bump quality-toolkit to MR-only guard and keyword boundaries Advances .quality-toolkit from 40bb57c to 7ed5edd (upstream main): - MR !13: push-guard validatePushFlow (no direct origin pushes, no protected-branch pushes) - makes the hook-args fix in this MR live - !14: commitlint keyword word-boundary matching, submit gitRun (array argv, 30-minute streaming push budget), https provider inference - !15: format-cpp PR-equivalent changed-file base The bumped pin is the canonical upstream main HEAD (verified reachable via ls-remote); the AI review flagged the gitlink advance as a possible unpushed-SHA hazard, confirmed a false positive. test case: .quality-toolkit tools/harness/test/run-tests.js (89 cases green at the bumped pin) Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (unknown) <ai@local> | 21 days ago |
| chore(release): unify all six packages on version 0.1.0 Reset the package version line to a unified 0.1.0 as the npm-first release baseline: @cptf/framework 0.3.1 -> 0.1.0 and @cptf/native-harmony 0.2.0 -> 0.1.0 (the other four packages already sit on 0.1.0). The 0.2.x/0.3.x numbers were development-phase labels that exist only in git history and the CHANGELOG record; from 0.1.0 onward all six packages release on one shared version line (workspace deps are pinned to exact versions at pack time, so a unified line avoids mixed-version installs). - CAPABILITY-SPEC doc header follows the package version (0.3.1 -> 0.1.0) and its development-phase notes are relabeled as historical - CHANGELOG gains the version-line-reset entry merged into today's existing 2026-10-14 header (F5.1: one header per date) - root .cspell.json picks up the CAPABILITY-SPEC vocabulary (cpufreq, jsheap, smaps, ...) that was never in scope before this doc edit test case: verify.ts — F5.1 and markdown link checks pass; cspell over the touched files reports 0 issues; package.json diffs are exactly the two version fields AI[14%] Human Fixed[0%] Human[86%] AI Adopted[100%] Signed-off-by: liu_wentao <liuwentao57@h-partners.com> | 27 days 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> | 26 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> | 3 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> | 27 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 |
| fix(harmony): stop hopeless uitest daemon restarts in capability probe The probe killed a hung uitest daemon and then tried to revive it with guessed tokens ('singleness' and empty). The real token is signature-derived (com.beike.hongmeng@<uid>@<sig>@1) and only the instrumentation that spawned the daemon knows it, so the restart could never succeed. The kill pipe also depended on device-side awk, which is absent on some devices, failing silently. Hung-daemon recovery is preserved but rerouted: a working daemon (TCP:8012 or unix socket up) is never touched; a hung daemon (process alive, both channels dead) is cleaned with sed-based pid parsing guarded by a numeric-pid filter, so the native driver's aa test launch can spawn a fresh daemon with the correct token; no start-daemon attempt is ever made from the host. The uitestTcpUnsupported config short-circuit from !60 is kept. test case: packages/framework/src/__tests__/system/harmony-device-prober.test.ts (hung-daemon cleanup via quoted sed with numeric guard, working daemon untouched, config short-circuit, no host-side start-daemon) Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (unknown) <ai@local> | 25 days ago |