@capagents/forgeqe 2.8.9 → 2.9.1

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.
Files changed (163) hide show
  1. package/HOW_TO_USE.md +250 -22
  2. package/dist/docs-site/docs/desktop/index.html +45 -1
  3. package/dist/docs-site/docs/index.html +335 -4
  4. package/dist/docs-site/docs/search.js +1 -1
  5. package/dist/forgeqe.js +2077 -2022
  6. package/dist/template.html +66 -66
  7. package/dist/web/THIRD_PARTY_NOTICES.md +455 -0
  8. package/dist/web/assets/Agent-BNWcLTrm.js +4 -0
  9. package/dist/web/assets/ApiTests-CZFzjMKc.js +10 -0
  10. package/dist/web/assets/Browse-CeiK4X_V.js +2 -0
  11. package/dist/web/assets/Chat-BqXSNxV2.js +3 -0
  12. package/dist/web/assets/CommandPalette-VSEzjRS1.js +1 -0
  13. package/dist/web/assets/Compare-Bjh-qB8C.js +1 -0
  14. package/dist/web/assets/Cost-BRtni21m.js +1 -0
  15. package/dist/web/assets/Data-Bzn351xU.js +6 -0
  16. package/dist/web/assets/Evidence-eM1ZsFF-.js +1 -0
  17. package/dist/web/assets/Explore-D07Qbzyq.js +2 -0
  18. package/dist/web/assets/Features-DFwuL5cN.js +1 -0
  19. package/dist/web/assets/Flags-pxSAu21R.js +2 -0
  20. package/dist/web/assets/Flaky-BdfqCR6j.js +1 -0
  21. package/dist/web/assets/ForceGraph-DC7NzeR4.js +1 -0
  22. package/dist/web/assets/Impact-CfnvrPzq.js +3 -0
  23. package/dist/web/assets/Jobs-CIKpgvcv.js +5 -0
  24. package/dist/web/assets/KindPage-OyYE9NU7.js +6 -0
  25. package/dist/web/assets/Migration-BQA6MOPN.js +2 -0
  26. package/dist/web/assets/Product-DNe8RV_H.js +7 -0
  27. package/dist/web/assets/Production-ClEiFS1u.js +1 -0
  28. package/dist/web/assets/Quality-BZnQcbb2.js +1 -0
  29. package/dist/web/assets/Readiness-Dk2KZZm4.js +1 -0
  30. package/dist/web/assets/Record-CSapdwkr.js +2 -0
  31. package/dist/web/assets/Regression-C7bZ5sSE.js +5 -0
  32. package/dist/web/assets/Reports-BWtgbiVp.js +2 -0
  33. package/dist/web/assets/Response-DyvlQXek.js +4 -0
  34. package/dist/web/assets/RunDiff-DWV5qdHx.js +1 -0
  35. package/dist/web/assets/Runs-CET6zwQu.js +2 -0
  36. package/dist/web/assets/Steps-DUG1BKJb.js +2 -0
  37. package/dist/web/assets/TestCases-DyicRSqL.js +1 -0
  38. package/dist/web/assets/TestData-D2aWG3dq.js +2 -0
  39. package/dist/web/assets/TestDebt-DobUiGTz.js +1 -0
  40. package/dist/web/assets/Tosca-DvTni6va.js +3 -0
  41. package/dist/web/assets/WhatsNew-B3xewvk5.js +1 -0
  42. package/dist/web/assets/dataParts-rU9wRwfo.js +3 -0
  43. package/dist/web/assets/families-DWrv-fcS.js +1 -0
  44. package/dist/web/assets/filters-BDJYWuRV.js +1 -0
  45. package/dist/web/assets/fold-BgITvJex.js +1 -0
  46. package/dist/web/assets/frame-Dn34zQXO.js +4 -0
  47. package/dist/web/assets/index-BiMUTOBo.js +45 -0
  48. package/dist/web/assets/index-CGfii-zv.css +2 -0
  49. package/dist/web/assets/line-icons-CQ-3V8ax.js +1 -0
  50. package/dist/web/assets/logos-C067hMmF.js +1 -0
  51. package/dist/web/assets/palette-Br50dJuQ.js +1 -0
  52. package/dist/web/assets/parts-CbA0h_uO.js +1 -0
  53. package/dist/web/assets/productParts-BxQnjrHo.js +1 -0
  54. package/dist/web/assets/qualityParts-Cn74cNyX.js +1 -0
  55. package/dist/web/assets/rows-X8lfgK8j.js +1 -0
  56. package/dist/web/assets/segmented-mcjXGwLg.js +1 -0
  57. package/dist/web/assets/thread-Bamx8xqR.js +5 -0
  58. package/dist/web/assets/usePageChat-B-vpiXQ6.js +1 -0
  59. package/dist/web/index.html +5 -3
  60. package/docs/DESKTOP.md +48 -1
  61. package/docs/user-guide.html +335 -4
  62. package/evals/evidence/build/README.md +20 -0
  63. package/evals/evidence/build/base/package.json +1 -0
  64. package/evals/evidence/build/base/src/index.ts +1 -0
  65. package/evals/evidence/build/base/src/pricing.ts +22 -0
  66. package/evals/evidence/build/base/tests/discount.test.ts +6 -0
  67. package/evals/evidence/build/base/tests/legacy.test.ts +7 -0
  68. package/evals/evidence/build/base/tests/pricing.test.ts +10 -0
  69. package/evals/evidence/build/cases/build-broken/after/src/pricing.ts +22 -0
  70. package/evals/evidence/build/cases/build-broken/case.json +13 -0
  71. package/evals/evidence/build/cases/fixes-legacy/after/src/pricing.ts +22 -0
  72. package/evals/evidence/build/cases/fixes-legacy/case.json +11 -0
  73. package/evals/evidence/build/cases/flaky-test/after/tests/flaky.test.ts +11 -0
  74. package/evals/evidence/build/cases/flaky-test/case.json +11 -0
  75. package/evals/evidence/build/cases/good-feature/after/src/index.ts +1 -0
  76. package/evals/evidence/build/cases/good-feature/after/src/pricing.ts +28 -0
  77. package/evals/evidence/build/cases/good-feature/after/tests/bulk.test.ts +7 -0
  78. package/evals/evidence/build/cases/good-feature/case.json +17 -0
  79. package/evals/evidence/build/cases/new-test-fails/after/src/index.ts +1 -0
  80. package/evals/evidence/build/cases/new-test-fails/after/src/pricing.ts +27 -0
  81. package/evals/evidence/build/cases/new-test-fails/after/tests/coupon.test.ts +6 -0
  82. package/evals/evidence/build/cases/new-test-fails/case.json +19 -0
  83. package/evals/evidence/build/cases/regression/after/src/pricing.ts +23 -0
  84. package/evals/evidence/build/cases/regression/case.json +13 -0
  85. package/evals/evidence/build/cases/test-removed/case.json +14 -0
  86. package/forgeqe.example.yaml +2 -0
  87. package/package.json +2 -1
  88. package/prompts/README.md +1 -0
  89. package/prompts/impact-reader.md +8 -9
  90. package/prompts/tosca-assistant.md +47 -0
  91. package/prompts/tosca.md +3 -1
  92. package/py/forgeqe_desktop/agentdesktop_driver.py +57 -7
  93. package/py/forgeqe_desktop/handhooks.py +71 -22
  94. package/py/forgeqe_desktop/handrecord.py +7 -1
  95. package/py/forgeqe_desktop/heal.py +24 -2
  96. package/py/forgeqe_desktop/memory.py +54 -4
  97. package/py/forgeqe_desktop/pywinauto_driver.py +210 -12
  98. package/py/forgeqe_desktop/replay.py +10 -2
  99. package/py/forgeqe_desktop/service.py +9 -2
  100. package/py/forgeqe_desktop/ufo_runner.py +101 -1
  101. package/py/forgeqe_engine/browser.py +309 -31
  102. package/py/forgeqe_engine/browserdoctor.py +255 -0
  103. package/py/forgeqe_engine/browserlaunch.py +271 -0
  104. package/py/forgeqe_engine/capture.py +20 -4
  105. package/py/forgeqe_engine/cli.py +26 -0
  106. package/py/forgeqe_engine/logins.py +1 -1
  107. package/py/forgeqe_engine/pwlaunch.mjs +61 -0
  108. package/py/forgeqe_engine/recordsession.py +1 -1
  109. package/py/forgeqe_engine/service.py +1 -1
  110. package/py/forgeqe_mobile/service.py +4 -1
  111. package/py/forgeqe_tosca/__init__.py +11 -1
  112. package/py/forgeqe_tosca/app.py +168 -0
  113. package/py/forgeqe_tosca/db.py +131 -0
  114. package/py/forgeqe_tosca/files.py +74 -0
  115. package/py/forgeqe_tosca/ntir.py +357 -5
  116. package/py/forgeqe_tosca/render.py +38 -0
  117. package/py/forgeqe_tosca/tsu.py +110 -0
  118. package/skills/tosca-knowledge/SKILL.md +14 -3
  119. package/skills/tosca-knowledge/references/api.md +54 -0
  120. package/dist/web/assets/Agent-CHliM9aG.js +0 -4
  121. package/dist/web/assets/ApiTests-DcGDtIjl.js +0 -10
  122. package/dist/web/assets/Browse-DWZgEdaB.js +0 -1
  123. package/dist/web/assets/Chat-DVolc6Rs.js +0 -3
  124. package/dist/web/assets/CommandPalette-CdwjRIsa.js +0 -1
  125. package/dist/web/assets/Cost-BifpK_Ac.js +0 -1
  126. package/dist/web/assets/Data-Crk0ef8O.js +0 -6
  127. package/dist/web/assets/Evidence-EYGofupD.js +0 -1
  128. package/dist/web/assets/Explore-DtqBRQi7.js +0 -2
  129. package/dist/web/assets/Features-B_ZtQEtR.js +0 -1
  130. package/dist/web/assets/Flags-DCLSg8Na.js +0 -2
  131. package/dist/web/assets/Flaky-HpgrkJIF.js +0 -1
  132. package/dist/web/assets/ForceGraph-Dm4VEUjO.js +0 -1
  133. package/dist/web/assets/Impact-CyzbgGih.js +0 -3
  134. package/dist/web/assets/Jobs-CbTd9csb.js +0 -5
  135. package/dist/web/assets/KindPage-cfP76U_9.js +0 -6
  136. package/dist/web/assets/Migration-va16JqtB.js +0 -2
  137. package/dist/web/assets/Product-D0iY6orX.js +0 -7
  138. package/dist/web/assets/Production-CBUb6wZJ.js +0 -1
  139. package/dist/web/assets/Quality-OMhrUKTU.js +0 -1
  140. package/dist/web/assets/Readiness-B64Rxahv.js +0 -1
  141. package/dist/web/assets/Record-B_JXq6Dv.js +0 -2
  142. package/dist/web/assets/Regression-2blJAX7v.js +0 -5
  143. package/dist/web/assets/Reports-DCgjGdw4.js +0 -2
  144. package/dist/web/assets/Response-BtMM8nqx.js +0 -4
  145. package/dist/web/assets/RunDiff-KuUVRuQI.js +0 -1
  146. package/dist/web/assets/Runs-zHDZ-rSo.js +0 -2
  147. package/dist/web/assets/TestCases-B1j2Oelt.js +0 -1
  148. package/dist/web/assets/TestData-CZSynoi-.js +0 -2
  149. package/dist/web/assets/TestDebt-DEdIBwdb.js +0 -1
  150. package/dist/web/assets/Tosca-BcuaHsQC.js +0 -2
  151. package/dist/web/assets/WhatsNew-CjvX6DNo.js +0 -1
  152. package/dist/web/assets/dataParts-BImZKYEu.js +0 -3
  153. package/dist/web/assets/families-q4nF1Fqo.js +0 -1
  154. package/dist/web/assets/frame-eAHxqKfn.js +0 -4
  155. package/dist/web/assets/index-COTk3Bz-.js +0 -45
  156. package/dist/web/assets/index-DvuGI8X3.css +0 -2
  157. package/dist/web/assets/logos-DEPdha9g.js +0 -1
  158. package/dist/web/assets/parts-CVdJRIxI.js +0 -1
  159. package/dist/web/assets/productParts-CqY4Zs7J.js +0 -1
  160. package/dist/web/assets/qualityParts-BcrXEQ9B.js +0 -1
  161. package/dist/web/assets/segmented-BJECij_J.js +0 -1
  162. package/dist/web/assets/thread-Cuvu0HhP.js +0 -5
  163. package/dist/web/assets/usePageChat-Bz7fuynu.js +0 -1
