@buaa_smat/hometrans 26.0.3 → 26.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agents/code-reviewer.md +91 -21
- package/env-requirements.json +1 -1
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/package.json +3 -6
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
// Review fixes for !191 (uni-app / hybrid route jump):
|
|
2
|
+
// - state_phase_fallback defaults on only for a uni-app / hybrid app
|
|
3
|
+
// - plan and audit agree on which edges leave the denominator (native denominator:false nodes keep theirs)
|
|
4
|
+
// - hybrid_route_cdp.mjs: pending sends fail on close/error, every send/fetch is bounded,
|
|
5
|
+
// a closed connection during reLaunch counts as dispatched, adb errors are reported as such
|
|
6
|
+
// - runRoute: only deterministic causes take the route down; transient ones are retried; a
|
|
7
|
+
// short-circuited task emits no task_started and spends no attempt
|
|
8
|
+
import { test, describe } from 'node:test';
|
|
9
|
+
import assert from 'node:assert/strict';
|
|
10
|
+
import * as http from 'node:http';
|
|
11
|
+
import * as crypto from 'node:crypto';
|
|
12
|
+
import * as path from 'node:path';
|
|
13
|
+
import { spawnSync } from 'node:child_process';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
import { compilePlan } from '../plan.mjs';
|
|
16
|
+
import { audit } from '../audit.mjs';
|
|
17
|
+
import { isHybridApp, statePhaseFallbackEnabled, fallbackScope } from '../utg_explorer/state_phase.mjs';
|
|
18
|
+
import { isNonNavigable } from '../utg_explorer/hybrid_route.mjs';
|
|
19
|
+
import { firstRoundPhases } from '../run_cycle.mjs';
|
|
20
|
+
import { Runner, routeErrorCode } from '../utg_explorer/task_runner.mjs';
|
|
21
|
+
import { AdapterError } from '../utg_explorer/adapters.mjs';
|
|
22
|
+
import { connect, listTargets, navigate, makeDeadline } from '../hybrid_route_cdp.mjs';
|
|
23
|
+
|
|
24
|
+
const HELPER = path.join(path.dirname(path.dirname(fileURLToPath(import.meta.url))), 'hybrid_route_cdp.mjs');
|
|
25
|
+
const APP = '__UNI__T';
|
|
26
|
+
const page = (route, extra = {}) => ({ id: `hybrid-page:${APP}/${route}`, kind: 'hybrid-page', route, appid: APP, ...extra });
|
|
27
|
+
|
|
28
|
+
// ------------------------------------------------------------------ #1 state phase fallback
|
|
29
|
+
|
|
30
|
+
describe('state_phase_fallback default', () => {
|
|
31
|
+
const uni = { nodes: [page('pages/index/index', { entry: true, is_launcher: true }), page('pages/mine/mine')] };
|
|
32
|
+
const bundled = { nodes: [{ id: 'activity:Host', kind: 'host-activity', denominator: false }, page('pages/a/a')] };
|
|
33
|
+
const native = { nodes: [{ id: 'activity:Main', kind: 'activity', is_launcher: true }, { id: 'activity:Detail', kind: 'activity' }] };
|
|
34
|
+
const mixed = { nodes: [{ id: 'activity:Main', kind: 'activity', is_launcher: true }, page('pages/a/a')] };
|
|
35
|
+
const phase = { id: 'state-login', requires: ['login'] };
|
|
36
|
+
|
|
37
|
+
test('on for a uni-app / pre-bundled hybrid app, off for native and native+embedded hybrid', () => {
|
|
38
|
+
assert.equal(isHybridApp(uni), true);
|
|
39
|
+
assert.equal(isHybridApp(bundled), true);
|
|
40
|
+
assert.equal(isHybridApp(native), false);
|
|
41
|
+
assert.equal(isHybridApp(mixed), false);
|
|
42
|
+
assert.equal(statePhaseFallbackEnabled({}, uni), true);
|
|
43
|
+
assert.equal(statePhaseFallbackEnabled({}, native), false);
|
|
44
|
+
assert.equal(statePhaseFallbackEnabled({}), false);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('an explicit flag overrides the default both ways', () => {
|
|
48
|
+
assert.equal(statePhaseFallbackEnabled({ state_phase_fallback: true }, native), true);
|
|
49
|
+
assert.equal(statePhaseFallbackEnabled({ state_phase_fallback: false }, uni), false);
|
|
50
|
+
assert.match(fallbackScope({ state_phase_fallback: true }, phase, undefined, native), /best-effort/);
|
|
51
|
+
assert.equal(fallbackScope({}, phase, undefined, native), null);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// ------------------------------------------------------------------ #2 plan / audit agreement
|
|
56
|
+
|
|
57
|
+
describe('plan and audit agree on edge obligations', () => {
|
|
58
|
+
const nodes = [
|
|
59
|
+
{ id: 'activity:MainActivity', kind: 'host-activity', denominator: false, page_like: false, is_launcher: true },
|
|
60
|
+
{ id: 'activity:Detail', kind: 'activity' },
|
|
61
|
+
{ id: 'fragment:HomeFrag', kind: 'fragment', role: 'embedded', denominator: false },
|
|
62
|
+
{ id: 'activity:Dialog', kind: 'activity', denominator: false },
|
|
63
|
+
{ id: 'hybrid:UniApp', kind: 'hybrid', denominator: false },
|
|
64
|
+
page('pages/components/widget/widget', { denominator: false, non_navigable: true, out_of_scope: 'component-entry' }),
|
|
65
|
+
page('pages/index/index'),
|
|
66
|
+
];
|
|
67
|
+
const links = [
|
|
68
|
+
{ id: 'e1', source: 'activity:MainActivity', target: 'activity:Detail' },
|
|
69
|
+
{ id: 'e2', source: 'fragment:HomeFrag', target: 'activity:Detail' },
|
|
70
|
+
{ id: 'e3', source: 'activity:Detail', target: 'activity:Dialog' },
|
|
71
|
+
{ id: 'e4', source: 'activity:Detail', target: 'hybrid:UniApp' },
|
|
72
|
+
{ id: 'e5', source: page('pages/index/index').id, target: page('pages/components/widget/widget').id },
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
test('host-activity / embedded-fragment / dialog / hybrid-boundary edges keep their obligations', () => {
|
|
76
|
+
const ids = compilePlan({ nodes, links }).flatMap((p) => p.obligations.map((o) => `${o.type}:${o.id}`));
|
|
77
|
+
for (const e of ['edge:e1', 'edge:e2', 'edge:e3', 'edge:e4']) { assert.ok(ids.includes(e), e); }
|
|
78
|
+
assert.ok(ids.includes('node:activity:MainActivity'));
|
|
79
|
+
assert.ok(ids.includes('node:fragment:HomeFrag'));
|
|
80
|
+
assert.ok(!ids.includes('edge:e5'), 'an edge into a non-navigable component has no obligation');
|
|
81
|
+
assert.ok(!ids.includes(`node:${page('pages/components/widget/widget').id}`));
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('audit takes out of the denominator exactly the edges plan drops', () => {
|
|
85
|
+
const planned = new Set(compilePlan({ nodes, links }).flatMap((p) => p.obligations).filter((o) => o.type === 'edge').map((o) => o.id));
|
|
86
|
+
const r = audit({ nodes, edges: links, events: [], tasks: [], phases: [] });
|
|
87
|
+
assert.equal(r.static_edges, planned.size);
|
|
88
|
+
assert.equal(isNonNavigable(nodes[0]), false);
|
|
89
|
+
assert.equal(isNonNavigable(nodes[5]), true);
|
|
90
|
+
// the static verdict wins over the folder fallback
|
|
91
|
+
assert.equal(isNonNavigable(page('modules/order/pages/components/x', { non_navigable: false })), false);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('an older graph (no non_navigable) with a component route: no obligation and not missing', () => {
|
|
95
|
+
const legacy = page('pages/components/legacy/legacy'); // pre-!191 static graph: no marker, in the denominator
|
|
96
|
+
const ns = [page('pages/index/index'), legacy];
|
|
97
|
+
assert.equal(isNonNavigable(legacy), true);
|
|
98
|
+
const ids = compilePlan({ nodes: ns, links: [] }).flatMap((p) => p.obligations.map((o) => o.id));
|
|
99
|
+
assert.ok(!ids.includes(legacy.id));
|
|
100
|
+
const r = audit({ nodes: ns, edges: [], events: [], tasks: [], phases: [] });
|
|
101
|
+
assert.deepEqual(r.missing_nodes.map((m) => m.id), [page('pages/index/index').id]);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// ------------------------------------------------------------------ #3 CDP helper
|
|
106
|
+
|
|
107
|
+
/** A minimal ws server; `onFrame(sock)` decides what happens to the first client frame. */
|
|
108
|
+
function wsServer(onFrame) {
|
|
109
|
+
return new Promise((resolve) => {
|
|
110
|
+
const srv = http.createServer();
|
|
111
|
+
const socks = new Set();
|
|
112
|
+
srv.on('upgrade', (req, sock) => {
|
|
113
|
+
socks.add(sock);
|
|
114
|
+
const key = crypto.createHash('sha1').update(req.headers['sec-websocket-key'] + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11').digest('base64');
|
|
115
|
+
sock.write('HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ' + key + '\r\n\r\n');
|
|
116
|
+
sock.once('data', () => onFrame(sock));
|
|
117
|
+
sock.on('error', () => {});
|
|
118
|
+
});
|
|
119
|
+
srv.listen(0, '127.0.0.1', () => resolve({
|
|
120
|
+
url: `ws://127.0.0.1:${srv.address().port}/`,
|
|
121
|
+
port: srv.address().port,
|
|
122
|
+
close: () => { for (const s of socks) { s.destroy(); } srv.close(); },
|
|
123
|
+
}));
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
describe('hybrid_route_cdp CDP connection', () => {
|
|
128
|
+
test('a socket closed while a send is pending rejects it (closed) instead of hanging', async () => {
|
|
129
|
+
const s = await wsServer((sock) => sock.end(Buffer.from([0x88, 0x00])));
|
|
130
|
+
try {
|
|
131
|
+
const c = await connect(s.url, { timeoutMs: 2000 });
|
|
132
|
+
const t0 = Date.now();
|
|
133
|
+
await assert.rejects(c.send('Runtime.evaluate', {}, 5000), (e) => e.closed === true && e.code === 'cdp-transient');
|
|
134
|
+
assert.ok(Date.now() - t0 < 2000);
|
|
135
|
+
} finally { s.close(); }
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test('reLaunch: a connection closed while the evaluate waits counts as dispatched', async () => {
|
|
139
|
+
const s = await wsServer((sock) => sock.end(Buffer.from([0x88, 0x00])));
|
|
140
|
+
try {
|
|
141
|
+
const c = await connect(s.url, { timeoutMs: 2000 });
|
|
142
|
+
const nav = await navigate(c, '/pages/a/a', 5000);
|
|
143
|
+
assert.equal(nav.ok, true);
|
|
144
|
+
assert.equal(nav.api, 'reLaunch');
|
|
145
|
+
assert.match(nav.dispatched, /connection closed/);
|
|
146
|
+
} finally { s.close(); }
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
test('a send with no reply times out', async () => {
|
|
150
|
+
const s = await wsServer(() => { /* never answers */ });
|
|
151
|
+
try {
|
|
152
|
+
const c = await connect(s.url, { timeoutMs: 2000 });
|
|
153
|
+
const t0 = Date.now();
|
|
154
|
+
await assert.rejects(c.send('Runtime.enable', {}, 200), (e) => e.code === 'cdp-transient' && /timed out/.test(e.message) && !e.closed);
|
|
155
|
+
assert.ok(Date.now() - t0 < 1500);
|
|
156
|
+
// a reLaunch timeout is not "dispatched": it fails
|
|
157
|
+
await assert.rejects(navigate(c, '/pages/a/a', 200), /timed out/);
|
|
158
|
+
c.close();
|
|
159
|
+
} finally { s.close(); }
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test('listTargets is bounded when the devtools HTTP endpoint never answers', async () => {
|
|
163
|
+
const srv = http.createServer(() => { /* hang */ });
|
|
164
|
+
await new Promise((r) => srv.listen(0, '127.0.0.1', r));
|
|
165
|
+
try {
|
|
166
|
+
const t0 = Date.now();
|
|
167
|
+
await assert.rejects(listTargets(srv.address().port, 300), (e) => e.code === 'cdp-transient');
|
|
168
|
+
assert.ok(Date.now() - t0 < 2000);
|
|
169
|
+
} finally { srv.closeAllConnections(); srv.close(); }
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test('the overall deadline refuses a step once it has run out', async () => {
|
|
173
|
+
const dl = makeDeadline(50);
|
|
174
|
+
assert.ok(dl.step(10000) <= 50);
|
|
175
|
+
await new Promise((r) => setTimeout(r, 80));
|
|
176
|
+
assert.throws(() => dl.step(10000, 'x'), (e) => e.code === 'deadline');
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test('an adb that cannot run is reported as adb-error with its own message, not as a missing socket', () => {
|
|
180
|
+
const t0 = Date.now();
|
|
181
|
+
const p = spawnSync(process.execPath, [HELPER, '--serial', 'S', '--url', '/pages/a/a',
|
|
182
|
+
'--adb', path.join(path.dirname(HELPER), 'no-such-adb-binary'), '--timeout-ms', '5000'], { encoding: 'utf8', timeout: 20000 });
|
|
183
|
+
assert.equal(p.status, 0, p.stderr);
|
|
184
|
+
const res = JSON.parse(p.stdout.trim().split(/\r?\n/).pop());
|
|
185
|
+
assert.equal(res.ok, false);
|
|
186
|
+
assert.equal(res.code, 'adb-error');
|
|
187
|
+
assert.match(res.error, /ENOENT|not found|cannot find/i);
|
|
188
|
+
assert.doesNotMatch(res.error, /webview_devtools/);
|
|
189
|
+
assert.ok(Date.now() - t0 < 10000);
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// ------------------------------------------------------------------ #6 runRoute
|
|
194
|
+
|
|
195
|
+
/** A Runner driving run() with stubbed device steps; `seekErr(task_id, n)` returns an error message or null. */
|
|
196
|
+
function routeRunner(tasks, seekErr, config = {}) {
|
|
197
|
+
const r = Object.create(Runner.prototype);
|
|
198
|
+
r.args = { budget: 1000, max_tasks: 100 };
|
|
199
|
+
r.config = { package: 'com.uni', launch_component: 'com.uni/.Main', ...config };
|
|
200
|
+
r.phase = { id: 'p0-routes', requires: [], obligations: [], status: 'pending' };
|
|
201
|
+
r.env = 'default';
|
|
202
|
+
r.doc = { tasks, events: [], phases: [r.phase], nodes: [] };
|
|
203
|
+
r.coverage = 'edges'; r.covered = new Set(); r.swept = new Set(); r.used = 0;
|
|
204
|
+
r.current = { observation_id: 'o0', package: 'com.uni', nodes: [] };
|
|
205
|
+
r.emit = (kind, payload) => { const e = { id: String(r.doc.events.length), kind, payload }; r.doc.events.push(e); return e; };
|
|
206
|
+
r.save = () => {};
|
|
207
|
+
r.capture = () => r.current;
|
|
208
|
+
r.awaitContent = () => {};
|
|
209
|
+
r.prepareEnvironment = () => {};
|
|
210
|
+
r._runFixtures = () => true;
|
|
211
|
+
r.sweepBacklog = () => {};
|
|
212
|
+
r.runDiscovery = () => ({ outcome: 'disabled' });
|
|
213
|
+
r.scopeExcludes = () => false;
|
|
214
|
+
r.atom = () => {};
|
|
215
|
+
r.sweep = () => {};
|
|
216
|
+
r.waitDevice = () => true;
|
|
217
|
+
const calls = new Map();
|
|
218
|
+
r.seek = (action, ident) => {
|
|
219
|
+
const n = (calls.get(ident) ?? 0) + 1; calls.set(ident, n);
|
|
220
|
+
const msg = seekErr(ident, n);
|
|
221
|
+
if (msg) { throw new AdapterError(msg); }
|
|
222
|
+
};
|
|
223
|
+
r.at = () => true;
|
|
224
|
+
return { r, calls };
|
|
225
|
+
}
|
|
226
|
+
const rtask = (id) => ({ task_id: id, phase: 'p0-routes', purpose: 'route-launch', status: 'compiled',
|
|
227
|
+
target_static: `hybrid-page:${APP}/pages/${id}/${id}`, action: { type: 'route', url: `/pages/${id}/${id}` } });
|
|
228
|
+
const kinds = (r, kind, id) => r.doc.events.filter((e) => e.kind === kind && (id === undefined || e.payload.task_id === id));
|
|
229
|
+
|
|
230
|
+
describe('runRoute failure classes', () => {
|
|
231
|
+
test('routeErrorCode reads the helper code', () => {
|
|
232
|
+
assert.equal(routeErrorCode('hybrid-route[no-devtools-socket]: no webview_devtools socket'), 'no-devtools-socket');
|
|
233
|
+
assert.equal(routeErrorCode('hybrid-route: something'), null);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test('a transient CDP failure is retried, not taken as route down', () => {
|
|
237
|
+
const { r, calls } = routeRunner([rtask('a'), rtask('b')],
|
|
238
|
+
(id, n) => (id === 'a' && n === 1 ? 'hybrid-route[cdp-transient]: CDP connect timeout' : null));
|
|
239
|
+
r.run();
|
|
240
|
+
assert.equal(calls.get('a'), 2, 'task a retried once');
|
|
241
|
+
assert.equal(r._hybridRouteDown, undefined);
|
|
242
|
+
assert.equal(kinds(r, 'hybrid_route_unavailable').length, 0);
|
|
243
|
+
assert.deepEqual(kinds(r, 'task_result').filter((e) => e.payload.outcome === 'confirmed').map((e) => e.payload.task_id).sort(), ['a', 'b']);
|
|
244
|
+
assert.equal(kinds(r, 'task_result', 'a')[0].payload.retrying, true);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
test('"uni.reLaunch not found" because a target could not be asked is transient', () => {
|
|
248
|
+
const { r } = routeRunner([rtask('a'), rtask('b')], (id, n) => (n === 1
|
|
249
|
+
? 'hybrid-route[cdp-transient]: uni.reLaunch not found in the reachable CDP targets; a target could not be asked: CDP websocket error' : null));
|
|
250
|
+
r.run();
|
|
251
|
+
assert.equal(r._hybridRouteDown, undefined);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
test('a deterministic cause takes the route down; later tasks spend no attempt and emit no task_started', () => {
|
|
255
|
+
const { r, calls } = routeRunner([rtask('a'), rtask('b'), rtask('c')],
|
|
256
|
+
() => 'hybrid-route[no-devtools-socket]: no webview_devtools socket (is the app debuggable?)');
|
|
257
|
+
r.run();
|
|
258
|
+
assert.match(r._hybridRouteDown, /no-devtools-socket/);
|
|
259
|
+
assert.equal(calls.get('a'), 1);
|
|
260
|
+
assert.equal(calls.has('b'), false);
|
|
261
|
+
assert.deepEqual(kinds(r, 'task_started').map((e) => e.payload.task_id), ['a']);
|
|
262
|
+
const b = kinds(r, 'task_result', 'b');
|
|
263
|
+
assert.equal(b.length, 1);
|
|
264
|
+
assert.equal(b[0].payload.outcome, 'unsupported');
|
|
265
|
+
assert.match(b[0].payload.reason, /unavailable earlier in this phase/);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
test('uni absent in every answering target also takes the route down', () => {
|
|
269
|
+
const { r } = routeRunner([rtask('a'), rtask('b')],
|
|
270
|
+
() => 'hybrid-route[uni-absent]: uni.reLaunch not found in any CDP target (page or app-service)');
|
|
271
|
+
r.run();
|
|
272
|
+
assert.ok(r._hybridRouteDown);
|
|
273
|
+
assert.deepEqual(kinds(r, 'task_started').map((e) => e.payload.task_id), ['a']);
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
test('capture disabled: no route task is started', () => {
|
|
277
|
+
const { r, calls } = routeRunner([rtask('a')], () => null, { hybrid_route_capture: false });
|
|
278
|
+
r.run();
|
|
279
|
+
assert.equal(kinds(r, 'task_started').length, 0);
|
|
280
|
+
assert.equal(calls.size, 0);
|
|
281
|
+
assert.equal(kinds(r, 'task_result', 'a')[0].payload.outcome, 'unsupported');
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
test('first round: uni-app includes the probe-less state phase, native leaves it to D', () => {
|
|
285
|
+
const phases = [{ id: 'p0-fresh', requires: [] }, { id: 'state-login', requires: ['login'] }];
|
|
286
|
+
const tasks = [{ phase: 'state-login', status: 'compiled' }];
|
|
287
|
+
const uni = { phases, tasks, nodes: [page('pages/index/index', { entry: true })] };
|
|
288
|
+
const native = { phases, tasks, nodes: [{ id: 'activity:Main', kind: 'activity', is_launcher: true }] };
|
|
289
|
+
assert.deepEqual(firstRoundPhases({ fixtures: { 'p0-fresh': [] } }, uni), ['p0-fresh', 'state-login']);
|
|
290
|
+
assert.deepEqual(firstRoundPhases({ fixtures: { 'p0-fresh': [] } }, native), ['p0-fresh']);
|
|
291
|
+
});
|
|
292
|
+
});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// Class-D recipes tap only texts the device or the page's source shows; a recipe stopped on a
|
|
2
|
+
// missing control is offered back once with what its screen showed.
|
|
3
|
+
// Measured (coolmall 2026-11-18): the login recipe tapped 「请输入手机号码」; the AccountLogin field
|
|
4
|
+
// reads 「请输入手机号」 (captured, and in the page's source texts). The phase blocked on that step and
|
|
5
|
+
// all 25 logged-in pages stayed uncaptured.
|
|
6
|
+
import { test, describe, beforeEach } from 'node:test';
|
|
7
|
+
import assert from 'node:assert/strict';
|
|
8
|
+
import * as fs from 'node:fs';
|
|
9
|
+
import * as os from 'node:os';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import * as rd from '../recover_d.mjs';
|
|
12
|
+
|
|
13
|
+
const tmp = () => fs.mkdtempSync(path.join(os.tmpdir(), 'tmp'));
|
|
14
|
+
|
|
15
|
+
describe('Grounding', () => {
|
|
16
|
+
let root; let snap; let cfg; let doc; let login;
|
|
17
|
+
const obs = (id, texts) => ({ kind: 'observation', payload: { observation_id: id,
|
|
18
|
+
nodes: texts.map((t) => ({ text: t, visible: true })) } });
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
root = tmp();
|
|
21
|
+
snap = path.join(root, 'snap'); fs.mkdirSync(snap);
|
|
22
|
+
fs.writeFileSync(path.join(snap, 'fresh.replay.json'), JSON.stringify({ steps: [] }));
|
|
23
|
+
cfg = { snapshot_dir: snap, launch_component: 'p/.Main' };
|
|
24
|
+
doc = { phases: [], tasks: [{ task_id: 'edge-1', status: 'compiled', phase: 'p0-fresh', target_static: 'compose-route:Profile' }],
|
|
25
|
+
page_catalog: { 'compose-route:AccountLogin': { source_texts: ['请输入手机号', '请输入密码', '你好, 欢迎登录青商城', '登录'] } },
|
|
26
|
+
events: [obs('o1', ['我的', '点击登录账号']), obs('o2', ['账号密码登录', '验证码登录', '你好,\n欢迎登录青商城']),
|
|
27
|
+
{ kind: 'mapping', payload: { observation_id: 'o2', static_id: 'compose-route:Login' } }] };
|
|
28
|
+
login = { id: 'p-1-login', base: 'fresh.replay.json', tasks: ['edge-1'], probes: [{ all: [{ text: '我的' }] }],
|
|
29
|
+
steps: [{ type: 'click', selector: { text: '我的' } }, { type: 'click', selector: { text: '点击登录账号' } },
|
|
30
|
+
{ type: 'click', selector: { text: '账号密码登录' } }, { type: 'click', selector: { text: '请输入手机号码' } },
|
|
31
|
+
{ type: 'type', text: '13500000000' }, { type: 'click', selector: { text: '登录' } }] };
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('a tap on a text no screen or source shows is rejected, naming the closest known text', () => {
|
|
35
|
+
const why = rd.validate(login, doc, cfg);
|
|
36
|
+
assert.match(why, /steps\[3\]: text '请输入手机号码' is not on any captured screen/);
|
|
37
|
+
assert.match(why, /closest known: '请输入手机号'/);
|
|
38
|
+
login.steps[3] = { type: 'click', selector: { text: '请输入手机号' } };
|
|
39
|
+
assert.equal(rd.validate(login, doc, cfg), null);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('device and source spellings both count, compared normalized', () => {
|
|
43
|
+
const r = { ...login, steps: [{ type: 'click', selector: { text: '你好, 欢迎登录青商城' } },
|
|
44
|
+
{ type: 'click', selector: { content_desc: '你好,\n欢迎登录青商城' } }] };
|
|
45
|
+
assert.equal(rd.validate(r, doc, cfg), null);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('texts the recipe brings itself are allowed: typed values and its new fixture files', () => {
|
|
49
|
+
cfg.fixture_server_dir = tmp();
|
|
50
|
+
const r = { ...login, steps: [{ type: 'click', selector: { text: '我的' } }, { type: 'type', text: 'Episode One' },
|
|
51
|
+
{ type: 'click', selector: { text: 'Episode One' } }, { type: 'click', selector: { text: 'Second Feed Item' } }],
|
|
52
|
+
fixture_files: [{ name: 'p-1-feed.xml', content: '<item><title>Second Feed Item</title></item>' }] };
|
|
53
|
+
assert.equal(rd.validate(r, doc, cfg), null);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('a text inside a file the fixture server already serves is allowed', () => {
|
|
57
|
+
cfg.fixture_server_dir = tmp();
|
|
58
|
+
fs.writeFileSync(path.join(cfg.fixture_server_dir, 'feed.xml'), '<item><title>Episode Never Captured</title></item>');
|
|
59
|
+
const r = { ...login, steps: [{ type: 'click', selector: { text: 'Episode Never Captured' } }] };
|
|
60
|
+
assert.equal(rd.validate(r, doc, cfg), null);
|
|
61
|
+
assert.match(rd.validate({ ...r, steps: [{ type: 'click', selector: { text: 'Episode Not Served' } }] }, doc, cfg),
|
|
62
|
+
/'Episode Not Served' is not on any captured screen/);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test('within scopes, probe_steps and task_steps are checked too', () => {
|
|
66
|
+
const base = { ...login, steps: [{ type: 'click', selector: { text: '我的' } }] };
|
|
67
|
+
assert.match(rd.validate({ ...base, steps: [{ type: 'click', selector: { text: '登录', within: { text: '登录区' } } }] }, doc, cfg), /'登录区'/);
|
|
68
|
+
assert.match(rd.validate({ ...base, probe_steps: [{ type: 'click', selector: { text: '去登录' } }] }, doc, cfg), /probe_steps\[0\]/);
|
|
69
|
+
assert.match(rd.validate({ ...base, task_steps: { 'edge-1': [{ type: 'click', selector: { text: '订单' } }] } }, doc, cfg), /edge-1\[0\]/);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('a campaign with no captures and no catalog checks nothing', () => {
|
|
73
|
+
assert.equal(rd.groundingProblem(login, new Set()), null);
|
|
74
|
+
assert.equal(rd.validate(login, { tasks: doc.tasks }, cfg), null);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('the worklist lists each page texts, device spelling first', () => {
|
|
78
|
+
const st = rd.screenTexts(doc);
|
|
79
|
+
assert.deepEqual(st.get('compose-route:Login'), ['账号密码登录', '验证码登录', '你好,\n欢迎登录青商城']);
|
|
80
|
+
assert.deepEqual(st.get('compose-route:AccountLogin'), ['请输入手机号', '请输入密码', '你好, 欢迎登录青商城', '登录']);
|
|
81
|
+
const wl = rd.extract(doc, root, cfg);
|
|
82
|
+
assert.deepEqual(wl.screen_texts['compose-route:Login'], st.get('compose-route:Login'));
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test('apply keeps the recipe with its phase', () => {
|
|
86
|
+
login.steps[3] = { type: 'click', selector: { text: '请输入手机号' } };
|
|
87
|
+
fs.writeFileSync(path.join(root, 'recovery_d_answers.json'), JSON.stringify([login]));
|
|
88
|
+
rd.apply(doc, cfg, root);
|
|
89
|
+
const ph = doc.phases.find((p) => p.id === 'recD-p-1-login');
|
|
90
|
+
assert.deepEqual(ph.recipe, { id: 'p-1-login', base: 'fresh.replay.json', steps: login.steps });
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
describe('StepRevision', () => {
|
|
95
|
+
let root; let snap; let cfg; let doc; let recipe;
|
|
96
|
+
const shown = ['你好,\n欢迎登录青商城', '+86', '请输入手机号', '请输入密码', '登录', '去注册'];
|
|
97
|
+
beforeEach(() => {
|
|
98
|
+
root = tmp();
|
|
99
|
+
snap = path.join(root, 'snap'); fs.mkdirSync(snap);
|
|
100
|
+
fs.writeFileSync(path.join(snap, 'fresh.replay.json'), JSON.stringify({ steps: [] }));
|
|
101
|
+
cfg = { snapshot_dir: snap, launch_component: 'p/.Main', fixtures: { 'recD-p-1-login': [{ type: 'wait', seconds: 1 }] },
|
|
102
|
+
phase_probes: { 'recD-p-1-login': [{ all: [{ text: '我的' }] }] } };
|
|
103
|
+
recipe = { id: 'p-1-login', base: 'fresh.replay.json',
|
|
104
|
+
steps: [{ type: 'click', selector: { text: '请输入手机号码' } }, { type: 'type', text: '13500000000' }] };
|
|
105
|
+
doc = { phases: [{ id: 'recD-p-1-login', status: 'blocked', recipe,
|
|
106
|
+
reason: 'fixture-step-failed: click_candidates [{"text": "请输入手机号码"}]: selector-not-found-after-bounded-scroll' },
|
|
107
|
+
{ id: 'recD-p-2-old', status: 'blocked', reason: 'fixture-step-failed: click_candidates []: x' }],
|
|
108
|
+
tasks: [{ task_id: 'edge-8@recD-p-1-login', phase: 'recD-p-1-login', status: 'compiled' }], events: [] };
|
|
109
|
+
fs.writeFileSync(path.join(root, 'events.jsonl'), JSON.stringify({ kind: 'fixture_step_failed',
|
|
110
|
+
payload: { phase: 'recD-p-1-login', step: 'click_candidates', selector: [{ text: '请输入手机号码' }],
|
|
111
|
+
observation_id: 'o7', activity: 'A', visible_texts: shown } }) + '\n');
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
test('a recipe stopped on a missing control is offered once with what its screen showed', () => {
|
|
115
|
+
const items = rd.stepFailures(doc, root);
|
|
116
|
+
// a phase registered without its recipe cannot be rebuilt, so it is not offered
|
|
117
|
+
assert.deepEqual(items.map((i) => i.key), ['sv-p-1-login']);
|
|
118
|
+
const [it] = items;
|
|
119
|
+
assert.equal(it.kind, 'step-revision');
|
|
120
|
+
assert.deepEqual(it.steps, recipe.steps);
|
|
121
|
+
assert.deepEqual(it.visible_texts, shown);
|
|
122
|
+
assert.ok(it.screenshot.endsWith(path.join('artifacts', 'o7', 'screen.png')));
|
|
123
|
+
assert.deepEqual(rd.revisablePhases(doc).map((p) => p.id), ['recD-p-1-login']);
|
|
124
|
+
doc.phases[0].steps_revised = true;
|
|
125
|
+
assert.deepEqual(rd.stepFailures(doc, root), []);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test('a failure in the base replay chain is not offered: revising the recipe steps cannot fix it', () => {
|
|
129
|
+
const ev = (part) => JSON.stringify({ kind: 'fixture_step_failed', payload: { phase: 'recD-p-1-login', part,
|
|
130
|
+
step: 'click_candidates', selector: [{ text: 'x' }], observation_id: 'o7', visible_texts: shown } }) + '\n';
|
|
131
|
+
fs.writeFileSync(path.join(root, 'events.jsonl'), ev('base'));
|
|
132
|
+
assert.deepEqual(rd.stepFailures(doc, root), []);
|
|
133
|
+
fs.writeFileSync(path.join(root, 'events.jsonl'), ev('steps'));
|
|
134
|
+
assert.equal(rd.stepFailures(doc, root)[0].failed_part, 'steps');
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
test('apply rebuilds the fixtures from the revised steps and re-arms only that phase', () => {
|
|
138
|
+
const it = rd.stepFailures(doc, root)[0];
|
|
139
|
+
fs.writeFileSync(path.join(root, 'recovery_d_worklist.json'), JSON.stringify({ items: [it] }));
|
|
140
|
+
const steps = [{ type: 'click', selector: { text: '请输入手机号' } }, { type: 'type', text: '13500000000' }];
|
|
141
|
+
fs.writeFileSync(path.join(root, 'recovery_d_answers.json'), JSON.stringify([{ key: it.key, verdict: 'revise', steps }]));
|
|
142
|
+
const [phases, report] = rd.apply(doc, cfg, root);
|
|
143
|
+
assert.deepEqual(phases, ['recD-p-1-login']);
|
|
144
|
+
assert.equal(report[0].status, 'revised');
|
|
145
|
+
const save = cfg.fixtures['recD-p-1-login'].find((a) => a.type === 'save_replay');
|
|
146
|
+
assert.deepEqual(save.steps, steps);
|
|
147
|
+
const fx = cfg.fixtures['recD-p-1-login'];
|
|
148
|
+
assert.deepEqual(fx.filter((a) => a.recipe_part).map((a) => a.recipe_part), ['steps', 'steps'], 'each recipe step says whose it is');
|
|
149
|
+
assert.deepEqual([doc.phases[0].status, doc.phases[0].steps_revised, doc.phases[0].reason], ['pending', true, undefined]);
|
|
150
|
+
assert.deepEqual(doc.phases[0].recipe.steps, steps);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test('a revision tapping a text its screen never showed is rejected and leaves the phase blocked', () => {
|
|
154
|
+
const it = rd.stepFailures(doc, root)[0];
|
|
155
|
+
fs.writeFileSync(path.join(root, 'recovery_d_worklist.json'), JSON.stringify({ items: [it] }));
|
|
156
|
+
fs.writeFileSync(path.join(root, 'recovery_d_answers.json'), JSON.stringify([{ key: it.key, verdict: 'revise',
|
|
157
|
+
steps: [{ type: 'click', selector: { text: '请输入手机号码' } }] }]));
|
|
158
|
+
const [phases, report] = rd.apply(doc, cfg, root);
|
|
159
|
+
assert.deepEqual(phases, []);
|
|
160
|
+
assert.equal(report[0].status, 'rejected');
|
|
161
|
+
assert.match(report[0].why, /closest known: '请输入手机号'/);
|
|
162
|
+
assert.equal(doc.phases[0].status, 'blocked');
|
|
163
|
+
});
|
|
164
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// A replay hop that fails the same way for every task sharing it (an ambiguous selector, a control
|
|
2
|
+
// not found, a list that opened another page) is replaced, once per task, by a route this run already
|
|
3
|
+
// proved reaches the page the hop opens, from the same start and landing.
|
|
4
|
+
// Measured (coolmall 2026-11-18): logged-out tasks replayed a coupon claim to reach Login (an
|
|
5
|
+
// ambiguous selector, three 「立即领取」 per sheet) while the run had reached Login another way, and
|
|
6
|
+
// every task behind that hop failed or was cut by the prefix memo.
|
|
7
|
+
import { test, describe, beforeEach, afterEach } from 'node:test';
|
|
8
|
+
import assert from 'node:assert/strict';
|
|
9
|
+
import { Runner, deps } from '../utg_explorer/task_runner.mjs';
|
|
10
|
+
import { monotonic } from '../utg_explorer/_py.mjs';
|
|
11
|
+
|
|
12
|
+
const PKG = 'com.x';
|
|
13
|
+
const btn = (sel, i) => ({ class: 'x.Button', clickable: true, visible: true, package: PKG, parent_index: 0,
|
|
14
|
+
bounds: [0, 100 * (i + 1), 300, 100 * (i + 1) + 80], ...sel });
|
|
15
|
+
|
|
16
|
+
/** home --(我的)--> me --(点击登录账号)--> login --(验证码登录)--> sms; home has two 「立即领取」. */
|
|
17
|
+
class App {
|
|
18
|
+
constructor() { Object.assign(this, { screen: 'home', n: 0, acts: [] }); }
|
|
19
|
+
act(a) {
|
|
20
|
+
this.acts.push(a);
|
|
21
|
+
if (a.type === 'launch') { this.screen = 'home'; return; }
|
|
22
|
+
if (a.type !== 'click') { return; }
|
|
23
|
+
const t = a.selector.text;
|
|
24
|
+
const go = { home: { 我的: 'me' }, me: { 点击登录账号: 'login' }, login: { 验证码登录: 'sms' } }[this.screen] ?? {};
|
|
25
|
+
if (go[t]) { this.screen = go[t]; }
|
|
26
|
+
}
|
|
27
|
+
settle() {}
|
|
28
|
+
observe() {
|
|
29
|
+
this.n += 1;
|
|
30
|
+
const nodes = [{ class: 'android.widget.FrameLayout', visible: true, package: PKG, parent_index: null, bounds: [0, 0, 1080, 2400] }];
|
|
31
|
+
const own = { home: [{ text: '我的' }, { text: '立即领取' }, { text: '立即领取' }], me: [{ text: '点击登录账号' }],
|
|
32
|
+
login: [{ text: '验证码登录' }], sms: [{ text: '获取验证码' }] };
|
|
33
|
+
own[this.screen].forEach((sel, i) => nodes.push(btn(sel, i)));
|
|
34
|
+
return { observation_id: `o${this.n}`, package: PKG, activity: 'A', window: 'main', nodes,
|
|
35
|
+
static_resolution: { status: 'verified', static_id: 'page:' + this.screen } };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function runner(app, tasks, config = {}) {
|
|
40
|
+
const r = Object.create(Runner.prototype);
|
|
41
|
+
r.args = { budget: 1000, max_tasks: 100 };
|
|
42
|
+
r.config = { package: PKG, max_scrolls_per_task: 1, launch_ready_seconds: 0, max_task_attempts: 1, ...config };
|
|
43
|
+
r.phase = { id: 'p', requires: [], obligations: [] };
|
|
44
|
+
r.env = 'p'; r.used = 0; r.stage = 'initial';
|
|
45
|
+
r.doc = { tasks, events: [] };
|
|
46
|
+
r.deadline = monotonic() + 60;
|
|
47
|
+
r.device = app; r.catalog = {}; r.coverage = 'edges'; r.covered = new Set();
|
|
48
|
+
const emitted = [];
|
|
49
|
+
r.emit = (kind, payload) => {
|
|
50
|
+
const e = { id: String(r.doc.events.length), kind, environment_id: 'p', payload };
|
|
51
|
+
emitted.push(e); r.doc.events.push(e); return e;
|
|
52
|
+
};
|
|
53
|
+
r.save = () => {};
|
|
54
|
+
r.capture = () => { r.current = app.observe(); r.doc.events.push({ kind: 'observation', payload: r.current }); return r.current; };
|
|
55
|
+
r.sweep = () => false; r.sweepBacklog = () => {}; r.runDiscovery = () => ({}); r.attest = () => {};
|
|
56
|
+
r.capture();
|
|
57
|
+
return [r, emitted];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const click = (text, target = null) => ({ type: 'click_candidates', selectors: [{ text }], static_label: text, target_id: target });
|
|
61
|
+
const LAUNCH = { type: 'launch', component_fqn: 'com.x.Main', restart: true };
|
|
62
|
+
const task = (id, replay, action, source, target) => ({ task_id: id, phase: 'p', status: 'compiled', source_static: source,
|
|
63
|
+
target_static: target, source_launch: LAUNCH, replay, prelude: [], action, launch_chain: ['page:home'] });
|
|
64
|
+
const results = (emitted) => new Map(emitted.filter((e) => e.kind === 'task_result').map((e) => [e.payload.task_id, e.payload]));
|
|
65
|
+
|
|
66
|
+
describe('ReplayReroute', () => {
|
|
67
|
+
let saved;
|
|
68
|
+
beforeEach(() => {
|
|
69
|
+
saved = deps.observationMatchesStatic;
|
|
70
|
+
deps.observationMatchesStatic = (o, ident) => { const hit = o?.static_resolution?.static_id === ident; return [hit, hit ? 'exact-page' : null]; };
|
|
71
|
+
});
|
|
72
|
+
afterEach(() => { deps.observationMatchesStatic = saved; });
|
|
73
|
+
|
|
74
|
+
const GOOD = [click('我的', 'page:me'), click('点击登录账号', 'page:login')];
|
|
75
|
+
const BAD = [click('立即领取', 'page:login')];
|
|
76
|
+
|
|
77
|
+
test('a failed hop replays through the route a confirmed task proved to the same page', () => {
|
|
78
|
+
const app = new App();
|
|
79
|
+
const tasks = [task('t-login', GOOD, click('验证码登录'), 'page:login', 'page:sms'),
|
|
80
|
+
task('t-sms', BAD, click('验证码登录'), 'page:login', 'page:sms')];
|
|
81
|
+
const [r, emitted] = runner(app, tasks);
|
|
82
|
+
r.run();
|
|
83
|
+
const res = results(emitted);
|
|
84
|
+
assert.equal(res.get('t-login').outcome, 'confirmed');
|
|
85
|
+
assert.equal(res.get('t-sms').outcome, 'confirmed', 'rerouted through 我的 → 点击登录账号');
|
|
86
|
+
const ev = emitted.find((e) => e.kind === 'replay_rerouted');
|
|
87
|
+
assert.deepEqual([ev.payload.task_id, ev.payload.page, ev.payload.replay_index], ['t-sms', 'page:login', 0]);
|
|
88
|
+
assert.match(ev.payload.reason, /^ambiguous selector/);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('a task the prefix memo would cut is rerouted instead', () => {
|
|
92
|
+
const app = new App();
|
|
93
|
+
const tasks = [task('t-login', GOOD, click('验证码登录'), 'page:login', 'page:sms'),
|
|
94
|
+
task('t-a', BAD, click('验证码登录'), 'page:login', 'page:sms'), task('t-b', BAD, click('验证码登录'), 'page:login', 'page:sms')];
|
|
95
|
+
const [r, emitted] = runner(app, tasks);
|
|
96
|
+
r.run();
|
|
97
|
+
const res = results(emitted);
|
|
98
|
+
assert.deepEqual(['t-a', 't-b'].map((id) => [res.get(id).outcome, res.get(id).prefix_failed_from]), [['confirmed', undefined], ['confirmed', undefined]]);
|
|
99
|
+
assert.equal(emitted.filter((e) => e.kind === 'replay_rerouted').length, 2);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
test('with no proven route the failure stands, and the memo cuts the next task as before', () => {
|
|
103
|
+
const app = new App();
|
|
104
|
+
const tasks = [task('t-a', BAD, click('验证码登录'), 'page:login', 'page:sms'), task('t-b', BAD, click('验证码登录'), 'page:login', 'page:sms')];
|
|
105
|
+
const [r, emitted] = runner(app, tasks);
|
|
106
|
+
r.run();
|
|
107
|
+
const res = results(emitted);
|
|
108
|
+
assert.match(res.get('t-a').reason, /^ambiguous selector/);
|
|
109
|
+
assert.equal(res.get('t-b').prefix_failed_from, 't-a');
|
|
110
|
+
assert.equal(emitted.filter((e) => e.kind === 'replay_rerouted').length, 0);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test('a route proven from another landing is not used', () => {
|
|
114
|
+
const app = new App();
|
|
115
|
+
const tasks = [task('t-login', GOOD, click('验证码登录'), 'page:login', 'page:sms'), task('t-sms', BAD, click('验证码登录'), 'page:login', 'page:sms')];
|
|
116
|
+
const [r, emitted] = runner(app, tasks);
|
|
117
|
+
const record = r.recordRoute.bind(r);
|
|
118
|
+
r.recordRoute = function (page, steps) { const l = this._landing; this._landing = 'page:guide'; record(page, steps); this._landing = l; };
|
|
119
|
+
r.run();
|
|
120
|
+
assert.match(results(emitted).get('t-sms').reason, /^ambiguous selector/);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test('a rerouted task whose substitute fails too is not rerouted again', () => {
|
|
124
|
+
const app = new App();
|
|
125
|
+
// the hop after the rerouted one fails too, on a step no route covers: the task fails once, plainly
|
|
126
|
+
const tasks = [task('t-login', GOOD, click('验证码登录'), 'page:login', 'page:sms'),
|
|
127
|
+
task('t-x', [click('立即领取', 'page:login'), click('不存在', 'page:other')], click('获取验证码'), 'page:other', 'page:y')];
|
|
128
|
+
const [r, emitted] = runner(app, tasks);
|
|
129
|
+
r.run();
|
|
130
|
+
assert.equal(emitted.filter((e) => e.kind === 'replay_rerouted').length, 1);
|
|
131
|
+
const res = results(emitted).get('t-x');
|
|
132
|
+
assert.equal(res.outcome, 'failed');
|
|
133
|
+
assert.match(res.reason, /^selector-not-found/, 'the failure reported is the substitute\'s own');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
test('reroute_replay false keeps the old behaviour', () => {
|
|
137
|
+
const app = new App();
|
|
138
|
+
const tasks = [task('t-login', GOOD, click('验证码登录'), 'page:login', 'page:sms'), task('t-sms', BAD, click('验证码登录'), 'page:login', 'page:sms')];
|
|
139
|
+
const [r, emitted] = runner(app, tasks, { reroute_replay: false });
|
|
140
|
+
r.run();
|
|
141
|
+
assert.match(results(emitted).get('t-sms').reason, /^ambiguous selector/);
|
|
142
|
+
});
|
|
143
|
+
});
|
|
@@ -123,11 +123,13 @@ describe('Cycle', () => {
|
|
|
123
123
|
assert.ok(!calls.includes('d_prereqs.mjs:snapshot'));
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
test('D without snapshot_dir
|
|
126
|
+
test('D without snapshot_dir extracts a state worklist but applies no recipe', () => {
|
|
127
127
|
const [done, state, calls] = drive({});
|
|
128
128
|
assert.equal(done, true);
|
|
129
|
-
assert.ok(
|
|
129
|
+
assert.ok(calls.includes('recover_d.mjs:extract'));
|
|
130
|
+
assert.ok(!calls.includes('recover_d.mjs:apply'));
|
|
130
131
|
assert.ok(state.skipped.some((s) => s.includes('no snapshot_dir')));
|
|
132
|
+
assert.ok((state.notes ?? []).some((s) => s.includes('state worklist') || s.includes('recovery_d_worklist')));
|
|
131
133
|
});
|
|
132
134
|
|
|
133
135
|
test('skip D never extracts or waits on it', () => {
|
|
@@ -385,6 +387,8 @@ describe('Cycle', () => {
|
|
|
385
387
|
const doc = { tasks: Array.from({ length: 40 }, () => ({ phase: 'p', status: 'compiled' })) };
|
|
386
388
|
assert.equal(rc.budgetFor(doc, 'p', 6), 240);
|
|
387
389
|
assert.equal(rc.budgetFor(doc, 'q', 6), 60);
|
|
390
|
+
// a phase's fixtures spend actions before its tasks (a seeding recipe's checkout walk)
|
|
391
|
+
assert.equal(rc.budgetFor(doc, 'p', 6, { fixtures: { p: Array.from({ length: 70 }, () => ({ type: 'wait' })) } }), 380);
|
|
388
392
|
});
|
|
389
393
|
|
|
390
394
|
test('A loops while a retry run surfaces new identity questions', () => {
|