@buaa_smat/hometrans 26.0.5 → 26.0.6
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 +249 -279
- package/agents/code-reviewer.md +1 -1
- package/dist/cli/editors.json +20 -0
- package/dist/platform/registry.js +1 -0
- package/dist/platform/validate.js +2 -1
- package/i18n/agents/code-reviewer.md +1 -1
- package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
- package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
- package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/package.json +2 -1
- package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/skills/a2h-app-migrate/SKILL.md +31 -14
- package/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
- package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
- package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
- package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
- package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
- package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
- package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
- package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +1 -1
- package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
- package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
- package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
- package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
- package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
- package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
- package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
- package/skills/a2h-page-specgen/SKILL.md +36 -5
- package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
- package/skills/a2h-page-specgen/references/evidence.md +2 -1
- package/skills/a2h-page-specgen/references/execution-model.md +13 -5
- package/skills/a2h-page-specgen/references/gates.md +33 -7
- package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
- package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
- package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
- package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
- package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
- package/skills/a2h-resource-convert/SKILL.md +1 -1
- package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
- package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
- package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
- package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
- package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
- package/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
- package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
- package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
- package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
- package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
- package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
- package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
- package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
- package/skills/a2h-utg-static/SKILL.md +3 -3
- package/skills/a2h-utg-static/references/extractors.md +7 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
- package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
- `scripts/stage_design_inputs.ts` — W0 and the deps release sweep: stages the semantic design docs (`project_design.md`, `database_design.md` / `preferences_design.md` when present, and per-module `module_design.md`) from `<HMOS>/.hometrans` into a worktree's `.hometrans`, so the coder's design step resolves them from the worktree; skips the runtime subtrees (`spec_design`, `dispatch`, `spec_pipeline_archive`, `spec_group_*`, `wave_*`) (deterministic; has tests).
|
|
9
9
|
- `scripts/ensure_index.ts` — the single writer for both HomeGraph indexes (`<ANDROID>` at I2, `<HMOS>` at I2/W0/B2/B3/B4/resume): `--create` initializes a missing local index, `--sync` refreshes an existing one unconditionally (`homegraph status` reads git's uncommitted set, so it reports "up to date" after a pipeline commit while the index is behind HEAD), `index --inplace` is the rebuild fallback, and a corrupt db is renamed to `.homegraph.corrupt-<ts>.db` before a fresh `init` (never deleted). Every failed `init`/`index` is re-read first: the engine can exit non-zero after the rows are complete, so a usable snapshot is accepted and recorded as success. Lock safety: `homegraph unlock` runs only when the lock holder is dead/absent; a live holder (identified or not) returns `lock_busy` without killing, unlocking, or rebuilding — on the main checkout a live writer is never killed; no writer is ever killed: a timed-out attempt leaves its lock for the next call (live → `lock_busy`, dead → `unlock`). A nonexistent path is `repo_missing`. `--engine-mode off` spawns nothing and returns `action:"skip", reason:"engine_off"` (and touches no file, not even `.gitignore`). A linked worktree is refused (`not_main_checkout`), as is an index that resolves to an ancestor (`index_not_local`); an explicit path is literal, so a monorepo subdirectory gets its own index. Output is one JSON line (`ok/action/reason/degraded/initialized/attempts/reaped/projectPath/lastIndexed/fileCount/indexState/builtWithVersion/durationMs/detail`); `initialized` = local db present **and** the status `projectPath` resolves to this repo; `repo` is `state.engine.<index>.path`. Exit 0 usable (incl. `none`/`skip`/`sync_incomplete`), 1 degraded, 2 usage. Timeouts: `init` 300000 ms, `sync`/`index` 600000 ms, `status` 120000 ms (`--init-timeout-ms`/`--timeout-ms`/`--status-timeout-ms`).
|
|
10
10
|
- `scripts/plan_waves.ts` — deterministic deps-aware backfill wave slicing (bump same-wave-dep candidates when a clean candidate can backfill, else hold in-wave for runtime dispatch-hold) with a flat fallback: a pool larger than one wave whose deps forecast exceeds 2× the width-bound ideal dispatch rounds slices pure group order with `mode: "flat"` (deps stop shaping concurrency; has tests).
|
|
11
|
-
- `scripts/sync_permission_index.ts` — regenerates `references/permission-index.json`, the allowlist F0 checks a looked-up `ohos.permission.*` name against and its offline fallback (the `desc` field is how a capability is matched without a docs index): reads the four official pages (
|
|
11
|
+
- `scripts/sync_permission_index.ts` — regenerates `references/permission-index.json`, the allowlist F0 checks a looked-up `ohos.permission.*` name against and its offline fallback (the `desc` field is how a capability is matched without a docs index): reads the four official permission pages (system-granted, user-granted, restricted, permission groups) through `devecocli docs read` and records per permission its grant class, `level`, `restricted` flag, `since`, permission group and first description line (names carry dotted namespaces — `ohos.permission.kernel.NET_RAW`; the grant marker uses full-width parentheses, so the page default is a fallback only), one permission per line so the reviewed diff stays readable; `--check` re-derives in memory and exits 1 on drift without writing, `--raw-dir` replays saved pages (fixtures, no docs index), and an unavailable docs index is exit 2 — the committed snapshot is what keeps F0 offline and deterministic (has tests).
|
|
12
12
|
- `scripts/scan_shared.ts` — F0's deterministic candidate scan (read-only except the atomic candidates file): resolves the semantic docs (`lib/shared_docs.ts`), reads the plan/state/wave plan, classifies the doc rows into the three shared classes (`lib/shared_classes.ts`; every declaration row is classified — invalid roots are recorded in `skipped[]` with accurate reasons, deduped by `(id, reason)`), gates on members ≥ 2, scopes the prior-work inventory to strictly earlier waves' done manifests **of the current `campaign_id`** (the current wave's own output is never evidence; a manifest from another campaign satisfies nothing), takes module roots **only** from `build-profile.json5` `modules[].srcPath` (`.hometrans/module_understanding/` is never a registration source), resolves the database table list as `database_design` → `project_design` → the wave's merged-spec union (`doc_source`/`declared_by` record the source actually used; an empty database doc does not suppress the later sources), and scans each candidate module root for satisfied markers in tracked `.ets`/`.ts` sources only — comments blanked and string/template/regex bodies masked by a small lexer, so `${...}` interpolation code stays visible and a regex body never unbalances an interpolation; markers are identifier-bounded, and `network.transport` needs a marker on an executable-export line (deterministic; has tests).
|
|
13
13
|
- `scripts/validate_shared_manifest.ts` — F0's deterministic done-manifest gate: `campaign_id`, `schema`/`wave` identity (`spec_shared_manifest/v1` / `spec_shared_candidates/v1` / `manifest.wave == --wave`), `base`, `status:"done"` with non-empty `modules`, the per-module candidate/mode/`files`-under-`path`/`api`/barrel checks (the barrel is parsed after masking string/template literals, so export text inside a literal never counts; named exports grepped; a re-export from a bare/foreign specifier fails that symbol; `export *` is not proof), the `base..commit` diff allowlist `files[] ∪ wiring[]` with the page/VM and `build-profile.json5`/`hvigorfile.ts`/foreign `oh-package.json5` vetoes (`wiring[]` entries outside `state.config.wiring_files` are allowed only as the module barrel, the module's own root-level `oh-package.json5`, or a recognized wiring category **under that module's root** — `module.json5`, `main_pages.json`, `route_map.json`, `resources/**/element/*.json`, `Routes.ets`, or a `getRdbStore` registration file under the module root; a foreign path that merely matches a category is rejected), the database single-writer rule (multiple `database` module entries are allowed; at most **one** entry may contain `getRdbStore`/schema), `mode:"complete"` only for `database`, `placement_fallback` never true, the exactly-one-commit gate (`commit` has exactly one parent == `base`; `base..commit` holds exactly one commit), the canonical commit subjects (`infra(wave K): shared layer` on the commit, `docs(wave K): refresh semantic docs after shared layer` on a recorded `docs_commit`; with `--resume`, any unrecorded F0-subject commit in `<commit>..HEAD` fails as `unrecorded F0 commit: <sha>`), the clean tree (`--porcelain --untracked-files=all`), and `HEAD == docs_commit ?? commit` — or, with `--resume`, a descendant HEAD with a warning (deterministic; has tests).
|
|
14
14
|
- `scripts/deps_ready.ts` — dispatch-hold verdicts for a wave's pending members: `ready`/`held` per group-level deps (cycle edges ignored + recorded) plus the `released` (no-dispatch-yet) subset; a `mode: "flat"` wave yields `ready` for every pending member; read-only over plan + state + wave plan (deterministic; has tests).
|
|
15
|
-
- `scripts/
|
|
15
|
+
- `scripts/settle.ts` — host-independent reply recovery for foreground stages (`f0` / `b3` / `b4-rebuild` / `build-breaker` / `homecheck-build`): `--init` records `dispatch_at`, `pre_head`, `campaign_id`, `base`, `stage`, `wave`, `output`, `targets` and each target's `{mtime,size}` in `wave_<K>/reply_recovery_<stage>.json`; the read-only probe reads that baseline by default and returns `artifact_fresh` (all targets newer than `dispatch_at`, different from the baseline, F0 campaign/base or a real commit descended from `pre_head` and reachable from `HEAD`), `settled_empty` (quiet ≥ `QUIET_MS`: 660000 for all stages), `settled_timeout` (activity to `WAIT_MS`, default 1800000) or `pending` (this `SLICE_MS` slice ended; re-run) from git + artifact + build-root mtimes; `git status -uall` (a rewritten file inside a new untracked dir counts), deletions count as activity, a dirty list above `--scan-budget` (default 200000) or a truncated scan is fail-closed, and a future mtime is `invalid:future-mtime`/`clockSkew`, never fresh. `--init` refuses to overwrite without `--force`; the probe rejects an `--artifact` list that omits a baseline target and any ownership override that differs from the baseline. Never a session resume; the caller applies its existing fail-soft, and `settled_timeout` is a stop (deterministic; has tests).
|
|
16
|
+
- `scripts/check_design_map.ts` — Finalization step 3: checks `design_map.md` against the state — one row per done/failed group, `Scenarios` an integer, a done group's `Start`/`End` real timestamps with Start ≤ End (not the in-progress placeholder), every named design file present in the design dir; JSON `{ ok, problems }`, exit 1 lists problems for the report (a placeholder-filled map no longer passes as complete; has tests).
|
|
16
17
|
- `scripts/branch_landed.ts` — the read-only resume "merged" predicate: landed ⇔ a `--no-ff` merge on main's first-parent line has the branch tip as its second parent (a zero-commit branch is never landed, unlike `merge-base --is-ancestor`); takes `[--wt-gen <n>] [--branch <name>]` (the generation branch `specpipe/g<G>r<n>`; `--branch` wins) and returns the landing's B4 range `PRE..M` (has tests). The predicate itself lives in `scripts/dispatch/landing.mjs` so `dispatch.mjs group-merge` uses exactly one implementation.
|
|
17
18
|
- `scripts/resolver_prompt.ts` — the deterministic B2 hop-a conflict-resolver prompt: derives the involved groups from each landed group's `<merge>^1..<merge>` net-change range intersected with the conflicted files, and renders `references/resolver-prompt.md` with every involved group's ORIGINAL SPEC + chunk SPECs + design docs, the worktree-only rule, the compact wiring list (derived from `state.config.wiring_files`, `wiring_compact` as fallback), the always-present HomeGraph rule (read-only CLI on the shared indexes interpolated as real absolute paths; `<HMOS>` always, `<ANDROID>` only when `--android` is given; never a worktree index), the absolute `resolver/attempt_<n>/issues.md` + `notes.md` paths (the notes file is outside the worktree, so it never trips the release gate or pollutes the merge commit), the strict-JSON return, and an empty-conflict `{resolver_needed:false}` (phantom) path. A non-dry-run render requires a claimed resolver (claim-first). Output is one strict-JSON line carrying `hmos_project_path` / `android_project_path` (`null` when absent) / `notes_file`; `--groups` overrides derivation, `--android <abs>` adds the Android source index to the rule (absent or empty → the rule names `<HMOS>` only), `--worktree <abs>` overrides the ledger worktree (never `<hmos>`), and `--dry-run` (operator-only) prints the markdown. Read-only; no `--out`/`--intent`/`--attempt`/prompt hash (has tests).
|
|
18
19
|
- `scripts/audit_claims.ts` — actual-write audit when B1⇄B2 finish (B2 step 0), on recorded per-group coder pairs, with each group's generation read from the dispatch ledger (`--wt-gen` is the no-ledger fallback, `--branch` overrides) for the fallback range: wiring-surface violations, resolver hand-edit violations, empty diffs, same-wave cross-group overlaps (deterministic; has tests).
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
- `scripts/lib/shared_docs.ts` — deterministic semantic-docs parsing for F0: the explicit doc-candidate resolution order (`.hometrans/<name>.md`, then the project root, lowercase before uppercase, `.hometrans/<NAME>.md` as the last resort), function-column-only row classification (never path/module names; `network.transport` requires a positive doc keyword AND a strong keyword — a strong hit only bypasses the negative words — while the other classes require positives with no negatives), per-row root resolution that also reports invalid rows with reasons (`missing_module_root` / `not_shared_root`; page-vetoed roots are `not_shared_root`), and database table extraction; no project naming is hardcoded (deterministic; has tests).
|
|
38
39
|
- `scripts/lib/io.mjs` — shared plumbing: atomic JSON/file writes (temp + fsync + rename), BOM-tolerant JSON reads, `ensureDir`, and junction/case-safe `isMain`.
|
|
39
40
|
- `scripts/atomic_write.ts` — crash-safe file replacement (temp + fsync + rename, optional `.bak`) shared by the `.ts` scripts above.
|
|
40
|
-
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/test_ensure_index.ts`, `scripts/test_ensure_index_real.ts`, `scripts/test_homegraph_docs.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts`, `scripts/test_homecheck_scan.ts` — unit tests (run with `node --test <file>`).
|
|
41
|
+
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/test_ensure_index.ts`, `scripts/test_ensure_index_real.ts`, `scripts/test_homegraph_docs.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_settle.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts`, `scripts/test_homecheck_scan.ts` — unit tests (run with `node --test <file>`).
|
|
41
42
|
- `scripts/test_shared_classes.ts`, `scripts/test_shared_docs.ts`, `scripts/test_scan_shared.ts`, `scripts/test_validate_shared_manifest.ts`, `scripts/test_shared_layer_docs.ts`, `scripts/test_shared_layer_e2e.ts`, `scripts/test_permission_index.ts`, `scripts/test_check_permissions.ts` — the shared-layer (F0) tests: class-config defaults/overrides and the shared-root hard-deny, doc resolution and row classification, the candidate scan (members gate, strictly-earlier-wave inventory, partial database mode), done-manifest validation (base/campaign_id/dirty/page vetoes), the SKILL + references doc contracts, and the scan → manifest → validate end-to-end mini-campaign, and the permission index's snapshot contract (schema, provenance, sorted unique names, a `desc` long enough for offline matching) with the index generator's fixture round-trip and `--check` drift detection, plus the docs-driven lookup, evidence-line and restricted/picker discipline asserted over `shared-layer.md` (run with `node --test <file>`).
|
|
42
43
|
- `scripts/test_dispatch_commands.mjs`, `scripts/test_dispatch_e2e.mjs`, `scripts/test_dispatch_evidence.mjs`, `scripts/test_dispatch_fold.mjs`, `scripts/test_dispatch_landing.mjs`, `scripts/test_dispatch_ledger.mjs`, `scripts/test_dispatch_plan.mjs`, `scripts/test_dispatch_progress.mjs`, `scripts/test_dispatch_reconcile.mjs`, `scripts/test_dispatch_wait.mjs`, `scripts/test_dispatch_waker.mjs`, `scripts/test_dispatch_worktree.mjs` — the dispatch ledger's unit and end-to-end tests: lock/CAS, fold, plan, evidence, the group-merge landing gate, reconcile, wait/waker, progress, worktree generations, and the mini-wave harness (run with `node --test <file>`).
|
|
43
44
|
- `references/specs.example.json` — example of the specs.json input format (the format is owned by the producing skill, a2h-spec-generate's publish-specs).
|
|
@@ -51,5 +52,6 @@
|
|
|
51
52
|
- `references/post-loop.md` — after the wave loop verbatim: the Homecheck step, the runtime smoke gate and Finalization (steps 0–5), with the `post_homecheck` / `post_smoke` / `finalization` markers.
|
|
52
53
|
- `references/static-defect-gate.md` — the post-loop Homecheck check before the smoke gate: fixed plus migration rule sets, scan/fix rounds, mandatory error repair + advisory custom-warning judgement, the closing verification scan, the per-campaign `runId`, build-before-smoke rule, summary schema, and resume behavior.
|
|
53
54
|
- `references/legacy-cleanup.md` — the one-time runtime cleanup of retired `.hometrans` dispatch files on resume (exact filenames; runtime artifacts only).
|
|
55
|
+
- `references/reply-recovery.md` — the host-independent reply-recovery ladder for F0 / B3 / B4 rebuild / build breaker / post-gate build-fixer: baseline v2, freshness/ownership checks, `settled_empty` vs `settled_timeout`, and the no-session-resume rule. The Homecheck gate itself keeps its own `summary.json` + `runId` fallback.
|
|
54
56
|
- `references/final-report-template.md` — the Finalization summary report template (every section mandatory).
|
|
55
57
|
- `references/scripts.md` — this file.
|
|
@@ -132,6 +132,12 @@ commit as `wiring`; any other dirt stops the run.
|
|
|
132
132
|
|
|
133
133
|
## State persistence & resume
|
|
134
134
|
|
|
135
|
+
**Foreground-stage reply-recovery baselines are per-dispatch evidence, not campaign state.** Each
|
|
136
|
+
foreground stage writes `<HMOS>/.hometrans/wave_<K>/reply_recovery_<stage>.json` (or a round/attempt-specific
|
|
137
|
+
path) before dispatch. On a resume/re-dispatch, after confirming the old agent is gone, write a new baseline
|
|
138
|
+
with `settle.ts --init --force`; the probe never overwrites it and never accepts ownership overrides. See
|
|
139
|
+
`references/reply-recovery.md`.
|
|
140
|
+
|
|
135
141
|
`<HMOS>/.hometrans/spec_pipeline_state.json` (schema `spec_pipeline_state/v2`, gitignored) is written by
|
|
136
142
|
`plan_groups.ts --emit-state`, updated by `plan_waves.ts` (wave assignment), and updated by the
|
|
137
143
|
orchestrator after every stage — including the B1⇄B2 bookkeeping: chunk statuses (`pending` →
|
|
@@ -236,7 +242,7 @@ seeded with `config.evidence_version >= 1` (plan_groups `--emit-state` sets it).
|
|
|
236
242
|
left its output on disk, which a skipped step cannot have:
|
|
237
243
|
|
|
238
244
|
- **B4** — every done group has `review.round >= 1` and a non-empty `spec_group_<G>/review-round_1/`.
|
|
239
|
-
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave,
|
|
245
|
+
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave, result, at}`).
|
|
240
246
|
- **C** — every done group has its `commit`, and no `specpipe/g<G>r*` branch is left.
|
|
241
247
|
- **Homecheck** — `finalization.homecheck` holds the gate's result (a fail-soft result counts; absent or
|
|
242
248
|
`not_run` does not).
|
|
@@ -705,7 +705,7 @@ function main(): number {
|
|
|
705
705
|
android: values.android !== undefined ? normSep(path.resolve(String(values.android))) : null,
|
|
706
706
|
hmos: normSep(hmos),
|
|
707
707
|
design_dir: normSep(designDir), engine: 'homegraph',
|
|
708
|
-
engine_mode: engineMode,
|
|
708
|
+
engine_mode: engineMode, mvvm_mode: true,
|
|
709
709
|
max_rounds_review: 2,
|
|
710
710
|
grouping: 'dir', wave_width: waveWidth,
|
|
711
711
|
design_granularity: 'chunk',
|
|
@@ -222,6 +222,8 @@ test('emit-state seeds v2 and refuses to overwrite', (t) => {
|
|
|
222
222
|
assert.equal(state.groups[0].G, 1);
|
|
223
223
|
assert.equal(state.config.wave_width, 10);
|
|
224
224
|
assert.equal(state.config.design_granularity, 'chunk');
|
|
225
|
+
// The state seed carries no docs_mode knob (the semantic-docs refresh has one path).
|
|
226
|
+
assert.equal('docs_mode' in state.config, false);
|
|
225
227
|
assert.ok(state.groups[0].chunks[0].design_file.endsWith('SPEC_DESIGN_G1_c1.md'));
|
|
226
228
|
assert.ok(state.groups[0].chunks[0].spec_file.endsWith('chunk_1_spec.md'));
|
|
227
229
|
// Idempotent: a second run without --force does not overwrite
|
|
@@ -6,7 +6,7 @@ Read this file at Step 0 item 1, before splitting `requirements_input` into indi
|
|
|
6
6
|
- **Generic text type (`.txt` / `.md`)**: read the content directly. When the first non-empty line is not an Area metadata line, split on blank-line-separated paragraphs; each requirement starts with a title line followed by its description.
|
|
7
7
|
- **App-reqgen text type (`.txt` / `.md`)**: select this mode when the first non-empty line matches `Access Path: <path>` (full-width or ASCII colon).
|
|
8
8
|
- Treat the consecutive leading `Access Path` / `Precondition` / `Area Description` lines before the first blank line as Area metadata, never as a requirement. Require a non-empty access path.
|
|
9
|
-
- **`Control: <controlRef>` lines are per-requirement identity metadata**: a block that opens with a `Control:` line carries that requirement's stable Control identity (e.g. `Control: control:
|
|
9
|
+
- **`Control: <controlRef>` lines are per-requirement identity metadata**: a block that opens with a `Control:` line carries that requirement's stable Control identity (e.g. `Control: control:demoapp/interactive-control/0123456789abcdef0123`); the value after `Control:` is the `controlRef`, and the requirement's title is the next non-metadata line. Record the `controlRef` with the requirement and carry it into the spec's identity line (Step 2.5); never treat the `Control:` line itself as title or body text. A `Control:` token that is not the opening line of its block is plain body text — it carries no identity and must not be stripped or promoted. Requirements without one (Excel-sourced, legacy REQ files) simply have no control identity — never invent one.
|
|
10
10
|
- In the remaining text, identify each requirement's UI-path/title line and its following behavior description. A blank line followed by the next identifiable title starts a new requirement; blank lines inside a description do not split it. The title need not repeat the exact `Access Path` prefix: navigation wording and quotation marks may differ. Preserve each original title and body rather than rewriting them to match the metadata.
|
|
11
11
|
- **Precondition propagation format**: prepend the `Precondition: <value>` line verbatim — label included — as the first line of the requirement's in-memory description, then the original body lines. Do not merge it into the body prose and do not drop the label.
|
|
12
12
|
- If a requirement boundary cannot be identified, or body text has no identifiable title, report the ambiguous section and stop instead of guessing, merging requirements, or inventing a title.
|
|
@@ -9,7 +9,7 @@ Use this skill after `a2h-utg-static` (or with an existing static `utg.json`). I
|
|
|
9
9
|
|
|
10
10
|
## Run it end to end, without pausing
|
|
11
11
|
|
|
12
|
-
The first round and every recovery class (A → retry → B/C → adopt → D → direct launch → report) run as ONE uninterrupted cycle. Never stop between stages to ask the user whether to continue; stop only for a genuine blocker (an account, another build, hardware). Drive it with:
|
|
12
|
+
The initial-state archive, the first round, state scheduling (S) and every recovery class (A → retry → B/C → adopt → D → direct launch → report → initial restored) run as ONE uninterrupted cycle. Never stop between stages to ask the user whether to continue; stop only for a genuine blocker (an account, another build, hardware). Drive it with:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
node scripts/run_cycle.mjs <campaign> --config <config.json> --static <utg.json> \
|
|
@@ -18,6 +18,12 @@ node scripts/run_cycle.mjs <campaign> --config <config.json> --static <utg.json>
|
|
|
18
18
|
|
|
19
19
|
Stdout JSON appears only when the call ends; follow a running call in `<campaign>/cycle_progress.jsonl` (one JSON line per stage start/end, device phase start/end with its result, and call start/end/failure).
|
|
20
20
|
|
|
21
|
+
**Data states.** Which data the device holds decides which pages can render, so the cycle tracks it as evidence in `<campaign>/states.json` (`utg_explorer/states.mjs`):
|
|
22
|
+
- Before any device action, `d_prereqs.mjs initial` archives the app data the device was handed over with as `initial.tar` (`run-as`; every data-dir entry except `cache`, `code_cache` and `lib`, so logins in `app_webview` or `no_backup` are kept) and records the screen a cold launch shows on it (its landing). Without `run-as` the data cannot be archived: it is recorded as live-only, `config.user_state_protected` is set, and every `clear_app_data` / `restore_app_data` is refused from then on (no `pm clear`, no fresh base, so pages only first-launch data shows stay uncaptured and are reported). A release (non-debuggable) build therefore loses stage D: its recipes are extracted for review, none is applied. On a test device whose data nobody needs, set `config.allow_unarchived_wipe: true` before the cycle: no protection is set and D keeps its replay base (`pm clear` + replay). After every stage that changes the app data (the `fresh` snapshot, S, D) the cycle runs `restore-initial`, so requirement-free phases and their retries run on the data the first round saw. The exception is `allow_unarchived_wipe` without `run-as`: `initial` has no archive, `restore-initial` does nothing, and those phases run on whatever data the last S or D variant left. `initial.tar` covers the app's private data directory (`/data/data/<pkg>`) only. `pm clear` also wipes its device-protected storage (`/data/user_de/0/<pkg>`) and external `Android/data/<pkg>`, and the grant step after each clear grants runtime permissions the user had denied: `restore-initial` does not bring those back. A restore unpacks into a staging directory first and replaces the data only when that worked; a failed cycle runs `restore-initial` before it exits. An app installed but never launched has no data: `initial` is recorded as empty and `restore-initial` clears the data. The cycle ends with `d_prereqs.mjs restore-initial`, so the device goes back as it came.
|
|
23
|
+
- After the first round, `d_prereqs.mjs snapshot` takes first-launch data (`fresh`) with its landing; a recipe's snapshot becomes a state too, with the landing of its relaunch.
|
|
24
|
+
- Every verified capture is attributed to the state the device held then (clear / restore / snapshot actions in `events.jsonl` move it).
|
|
25
|
+
- **Stage S**, before A. `predicates.mjs extract` lists each distinct phase requirement once (`predicates_worklist.json`, reviewed like A–D). Answer each `key` with `verdict: "predicate"` and `clauses: [{page, rule?}]` (the requirement holds in a state when one clause matches a capture of `page` there; `rule` is `all` / `any` / `none` over `resource_name` / `text` / `content_desc`, each grounded in the page's layout, source texts or captures; pick evidence present ONLY when the requirement holds, e.g. a list row id, never the list container) or `verdict: "unevaluable"` with `why` (a code branch no screen shows: assumed, never proven). A page that the plan puts behind a requirement on its route proves it by rendering, with no review. `schedule_states.mjs` then adds variant phases `st-<state>-<n>`: every plan phase runs in a known state its requirements hold in (fixture: restore that state, or a plain launch on live data; probe: that state's landing), and every task that failed on its source page runs in a state that page rendered in. The cycle runs them (`state_phases.txt`), and again after D for the states D's recipes built. A state phase is never run on a guess; D only builds the states no known one satisfies.
|
|
26
|
+
|
|
21
27
|
All stages, D included, run by default without asking the user. D needs `config.snapshot_dir` (and, for recipes that add feeds or other served files, `fixture_server_dir`, with `scripts/d_prereqs.mjs serve <dir> --config <config.json>` running: it picks the port, writes `fixture_server_url` for the device, sets up `adb reverse` on a real device, and `d_prereqs.mjs check` / `release` confirm it is up and drop the reverse afterwards); the cycle takes the base snapshot itself with `d_prereqs.mjs snapshot` when the directory has none (a `.tar` via `run-as` for a debuggable build, otherwise a `.replay.json` step chain rebuilt by `pm clear` + replay; see architecture.md), and skips D with a recorded reason when `snapshot_dir` is unset. `--skip D` (or `direct`) is an opt-out: it marks that stage done without running it and lists it under `skipped` in the output, for a run where the user has asked not to change app data.
|
|
22
28
|
|
|
23
29
|
Each call advances as far as existing answers allow. It prints `waiting`: the worklist parts that still need answers, each with the `answers` path its reviewer must write. Reviews overlap (`--review overlap`, the default). Every stage of the round is extracted up front, so `waiting` lists the parts of **all** of them at once. The stages still apply and run on the device in order. `blocked_on` names the worklists the next stage needs. Then, immediately:
|
|
@@ -36,11 +42,11 @@ Each call advances as far as existing answers allow. It prints `waiting`: the wo
|
|
|
36
42
|
- A device that never comes back ends the call with `DeviceDown`, and that phase is not marked done. Restart the cycle once the device is back.
|
|
37
43
|
- While another explorer holds the device lock, `ensure` skips every recovery step (reconnect, adb restart, emulator restart would break its run) and reports it busy. The call ends with `DeviceDown` the same way, and a scheduled restart between rounds is skipped and noted.
|
|
38
44
|
- A stage that runs past `UTG_STAGE_TIMEOUT_S` is killed. The cycle then kills what it left running (on Windows: `taskkill /T`, then its orphaned `adb shell` children) and removes the adb forwards it held.
|
|
39
|
-
- `config.emulator.restart_every_h` restarts the emulator between rounds before it degrades. Measured
|
|
45
|
+
- `config.emulator.restart_every_h` restarts the emulator between rounds before it degrades. Measured in practice: after 9 h the emulator stopped answering, and ~45 min passed before anyone noticed.
|
|
40
46
|
|
|
41
47
|
Never restart the emulator from a foreground shell yourself: `device_health.mjs ensure --config <config.json> [--restart]` does it within a bounded time.
|
|
42
48
|
|
|
43
|
-
**Answers carried across rounds.** At the end of a round, its direct-launch answers that schedule nothing (`skip` and the like) are kept with the item they answered. In the next round an unchanged item is merged from them and offered to no reviewer; `carried` in the cycle state counts them. A `launch` answer is reviewed again, because its node is still uncovered, so the launch failed. An item whose label, kind, `declared_at` or click path changed is reviewed again too. Measured
|
|
49
|
+
**Answers carried across rounds.** At the end of a round, its direct-launch answers that schedule nothing (`skip` and the like) are kept with the item they answered. In the next round an unchanged item is merged from them and offered to no reviewer; `carried` in the cycle state counts them. A `launch` answer is reviewed again, because its node is still uncovered, so the launch failed. An item whose label, kind, `declared_at` or click path changed is reviewed again too. Measured in practice: round 2 re-reviewed all 78 items from scratch in 63 min.
|
|
44
50
|
|
|
45
51
|
Phase budgets are sized to their task counts (`--budget-per-task`), so a phase does not stop early and need a rerun. A phase's cleanup never counts against its budget. A device phase that still fails after the first round is recorded under `failed_phases` and skipped, and the rest of its stage runs. `MAX_PHASE_FAILS` (3) failures in a row still end the call. Its `error` keeps the first and last 300 characters. A device lock held by another explorer is waited for (`config.device_lock_wait_s`, default 300 s); one still held ends the call with `DeviceDown` naming the owner (`Another explorer owns this device: pid N, campaign <path>, since <time>`), and the phase is not marked done. Such a phase is never listed in `failed_phases`; a plain re-run of the cycle runs it. Never hand-edit `cycle_state.json`: after a device failure listed in `failed_phases` is fixed, `--retry-failed` runs those phases again at the start of the call, even when their stage is already done, then rebuilds the report. One that fails again is listed again. Every apply and phase is checkpointed in `cycle_state.json`, so a re-run after a crash never re-applies a stage or re-runs a finished phase.
|
|
46
52
|
|
|
@@ -61,7 +67,7 @@ The steps below describe the individual stages that `run_cycle.mjs` runs.
|
|
|
61
67
|
Pages that inflate the same layout (`layout-twin`) are resolved by their static opener: if the screen before was verified as a page with an edge to exactly one twin, that twin is verified (`layout-twin-opener`); `rejudge`/`recover apply` re-apply this to recorded evidence.
|
|
62
68
|
Source recovery presses Back only when it can land on the task's source: the source must be a static ancestor of the current verified page (`opened_from`, a menu's owner, a panel's host), and the page must not be one where a Back has already left the app (learned from the event log, so it carries across phases and rounds); otherwise it relaunches directly. A fixture's `snapshot_app_data` / `save_replay` step whose archive already exists (written by an earlier run of the same phase) is kept and skipped, never overwritten.
|
|
63
69
|
3. Configure device serial, package, launch_component, state probes and fixtures in `config.json`. Keep app data in campaign configuration. `page_rules[].family` may name a static node id; a unique positive rule then becomes auditable static mapping evidence. Unknown family ids remain dynamic-only. Never equate an incoming click label with the landing page; unresolved/ambiguous identity remains a gap.
|
|
64
|
-
**State phases
|
|
70
|
+
**State phases need no hand-written fixture or probe**: stage S schedules them from the state inventory (see "Data states" above), and one with requirements but no probe is never run directly (`unresolved prerequisites`). `state_phase_fallback` no longer exists. When `snapshot_dir` is absent, `d_prereqs.mjs initial` sets it to `<campaign>/snapshots`; D still extracts `recovery_d_worklist.json` for review when no recipe can be applied.
|
|
65
71
|
4. Run `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget 50`. Device I/O defaults to the fast path (u2 backend via the bundled `assets/u2.jar`, persistent adb shell, stable-UI settle; no extra install, see architecture.md to opt out). Screenshots always come from `adb exec-out screencap -p`. Keep one device session serialized; every action captures before/after package, window, UI tree, screenshot, and outcome. UIAutomator dumps use bounded retry by default (`ui_dump_retries: 3`, configurable) and verify the remote file before pulling it; transient dump/pull/parse failures are classified separately. Use verified fixtures to enter each phase rather than carrying state between unrelated phases.
|
|
66
72
|
5. Run `scripts/report.mjs <campaign-dir>` for a baseline audit, then perform the recovery cycle below for every unresolved obligation. Do not stop at the first report or treat a screenshot count as page coverage.
|
|
67
73
|
6. Supplement remaining gaps with `scripts/variant.mjs <campaign-dir> <variant.json> --config <config.json>`: verified fixtures, selected targets, bounded discovery routes, and explicit cleanup. For generic discovery, opt in with `discovery.enabled`, finite depth/state/action bounds, and positive `allow_actions` rules; unlisted actions are denied unless `allow_unlisted_actions` is explicitly true. Discovered endpoints remain separate from confirmed static edges. External adapters must emit `utg-event/1`; replay imported discoveries before confirming edges.
|
|
@@ -79,7 +85,7 @@ Use the existing screenshots, UI trees, action history, static page ownership, s
|
|
|
79
85
|
1. **A: recover page identity offline.** Run `node scripts/recover.mjs extract <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`. For each `recovery_worklist.json` item, inspect its example screenshots and trees, the page's source and layouts, and conflicting captures. Write `recovery_answers.json` using source-owned positive anchors and any needed negative anchors. A `modal_title` anchor matches source text only in a dialog's `alertTitle` or `dialog_title`, avoiding a same-text preference row or menu item. Run `node scripts/recover.mjs apply <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`, then `node scripts/report.mjs <campaign-dir>`. Inspect `recovery_report.json`: repair rejected answers where evidence permits; leave genuinely ambiguous captures unresolved. Applying accepted rules rejudges all observations and can recover downstream replay obligations without device input. Skip `apply` when the worklist is empty.
|
|
80
86
|
2. **Retry newly recognized replay hops.** Run `node scripts/recover_b.mjs retry-identities <campaign-dir> --config <config.json>` after A. It places tasks whose failed replay capture now proves the expected page into `recA-*` phases without altering their gestures. Execute every phase in `recovery_a_retry_phases.txt` with `run_device.mjs --tasks`, then report. Do not train a new gesture for an identity failure already resolved by A. A retry that gets one hop further can fail there on identity again: re-extract A, answer the new items, apply and retry again (`run_cycle.mjs` does this up to `A_PASSES` = 3 times per round). Such failures belong to A, not to B.
|
|
81
87
|
3. **B and C: recover actions.** After A retries, run `node scripts/recover_b.mjs extract <campaign-dir> --static <static-utg> --project <source-project>` and the same command with `--class C`. Review the failed-step screenshot/tree, static trigger, source window and available controls; write `recovery_b_answers.json` and `recovery_c_answers.json`. For each nonempty class, run `node scripts/recover_b.mjs apply <campaign-dir> --config <config.json> --class <B-or-C>` (substitute `B` or `C`). Execute every phase listed in its `recovery_b_phases.txt` or `recovery_c_phases.txt` with `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget <bounded-budget>`. Then run `node scripts/recover_b.mjs adopt <campaign-dir>` and `node scripts/report.mjs <campaign-dir>`. Only device-confirmed steps become learned steps; a proposed gesture is not coverage.
|
|
82
|
-
4. **D: recover data states.** Run `node scripts/recover_d.mjs extract <campaign-dir> --config <config.json>` after B/C verdicts. `recovery_d_worklist.json` holds keyed `items`: one per B/C item answered `unreachable`, and one per group of phases sharing the same `requires`, covering phases already `blocked` and still-`pending` phases that the config gives no fixture or probe. Large worklists split with `worklist_parts.mjs` like A–C. Answer each item by `key` with `verdict: "recipe"` (`tasks` default to the item's) or `verdict: "skipped"` and the reason; recipe ids and new fixture file names start with the item key. Write recipes only for states constructible with verified in-app steps and positive probes. When a recipe depends on background work with a network constraint (e.g. WorkManager requiring connectivity), verify that Android considers the device network `VALIDATED`; fixture-server reachability alone does not satisfy that constraint. Probe a source-backed completion signal, not text that also appears while the work is still pending. Probe texts must be on the target screen at rest: a sticky section title that only appears while scrolling, or a dialog's text, never matches after relaunch. When a recipe's steps run but its probe misses, the phase blocks `state-probe-failed` and `run_cycle.mjs` offers it back once as a `probe-revision` item carrying the screen's `visible_texts` and `screenshot`; answer `verdict: "revise"` with `probes` whose texts are all in `visible_texts` and tell the target state apart from the base one (apply rejects any other text), or `skipped` when that screen is not the wanted state. Every text or content_desc a recipe step taps must be copied exactly from the worklist's `screen_texts` (per page: the texts the device showed, then the page's source texts), from a value the recipe types, or from one of its new fixture files; apply rejects any other text and names the closest known one. When a recipe stops on a step whose control is not on screen, the phase blocks `fixture-step-failed` and the same pass offers it back once as a `step-revision` item carrying the recipe's steps, the screen's `visible_texts` and `screenshot`; answer `verdict: "revise"` with new `steps` (optionally `probe_steps`) whose tapped texts are in `visible_texts` or `screen_texts`, or `skipped`. Run `node scripts/recover_d.mjs apply <campaign-dir> --config <config.json>`, execute the phases in `recovery_d_phases.txt`, then rerun the report. Record account, hardware, external-app, or build-flavor requirements that cannot be established in this environment as explicit limitations.
|
|
88
|
+
4. **D: recover data states.** Run `node scripts/recover_d.mjs extract <campaign-dir> --config <config.json>` after B/C verdicts. `recovery_d_worklist.json` holds keyed `items`: one per B/C item answered `unreachable`, and one per group of phases sharing the same `requires`, covering phases already `blocked` and still-`pending` phases that the config gives no fixture or probe. Large worklists split with `worklist_parts.mjs` like A–C. Answer each item by `key` with `verdict: "recipe"` (`tasks` default to the item's) or `verdict: "skipped"` and the reason; recipe ids and new fixture file names start with the item key. Write recipes only for states constructible with verified in-app steps and positive probes. `snapshot_landings` shows the screen each base lands on after relaunch (its state, page and texts): a recipe's steps start from that screen, and apply rejects a recipe whose steps only wait while its probe names an activity, text or id the base landing does not show (measured: six wait-only "device list" recipes on first-launch data, which lands on the agreement dialog, each failed on the device). When a recipe depends on background work with a network constraint (e.g. WorkManager requiring connectivity), verify that Android considers the device network `VALIDATED`; fixture-server reachability alone does not satisfy that constraint. Probe a source-backed completion signal, not text that also appears while the work is still pending. Probe texts must be on the target screen at rest: a sticky section title that only appears while scrolling, or a dialog's text, never matches after relaunch. When a recipe's steps run but its probe misses, the phase blocks `state-probe-failed` and `run_cycle.mjs` offers it back once as a `probe-revision` item carrying the screen's `visible_texts` and `screenshot`; answer `verdict: "revise"` with `probes` whose texts are all in `visible_texts` and tell the target state apart from the base one (apply rejects any other text), or `skipped` when that screen is not the wanted state. Every text or content_desc a recipe step taps must be copied exactly from the worklist's `screen_texts` (per page: the texts the device showed, then the page's source texts), from a value the recipe types, or from one of its new fixture files; apply rejects any other text and names the closest known one. When a recipe stops on a step whose control is not on screen, the phase blocks `fixture-step-failed` and the same pass offers it back once as a `step-revision` item carrying the recipe's steps, the screen's `visible_texts` and `screenshot`; answer `verdict: "revise"` with new `steps` (optionally `probe_steps`) whose tapped texts are in `visible_texts` or `screen_texts`, or `skipped`. Run `node scripts/recover_d.mjs apply <campaign-dir> --config <config.json>`, execute the phases in `recovery_d_phases.txt`, then rerun the report. Record account, hardware, external-app, or build-flavor requirements that cannot be established in this environment as explicit limitations.
|
|
83
89
|
5. If recovered identities expose new B/C candidates, or verified state fixtures expose new tasks, repeat the affected extraction and replay while evidence-backed candidates remain and the device budget permits. Finish with the final report and the remaining gap reasons. Do not force-match unresolved screenshots or count unsupported tasks as confirmed pages.
|
|
84
90
|
|
|
85
91
|
6. **Direct launch for pages no route reached.** Run `node scripts/direct_launch.mjs extract <campaign> --static <static-utg> --project <source-project>`. It lists each uncovered page and the exported Activities with the intent extras their own source reads (for example a host's fragment-selector key, an item id or a mode flag). Answer `direct_launch_answers.json` with `launch` (component, extras from `reads_extras` with values taken from source, at most 5 class-B steps, the configured phase whose state the page needs, and the dispatching source line) or `skip`. Then run `direct_launch.mjs apply <campaign> --config <config.json>` and execute `direct_launch_phases.txt`. These tasks confirm the page's own capture only and write no edge mapping. The report lists pages confirmed only this way under `mapped_via_direct_launch`. Build flavors, accounts, hardware and source-dead branches cannot be launched; record them as `skip`. A host Activity whose own source reads no intent extra, and whose bare launch was already verified to show one of its child pages, is answered `skip` by `extract` itself (`auto_skipped` in the worklist, `auto: true` in `direct_launch_report.json`). A reviewer could only reach that verdict, since any key would be invented, so reviewing such an item is pure cost. **uni-app / hybrid pages are never sent to review**: `extract` puts them in `auto_routes` and `apply` schedules the same deterministic route task (`uni.reLaunch`) that `compile_tasks.mjs` emits, under `p0-routes*`, with no `direct_launch_answers.json` needed.
|
|
@@ -109,10 +109,10 @@ A variant JSON requires `id`, `requires`, `fixtures`, `probes` and `cleanup`; `f
|
|
|
109
109
|
|
|
110
110
|
Long pages use multi-viewport evidence instead of overwriting same-named screenshots or stitching by default. utg.html can switch states, viewports and all raw observations, enlarge the original image on click, and expand the corresponding widget tree. The image may change under an identical widget tree, so every raw capture remains viewable. The existing capture is target-navigation capture and cannot prove the page was scrolled from top to bottom; multiple images are not equivalent to a full long screenshot. The offline HTML embeds its data, with no CDN or fetch; include the artifacts directory when sharing.
|
|
111
111
|
|
|
112
|
-
## Additional Capabilities (2026-09
|
|
112
|
+
## Additional Capabilities (2026-09 regression fixes)
|
|
113
113
|
|
|
114
114
|
- **NL hint compilation**: on-screen text quoted with `"…"`/`'…'` in `nl_hints` is compiled, in clause order, into multi-step clicks; intermediate steps (such as a bottom bar's "More" popup menu) are marked `intermediate` and their page is not verified; "any one / the first … row/item/cover" compiles to `click_list_item` (tap the first actionable row of the only scrollable list); `[id:name]` compiles to a resource-ID selector; a hint starting with "(no action)" is treated as an automatic step. Leading description clauses that repeat the previous hop are removed to avoid duplicate clicks.
|
|
115
|
-
- **`restore_app_data` fixture**: `{"type":"restore_app_data","archive":"<tar>","clear_dirs":[...]}` restores a debuggable package's private data snapshot via `run-as` (after a force-stop), used to enter content phases such as “has subscriptions / currently playing” reproducibly; the snapshot is a campaign input and is not generated automatically.
|
|
115
|
+
- **`restore_app_data` fixture**: `{"type":"restore_app_data","archive":"<tar>","clear_dirs":"all"|[...]}` restores a debuggable package's private data snapshot via `run-as` (after a force-stop; `"all"` first removes every data-dir entry except `cache`/`code_cache`/`lib`, the same entries `snapshot_app_data` archives by default), used to enter content phases such as “has subscriptions / currently playing” reproducibly; the snapshot is a campaign input and is not generated automatically.
|
|
116
116
|
- **Replay snapshots for non-debuggable packages**: when `run-as` is unavailable (release builds, closed-source APKs), the snapshot becomes `<name>.replay.json`, whose content is the step chain that rebuilds the state from cleared data. Restore = `clear_app_data` (`pm clear`, which also resets runtime permissions) → launch → replay the step chain; save = `save_replay` (step chain + this recipe's steps, written only to `snapshot_dir`, never overwriting). A D recipe's output is of the same kind as its base; the step chain is capped at 60 steps in total. `d_prereqs.mjs snapshot` probes `run-as` to choose the mode automatically; `config.snapshot_mode` (`auto`/`tar`/`replay`) can force it.
|
|
117
117
|
- **Launch isolation**: `restart` adds `-f 0x10008000` (NEW_TASK|CLEAR_TASK) to the launch, so system settings / browser pages left in the app's task stack do not sit in front of a “fresh launch”; implicit VIEW/action intents with a `component_fqn` are pinned to the target component with `-n`.
|
|
118
118
|
- **Additional page-identification tiers**: a foreground page from a different package is always `foreign-package` and is not mapped to a static node. The package is taken from the **captured widget tree** (majority vote over node `package`, `semantics.tree_package`), not from the foreground component in `dumpsys window`: the latter lags, and right after launch or when a system chooser pops up it still reports the app's Activity while the dump shows the file picker or the launcher. Such observations used to be misjudged as app pages by `exact-activity`. An observation record's `package` field is the tree's package; when the two disagree, the foreground component's package is stored separately as `component_package`. `rejudge.mjs` re-judges old evidence by the same rule; preference rows use only `android:id/title` (excluding persistent bar text such as bottom navigation); a unique toolbar-title match is `unique-toolbar-title` (including Compose top bars: a title TextView with no Toolbar class and no id, within the top 12% of the window, not in a scrollable container, with a clickable navigation icon to its left under the same parent, `semantics._composeTopBarTitle`); a unique combination of the page's own layout IDs is `own-layout-ids` (static `layout_ids` preferred); dialogs with runtime titles are identified by their own layout IDs. Strings and preference XML are resolved across all project modules.
|
|
@@ -120,28 +120,46 @@ Long pages use multi-viewport evidence instead of overwriting same-named screens
|
|
|
120
120
|
- **Source-page reuse**: the current screen is reused only on an exact page-identity match; a host Activity component match no longer counts as already being on the source page. An automatic embedded section without its own anchor can be confirmed by `source_context` (the last gesture target).
|
|
121
121
|
- **`overflow_openers`**: configured positive rules (such as a bottom bar's "More") are each tried once after the selector is not found and scrolling yields nothing; if they miss, the runner goes back. Besides configured items, the runner also **derives** openers from the campaign's own routes: it takes the selector groups of `intermediate` hops in each task's replay that are within `derived_opener_depth` (default 1) steps of launch and still have steps after them, sorted by occurrence count, up to `max_derived_overflow_openers` (default 4). A container one route already has to open first (a bottom bar's "More", a toolbar menu) can thus be found even when another route omits that step. No app-specific vocabulary is written.
|
|
122
122
|
- If the target is still not found after tapping an opener: press Back only if the screen changed; if the opener switched Activity, or landed on a verified page that is not an overlay type (menu/dialog/panel/overlay/ui-state/mode), it is navigation rather than a container and is not tried again in this run.
|
|
123
|
-
- **Waiting for content to load** (`content_wait_seconds`, default 10): if a post-action screenshot has an identified page but still looks like it is loading (a visible near-square `ProgressBar`; visible text of the app under test still holding an unformatted placeholder `%1$s` / `%2$d` / `%.1f` / `%02d` / `%1$tY` / a standalone `%s` (`UNFORMATTED_TEXT`: the layout's `android:text` default, i.e. how the screen looks before data arrives; a non-positional specifier must not touch an ASCII letter or digit (`5%d`, a URL's `%20` do not count), while adjacent CJK text is fine (a CJK word right before `%s` or right after `%d`); text inputs (EditText, AutoCompleteTextView, SearchAutoComplete), text inside a list row or WebView (under a RecyclerView / ListView / GridView / WebView: bound data) and text longer than 40 characters (content, not a layout default) excluded;
|
|
124
|
-
- **Waiting out the blank transition frame** (`blank_wait_seconds`, default 6): a post-action capture of the app under test whose own visible nodes carry no text, no content description and nothing clickable is the frame between two pages (the old page gone, the new one not yet laid out). It resolves to no page, so the content wait above never applied to it. Such a frame is not mapped either, and is captured again every 0.5 s until content appears. With no page to remember it by, a wait that runs out does not cancel the wait of the next, unrelated transition; after 3 blank waits in a row run out (`BLANK_RUN_OUTS`) blank frames are how this app looks (an image viewer, a canvas) and are no longer waited on, and one wait that ends on content resets the count. An app that has never shown a labelled screen (a Canvas or Flutter app without semantics) is never judged blank, nor is another app in the foreground (a launcher, a system dialog). Measured
|
|
123
|
+
- **Waiting for content to load** (`content_wait_seconds`, default 10): if a post-action screenshot has an identified page but still looks like it is loading (a visible near-square `ProgressBar`; visible text of the app under test still holding an unformatted placeholder `%1$s` / `%2$d` / `%.1f` / `%02d` / `%1$tY` / a standalone `%s` (`UNFORMATTED_TEXT`: the layout's `android:text` default, i.e. how the screen looks before data arrives; a non-positional specifier must not touch an ASCII letter or digit (`5%d`, a URL's `%20` do not count), while adjacent CJK text is fine (a CJK word right before `%s` or right after `%d`); text inputs (EditText, AutoCompleteTextView, SearchAutoComplete), text inside a list row or WebView (under a RecyclerView / ListView / GridView / WebView: bound data) and text longer than 40 characters (content, not a layout default) excluded; one app's home page kept placeholder-bearing layout defaults as its visible text for about 8 s after every launch while the widget tree stayed still, so `settle()` cannot detect it); or the page source has 3+ fixed texts while the screen has at most 2 text nodes and at most 1 of them matches), it is not mapped yet and is re-captured every 0.5s until the content appears. If it is still loading after the full wait it is mapped anyway, with `loading: true` on the `mapping` event; once a page has waited out the full period, it is not waited for again until a capture shows it loaded (it was only slow, e.g. a first fetch that outlasted the wait), after which the next visit waits again; that grace is given once per page per run, and after a second full wait the page is not waited on again in that run. A page with a permanent spinner, a literal `%s`, or one that flips between a loading-looking and a loaded view (a scroll hides the spinner) therefore pays the wait at most twice per run. Pages captured only in a loading state are listed in `report.md` under "Pages captured only while loading". Wide bar-shaped `ProgressBar`s (storage usage, download progress) do not count as loading.
|
|
124
|
+
- **Waiting out the blank transition frame** (`blank_wait_seconds`, default 6): a post-action capture of the app under test whose own visible nodes carry no text, no content description and nothing clickable is the frame between two pages (the old page gone, the new one not yet laid out). It resolves to no page, so the content wait above never applied to it. Such a frame is not mapped either, and is captured again every 0.5 s until content appears. With no page to remember it by, a wait that runs out does not cancel the wait of the next, unrelated transition; after 3 blank waits in a row run out (`BLANK_RUN_OUTS`) blank frames are how this app looks (an image viewer, a canvas) and are no longer waited on, and one wait that ends on content resets the count. An app that has never shown a labelled screen (a Canvas or Flutter app without semantics) is never judged blank, nor is another app in the foreground (a launcher, a system dialog). Measured: every list row tap first captured a 38-node frame of bare Views and the list probe judged at once that no row opened the detail page; the same tap followed by a 4 s wait landed on it.
|
|
125
125
|
- **First-run page bridging** (`launch_chain_wait_seconds`, default 6): at compile time a task records the pages reached automatically after launch (`launch_chain`, e.g. Main in Splash → Main) and the launch landing page (`launch_page`, Splash). If `source()` is still on `launch_page` after launch, it waits for it to leave first; if it then lands on a page outside the chain (a first-run Guide) and there is a compiled task from that page into a chain page, that task is run first (event `launch_bridge`; on failure `launch_bridge_failed` is recorded and control passes to the source-page check). Every launch that lands outside the chain is bridged; the exit usually writes a first-run flag, so later launches no longer pass through that page.
|
|
126
126
|
- **Off-path edges**: answers that `a2h-utg-static` nl_hints gives for unlabeled edges with no click path ending on them are written to `click_paths.json` `edge_hints` (key `<source>|<target>|<trigger>`). With an `nl_hint` they compile to a click; an answer of `not_clickable` compiles to `needs_external` with `edge-not-clickable` in `compile_issues`, and class-C recovery skips it.
|
|
127
127
|
- **Prefix circuit breaker** (`prefix_memo`, on by default): within one run, once a task's “launch + first n replay steps” fails for a deterministic reason (`selector-not-found-after-bounded-scroll`, `replay-target-unverified:`, `ambiguous selector`, `list-item:`, missing single scroll container), later tasks sharing that prefix are judged by start (`fresh` after a data clear, else `warm`) plus landing page: when the landing is predictable (a fresh start; a warm start that last landed on a launch-chain page, or, with no chain, two warm starts in a row that landed the same) they are recorded as `failed` before any clear or launch; otherwise they launch once, wait past the launch page (Splash), take the landing before `launchBridge`, and are recorded directly as `failed` only when it matches with the same reason, plus `prefix_failed_from` (the first failing task), `prefix_key`, `replay_index` and `prefix_before` (the observation at the start of that step). The evidence points to the observation of the first failure. Class-B extraction locates the failing step by `replay_index` and `prefix_before`, so these tasks fall into the same item as the first task and need only one review. Transient failures such as device errors do not trip the breaker.
|
|
128
|
-
- **Proven routes replace a failed prefix** (`reroute_replay`, on by default): when replay step i fails for one of the deterministic reasons above and the step names the page it opens, and this run already reached that page for real (a verified capture, not an attestation) in the same environment, from the same start and landing, steps 0..i are replaced by that proven route and the task runs once more; a prefix-memo hit tries the same replacement first. Each task is rerouted once (the substitute carries `rerouted_from`), reported as a `replay_rerouted` event; with no proven route the task fails or is cut as before. Measured
|
|
129
|
-
- **Unexpected dialogs (interruption)**: a widget tree whose single root node covers < `modal_max_screen_share` (default 0.85) of the screen and contains clickable widgets is treated as an overlay (AlertDialog, permission, rating, metered-refresh confirmation, etc.). If the overlay is not the current task's source page, target page or `source_context`, it is checked once before the selector lookup, after every search scroll and after replaying to the source page, and handled in order: first `interruption_rules` (`{id?, when: <rule>, action}`); next, the app under test's own first-launch consent dialog (text or content_desc naming a privacy policy / user agreement / terms of service, `CONSENT_RE`; a WebView body exposes its words only in content_desc; nodes without a package count as the app's) is accepted by tapping its positive control: `android:id/button1` (matched on its full id; not when its label declines, such as "Disagree" / "Decline" / "Exit", `CONSENT_DECLINE_RE`), else the one non-toggle node (not a CheckBox / Switch) in a custom layout whose whole text is "Agree" / "Agree and continue" / "I agree" / "Accept" (`CONSENT_POSITIVE_RE`, whole-label match, so "Disagree" / "I have read and agree" never count). Only when that control is present but disabled is a CheckBox ticked first ("I have read and agree"): the first one whose text names consent (one per pass, so two required boxes take two passes; ticks do not use up `max_interruption_dismissals`), else the only unticked one; several unticked boxes none of which names consent ("receive push notifications") are not guessed at (`consent_default`, on by default, event `rule: consent-default`). A dialog recognised as a consent dialog with no safe positive control that offers a way to decline (`android:id/button2`, or a control whose whole label is "Disagree" / "Decline and exit" and the like, `CONSENT_DECLINE_RE`) is left as it is rather than falling back to Back/button2, logged as an event with `outcome: unresolved`; one with no way to decline (a one-tap login sheet whose fine print says "logging in means you agree to the User Agreement") still gets the generic Back. This applies only after a launch and before any action other than a dismissal, a wait or a scroll (`_launched`, kept by `atom()`; cleared when a launch fails, at the start of every task and at the start of `run()`): such a dialog is one the app raises by itself on start; a dialog naming an agreement that appears after a task's click ("withdraw consent", "delete account", "logging in means you agree") confirms that click and still goes through Back/button2. A consent click with no effect is not retried and does not fall back to Back; then Back, and if Back does not dismiss it, tap `android:id/button2`. A consent dialog must not go through Back/button2: Back closes the Activity and button2 is usually "decline and exit" (measured on
|
|
130
|
-
- **Upward scroll stops at the origin**: when searching for a widget, it scrolls down first, then scrolls back up and stops at the origin (`_backAtOrigin`) instead of one extra swipe. Swiping up at the top of a list is pull-to-refresh (SwipeRefreshLayout and similar, common in open-source apps), which triggers network or metered-data dialogs. In
|
|
131
|
-
- **Pager tab pages** (
|
|
128
|
+
- **Proven routes replace a failed prefix** (`reroute_replay`, on by default): when replay step i fails for one of the deterministic reasons above and the step names the page it opens, and this run already reached that page for real (a verified capture, not an attestation) in the same environment, from the same start and landing, steps 0..i are replaced by that proven route and the task runs once more; a prefix-memo hit tries the same replacement first. Each task is rerouted once (the substitute carries `rerouted_from`), reported as a `replay_rerouted` event; with no proven route the task fails or is cut as before. Measured: every logged-out task reached Login through one ambiguous home-page entry while other tasks of the run had reached Login another way, and every task behind that hop failed or was cut.
|
|
129
|
+
- **Unexpected dialogs (interruption)**: a widget tree whose single root node covers < `modal_max_screen_share` (default 0.85) of the screen and contains clickable widgets is treated as an overlay (AlertDialog, permission, rating, metered-refresh confirmation, etc.). If the overlay is not the current task's source page, target page or `source_context`, it is checked once before the selector lookup, after every search scroll and after replaying to the source page, and handled in order: first `interruption_rules` (`{id?, when: <rule>, action}`); next, the app under test's own first-launch consent dialog (text or content_desc naming a privacy policy / user agreement / terms of service, `CONSENT_RE`; a WebView body exposes its words only in content_desc; nodes without a package count as the app's) is accepted by tapping its positive control: `android:id/button1` (matched on its full id; not when its label declines, such as "Disagree" / "Decline" / "Exit", `CONSENT_DECLINE_RE`), else the one non-toggle node (not a CheckBox / Switch) in a custom layout whose whole text is "Agree" / "Agree and continue" / "I agree" / "Accept" (`CONSENT_POSITIVE_RE`, whole-label match, so "Disagree" / "I have read and agree" never count). Only when that control is present but disabled is a CheckBox ticked first ("I have read and agree"): the first one whose text names consent (one per pass, so two required boxes take two passes; ticks do not use up `max_interruption_dismissals`), else the only unticked one; several unticked boxes none of which names consent ("receive push notifications") are not guessed at (`consent_default`, on by default, event `rule: consent-default`). A dialog recognised as a consent dialog with no safe positive control that offers a way to decline (`android:id/button2`, or a control whose whole label is "Disagree" / "Decline and exit" and the like, `CONSENT_DECLINE_RE`) is left as it is rather than falling back to Back/button2, logged as an event with `outcome: unresolved`; one with no way to decline (a one-tap login sheet whose fine print says "logging in means you agree to the User Agreement") still gets the generic Back. This applies only after a launch and before any action other than a dismissal, a wait or a scroll (`_launched`, kept by `atom()`; cleared when a launch fails, at the start of every task and at the start of `run()`): such a dialog is one the app raises by itself on start; a dialog naming an agreement that appears after a task's click ("withdraw consent", "delete account", "logging in means you agree") confirms that click and still goes through Back/button2. A consent click with no effect is not retried and does not fall back to Back; then Back, and if Back does not dismiss it, tap `android:id/button2`. A consent dialog must not go through Back/button2: Back closes the Activity and button2 is usually "decline and exit" (measured on one app: every task met the dialog after its data was cleared, and 0 of 64 tasks confirmed). When the positive control's label is outside that set, write an `interruption_rules` entry. Each overlay is handled at most `max_interruption_dismissals` times (default 2). Each handling records an `interruption` event containing the first 6 text segments and the action used, which can be used to write new rules.
|
|
130
|
+
- **Upward scroll stops at the origin**: when searching for a widget, it scrolls down first, then scrolls back up and stops at the origin (`_backAtOrigin`) instead of one extra swipe. Swiping up at the top of a list is pull-to-refresh (SwipeRefreshLayout and similar, common in open-source apps), which triggers network or metered-data dialogs. In one app's round 1 this made 35/65 tasks fail and covered only 7 pages. When the origin is mid-list and the search must go upward, set `search_above_origin: true`.
|
|
131
|
+
- **Pager tab pages** (measured in practice: two tabs were never captured):
|
|
132
132
|
- Reaching a tab: a `pager-swipe` edge whose click-path hint says to tap the tab (`tap the "X" tab`) compiles to that tap, which reaches any index in one step. Only without a hint does it swipe, once per page (`repeat` = the difference between the two `pager_index` values).
|
|
133
133
|
- Swipe start: a non-drawer swipe starts 1/5 of the screen width in from the edge, out of the system back-gesture zone. Only a drawer swipe (`from_edge`) starts at the edge.
|
|
134
|
-
- Identifying the tab: `tabLabelOf` takes `tab_label` from hints shaped like `… "X" tab … switch to the X page`. When a bottom row holds two or more known tab labels, the whole row (a Compose NavigationBar) is left out of body text, so the tab label
|
|
134
|
+
- Identifying the tab: `tabLabelOf` takes `tab_label` from hints shaped like `… "X" tab … switch to the X page`. When a bottom row holds two or more known tab labels, the whole row (a Compose NavigationBar) is left out of body text, so the page carrying a tab label is no longer resolved as a different page that happens to share that word.
|
|
135
135
|
- **Framework text localization**: AppCompat accessibility texts such as `More options` get localized selectors generated per `--locale`, with English kept as a fallback.
|
|
136
136
|
- **Undrivable entries**: `external-surface` entries compile to `entry-requires-external-surface`; components absent from the installed package are recorded as `unsupported: entry-component-not-installed`. Both are adapter limitations, not page unreachability.
|
|
137
137
|
- **Storage**: `events.jsonl` is appended per event; `campaign.json` is rewritten at most every `save_interval` seconds (default 15) and at each task verdict, so large campaigns are not fully serialized on every action.
|
|
138
138
|
|
|
139
139
|
## Phase Partitioning and Unrunnable Phases (2026-09-29)
|
|
140
140
|
|
|
141
|
-
- **Task-level preconditions no longer split phases**: `plan.mjs`'s `TASK_LEVEL_KINDS` (`ui-state`, plus `launch-intent:` guards) are only recorded on the task's `task_preconditions` and do not take part in phase grouping. In-flow states (text entered, filter opened) are reached by the gesture sequence in the same environment; launch parameters are carried by the task's own launch action. On
|
|
142
|
-
- **Launch parameters**: static guards carry `launch_extras` (key constants resolved to literals, accessor type, branch-determined booleans). `compile_tasks.mjs --launch-values <json>` supplies values only the campaign knows (such as a particular
|
|
143
|
-
- **Transitions triggered inside a panel (`panel_routes.mjs`, 2026-11-02)**: homegraph attributes a `startActivity` inside a helper function (such as `
|
|
144
|
-
- **`close_phases.mjs`**: runs after device phases end and marks phases
|
|
141
|
+
- **Task-level preconditions no longer split phases**: `plan.mjs`'s `TASK_LEVEL_KINDS` (`ui-state`, plus `launch-intent:` guards) are only recorded on the task's `task_preconditions` and do not take part in phase grouping. In-flow states (text entered, filter opened) are reached by the gesture sequence in the same environment; launch parameters are carried by the task's own launch action. On one measured app the phase count dropped from 63 to 19. On failure, `task_result.unmet_preconditions` names the in-flow states not reached.
|
|
142
|
+
- **Launch parameters**: static guards carry `launch_extras` (key constants resolved to literals, accessor type, branch-determined booleans). `compile_tasks.mjs --launch-values <json>` supplies values only the campaign knows (such as a particular content-item id), optionally with `requires` so the task lands in a phase where that value exists; a missing value compiles to `launch-extra-value-required:<key>` without guessing. The adapter generates `--ez/--el/--ei/--es` arguments by type and validates them against a character whitelist.
|
|
143
|
+
- **Transitions triggered inside a panel (`panel_routes.mjs`, 2026-11-02)**: homegraph attributes a `startActivity` inside a helper function (such as `openItem()`) to the page that owns the helper, and the edge carries no trigger id, so the compiled task taps the target's label directly on that page. When every call site of the helper is a click listener of a view inside one static panel (evidence: the view variable appears in the panel's `declared_at`/`evidence` lines), `compile_tasks.mjs` inserts a "tap the panel's open-overlay trigger" step (`intermediate: true`) into the edge task's `prelude` and before replay steps that cross this edge, and puts the in-panel views' resource names first in the selectors. If any call site is not a listener of a panel view, nothing is rewritten; a call in the opener's own listener (a FAB whose first tap opens the speed dial and whose second tap, with the panel open, creates an item) still counts as a panel call, because the panel has to be opened first. Nothing is rewritten either when the helper is not private and another source file calls it (`x.fn(`, `::fn`, or an unqualified `fn()` in a subclass). Routes are recorded per edge: when the same page pair has another edge without a trigger id (for example an edit entry from a menu), that edge's task gets no opener, and a replay step, which cannot tell the edges apart, gets none either. Replay first looks for a route from the current page; before any gesture it also accepts a route on a page the launch page reaches by itself through a lifecycle/startDestination or other automatic edge. A replay step rewritten by a hint gets the opener only when its final tap is still a panel member. Requires `--project`; the sources are read once per compile. One app's jump: the FAB first opens a speed-dial panel, then a button inside it reaches the target page; two such entries cover 22 tasks.
|
|
144
|
+
- **`close_phases.mjs`**: runs after device phases end and marks phases that have no fixtures/probes and that no stage-S state variant serves (`schedule_states.mjs isServed`) as `blocked`, with a reason naming the unmet preconditions and the number of compiled tasks among them, so the report no longer shows them as `pending`. The predicate `unrunnable(phase, config, doc)` is also reused by class-D extraction, so D can see these phases before this step.
|
|
145
|
+
|
|
146
|
+
## Data State Inventory and Evidence-Based Scheduling (2026-11-26)
|
|
147
|
+
|
|
148
|
+
Motivation (universalapp TV, 2026-11-25): the device was handed over logged in with a non-empty device list. `d_prereqs snapshot` ran `pm clear` first and the login was lost; 16 state phases blocked because no fixture was configured, so none of their 160 tasks ran; D's 6 recipes were all "`fresh.tar` + wait", while first-launch data lands on the agreement dialog, so all 6 probes failed. Three root causes: requirements were natural language that was never decided on the device; the device's data state was neither recorded nor protected; and a task's state was fixed at planning time.
|
|
149
|
+
|
|
150
|
+
- **State inventory** `states.json` (`utg_explorer/states.mjs`): each state records how to enter it (archive / live only), whether it can be restored, and its landing observation (the screen after a cold launch: activity, resolved page, texts and ids). `d_prereqs initial` records `initial` before any device action, `d_prereqs snapshot` records `fresh`, and a D recipe's `snapshot_app_data` yields a new state derived from the event log (its landing is the capture after the relaunch). `timeline` records data changes d_prereqs made outside the runner. `deriveStates` attributes every verified capture to the state the device held at that moment.
|
|
151
|
+
- **Invariant**: user data is never wiped unrecoverably. Without `run-as`, `initial` is recorded as live only, `config.user_state_protected=true`, and the adapter refuses every clear / restore. The cycle ends with `d_prereqs restore-initial`.
|
|
152
|
+
- **Deciding requirements** (`requirementHolds`): (a) route evidence: when the plan puts a page behind the requirement and the requirement is not that page's own guard, the page rendering in the state proves it (a device detail page opens only from a device card); an own guard does not count (the device list renders with an empty list too, the login page renders exactly when logged out). (b) compiled predicates `predicates.json`: `predicates.mjs` offers one review item per distinct requirement, answered with `{page, rule?}` clauses (selectors must come from that page's layout, source texts or captures), or `unevaluable` (a code branch with no visible effect: assumed, never evidence; a phase whose requirements are all assumed is not scheduled).
|
|
153
|
+
- **Scheduling** (`schedule_states.mjs`, in stage S and again after D): when a plan phase's requirements all hold in a known state, it adds a variant `st-<state>-<n>` whose fixture enters that state (a plain launch on live data, else restore its archive) and whose probe is that state's landing rule (package + activity + up to 3 ids of the landing page's own layout); the origin phase records `served_by`, and D and close_phases skip it; a blocked variant hands it back to D. Tasks that failed on their source page (`source-unverified:<page>`) run in another state where that source page was seen. The first round no longer runs any phase with requirements; `state_phase_fallback` is removed.
|
|
154
|
+
- **D base check**: `recovery_d_worklist.json` carries `snapshot_landings`; apply rejects, without touching the device, a recipe whose steps only wait while its probe names an activity / text / id the base landing does not show.
|
|
155
|
+
|
|
156
|
+
## Multi-Host Targets, Empty Window Trees and In-Route Surfaces (2026-11-26)
|
|
157
|
+
|
|
158
|
+
Origin (one app, Compose): the panel popups were hung on the preview page only (the static UTG kept the nearest host; fixed in a2h-utg-static). The preview page needs data from another page and was never entered, so none of the 6 popups was captured although Main was verified 94 times. Another 22 Compose `Popup` frames had a layout.xml with one invisible root node and became `dynamic:*` pages.
|
|
159
|
+
|
|
160
|
+
- **Multiple hosts** (`utg_explorer/hosts.mjs`): when one target has several sources in the same mechanism family (open-overlay/show-dialog, or `surface-switch`), compile_tasks orders the hosts by verified first, then fewest data preconditions, then shortest replay, and records `host_alternatives` / `host_rank`. A host without a click path of its own borrows the gesture of a sibling edge with the same `trigger` file:line (`provenance.gesture_from_host`). At run time, when a task fails because of its host (source stage failed, `target-unverified`, probing page unverified, selector unavailable on an empty UI, no source path) and the target is still uncovered, the runner tries the next host in the same phase (`<id>@host-retry:<phase>`, event `host_retry`). The gap reason ends with `hosts tried: …`, mirrored in `hosts_tried`.
|
|
161
|
+
- **Empty window trees** (`adapters.mjs`): when the screenshot is not uniform but the dump has fewer than 2 visible app nodes, the adapter settles and dumps all windows again, keeping the richer tree. If it stays empty and the app has produced a usable tree earlier in the session, the observation is marked `tree_unreliable`, resolved as `tree-unreliable` with `candidate_for` the expected target (event `candidate_capture`, `confirmed:false`). Such observations never become dynamic nodes (`promote_dynamic` skips them); `final_utg` lists them as `candidate_captures` on the expected node and reports `tree-unreliable-observations`. `tree_redump:false` turns the re-dump off.
|
|
162
|
+
- **In-route surfaces**: the static UTG now has `in-route-surface` nodes (`surface:<Composable>`) and `surface-switch` edges. They compile as taps and are left out of `panel_routes`; resolution picks the surface when its own body text is on screen (`in-route-surface-body-text`); the runner treats the switch as opening in place, not as leaving the host.
|
|
145
163
|
|
|
146
164
|
## Model-Assisted Recovery · Class A: Learning Page Identity Offline (2026-09-29)
|
|
147
165
|
|
|
@@ -208,7 +226,7 @@ Static analysis found an edge in the code (source page → target page) but does
|
|
|
208
226
|
|
|
209
227
|
## Model-Assisted Recovery · Class D: Building the Required Data State (2026-09-29)
|
|
210
228
|
|
|
211
|
-
Some edges exist in the code but appear only in states the test snapshot does not have, such as
|
|
229
|
+
Some edges exist in the code but appear only in states the test snapshot does not have, such as an entry that appears only with downloaded data, a logged-out or unsubscribed state, a refresh failure or search results. Class-B/C reviewers have already marked these `unreachable` and read the conditions for their appearance from the source. `recover_d.mjs` has the model provide a **recipe** for building that state inside the app, consisting of:
|
|
212
230
|
- which existing snapshot to start from;
|
|
213
231
|
- which steps to perform in the app. The action vocabulary is the same as class B, plus `type` (type ASCII text into the input field tapped in the previous step) and `key` (only ENTER, SEARCH, TAB, DEL);
|
|
214
232
|
- optionally: **adding** files to the local test feed server, but never modifying existing files;
|
|
@@ -230,7 +248,7 @@ If the probes fail the phase blocks and the tasks do not run. The resulting arch
|
|
|
230
248
|
New runner actions:
|
|
231
249
|
- `key`: whitelisted keys;
|
|
232
250
|
- `snapshot_app_data`: may only write to `config.snapshot_dir`.
|
|
233
|
-
- `restore_app_data`: verifies the archive first and errors out directly if it is incomplete, without clearing device data (`adb exec-in` does not return the device-side tar's exit code). The base snapshot `fresh.tar` is produced by `d_prereqs.mjs snapshot` after `pm clear`.
|
|
251
|
+
- `restore_app_data`: verifies the archive first and errors out directly if it is incomplete, without clearing device data (`adb exec-in` does not return the device-side tar's exit code). The base snapshot `fresh.tar` is produced by `d_prereqs.mjs snapshot` after `pm clear`; before that, `d_prereqs.mjs initial` has archived the user's own data as `initial.tar`. When that data cannot be archived (no `run-as`), `config.user_state_protected` is true, every `clear_app_data` / `restore_app_data` is refused, and no `fresh` is taken.
|
|
234
252
|
|
|
235
253
|
`report.md` gains two sections:
|
|
236
254
|
- **Runner capability gaps**: the reviewer proved the edge exists, but the runner cannot do it within its own rules, e.g. a time window shorter than one observation;
|
|
@@ -253,7 +271,7 @@ Each item is answered by `key`:
|
|
|
253
271
|
|
|
254
272
|
## Node Coverage Mode (2026-10-04, default)
|
|
255
273
|
|
|
256
|
-
Use it when the goal is “every static node has its own screenshot and widget tree”. With edge-based planning a node is run once per incoming edge, and the recovery classes repeatedly review items whose target page was captured long ago. Measured
|
|
274
|
+
Use it when the goal is “every static node has its own screenshot and widget tree”. With edge-based planning a node is run once per incoming edge, and the recovery classes repeatedly review items whose target page was captured long ago. Measured in one run: of 469 task results, 140 started with the target page already captured; in B, C and D, the items whose target page was already captured were 24/53, 29/38 and 39/55 respectively.
|
|
257
275
|
|
|
258
276
|
- **Node mode is the default.** For edge verification, set `"coverage_mode": "edges"` in config.json, or use `run_device.mjs --coverage edges` (the command line overrides config).
|
|
259
277
|
- **Definition of “covered”** (`covered_static_ids` in `utg_explorer/coverage.mjs`): the observation of some `mapping` event whose current `static_resolution` is verified as that node, the same rule audit.mjs uses to count mapped. Nodes confirmed via source relations (host, default sub-page, same-layout twin) do not count, because their own screens were never captured.
|
|
@@ -267,16 +285,16 @@ Use it when the goal is “every static node has its own screenshot and widget t
|
|
|
267
285
|
- **Review splitting**: `worklist_parts.mjs split <worklist> --size 10` splits the A, B, C, D and direct-launch worklists into small parts for parallel review, and `merge [--seed]` merges them; missing items, duplicates and unknown keys are all rejected. Class D is grouped by state before splitting (see the class D section).
|
|
268
286
|
- **Event timestamps**: every event carries `ts` (epoch seconds), so the report can compute phase durations; readers ignore the field.
|
|
269
287
|
|
|
270
|
-
Results of offline replay on
|
|
288
|
+
Results of offline replay on an existing run's records (no device rerun):
|
|
271
289
|
|
|
272
290
|
| Metric | Result |
|
|
273
291
|
|---|---|
|
|
274
292
|
| In-task screenshots (runtime identity) | 26% fewer |
|
|
275
293
|
| In-task screenshots (offline rules available early) | 35% fewer |
|
|
276
294
|
| Of which classes C and D | about 75% fewer |
|
|
277
|
-
| Nodes lost because of the 138 skipped tasks | 1 (
|
|
295
|
+
| Nodes lost because of the 138 skipped tasks | 1 (a context-menu page; its own task is not skipped and is still attempted) |
|
|
278
296
|
| Worklists B/C/D | 53/38/55 items → 38/15/29 items |
|
|
279
297
|
|
|
280
298
|
The cost is that edges whose target is already covered are no longer attempted, so fewer edges get verified; when edges are needed, run another round of edge-based tasks.
|
|
281
299
|
|
|
282
|
-
On-device measurement (
|
|
300
|
+
On-device measurement (one node-mode run vs. one edge-mode run): node mode confirmed 114/141 pages and verified 166/412 edges in about 50 minutes of device time; edge mode got 115/141 pages and 254/412 edges in about 107 minutes. The one missing page is a context-menu page, matching the offline replay's prediction.
|
|
@@ -29,6 +29,8 @@ import { ensureRoutePhases, routeTask } from './utg_explorer/hybrid_route.mjs';
|
|
|
29
29
|
|
|
30
30
|
export { valuesDirRank };
|
|
31
31
|
import { panelRoutes } from './panel_routes.mjs';
|
|
32
|
+
import { annotateHosts } from './utg_explorer/hosts.mjs';
|
|
33
|
+
import { coveredStaticIds } from './utg_explorer/coverage.mjs';
|
|
32
34
|
|
|
33
35
|
// ------------------------------------------------------------------ small python helpers
|
|
34
36
|
|
|
@@ -392,7 +394,7 @@ export function compileReplayStep(step, catalog) {
|
|
|
392
394
|
truthy(get(step, 'trigger_id')) ? [step.trigger_id] : [], [get(step, 'label_key')]);
|
|
393
395
|
const common = { selectors: choices, static_label: label, target_id: get(step, 'target_id') };
|
|
394
396
|
const typed = (type) => (choices.length ? [{ type, ...common }, null] : [null, 'missing-replay-selector']);
|
|
395
|
-
if (['tap', 'click', '
|
|
397
|
+
if (['tap', 'click', 'navigate', ...TAP_MECHANISMS].includes(action)) { return typed('click_candidates'); }
|
|
396
398
|
if (['long-press', 'long_press', 'long-click', 'long_click'].includes(action)) { return typed('long_click_candidates'); }
|
|
397
399
|
if (['double-tap', 'double_tap', 'double-click', 'double_click'].includes(action)) { return typed('double_tap_candidates'); }
|
|
398
400
|
// click_paths normalises a drawer swipe to `swipe-right`/`swipe-left` (direction in the action
|
|
@@ -523,6 +525,36 @@ export function replayRoute(ctx, here, step, atLaunch = false) {
|
|
|
523
525
|
return null;
|
|
524
526
|
}
|
|
525
527
|
|
|
528
|
+
/**
|
|
529
|
+
* The gesture another host gives for the same trigger: an edge into the same target with the same
|
|
530
|
+
* static trigger (`onClick@file:line`) from another source, whose click path ends with that source ->
|
|
531
|
+
* target step, or whose nl_hints edge hint names it. A shared composable's panel rendered by two
|
|
532
|
+
* routes has one trigger and one gesture; the click path exists for only one host. -> {step, source}
|
|
533
|
+
* or null. Only a trigger with a file:line counts: a bare mechanism is not the same view.
|
|
534
|
+
*/
|
|
535
|
+
export function sharedTriggerStep(ctx, edge) {
|
|
536
|
+
const trig = pyStr(or(get(edge, 'trigger'), ''));
|
|
537
|
+
if (!/@.+:\d+$/.test(trig)) { return null; }
|
|
538
|
+
const target = get(edge, 'target'); const source = get(edge, 'source');
|
|
539
|
+
for (const other of or(ctx.edges, [])) {
|
|
540
|
+
if (other === edge || get(other, 'target') !== target || get(other, 'source') === source
|
|
541
|
+
|| pyStr(or(get(other, 'trigger'), '')) !== trig) { continue; }
|
|
542
|
+
const steps = get(g(ctx.paths, target, {}), 'steps', []);
|
|
543
|
+
if (steps.length >= 2 && get(steps[steps.length - 2], 'target_id') === other.source) {
|
|
544
|
+
return { step: steps[steps.length - 1], source: other.source };
|
|
545
|
+
}
|
|
546
|
+
const hint = g(ctx.edgeHints, `${pyStr(other.source)}|${pyStr(target)}|${trig}`, null);
|
|
547
|
+
if (truthy(get(hint, 'nl_hint'))) {
|
|
548
|
+
return { step: { nl_hint: hint.nl_hint, label_source: 'code-name', action: or(get(hint, 'action'), 'tap'),
|
|
549
|
+
target_id: target, _edge_hint: true }, source: other.source };
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return null;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/** Mechanisms whose static trigger is a tap on the source page (compiled as a click). */
|
|
556
|
+
export const TAP_MECHANISMS = ['open-overlay', 'compose-navigate', 'surface-switch'];
|
|
557
|
+
|
|
526
558
|
/** next(p for p in phases if sorted(p.requires) == want) or null. */
|
|
527
559
|
const phaseWith = (campaign, want) => get(campaign, 'phases', []).find((p) => arrEq(sortedStr(p.requires), want)) ?? null;
|
|
528
560
|
|
|
@@ -574,6 +606,13 @@ function compileEdge(ctx, edge, i) {
|
|
|
574
606
|
targetStep = { nl_hint: edgeHint.nl_hint, label_source: 'code-name', action: or(get(edgeHint, 'action'), 'tap'),
|
|
575
607
|
target_id: target, _edge_hint: true };
|
|
576
608
|
}
|
|
609
|
+
// One trigger rendered by several hosts (a shared composable's panel): the gesture a sibling host's
|
|
610
|
+
// click path or nl_hint gives for that same trigger is this edge's gesture too.
|
|
611
|
+
let gestureFrom = null;
|
|
612
|
+
if (!truthy(targetStep) && !truthy(label) && !truthy(triggerId) && !truthy(get(edgeHint, 'not_clickable'))) {
|
|
613
|
+
const shared = sharedTriggerStep(ctx, edge);
|
|
614
|
+
if (shared) { targetStep = shared.step; gestureFrom = shared.source; }
|
|
615
|
+
}
|
|
577
616
|
let sourcePath = g(paths, source, {});
|
|
578
617
|
let replay = []; const issues = [];
|
|
579
618
|
if (!has(paths, source)) { issues.push('missing-source-path'); }
|
|
@@ -681,7 +720,7 @@ function compileEdge(ctx, edge, i) {
|
|
|
681
720
|
}
|
|
682
721
|
return compileEdgeTail(ctx, { edge, i, source, target, u, ue, label, triggerId, instructionStep, targetStep, issues,
|
|
683
722
|
replay, sourceLaunch, sourceContext, expected, req, taskPre, assigned, phase, automatic, edgeActionRaw, resourceNames, selectors,
|
|
684
|
-
launchChain, launchPage, route });
|
|
723
|
+
launchChain, launchPage, route, gestureFrom });
|
|
685
724
|
}
|
|
686
725
|
|
|
687
726
|
/**
|
|
@@ -809,7 +848,10 @@ function compileEdgeTail(ctx, s) {
|
|
|
809
848
|
source_launch: sourceLaunch, replay, prelude, task_preconditions: taskPre, action,
|
|
810
849
|
...(launchChain.length ? { launch_chain: launchChain, ...(launchPage !== null ? { launch_page: launchPage } : {}) } : {}),
|
|
811
850
|
status: issues.length ? 'needs_external' : 'compiled', compile_issues: issues,
|
|
812
|
-
provenance: { static_edge_index: i, mechanism: get(edge, 'mechanism'), trigger: get(edge, 'trigger'), ui_hint: get(ue, 'hint')
|
|
851
|
+
provenance: { static_edge_index: i, mechanism: get(edge, 'mechanism'), trigger: get(edge, 'trigger'), ui_hint: get(ue, 'hint'),
|
|
852
|
+
...(s.gestureFrom ? { gesture_from_host: s.gestureFrom } : {}),
|
|
853
|
+
// a surface-switch edge flips this composable state flag of its host route
|
|
854
|
+
...(truthy(get(u, 'state_flag')) ? { state_flag: u.state_flag } : {}) },
|
|
813
855
|
};
|
|
814
856
|
ctx.byKey.set(keyStr, task);
|
|
815
857
|
return task;
|
|
@@ -893,6 +935,9 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
893
935
|
}
|
|
894
936
|
tasks = [...tasks, ...routeTasks];
|
|
895
937
|
}
|
|
938
|
+
// One target opened from several hosts: the cheapest host (already verified, fewest data
|
|
939
|
+
// preconditions) runs first, and each task names the others for the runner's host retry.
|
|
940
|
+
tasks = annotateHosts(tasks, coveredStaticIds(campaign));
|
|
896
941
|
campaign.tasks = tasks;
|
|
897
942
|
for (const p of get(campaign, 'phases', [])) { p.task_count = tasks.filter((t) => t.phase === p.id).length; }
|
|
898
943
|
atomicWriteText(pJoin(root, 'campaign.json'), jsonDumps(campaign, { ensure_ascii: false, indent: 2 }));
|
|
@@ -145,6 +145,7 @@ export function buildFinal(doc, root, staticDoc = null) {
|
|
|
145
145
|
}
|
|
146
146
|
const captures = {}; const observationLookup = new Map(); const nodeLookup = new Map(); const variantLookup = new Map();
|
|
147
147
|
const foreign = new Map();
|
|
148
|
+
const unreliable = { count: 0, candidates: new Map() };
|
|
148
149
|
const viewportLookup = new Map(); const issues = [];
|
|
149
150
|
const actionToAfter = new Map();
|
|
150
151
|
for (const event of doc.events) {
|
|
@@ -208,6 +209,22 @@ export function buildFinal(doc, root, staticDoc = null) {
|
|
|
208
209
|
foreign.set(pkg, (foreign.get(pkg) ?? 0) + 1);
|
|
209
210
|
return;
|
|
210
211
|
}
|
|
212
|
+
// A dump that showed nothing usable of a non-blank screen (task_runner treeUnreliableResolution):
|
|
213
|
+
// no page can be read from it, so it is no dynamic node either. Counted in one issue; a capture the
|
|
214
|
+
// running task expected to be its target is listed on that node as an unconfirmed candidate.
|
|
215
|
+
if (get(resolution, 'status') === 'tree-unreliable' && !swept) {
|
|
216
|
+
if (observationLookup.has(key)) { return; }
|
|
217
|
+
observationLookup.set(key, o);
|
|
218
|
+
unreliable.count += 1;
|
|
219
|
+
const want = get(resolution, 'candidate_for');
|
|
220
|
+
if (truthy(want) && nodes.has(vk(want))) {
|
|
221
|
+
const ev = nodes.get(vk(want)).evidence;
|
|
222
|
+
(ev.candidate_captures ??= []).push({ observation_id: oid, environment_id: env, basis: 'tree-unreliable',
|
|
223
|
+
screenshot: asset(get(get(o, 'artifacts', {}), 'screenshot')) });
|
|
224
|
+
unreliable.candidates.set(want, (unreliable.candidates.get(want) ?? 0) + 1);
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
211
228
|
let ident = get(resolution, 'status') === 'verified' ? get(resolution, 'static_id') : null;
|
|
212
229
|
if (swept) { ident = sweep.static_id; }
|
|
213
230
|
if (!nodes.has(vk(ident))) { ident = null; }
|
|
@@ -258,6 +275,10 @@ export function buildFinal(doc, root, staticDoc = null) {
|
|
|
258
275
|
for (const [pkg, count] of [...foreign].sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0))) {
|
|
259
276
|
issues.push({ kind: 'foreign-package-observations', package: pkg, count });
|
|
260
277
|
}
|
|
278
|
+
if (unreliable.count) {
|
|
279
|
+
issues.push({ kind: 'tree-unreliable-observations', count: unreliable.count,
|
|
280
|
+
candidates: Object.fromEntries([...unreliable.candidates].sort((a, b) => (a[0] < b[0] ? -1 : 1))) });
|
|
281
|
+
}
|
|
261
282
|
assignUiStates({ nodes, captures, stateCandidates, sweeps, nodeLookup, issues, stateCatalog });
|
|
262
283
|
return buildFinalTail(doc, { baseline, staticDoc, nodes, links, edgeLookup, captures, observationLookup, nodeLookup, issues, sweeps });
|
|
263
284
|
}
|