@@ -719,6 +719,37 @@ verdict) and Contracts (each contract, and how well each check is measured).
719
719
  <p>For Ollama this matters: a prompt longer than the server's context length is cut from the start without an error. Without <code>&quot;context&quot;</code> ForgeQE assumes 32K for an Ollama profile; start the server with <code>OLLAMA_CONTEXT_LENGTH</code> set to the same number.</p>
720
720
  </div></section>
721
721
  <section class="doc sub" id="doc-how_to_use-signing-in-to-your-tools"><h4>Signing in to your tools</h4><div class="prose"><p>Instead of copying tokens into <code>.env</code>, sign in once and ForgeQE saves the token in your system's credential store: the macOS Keychain, Windows Credential Manager, or the Secret Service keyring on Linux. On a machine without one, such as a headless Linux box, it uses <code>~/.forgeqe/credentials.json</code>, readable only by you.</p>
722
+ <p><strong>Secrets and vaults.</strong> Settings › Secrets has every password, key and token ForgeQE keeps in your credential store,
723
+ by name: typed in Settings, pulled from a vault, or kept by a sign-in (removed by signing out of it). Add a secret saves
724
+ its value one way; ForgeQE never shows it again and the agents see only its name. Agents and tests use a secret by its
725
+ name: in a sign-in (<code>logins:</code>), an environment's <code>secrets:</code>, or a test's variables (model-run shells never get one a
726
+ test does not read).</p>
727
+ <p>The Vaults tab connects Azure Key Vault (a vault's name), Google Secret Manager (a project) and AWS Secrets Manager (a
728
+ region). Sign in with your browser (recommended): each vault's row shows whether ForgeQE can sign in, and <strong>Sign in</strong>
729
+ starts the provider's own browser sign-in on this computer (<code>az login</code>, <code>gcloud auth login</code>, or <code>aws sso login</code> for an
730
+ SSO profile set up once with <code>aws configure sso</code>; AWS CLI 2.9 or later), showing its link and one-time code when there
731
+ is one. The cloud's CLI keeps the sign-in and renews it; ForgeQE saves nothing. For a computer with nobody to sign in,
732
+ such as a build agent, a vault signs in with keys that are themselves saved secrets instead (a service principal's
733
+ tenant, client id and secret; a service account's JSON key; access keys). Browse lists a vault's secret names, never a value; pick one, give it a
734
+ variable's name (and a JSON field, for a secret that holds JSON) and Pull: the value goes from the vault straight to
735
+ the credential store. Pull all again reads each one's newest value. Vault connections are kept on this computer for
736
+ this project (<code>~/.forgeqe/secrets</code>), never in the repository, so a repository cannot make ForgeQE read your vault; a
737
+ value is read only when you pull it. ForgeQE calls only the provider's own https address, follows no redirect, and an
738
+ error never repeats what the provider sent.</p>
739
+ <p>To give teammates the same vaults, <strong>Export</strong> on the Vaults tab saves a file of the connections (<code>forgeqe-vaults.json</code>):
740
+ each vault's provider, place and how it signs in (key variables by name), and which vault secret each variable is
741
+ pulled from. It holds no value, token or time, so it can be shared. A teammate's <strong>Import</strong> checks every vault again,
742
+ keeps a vault they already have by that name as it is (one that differs is skipped, never replaced), and lists each
743
+ secret to pull on Saved as &quot;not pulled yet&quot;: they sign in with their own account and press Pull. A file that holds
744
+ anything but connections is refused whole.</p>
745
+ <p><strong>Repository tokens.</strong> The git repositories ForgeQE clones (Tosca exports, a migration's source, the product's
746
+ repositories) sign in with a personal access token named by its variable. They are secrets like the others: Settings ›
747
+ Secrets › <strong>Repository tokens</strong> (a filter of its Saved list) shows each one by name, saved by ForgeQE (Edit, Remove)
748
+ or set in your shell, with what uses it, and first the ones a clone or product repository needs that have no value
749
+ yet. Add a token saves its value straight to the credential store; the page never shows it again, and the agents see
750
+ only its name. The old address <code>#/settings/repo-tokens</code> opens this filter. A name is capital letters,
751
+ digits and <code>_</code> (<code>GITHUB_TOKEN</code>, <code>AZURE_DEVOPS_PAT</code>); names that change how programs start, <code>GIT_*</code> among them, are
752
+ refused. Give each token read access to the repositories only.</p>
722
753
  <pre><code class="language-bash">forgeqe auth login # pick a system
723
754
  forgeqe auth login jira # or name it: azure_devops, github, copilot, jira, confluence, testrail, zephyr, qtest, xray,
724
755
  # browserstack, testmu, gitlab, postman, sentry, azure, dataverse
@@ -2826,7 +2857,14 @@ refused there. Values are substituted once and never expanded again. Targets tak
2826
2857
  <code>{{customer}}</code> as the control to click), never a secret.</li>
2827
2858
  <li><strong>Keys:</strong> <code>ctrl</code>, <code>shift</code> and <code>alt</code> with one named key or character (<code>ctrl+s</code>, <code>alt+f4</code>, <code>enter</code>, <code>f5</code>). The Windows
2828
2859
  and context-menu keys are refused: Win+R followed by typing runs any command.</li>
2829
- <li><strong>Typing</strong> is literal: pywinauto's key syntax (<code>^</code>, <code>%</code>, <code>+</code>, <code>~</code>, <code>{ENTER}</code>) in the text is escaped.</li>
2860
+ <li><strong>Typing</strong> is literal: pywinauto's key syntax (<code>^</code>, <code>%</code>, <code>+</code>, <code>~</code>, <code>{ENTER}</code>) in the text is escaped. On Windows a
2861
+ <code>type</code> step clears the field and types the text key by key, like a person: some controls show text set through UI
2862
+ Automation but act only on typed input (the Windows Save and Open dialogs keep their default file name). Text with
2863
+ line breaks or tabs is set instead, so a line break never presses Enter in a form.</li>
2864
+ <li><strong>Only the app gets the input.</strong> pywinauto clicks at screen coordinates and keys go to the window in front, so before
2865
+ a click, <code>type</code> or <code>keys</code> the app's window is brought forward, and nothing is sent while another program's window
2866
+ covers the point or keeps the keyboard: the step fails and says so. <code>keys</code> go to the app's open dialog, not its main
2867
+ window behind it. A <code>dismiss</code> control that could not be clicked is named in the step's error.</li>
2830
2868
  </ul>
2831
2869
  </div>
2832
2870
  </section>
@@ -2862,6 +2900,11 @@ or <code>&lt;APP&gt;_PASSWORD</code>, which the result tells you to set). Text e
2862
2900
  placeholder. The typed characters themselves are never kept, only the field's text when you move on.</li>
2863
2901
  <li><strong>Only the app:</strong> clicks and keys outside the app's own process are not recorded; nor are the Windows and menu keys,
2864
2902
  or controls with neither an AutomationId nor a name. The result lists what was left out.</li>
2903
+ <li><strong>A click that closes a dialog</strong> (OK after typing a password) is held for up to 0.2 s while ForgeQE finds the control
2904
+ under it and reads the field you typed in, so neither is lost when the dialog goes. Typed characters are looked up
2905
+ once per run of typing, not once per key.</li>
2906
+ <li><strong>A cell in a list or grid row</strong> is recorded inside its row (<code>path</code>: the row's type and name), since every row has a
2907
+ cell like it (a password column's <code>********</code>).</li>
2865
2908
  <li>The run folder has <code>workflow.yaml</code>, <code>run.json</code> and <code>report.html</code>, like explore. Replay it with
2866
2909
  <code>forgeqe desktop replay</code>.</li>
2867
2910
  </ul>
@@ -3041,6 +3084,38 @@ controls' AutomationIds, and <code>ufo/</code> has UFO's logs.</li>
3041
3084
  <p>Found by the Windows runs and fixed: UFO's pins need Python 3.10 (pandas 1.4.3); UFO prints emoji panels to stdout, which
3042
3085
  is the engine's event stream and crashed on the cp1252 console (now sent to stderr, characters replaced); an error in
3043
3086
  UFO's own evaluation lost the recorded actions (the trace is now kept and saved).</p>
3087
+ <p>Found by replaying KeePass 2 on Windows 11 ARM64 (a Parallels VM, runs started from a scheduled task) and fixed: text
3088
+ set through UI Automation was shown by the Save dialog but not used, so the database was saved under the default name
3089
+ while every step passed (now typed); with the app behind another window, clicks went to that window, <code>dismiss</code>
3090
+ reported nothing, and <code>keys</code> went to the main window instead of the dialog (now the app is brought forward, the click
3091
+ point and the keyboard are checked, and keys go to the open dialog); a dialog closing while its window was searched
3092
+ failed the next step with a COM error (now searched again). On that VM a synthetic double-click did not register;
3093
+ check <code>double_click</code> on real hardware. The x64 Python the engine runs in needs the x64 Visual C++ runtime (<code>win32ui</code>).
3094
+ On agent-desktop there: npm 11.20 refuses <code>--allow-scripts</code> with <code>--prefix</code> (the install script is now allowed for the
3095
+ pinned version in the folder's <code>package.json</code>); the state folder's Windows ACL (Administrators, OWNER RIGHTS) was
3096
+ refused by agent-desktop (now this user and SYSTEM only); and a dialog listed as its own window and inside its main
3097
+ window's snapshot matched twice (now one control). Still open: a button whose click opens a modal message box times out
3098
+ in UI Automation's Invoke, and the step fails without sending it again, so such steps need the pywinauto driver.</p>
3099
+ <p>Found by exploring and healing KeePass there with Azure OpenAI gpt-5.4 and fixed: a drop-down menu's items are listed
3100
+ twice by UI Automation, so a recorded menu click was &quot;several controls match&quot; and could not replay (now one control
3101
+ seen twice, the same runtime id, is that control); a check of the app's main window could never be found, as replay
3102
+ searched only inside windows (now a target equal to the window is the window); the heal model, given only the old
3103
+ target, replaced a renamed menu item by the menu itself (that step passed and the next one failed), and the heal was
3104
+ remembered and offered for the workflow (now the model is told the step and the one before it, and a heal is
3105
+ remembered, written or offered only from a replay that passed; a remembered heal used in a failed replay is
3106
+ forgotten); and the offer to write heals waited for an answer with no terminal (now never asked without one). Explore
3107
+ ran 4 steps for $0.12 when the app opened at its main window.</p>
3108
+ <p>Also found there and fixed: an app that opens with a start-up dialog (KeePass's update question) left UFO on that
3109
+ dialog's window after it closed, so every later click went to (0, 0) until the step limit ($1.22 for nothing); now a
3110
+ closed window UFO chose is replaced by the app's live window (<code>follow_live_window</code>, <code>ufo_runner.py</code>), and the same
3111
+ explore passes for $0.18. In recording by hand, the OK that closed a dialog right after typing was lost, since the
3112
+ control under the click was looked up after a lookup per typed key (now the click is held while it is looked up, and
3113
+ typing is one lookup). A click on a list row's <code>********</code> cell was recorded as that cell alone, which every row has (now
3114
+ inside its row). App memory borrowed another goal's whole flow as a &quot;shared start&quot;; that flow ended where it began (a
3115
+ dialog opened and closed again), so UFO, seeing the screen it started from, did it all again and the workflow held it
3116
+ twice. Now the note lists the replayed steps and says to finish if they do the goal (UFO then made no click, $0.02),
3117
+ and steps that exactly repeat the replayed block are kept once. A replay with <code>--no-heal</code>, or with a model whose key
3118
+ is not set, stopped at &quot;No model in llms.json can …&quot; (now healing is off for that replay, and it runs).</p>
3044
3119
  </div>
3045
3120
  </section>
3046
3121
  <section class="doc" id="doc-docs-desktop-next-steps">
@@ -3310,6 +3385,80 @@ mobile:
3310
3385
  <code>run.json</code>, <code>report.html</code>, step screenshots, and for Maestro runs the flow, <code>maestro.log</code> and Maestro's JUnit report.</p>
3311
3386
  </div>
3312
3387
  </section>
3388
+ <section class="doc" id="doc-docs-mobile-devices">
3389
+ <h4>Devices</h4>
3390
+ <div class="prose"><p>Say what each device is and where it runs; Settings → Mobile edits all of it. ForgeQE builds what Appium, Maestro and
3391
+ the cloud need from that and the app: the W3C capabilities (<code>platformName</code>, <code>appium:udid</code>, <code>bstack:options</code>,
3392
+ <code>LT:Options</code>, …), the cloud's hub address, Maestro's <code>--device</code>, and TestMu's HyperExecute YAML. Nobody types
3393
+ capabilities.</p>
3394
+ <p>Devices on this computer are in forgeqe.yaml:</p>
3395
+ <pre><code class="language-yaml">mobile:
3396
+ parallel: 3 # devices at once, here and on the clouds; default: all of them
3397
+ devices:
3398
+ pixel8: # an emulator
3399
+ type: virtual
3400
+ platform: android
3401
+ udid: emulator-5554
3402
+ iphone-sim: # an iOS simulator (XCUITest boots it)
3403
+ type: virtual
3404
+ platform: ios
3405
+ model: iPhone 15
3406
+ os_version: &quot;17.2&quot;
3407
+ </code></pre>
3408
+ <p>Devices on TestMu AI or BrowserStack are in that cloud's own file, the one <code>browser.providers</code> links
3409
+ (<code>.forgeqe/testmu.yaml</code>, <code>.forgeqe/browserstack.yaml</code>), beside its browsers and with the same sign-in. Settings →
3410
+ Mobile shows each file's devices and edits them; Integrations edits the file's browsers and its browser devices.
3411
+ A file with only mobile devices sets up no browser on that cloud.</p>
3412
+ <pre><code class="language-yaml"># .forgeqe/testmu.yaml
3413
+ provider: testmu
3414
+ remote:
3415
+ username_env: LT_USERNAME # the sign-in, as variable names; values in the credential store
3416
+ access_key_env: LT_ACCESS_KEY
3417
+ mobile:
3418
+ region: us
3419
+ devices:
3420
+ galaxy-s23:
3421
+ type: real # real | virtual (TestMu's emulators and simulators)
3422
+ platform: android
3423
+ model: Galaxy S23
3424
+ os_version: &quot;13&quot;
3425
+ </code></pre>
3426
+ <ul>
3427
+ <li><strong>Which devices run.</strong> Every device with <code>enabled</code> on (the default), of the app's platform: an Android workflow
3428
+ skips the iOS devices. <code>--devices pixel8,galaxy</code> (or the agent's <code>devices</code>) names some for one run.</li>
3429
+ <li><strong>At once.</strong> <code>mobile.parallel</code> of them at a time. Devices on this computer running at once get their own driver
3430
+ ports (<code>appium:systemPort</code> 8200+, <code>appium:wdaLocalPort</code> 8100+, <code>appium:mjpegServerPort</code> 9100+) on the one Appium
3431
+ server. On TestMu, <code>mobile.parallel</code> also caps HyperExecute's concurrency.</li>
3432
+ <li><strong>Maestro</strong> runs on each device on this computer, and as one HyperExecute job for TestMu's real devices (and one
3433
+ for its emulators). It does not run on BrowserStack here: replay those with Appium.</li>
3434
+ <li><strong>Results.</strong> Each device's run is in a folder of its own inside the run's folder, with <code>devices.json</code> listing each
3435
+ one's result and report, and a failed device's first failed step. The run passes only when every device passes;
3436
+ <code>--junit</code> has one case per device. Each step line and log line names its device (<code>[pixel8] ✓ 3 tap Sign in</code>).</li>
3437
+ <li><strong>The cloud check.</strong> Before a run, ForgeQE asks each cloud whether it has the real devices the run goes on (those of
3438
+ the app's platform; for explore, the first); for one it does not, it offers the most similar (in a terminal) and
3439
+ swaps only that device, this run only. TestMu's list changes through the day (a model's OS versions come and go),
3440
+ so a pipeline that must not stop can list a pattern (<code>os_version: &quot;1[345]&quot;</code>) or a second device.</li>
3441
+ <li><code>explore</code> works through a goal once, on the first device in use.</li>
3442
+ <li><strong>TestMu's emulators and simulators</strong> are a list of their own, which no API gives: <code>type: virtual</code> devices are not
3443
+ checked, and one TestMu does not have is refused at once with where to look (its capabilities generator). An iOS
3444
+ simulator's <code>os_version: &quot;17&quot;</code> is sent as <code>17.0</code>, which TestMu needs. Every TestMu session says <code>w3c: true</code>.</li>
3445
+ <li><strong>iOS alerts</strong> stay until a step closes them: TestMu accepts every iOS alert by default, which closes a success or
3446
+ error alert before a check can read it. A config that sets <code>appium:autoAcceptAlerts</code> or <code>autoDismissAlerts</code> keeps it.
3447
+ iOS's own permission prompts (notifications, location, tracking) are saved under <code>dismiss</code>, like Android's system
3448
+ dialogs, and a replay closes a <code>dismiss</code> dialog that shows as the app starts; where it never shows, nothing fails.</li>
3449
+ <li><strong>iOS real devices</strong> need a device build (<code>.ipa</code> built for iphoneos); a simulator build (<code>.app</code> in a <code>.zip</code>) runs
3450
+ on TestMu's simulators only. TestMu signs an uploaded <code>.ipa</code> for its devices. iOS lists only the controls on screen
3451
+ to the model and to steps (XCUITest also lists ones scrolled out of view).</li>
3452
+ <li><strong>Secrets</strong> a workflow types are checked before a device is taken: one that is not set, or not listed, stops the
3453
+ replay at once.</li>
3454
+ <li><strong>A control re-drawn under a step</strong> (an alert animating in: Appium's &quot;stale element reference&quot;) is looked up again,
3455
+ twice at most, besides the step's own <code>retries</code>.</li>
3456
+ <li><code>mobile.appium.capabilities</code> is still added to every session, for the rare setting ForgeQE does not make.</li>
3457
+ </ul>
3458
+ <p>Without <code>mobile.devices</code>, the device is the one <code>mobile.appium</code> (its URL and capabilities) and <code>mobile.maestro</code>
3459
+ (<code>device</code>, <code>testmu</code>) name, as before.</p>
3460
+ </div>
3461
+ </section>
3313
3462
  <section class="doc" id="doc-docs-mobile-workflow-yaml-forgeqe-mobile-v1">
3314
3463
  <h4>Workflow YAML (<code>forgeqe-mobile-v1</code>)</h4>
3315
3464
  <div class="prose"><pre><code class="language-yaml">format: forgeqe-mobile-v1
@@ -5040,6 +5189,12 @@ forgeqe tosca plan tosca/checkout.tsu --to playwright-typescript [--only 1034698
5040
5189
  forgeqe tosca confirm tsc-20261105-151116-1f21 --accept-limits # a person at a terminal types the plan's id
5041
5190
  forgeqe tosca run tsc-20261105-151116-1f21 # here, or as a job:
5042
5191
  forgeqe jobs add tosca-ui --now -- tosca run tsc-20261105-151116-1f21
5192
+ forgeqe tosca plan tosca/ --to playwright-typescript # every .tsu in a folder, as one plan
5193
+ forgeqe tosca clone https://github.com/org/tosca-exports.git --branch main --token-var GITHUB_TOKEN # exports from git
5194
+ forgeqe tosca plan --workspace ws-… --to playwright-typescript # every export of that clone (or name some)
5195
+ forgeqe tosca reimport tsc-… [--refresh] # read the exports again: a new plan that keeps unchanged tests
5196
+ forgeqe tosca map tsc-… [--json] # each Tosca test case by its unique id, and what became of it
5197
+ forgeqe tosca ready tsc-… [--environment qa --app shop | --base-url URL] [--accept env:NAME,data] # what running the tests needs, before it starts
5043
5198
  forgeqe tosca verify tsc-… [--suite Smoke] # run the converted tests again, no model
5044
5199
  forgeqe tosca fix tsc-… --unit u004 --note &quot;The cart badge is now a span&quot; # one file back to the Tosca agent
5045
5200
  </code></pre>
@@ -5058,7 +5213,49 @@ out). Tosca's execution lists become suites: each test is tagged with the lists
5058
5213
  title), and ForgeQE checks the tags are there. Test
5059
5214
  cases whose steps are desktop, SAP, API or mobile are left out for now, and named. A step ForgeQE cannot convert
5060
5215
  (an unknown ActionMode or token, a TBox module with no web equivalent) is a limit: it stays in the test as a marked
5061
- comment for a person to finish.</li>
5216
+ comment for a person to finish.
5217
+ <strong>Several exports, or a git repository.</strong> A plan can read many <code>.tsu</code> files: picked on the page, named on the
5218
+ command line, or a folder (every export in it, at most 50). Each is read on its own and the readings merged: a test
5219
+ case that two exports both hold (same id, name, folders and steps) is converted once and the plan says so; a
5220
+ different test case with the same id gets its export's number; a module of the same name becomes one page object;
5221
+ execution lists and variables join. Exports can come from a git repository instead of the project:
5222
+ <code>forgeqe tosca clone &lt;url&gt;</code> (or From a git repository on the page) makes a shallow copy under ForgeQE's home with
5223
+ the Migration agent's checks (https or git@ only, no user name in the address, the token by its variable's name and
5224
+ only as a header, no hooks, submodules or links) and keeps it only when it holds an export; such a copy is a Tosca
5225
+ source, never listed as a migration's. Every file of a plan is checked by its digest before each run, so a changed
5226
+ or removed export (or a removed copy) stops it until a new plan is made.
5227
+ <strong>Back to Tosca.</strong> Each test case keeps Tosca's unique id (its surrogate). <code>tosca-map.json</code> in the target folder
5228
+ (beside <code>tosca-suites.json</code>, written by ForgeQE after each run and verify) lists every Tosca test case of the plan
5229
+ by that id, its Tosca path and export, and what became of it: its test file, last outcome, the Tosca steps in the
5230
+ test and those left for a person. <code>forgeqe tosca map &lt;plan&gt;</code> prints it; the report shows the id on each test case
5231
+ and downloads it as a Traceability CSV, so a team can run both side by side and retire Tosca test cases one by one.
5232
+ <strong>Reading the exports again.</strong> When Tosca changes, <code>forgeqe tosca reimport &lt;plan&gt;</code> (or Read exports again on the
5233
+ conversion's page) makes a new plan from the same exports, for the same target and folder, and compares each test
5234
+ case with the earlier plan by its unique id (or, for a plan made before ids were kept, its id) and its steps:
5235
+ unchanged ones keep their tests (no agent call, as long as the file is still as it was converted), changed and new
5236
+ ones are converted, and ones no longer in the exports are listed with their tests left in place for a person to
5237
+ remove. Test cases left unpicked before stay unpicked. <code>--refresh</code> (or the page's option) clones each repository
5238
+ again for its newest commit, as before; the old copy stays for the old plan.
5239
+ <strong>What can be migrated.</strong> <code>forgeqe tosca inspect</code>, <code>show</code> and the Tosca page put every test case of the export in
5240
+ one kind: web (converted), web with steps for a person, API (converted), API with steps for a person, web and API
5241
+ (converted), web or API mixed with another engine (converted: its web and API steps, and each desktop, mobile or
5242
+ database step stays in the test as a marked comment saying what it does, for a person to code), desktop, mobile,
5243
+ database and files, steps nothing reads, nothing to convert, not picked. Each kind says what becomes of it and the Tosca
5244
+ modules (with their engine) behind it, or for steps left to a person the reasons; the page downloads it as a CSV
5245
+ per test case.
5246
+ <strong>Ready to run.</strong> Before a conversion starts, ForgeQE checks what running its tests needs and asks for what is
5247
+ missing (<code>forgeqe tosca ready &lt;plan&gt;</code>, or the page's Before it runs): where the tests start (the address the export
5248
+ recorded, an app of env.yaml, never an environment named like production, or one given: http(s) only, no user name
5249
+ in it), every environment variable the tests read (set, or saved in the credential store from the page; never its
5250
+ value in a file), the programs the target runs with (<code>npx</code>, <code>mvn</code>, <code>dotnet</code>, looked up on PATH), and Tosca test
5251
+ data the export does not hold. A missing address or program blocks the start; a variable or the test data is
5252
+ answered or accepted (&quot;convert without it&quot;). Answers are kept in <code>.forgeqe/tosca/&lt;plan&gt;/ready.json</code>; <code>run</code>, <code>fix</code>
5253
+ and <code>verify</code> refuse until nothing is open, and the tests get the reviewed address as <code>BASE_URL</code>.
5254
+ <strong>What it may cost.</strong> Review's Estimate (and <code>forgeqe tosca show</code> or <code>confirm</code>) gives the model tokens of the
5255
+ files still to write, as a range, and their price with the model the Tosca agent is routed to when that model has a
5256
+ price in <code>llms.json</code> (<code>price:</code>; none for a Copilot seat). It is worked out from this project's earlier Tosca
5257
+ conversions once they have written at least 5 files (tokens per file), else from defaults sized by each test case's
5258
+ steps; files already written are not counted again. An estimate, never a limit: a hard test case takes more tries.</li>
5062
5259
  <li><strong>Confirm.</strong> As for a migration: a person types the plan's id at a terminal; the confirmation is kept under
5063
5260
  ForgeQE's home by the plan's digest, and a run refuses a plan whose export changed since.</li>
5064
5261
  <li><strong>Run.</strong> The setup, then each page object, then each test, each in a fresh session of the Tosca agent, which may edit
@@ -5073,7 +5270,22 @@ with the target's own command, and its outcome and whole output are kept. <code>
5073
5270
  lists each suite with its tag and test files, and each test with its Tosca folders, suites and last outcome.</li>
5074
5271
  <li><strong>Report.</strong> <code>tosca.md</code> in <code>.forgeqe/tosca/&lt;plan&gt;/</code>: each test case's outcome and fidelity (steps marked of steps
5075
5272
  required), the steps a person has to finish, and the environment variables to set. Running the plan again keeps the
5076
- files that are done and unchanged.</li>
5273
+ files that are done and unchanged. <code>report.html</code> beside it is ForgeQE's HTML run report of the conversion, written
5274
+ when a run or <code>tosca verify</code> ends: one case per Tosca test case, its Tosca steps as passed, failed or left for a
5275
+ person, its problems and output, and its failure screenshot and video (in <code>report-cases/</code>, so the folder opens
5276
+ offline). The web app's report shows the totals, the model's tokens and cost, and where the tests came from and went
5277
+ to at the top; the test cases grouped as Failed, Needs a look, Passed, Not run and Left out, 50 at a time and
5278
+ searchable; and the picked one's details beside them. Its HTML report button downloads <code>report.html</code> with the failure
5279
+ screenshots inside; Zip with videos downloads <code>report.zip</code> (<code>report.html</code> and <code>report-cases/</code> with every screenshot
5280
+ and video, made when asked and once the run has ended): unzip it and open <code>report.html</code>.</li>
5281
+ <li><strong>Screenshots and video, by default.</strong> Every test ForgeQE runs after the conversion (each try, the final run, and
5282
+ <code>tosca verify</code>) keeps a screenshot when it fails and a video of the run, under <code>test-results/</code> in the target folder
5283
+ (the run gets that folder as <code>FORGEQE_EVIDENCE_DIR</code>); they are copied to <code>.forgeqe/tosca/&lt;plan&gt;/evidence/&lt;unit&gt;/</code>
5284
+ and shown on the report page. Where the runner has switches for it, ForgeQE passes them itself (pytest-playwright's
5285
+ <code>--screenshot=only-on-failure --video=on</code>, Cypress's <code>--config video=true,…</code>); elsewhere the setup step sets it up
5286
+ (<code>playwright.config</code>'s <code>screenshot: 'only-on-failure', video: 'on'</code>, a test base for Java and C#, an <code>afterTest</code>
5287
+ hook and wdio-video-reporter for WebdriverIO) and ForgeQE checks the project for it, setting it up again when it is
5288
+ missing. Selenium has no video recorder: its tests keep failure screenshots only.</li>
5077
5289
  </ol>
5078
5290
  <p>Exit codes of <code>tosca run</code>: <code>0</code> every test converted, <code>1</code> some or none, <code>2</code> stopped. The Tosca page of <code>forgeqe web</code>
5079
5291
  (sidebar, Test) does the same in four steps (export, target, instructions, review): it lists the <code>.tsu</code> exports in
@@ -5081,7 +5293,126 @@ the project, reads the one you pick and lets you choose its test cases, then fol
5081
5293
  with how many of its Tosca steps the test does and its whole output (Fix sends one back to the Tosca agent with a note),
5082
5294
  Run tests again for all of them or Run for one suite, each test case's
5083
5295
  Tosca steps beside the converted code with a step's lines marked and the locators Tosca recorded, and the activity as it
5084
- happens. In the shell, &quot;convert
5296
+ happens.</p>
5297
+ <p><strong>The Tosca assistant.</strong> The Tosca page opens on its Agent tab: say in your words what to migrate (&quot;checkout.tsu to
5298
+ Playwright in TypeScript on QA, into e2e/tosca&quot;) and the assistant asks only what it still needs, one thing at a time:
5299
+ the exports, the framework, the language, where the tests start, then a folder or rules for the code. Each question
5300
+ offers its options to pick; you can also type, and change anything you said. Open the prefilled wizard then reads the
5301
+ exports, makes the plan and opens it on Review with every stage filled in; nothing starts until you confirm, as before.
5302
+ ForgeQE's model (<code>forgeqe-tosca-assistant</code>: no tools, a fixed answer shape) only reads your words. ForgeQE keeps only
5303
+ what your project has (an export it lists, a target it runs, a web app of env.yaml outside production), an address only
5304
+ of http(s) that you wrote and that is not production's, and a folder only inside the repository; it chooses the next
5305
+ question itself. Without a model, ForgeQE's rules read the same words. The exports question lets you pick several, or
5306
+ clone a git repository of exports: paste its address (add &quot;branch <name>&quot; for a branch), and the assistant asks &quot;Clone
5307
+ it?&quot; first; it clones as the wizard does and picks the clone's exports. For a private repository, the question has an
5308
+ Access token field: pick a token already saved (in Settings › Secrets › Repository tokens, or a variable such as GITHUB_TOKEN;
5309
+ Check again reads the list once you have saved one there), or Add a token, which keeps the value in ForgeQE's
5310
+ credential store under its name. The chat and the model only ever see the name, Clone it waits until a value is saved, and a token typed into the
5311
+ chat itself is refused and never sent. Each conversation is kept in ForgeQE's home (<code>~/.forgeqe/tosca-assistant</code>, readable by you only,
5312
+ two weeks, the newest 30), so it survives <code>forgeqe web</code> starting again, and the page reopens the last one; New
5313
+ conversation removes it. Nothing is written to the project until the wizard makes the plan (or you agree to a clone).
5314
+ When the picked exports hold desktop or mobile test cases, or database checks, the assistant also asks which desktop
5315
+ or mobile app their workflows start and which database their queries read (only the names Settings has, or &quot;Tell you
5316
+ later&quot;); the wizard puts the answers on Review.</p>
5317
+ <p><strong>API test cases.</strong> Test cases of Tosca's API engine (API Scan modules: one per call, its Method, Endpoint and
5318
+ Resource as the module's settings, the request and the response as attribute trees) are converted too, alone or in a
5319
+ test case with web steps. Each call becomes a request with the target's own HTTP client (Playwright's <code>request</code>,
5320
+ Cypress's <code>cy.request</code>, Node's <code>fetch</code> for WebdriverIO, the language's standard client for Selenium; no dependency is
5321
+ added for HTTP), then a check for each Tosca verify: the status, a header, a JSON value (Tosca's <code>==</code>, <code>!=</code>, <code>&lt;</code>, <code>&gt;</code>,
5322
+ <code>*</code> comparisons kept) or the body; a buffer keeps a response value for a later call. The API's address and any token
5323
+ in a header (<code>Bearer {CP[ApiToken]}</code>) are variables the tests read, the token a secret, never in the code. An
5324
+ attribute ForgeQE cannot place (a timeout, a certificate) stays a marked comment for a person, and the fidelity check
5325
+ counts every request and check as it does a web step. A plan of API test cases only needs no start address; a
5326
+ variable the tests read that holds an address of production in env.yaml blocks the start, since the tests change data.</p>
5327
+ <p><strong>Tosca's test data.</strong> A template test case reads its values from a TestCaseDesign test sheet (<code>{XL[Name]}</code>), which a
5328
+ .tsu export does not hold. On Review's <strong>Test data from Tosca</strong> (or <code>forgeqe tosca data &lt;plan&gt; &lt;file&gt; [--sheet NAME]</code>),
5329
+ name a data file of the project: Tosca's Export to Excel of the test sheet, or any CSV, Excel or JSON with the values.
5330
+ ForgeQE matches each name to a column (ignoring case, spaces and punctuation, then by the last part of a dotted name),
5331
+ in either layout: one row per instance, or Tosca's own with the attributes down the first column and the instances
5332
+ across. Several files can be named, one per test sheet. At conversion each test case whose values are all found gets
5333
+ its rows in <code>tosca-data/&lt;case&gt;.json</code> in the target folder, with only the columns it reads, and its test runs once per
5334
+ row. A value named like a password or token is never written to that file (it would be committed): the test reads it
5335
+ from an environment variable, <code>TOSCA_DATA_&lt;NAME&gt;</code>, which Review lists to set like any other. The file is read with the
5336
+ project's own reader (inside the project, no hidden part, no link out, sizes capped, a formula never worked out), and
5337
+ the values never reach the agent: it is told the file and the names. A value still not found stays a marked spot for
5338
+ a person, or you accept leaving them all for a person. ForgeQE's reader now keeps <code>{XL[...]}</code> as test data even inside
5339
+ a longer value (<code>Welcome {XL[Customer.FirstName]}</code>); before, the parser's <code>$XL:</code> text could reach a test as typed text.</p>
5340
+ <p><strong>Database steps.</strong> A Tosca database step (a module of a database engine: an SQL statement and checks of its result)
5341
+ becomes code in the test that runs the statement with the target's own database client and asserts each checked cell
5342
+ (row and column) as Tosca did, beside the test's web and API steps; a test case of database checks alone is converted
5343
+ too. Only a statement that reads is converted: one <code>SELECT</code> (or <code>WITH … SELECT</code>), nothing that changes data or the
5344
+ schema, runs a procedure, writes a table or holds a second statement. A statement Tosca fills with its own values
5345
+ (<code>{B[...]}</code>, <code>{CP[...]}</code>, <code>{XL[...]}</code>) is converted with each value as a bound query parameter, never pasted into the
5346
+ statement; one whose value sits inside quotes, and any other statement, stays a marked comment for a person. Before it runs, Review asks which database:
5347
+ one of Settings › Databases whose connection string is in a variable (<code>url_env</code>), never one named like production
5348
+ (<code>forgeqe tosca ready &lt;plan&gt; --database NAME</code>). The test reads that connection string from <code>TOSCA_DB_URL</code>, which
5349
+ ForgeQE gives only the test run; the export's own connection string (and any password in it) is never read into the
5350
+ plan, the brief or the code. The CI pipeline names <code>TOSCA_DB_URL</code> as a secret.</p>
5351
+ <p><strong>File and Excel steps.</strong> A Tosca step that reads a file (a TBox file module: whether it is there, its text, two text
5352
+ files compared) or a workbook (Tosca's Excel engine: a sheet's cells) becomes a check in the test, made with the
5353
+ target's own code: read only, as database steps are. The file is found by its name, among the files the test
5354
+ downloaded or in the folder <code>TOSCA_FILES_DIR</code> names (Review asks for it), never at the Tosca machine's own path. A step
5355
+ that writes, copies, moves, renames or deletes a file, or sets a cell, stays a marked comment for a person.</p>
5356
+ <p><strong>Desktop and mobile test cases.</strong> A Tosca test case of desktop steps (UI Automation: WinForms, WPF, Win32) or of
5357
+ mobile steps becomes one of ForgeQE's own workflows, <code>forgeqe-desktop-v1</code> or <code>forgeqe-mobile-v1</code>, written by code with
5358
+ no model: Tosca finds each control by its UI Automation properties (AutomationId, Name, ControlType, ClassName) or its
5359
+ resource id, accessibility id, text and class, which are what a workflow's targets are. Each step becomes a workflow
5360
+ step (type, click or tap, select, keys, expect, wait for), a Tosca-encrypted value <code>{{secret:NAME}}</code>, and test data
5361
+ <code>{{name}}</code>. With a data file picked on Review (see Tosca's test data), its rows go into <code>&lt;case&gt;.data.csv</code> beside the
5362
+ workflow, for <code>--data</code>; a value named like a secret is typed from <code>TOSCA_DATA_&lt;NAME&gt;</code> instead and never written. A step a workflow cannot do (a condition, a loop, a buffer, a Tosca expression, a TBox module, a control
5363
+ with no id or name recorded) is left out and listed with why in the conversion's results, for a person to add. Before
5364
+ it runs, Review asks which app the workflows start: one of the desktop or mobile apps of Settings › Environments (or
5365
+ <code>desktop.apps</code>, <code>mobile.apps</code>); <code>forgeqe tosca ready &lt;plan&gt; --desktop-app NAME --mobile-app NAME</code> at a terminal. Review
5366
+ also checks that every secret the workflows type is listed in <code>desktop.secrets</code> (or <code>mobile.secrets</code>), which replay
5367
+ requires, and says which to add in Settings. They are
5368
+ written under <code>workflows/</code> in the target folder (so the pull request carries them) and checked again before they are
5369
+ written; replay them on a computer with the app or a device with <code>forgeqe desktop replay</code> or <code>forgeqe mobile replay</code>.
5370
+ A plan of workflows only needs no model and no setup. SAP GUI, Java Swing, Delphi and PowerBuilder controls are not
5371
+ ones UI Automation finds, so such cases stay out. In a case that also drives the web or an API, each run of desktop or
5372
+ mobile steps becomes a small workflow of its own (<code>workflows/&lt;case&gt;-part&lt;N&gt;.yaml</code>), and the test replays it at that
5373
+ point by starting <code>forgeqe desktop replay</code> (or <code>mobile replay</code>) with an argument list, failing when it fails. ForgeQE's
5374
+ own runs (and the CI file's tests job) set <code>TOSCA_SKIP_APP_STEPS=1</code>, so the test skips those parts on a computer
5375
+ without the app; a run on a machine with the app and ForgeQE installed leaves it unset. Steps a workflow cannot do
5376
+ (SAP GUI, Java Swing) stay marked comments.</p>
5377
+ <p><strong>In batches.</strong> A large export need not be one long run: tick <strong>Convert in batches</strong> when you start (or
5378
+ <code>forgeqe tosca run &lt;plan&gt; --batch N</code>) and ForgeQE converts the set-up, then the next N test cases not tried yet with
5379
+ the page objects they use, checks every converted test again, and stops. The others wait (&quot;Waiting for a later
5380
+ batch&quot;). Check the batch (fix a test, or accept it), then <strong>Continue with the next batch</strong> on the conversion's page
5381
+ (or run the same command again). What is done is kept; a test that failed is never tried again by a batch (fix it
5382
+ with Fix), so one hard case never stalls the rest. A run without <code>--batch</code> tries everything not done.</p>
5383
+ <p><strong>A CI pipeline per execution list.</strong> When a conversion has run, its page's <strong>CI pipeline</strong> (or
5384
+ <code>forgeqe tosca ci &lt;plan&gt; [--azure] [--write]</code>) gives a GitHub Actions workflow or an Azure Pipelines file that runs the
5385
+ converted tests in your CI, one job per Tosca execution list with the runner's own filter (Playwright's <code>--grep @tag</code>,
5386
+ pytest's <code>-m</code>, Maven's <code>-Dgroups</code>, <code>dotnet test --filter TestCategory=</code>), picked by hand (one list or all) or on a pull
5387
+ request that changes the target folder. It sets up the target's toolchain, installs the dependencies and browsers, keeps
5388
+ the failure screenshots and videos as artifacts, and names the variables the tests read: <code>BASE_URL</code> as a variable and
5389
+ the others as secrets, by name only (<code>${{ secrets.NAME }}</code>, <code>$(NAME)</code>), passed to the step that runs the tests and not
5390
+ to the installs. No value, address or Tosca text goes in the file. Copy or download it, or add it to the target
5391
+ folder's <code>ci/</code> (so the pull request carries it); GitHub runs a workflow only from <code>.github/workflows/</code>, so move it there.
5392
+ Desktop and mobile workflows replay in jobs of their own (<code>forgeqe desktop replay</code> or <code>forgeqe mobile replay</code> of each,
5393
+ with its <code>.data.csv</code>, results as JUnit), ForgeQE installed at this version: the desktop job on a self-hosted Windows
5394
+ runner or agent that has the app, the mobile one on a hosted runner with a device cloud set in <code>forgeqe.yaml</code> (or
5395
+ your own Appium machine). Each replay step gets only the secrets its workflow types, by name.</p>
5396
+ <p><strong>A pull request of the conversion.</strong> When a conversion has run, its page's <strong>Pull request</strong> (or
5397
+ <code>forgeqe tosca pr &lt;plan&gt; [--base BRANCH] [--title TEXT] [--draft]</code> at a terminal, where you type the plan's id to
5398
+ confirm) shows what goes in, then commits the target folder on ForgeQE's own branch <code>forgeqe/tosca/&lt;plan&gt;</code> from the
5399
+ branch it merges into (the remote's default unless you name one), pushes it and opens the pull request: on GitHub with
5400
+ the GitHub CLI (<code>gh</code>), on Azure DevOps with ForgeQE's Azure DevOps sign-in (the remote must be in that organization).
5401
+ The commit is made in a separate copy of the repository (a git worktree), so your own branch and edits stay as they
5402
+ are, and the repository's git hooks do not run. Only the target folder's own files go in: never a link, a dependency,
5403
+ build or run-output folder (<code>node_modules</code>, <code>test-results</code>, …), a <code>.env</code> (its <code>.env.example</code> does), a file named like
5404
+ credentials, or one over 2 MB; the panel lists what was left out and why. The description lists each Tosca test case,
5405
+ its test and how it ran, and points to <code>tosca-map.json</code>. Pushing again updates the same branch and pull request;
5406
+ with nothing new, nothing is pushed. git uses the sign-in it already has on this computer (<code>gh auth setup-git</code>, Git
5407
+ Credential Manager or ssh). ForgeQE merges nothing.</p>
5408
+ <p><strong>Secrets for the converted tests.</strong> A Tosca export's encrypted and <code>{CP[...]}</code> values become variables the tests read
5409
+ (<code>USER_PWD</code>, <code>TOSCA_PASSWORD</code>). Once the exports are picked, the assistant reads which ones the tests need and, for each
5410
+ with no value, asks which saved secret holds it (Settings › Secrets: typed there or pulled from a vault), or leaves it
5411
+ for Review. Review's Before it runs offers the same: Save a value under the variable's name, or <strong>use a saved secret</strong>
5412
+ under another name. The tests then get that secret's value under the name they read; the agents see only names, and
5413
+ no model sees a secret's name. Which secret a variable uses is kept on this computer (<code>~/.forgeqe/tosca-secrets</code>), never
5414
+ in the plan's folder in the repository, and ForgeQE's own keys (its models', trackers') are never offered or given to a
5415
+ test. Conversions lists the plans. In the shell, &quot;convert
5085
5416
  tosca/checkout.tsu to Playwright&quot; inspects the export and makes the plan; you confirm it yourself. The Tosca agent
5086
5417
  knows Tosca from its skill <code>tosca-knowledge</code> (ActionModes, value tokens, expressions, locators, and how each maps to
5087
5418
  every target).</p>
@@ -0,0 +1,20 @@
1
+ # The build and test check's sample (B2)
2
+
3
+ A small pricing library, built and tested by its own commands (`bun build`, `bun test` with JUnit results), and seven
4
+ changes planted on it. `tests/evidence-buildcheck.test.ts` checks out each change clean beside the base and expects
5
+ exactly the findings its `case.json` names; `forgeqe evidence demo` uses `regression` as code-agent's change.
6
+
7
+ - `base/`: the repository as released. Three tests pass; one (legacy rounding) fails already, and is never held
8
+ against a change.
9
+ - `cases/<name>/case.json`: why the change is planted, the files it changes (`after/<path>`) or deletes, and the
10
+ findings expected.
11
+
12
+ | Case | Change | Findings |
13
+ | --- | --- | --- |
14
+ | good-feature | adds bulk pricing and its test, which passes | none |
15
+ | regression | totals a line without its quantity | regression |
16
+ | new-test-fails | adds a coupon and a test it does not pass | new-test-failed |
17
+ | build-broken | leaves a syntax error | build-failed |
18
+ | test-removed | deletes the discount test | test-removed |
19
+ | flaky-test | adds a test that fails once, then passes | none (flaky, not counted) |
20
+ | fixes-legacy | fixes legacy rounding | none |
@@ -0,0 +1 @@
1
+ { "name": "shop-pricing", "private": true, "type": "module", "description": "Prices an order's lines (the build and test check's sample)" }
@@ -0,0 +1 @@
1
+ export { applyDiscount, legacyRound, lineTotal, orderTotal } from "./pricing.ts"
@@ -0,0 +1,22 @@
1
+ /** A line of an order: its unit price in pence and how many. */
2
+ export type Line = { price: number; quantity: number }
3
+
4
+ /** A line's total in pence. */
5
+ export function lineTotal(line: Line): number {
6
+ return line.price * line.quantity
7
+ }
8
+
9
+ /** An order's total in pence: every line's total. */
10
+ export function orderTotal(lines: Line[]): number {
11
+ return lines.reduce((sum, line) => sum + lineTotal(line), 0)
12
+ }
13
+
14
+ /** A total with a percentage off, to the nearest penny. */
15
+ export function applyDiscount(total: number, percent: number): number {
16
+ return Math.round(total * (1 - percent / 100))
17
+ }
18
+
19
+ /** Pounds to whole pence as the old till did it. Known wrong: it cuts off instead of rounding (see legacy.test.ts). */
20
+ export function legacyRound(pounds: number): number {
21
+ return Math.floor(pounds * 100)
22
+ }
@@ -0,0 +1,6 @@
1
+ import { expect, test } from "bun:test"
2
+ import { applyDiscount } from "../src/index.ts"
3
+
4
+ test("a discount takes its percentage off, to the nearest penny", () => {
5
+ expect(applyDiscount(999, 10)).toBe(899)
6
+ })
@@ -0,0 +1,7 @@
1
+ import { expect, test } from "bun:test"
2
+ import { legacyRound } from "../src/index.ts"
3
+
4
+ // Fails at the base on purpose: a known bug the check must never hold against a change.
5
+ test("legacy rounding rounds half a penny up", () => {
6
+ expect(legacyRound(0.125)).toBe(13)
7
+ })
@@ -0,0 +1,10 @@
1
+ import { expect, test } from "bun:test"
2
+ import { lineTotal, orderTotal } from "../src/index.ts"
3
+
4
+ test("a line's total multiplies its price by its quantity", () => {
5
+ expect(lineTotal({ price: 250, quantity: 3 })).toBe(750)
6
+ })
7
+
8
+ test("an order's total adds its lines", () => {
9
+ expect(orderTotal([{ price: 250, quantity: 2 }, { price: 99, quantity: 1 }])).toBe(599)
10
+ })
@@ -0,0 +1,22 @@
1
+ /** A line of an order: its unit price in pence and how many. */
2
+ export type Line = { price: number; quantity: number }
3
+
4
+ /** A line's total in pence. */
5
+ export function lineTotal(line: Line): number {
6
+ return line.price * line.quantity +
7
+ }
8
+
9
+ /** An order's total in pence: every line's total. */
10
+ export function orderTotal(lines: Line[]): number {
11
+ return lines.reduce((sum, line) => sum + lineTotal(line), 0)
12
+ }
13
+
14
+ /** A total with a percentage off, to the nearest penny. */
15
+ export function applyDiscount(total: number, percent: number): number {
16
+ return Math.round(total * (1 - percent / 100))
17
+ }
18
+
19
+ /** Pounds to whole pence as the old till did it. Known wrong: it cuts off instead of rounding (see legacy.test.ts). */
20
+ export function legacyRound(pounds: number): number {
21
+ return Math.floor(pounds * 100)
22
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "why": "Planted: leaves a syntax error, so the change does not build.",
3
+ "changes": [
4
+ {
5
+ "path": "src/pricing.ts"
6
+ }
7
+ ],
8
+ "expect": {
9
+ "findings": [
10
+ "build-failed"
11
+ ]
12
+ }
13
+ }
@@ -0,0 +1,22 @@
1
+ /** A line of an order: its unit price in pence and how many. */
2
+ export type Line = { price: number; quantity: number }
3
+
4
+ /** A line's total in pence. */
5
+ export function lineTotal(line: Line): number {
6
+ return line.price * line.quantity
7
+ }
8
+
9
+ /** An order's total in pence: every line's total. */
10
+ export function orderTotal(lines: Line[]): number {
11
+ return lines.reduce((sum, line) => sum + lineTotal(line), 0)
12
+ }
13
+
14
+ /** A total with a percentage off, to the nearest penny. */
15
+ export function applyDiscount(total: number, percent: number): number {
16
+ return Math.round(total * (1 - percent / 100))
17
+ }
18
+
19
+ /** Pounds to whole pence as the old till did it. Rounds half a penny up. */
20
+ export function legacyRound(pounds: number): number {
21
+ return Math.round(pounds * 100 + Number.EPSILON)
22
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "why": "Planted: fixes legacy rounding; a test that failed at the base passes, which is no finding.",
3
+ "changes": [
4
+ {
5
+ "path": "src/pricing.ts"
6
+ }
7
+ ],
8
+ "expect": {
9
+ "findings": []
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ import { expect, test } from "bun:test"
2
+ import { existsSync, writeFileSync } from "node:fs"
3
+ import path from "node:path"
4
+
5
+ // Fails the first time it runs in a checkout and passes after: what a flaky test looks like to the check.
6
+ test("a quote is ready on the second try", () => {
7
+ const marker = path.join(import.meta.dir, ".ran-once")
8
+ const first = !existsSync(marker)
9
+ writeFileSync(marker, "")
10
+ expect(first).toBe(false)
11
+ })
@@ -0,0 +1,11 @@
1
+ {
2
+ "why": "Planted: adds a test that fails on its first run and passes when run again: flaky, said and not counted.",
3
+ "changes": [
4
+ {
5
+ "path": "tests/flaky.test.ts"
6
+ }
7
+ ],
8
+ "expect": {
9
+ "findings": []
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ export { applyDiscount, bulkLineTotal, legacyRound, lineTotal, orderTotal } from "./pricing.ts"