diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4390a40201..ce73ca3333 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,7 +11,9 @@ /packages/flow/openadapt_flow/policy.py @abrichr /packages/flow/openadapt_flow/policies/ @abrichr /packages/flow/openadapt_flow/qualification.py @abrichr +/packages/flow/openadapt_flow/qualification/ @abrichr /packages/flow/openadapt_flow/runtime/replayer.py @abrichr +/packages/flow/openadapt_flow/runtime/replay/ @abrichr /packages/flow/openadapt_flow/runtime/resolver.py @abrichr /packages/flow/openadapt_flow/submit_binding.py @abrichr /packages/flow/openadapt_flow/validation/ @abrichr diff --git a/.github/ci-tools/pyproject.toml b/.github/ci-tools/pyproject.toml index b142fc37fc..1899b41ded 100644 --- a/.github/ci-tools/pyproject.toml +++ b/.github/ci-tools/pyproject.toml @@ -16,6 +16,9 @@ test = ["pytest>=9.1.1", "packaging>=25.0"] build = ["build>=1.6.1", "pip>=25.3"] pip = ["pip>=25.3"] lint = ["ruff==0.17.0"] +# Combines the flow-unit shards' coverage data (flow-coverage in packages.yml); +# keep it at the version packages/flow/uv.lock pins, so the data format matches. +coverage = ["coverage[toml]==7.15.1"] release = ["build>=1.6.1", "twine>=7.0.0"] # The in-guest Windows agent's screen and input modules, for the hosted # Windows replay (desktop-replay.yml), which runs Python 3.12. CI only: Flow diff --git a/.github/ci-tools/uv.lock b/.github/ci-tools/uv.lock index 1b15787978..c379bac811 100644 --- a/.github/ci-tools/uv.lock +++ b/.github/ci-tools/uv.lock @@ -269,6 +269,109 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "coverage" +version = "7.15.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4a/83/6051c2a2feab48ae5bd27c84ef047191d2d4a3172f689e38eaa48ed17db1/coverage-7.15.1.tar.gz", hash = "sha256:165e9949eaf222ef1f018635d0d7f368a23bfe0212af558534c40d8c04686d67", size = 927640, upload-time = "2026-07-12T20:58:19.908Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/76/eef242d6bb95fb737fefd9bbf3a318897e4e82cf543b53a61c2a6e8588eb/coverage-7.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:05d87c2a43373ad6b976d0a99ad58c48633633bcdeb896dc645a006472cc4a71", size = 221195, upload-time = "2026-07-12T20:55:55.82Z" }, + { url = "https://files.pythonhosted.org/packages/89/73/41cd50da59d513a30fd3a34b5516b962ac17514defdb6705948446a5c0b1/coverage-7.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2afce82f2cf8f4c9002746a42755e1dc61baff33d9f7ab5569b4c9101f8f4d1d", size = 221714, upload-time = "2026-07-12T20:55:58.104Z" }, + { url = "https://files.pythonhosted.org/packages/22/9d/6df6ac6677719a087c839208186525b7b1f3653c50196c43246482ada65e/coverage-7.15.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0a545ef5384d787d0fcac6c349afc2c5f99dcc39e13ed3c191b2c06305f64c04", size = 248454, upload-time = "2026-07-12T20:55:59.336Z" }, + { url = "https://files.pythonhosted.org/packages/9f/f5/86f92c429fbf942986d01c3bb7b0b6c3ad06b09f7fa745023877413dde83/coverage-7.15.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:afaa144b8f5b3bc69fe0ce50d401c46b01ab264782553bfd05a3f98804524ecb", size = 250282, upload-time = "2026-07-12T20:56:00.589Z" }, + { url = "https://files.pythonhosted.org/packages/47/c6/99d0f1c1dd1583aaf8c1deca447e44426be54a76027a8c55e29970f22b15/coverage-7.15.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1b6099490e5f88569c46b18605f556c3b30acc9a0a219cf7ef8fab8f7161ec4", size = 252149, upload-time = "2026-07-12T20:56:01.853Z" }, + { url = "https://files.pythonhosted.org/packages/b2/c3/5d30740ec96f5fd8a659e46b6ee9224197f87aa66ce4a20e93dcf46221ac/coverage-7.15.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bb5f6c2cf1ffd0bf2bd925c7cdcae9b4f208e9696d453ed51eb1f5fa0cc5b45b", size = 254061, upload-time = "2026-07-12T20:56:03.277Z" }, + { url = "https://files.pythonhosted.org/packages/71/e5/3afb2950673ca6cd22bc9ad6a9d6058c853bef8fe27a6d1df3adc274fd88/coverage-7.15.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:81572011fc1fc271317da35da593944daef7bfd507085e35751abbe702b74f69", size = 249152, upload-time = "2026-07-12T20:56:04.618Z" }, + { url = "https://files.pythonhosted.org/packages/ca/53/25ab3c0a7cf517ed4d30cd4dd82331e005d4b57fec8c19c0ffd94fb50baa/coverage-7.15.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8f765d13c08497687d0780cca66115c6aa4ba6703ad43b61e94fab9db689e3a3", size = 250187, upload-time = "2026-07-12T20:56:06Z" }, + { url = "https://files.pythonhosted.org/packages/ad/2a/8afb5f994e26e919e5dca5164f1c7b6b7ce6090aab1aac32b1ae1782f047/coverage-7.15.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:771caba880fee96493d18dfc465c318e08ab74e3bc2a3e4089e52514be6a6e54", size = 248193, upload-time = "2026-07-12T20:56:07.376Z" }, + { url = "https://files.pythonhosted.org/packages/d4/62/b6616e15288c9a7b628f7745e832fd8af2c03ec1f7dc11da25947f5ab16f/coverage-7.15.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:433a73200848e80f27712fc113b6ff5311f29b479a7d3bd4b1106138a77f9674", size = 252004, upload-time = "2026-07-12T20:56:08.787Z" }, + { url = "https://files.pythonhosted.org/packages/9e/21/5d80d65e4df3018dedb23a44f276f20ce26e429ffd76df03de03bcf9a767/coverage-7.15.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:5d6fa45079db9fbeba0a69e3d91189f05301d6ac918162a53179d32fc9ed4910", size = 248463, upload-time = "2026-07-12T20:56:10.245Z" }, + { url = "https://files.pythonhosted.org/packages/53/4b/04a22708691561c44d77e1d5a60857b351310fdfbf253533780bb31c8b6f/coverage-7.15.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:00b6703c6640075cdce5124e9335dfdf9167272475301828acfdd09c0e5ee731", size = 249064, upload-time = "2026-07-12T20:56:11.614Z" }, + { url = "https://files.pythonhosted.org/packages/82/c9/a5c1e8954e657559de478acc1ef73e9393d3fc9b4a2ab4427501d765aca2/coverage-7.15.1-cp310-cp310-win32.whl", hash = "sha256:3ad9a0eac4728327fd870d52f74d2e631d176c5f178eaea2d9983ab5b9755a55", size = 223248, upload-time = "2026-07-12T20:56:13.068Z" }, + { url = "https://files.pythonhosted.org/packages/54/49/5f6566e14611a58e93a926f3a8a7b22e4e0702ebb4c467ac38f452c7f4cf/coverage-7.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:eb5fa75dc3d30e3a1b75da97973479b20ffa9b0641ff56d6e94b5f3e210daa54", size = 223874, upload-time = "2026-07-12T20:56:14.396Z" }, + { url = "https://files.pythonhosted.org/packages/67/ee/5095e07a0986930174fc153fd0bb115f7f2724f5344cc672e016d4f23a4e/coverage-7.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6506330b4a8dcf53b95bd84d8d0e817107cdb3fc1438e835029cdf0bc6612eb0", size = 221320, upload-time = "2026-07-12T20:56:16.036Z" }, + { url = "https://files.pythonhosted.org/packages/43/7a/7e2598ce98433a214020a61c0755d5961f9f26df0c630dc73e06b86d3416/coverage-7.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8a51a8ec382c39d939cba0ab07ae949077ae4e842343bd4eed22d432358cea9", size = 221823, upload-time = "2026-07-12T20:56:17.54Z" }, + { url = "https://files.pythonhosted.org/packages/8b/4f/67dac6a69139b490a239d91b6d5ef127982ffb89159769241656ab879ee5/coverage-7.15.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:18ea20e3922d7f8ca9e0ef1084408d08c4ad62d5e531cb9c1f6896a99297ebea", size = 252242, upload-time = "2026-07-12T20:56:18.868Z" }, + { url = "https://files.pythonhosted.org/packages/05/37/5e439725a96de592309725550c8df639c359c209dcb4b152ed46032d4c0d/coverage-7.15.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:aab9902a64b8390e3b56e539fddae1d79a267807fe5cb0c18d7d2f544ce867e2", size = 254153, upload-time = "2026-07-12T20:56:20.118Z" }, + { url = "https://files.pythonhosted.org/packages/0f/1c/671ba9e15f9651a99962fb588a1fe4fb267cae4bb85f9bb4ac4413c6f7ef/coverage-7.15.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cc316264317b07a9e90d7f2b4188a15e36e9b54e651081b791b0515fa612a29", size = 256261, upload-time = "2026-07-12T20:56:21.682Z" }, + { url = "https://files.pythonhosted.org/packages/d6/3c/88305322b4d015b4536b7174b8f9b87f850f01af9d89008cdbf984b65ff2/coverage-7.15.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d4e47e7eea81a8ccf060a07627654151d929da62c7b715738387c200905cec89", size = 258222, upload-time = "2026-07-12T20:56:22.962Z" }, + { url = "https://files.pythonhosted.org/packages/8d/20/d02e42333a57f266ded61ed4fb3821da1f2dc143734aaa3dcc9c117204c5/coverage-7.15.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c6829d9a3b55ad2b73ef5fda8302e5be03683789e88b1a079dcf4a773229c21d", size = 252368, upload-time = "2026-07-12T20:56:24.475Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d0/94ebc010926a191d83e83b1f1236f8bd0d14d0eb98b5c324aa4be2589a8e/coverage-7.15.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:764e045811f9c8cda436641f3f088283351d331a519b5807f19041cd0a68da1c", size = 253953, upload-time = "2026-07-12T20:56:26.036Z" }, + { url = "https://files.pythonhosted.org/packages/2e/a6/2c8553191da0c2da2c43ff294fb9bab57a5b0fae03560304a82a8b5addc3/coverage-7.15.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:09b3b088aa24489c4082bcc35fcc8224281ab94a653dfb6d3f0c8165b0d628ab", size = 252016, upload-time = "2026-07-12T20:56:27.374Z" }, + { url = "https://files.pythonhosted.org/packages/17/99/20f47986d8360fa1a31d9858dd2ba0be009d44ecfa8d02120b1eb93c028b/coverage-7.15.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7911b02f57053adf8164ae63edb1c26574d24dfccabadc5268cf69310a69a358", size = 255783, upload-time = "2026-07-12T20:56:28.921Z" }, + { url = "https://files.pythonhosted.org/packages/17/36/fb61983b5259f78fa5e62ee74e91fe4de4c556fcbc9a3b9c9021c2f8b57b/coverage-7.15.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:664e279ed40599b8ed16f4db18d92a7e212c73129672bec8f5d96d4da48d2404", size = 251735, upload-time = "2026-07-12T20:56:30.465Z" }, + { url = "https://files.pythonhosted.org/packages/6c/2e/d109d8d2d6c726ba2e78125297073918a2a91464f0ea777e5398fa3cf75c/coverage-7.15.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:34fe7cf79d5f1f87f2e8ce7dc1c32950841f50e10d0120f263856acfad66de34", size = 252645, upload-time = "2026-07-12T20:56:32.076Z" }, + { url = "https://files.pythonhosted.org/packages/bc/a0/5b3219cbb46135e14673427f2bf5890c4da4e6f655243692f3448aa3f42c/coverage-7.15.1-cp311-cp311-win32.whl", hash = "sha256:5e2d2536d2f57a354aa382ed303ac0e2e5c9522a508c05b998d26181b94163a7", size = 223414, upload-time = "2026-07-12T20:56:33.432Z" }, + { url = "https://files.pythonhosted.org/packages/5b/80/24e13ade0b6df8090e2492f9c55044bf1423f7ef28c76fc1af8c827a61cb/coverage-7.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:c337da8fca7ea93ab43f3868cfcde6cf6dad32c3906b273cfbad5d7390bc423b", size = 223888, upload-time = "2026-07-12T20:56:34.784Z" }, + { url = "https://files.pythonhosted.org/packages/2d/9e/34659930ae380491af48e2f5f5f9a2e99cd9fb7de3d30f27be5ac5425137/coverage-7.15.1-cp311-cp311-win_arm64.whl", hash = "sha256:db3403fdb7a94d5eb73e099befad8104d2a7d110a0f0d99df0de61c5d1fa756c", size = 223435, upload-time = "2026-07-12T20:56:36.302Z" }, + { url = "https://files.pythonhosted.org/packages/d9/76/32c1826309beaf4604c54accef108fdd611e5e5e93f2f5192f050cd5f6bd/coverage-7.15.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d9476292594309db922cc841dd13b303b3c388f4c25d279884f7e2341c681f80", size = 221497, upload-time = "2026-07-12T20:56:37.628Z" }, + { url = "https://files.pythonhosted.org/packages/db/5c/b88ce0d68fa550c7f3b58617fbf363bce64df5bf8295a01b627e4696e022/coverage-7.15.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0c579056b0de461b3a62318b63d0b6ce90aed7f8158d3f00da094df82f29d189", size = 221854, upload-time = "2026-07-12T20:56:39.033Z" }, + { url = "https://files.pythonhosted.org/packages/0e/fe/8509fd2a66fc4e0a829f76a0f0b1dc3cc163368352435b5f243168658077/coverage-7.15.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:23214bdbe226f2b0e9c66a7d6a1d59d4a88045dcf86e702cf0fe0d0935e3d615", size = 253359, upload-time = "2026-07-12T20:56:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/e5/81/c7009ed7ea9765adb2b9d095054d748266fae5f07ac6c5f925f33715fcde/coverage-7.15.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:df164be93b46b4825cc39339440a05edc54c4d1d865ba4a60fd43d151a2a1cd3", size = 256096, upload-time = "2026-07-12T20:56:42.115Z" }, + { url = "https://files.pythonhosted.org/packages/21/52/dc8ee03968a5ba86e2da5aa48ddc9e3747bd65d63825fdce2d96acb9c5ff/coverage-7.15.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a524fca1a6f08927d9dc2d4c873cfb7bd7202c247f08b14bdc02424071b8b304", size = 257211, upload-time = "2026-07-12T20:56:43.513Z" }, + { url = "https://files.pythonhosted.org/packages/b8/27/95d7623908da8937deb53d48efcdbf423907a47540e63c62fa21372c652b/coverage-7.15.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d70f3542cd38de85a9e257dcb1ac4c1ab4b6d7d2c2a645809207556628755d1c", size = 259473, upload-time = "2026-07-12T20:56:44.974Z" }, + { url = "https://files.pythonhosted.org/packages/f1/3b/730d761928de97d585465680b568ae69622fb40716babadeabffe75cb51b/coverage-7.15.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d78aa537237212c4313aabe5e964b66acc86350ed19ebc56a3e202df33b6077b", size = 253759, upload-time = "2026-07-12T20:56:46.615Z" }, + { url = "https://files.pythonhosted.org/packages/f1/fc/6b9277acff1f9484b6c12857af5774689d1a6a95e13265f7405329d2f5da/coverage-7.15.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a318112bb4f79d9d04766196d5a3388caa825908a6a9b052aa87de3d9aea7c61", size = 255131, upload-time = "2026-07-12T20:56:48.073Z" }, + { url = "https://files.pythonhosted.org/packages/3d/f2/c704f86129594ba34e25a64695d2068c71d51c2b98907184d716c94f4aec/coverage-7.15.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e55d24cada901963eed5bc89fa562aa033f0d84b9d3de4ecf363737c13aed11e", size = 253275, upload-time = "2026-07-12T20:56:49.538Z" }, + { url = "https://files.pythonhosted.org/packages/f6/29/80fee8af47de4a6dce71ccf2938491f444687a756af258a56d8469b8f1b0/coverage-7.15.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3c78f0cea7275342cf2adc2ad5fdd0aafa106ad91e66d573568f2fcf62c41df5", size = 257345, upload-time = "2026-07-12T20:56:51.038Z" }, + { url = "https://files.pythonhosted.org/packages/20/21/a1e7d7ed1b48a8adf8fd5154d9e83fcc5ad8e6ff20ae00e44865057dce8d/coverage-7.15.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:86bd37eabe39977216f630a7fc1b698e7f5e81a191c7186013245c6c3d313f9d", size = 252844, upload-time = "2026-07-12T20:56:52.535Z" }, + { url = "https://files.pythonhosted.org/packages/a7/8c/a4bc26e6ee207d412f3678f04d74be1550e83140563ca0e4997510579712/coverage-7.15.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c6db15c217693bdc3ca0b84de1ba9afafe1c14c26a8a29d77f4ed0de2b6132e2", size = 254716, upload-time = "2026-07-12T20:56:53.968Z" }, + { url = "https://files.pythonhosted.org/packages/11/9d/8ad0266ecfada6353cf6627a1a02294cf55a907521b6ee0bd7b770cfd659/coverage-7.15.1-cp312-cp312-win32.whl", hash = "sha256:359f3fbe09a51500c51966596ee4ee4070b356552c70b3b2420eb200d68e0f76", size = 223554, upload-time = "2026-07-12T20:56:55.583Z" }, + { url = "https://files.pythonhosted.org/packages/81/6d/24224929e06c6e05a93f738bc5f9e8e6ab658f8f1d9b823e7b85430e28b8/coverage-7.15.1-cp312-cp312-win_amd64.whl", hash = "sha256:fa75dc099c126e941a9c0baa8ebd2cbc78bd778687534fe410baf754f6d9e374", size = 224087, upload-time = "2026-07-12T20:56:57.041Z" }, + { url = "https://files.pythonhosted.org/packages/35/23/f81441dd01de88e53c97842e706907b307d9078918c3f4998b11e9ac7250/coverage-7.15.1-cp312-cp312-win_arm64.whl", hash = "sha256:26f89cf6d0634375f454fa71057945ad18edb0f1607a90fecf22c57dc3dc289a", size = 223472, upload-time = "2026-07-12T20:56:58.594Z" }, + { url = "https://files.pythonhosted.org/packages/ca/1e/6fa289d7993a2a39f1b283ddb58c4bfec80f7800be654b8ba8a9f6a07c63/coverage-7.15.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:71ac4ca1658ca99160fd58cc6967110e989c34b04627f24ed6ec9f70fb24571a", size = 221519, upload-time = "2026-07-12T20:57:00.081Z" }, + { url = "https://files.pythonhosted.org/packages/6f/e1/0db4902a0588234a70ab0218073c0b20fbc5c740aa35f91d360160a2ebc9/coverage-7.15.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:26a40cbf2b13bd94af53ee02a424cb3bb96a9edfac0d00834bd068512a62714b", size = 221895, upload-time = "2026-07-12T20:57:01.867Z" }, + { url = "https://files.pythonhosted.org/packages/b4/cb/3719783865092dac5e08df842730305ee9ab1973ae7ddb6fbdf27d401f30/coverage-7.15.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f4c5a5eff4ad4f9f7088fd3fc7a66d98d06566ee294b3b053309fb0a3b45be1e", size = 252882, upload-time = "2026-07-12T20:57:03.459Z" }, + { url = "https://files.pythonhosted.org/packages/1c/5e/caf3abbdbb22629626160ffc9c017eb995b7cb11c0be46b974834cef1792/coverage-7.15.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:962aa56c1c9b016d681265880eb6acc9966029d2c4c559319cc43a1abbb9b59a", size = 255479, upload-time = "2026-07-12T20:57:04.984Z" }, + { url = "https://files.pythonhosted.org/packages/d6/f1/d60f375bfe095fef944f0f19427aefdbf9bdd5a9571c41a4bf6e2f5fdb81/coverage-7.15.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1678eb2dc57a8ce67601b029582ef6d41e9e6ca22692aaeccd4107e40f27386c", size = 256715, upload-time = "2026-07-12T20:57:06.446Z" }, + { url = "https://files.pythonhosted.org/packages/d7/17/8b0cbc90d02dc5adad4d9034c1824ec3fa567771b4c39d9c1e3f9b1431b8/coverage-7.15.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1174900a43f6f8c425fee10d7dbddc308adefcdc78aaced32357f5ab750a0e90", size = 258845, upload-time = "2026-07-12T20:57:08.092Z" }, + { url = "https://files.pythonhosted.org/packages/92/29/c5e69f5fb75c322e9a3e4ef64d02eebfc3d66efceccc8514ff80a3c13a56/coverage-7.15.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:98847557a6859cadf693792ce89f440cb89692993f60dc6d3a7e35f3d340216f", size = 253098, upload-time = "2026-07-12T20:57:09.636Z" }, + { url = "https://files.pythonhosted.org/packages/64/57/21144252fdd0c01d707d48fbcea13a80b0b7c42ced3f299f885ab8978c3a/coverage-7.15.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:8697b2edb57143546a24389efc11e1b000cd5800fc20d84f04edb601e4a7cfb8", size = 254844, upload-time = "2026-07-12T20:57:11.141Z" }, + { url = "https://files.pythonhosted.org/packages/59/2a/499a28a322b0ce6768328e6c5bb2e2ad00ac068a7c7adb2ecd8533c8c5d9/coverage-7.15.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6827ac0519be3fe91bf96b4060eb00d1d24f82649b29862cd75a3cfca248b02a", size = 252807, upload-time = "2026-07-12T20:57:12.678Z" }, + { url = "https://files.pythonhosted.org/packages/2c/6f/928a95da5da8b60f2b00e1482c7787b3316188e6d2d227fb8e124ada43a1/coverage-7.15.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:2de8ecbbc77c7e4d22572779920ed8979c69168675e96be3a548c996568c6c31", size = 256965, upload-time = "2026-07-12T20:57:14.326Z" }, + { url = "https://files.pythonhosted.org/packages/16/10/889adbc1b8c9f866ed51e18a98bcafc0259fb9d29b81f50a719407c64ea8/coverage-7.15.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2b25f0f0fa5260df9d7bb55d47c8bdc23fa3382c1a18f7c9cae122e6c320b1ad", size = 252628, upload-time = "2026-07-12T20:57:15.892Z" }, + { url = "https://files.pythonhosted.org/packages/1a/30/a5e1871e5d93416511f8e359d1ccebfe0cbb050a1bbf7dd20228533ec0cf/coverage-7.15.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a2effcbd93ae340a58db718fe4181d967f84d352c4cefeaab4ff82ce813901a", size = 254399, upload-time = "2026-07-12T20:57:17.703Z" }, + { url = "https://files.pythonhosted.org/packages/2d/26/c36fbffd549dadbdd1a75827528fb00a4c46aa3187b007b750b1e2cebbf2/coverage-7.15.1-cp313-cp313-win32.whl", hash = "sha256:895e65c96aef0cecea250f6e35e9a32f11375514e1a0cb5210e0fda128c04e8e", size = 223564, upload-time = "2026-07-12T20:57:19.253Z" }, + { url = "https://files.pythonhosted.org/packages/16/fc/becbb9d2c4206d242b9b1e1e8e24a42f7926c0200dd3c788b9fab4bb96d5/coverage-7.15.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6d0a28b63a0d75f9ed5118105d1154fc3aa40a8605a30d5d87e3d043ad90fe7", size = 224106, upload-time = "2026-07-12T20:57:21.108Z" }, + { url = "https://files.pythonhosted.org/packages/d3/30/1cfc641461369b6858799fca61c0a8b5edc490c519bf7c636ffa6bbf556f/coverage-7.15.1-cp313-cp313-win_arm64.whl", hash = "sha256:b4ee9818e8bae3544379ad2c09b851c4fb886aaa8860d57a1c1316ddcb16db49", size = 223497, upload-time = "2026-07-12T20:57:22.734Z" }, + { url = "https://files.pythonhosted.org/packages/f0/46/81961952e7aebfb38ad0ae4264e8954cc607a7af9e7ac111f9fa986595cc/coverage-7.15.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a886af95f59edf67d5770fd3564d53f4a8af93f25f8c1d60d27e00d7f5674ee8", size = 221560, upload-time = "2026-07-12T20:57:24.282Z" }, + { url = "https://files.pythonhosted.org/packages/13/d2/ee14d715889f216baf47301d9f469e08fff6995552aaf67e897b282865f6/coverage-7.15.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:985657ebd707941de90d488d1cbb5efac20bdf81f7b91eba771624ccda4d36f4", size = 221894, upload-time = "2026-07-12T20:57:25.87Z" }, + { url = "https://files.pythonhosted.org/packages/f3/38/f830bc6e6c2c5f23f43847125e6c650d378872f7eeba8d49f1d42193e8a9/coverage-7.15.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5bbe2a06e0a5e1404d9ffbdb49b819bbd6a3bb198ebea4c8dfe7ad9f1e1c2e81", size = 252938, upload-time = "2026-07-12T20:57:27.506Z" }, + { url = "https://files.pythonhosted.org/packages/e1/53/0d3dd963631259d794c898735d5436e68d6a8d40749c419a07ff7c171469/coverage-7.15.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bde0fe24083d0b7b3dbafa7a09f0796410af1afa2523f28f5f208d8340a4aaca", size = 255445, upload-time = "2026-07-12T20:57:29.234Z" }, + { url = "https://files.pythonhosted.org/packages/b1/fd/aabed228557565c958259251b89bab8c5669b31291fa63b3e2154ebb017a/coverage-7.15.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f89f7453d6d46db14cf233e2cd8edcd78de2b9c49d4f1dc109590b4e5dbfbb74", size = 256790, upload-time = "2026-07-12T20:57:30.826Z" }, + { url = "https://files.pythonhosted.org/packages/bc/aa/1cc888e5d3623e603c4e5399653cb25728bb2b40d7519188a3e293d24620/coverage-7.15.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cc3656c9ecc27b36bd0907455b77f83c0069ca9ad4a66dec892b76c696eb6047", size = 259104, upload-time = "2026-07-12T20:57:32.63Z" }, + { url = "https://files.pythonhosted.org/packages/5f/61/fc16d5f5e53098dae41efa21e8ccc611a9b4fe922750dd03dc56db552182/coverage-7.15.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:24d8e85a2a45e44883b488c2659f51fa761dad5353fdb319b672a93facbd2ca9", size = 252956, upload-time = "2026-07-12T20:57:34.316Z" }, + { url = "https://files.pythonhosted.org/packages/a1/f3/52384668c3de4519ca770bf1975a89e4d6eb5aa2faf0da0577a14008cba4/coverage-7.15.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:68931b5fe746ed4fdaa8892989cab9e6c35781eeb3b0ab2ded893d561e1b3652", size = 254797, upload-time = "2026-07-12T20:57:35.947Z" }, + { url = "https://files.pythonhosted.org/packages/ce/68/54b807e7c1868178e902fd8360b5d4e559394462f97285c50edf1c4608db/coverage-7.15.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:1ce6947e2a95534ecaa5a15e73c21e550514c980d80eda204d064d789a95f6a4", size = 252762, upload-time = "2026-07-12T20:57:37.856Z" }, + { url = "https://files.pythonhosted.org/packages/7b/48/dde8adf0338e3ace738757dccf1ce817e5fdcadfae77e1b48a77e5a3b265/coverage-7.15.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:841befdbc89b9c82435fc25b0f4f41858b6238693e45af758bec4cfc1968171c", size = 257037, upload-time = "2026-07-12T20:57:39.488Z" }, + { url = "https://files.pythonhosted.org/packages/07/f2/179dd88cf60a0aeeee16a970ffe250dccea8b80ed4beab4c5d3f6c41ad4b/coverage-7.15.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:5d3de58b837375e7f4c0e1a088ccab5f655efb2fd7427b729df02c862a559633", size = 252577, upload-time = "2026-07-12T20:57:41.363Z" }, + { url = "https://files.pythonhosted.org/packages/2c/37/8a593d69ab521beb6a105a2017cac4ba94425ee0a8349e29c3c0b522d24f/coverage-7.15.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b1801963f9f44ae0c0f6d737bc7aeb2bbcde7d1fe7e3b43cddc1961af42d3b41", size = 254235, upload-time = "2026-07-12T20:57:43.025Z" }, + { url = "https://files.pythonhosted.org/packages/6d/34/bc9b3bced66f2cdad4bf5e57ae51c54ea226e8aaaebfc9370a9a11877bf3/coverage-7.15.1-cp314-cp314-win32.whl", hash = "sha256:8c7953c4128ef53b6ffb5f90d87c87d4ce26731df294760bb2314eb0e069e44b", size = 223771, upload-time = "2026-07-12T20:57:44.662Z" }, + { url = "https://files.pythonhosted.org/packages/4c/f3/4d20337bed61915d14349e62b88d5e4144d5a9872b64adbe90e9906db6db/coverage-7.15.1-cp314-cp314-win_amd64.whl", hash = "sha256:6f0bab60a582d415f0fb535ccff13ba334a47a1538f98913330a525d23bd535a", size = 224257, upload-time = "2026-07-12T20:57:46.412Z" }, + { url = "https://files.pythonhosted.org/packages/7b/df/bbfeae4948f3ded516f92b32f2d57952427fc5ecfc0924487bb6ee6a5f38/coverage-7.15.1-cp314-cp314-win_arm64.whl", hash = "sha256:0f410ee8f0ac4ec7db71bc0b7632a8b9994e1cad2755bd1566c17e6a162caa74", size = 223683, upload-time = "2026-07-12T20:57:48.106Z" }, + { url = "https://files.pythonhosted.org/packages/35/65/0b431856064e387d1f5cf474625e4a0465e907024d42f35de6af19ced0be/coverage-7.15.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:fc868bab88e049d41fcd41766810d790a8b960053be2a45e060f5ce0d31d258b", size = 222298, upload-time = "2026-07-12T20:57:49.882Z" }, + { url = "https://files.pythonhosted.org/packages/a6/96/50eac9bd49df8a3df5f3d38746d1bf332299dffb554486c94ebd55c9dc49/coverage-7.15.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:206d4ec6028f2773b40932d09f074539d6bcdd8f6b318d40cb04bdbd68ed0b49", size = 222561, upload-time = "2026-07-12T20:57:51.688Z" }, + { url = "https://files.pythonhosted.org/packages/e0/5b/6ba1c4a27e10b8816fd2622b98162c83d3bdf1185097360373611bf96364/coverage-7.15.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:620482ef1c9f4e61f962e159325fe77dea59d16e39d9c9470d069053b244d864", size = 263923, upload-time = "2026-07-12T20:57:53.392Z" }, + { url = "https://files.pythonhosted.org/packages/e4/59/fe03ade97a3ca2d890e98c572cf48a99fda9adba85757c34b823f41efe1e/coverage-7.15.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d385fc9b054e309ad3cecdc77b586d2af0c98aeec2fdb3773544586f366e817c", size = 266043, upload-time = "2026-07-12T20:57:55.095Z" }, + { url = "https://files.pythonhosted.org/packages/16/e0/55c4b1217a572a43e13b39e1eb78d0da29fb23679003bd0cdf22c50b1978/coverage-7.15.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f1198bca9c0dd7c188aae1f185b0c0b5fc4f0a2b6909000858c29550320bdb07", size = 268465, upload-time = "2026-07-12T20:57:57.017Z" }, + { url = "https://files.pythonhosted.org/packages/b1/e2/ee47944f76afc03909119b036fe9e0da8cbd274a5141287de79791a0fb6d/coverage-7.15.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d0297e6a070eadb49df7cddd0ab6f420b8b689dd8904c7dd815a323168fa57e", size = 269584, upload-time = "2026-07-12T20:57:58.958Z" }, + { url = "https://files.pythonhosted.org/packages/cb/8a/6b4d9779c7b2e21c3d12c3425e3261aa7411399319e27aa402dfec4db5d0/coverage-7.15.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:916fcf2214f56960e409561b37fc32a160a42b6e85483d0652d7b70fa55d707e", size = 263019, upload-time = "2026-07-12T20:58:00.979Z" }, + { url = "https://files.pythonhosted.org/packages/c4/1e/db5c7fa0c8ba5ece390a1e1a3f30db71d440240a80589df28e66a7503c40/coverage-7.15.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:f837bae572c7869ffaa502e604c87e182543012831cf87aae4586ad090ac6dcf", size = 265916, upload-time = "2026-07-12T20:58:03.005Z" }, + { url = "https://files.pythonhosted.org/packages/83/53/fe5176682b00709b13fab36addd26883139d0dea430816fea412e69255e2/coverage-7.15.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3ea65e3ee6c7c32349fd00559927a9e577bdd72386087eeed1c42b62dfce9b82", size = 263520, upload-time = "2026-07-12T20:58:04.994Z" }, + { url = "https://files.pythonhosted.org/packages/f9/e7/16f15127be93fbc70c667df5ec5dce934fc76c9b0888d84969a5d5341e2c/coverage-7.15.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:345034976f46a1c54bd17f4e43eb30bb92cb7082fcddff03250cff136cc4eb82", size = 267254, upload-time = "2026-07-12T20:58:06.824Z" }, + { url = "https://files.pythonhosted.org/packages/cd/73/e5119111f6f065376395a525f7ce6e9174d83f3db6d217ea0211a61cca4d/coverage-7.15.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4f051a64eb8f8addb4661c2b41d6eea5b7ebc68ad4b2baea8d9bc54e1956e5f7", size = 262366, upload-time = "2026-07-12T20:58:08.555Z" }, + { url = "https://files.pythonhosted.org/packages/d7/9c/6d0a81182df18a73b081e7a8630f0e2a52b12dfd7898c6ab839551a454d2/coverage-7.15.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a7625770f7720b49bb30d194ad2f8d50fab3c5177874af3d2399676f95f9c594", size = 264680, upload-time = "2026-07-12T20:58:10.359Z" }, + { url = "https://files.pythonhosted.org/packages/d9/a2/bac0cbd4450638f1be2041a464b1766c8cc94abf705a2df6f1c8d4be870d/coverage-7.15.1-cp314-cp314t-win32.whl", hash = "sha256:81e503d130a472ad1bd38199ecd35116b40d92bcd31e27a2cacde035381f2070", size = 224077, upload-time = "2026-07-12T20:58:12.065Z" }, + { url = "https://files.pythonhosted.org/packages/f0/b2/d83c5403155172a43ba47c08641bad3f89822d8405102423a41339d2c857/coverage-7.15.1-cp314-cp314t-win_amd64.whl", hash = "sha256:724e878b213b302ad46e9f2fc872d386613f20ebfc492a211482d917ea76c14f", size = 224908, upload-time = "2026-07-12T20:58:13.956Z" }, + { url = "https://files.pythonhosted.org/packages/cc/41/442b74cad832cc77712080585455482e7cc4f4a9a13192f65731dcd18231/coverage-7.15.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ce2f05c14d077f406fefc4fa5e4f093ad0e0787549f6582535d6e28766f0361b", size = 224219, upload-time = "2026-07-12T20:58:16.315Z" }, + { url = "https://files.pythonhosted.org/packages/34/98/07a67cf1a26e795d617ed5c540c042b0ac87b72f810c30c07f076cf334f3/coverage-7.15.1-py3-none-any.whl", hash = "sha256:717d01e6e00bed56ad13306f19e0dd2f4f645ee8159d2c72c72301d6cfc7090c", size = 213284, upload-time = "2026-07-12T20:58:18.079Z" }, +] + +[package.optional-dependencies] +toml = [ + { name = "tomli", marker = "python_full_version <= '3.11'" }, +] + [[package]] name = "cryptography" version = "50.0.2" @@ -576,6 +679,9 @@ build = [ { name = "build" }, { name = "pip" }, ] +coverage = [ + { name = "coverage", extra = ["toml"] }, +] lint = [ { name = "ruff" }, ] @@ -602,6 +708,7 @@ build = [ { name = "build", specifier = ">=1.6.1" }, { name = "pip", specifier = ">=25.3" }, ] +coverage = [{ name = "coverage", extras = ["toml"], specifier = "==7.15.1" }] lint = [{ name = "ruff", specifier = "==0.17.0" }] pip = [{ name = "pip", specifier = ">=25.3" }] release = [ diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 591c08265a..68a59b93ee 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -423,7 +423,9 @@ jobs: # the group. if: github.event.pull_request.draft != true && (needs.scope.outputs.flow == 'true' && github.event_name != 'merge_group') runs-on: ubuntu-latest - timeout-minutes: 40 + # The nightly tier (a schedule or a dispatch) also measures coverage, + # which slows the suite by about a third; it gets 60 minutes. + timeout-minutes: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && 60 || 40 }} strategy: fail-fast: false matrix: @@ -506,6 +508,7 @@ jobs: find tests -name 'test_*.py' "${e2e[@]}" \ -not -path 'tests/test_install_playwright_browser.py' \ -not -path 'tests/test_qualification_gate_campaign.py' \ + -not -path 'tests/golden_runs/test_golden_runs.py' \ | python ../../scripts/ci/flow_shards.py --shard "$SHARD" --of "$SHARDS" > "$RUNNER_TEMP/shard.txt" wc -l < "$RUNNER_TEMP/shard.txt" - name: Test @@ -513,6 +516,11 @@ jobs: # slow tests (over about 5 s on CI) that main and nightly run instead. env: OPENADAPT_TEST_LANE: ${{ github.event_name == 'pull_request' && 'fast' || 'full' }} + # Each shard keeps its coverage data; flow-coverage combines them. + COVERAGE_FILE: runs/coverage-shard-${{ matrix.shard }}.data + # Coverage only on the nightly tier, so it adds no time to a pull + # request's ten-minute `ci` or to main's post-merge run. + COVERAGE_ARGS: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && '--cov --cov-report=' || '' }} # -n logical: one xdist worker per vCPU. (-n auto counts physical # cores and started two workers on the four-vCPU runner.) --dist # loadfile keeps each file on one worker, so module fixtures and @@ -522,7 +530,75 @@ jobs: set -euo pipefail mkdir -p runs mapfile -t files < "$RUNNER_TEMP/shard.txt" - pytest -n logical --dist loadfile -v --durations=20 --basetemp=runs/ci "${files[@]}" + # shellcheck disable=SC2086 # COVERAGE_ARGS is empty or two flags. + pytest -n logical --dist loadfile -v --durations=20 --basetemp=runs/ci \ + $COVERAGE_ARGS "${files[@]}" + - name: Upload coverage data + if: always() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: flow-coverage-shard-${{ matrix.shard }} + path: packages/flow/runs/coverage-shard-${{ matrix.shard }}.data + if-no-files-found: warn + retention-days: 14 + + flow-coverage: + # Measures safety-path coverage and reports it in the job summary. It does + # not gate yet: the floor is set at the measured value once it is known + # (docs/design/DECOMPOSITION.md, section 9). Keep the include list in sync + # with the strict mypy list above and CODEOWNERS. It is not in + # packages-gate, and runs on the nightly tier only, where flow-unit + # collects the data. + name: flow safety-path coverage (reported, not gating) + needs: [scope, flow-unit] + if: always() && needs.scope.outputs.flow == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + runs-on: ubuntu-latest + timeout-minutes: 10 + defaults: + run: + working-directory: packages/flow + env: + SAFETY_PATH: >- + openadapt_flow/compiler/*,openadapt_flow/identity_signals.py,openadapt_flow/runtime/identity*,openadapt_flow/runtime/replayer.py,openadapt_flow/runtime/replay/*,openadapt_flow/runtime/resolver.py,openadapt_flow/submit_binding.py,openadapt_flow/policy.py,openadapt_flow/qualification.py,openadapt_flow/qualification/*,openadapt_flow/runtime/effects/* + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: "3.12" + - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1 + with: + enable-cache: true + cache-dependency-glob: .github/ci-tools/uv.lock + cache-suffix: flow-coverage + - name: Install coverage from the CI tools lock + run: python ../../scripts/ci/locked_install.py --lock .github/ci-tools:coverage + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + pattern: flow-coverage-shard-* + path: packages/flow/runs/coverage + merge-multiple: true + - name: Combine and report + run: | + set -euo pipefail + ls runs/coverage + coverage combine --keep runs/coverage/*.data + { + echo "## Flow safety-path coverage (reported, not gating)" + echo + echo '```' + coverage report --include="$SAFETY_PATH" --skip-covered --sort=cover | tail -40 + echo '```' + } >> "$GITHUB_STEP_SUMMARY" + coverage report --include="$SAFETY_PATH" --format=total + coverage json --include="$SAFETY_PATH" -o runs/safety-path-coverage.json + - name: Upload the report + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: flow-safety-path-coverage + path: packages/flow/runs/safety-path-coverage.json + retention-days: 30 flow-critical: name: flow core critical (golden VERIFIED, zero model calls) @@ -587,6 +663,25 @@ jobs: tests/e2e/test_browser_teach_write_guard_e2e.py \ tests/e2e/test_agent_guard_e2e.py \ --basetemp=runs/ci-critical-e2e --junitxml=runs/critical-e2e-junit.xml + - name: Golden runs (report, artifacts and actions unchanged) + # docs/design/DECOMPOSITION.md, section 3.1. The baselines are Linux + # results; OPENADAPT_GOLDEN_WRITE=1 regenerates them (upload below). + # One process: the scenarios share one MockMed server per module. + env: + OPENADAPT_GOLDEN_OUT: runs/golden + run: | + pytest -vv --durations=20 tests/golden_runs \ + --basetemp=runs/ci-goldens --junitxml=runs/goldens-junit.xml + - name: Upload golden-run results + if: always() + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: flow-golden-runs + path: | + packages/flow/runs/golden + packages/flow/tests/golden_runs/baselines + if-no-files-found: warn + retention-days: 14 - name: Read-back and zero-model-call tests, by name run: | pytest -n logical --dist loadfile -v --durations=20 \ @@ -604,7 +699,7 @@ jobs: import sys import xml.etree.ElementTree as ET bad = False - for name in ("critical-e2e", "critical"): + for name in ("critical-e2e", "goldens", "critical"): root = ET.parse(f"runs/{name}-junit.xml").getroot() suites = [root] if root.tag == "testsuite" else list(root.iter("testsuite")) tests = sum(int(s.get("tests", 0)) for s in suites) diff --git a/packages/flow/docs/design/DECOMPOSITION.md b/packages/flow/docs/design/DECOMPOSITION.md index b5e5f6d9ea..0f259f0f67 100644 --- a/packages/flow/docs/design/DECOMPOSITION.md +++ b/packages/flow/docs/design/DECOMPOSITION.md @@ -594,16 +594,16 @@ that: | File | Line budget | |---|---:| -| `packages/flow/openadapt_flow/runtime/replayer.py` | 18258 | -| `packages/flow/openadapt_flow/__main__.py` | 11970 | -| `packages/flow/openadapt_flow/qualification.py` | 5775 | -| `packages/flow/openadapt_flow/ir.py` | 5765 | -| `packages/desktop/openadapt_desktop/dispatch.py` | 5686 | -| `packages/capture/openadapt_capture/recorder.py` | 4532 | -| `packages/flow/openadapt_flow/interactive_recorder.py` | 4524 | -| `packages/flow/openadapt_flow/runtime/durable/attended.py` | 4271 | +| `packages/flow/openadapt_flow/runtime/replayer.py` | 19529 | +| `packages/flow/openadapt_flow/__main__.py` | 13235 | +| `packages/flow/openadapt_flow/qualification.py` | 5776 | +| `packages/flow/openadapt_flow/ir.py` | 6352 | +| `packages/desktop/openadapt_desktop/dispatch.py` | 6404 | +| `packages/capture/openadapt_capture/recorder.py` | 4823 | +| `packages/flow/openadapt_flow/interactive_recorder.py` | 4603 | +| `packages/flow/openadapt_flow/runtime/durable/attended.py` | 4301 | | `packages/flow/openadapt_flow/terminal_verification_v2.py` | 3663 | -| `packages/flow/openadapt_flow/backends/playwright_backend.py` | 3636 | +| `packages/flow/openadapt_flow/backends/playwright_backend.py` | 5282 | ## 7. Coordination with work in flight diff --git a/packages/flow/public-artifacts.json b/packages/flow/public-artifacts.json index 3eafe7cf54..69d15dd1f5 100644 --- a/packages/flow/public-artifacts.json +++ b/packages/flow/public-artifacts.json @@ -616,6 +616,38 @@ "schemas/sanitized-artifact-approval-v1.json", "schemas/sanitized-artifact-manifest-v1.json", "source-policy.public.json", - "tests/golden/tutorial_run.json" + "tests/golden/tutorial_run.json", + "tests/golden_runs/baselines/bundles/mockmed-triage/manifest.json", + "tests/golden_runs/baselines/bundles/mockmed-triage/param_proposals.json", + "tests/golden_runs/baselines/bundles/mockmed-triage/sections.json", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/layout_fingerprint.json", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_001_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_003_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010_expect.png", + "tests/golden_runs/baselines/bundles/mockmed-triage/workflow.json", + "tests/golden_runs/baselines/mockmed_data_growth.json", + "tests/golden_runs/baselines/mockmed_lookalike_row.json", + "tests/golden_runs/baselines/mockmed_missing_row.json", + "tests/golden_runs/baselines/mockmed_modal.json", + "tests/golden_runs/baselines/mockmed_pass.json", + "tests/golden_runs/baselines/mockmed_pass_structural.json", + "tests/golden_runs/baselines/mockmed_rename.json", + "tests/golden_runs/baselines/mockmed_sort.json", + "tests/golden_runs/baselines/mockmed_theme.json" ] } diff --git a/packages/flow/pyproject.toml b/packages/flow/pyproject.toml index c87a962220..87127dd501 100644 --- a/packages/flow/pyproject.toml +++ b/packages/flow/pyproject.toml @@ -522,7 +522,7 @@ line-length = 88 # Generated / non-package trees at the repo root are not part of the lint # surface. The benchmark harness (benchmark/harness/) is linted by naming it # explicitly in CI (`ruff check openadapt_flow benchmark/harness`). -extend-exclude = ["/benchmark", "/docs", "/runs", "/dist"] +extend-exclude = ["/benchmark", "/docs", "/runs", "/dist", "tests/golden_runs/baselines"] [tool.ruff.lint] # Start pragmatic: pyflakes (real bugs), the safe pycodestyle subset, warnings, diff --git a/packages/flow/tests/fixtures/import_surface.json b/packages/flow/tests/fixtures/import_surface.json new file mode 100644 index 0000000000..825a81dfc9 --- /dev/null +++ b/packages/flow/tests/fixtures/import_surface.json @@ -0,0 +1,771 @@ +{ + "openadapt_flow.runtime.replayer": [ + "EgressNotPermitted", + "FIELD_REGION_PAD", + "FIELD_REGION_SIZE", + "MASKED_MIN_CONFIDENCE", + "MASKED_NEW_TEXT_SLACK", + "MASKED_REPEAT_FRACTION", + "PC_STRUCTURAL_TEMPLATE_THRESHOLD", + "PC_TEMPLATE_SEARCH_PAD", + "PC_TEMPLATE_THRESHOLD", + "PIXEL_CENSUS_OCR_MAX_SIMILARITY", + "PIXEL_CENSUS_OCR_MIN_CONFIDENCE", + "PROGRAM_MAX_DEPTH", + "PROGRAM_MAX_STEPS", + "READBACK_DEADLINE_MARGIN_S", + "Replayer", + "Resolution", + "SCROLL_BUDGET_FACTOR", + "SCROLL_POSITION_SLACK_FRACTION", + "SECRET_ENV_PREFIX", + "StepResult", + "_DIALOG_WAIT_S", + "_DIRECT_TARGET_RUNGS", + "_DURABLE_RESUME_AUTHORITY", + "_DeliveryResultT", + "_FIELD_CHECK_LIMIT", + "_FIELD_VALUE_LIMIT", + "_FORM_GUARD_SETTLE_S", + "_GraphStepContext", + "_MAX_FRESH_ACTUATION_REACQUISITIONS", + "_MAX_SERVER_RESPONSES", + "_NotActionableError", + "_PAGE_SCALE_AXIS_AGREEMENT", + "_PAGE_SCALE_BAND", + "_PAGE_SCALE_BOUNDS", + "_PAGE_SCALE_MIN_COORD", + "_PIXEL_RECHECK_LEVEL", + "_PIXEL_RECHECK_MIN_PIXELS", + "_PIXEL_RECHECK_REOBSERVES", + "_ProgramHalt", + "_REMOTE_HOVER_JITTER_PX", + "_ROW_DATE_PATTERNS", + "_SCROLL_HANDOFF_ACTIONS", + "_WebFormApprovalView", + "_all_workflow_steps", + "_effect_read_wording", + "_field_text", + "_frame_viewport", + "_identity_tokens", + "_loop_iterations_from_checkpoints", + "_pipeline_safe_verifier", + "_record_loop_iteration", + "_row_dates", + "_scroll_target_positioned", + "_uniform_page_scale", + "_within_hover_jitter", + "better_identity_read", + "effect_endpoint_scope", + "effect_field_checks", + "identity_read_contradicts", + "secret_env_var" + ], + "openadapt_flow.runtime.replayer:Replayer": [ + "__init__", + "_accept_healed_anchor_in_workflow_snapshot", + "_account_result", + "_act", + "_act_answering_dialog", + "_act_closing_surface", + "_act_read", + "_act_scroll", + "_act_without_dialog", + "_activate_surface_backend", + "_active_program_frame_refusal", + "_active_surface_binding", + "_active_surface_is_external_remote", + "_actuator_for", + "_admit_durable_resume", + "_all_default_readback", + "_api_identity_refusal", + "_api_request_pointer_field_path", + "_api_request_pointer_value", + "_apply_candidate_census", + "_apply_effect_fault_mutation", + "_apply_pipelined_verdict", + "_apply_screen_fault_mutation", + "_apply_step_gates", + "_approval_form_state", + "_approval_gate_refusal", + "_approval_gated", + "_approval_step_refusal", + "_arm_dialog", + "_asset_bytes", + "_attended_transition_observation", + "_auto_readback_verifier", + "_band_check", + "_begin_approval_item", + "_begin_control_overlay", + "_begin_surfaces", + "_bind_checkpoint_surface", + "_bind_qualification_boundary", + "_bind_surface_qualification_environment", + "_build_graph_ctx", + "_cancel_guarded_coordinate", + "_cancel_guarded_keyboard", + "_candidate_binding_refusal", + "_canonical_interstitial_snapshot", + "_canonical_resume_value", + "_capture_effect_pre_state", + "_captured_context_observations", + "_changed_regions", + "_check_postconditions", + "_check_regions", + "_collect_server_responses", + "_compare_direct_signal_text", + "_compare_qualified_signal_text", + "_consume_durable_resume_admission", + "_control_overlay_browser_target", + "_control_overlay_progress", + "_copy_look_allowed", + "_copy_look_possible", + "_copy_pipelined_evidence", + "_defer_readback", + "_deliver_backend_call", + "_delivery_authorization_refusal", + "_describe_postcondition", + "_describe_predicate", + "_dom_text_visible", + "_drift_oracle_rescue", + "_durable_auxiliary_digest", + "_durable_resume_payload", + "_durable_terminal_state", + "_effect_binding_for", + "_effect_pre_state_for", + "_embedded_identity_params", + "_emit_control_overlay_phase", + "_emit_control_overlay_terminal", + "_emit_halt", + "_end_surfaces", + "_entry_identity_gate_error", + "_evidence_for_completed_effects", + "_exact_text_holds", + "_exec_action_state", + "_exec_business_decision_state", + "_exec_loop_state", + "_exec_state", + "_expected_state_text", + "_field_region", + "_field_value_shown", + "_finalize_report", + "_focus_on_held", + "_frame_to_model", + "_fresh_actuation_authorization_refusal", + "_fresh_actuation_event", + "_fresh_actuation_identity_regions", + "_governed_authorization_snapshot_refusal", + "_governed_web_form_refusal", + "_guarded_click_pointer_revalidation", + "_guarded_keyboard_revalidation", + "_guarded_type_pointer_revalidation", + "_halt_on_late_form_submit", + "_handle_interstitials", + "_heal_step", + "_hover_check", + "_identifier_crops", + "_identifier_displacement", + "_identity_band_still_changing", + "_identity_gate_error", + "_implicit_scroll_target_ready", + "_initial_external_network_calls", + "_install_execution_snapshots", + "_interpret_program", + "_interstitial_declaration_mutation", + "_is_qualification_fault_step", + "_join_pipelined_readback", + "_keep_undo_prior_state", + "_layout_drift_error", + "_layout_drift_on", + "_leads_into_consequential", + "_live_session_profile", + "_load_layout_fingerprints", + "_local_atomic_capability_error", + "_local_edit_held", + "_look_again", + "_lookalike_param_looks", + "_lookalike_param_read", + "_lookup_capability_refusal", + "_malformed_date_params", + "_managed_dispatch_refusal", + "_mapped_selection_readback_region", + "_mark_idempotency_projection_failure", + "_may_pipeline_readback", + "_maybe_scale_render", + "_new_step_evidence_key", + "_next_anchored_step", + "_next_program_decision_index", + "_no_duplicate_candidate", + "_note_page_scale", + "_observe_qualification_environment", + "_observe_screen_texts", + "_ocr_census", + "_ocr_identity_crop", + "_ocr_squashed", + "_on_state_failure", + "_params_with_business_decisions", + "_pixel_census", + "_pixel_recheck", + "_poll_postconditions", + "_postcondition_confirms_a_write", + "_postcondition_passes", + "_postcondition_template", + "_predicate_holds", + "_prepare_remote_scroll_input", + "_prev_was_click", + "_production_qualification_refusal", + "_profile_effect_tier_refusal", + "_profile_runtime_refusal", + "_program_checkpoint_history", + "_program_execution_scope", + "_program_guard_uses_frame", + "_program_scope_from_frames", + "_project_idempotency_outcome_after_persist", + "_qualification_campaign_refusal", + "_qualification_fault_context", + "_qualification_fault_driver_refusal", + "_qualification_fault_gate_for_kind", + "_qualification_id_sha256", + "_qualified_signal_evidence", + "_raise_on_governed_asset_mutation", + "_raise_on_workflow_snapshot_mutation", + "_read_gate_refusal", + "_readable_chars", + "_record_idempotency_outcome", + "_record_identity_coverage", + "_record_linear_result", + "_record_program_checkpoint", + "_record_program_pause", + "_regions_intersect", + "_require_current_fault_driver_binding", + "_require_qualification_environment_current", + "_required_effect_pre_state_unreadable", + "_requires_atomic_identity_keyboard", + "_requires_atomic_identity_pointer", + "_reset_render_scale", + "_resettle_after_interstitial", + "_resolve_drag_end", + "_resolve_effects", + "_resolve_graph", + "_resolve_step", + "_resolve_step_target", + "_resolve_worklist", + "_result_local_model_calls", + "_result_model_calls", + "_resume_descend", + "_resume_inside_web_form_span", + "_resume_program_state", + "_resumed_program_results", + "_retain_pixel_identity_evidence", + "_retain_program_transition_evidence", + "_retain_visual_resolution_evidence", + "_retarget_by_record_key", + "_revalidate_consequential_actuation", + "_revalidate_retained_postconditions", + "_revalidation_frame_capture", + "_run_states_from", + "_run_step", + "_run_step_on_active_surface", + "_run_step_timed", + "_run_switch_surface_step", + "_run_unsealed", + "_run_unsealed_steps", + "_run_web_form_span", + "_save_step_png", + "_scaled_region_match", + "_scroll_successors", + "_sealed_run_unsupported", + "_sealed_step", + "_select_transition", + "_selection_contract_error", + "_selection_region_compatible", + "_selection_target_continuous", + "_server_response_mark", + "_session_profile_changed", + "_set_api_unavailable_refusal", + "_settle_durable_readback", + "_settle_pipelined_readback", + "_settle_seeded", + "_skip_completed_effect_state", + "_stamp_approval", + "_stamp_execution_outcome", + "_step_has_identity_contract", + "_step_is_consequential", + "_step_needs_consequential_revalidation", + "_step_requires_remote_guarded_actuation", + "_step_requires_remote_identity_binding", + "_structural_changed", + "_structural_state", + "_structured_census", + "_surface_identity_check", + "_surface_refusal_result", + "_sync_durable_audit", + "_template_mentions_param", + "_text_value_at", + "_translate_recorded_region", + "_try_api_tier", + "_typed_input_landed", + "_typed_remote_receipt_required", + "_unarmed_row_pick_error", + "_unbound_submit_refusal", + "_url_path_targets_param", + "_validate_fault_mutation", + "_verify_current_effect", + "_verify_dedicated_identity_signal", + "_verify_effects", + "_verify_form_identity", + "_verify_identity", + "_verify_identity_ocr", + "_verify_selected_option", + "_verify_signal_quorum", + "_verify_typed_input", + "_verify_uncertain_api_delivery", + "_wait_for_dialog", + "_wait_for_scroll_transition_and_settle", + "_wait_starting_state_settled", + "_walk_graph", + "_web_form_approval_view", + "_web_form_span_at", + "_web_form_surface_refusal", + "_workflow_snapshot_refusal", + "recheck_deferred_readback", + "revalidate_attended_completion", + "revalidate_attended_program_completion", + "revalidate_linear_checkpoint_state", + "revalidate_program_checkpoint", + "revalidate_program_checkpoint_effects", + "revalidate_program_checkpoint_state", + "revalidate_retained_effects", + "run", + "select_attended_program_transition" + ], + "openadapt_flow.__main__": [ + "MANAGED_SAFETY_FIELDS", + "QUALIFY_DEFINITION", + "QUALIFY_HELP", + "_PREWARM_SKIP_FLAGS", + "_PUSH_JSON_SCHEMA", + "_PUSH_RUNTIME_ATTESTATION_SCHEMAS", + "_RECORD_TARGET_FLAGS", + "_SAFE_BUNDLE_LOAD_GUIDANCE", + "_SEALED_READY_COMMANDS", + "_VIEWPORT", + "_add_approval_flags", + "_add_approver_key_flags", + "_add_attest_flags", + "_add_backend_flags", + "_add_browser_session_flags", + "_add_deployment_flags", + "_add_surface_flags", + "_admitted_approval_mode", + "_answer_durable_item_pause", + "_approval_gate_for_run", + "_approval_wait_seconds", + "_approver_pin", + "_approver_settings", + "_approver_signer", + "_args_approver_root", + "_args_key_dir", + "_attach_cloud_seal", + "_attached_entry_url", + "_attached_web_page", + "_attended_service_from_args", + "_bind_approval_mode", + "_bind_sealed_run", + "_build_and_run_replayer", + "_build_surface_backends", + "_carry_item_approval_to_pause", + "_change_ledger_epilogue", + "_checkout_harness_on_path", + "_claim_qualification_case_attempt", + "_clear_progress_line", + "_cmd_approve", + "_cmd_approve_sanitized", + "_cmd_approver_grant", + "_cmd_attach_seal", + "_cmd_bench", + "_cmd_benchmark", + "_cmd_bind_record_checks", + "_cmd_business_decisions_serve", + "_cmd_certify", + "_cmd_compile", + "_cmd_compose", + "_cmd_connect", + "_cmd_connector", + "_cmd_console", + "_cmd_demo", + "_cmd_demo_record", + "_cmd_disambiguate", + "_cmd_emit_mcp", + "_cmd_emit_skill", + "_cmd_explain", + "_cmd_for_each", + "_cmd_induce", + "_cmd_item_approval", + "_cmd_lint", + "_cmd_login", + "_cmd_materialize_approved", + "_cmd_narration_attach", + "_cmd_narration_show", + "_cmd_process", + "_cmd_propose_qualification", + "_cmd_push", + "_cmd_qualify", + "_cmd_qualify_campaign", + "_cmd_qualify_drills", + "_cmd_qualify_proposal", + "_cmd_qualify_run_case", + "_cmd_record", + "_cmd_record_capture", + "_cmd_record_desktop", + "_cmd_repair", + "_cmd_replay", + "_cmd_report_break", + "_cmd_report_run", + "_cmd_resume", + "_cmd_resume_roll_back", + "_cmd_review_sanitized", + "_cmd_route", + "_cmd_run", + "_cmd_sanitize", + "_cmd_scaffold_verifier", + "_cmd_seal", + "_cmd_serve_execute", + "_cmd_serve_reward", + "_cmd_silent_saves", + "_cmd_teach", + "_cmd_teach_authorization", + "_cmd_teach_branch", + "_cmd_tutorial", + "_cmd_validate_hosted", + "_cmd_variants", + "_cmd_verify_run", + "_cmd_visualize", + "_cmd_visualize_process", + "_configured_replayer", + "_connector_flags", + "_decision_supervisor_from_args", + "_default_run_dir", + "_definition_first", + "_demo_progress", + "_deployment_approvers", + "_deployment_runtime", + "_deployment_sections", + "_emit_local_receipt", + "_enforce_surface_binding", + "_finish_replay", + "_induce_narration_args", + "_induce_with_probes", + "_is_runtime_attestation_schema", + "_is_sha256", + "_is_uuid", + "_load_deployment_approvers", + "_load_worklist_file", + "_maybe_attest_pre_state", + "_maybe_attest_run", + "_maybe_report_break", + "_maybe_report_run", + "_merge_record_window_selector", + "_package_version", + "_parse_head", + "_parse_identifier_region_arg", + "_parse_params", + "_parse_qualification_signal", + "_paused_for_a_person", + "_pinned_lineage", + "_prepare_approval_store", + "_print_break_it_narrative", + "_print_lint_epilogue", + "_print_push_json", + "_propose_lookup_check", + "_push_json_base", + "_push_json_failure", + "_push_json_invalid_response", + "_push_json_result", + "_qualification_drill_driver", + "_qualification_policy", + "_qualification_report", + "_qualification_workflow", + "_qualify_default_form", + "_read_qualification_case_inputs", + "_record_approver_pin", + "_record_flag_is_set", + "_record_until_stop", + "_recorded_surface", + "_recording_encryption_key", + "_recording_privacy_notices", + "_refuse_missing_citrix_readiness", + "_refuse_rollback_unwired", + "_refuse_shared_readback_session", + "_refuse_unverified_managed_qualification_admission", + "_reject_unbound_record_target_flags", + "_replay_desktop", + "_replay_outcome_epilogue", + "_replay_params", + "_replay_worklist_pool", + "_report_backend_kind", + "_require_undo_or_person", + "_required_sha256", + "_resolve_backend_config", + "_resolve_record_capture_window", + "_resolve_run_approval_mode", + "_resolve_surface_bindings", + "_resolve_worklists", + "_resume_approval_gate", + "_resume_approval_mode", + "_retain_drill_evidence", + "_roll_back_sealed", + "_rollback_seal", + "_run_is_config_pinned", + "_sealed_input_refusal", + "_sealed_paths_in", + "_stamp_recording_surface", + "_surface_selection_gate", + "_surface_target_origin_or_none", + "_undo_run_target_problem", + "_verify_run_sources", + "_was_rolled_back", + "_with_drift", + "build_parser", + "main", + "managed_authorization_mismatch" + ], + "openadapt_flow.qualification": [ + "ActionRiskClass", + "ActionRiskClassification", + "EffectVerificationPolicy", + "EnvironmentBoundary", + "EvidenceRef", + "IdentityEnforcement", + "IdentityEvidenceSource", + "IdentityMatchMode", + "IdentityNormalizer", + "IdentityPolicy", + "IdentitySignalKey", + "IdentitySignalPolicy", + "QUALIFICATION_SCHEMA", + "QualificationActionTarget", + "QualificationCase", + "QualificationCaseKind", + "QualificationCaseResult", + "QualificationCertification", + "QualificationError", + "QualificationOutcome", + "QualificationProject", + "QualificationRefusal", + "QualificationRefusalCode", + "QualificationReport", + "QualifiedEntityLabel", + "REMOTE_SAFE_ENTITY_LABELS", + "RequalificationCondition", + "VerificationTier", + "_CONTEXT_ID_RE", + "_HashBoundEvidenceRef", + "_ID_RE", + "_PARAM_RE", + "_QUALIFICATION_CASE_CONTRACT_DOMAIN", + "_QUALIFIED_ENTITY_LABEL_RE", + "_attestation_payload", + "_authorization_parameter_contract", + "_case_evidence_contract_sha256", + "_case_result_integrity_error", + "_case_run_report_integrity_error", + "_declared_effects", + "_default_fault_cases", + "_effect_risk_floor", + "_executable_risk_floor", + "_fault_case_integrity_error", + "_inferred_action_classification", + "_invalidate_certification", + "_judgment_decision_contracts", + "_judgment_evidence_errors", + "_latest_result", + "_now", + "_one_evidence", + "_qualification_actuation_path", + "_qualification_identifier_sha256", + "_read_evidence_bytes", + "_sealed_evidence_bytes", + "_steps_by_id", + "_surface_environment_evidence_refusal", + "_touch", + "_valid_application_identity", + "add_case", + "add_requalification_condition", + "api_folded_step_ids", + "available_identity_sources", + "build_governed_authorization_template", + "certify_project", + "current_certification_matches", + "entity_label_options", + "evaluate_judgment_case_qualification", + "evaluate_qualification", + "identity_policy_independence_errors", + "identity_signal_runtime_available", + "init_project", + "list_entity_labels", + "project_schema", + "qualification_action_requirements", + "qualification_campaign_id_sha256", + "qualification_case_contract_sha256", + "qualification_run_id_sha256", + "record_case_results", + "remote_entity_label", + "remove_entity_label", + "run_cases", + "save_qualified_workflow", + "set_action_classification", + "set_business_decision", + "set_business_decision_deliveries", + "set_case_scope", + "set_effect_policy", + "set_entity_label", + "set_identity_policy", + "set_judgment_cases", + "set_minimum_effect_tier", + "set_qualified_lookup", + "set_trusted_fault_driver_key", + "set_trusted_runner_key", + "sign_case_result", + "workflow_contract_sha256" + ], + "openadapt_flow.ir": [ + "ActionDeliveryReceipt", + "ActionDeliveryUncertainty", + "ActionKind", + "Anchor", + "ApiAdmission", + "ApiBinding", + "ApiIdentityBinding", + "AttendedProgramTransitionEvidence", + "BackendHints", + "BundleManifest", + "BundleProvenance", + "BusinessDecisionEvidence", + "BusinessDecisionEvidenceRequirement", + "BusinessDecisionOption", + "BusinessDecisionSpec", + "ChangeLedgerEffect", + "ChangeLedgerEntry", + "CheckToClickRecheck", + "ConcatTemplate", + "DialogResponse", + "Effect", + "EffectFieldCheck", + "EffectJournalEntry", + "EffectVerificationEvidence", + "ExecutionMode", + "ExecutionOutcomeEnvelope", + "ExecutionTargetKind", + "FormIdentity", + "FreshActuationEvent", + "GovernedAuthorizationParameter", + "GovernedAuthorizationTemplate", + "Guard", + "GuardSource", + "HaltCleanup", + "HaltCleanupQualification", + "HaltObservation", + "HealEvent", + "HoverEvidence", + "HoverLook", + "IdentityCheck", + "IdentityLook", + "IdentitySignalEvidence", + "IdentitySignalKeyValue", + "IdentityTemplate", + "Interstitial", + "InterstitialActionResult", + "KnownIdEvidence", + "Landmark", + "LoopIterationBinding", + "LoopSpec", + "MANAGED_RESULT_LOSS_DOMAIN", + "MANAGED_RESULT_LOSS_IDEMPOTENCY_DOMAIN", + "MAX_PAGES_OPENED_PER_STEP", + "ManagedResultLossEvidence", + "ObservedSurfaceEnvironment", + "OutcomeContractCounts", + "OutcomeEvidenceClass", + "PRIMARY_SURFACE_ID", + "ParamKind", + "ParamSpec", + "PixelIdentityEvidence", + "Point", + "Postcondition", + "PostconditionContractEvidence", + "PostconditionEvidenceKind", + "PostconditionKind", + "Predicate", + "PredicateKind", + "ProgramExceptionEvidence", + "ProgramExecutionScopeFrame", + "ProgramGraph", + "ProgramGuardAssetEvidence", + "ProgramTransitionEvidence", + "QualifiedEffectRequirement", + "ReadStepSpec", + "ReadbackLadder", + "ReadbackSave", + "Region", + "RegistryOrigin", + "Relation", + "ReportRedaction", + "Resolution", + "RollbackRecord", + "RollbackStepRecord", + "RunReport", + "Rung", + "SCHEMA_VERSION", + "SUBMIT_BINDING_PATH_PATTERN", + "SUBMIT_BINDING_TOKEN_PATTERN", + "SURFACE_ID_PATTERN", + "SafetyRefusalEvidence", + "SelfRepairEvidence", + "SelfRepairStepRecord", + "ServerResponseEvidence", + "StandardChangeEvidence", + "State", + "StateKind", + "Step", + "StepResult", + "StructuralHandle", + "StructuralLocator", + "SubmitBinding", + "SurfaceObservation", + "SurfaceSpec", + "TEMPLATE_AAD", + "TokenTemplate", + "Transition", + "UNDO_ID_PATTERN", + "UNDO_PARAM_PATTERN", + "UnarmedStep", + "UndoLocate", + "UndoProposal", + "UndoRestore", + "UndoStep", + "VariantRouteStamp", + "VisualResolutionEvidence", + "WebFormField", + "WebFormPrecheck", + "WebFormSpec", + "WebFormWrite", + "Workflow", + "_CheckLevelName", + "_compiled_full_match", + "_decrypt_template_assets", + "_iter_plaintext_templates", + "_seal_template_assets", + "_verify_sealed_template_integrity", + "business_decision_transition_guard", + "business_decision_transitions", + "focus_identity_is_specific", + "lift_to_program", + "managed_result_loss_idempotency_sha256", + "postcondition_contract_sha256", + "postcondition_step_contract_sha256", + "predicate_contract_sha256", + "structural_locator_is_locatable", + "surface_contract_errors" + ] +} diff --git a/packages/flow/tests/golden_runs/__init__.py b/packages/flow/tests/golden_runs/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/manifest.json b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/manifest.json new file mode 100644 index 0000000000..18b6819876 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/manifest.json @@ -0,0 +1,40 @@ +{ + "schema_version": 2, + "content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "file_hashes": { + "templates/layout_fingerprint.json": "470ed40ea4b12499ce0e7f6a9e8bd4db8cbb716a44889cb3f8c06f058afd10b4", + "templates/step_000.png": "b355da2f01f2311032460231a15b025d5ebad7dd49cee26b422bc1b08a8c2022", + "templates/step_000_expect.png": "29e54a82c2f7df3554d2487d9bad748fc0abd86191416d39343c1eb866c486d1", + "templates/step_001_expect.png": "e2e203b8bbc4bf0a31aebd56a1303077243a3ff602708bbe9eae46d45460ebdf", + "templates/step_002.png": "b355da2f01f2311032460231a15b025d5ebad7dd49cee26b422bc1b08a8c2022", + "templates/step_002_expect.png": "68a0aa31d3b7fba1139c05d729f49252174481dfca5a8693cb5b6440f8976fe6", + "templates/step_003_expect.png": "3068277f51d8dfbfd1ba50b31afee93e76dcacb67b11d4610b6dcdf681597eed", + "templates/step_004.png": "d0082e004cf2a2c03668ca1c6630001eda69bdcf169d05d58839dcbddbc56773", + "templates/step_004_expect.png": "230b56796f24b36637d77ba395e6031bf39cbfab898da61c1c41f23f1b57e396", + "templates/step_005.png": "e38e9760b48c63a08e6618b2624c6796620ce58b5f7d7a2ff63f678aa25bb3e2", + "templates/step_005_expect.png": "76696ff4ec85753e45b5378638fa7c19f4f7fddb1cf35ee99cf6baee11844803", + "templates/step_006.png": "97568daf732ecb6109d858dd09cdcf78b031830c819b6f4b6a50ae60a72ada10", + "templates/step_006_expect.png": "d0e310e05830227867e94a9b288e6265fa28c375558d58555e79bfb002095134", + "templates/step_007.png": "7f6817a19ffe49b31a05a70a23f3fcdb2a71b93b3f4ec6a7b997126b4e0ff16c", + "templates/step_007_expect.png": "ac9ee10ba2354bca0db66fbf3bf93ca80b62a650d3f19e8b71dcc6038a4d057f", + "templates/step_008.png": "b6b06e1ed6155ed74899d0a42bf23df672bf930bfb6f830ab69e6d89ca6fedd3", + "templates/step_008_expect.png": "d1f13cae697465c2ec07310adc38d7780f7d7c0146257679b7c559716b992a31", + "templates/step_010.png": "31193461982dc5b438be9e459f1ce17f2b5dca4109c206428c7d8135bf60643a", + "templates/step_010_expect.png": "5fcb6891641b02953b9baeaa75581a3a9fa1db6c7bd39d432f1d4d06d04c8856" + }, + "provenance": { + "compiler_version": "2.5.0", + "source_recording_sha256": null, + "compiler_config_sha256": "43f5f0d9a4d87c9637138dc24dcf8a163094ab400b760cee8c2567a0760be695", + "created_at": "2026-11-03T20:44:16.736176+00:00", + "policy_name": null, + "certified": false, + "certification_status": null, + "certified_at": null, + "expires_at": null, + "certification_invalidated_at": null, + "certification_invalidation_reason": null, + "governed_authorization_template": null + }, + "encrypted": false +} \ No newline at end of file diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/param_proposals.json b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/param_proposals.json new file mode 100644 index 0000000000..7f3956125d --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/param_proposals.json @@ -0,0 +1,19 @@ +{ + "note": "Flagged field-label parameter proposals -- NOT applied. Run the confirm pass (openadapt-flow compile, interactive or --accept-params/--params-from) to turn a proposal into a parameter; unconfirmed proposals remain demonstrated constants.", + "proposals": [ + { + "step_id": "step_001", + "name": "username", + "field_label": "Username", + "masked_example": "nu******mo", + "secret": false + }, + { + "step_id": "step_003", + "name": "password", + "field_label": "Password", + "masked_example": null, + "secret": true + } + ] +} \ No newline at end of file diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/sections.json b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/sections.json new file mode 100644 index 0000000000..2afb8cf440 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/sections.json @@ -0,0 +1,148 @@ +{ + "schema": "openadapt.flow.sections/v1", + "note": "Display metadata: named groups of steps for program maps. Execution and the outcome classifier ignore this file, and it is outside the content digest and the workflow contract hash.", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "sections": [ + { + "id": "fields-step_000", + "title": "Sign in to MockMed", + "title_source": "ui", + "kind": "fields", + "steps": [ + "step_000", + "step_001", + "step_002", + "step_003" + ], + "fields": [ + "username", + "password" + ], + "params": [] + }, + { + "id": "fields-step_004", + "title": "Triage", + "title_source": "ui", + "kind": "fields", + "steps": [ + "step_004", + "step_005", + "step_006", + "step_007", + "step_008", + "step_009" + ], + "fields": [ + "note" + ], + "params": [ + "note" + ] + }, + { + "id": "save-step_010", + "title": "Save Encounter", + "title_source": "ui", + "kind": "save", + "steps": [ + "step_010" + ], + "fields": [], + "params": [] + } + ], + "compiled": [ + { + "id": "fields-step_000", + "title": "Sign in to MockMed", + "title_source": "ui", + "kind": "fields", + "steps": [ + "step_000", + "step_001", + "step_002", + "step_003" + ], + "fields": [ + "username", + "password" + ], + "params": [] + }, + { + "id": "fields-step_004", + "title": "Triage", + "title_source": "ui", + "kind": "fields", + "steps": [ + "step_004", + "step_005", + "step_006", + "step_007", + "step_008", + "step_009" + ], + "fields": [ + "note" + ], + "params": [ + "note" + ] + }, + { + "id": "save-step_010", + "title": "Save Encounter", + "title_source": "ui", + "kind": "save", + "steps": [ + "step_010" + ], + "fields": [], + "params": [] + } + ], + "edits": [], + "context": { + "step_000": { + "container": "Sign in to MockMed", + "kind": "heading", + "header": false + }, + "step_002": { + "container": "Sign in to MockMed", + "kind": "heading", + "header": false + }, + "step_004": { + "container": "Sign in to MockMed", + "kind": "heading", + "header": false + }, + "step_005": { + "container": "Referral Tasks", + "kind": "heading", + "header": false + }, + "step_006": { + "container": "Jane Sample \u2014 MRN P1 \u2014 DOB 1980-01-01", + "kind": "landmark", + "header": false + }, + "step_007": { + "container": "Jane Sample \u2014 MRN P1 \u2014 DOB 1980-01-01", + "kind": "landmark", + "header": false + }, + "step_008": { + "container": "Jane Sample \u2014 MRN P1 \u2014 DOB 1980-01-01", + "kind": "landmark", + "header": false + }, + "step_010": { + "container": "Jane Sample \u2014 MRN P1 \u2014 DOB 1980-01-01", + "kind": "landmark", + "header": false + } + } +} diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/layout_fingerprint.json b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/layout_fingerprint.json new file mode 100644 index 0000000000..115d1436cd --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/layout_fingerprint.json @@ -0,0 +1,590 @@ +{ + "scale_landmarks": { + "salt": "7a077291c53bda94f33ca2e3b315114f", + "steps": { + "step_000": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 234.5, + 26.5, + 201, + 21 + ], + [ + "766f9f299134262d", + 138.0, + 89.5, + 228, + 27 + ], + [ + "0debe35deb646066", + 85.5, + 166.0, + 79, + 22 + ], + [ + "ea11a4d3f6b77b05", + 85.0, + 234.5, + 74, + 17 + ], + [ + "1f0539785a15287d", + 120.0, + 324.0, + 58, + 24 + ] + ], + "step_002": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 234.5, + 26.5, + 201, + 21 + ], + [ + "766f9f299134262d", + 137.0, + 89.5, + 228, + 27 + ], + [ + "0debe35deb646066", + 85.5, + 166.5, + 79, + 23 + ], + [ + "a6e619aaf7d34da6", + 100.5, + 195.0, + 91, + 20 + ], + [ + "ea11a4d3f6b77b05", + 85.0, + 234.5, + 74, + 17 + ], + [ + "1f0539785a15287d", + 120.0, + 324.0, + 58, + 24 + ] + ], + "step_004": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 234.5, + 26.5, + 201, + 21 + ], + [ + "766f9f299134262d", + 137.5, + 89.5, + 229, + 27 + ], + [ + "0debe35deb646066", + 85.5, + 166.0, + 79, + 22 + ], + [ + "a6e619aaf7d34da6", + 100.5, + 195.0, + 91, + 20 + ], + [ + "ea11a4d3f6b77b05", + 85.0, + 235.0, + 76, + 20 + ], + [ + "1f0539785a15287d", + 120.0, + 324.0, + 58, + 24 + ] + ], + "step_005": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 100, + 24 + ], + [ + "143aea793ca1b724", + 235.0, + 26.5, + 202, + 21 + ], + [ + "dcf957e2da669f41", + 106.5, + 89.0, + 167, + 26 + ], + [ + "219b945008e4da3c", + 63.0, + 139.5, + 58, + 21 + ], + [ + "818472b7c93e41d1", + 304.0, + 139.0, + 60, + 20 + ], + [ + "9961aaa734026652", + 608.0, + 139.0, + 60, + 24 + ], + [ + "430666fe7b7b5e7f", + 754.5, + 138.5, + 55, + 23 + ], + [ + "662a68b0dfc4d2b9", + 81.0, + 188.0, + 94, + 20 + ], + [ + "57d14927f9c936f3", + 336.0, + 188.0, + 126, + 22 + ], + [ + "60060442afa7a3b0", + 598.5, + 188.0, + 39, + 22 + ], + [ + "845b8fbcc3d74cf5", + 83.5, + 244.5, + 99, + 23 + ], + [ + "46cdf82f793f8573", + 345.0, + 244.5, + 142, + 25 + ], + [ + "9838587cc68f76e7", + 609.0, + 243.5, + 62, + 23 + ], + [ + "687f07df62a4b1a8", + 88.5, + 302.0, + 107, + 20 + ], + [ + "72a6468ccdab4bf6", + 346.5, + 302.0, + 143, + 20 + ] + ], + "step_006": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 235.0, + 27.5, + 198, + 17 + ], + [ + "1b820ccec646f5a6", + 209.5, + 98.0, + 347, + 20 + ], + [ + "a07aad8ad74ae005", + 114.5, + 159.0, + 111, + 20 + ], + [ + "71ea41e971617fc3", + 80.0, + 211.0, + 112, + 20 + ], + [ + "971e299bc5449bb7", + 90.0, + 241.5, + 138, + 23 + ] + ], + "step_007": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 234.5, + 26.5, + 197, + 17 + ], + [ + "1b820ccec646f5a6", + 209.5, + 98.0, + 347, + 20 + ], + [ + "a07aad8ad74ae005", + 112.0, + 143.0, + 180, + 26 + ], + [ + "60d63bbb7871c33e", + 80.5, + 182.5, + 119, + 23 + ], + [ + "f7383fe8264ee3bb", + 85.5, + 214.0, + 53, + 24 + ], + [ + "937358dac479ba79", + 206.5, + 213.5, + 61, + 21 + ], + [ + "b2f246f8abe221b6", + 41.0, + 270.0, + 40, + 18 + ], + [ + "06e49998dce63eef", + 134.0, + 456.5, + 118, + 23 + ] + ], + "step_008": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 235.0, + 26.5, + 198, + 17 + ], + [ + "1b820ccec646f5a6", + 209.5, + 98.0, + 347, + 20 + ], + [ + "a07aad8ad74ae005", + 111.0, + 142.0, + 178, + 26 + ], + [ + "60d63bbb7871c33e", + 80.5, + 183.0, + 119, + 22 + ], + [ + "f7383fe8264ee3bb", + 85.5, + 214.0, + 53, + 24 + ], + [ + "937358dac479ba79", + 206.5, + 213.5, + 61, + 21 + ], + [ + "b2f246f8abe221b6", + 41.0, + 270.0, + 40, + 18 + ], + [ + "06e49998dce63eef", + 134.0, + 456.5, + 118, + 23 + ] + ], + "step_010": [ + [ + "e3d983e7fc5836f8", + 71.0, + 25.0, + 98, + 24 + ], + [ + "143aea793ca1b724", + 234.5, + 26.5, + 197, + 17 + ], + [ + "1b820ccec646f5a6", + 209.5, + 98.0, + 347, + 20 + ], + [ + "a07aad8ad74ae005", + 111.0, + 143.0, + 178, + 26 + ], + [ + "60d63bbb7871c33e", + 80.5, + 183.0, + 119, + 22 + ], + [ + "f7383fe8264ee3bb", + 85.5, + 214.0, + 53, + 24 + ], + [ + "937358dac479ba79", + 206.5, + 213.5, + 61, + 21 + ], + [ + "b2f246f8abe221b6", + 40.5, + 269.5, + 41, + 21 + ], + [ + "06e49998dce63eef", + 134.0, + 456.5, + 118, + 23 + ] + ] + } + }, + "schema": "openadapt.layout-fingerprints/v1", + "steps": { + "step_000": { + "char_width": 9.770833333333332, + "landmarks": {}, + "lines": 6, + "profile_sha256": null, + "text_height": 23.0, + "viewport": [ + 1280, + 800 + ] + }, + "step_002": { + "char_width": 9.666666666666666, + "landmarks": {}, + "lines": 7, + "profile_sha256": null, + "text_height": 23, + "viewport": [ + 1280, + 800 + ] + }, + "step_004": { + "char_width": 9.666666666666666, + "landmarks": {}, + "lines": 7, + "profile_sha256": null, + "text_height": 22, + "viewport": [ + 1280, + 800 + ] + }, + "step_005": { + "char_width": 9.727272727272727, + "landmarks": {}, + "lines": 19, + "profile_sha256": null, + "text_height": 22, + "viewport": [ + 1280, + 800 + ] + }, + "step_006": { + "char_width": 10.225, + "landmarks": {}, + "lines": 6, + "profile_sha256": null, + "text_height": 20.0, + "viewport": [ + 1280, + 800 + ] + }, + "step_007": { + "char_width": 9.153846153846153, + "landmarks": {}, + "lines": 9, + "profile_sha256": null, + "text_height": 23, + "viewport": [ + 1280, + 800 + ] + }, + "step_008": { + "char_width": 9.153846153846153, + "landmarks": {}, + "lines": 9, + "profile_sha256": null, + "text_height": 22, + "viewport": [ + 1280, + 800 + ] + }, + "step_010": { + "char_width": 9.115384615384615, + "landmarks": {}, + "lines": 10, + "profile_sha256": null, + "text_height": 21.5, + "viewport": [ + 1280, + 800 + ] + } + } +} diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000.png new file mode 100644 index 0000000000..fb7b324bfd Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000_expect.png new file mode 100644 index 0000000000..37f0bfd628 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_000_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_001_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_001_expect.png new file mode 100644 index 0000000000..9da8839dbf Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_001_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002.png new file mode 100644 index 0000000000..fb7b324bfd Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002_expect.png new file mode 100644 index 0000000000..da0b19b683 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_002_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_003_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_003_expect.png new file mode 100644 index 0000000000..8acfaf171c Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_003_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004.png new file mode 100644 index 0000000000..5e643718b7 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004_expect.png new file mode 100644 index 0000000000..3dbc95fcab Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_004_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005.png new file mode 100644 index 0000000000..28e8ce90b6 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005_expect.png new file mode 100644 index 0000000000..179ca92c9c Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_005_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006.png new file mode 100644 index 0000000000..6dc20e56a6 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006_expect.png new file mode 100644 index 0000000000..12a3279b40 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_006_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007.png new file mode 100644 index 0000000000..fc08d3799d Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007_expect.png new file mode 100644 index 0000000000..d3d7c922ea Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_007_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008.png new file mode 100644 index 0000000000..e6e264aeea Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008_expect.png new file mode 100644 index 0000000000..260aa58b78 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_008_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010.png new file mode 100644 index 0000000000..b59b1c6491 Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010_expect.png b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010_expect.png new file mode 100644 index 0000000000..6d75e4363c Binary files /dev/null and b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/templates/step_010_expect.png differ diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.json b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.json new file mode 100644 index 0000000000..12c1f05d56 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.json @@ -0,0 +1,1408 @@ +{ + "schema_version": 2, + "name": "golden-triage", + "recording_id": "638e9b610dcf480db27a9a18ed716dd2", + "contains_phi": false, + "phi_scrubbed": false, + "encrypted": false, + "created_at": "2026-11-03T20:44:16.734881+00:00", + "viewport": [ + 1280, + 800 + ], + "params": { + "note": "Golden triage booking three months" + }, + "param_specs": { + "note": { + "name": "note", + "type": "string", + "example": "Golden triage booking three months", + "required": true, + "choices": [] + } + }, + "secret_params": [], + "steps": [ + { + "id": "step_000", + "intent": "click recorded visual target", + "action": "click", + "anchor": { + "template": "templates/step_000.png", + "structural": { + "selector": "#username", + "frame_path": null, + "role": "textbox", + "name": "Username", + "automation_id": null, + "window_name": null + }, + "region": [ + 134, + 163, + 160, + 64 + ], + "click_point": [ + 214, + 195 + ], + "ocr_text": null, + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 0, + "tokens": [], + "concats": [], + "structured": "9eec048367ca69ba", + "signal_hashes": { + "structured|exact|": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": false + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "above", + "ocr_text": "Sign in to MockMed", + "distance_px": 130, + "dx_px": 76, + "dy_px": 106 + }, + { + "relation": "left_of", + "ocr_text": "Username", + "distance_px": 132, + "dx_px": 129, + "dy_px": 29 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 17, + 145, + 394, + 126 + ], + "phash": "e060e8e01f0f2f9f", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_000_expect.png" + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_001", + "intent": "type 'nurse.demo'", + "action": "type", + "anchor": null, + "text": "nurse.demo", + "param": null, + "secret": false, + "field_label": "Username", + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 27, + 156, + 147, + 76 + ], + "phash": "c3c969c2d23cbc36", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_001_expect.png" + }, + { + "kind": "text_present", + "text": "nurse.demo", + "region": null, + "phash": null, + "phash_tolerance": 8, + "timeout_s": 5.0, + "template": null + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": null, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": null, + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_002", + "intent": "click recorded visual target", + "action": "click", + "anchor": { + "template": "templates/step_002.png", + "structural": { + "selector": "#password", + "frame_path": null, + "role": "textbox", + "name": "Password", + "automation_id": null, + "window_name": null + }, + "region": [ + 134, + 232, + 160, + 64 + ], + "click_point": [ + 214, + 264 + ], + "ocr_text": null, + "context_text": null, + "structured_identity": null, + "identity_template": null, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "left_of", + "ocr_text": "Sign In", + "distance_px": 112, + "dx_px": 94, + "dy_px": -60 + }, + { + "relation": "left_of", + "ocr_text": "Password", + "distance_px": 132, + "dx_px": 129, + "dy_px": 30 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 17, + 145, + 394, + 169 + ], + "phash": "e0e01e3c7c1f2fe0", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_002_expect.png" + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": false, + "identity_unarmed_reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "identifier_crop_missing_reason": "identity is not armed on this step (see identity_unarmed_reason) — there is no identity evidence to crop", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_003", + "intent": "type 'mockmed-demo-pass'", + "action": "type", + "anchor": null, + "text": "mockmed-demo-pass", + "param": null, + "secret": false, + "field_label": "Password", + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 26, + 229, + 159, + 69 + ], + "phash": "c2c1cdc9dec1a8b6", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_003_expect.png" + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": null, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": null, + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_004", + "intent": "click 'Sign In'", + "action": "click", + "anchor": { + "template": "templates/step_004.png", + "structural": { + "selector": "#signin", + "frame_path": null, + "role": "button", + "name": "Sign In", + "automation_id": null, + "window_name": null + }, + "region": [ + 39, + 292, + 160, + 64 + ], + "click_point": [ + 119, + 324 + ], + "ocr_text": "Sign In", + "context_text": null, + "structured_identity": null, + "identity_template": null, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "above", + "ocr_text": "Password", + "distance_px": 95, + "dx_px": 34, + "dy_px": 89 + }, + { + "relation": "above", + "ocr_text": "nurse.demo", + "distance_px": 130, + "dx_px": 19, + "dy_px": 129 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 87, + 968, + 314 + ], + "phash": "f7f038e0e868ec68", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_004_expect.png" + }, + { + "kind": "text_present", + "text": "Sam Specimen", + "region": null, + "phash": null, + "phash_tolerance": 8, + "timeout_s": 5.0, + "template": null + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": false, + "identity_unarmed_reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "identifier_crop_missing_reason": "identity is not armed on this step (see identity_unarmed_reason) — there is no identity evidence to crop", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_005", + "intent": "click 'Open'", + "action": "click", + "anchor": { + "template": "templates/step_005.png", + "structural": { + "selector": "#open-p1", + "frame_path": null, + "role": "button", + "name": "Open", + "automation_id": null, + "window_name": null + }, + "region": [ + 695, + 154, + 160, + 64 + ], + "click_point": [ + 775, + 186 + ], + "ocr_text": "Open", + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 30, + "tokens": [ + { + "c": "c3f03513b97ac375", + "r": "c3f03513b97ac375", + "n": 4, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + }, + { + "c": "9ee71e296b9f12b0", + "r": "9ee71e296b9f12b0", + "n": 6, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + }, + { + "c": "474017e2662aec63", + "r": "474017e2662aec63", + "n": 4, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + }, + { + "c": "e2c9d9dd2be64c93", + "r": "dbeb4aa0ff7e457c", + "n": 4, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + }, + { + "c": "e85574407f1c63d2", + "r": "e85574407f1c63d2", + "n": 8, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + }, + { + "c": "f0d7c32ddfe55ff9", + "r": "291356604e133bf5", + "n": 4, + "alpha": true, + "name": true, + "digit": false, + "idsh": false, + "glyph": false, + "gen": false + } + ], + "concats": [ + { + "i": 0, + "size": 2, + "c": "c8f3afe51e54101a", + "r": "c8f3afe51e54101a", + "digit": false, + "name": true, + "n": 10 + }, + { + "i": 0, + "size": 3, + "c": "889b7b67936cc714", + "r": "889b7b67936cc714", + "digit": false, + "name": true, + "n": 14 + }, + { + "i": 0, + "size": 4, + "c": "ec3cdd51930bbe48", + "r": "012c14f98d142b52", + "digit": false, + "name": true, + "n": 18 + }, + { + "i": 1, + "size": 2, + "c": "f568044c153a789d", + "r": "f568044c153a789d", + "digit": false, + "name": true, + "n": 10 + }, + { + "i": 1, + "size": 3, + "c": "39c3c847d0c00e09", + "r": "1df7bb2273b3df1e", + "digit": false, + "name": true, + "n": 14 + }, + { + "i": 1, + "size": 4, + "c": "70fa34d51b5f7d24", + "r": "3f8bfbc445a153ce", + "digit": false, + "name": true, + "n": 22 + }, + { + "i": 2, + "size": 2, + "c": "a489e05dc4e788cd", + "r": "952951299539c02a", + "digit": false, + "name": true, + "n": 8 + }, + { + "i": 2, + "size": 3, + "c": "a17b2d971bc7336e", + "r": "b6031ab669bb21d4", + "digit": false, + "name": true, + "n": 16 + }, + { + "i": 2, + "size": 4, + "c": "554e958767924e9f", + "r": "8cb792749b8c4a26", + "digit": false, + "name": true, + "n": 20 + }, + { + "i": 3, + "size": 2, + "c": "fb3767c825cca1e4", + "r": "f8736267c1e29056", + "digit": false, + "name": true, + "n": 12 + }, + { + "i": 3, + "size": 3, + "c": "85136127f9b54bf1", + "r": "9cb6424db9c1775c", + "digit": false, + "name": true, + "n": 16 + }, + { + "i": 4, + "size": 2, + "c": "08d9cd2536340e25", + "r": "3c24468959fd3d49", + "digit": false, + "name": true, + "n": 12 + } + ], + "structured": "f54030eb9739c951", + "signal_hashes": { + "structured|exact|": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "captured_context|exact|": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": true + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "above", + "ocr_text": "Action", + "distance_px": 52, + "dx_px": 21, + "dy_px": 48 + }, + { + "relation": "below", + "ocr_text": "Open", + "distance_px": 58, + "dx_px": -2, + "dy_px": -58 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 43, + 968, + 318 + ], + "phash": "fae083ffbc08183c", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_005_expect.png" + }, + { + "kind": "text_present", + "text": "Jane Sample — MRN P1 — DOB 1980-01-01", + "region": null, + "phash": null, + "phash_tolerance": 8, + "timeout_s": 5.0, + "template": null + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_006", + "intent": "click 'New Encounter'", + "action": "click", + "anchor": { + "template": "templates/step_006.png", + "structural": { + "selector": "#new-encounter", + "frame_path": null, + "role": "button", + "name": "New Encounter", + "automation_id": null, + "window_name": null + }, + "region": [ + 34, + 127, + 160, + 64 + ], + "click_point": [ + 114, + 159 + ], + "ocr_text": "New Encounter", + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 0, + "tokens": [], + "concats": [], + "structured": "503fb2093ed582b9", + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": true + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "below", + "ocr_text": "Encounters", + "distance_px": 62, + "dx_px": 34, + "dy_px": -52 + }, + { + "relation": "below", + "ocr_text": "No encounters yet.", + "distance_px": 85, + "dx_px": 24, + "dy_px": -82 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 232, + 696, + 219 + ], + "phash": "ff7fc16a622262c0", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_006_expect.png" + }, + { + "kind": "text_present", + "text": "Encounter Type", + "region": null, + "phash": null, + "phash_tolerance": 8, + "timeout_s": 5.0, + "template": null + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_007", + "intent": "click 'Triage'", + "action": "click", + "anchor": { + "template": "templates/step_007.png", + "structural": { + "selector": "#type-triage", + "frame_path": null, + "role": "button", + "name": "Triage", + "automation_id": null, + "window_name": null + }, + "region": [ + 5, + 182, + 160, + 64 + ], + "click_point": [ + 85, + 214 + ], + "ocr_text": "Triage", + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 0, + "tokens": [], + "concats": [], + "structured": "503fb2093ed582b9", + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": true + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "below", + "ocr_text": "Note", + "distance_px": 71, + "dx_px": 44, + "dy_px": -56 + }, + { + "relation": "above", + "ocr_text": "New Encounter", + "distance_px": 76, + "dx_px": -27, + "dy_px": 71 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 163, + 177, + 102 + ], + "phash": "88c2f2297d2da739", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_007_expect.png" + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_008", + "intent": "click recorded visual target", + "action": "click", + "anchor": { + "template": "templates/step_008.png", + "structural": { + "selector": "#note", + "frame_path": null, + "role": "textbox", + "name": "Note", + "automation_id": null, + "window_name": null + }, + "region": [ + 104, + 254, + 480, + 192 + ], + "click_point": [ + 344, + 350 + ], + "ocr_text": null, + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 0, + "tokens": [], + "concats": [], + "structured": "503fb2093ed582b9", + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": true + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "left_of", + "ocr_text": "Consult", + "distance_px": 194, + "dx_px": 138, + "dy_px": 137 + }, + { + "relation": "above", + "ocr_text": "Jane Sample — MRN P1 — DOB 1980-01-01", + "distance_px": 286, + "dx_px": 135, + "dy_px": 252 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 249, + 696, + 202 + ], + "phash": "ff3fd53e7a002a00", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_008_expect.png" + } + ], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_009", + "intent": "type ", + "action": "type", + "anchor": null, + "text": "Golden triage booking three months", + "param": "note", + "secret": false, + "field_label": "Note", + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [], + "effects": [], + "api_binding": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": null, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": null, + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + }, + { + "id": "step_010", + "intent": "click 'Save Encounter'", + "action": "click", + "anchor": { + "template": "templates/step_010.png", + "structural": { + "selector": "#save-encounter", + "frame_path": null, + "role": "button", + "name": "Save Encounter", + "automation_id": null, + "window_name": null + }, + "region": [ + 54, + 425, + 160, + 64 + ], + "click_point": [ + 134, + 457 + ], + "ocr_text": "Save Encounter", + "context_text": null, + "structured_identity": null, + "identity_template": { + "schema_version": 1, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "band_len": 0, + "tokens": [], + "concats": [], + "structured": "503fb2093ed582b9", + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb" + }, + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "structured_row": true + }, + "identifier_crop": null, + "identifier_region": null, + "form_identity": null, + "landmarks": [ + { + "relation": "above", + "ocr_text": "Note", + "distance_px": 210, + "dx_px": 94, + "dy_px": 188 + }, + { + "relation": "above", + "ocr_text": "Consult", + "distance_px": 254, + "dx_px": -72, + "dy_px": 244 + } + ], + "search_pad": 80 + }, + "text": null, + "param": null, + "secret": false, + "field_label": null, + "selection_commit_key": null, + "selection_region": null, + "key": null, + "modifiers": [], + "drag_end_anchor": null, + "scroll_dx": null, + "scroll_dy": null, + "expect": [ + { + "kind": "region_stable", + "text": null, + "region": [ + 0, + 229, + 696, + 56 + ], + "phash": "f80781f8871e9e0f", + "phash_tolerance": 16, + "timeout_s": 5.0, + "template": "templates/step_010_expect.png" + }, + { + "kind": "text_present", + "text": "Encounters", + "region": null, + "phash": null, + "phash_tolerance": 8, + "timeout_s": 5.0, + "template": null + } + ], + "effects": [], + "api_binding": null, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "wait_until": null, + "guard": null, + "read": null, + "read_gate": null, + "surface": null, + "opens": [], + "surface_origin": null, + "closes_surface": false, + "dialog": null, + "timeout_s": 10.0, + "identity_armed": true, + "identity_unarmed_reason": null, + "identifier_crop_missing_reason": "structured identity (DOM/UIA/AX) owns this step's identity; no identifier pixels persisted at rest — mark the identifier field/region at record time (--identifier) to also arm the pixel tier for remote-display replays", + "hover": null, + "submit_binding": null, + "submit_binding_unbound_reason": null + } + ], + "interstitials": [], + "program": null, + "subflows": {}, + "data_sources": {}, + "manifest": { + "schema_version": 2, + "content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "file_hashes": { + "templates/layout_fingerprint.json": "470ed40ea4b12499ce0e7f6a9e8bd4db8cbb716a44889cb3f8c06f058afd10b4", + "templates/step_000.png": "b355da2f01f2311032460231a15b025d5ebad7dd49cee26b422bc1b08a8c2022", + "templates/step_000_expect.png": "29e54a82c2f7df3554d2487d9bad748fc0abd86191416d39343c1eb866c486d1", + "templates/step_001_expect.png": "e2e203b8bbc4bf0a31aebd56a1303077243a3ff602708bbe9eae46d45460ebdf", + "templates/step_002.png": "b355da2f01f2311032460231a15b025d5ebad7dd49cee26b422bc1b08a8c2022", + "templates/step_002_expect.png": "68a0aa31d3b7fba1139c05d729f49252174481dfca5a8693cb5b6440f8976fe6", + "templates/step_003_expect.png": "3068277f51d8dfbfd1ba50b31afee93e76dcacb67b11d4610b6dcdf681597eed", + "templates/step_004.png": "d0082e004cf2a2c03668ca1c6630001eda69bdcf169d05d58839dcbddbc56773", + "templates/step_004_expect.png": "230b56796f24b36637d77ba395e6031bf39cbfab898da61c1c41f23f1b57e396", + "templates/step_005.png": "e38e9760b48c63a08e6618b2624c6796620ce58b5f7d7a2ff63f678aa25bb3e2", + "templates/step_005_expect.png": "76696ff4ec85753e45b5378638fa7c19f4f7fddb1cf35ee99cf6baee11844803", + "templates/step_006.png": "97568daf732ecb6109d858dd09cdcf78b031830c819b6f4b6a50ae60a72ada10", + "templates/step_006_expect.png": "d0e310e05830227867e94a9b288e6265fa28c375558d58555e79bfb002095134", + "templates/step_007.png": "7f6817a19ffe49b31a05a70a23f3fcdb2a71b93b3f4ec6a7b997126b4e0ff16c", + "templates/step_007_expect.png": "ac9ee10ba2354bca0db66fbf3bf93ca80b62a650d3f19e8b71dcc6038a4d057f", + "templates/step_008.png": "b6b06e1ed6155ed74899d0a42bf23df672bf930bfb6f830ab69e6d89ca6fedd3", + "templates/step_008_expect.png": "d1f13cae697465c2ec07310adc38d7780f7d7c0146257679b7c559716b992a31", + "templates/step_010.png": "31193461982dc5b438be9e459f1ce17f2b5dca4109c206428c7d8135bf60643a", + "templates/step_010_expect.png": "5fcb6891641b02953b9baeaa75581a3a9fa1db6c7bd39d432f1d4d06d04c8856" + }, + "provenance": { + "compiler_version": "2.5.0", + "source_recording_sha256": null, + "compiler_config_sha256": "43f5f0d9a4d87c9637138dc24dcf8a163094ab400b760cee8c2567a0760be695", + "created_at": "2026-11-03T20:44:16.736176+00:00", + "policy_name": null, + "certified": false, + "certification_status": null, + "certified_at": null, + "expires_at": null, + "certification_invalidated_at": null, + "certification_invalidation_reason": null, + "governed_authorization_template": null + }, + "encrypted": false + } +} \ No newline at end of file diff --git a/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.py b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.py new file mode 100644 index 0000000000..541ccbc326 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/bundles/mockmed-triage/workflow.py @@ -0,0 +1,79 @@ +"""Generated by openadapt-flow. Human-readable rendering of +workflow 'golden-triage' — for code review only; the replayer +executes workflow.json, not this file.""" + +WORKFLOW_NAME = 'golden-triage' +RECORDING_ID = '638e9b610dcf480db27a9a18ed716dd2' +PARAMS = {'note': 'Golden triage booking three months'} # param -> example/default value + + +def run(flow, params=PARAMS): + # step_000: click recorded visual target [reversible] + # landmark: 'Sign in to MockMed' (above, 130px) + # landmark: 'Username' (left_of, 132px) + # identity: armed via PHI-free salted-hash template (0 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_000.png', click_point=(214, 195), region=(134, 163, 160, 64)) + # expect region_stable region=(17, 145, 394, 126) phash='e060e8e01f0f2f9f' (tol 16) + + # step_001: type 'nurse.demo' [reversible] + flow.type_text('nurse.demo') + # expect region_stable region=(27, 156, 147, 76) phash='c3c969c2d23cbc36' (tol 16) + # expect text_present text='nurse.demo' + + # step_002: click recorded visual target [reversible] + # landmark: 'Sign In' (left_of, 112px) + # landmark: 'Password' (left_of, 132px) + flow.click(template='templates/step_002.png', click_point=(214, 264), region=(134, 232, 160, 64)) + # expect region_stable region=(17, 145, 394, 169) phash='e0e01e3c7c1f2fe0' (tol 16) + + # step_003: type 'mockmed-demo-pass' [reversible] + flow.type_text('mockmed-demo-pass') + # expect region_stable region=(26, 229, 159, 69) phash='c2c1cdc9dec1a8b6' (tol 16) + + # step_004: click 'Sign In' [reversible] + # landmark: 'Password' (above, 95px) + # landmark: 'nurse.demo' (above, 130px) + flow.click(template='templates/step_004.png', click_point=(119, 324), region=(39, 292, 160, 64), ocr_text='Sign In') + # expect region_stable region=(0, 87, 968, 314) phash='f7f038e0e868ec68' (tol 16) + # expect text_present text='Sam Specimen' + + # step_005: click 'Open' [reversible] + # landmark: 'Action' (above, 52px) + # landmark: 'Open' (below, 58px) + # identity: armed via PHI-free salted-hash template (6 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_005.png', click_point=(775, 186), region=(695, 154, 160, 64), ocr_text='Open') + # expect region_stable region=(0, 43, 968, 318) phash='fae083ffbc08183c' (tol 16) + # expect text_present text='Jane Sample — MRN P1 — DOB 1980-01-01' + + # step_006: click 'New Encounter' [reversible] + # landmark: 'Encounters' (below, 62px) + # landmark: 'No encounters yet.' (below, 85px) + # identity: armed via PHI-free salted-hash template (0 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_006.png', click_point=(114, 159), region=(34, 127, 160, 64), ocr_text='New Encounter') + # expect region_stable region=(0, 232, 696, 219) phash='ff7fc16a622262c0' (tol 16) + # expect text_present text='Encounter Type' + + # step_007: click 'Triage' [reversible] + # landmark: 'Note' (below, 71px) + # landmark: 'New Encounter' (above, 76px) + # identity: armed via PHI-free salted-hash template (0 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_007.png', click_point=(85, 214), region=(5, 182, 160, 64), ocr_text='Triage') + # expect region_stable region=(0, 163, 177, 102) phash='88c2f2297d2da739' (tol 16) + + # step_008: click recorded visual target [reversible] + # landmark: 'Consult' (left_of, 194px) + # landmark: 'Jane Sample — MRN P1 — DOB 1980-01-01' (above, 286px) + # identity: armed via PHI-free salted-hash template (0 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_008.png', click_point=(344, 350), region=(104, 254, 480, 192)) + # expect region_stable region=(0, 249, 696, 202) phash='ff3fd53e7a002a00' (tol 16) + + # step_009: type [reversible] + flow.type_text(params['note']) + + # step_010: click 'Save Encounter' [irreversible] + # landmark: 'Note' (above, 210px) + # landmark: 'Consult' (above, 254px) + # identity: armed via PHI-free salted-hash template (0 band tokens, structured); no patient identifier stored + flow.click(template='templates/step_010.png', click_point=(134, 457), region=(54, 425, 160, 64), ocr_text='Save Encounter') + # expect region_stable region=(0, 229, 696, 56) phash='f80781f8871e9e0f' (tol 16) + # expect text_present text='Encounters' diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_data_growth.json b/packages/flow/tests/golden_runs/baselines/mockmed_data_growth.json new file mode 100644 index 0000000000..1e868e0456 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_data_growth.json @@ -0,0 +1,742 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#tasks" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "762ffa2d83e3d242d13c8c3ed09b99b618583ca178683f239618386c65167e14", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "762ffa2d83e3d242d13c8c3ed09b99b618583ca178683f239618386c65167e14", + "steps/step_005_before.png": "762ffa2d83e3d242d13c8c3ed09b99b618583ca178683f239618386c65167e14" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [], + "effect_journal": [], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'" + ], + "intent": "click 'Open'", + "observed_texts": [ + "MockMed", + "Clinical demo — all data is fake", + "Referral Tasks", + "Patient", + "Reason", + "Priority", + "Action", + "Pat Placeholder", + "Orthopedics intake", + "Low", + "Open", + "Robin Redacted", + "Neurology referral", + "Medium", + "Casey Control", + "Endocrine consult", + "Drew Dataset", + "Physio assessment", + "Jane Sample", + "Knee pain referral", + "High", + "Alex Testcase", + "Cardiology follow-up", + "Sam Specimen", + "Dermatology consult" + ], + "outcome": "halt", + "reason": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 0.99) but its surrounding text does not match the recorded target's — expected '', observed 'Pat PlaceholderOrthopedics intakeLow' (coverage 0.00) — refusing to act; run aborted", + "state_id": "step_005" + }, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 9 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 11 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": false, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 0.99) but its surrounding text does not match the recorded target's — expected '', observed 'Pat PlaceholderOrthopedics intakeLow' (coverage 0.00) — refusing to act; run aborted", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "coverage": 0.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Pat PlaceholderOrthopedics intakeLow", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "mismatch" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": { + "confidence": 0.995, + "elapsed_ms": "", + "point": [ + 777, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": { + "code": "identity_conflict", + "detector_input_sha256": "762ffa2d83e3d242d13c8c3ed09b99b618583ca178683f239618386c65167e14", + "stage": "identity_verification" + }, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 3 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "REJECTED_POLICY", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "call": "cancel_guarded_keyboard" + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_lookalike_row.json b/packages/flow/tests/golden_runs/baselines/mockmed_lookalike_row.json new file mode 100644 index 0000000000..33a1ce5f67 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_lookalike_row.json @@ -0,0 +1,735 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#tasks" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "1eb7df905bce4b6e43cbd6b28a14ff72a2f4f6ab5ec7a6921c50dd2a2fdff8d1", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "1eb7df905bce4b6e43cbd6b28a14ff72a2f4f6ab5ec7a6921c50dd2a2fdff8d1", + "steps/step_005_before.png": "1eb7df905bce4b6e43cbd6b28a14ff72a2f4f6ab5ec7a6921c50dd2a2fdff8d1" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [], + "effect_journal": [], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'" + ], + "intent": "click 'Open'", + "observed_texts": [ + "MockMed", + "Clinical demo — all data is fake", + "Referral Tasks", + "Patient", + "Reason", + "Priority", + "Action", + "Taylor Duplicate", + "Knee pain referral", + "High", + "Open", + "Jane Sample", + "Alex Testcase", + "Cardiology follow-up", + "Medium", + "Sam Specimen", + "Dermatology consult", + "Low" + ], + "outcome": "halt", + "reason": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Taylor DuplicateKnee pain referralHigh' (coverage 0.00) — refusing to act; run aborted", + "state_id": "step_005" + }, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 9 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 11 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": false, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Taylor DuplicateKnee pain referralHigh' (coverage 0.00) — refusing to act; run aborted", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "coverage": 0.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Taylor DuplicateKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "mismatch" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": { + "confidence": 0.999, + "elapsed_ms": "", + "point": [ + 777, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": { + "code": "identity_conflict", + "detector_input_sha256": "1eb7df905bce4b6e43cbd6b28a14ff72a2f4f6ab5ec7a6921c50dd2a2fdff8d1", + "stage": "identity_verification" + }, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 3 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "REJECTED_POLICY", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "call": "cancel_guarded_keyboard" + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_missing_row.json b/packages/flow/tests/golden_runs/baselines/mockmed_missing_row.json new file mode 100644 index 0000000000..e497e2332f --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_missing_row.json @@ -0,0 +1,731 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#tasks" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "473c1bd6d325229b795e1569e1c155f6d78d6288f23c5e0f9110739f9ee28b10", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "473c1bd6d325229b795e1569e1c155f6d78d6288f23c5e0f9110739f9ee28b10", + "steps/step_005_before.png": "473c1bd6d325229b795e1569e1c155f6d78d6288f23c5e0f9110739f9ee28b10" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [], + "effect_journal": [], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'" + ], + "intent": "click 'Open'", + "observed_texts": [ + "MockMed", + "Clinical demo — all data is fake", + "Referral Tasks", + "Patient", + "Reason", + "Priority", + "Action", + "Alex Testcase", + "Cardiology follow-up", + "Medium", + "Open", + "Sam Specimen", + "Dermatology consult", + "Low" + ], + "outcome": "halt", + "reason": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Alex TestcaseCardiology follow-upMedium' (coverage 0.00) — refusing to act; run aborted", + "state_id": "step_005" + }, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 9 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 11 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": false, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Alex TestcaseCardiology follow-upMedium' (coverage 0.00) — refusing to act; run aborted", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "coverage": 0.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Alex TestcaseCardiology follow-upMedium", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "mismatch" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 775, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": { + "code": "identity_conflict", + "detector_input_sha256": "473c1bd6d325229b795e1569e1c155f6d78d6288f23c5e0f9110739f9ee28b10", + "stage": "identity_verification" + }, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 3 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "REJECTED_POLICY", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "call": "cancel_guarded_keyboard" + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_modal.json b/packages/flow/tests/golden_runs/baselines/mockmed_modal.json new file mode 100644 index 0000000000..47670fbd25 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_modal.json @@ -0,0 +1,1267 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#encounter" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_005_before.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_006_after.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_006_before.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_007_after.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_007_before.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_008_after.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_008_before.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_009_after.png": "3dd75cc7bda6990a869d201700fef88a58f8cb6a967089e8476fff3d8c5fac89", + "steps/step_009_before.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_010_after.png": "e2b19443d9e3aab0ba865578116a73947ba8a973d0458cca144c4239ec88fc7f", + "steps/step_010_before.png": "bbb8dfdecf30b0454ba805fc4566d211ac6e7b958e76f75ee00df1c8dc11a304" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [ + { + "attempt_state": "delivered", + "effects": [], + "intent": "click 'Save Encounter'", + "may_need_undo": true, + "position": 11, + "status": "unknown", + "step_id": "step_010", + "undo_id": null + } + ], + "effect_journal": [ + { + "approved_unverified": false, + "attempt_state": "delivered", + "collateral_reconciliation_actions": 0, + "consequential": true, + "effect_verified": null, + "intended_effect_contract_hashes": [], + "intent": "click 'Save Encounter'", + "observed_at": null, + "observed_effect": "unknown", + "step_id": "step_010", + "verification_performed": false + } + ], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'", + "click 'Open'", + "click 'New Encounter'", + "click 'Triage'", + "click recorded visual target", + "type " + ], + "intent": "click 'Save Encounter'", + "observed_texts": [ + "MockMed", + "Clinical demo —- all data is fake", + "Jane Sample — MRN P1 — DOB 1980-01-01", + "New Encounter", + "Encounter Type", + "Triage", + "Consult", + "Note", + "Golden triage booking three months", + "Survey", + "Before saving, please rate your experience with", + "MockMed today.", + "Maybe later", + "Save Encounter" + ], + "outcome": "halt", + "reason": "Postconditions failed for step 'step_010' (click 'Save Encounter'): expected screen state not reached (semantic drift) — failed: region_stable region=(0, 229, 696, 56) — run aborted", + "state_id": "step_010" + }, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 16 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9e4263786e21aa0c2fbe6dbf8a9089b945c32199378d84cb53bd22cdf482d77c", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "9cd6efbb38a50616744e8d18d79928f9e64c59364646187f080a988f240d71b0", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "84710d18a9ad16229b276fcf71aa353821975d88e81be9efbcfb6b9d2faf552d", + "result_index": 7, + "step_contract_sha256": "5891fe63e3239ab1dd6ed30d206db52aa15605ec0d0df066492bf331663d5159", + "step_index": 7, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9df52ef8794b53be5eb524141445a398cfdbd2ab5eff586841dca1920d829bbe", + "result_index": 8, + "step_contract_sha256": "45ac4465db8e002d12457461189123a0f2d259951305680f3e64910bd9f428e4", + "step_index": 8, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "8e411b185cf3f7bca6cfbc58a7a049634d67b58898d546f45fa0499fb7d8fa6c", + "result_index": 9, + "step_contract_sha256": "6d7e1ac270c2a9bc0f3b2b6fac5b64fe9aa1faf4d7621853a6dc451c484a35b7", + "step_index": 9, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "008639c630d00a1c2c18d0ced1b25c63c0b2abd4f5f75fc18f93964aa2c29514", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "refuted", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "4d0a2f29cae281f657d4d820c474cc7f718ec8331040d5517e3c80357966af1b", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "refuted", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane SampleKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 775, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_006_after.png", + "api_fallback": null, + "before_png": "steps/step_006_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'New Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 114, + 159 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_006", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_007_after.png", + "api_fallback": null, + "before_png": "steps/step_007_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Triage'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 85, + 214 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_007", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_008_after.png", + "api_fallback": null, + "before_png": "steps/step_008_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 344, + 350 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_008", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_009_after.png", + "api_fallback": null, + "before_png": "steps/step_009_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type ", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_009", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "guarded_coordinate", + "after_png": "steps/step_010_after.png", + "api_fallback": null, + "before_png": "steps/step_010_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "guarded_coordinate_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Postconditions failed for step 'step_010' (click 'Save Encounter'): expected screen state not reached (semantic drift) — failed: region_stable region=(0, 229, 696, 56) — run aborted", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Save Encounter'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": false, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 134, + 457 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_010", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 7 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "RECONCILIATION_REQUIRED", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 775, + 186 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 114, + 159 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 85, + 214 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 344, + 350 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "Golden triage booking three months" + ], + "call": "type_text" + }, + { + "call": "cancel_pending_structural_guards" + }, + { + "args": [ + 134, + 457 + ], + "call": "arm_guarded_coordinate" + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "args": [ + 134, + 457 + ], + "call": "act_guarded_coordinate", + "kwargs": { + "double": false, + "expected_frame_sha256": "bbb8dfdecf30b0454ba805fc4566d211ac6e7b958e76f75ee00df1c8dc11a304" + } + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_pass.json b/packages/flow/tests/golden_runs/baselines/mockmed_pass.json new file mode 100644 index 0000000000..9280ae27c0 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_pass.json @@ -0,0 +1,1234 @@ +{ + "app_state": { + "banner": "Encounter saved — Golden triage booking three months", + "enc_item": "Triage — Golden triage booking three months", + "hash": "#patient/p1" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_005_before.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_006_after.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_006_before.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_007_after.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_007_before.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_008_after.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_008_before.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_009_after.png": "3dd75cc7bda6990a869d201700fef88a58f8cb6a967089e8476fff3d8c5fac89", + "steps/step_009_before.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_010_after.png": "b67a417320935e61795d3fc117b99c301045cfb1cc9cfb1f51515d4ecc36e5b9", + "steps/step_010_before.png": "bbb8dfdecf30b0454ba805fc4566d211ac6e7b958e76f75ee00df1c8dc11a304" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [ + { + "attempt_state": "delivered", + "effects": [], + "intent": "click 'Save Encounter'", + "may_need_undo": true, + "position": 11, + "status": "unknown", + "step_id": "step_010", + "undo_id": null + } + ], + "effect_journal": [ + { + "approved_unverified": false, + "attempt_state": "delivered", + "collateral_reconciliation_actions": 0, + "consequential": true, + "effect_verified": null, + "intended_effect_contract_hashes": [], + "intent": "click 'Save Encounter'", + "observed_at": null, + "observed_effect": "unknown", + "step_id": "step_010", + "verification_performed": false + } + ], + "est_model_cost_usd": 0.0, + "execution_completed": true, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "COMPLETED_UNVERIFIED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": null, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": true, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "COMPLETED_UNVERIFIED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9e4263786e21aa0c2fbe6dbf8a9089b945c32199378d84cb53bd22cdf482d77c", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "9cd6efbb38a50616744e8d18d79928f9e64c59364646187f080a988f240d71b0", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "84710d18a9ad16229b276fcf71aa353821975d88e81be9efbcfb6b9d2faf552d", + "result_index": 7, + "step_contract_sha256": "5891fe63e3239ab1dd6ed30d206db52aa15605ec0d0df066492bf331663d5159", + "step_index": 7, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9df52ef8794b53be5eb524141445a398cfdbd2ab5eff586841dca1920d829bbe", + "result_index": 8, + "step_contract_sha256": "45ac4465db8e002d12457461189123a0f2d259951305680f3e64910bd9f428e4", + "step_index": 8, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "8e411b185cf3f7bca6cfbc58a7a049634d67b58898d546f45fa0499fb7d8fa6c", + "result_index": 9, + "step_contract_sha256": "6d7e1ac270c2a9bc0f3b2b6fac5b64fe9aa1faf4d7621853a6dc451c484a35b7", + "step_index": 9, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "008639c630d00a1c2c18d0ced1b25c63c0b2abd4f5f75fc18f93964aa2c29514", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "4d0a2f29cae281f657d4d820c474cc7f718ec8331040d5517e3c80357966af1b", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane SampleKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 775, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_006_after.png", + "api_fallback": null, + "before_png": "steps/step_006_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'New Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 114, + 159 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_006", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_007_after.png", + "api_fallback": null, + "before_png": "steps/step_007_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Triage'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 85, + 214 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_007", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_008_after.png", + "api_fallback": null, + "before_png": "steps/step_008_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 344, + 350 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_008", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_009_after.png", + "api_fallback": null, + "before_png": "steps/step_009_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type ", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_009", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "guarded_coordinate", + "after_png": "steps/step_010_after.png", + "api_fallback": null, + "before_png": "steps/step_010_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "guarded_coordinate_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Save Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 134, + 457 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_010", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 8 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": true, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "COMPLETED_UNVERIFIED", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 775, + 186 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 114, + 159 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 85, + 214 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 344, + 350 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "Golden triage booking three months" + ], + "call": "type_text" + }, + { + "call": "cancel_pending_structural_guards" + }, + { + "args": [ + 134, + 457 + ], + "call": "arm_guarded_coordinate" + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "args": [ + 134, + 457 + ], + "call": "act_guarded_coordinate", + "kwargs": { + "double": false, + "expected_frame_sha256": "bbb8dfdecf30b0454ba805fc4566d211ac6e7b958e76f75ee00df1c8dc11a304" + } + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_pass_structural.json b/packages/flow/tests/golden_runs/baselines/mockmed_pass_structural.json new file mode 100644 index 0000000000..ffb702bba2 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_pass_structural.json @@ -0,0 +1,1655 @@ +{ + "app_state": { + "banner": "Encounter saved — Golden triage booking three months", + "enc_item": "Triage — Golden triage booking three months", + "hash": "#patient/p1" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_005_before.png": "f55f1b301c4f53b7a2d9690e8583358911a33a16903ab93b7a09567a8e7158f0", + "steps/step_006_after.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_006_before.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_007_after.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_007_before.png": "ad792e883a6da0330c97a456acd21f054e264131365b70b336f66c71c17dc972", + "steps/step_008_after.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_008_before.png": "5a220b78381249c1280c32a8fe1dafd896b68a32c019677f7c9014f07dee66c2", + "steps/step_009_after.png": "3dd75cc7bda6990a869d201700fef88a58f8cb6a967089e8476fff3d8c5fac89", + "steps/step_009_before.png": "60e0a3d48905c71fbf650de8a62c6c86d69bf48eef8d5a3469aea064c9127616", + "steps/step_010_after.png": "b67a417320935e61795d3fc117b99c301045cfb1cc9cfb1f51515d4ecc36e5b9", + "steps/step_010_before.png": "bbb8dfdecf30b0454ba805fc4566d211ac6e7b958e76f75ee00df1c8dc11a304" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [ + { + "attempt_state": "delivered", + "effects": [], + "intent": "click 'Save Encounter'", + "may_need_undo": true, + "position": 11, + "status": "unknown", + "step_id": "step_010", + "undo_id": null + } + ], + "effect_journal": [ + { + "approved_unverified": false, + "attempt_state": "delivered", + "collateral_reconciliation_actions": 0, + "consequential": true, + "effect_verified": null, + "intended_effect_contract_hashes": [], + "intent": "click 'Save Encounter'", + "observed_at": null, + "observed_effect": "unknown", + "step_id": "step_010", + "verification_performed": false + } + ], + "est_model_cost_usd": 0.0, + "execution_completed": true, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "COMPLETED_UNVERIFIED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": null, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": true, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "COMPLETED_UNVERIFIED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9e4263786e21aa0c2fbe6dbf8a9089b945c32199378d84cb53bd22cdf482d77c", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "9cd6efbb38a50616744e8d18d79928f9e64c59364646187f080a988f240d71b0", + "result_index": 6, + "step_contract_sha256": "def1b78b00fc5538c91dd1ca76314e56a3054a8a919d28ca1010316059f173cc", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "84710d18a9ad16229b276fcf71aa353821975d88e81be9efbcfb6b9d2faf552d", + "result_index": 7, + "step_contract_sha256": "5891fe63e3239ab1dd6ed30d206db52aa15605ec0d0df066492bf331663d5159", + "step_index": 7, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9df52ef8794b53be5eb524141445a398cfdbd2ab5eff586841dca1920d829bbe", + "result_index": 8, + "step_contract_sha256": "45ac4465db8e002d12457461189123a0f2d259951305680f3e64910bd9f428e4", + "step_index": 8, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "8e411b185cf3f7bca6cfbc58a7a049634d67b58898d546f45fa0499fb7d8fa6c", + "result_index": 9, + "step_contract_sha256": "6d7e1ac270c2a9bc0f3b2b6fac5b64fe9aa1faf4d7621853a6dc451c484a35b7", + "step_index": 9, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "008639c630d00a1c2c18d0ced1b25c63c0b2abd4f5f75fc18f93964aa2c29514", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "4d0a2f29cae281f657d4d820c474cc7f718ec8331040d5517e3c80357966af1b", + "result_index": 10, + "step_contract_sha256": "d3a274759255792ce110fcedbe1c10fb007d29184b4c1c6eba64ddd992990a25", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": "dom", + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 214, + 195 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 214, + 195 + ], + "region": [ + 49, + 177, + 330, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 214, + 264 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 214, + 264 + ], + "region": [ + 49, + 246, + 330, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 119, + 324 + ], + "region": [ + 49, + 304, + 140, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane SampleKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 776, + 186 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 776, + 186 + ], + "region": [ + 731, + 168, + 90, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_006_after.png", + "api_fallback": null, + "before_png": "steps/step_006_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'New Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 114, + 159 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 114, + 159 + ], + "region": [ + 24, + 139, + 180, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_006", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_007_after.png", + "api_fallback": null, + "before_png": "steps/step_007_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Triage'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 85, + 214 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 85, + 214 + ], + "region": [ + 25, + 195, + 120, + 38 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_007", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_008_after.png", + "api_fallback": null, + "before_png": "steps/step_008_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 344, + 350 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 344, + 350 + ], + "region": [ + 24, + 281, + 640, + 138 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_008", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_009_after.png", + "api_fallback": null, + "before_png": "steps/step_009_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type ", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_009", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "dom", + "after_png": "steps/step_010_after.png", + "api_fallback": null, + "before_png": "steps/step_010_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "dom_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Save Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 134, + 457 + ], + "rung": "structural", + "structural_handle": { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 134, + 457 + ], + "region": [ + 24, + 437, + 220, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "" + } + }, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_010", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "structural": 8 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": true, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "COMPLETED_UNVERIFIED", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Username", + "role": "textbox", + "selector": "#username", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 214, + 195 + ], + "region": [ + 49, + 177, + 330, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Password", + "role": "textbox", + "selector": "#password", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 214, + 264 + ], + "region": [ + 49, + 246, + 330, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Sign In", + "role": "button", + "selector": "#signin", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 119, + 324 + ], + "region": [ + 49, + 304, + 140, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Open", + "role": "button", + "selector": "#open-p1", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 776, + 186 + ], + "region": [ + 731, + 168, + 90, + 36 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "New Encounter", + "role": "button", + "selector": "#new-encounter", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 114, + 159 + ], + "region": [ + 24, + 139, + 180, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Triage", + "role": "button", + "selector": "#type-triage", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 85, + 214 + ], + "region": [ + 25, + 195, + 120, + 38 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Note", + "role": "textbox", + "selector": "#note", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 344, + 350 + ], + "region": [ + 24, + 281, + 640, + 138 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + "Golden triage booking three months" + ], + "call": "type_text" + }, + { + "call": "cancel_pending_structural_guards" + }, + { + "args": [ + { + "automation_id": null, + "frame_path": null, + "name": "Save Encounter", + "role": "button", + "selector": "#save-encounter", + "type": "StructuralLocator", + "window_name": null + }, + { + "candidate_count": 1, + "confidence": 1.0, + "point": [ + 134, + 457 + ], + "region": [ + 24, + 437, + 220, + 40 + ], + "supported_operations": [ + "dom_click", + "dom_double_click", + "dom_drag" + ], + "target_fingerprint": "", + "type": "StructuralHandle" + } + ], + "call": "act_structural", + "kwargs": { + "double": false + } + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_rename.json b/packages/flow/tests/golden_runs/baselines/mockmed_rename.json new file mode 100644 index 0000000000..6824e39141 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_rename.json @@ -0,0 +1,1749 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#encounter" + }, + "artifacts": { + "heals/step_005/heal.json": "46e74ad796419f8db00c807d39881238460372fc5d3aa60948795abb7cac8b32", + "heals/step_005/patch.json": "7c8471d5cc3bd48e0e5cf5fc4d8cf65e1c9576d6ffe78a9448484edda699fc44", + "heals/step_005/screen.png": "d75e763a05baa64e18034d9ea887a98a66e4a16164be5367e2252e4033d88731", + "heals/step_005/template.png": "eca2fd5d3137dacda8ef89755450480df3a5ad42d93b83664ef6cf7de83c622c", + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "d75e763a05baa64e18034d9ea887a98a66e4a16164be5367e2252e4033d88731", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_005_before.png": "d75e763a05baa64e18034d9ea887a98a66e4a16164be5367e2252e4033d88731", + "steps/step_006_after.png": "474b3bbe66d5ba3af29d1602787b1035bc3b84925d94b929ba88ff15d96acedc", + "steps/step_006_before.png": "6ed64995b2131adb06af1588e7ab4ce5e52330a69979b7eab352f90180608e94", + "steps/step_007_after.png": "7b47061cac340b2de8fdcba39b718d3e7fb8fb57e5a540b4f5ec9417a7b63aa2", + "steps/step_007_before.png": "474b3bbe66d5ba3af29d1602787b1035bc3b84925d94b929ba88ff15d96acedc", + "steps/step_008_after.png": "9379216a4ab84c8efc94d26864ab5a09bfedc085879f7a81bab319680ef77e15", + "steps/step_008_before.png": "7b47061cac340b2de8fdcba39b718d3e7fb8fb57e5a540b4f5ec9417a7b63aa2", + "steps/step_009_after.png": "777a4d7e5737b7e62c9e4580fba8ef08c91228b49a21d43984b21d94675b0347", + "steps/step_009_before.png": "9379216a4ab84c8efc94d26864ab5a09bfedc085879f7a81bab319680ef77e15", + "steps/step_010_after.png": "777a4d7e5737b7e62c9e4580fba8ef08c91228b49a21d43984b21d94675b0347", + "steps/step_010_before.png": "777a4d7e5737b7e62c9e4580fba8ef08c91228b49a21d43984b21d94675b0347" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [], + "effect_journal": [ + { + "approved_unverified": false, + "attempt_state": "not_actuated", + "collateral_reconciliation_actions": 0, + "consequential": true, + "effect_verified": null, + "intended_effect_contract_hashes": [], + "intent": "click 'Save Encounter'", + "observed_at": null, + "observed_effect": "unknown", + "step_id": "step_010", + "verification_performed": false + } + ], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'", + "click 'Open'", + "click 'New Encounter'", + "click 'Triage'", + "click recorded visual target", + "type " + ], + "intent": "click 'Save Encounter'", + "observed_texts": [ + "MockMed", + "Clinical demo - all data is fake", + "Jane Sample — MRN P1 — DOB 1980-01-01", + "New Encounter", + "Encounter Type", + "Triage", + "Consult", + "Note", + "Golden triage booking three months", + "Submit Encounter" + ], + "outcome": "halt", + "reason": "Step 'step_010' (click 'Save Encounter') is irreversible but only resolved via the 'geometry' rung — needs human confirmation; refusing to act (v0 policy)", + "state_id": "step_010" + }, + "heal_count": 1, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 16 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "e14ca9ac29b98020228a084be14344cd27b10e7c47fb3636a3a38d5d7a0d7856", + "result_index": 0, + "step_contract_sha256": "df4d533726194aad4dc7bfaa939ae0895fbe531cf4289e7472d8fcc29c21ae11", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "3567cb3c12a9d2a91b63994c63645fdf37634054ef35114b1465a696ff187b63", + "result_index": 1, + "step_contract_sha256": "c0ad8180c9cab7ab7bdc42c0d168390d14267ce5ce644f0e8715bd0113cace75", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "a6fbc20e5345489b2c2624d03150379a974a24fbf47f82d50c5c73d18d191c4c", + "result_index": 1, + "step_contract_sha256": "c0ad8180c9cab7ab7bdc42c0d168390d14267ce5ce644f0e8715bd0113cace75", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "d4f5c8c230b3663ab04746c246711231fb196dc6dd4ea4129cf323a84d9f1c7b", + "result_index": 1, + "step_contract_sha256": "c0ad8180c9cab7ab7bdc42c0d168390d14267ce5ce644f0e8715bd0113cace75", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "b4a7cb2f6833370b0d05b9b86c833d05a84a91c975f502c56d5e908d62fb7fb2", + "result_index": 2, + "step_contract_sha256": "357d58f30d11fb2e54adff5e3b1633ecac1eea0d73be1841edb023628e9e4b64", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "36b8c7dfe84ea59e0afbc4b878070922d97f2040f81d5b3d19328bb28370554d", + "result_index": 3, + "step_contract_sha256": "5818d11c17d308637d1f150462c13ff382400d80d9bfcd6d913a291aa2e6574d", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "1c4936aa63e03226446d1f8a7e9f53ac413bb3a6f2b54de557a30e4b57800a8e", + "result_index": 3, + "step_contract_sha256": "5818d11c17d308637d1f150462c13ff382400d80d9bfcd6d913a291aa2e6574d", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fa320e8715ed3e82aa1374ffd2df19497e9d0a04eeee487f068f605ef0eac420", + "result_index": 4, + "step_contract_sha256": "bc9ae80fd729ae6c6bf5b4dc07dd39f4c01a64514de319bc56b0c44b45c46abc", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "e0a2923d65fd1c6bc3d5c1d159f1ae41a5052a977fd3f489ea92ca45d5230fb9", + "result_index": 4, + "step_contract_sha256": "bc9ae80fd729ae6c6bf5b4dc07dd39f4c01a64514de319bc56b0c44b45c46abc", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "c118cdc3ad5d601c2a35795a79d2011d6ee6b5f2b68aebd1f072292f5ea1dee5", + "result_index": 5, + "step_contract_sha256": "e21759fa142b9260705d062b8ff17c18a8f22c9e1edcbdb5057eb01f4fbaa7f3", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "9440cdcf2c4d54f92309db510a8e2c82d2266c0ea1cb24628df8b6c9991575d0", + "result_index": 5, + "step_contract_sha256": "e21759fa142b9260705d062b8ff17c18a8f22c9e1edcbdb5057eb01f4fbaa7f3", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "a267c4297a76e4421f9efd4acf4294b52b1ade18c7e5d418f93e49c2eeead87e", + "result_index": 6, + "step_contract_sha256": "ee3d772af2b77baae4f54a219deda336543c915b6c82deb9e65938fa993d4c88", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "f414169f8ed0afe8d82060f66207243d9ef55b61e4a56dab294bdcf7fd5c47e6", + "result_index": 6, + "step_contract_sha256": "ee3d772af2b77baae4f54a219deda336543c915b6c82deb9e65938fa993d4c88", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "b0348f239ee9498f0fc769538a6958eb601cb008ac6bd1c5ccd4be61a579ef2d", + "result_index": 7, + "step_contract_sha256": "bfaf2e9f79af1d44e6dc0dcfe1574e279bb6d8ccb75451d2f23c481b6c048b9d", + "step_index": 7, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "81721d22554e8111297bdba2c16fa7b43d8298d409cf02ff17e6ca62c66dc25c", + "result_index": 8, + "step_contract_sha256": "1567ea791cfb3f8a149b35e992da58808b4385db175a0177bd55b35919d4a11d", + "step_index": 8, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "8698ce2a5fe2ae81e4a9295cba11841b1158ae7644c4c114cd02da7938ccd714", + "result_index": 9, + "step_contract_sha256": "73571c859c98ef64459385424b20518e05be6bddee8393dbbd3b60f24053a861", + "step_index": 9, + "verdict": "passed", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "901478460b92e0f727888fe832c6c42ec48043a5599357391b953729b5638a88", + "result_index": 10, + "step_contract_sha256": "149fb3eb632f4adfeee748d1827ee3a085f013fba2f0f21c792bca2d7aeaf7df", + "step_index": 10, + "verdict": "unverifiable", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3a0a81d106071a808380c7ed82a13e5592d7cd858ec0731e55eeca266c02f011", + "result_index": 10, + "step_contract_sha256": "149fb3eb632f4adfeee748d1827ee3a085f013fba2f0f21c792bca2d7aeaf7df", + "step_index": 10, + "verdict": "unverifiable", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "8fd9d5a9db005ea4eea7b2e57e2ba4994473f77f023ca370d32afa3fb18aa9d0" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 775, + 186 + ], + "context_text": "Jane Sample Knee pain referral High", + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 30, + "concats": [ + { + "c": "c8f3afe51e54101a", + "digit": false, + "i": 0, + "n": 10, + "name": true, + "r": "c8f3afe51e54101a", + "size": 2 + }, + { + "c": "889b7b67936cc714", + "digit": false, + "i": 0, + "n": 14, + "name": true, + "r": "889b7b67936cc714", + "size": 3 + }, + { + "c": "ec3cdd51930bbe48", + "digit": false, + "i": 0, + "n": 18, + "name": true, + "r": "012c14f98d142b52", + "size": 4 + }, + { + "c": "f568044c153a789d", + "digit": false, + "i": 1, + "n": 10, + "name": true, + "r": "f568044c153a789d", + "size": 2 + }, + { + "c": "39c3c847d0c00e09", + "digit": false, + "i": 1, + "n": 14, + "name": true, + "r": "1df7bb2273b3df1e", + "size": 3 + }, + { + "c": "70fa34d51b5f7d24", + "digit": false, + "i": 1, + "n": 22, + "name": true, + "r": "3f8bfbc445a153ce", + "size": 4 + }, + { + "c": "a489e05dc4e788cd", + "digit": false, + "i": 2, + "n": 8, + "name": true, + "r": "952951299539c02a", + "size": 2 + }, + { + "c": "a17b2d971bc7336e", + "digit": false, + "i": 2, + "n": 16, + "name": true, + "r": "b6031ab669bb21d4", + "size": 3 + }, + { + "c": "554e958767924e9f", + "digit": false, + "i": 2, + "n": 20, + "name": true, + "r": "8cb792749b8c4a26", + "size": 4 + }, + { + "c": "fb3767c825cca1e4", + "digit": false, + "i": 3, + "n": 12, + "name": true, + "r": "f8736267c1e29056", + "size": 2 + }, + { + "c": "85136127f9b54bf1", + "digit": false, + "i": 3, + "n": 16, + "name": true, + "r": "9cb6424db9c1775c", + "size": 3 + }, + { + "c": "08d9cd2536340e25", + "digit": false, + "i": 4, + "n": 12, + "name": true, + "r": "3c24468959fd3d49", + "size": 2 + } + ], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "captured_context|exact|": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "structured|exact|": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338" + }, + "structured": "f54030eb9739c951", + "structured_row": true, + "tokens": [ + { + "alpha": true, + "c": "c3f03513b97ac375", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "c3f03513b97ac375" + }, + { + "alpha": true, + "c": "9ee71e296b9f12b0", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 6, + "name": true, + "r": "9ee71e296b9f12b0" + }, + { + "alpha": true, + "c": "474017e2662aec63", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "474017e2662aec63" + }, + { + "alpha": true, + "c": "e2c9d9dd2be64c93", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "dbeb4aa0ff7e457c" + }, + { + "alpha": true, + "c": "e85574407f1c63d2", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 8, + "name": true, + "r": "e85574407f1c63d2" + }, + { + "alpha": true, + "c": "f0d7c32ddfe55ff9", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "291356604e133bf5" + } + ] + }, + "landmarks": [ + { + "distance_px": 52, + "dx_px": 21, + "dy_px": 48, + "ocr_text": "Action", + "relation": "above" + }, + { + "distance_px": 58, + "dx_px": -2, + "dy_px": -58, + "ocr_text": "Open", + "relation": "below" + } + ], + "ocr_text": "View", + "region": [ + 695, + 154, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Open", + "role": "button", + "selector": "#open-p1", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_005.png" + }, + "old_anchor": { + "click_point": [ + 775, + 186 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 30, + "concats": [ + { + "c": "c8f3afe51e54101a", + "digit": false, + "i": 0, + "n": 10, + "name": true, + "r": "c8f3afe51e54101a", + "size": 2 + }, + { + "c": "889b7b67936cc714", + "digit": false, + "i": 0, + "n": 14, + "name": true, + "r": "889b7b67936cc714", + "size": 3 + }, + { + "c": "ec3cdd51930bbe48", + "digit": false, + "i": 0, + "n": 18, + "name": true, + "r": "012c14f98d142b52", + "size": 4 + }, + { + "c": "f568044c153a789d", + "digit": false, + "i": 1, + "n": 10, + "name": true, + "r": "f568044c153a789d", + "size": 2 + }, + { + "c": "39c3c847d0c00e09", + "digit": false, + "i": 1, + "n": 14, + "name": true, + "r": "1df7bb2273b3df1e", + "size": 3 + }, + { + "c": "70fa34d51b5f7d24", + "digit": false, + "i": 1, + "n": 22, + "name": true, + "r": "3f8bfbc445a153ce", + "size": 4 + }, + { + "c": "a489e05dc4e788cd", + "digit": false, + "i": 2, + "n": 8, + "name": true, + "r": "952951299539c02a", + "size": 2 + }, + { + "c": "a17b2d971bc7336e", + "digit": false, + "i": 2, + "n": 16, + "name": true, + "r": "b6031ab669bb21d4", + "size": 3 + }, + { + "c": "554e958767924e9f", + "digit": false, + "i": 2, + "n": 20, + "name": true, + "r": "8cb792749b8c4a26", + "size": 4 + }, + { + "c": "fb3767c825cca1e4", + "digit": false, + "i": 3, + "n": 12, + "name": true, + "r": "f8736267c1e29056", + "size": 2 + }, + { + "c": "85136127f9b54bf1", + "digit": false, + "i": 3, + "n": 16, + "name": true, + "r": "9cb6424db9c1775c", + "size": 3 + }, + { + "c": "08d9cd2536340e25", + "digit": false, + "i": 4, + "n": 12, + "name": true, + "r": "3c24468959fd3d49", + "size": 2 + } + ], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "captured_context|exact|": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "structured|exact|": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338" + }, + "structured": "f54030eb9739c951", + "structured_row": true, + "tokens": [ + { + "alpha": true, + "c": "c3f03513b97ac375", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "c3f03513b97ac375" + }, + { + "alpha": true, + "c": "9ee71e296b9f12b0", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 6, + "name": true, + "r": "9ee71e296b9f12b0" + }, + { + "alpha": true, + "c": "474017e2662aec63", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "474017e2662aec63" + }, + { + "alpha": true, + "c": "e2c9d9dd2be64c93", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "dbeb4aa0ff7e457c" + }, + { + "alpha": true, + "c": "e85574407f1c63d2", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 8, + "name": true, + "r": "e85574407f1c63d2" + }, + { + "alpha": true, + "c": "f0d7c32ddfe55ff9", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "291356604e133bf5" + } + ] + }, + "landmarks": [ + { + "distance_px": 52, + "dx_px": 21, + "dy_px": 48, + "ocr_text": "Action", + "relation": "above" + }, + { + "distance_px": 58, + "dx_px": -2, + "dy_px": -58, + "ocr_text": "Open", + "relation": "below" + } + ], + "ocr_text": "Open", + "region": [ + 695, + 154, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Open", + "role": "button", + "selector": "#open-p1", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_005.png" + }, + "rung_used": "geometry", + "screenshot": "heals/step_005/screen.png", + "step_id": "step_005" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane SampleKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 0.9, + "elapsed_ms": "", + "point": [ + 775, + 186 + ], + "rung": "geometry", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_006_after.png", + "api_fallback": null, + "before_png": "steps/step_006_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'New Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 114, + 159 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_006", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_007_after.png", + "api_fallback": null, + "before_png": "steps/step_007_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Triage'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 85, + 214 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_007", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_008_after.png", + "api_fallback": null, + "before_png": "steps/step_008_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 344, + 350 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_008", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_009_after.png", + "api_fallback": null, + "before_png": "steps/step_009_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type ", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_009", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_010_after.png", + "api_fallback": null, + "before_png": "steps/step_010_before.png", + "delivery_attempted": false, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Step 'step_010' (click 'Save Encounter') is irreversible but only resolved via the 'geometry' rung — needs human confirmation; refusing to act (v0 policy)", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Save Encounter'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": { + "confidence": 0.9, + "elapsed_ms": "", + "point": [ + 134, + 457 + ], + "rung": "geometry", + "structural_handle": null + }, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_010", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "geometry": 1, + "template": 6 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "HALTED_BEFORE_EFFECT", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 775, + 186 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 114, + 159 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 85, + 214 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 344, + 350 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "Golden triage booking three months" + ], + "call": "type_text" + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "call": "cancel_guarded_keyboard" + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_sort.json b/packages/flow/tests/golden_runs/baselines/mockmed_sort.json new file mode 100644 index 0000000000..2c52c1348a --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_sort.json @@ -0,0 +1,734 @@ +{ + "app_state": { + "banner": null, + "enc_item": null, + "hash": "#tasks" + }, + "artifacts": { + "steps/step_000_after.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_000_before.png": "44b3ccdad5dc59cb4b715b3959f091466cb19e189460aab855be90b0830dba9e", + "steps/step_001_after.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_001_before.png": "f917f98c929db9d01b6fccaec9cb75444f22ded9f16ddaac14215e82773d7941", + "steps/step_002_after.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_002_before.png": "3c9e14147c193c97233b4cf6d526812e0885b09567627e1f3e3dfb327299bdf0", + "steps/step_003_after.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_003_before.png": "3d2f31855f80e268f691b848fc0214545270a4d0deb5670c41c6d2b86a6b34f4", + "steps/step_004_after.png": "9788965e422a13712748bc347c39dc97c111ee0f6757f1ca68bab14112bffa58", + "steps/step_004_before.png": "d9afea150060e7bfef36886e195d4f991078ad4a297cf124346b66e34d86d11a", + "steps/step_005_after.png": "9788965e422a13712748bc347c39dc97c111ee0f6757f1ca68bab14112bffa58", + "steps/step_005_before.png": "9788965e422a13712748bc347c39dc97c111ee0f6757f1ca68bab14112bffa58" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [], + "effect_journal": [], + "est_model_cost_usd": 0.0, + "execution_completed": false, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "HALTED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": { + "completed_intents": [ + "click recorded visual target", + "type 'nurse.demo'", + "click recorded visual target", + "type 'mockmed-demo-pass'", + "click 'Sign In'" + ], + "intent": "click 'Open'", + "observed_texts": [ + "MockMed", + "Clinical demo — all data is fake", + "Referral Tasks", + "Patient", + "Reason", + "Priority", + "Action", + "Alex Testcase", + "Cardiology follow-up", + "Medium", + "Open", + "Jane Sample", + "Knee pain referral", + "High", + "Sam Specimen", + "Dermatology consult", + "Low" + ], + "outcome": "halt", + "reason": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Alex TestcaseCardiology follow-upMedium' (coverage 0.00) — refusing to act; run aborted", + "state_id": "step_005" + }, + "heal_count": 0, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": false, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "HALTED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 9 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "fe84784a4fa6d1ffb51e672dd03890517fa2089273e848416e2c1c829092c5d7", + "result_index": 0, + "step_contract_sha256": "6bf682e8ab410f6db36beda60015bbe7818ef5558883b410f7740ffce7835ce0", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "01eca1f4ef4e7fdd9113ef35fb8c0e7da90895c785f5e93eef3d93f258d094bf", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "3d418dafc0decd2b2d7fa006422549e78b3f81e676df6acd0f3f475c41ed5dc0", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "bbd16e8fc0fc2c7310b70f92de6f58c0a7ab16adaa9cc46bfdfa1e9b63e9b34f", + "result_index": 1, + "step_contract_sha256": "26ac0c9d60e78c9b8303f3fe2c312580fd56e59461afb048d40050c0e68272c5", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "d8a865a76a78eb8c1f8c0a932f3cfb7c723715112f9ede5233b348fbf67d0358", + "result_index": 2, + "step_contract_sha256": "b1ac8e5ec1f94709f643ef6e4047dbbabe53d50ef6aee5b2982c89b1f9c33f90", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "25724a3f67da3f2bde2a47543b69af26905a62a4aea96814f038bc62c6089466", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "4581ab5cdf052d6bfbe08c733e0173c54c824297f177a7393233b07abd5f86af", + "result_index": 3, + "step_contract_sha256": "bb2d440a21097bb9e2e5760a665d1d0cbbe8421e54d257bff91719740978e300", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02a7170072e316742505d17220ade035dd366ace896fa809d03a5be2eff626d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "8868781da939c959072ff2bcf7488c30d6b07cadd8a4de97ca6c6791ead5ee8d", + "result_index": 4, + "step_contract_sha256": "fe3a75adf814f46b7f86e46632edb31eb224de9d27e27c73427865b915ddd0cf", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "64880fb29d2abf85340167a0746edfc7fdcf6f9d9259ce6f9a9a18465cb81b3e", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "901f38d1688f6eadc1d2d1edcab6f10ca76f034600448ecb925bdb21aa8a178d", + "result_index": 5, + "step_contract_sha256": "f60d0abbaeb8f1a6035aa61c533157d39f8ae8688a0883bf3adb79b5fcba0b65", + "step_index": 5, + "verdict": "unverifiable", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 11 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 195 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 210, + 264 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 119, + 324 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": false, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": "Identity check failed for step 'step_005' (click 'Open'): a target was found positionally (rung 'template', confidence 1.00) but its surrounding text does not match the recorded target's — expected '', observed 'Alex TestcaseCardiology follow-upMedium' (coverage 0.00) — refusing to act; run aborted", + "exception_handled": false, + "failure_category": "safety_halt", + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": { + "abstain_reason": null, + "coverage": 0.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Alex TestcaseCardiology follow-upMedium", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "mismatch" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": false, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 775, + 186 + ], + "rung": "template", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": true, + "safety_refusal_evidence": { + "code": "identity_conflict", + "detector_input_sha256": "9788965e422a13712748bc347c39dc97c111ee0f6757f1ca68bab14112bffa58", + "stage": "identity_verification" + }, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "template": 3 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": false, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "REJECTED_POLICY", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 210, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 210, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 119, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "call": "cancel_guarded_keyboard" + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/baselines/mockmed_theme.json b/packages/flow/tests/golden_runs/baselines/mockmed_theme.json new file mode 100644 index 0000000000..ed6d9f7615 --- /dev/null +++ b/packages/flow/tests/golden_runs/baselines/mockmed_theme.json @@ -0,0 +1,2755 @@ +{ + "app_state": { + "banner": "Encounter saved — Golden triage booking three months", + "enc_item": "Triage — Golden triage booking three months", + "hash": "#patient/p1" + }, + "artifacts": { + "heals/step_000/heal.json": "45b77855b26f2f148e5539a1b66a37e95f870e7230826aad6c77b93f747f463c", + "heals/step_000/patch.json": "71cd67799906bf7c592709ae3ae7647a5e27b296994947579d8b31ea910badd8", + "heals/step_000/screen.png": "9e43117c8f5dcc3ba3a5e6eb636f9e736b6c31feaee783d080458d35a162c5e4", + "heals/step_000/template.png": "59e7a505c0762bde07517ef08e419406cd83f7024620b863a3924bcad58f4bf4", + "heals/step_002/heal.json": "3320e80c4635b574e11204132d8b5dffaaf7582ae2b5d5965c7f435a1a1bd921", + "heals/step_002/patch.json": "e6809b37b0d857625c24b4bd7e13ec602d2caa85c75468de45763191b78e7725", + "heals/step_002/screen.png": "f3e6efed2eaf69d8e3f7ea4f3f03d6010b6520add327ca0d20cc8fe15b3304c0", + "heals/step_002/template.png": "59e7a505c0762bde07517ef08e419406cd83f7024620b863a3924bcad58f4bf4", + "heals/step_004/heal.json": "c6bc342a06b8347d98125f18162a4aa7f1f1622cd58e1053411c47b490cc5c10", + "heals/step_004/patch.json": "6fd04b3d1545c31ae069240fab0ad3b6d51d98f1785b2bb77b54a253df353ebd", + "heals/step_004/screen.png": "d4b2458d828ecadf3a558090f4d9079b8dffcda558e9a7a709d699802d950195", + "heals/step_004/template.png": "c6e8bd05f344066f595bf57ac4a1523be2b6153cf71d57b2ca27807ca872f0bb", + "heals/step_005/heal.json": "82dc30b32e5cc0554820c9b17bac375b3cbed0332af1b1ccd203b36fd80a8df3", + "heals/step_005/patch.json": "88b554680e2a36a5d93a532c6e3c995be7fedf8857988409502a0512e04e2655", + "heals/step_005/screen.png": "0cf5a5011ed7f8fa456398dc5e2a9ae679813decd68ce9e78ff7dd4f79006269", + "heals/step_005/template.png": "330ed0efd8adf2c753d080188513c917969d8aafbeed14d0da248694d371e1c4", + "heals/step_006/heal.json": "05c56f8e8e6891ab70343cdb3e6293ba8cabd5bbb64939f2708bc37e628320ea", + "heals/step_006/patch.json": "36f0e22ed46b0fd824f77418cc844368b6377a4794c0133111e42117f21fa720", + "heals/step_006/screen.png": "1b9ebdb9d885ba46909fc8fb32fccb362380b5b576e49e1e91bb1224c36a0d01", + "heals/step_006/template.png": "0d18d8e6f13f243c09ce02ef3646a6544c11bd7136e053a305782526a17c4bed", + "heals/step_007/heal.json": "7902740263a482d1075e162fa7bf5c4283d67048323471bc1c8e1f4293e4930f", + "heals/step_007/patch.json": "dc03e9b33f2678d2ca9b1291b5669bc0c0af6fa2818004ad692940063f3aff01", + "heals/step_007/screen.png": "91c38bb1107a145bdd69aa7d16a91d6ccfd0ae591fd6dc05dcf8c4fb1542f97d", + "heals/step_007/template.png": "ce94517fe2c30adc2379a09c8e7fc0569bd06e5eb63bd24cdc401254dc5463da", + "heals/step_008/heal.json": "4aa8271e6da90c717b97face3539093ef59f99d36a467b020143fb0da3c29248", + "heals/step_008/patch.json": "fd9a4e1164b2422356e1a1f2967150712f1f8ee7d0f68725d37b08a06ceb833f", + "heals/step_008/screen.png": "1bc7f89daaad362b59777806d2acc7312e7ed7c969c1ba527925bab6c45358c4", + "heals/step_008/template.png": "13148f2b0f7acf7cf845361f49c4bce75d767eced0aff8f6f833db483bcf9ea8", + "heals/step_010/heal.json": "7c6495e882ee0fc20bd6994295f30a077e389531da9786662d7d4bb328d7bff3", + "heals/step_010/patch.json": "9ad14f25582935468fa2900a75b4808ebbd072bce75454bea90e8d64be94aa48", + "heals/step_010/screen.png": "e1279f4bc5f9d5aed67409a63ea016fed425884ebbbfdd314f0d19503820e6f4", + "heals/step_010/template.png": "588067ceff3b713e39d281edfa82ccbe9ec3bf9e3bd79a0a9e494b61051512cc", + "steps/step_000_after.png": "3bc795168abc8711dbd98e9b00d2f281769a04f17f00fa26bb736e6b98c81f11", + "steps/step_000_before.png": "9e43117c8f5dcc3ba3a5e6eb636f9e736b6c31feaee783d080458d35a162c5e4", + "steps/step_001_after.png": "f3e6efed2eaf69d8e3f7ea4f3f03d6010b6520add327ca0d20cc8fe15b3304c0", + "steps/step_001_before.png": "3bc795168abc8711dbd98e9b00d2f281769a04f17f00fa26bb736e6b98c81f11", + "steps/step_002_after.png": "cce1a9982d9ab4aee39eb450454413232eec5c3231793376e55f1db972ff2665", + "steps/step_002_before.png": "f3e6efed2eaf69d8e3f7ea4f3f03d6010b6520add327ca0d20cc8fe15b3304c0", + "steps/step_003_after.png": "d4b2458d828ecadf3a558090f4d9079b8dffcda558e9a7a709d699802d950195", + "steps/step_003_before.png": "cce1a9982d9ab4aee39eb450454413232eec5c3231793376e55f1db972ff2665", + "steps/step_004_after.png": "0cf5a5011ed7f8fa456398dc5e2a9ae679813decd68ce9e78ff7dd4f79006269", + "steps/step_004_before.png": "d4b2458d828ecadf3a558090f4d9079b8dffcda558e9a7a709d699802d950195", + "steps/step_005_after.png": "1b9ebdb9d885ba46909fc8fb32fccb362380b5b576e49e1e91bb1224c36a0d01", + "steps/step_005_before.png": "0cf5a5011ed7f8fa456398dc5e2a9ae679813decd68ce9e78ff7dd4f79006269", + "steps/step_006_after.png": "91c38bb1107a145bdd69aa7d16a91d6ccfd0ae591fd6dc05dcf8c4fb1542f97d", + "steps/step_006_before.png": "1b9ebdb9d885ba46909fc8fb32fccb362380b5b576e49e1e91bb1224c36a0d01", + "steps/step_007_after.png": "1bc7f89daaad362b59777806d2acc7312e7ed7c969c1ba527925bab6c45358c4", + "steps/step_007_before.png": "91c38bb1107a145bdd69aa7d16a91d6ccfd0ae591fd6dc05dcf8c4fb1542f97d", + "steps/step_008_after.png": "b14d8b9402b81774ed13cc4d0b47956252d2ea54412f2d6405f69d0a5f12057b", + "steps/step_008_before.png": "1bc7f89daaad362b59777806d2acc7312e7ed7c969c1ba527925bab6c45358c4", + "steps/step_009_after.png": "b6ee4c11e302ec2103675add5f693471fd56035e1e55690dc6934da1d82b26f1", + "steps/step_009_before.png": "b14d8b9402b81774ed13cc4d0b47956252d2ea54412f2d6405f69d0a5f12057b", + "steps/step_010_after.png": "0ebcd362b90dcc7373c13b8b570272facdf3dad65666174144f388fcf7613f9e", + "steps/step_010_before.png": "e1279f4bc5f9d5aed67409a63ea016fed425884ebbbfdd314f0d19503820e6f4" + }, + "environment": { + "platform": "linux", + "playwright": "1.61.0" + }, + "report": { + "approved_unverified_effect_step_ids": [], + "attended_program_transition_evidence": [], + "bundle_content_digest": "f84b6fcbbae3daf1bd845728988bb3324d89c13307f7c493a151670bce3cfefc", + "business_decision_evidence": [], + "canceled": false, + "change_ledger": [ + { + "attempt_state": "delivered", + "effects": [], + "intent": "click 'Save Encounter'", + "may_need_undo": true, + "position": 11, + "status": "unknown", + "step_id": "step_010", + "undo_id": null + } + ], + "effect_journal": [ + { + "approved_unverified": false, + "attempt_state": "delivered", + "collateral_reconciliation_actions": 0, + "consequential": true, + "effect_verified": null, + "intended_effect_contract_hashes": [], + "intent": "click 'Save Encounter'", + "observed_at": null, + "observed_effect": "unknown", + "step_id": "step_010", + "verification_performed": false + } + ], + "est_model_cost_usd": 0.0, + "execution_completed": true, + "execution_entry_url": null, + "execution_origin": null, + "execution_outcome": "COMPLETED_UNVERIFIED", + "execution_profile": "demo", + "execution_target_kind": null, + "external_network_calls": "unknown", + "governed_approval_source": null, + "governed_authorization_created_at": null, + "governed_authorization_id": null, + "governed_authorized_effect_contracts": {}, + "governed_minimum_effect_tier": null, + "governed_policy_contract_sha256": null, + "governed_policy_name": null, + "governed_qualification_campaign_id_sha256": null, + "governed_qualification_case_action_paths": {}, + "governed_qualification_case_id_sha256": null, + "governed_qualification_case_input_sha256": null, + "governed_qualification_case_kind": null, + "governed_qualification_fault_driver_contract_sha256": null, + "governed_qualification_fault_driver_id": null, + "governed_qualification_fault_driver_key_id": null, + "governed_qualification_fault_step_id_sha256": null, + "governed_qualification_project_contract_sha256": null, + "governed_qualification_project_id": null, + "governed_qualification_project_revision": null, + "governed_qualification_run_id_sha256": null, + "governed_qualified_effect_requirements": [], + "governed_runtime_inputs_digest": null, + "halt": null, + "heal_count": 8, + "idempotency_key": null, + "idempotent_replay": false, + "identity_applicable_steps": 8, + "identity_armed_steps": 6, + "identity_unarmed": [ + { + "intent": "click recorded visual target", + "reason": "row text outside the target's label is too generic (< 12 squashed chars after volatile-line filtering)", + "step_id": "step_002" + }, + { + "intent": "click 'Sign In'", + "reason": "the only readable row text is the target's own label (mutable evidence, excluded from identity)", + "step_id": "step_004" + } + ], + "loop_iterations": [], + "model_calls": 0, + "observed_application_sha256": null, + "observed_application_version_sha256": null, + "observed_environment_binding_sha256": null, + "observed_environment_digest": null, + "observed_session_sha256": null, + "outcome_envelope": { + "compensation_actions": 0, + "evidence_classes": [ + "identity", + "postcondition" + ], + "execution_completed": true, + "external_network_calls": "unknown", + "model_calls": 0, + "outcome": "COMPLETED_UNVERIFIED", + "passed_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "postcondition_evidence": [ + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "f8082c5793202a5e6ebc90b26dc9f679e5c00844011c108fde87853af6a55894", + "result_index": 0, + "step_contract_sha256": "a01c96ba967c7515c31a97d43483f1ff093386c592b958595997290bb2fa2836", + "step_index": 0, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "06ed14d7420647241e42a4c6770a47db5d2b77a75cf2d832ab824e2ac8bb5ff9", + "result_index": 1, + "step_contract_sha256": "2f0fed77c2a62bd117c85bacffa7b0af1d725d667149b5f01803637014baa212", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "0cdcd15d1a1868e3de5bdd9308274b68412d62c7e0a97c7566f4eacb8b82986b", + "result_index": 1, + "step_contract_sha256": "2f0fed77c2a62bd117c85bacffa7b0af1d725d667149b5f01803637014baa212", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "9744957e3797f1a13b7931d3f40f07ca094732f890841f94eead38b3c716b4d3", + "result_index": 1, + "step_contract_sha256": "2f0fed77c2a62bd117c85bacffa7b0af1d725d667149b5f01803637014baa212", + "step_index": 1, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "5ee97a0fa406897d58f8d5df52e553ab2c550281dec4ab7354fe8fdf2dcc3e8e", + "result_index": 2, + "step_contract_sha256": "bd8480097db84aab25ef1b7b29476b11dbe167fa30d7440f640795f79a1e2a6f", + "step_index": 2, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "b434056235d1b371fe30064e0313696cf24a2ab11b56827e0a004d9534a1bb60", + "result_index": 3, + "step_contract_sha256": "893b4812df70bdcd7d26c08e37379fdd1eb0343e3bc78280e51810e22cffdcfa", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "93d77ed5c45a66a4c133e6147571ac28a3b142513440a590c98ea9c69d806443", + "result_index": 3, + "step_contract_sha256": "893b4812df70bdcd7d26c08e37379fdd1eb0343e3bc78280e51810e22cffdcfa", + "step_index": 3, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "61123bcc921588b704d15687929525ad3331184a6d686d292ac518401697688a", + "result_index": 4, + "step_contract_sha256": "67461912f3bc96a04fda928a2aa38a5977494d3e52d4626321ba8e85761295ab", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "20a7c28ffb99d6afeb8befaf4b1b1c01175562fc2a8f0dec9678dd0f2bfb6d4e", + "result_index": 4, + "step_contract_sha256": "67461912f3bc96a04fda928a2aa38a5977494d3e52d4626321ba8e85761295ab", + "step_index": 4, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "77a9eedf0508d517d86e3355973548c91e9768cee6f38eb1f00eddb7231dfa75", + "result_index": 5, + "step_contract_sha256": "c2ee00220874c064ea77a965e83334d1a613bf71ed370e1db83f13eb0f123506", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "f02b78c1b95737ca4e0e0dec57b66007e0437d0602f6f3f4d29055d7dc84694a", + "result_index": 5, + "step_contract_sha256": "c2ee00220874c064ea77a965e83334d1a613bf71ed370e1db83f13eb0f123506", + "step_index": 5, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "591c7ebf5d2d4795164b5dee5abdd0dc82b584403f068c303464e03c69042d25", + "result_index": 6, + "step_contract_sha256": "7f9025788fe1cb61aaa88e9be9a8cda7addc689c085cf31da585cdbb1e5f0d04", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "27080fe09665d64df219b99af80563f5d478a8287cd6fa98050cb75421b25183", + "result_index": 6, + "step_contract_sha256": "7f9025788fe1cb61aaa88e9be9a8cda7addc689c085cf31da585cdbb1e5f0d04", + "step_index": 6, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "aec2d66833887469de816004f070a02f7b20fa793e331d4f41e36a3225f6c9bf", + "result_index": 7, + "step_contract_sha256": "3d80afc7391c10ca9dd11390ae08e90b4aa20f96fa4ca121de8ad60b35c20366", + "step_index": 7, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "0c96d8266f18a8e2559de924fae49addb579859a35454ee54570eaacfe74ed50", + "result_index": 8, + "step_contract_sha256": "f09755e0b5c4eb6c4d13bb87880986e98e8c5ba1f85cf4b44afc27cd2aceb145", + "step_index": 8, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "type", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "intrinsic_input_readback", + "contract_sha256": "39e75a9b269843e93de9475193f99edd6e76191e0362bd0e64ad28d84001b062", + "result_index": 9, + "step_contract_sha256": "57d9227de0d04165ec599a70e0dd88187fbf114fbb2a1fe24f8cb1871370a51f", + "step_index": 9, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 0, + "contract_kind": "explicit_predicate", + "contract_sha256": "9d1ea5165596f012fbf079d4c189cadfdac35f823d47e34eb9230e167bbaba08", + "result_index": 10, + "step_contract_sha256": "e889002eebb51bd1490367cfdaa95546534cc522f6fbc804fc4d942efc7d1a68", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + { + "action_kind": "click", + "actuation_path": "gui", + "contract_index": 1, + "contract_kind": "explicit_predicate", + "contract_sha256": "b29e5b4a32579cbe1d72243706b1bd7e1cd0d19b7e8e46b941fdf7d388643c0e", + "result_index": 10, + "step_contract_sha256": "e889002eebb51bd1490367cfdaa95546534cc522f6fbc804fc4d942efc7d1a68", + "step_index": 10, + "verdict": "passed", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + } + ], + "production_eligible": false, + "profile": "demo", + "required_contracts": { + "authorization": 0, + "effect": 0, + "identity": 0, + "postcondition": 18 + }, + "version": "openadapt.execution-outcome/v1", + "workflow_contract_sha256": "c0bafb81f3a05d259954e24b1cae5a1fcf53bd4da65e9c07b4424e879d66a05f" + }, + "parameter_schema_sha256": "b9706e023d1b70651493a1b2b68bb1939f7173f74b5e574d4f9fa57acc89fc6d", + "params": { + "note": "Golden triage booking three months" + }, + "production_eligible": false, + "program_exception_evidence": [], + "program_transition_evidence": [], + "qualification_environment_observer_contract_sha256": null, + "qualification_environment_observer_id": null, + "qualification_evidence_only": false, + "qualification_fault_mutations": [], + "readback": null, + "recorded_surface": null, + "render_scale": null, + "required_identity_step_ids": [], + "results": [ + { + "actuation": null, + "after_png": "steps/step_000_after.png", + "api_fallback": null, + "before_png": "steps/step_000_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 214, + 195 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd" + }, + "structured": "9eec048367ca69ba", + "structured_row": false, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 130, + "dx_px": 76, + "dy_px": 106, + "ocr_text": "Sign in to MockMed", + "relation": "above" + }, + { + "distance_px": 132, + "dx_px": 129, + "dy_px": 29, + "ocr_text": "Username", + "relation": "left_of" + } + ], + "ocr_text": null, + "region": [ + 134, + 163, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Username", + "role": "textbox", + "selector": "#username", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_000.png" + }, + "old_anchor": { + "click_point": [ + 214, + 195 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,casefold": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "9eec048367ca69baffeb217515e46fb88057f0f81ff3c12480fbae4c07f124a9", + "structured|normalized|unicode_nfkc,collapse_whitespace": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd", + "structured|normalized|unicode_nfkc,strip_punctuation": "478dde8278038b459d4f8e1e8dd55feea2866009e052c41fe0da626b19d472fd" + }, + "structured": "9eec048367ca69ba", + "structured_row": false, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 130, + "dx_px": 76, + "dy_px": 106, + "ocr_text": "Sign in to MockMed", + "relation": "above" + }, + { + "distance_px": 132, + "dx_px": 129, + "dy_px": 29, + "ocr_text": "Username", + "relation": "left_of" + } + ], + "ocr_text": null, + "region": [ + 134, + 163, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Username", + "role": "textbox", + "selector": "#username", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_000.png" + }, + "rung_used": "geometry", + "screenshot": "heals/step_000/screen.png", + "step_id": "step_000" + }, + "identity": { + "abstain_reason": null, + "census_status": "not_a_row", + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Username Password Sign In", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 0.9, + "elapsed_ms": "", + "point": [ + 214, + 195 + ], + "rung": "geometry", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_000", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_001_after.png", + "api_fallback": null, + "before_png": "steps/step_001_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'nurse.demo'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_001", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_002_after.png", + "api_fallback": null, + "before_png": "steps/step_002_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 214, + 264 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": null, + "landmarks": [ + { + "distance_px": 112, + "dx_px": 94, + "dy_px": -60, + "ocr_text": "Sign In", + "relation": "left_of" + }, + { + "distance_px": 132, + "dx_px": 129, + "dy_px": 30, + "ocr_text": "Password", + "relation": "left_of" + } + ], + "ocr_text": null, + "region": [ + 134, + 232, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Password", + "role": "textbox", + "selector": "#password", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_002.png" + }, + "old_anchor": { + "click_point": [ + 214, + 264 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": null, + "landmarks": [ + { + "distance_px": 112, + "dx_px": 94, + "dy_px": -60, + "ocr_text": "Sign In", + "relation": "left_of" + }, + { + "distance_px": 132, + "dx_px": 129, + "dy_px": 30, + "ocr_text": "Password", + "relation": "left_of" + } + ], + "ocr_text": null, + "region": [ + 134, + 232, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Password", + "role": "textbox", + "selector": "#password", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_002.png" + }, + "rung_used": "geometry", + "screenshot": "heals/step_002/screen.png", + "step_id": "step_002" + }, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 0.9, + "elapsed_ms": "", + "point": [ + 214, + 264 + ], + "rung": "geometry", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_002", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_003_after.png", + "api_fallback": null, + "before_png": "steps/step_003_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type 'mockmed-demo-pass'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_003", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_004_after.png", + "api_fallback": null, + "before_png": "steps/step_004_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 120, + 324 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": null, + "landmarks": [ + { + "distance_px": 95, + "dx_px": 34, + "dy_px": 89, + "ocr_text": "Password", + "relation": "above" + }, + { + "distance_px": 130, + "dx_px": 19, + "dy_px": 129, + "ocr_text": "nurse.demo", + "relation": "above" + } + ], + "ocr_text": "Sign In", + "region": [ + 40, + 292, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Sign In", + "role": "button", + "selector": "#signin", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_004.png" + }, + "old_anchor": { + "click_point": [ + 119, + 324 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": null, + "landmarks": [ + { + "distance_px": 95, + "dx_px": 34, + "dy_px": 89, + "ocr_text": "Password", + "relation": "above" + }, + { + "distance_px": 130, + "dx_px": 19, + "dy_px": 129, + "ocr_text": "nurse.demo", + "relation": "above" + } + ], + "ocr_text": "Sign In", + "region": [ + 39, + 292, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Sign In", + "role": "button", + "selector": "#signin", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_004.png" + }, + "rung_used": "ocr", + "screenshot": "heals/step_004/screen.png", + "step_id": "step_004" + }, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Sign In'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 120, + 324 + ], + "rung": "ocr", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_004", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_005_after.png", + "api_fallback": null, + "before_png": "steps/step_005_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 777, + 186 + ], + "context_text": "Jane Sample Knee pain referral High", + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 30, + "concats": [ + { + "c": "c8f3afe51e54101a", + "digit": false, + "i": 0, + "n": 10, + "name": true, + "r": "c8f3afe51e54101a", + "size": 2 + }, + { + "c": "889b7b67936cc714", + "digit": false, + "i": 0, + "n": 14, + "name": true, + "r": "889b7b67936cc714", + "size": 3 + }, + { + "c": "ec3cdd51930bbe48", + "digit": false, + "i": 0, + "n": 18, + "name": true, + "r": "012c14f98d142b52", + "size": 4 + }, + { + "c": "f568044c153a789d", + "digit": false, + "i": 1, + "n": 10, + "name": true, + "r": "f568044c153a789d", + "size": 2 + }, + { + "c": "39c3c847d0c00e09", + "digit": false, + "i": 1, + "n": 14, + "name": true, + "r": "1df7bb2273b3df1e", + "size": 3 + }, + { + "c": "70fa34d51b5f7d24", + "digit": false, + "i": 1, + "n": 22, + "name": true, + "r": "3f8bfbc445a153ce", + "size": 4 + }, + { + "c": "a489e05dc4e788cd", + "digit": false, + "i": 2, + "n": 8, + "name": true, + "r": "952951299539c02a", + "size": 2 + }, + { + "c": "a17b2d971bc7336e", + "digit": false, + "i": 2, + "n": 16, + "name": true, + "r": "b6031ab669bb21d4", + "size": 3 + }, + { + "c": "554e958767924e9f", + "digit": false, + "i": 2, + "n": 20, + "name": true, + "r": "8cb792749b8c4a26", + "size": 4 + }, + { + "c": "fb3767c825cca1e4", + "digit": false, + "i": 3, + "n": 12, + "name": true, + "r": "f8736267c1e29056", + "size": 2 + }, + { + "c": "85136127f9b54bf1", + "digit": false, + "i": 3, + "n": 16, + "name": true, + "r": "9cb6424db9c1775c", + "size": 3 + }, + { + "c": "08d9cd2536340e25", + "digit": false, + "i": 4, + "n": 12, + "name": true, + "r": "3c24468959fd3d49", + "size": 2 + } + ], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "captured_context|exact|": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "structured|exact|": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338" + }, + "structured": "f54030eb9739c951", + "structured_row": true, + "tokens": [ + { + "alpha": true, + "c": "c3f03513b97ac375", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "c3f03513b97ac375" + }, + { + "alpha": true, + "c": "9ee71e296b9f12b0", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 6, + "name": true, + "r": "9ee71e296b9f12b0" + }, + { + "alpha": true, + "c": "474017e2662aec63", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "474017e2662aec63" + }, + { + "alpha": true, + "c": "e2c9d9dd2be64c93", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "dbeb4aa0ff7e457c" + }, + { + "alpha": true, + "c": "e85574407f1c63d2", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 8, + "name": true, + "r": "e85574407f1c63d2" + }, + { + "alpha": true, + "c": "f0d7c32ddfe55ff9", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "291356604e133bf5" + } + ] + }, + "landmarks": [ + { + "distance_px": 52, + "dx_px": 21, + "dy_px": 48, + "ocr_text": "Action", + "relation": "above" + }, + { + "distance_px": 58, + "dx_px": -2, + "dy_px": -58, + "ocr_text": "Open", + "relation": "below" + } + ], + "ocr_text": "Open", + "region": [ + 697, + 154, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Open", + "role": "button", + "selector": "#open-p1", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_005.png" + }, + "old_anchor": { + "click_point": [ + 775, + 186 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 30, + "concats": [ + { + "c": "c8f3afe51e54101a", + "digit": false, + "i": 0, + "n": 10, + "name": true, + "r": "c8f3afe51e54101a", + "size": 2 + }, + { + "c": "889b7b67936cc714", + "digit": false, + "i": 0, + "n": 14, + "name": true, + "r": "889b7b67936cc714", + "size": 3 + }, + { + "c": "ec3cdd51930bbe48", + "digit": false, + "i": 0, + "n": 18, + "name": true, + "r": "012c14f98d142b52", + "size": 4 + }, + { + "c": "f568044c153a789d", + "digit": false, + "i": 1, + "n": 10, + "name": true, + "r": "f568044c153a789d", + "size": 2 + }, + { + "c": "39c3c847d0c00e09", + "digit": false, + "i": 1, + "n": 14, + "name": true, + "r": "1df7bb2273b3df1e", + "size": 3 + }, + { + "c": "70fa34d51b5f7d24", + "digit": false, + "i": 1, + "n": 22, + "name": true, + "r": "3f8bfbc445a153ce", + "size": 4 + }, + { + "c": "a489e05dc4e788cd", + "digit": false, + "i": 2, + "n": 8, + "name": true, + "r": "952951299539c02a", + "size": 2 + }, + { + "c": "a17b2d971bc7336e", + "digit": false, + "i": 2, + "n": 16, + "name": true, + "r": "b6031ab669bb21d4", + "size": 3 + }, + { + "c": "554e958767924e9f", + "digit": false, + "i": 2, + "n": 20, + "name": true, + "r": "8cb792749b8c4a26", + "size": 4 + }, + { + "c": "fb3767c825cca1e4", + "digit": false, + "i": 3, + "n": 12, + "name": true, + "r": "f8736267c1e29056", + "size": 2 + }, + { + "c": "85136127f9b54bf1", + "digit": false, + "i": 3, + "n": 16, + "name": true, + "r": "9cb6424db9c1775c", + "size": 3 + }, + { + "c": "08d9cd2536340e25", + "digit": false, + "i": 4, + "n": 12, + "name": true, + "r": "3c24468959fd3d49", + "size": 2 + } + ], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "captured_context|exact|": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,casefold": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,casefold,strip_punctuation": "05a02917cd8e13ffe911f9158935250d6b60c03075af384ac806817eefe99fa0", + "captured_context|normalized|unicode_nfkc,collapse_whitespace": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "captured_context|normalized|unicode_nfkc,strip_punctuation": "9fd083f46bf21da787072325bc4c4f55d41c35af66b3a8bfe5362801f5b79b4c", + "structured|exact|": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,casefold": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f54030eb9739c9513a637823369916e41bf4968e9ed046f34275bd91d40d530f", + "structured|normalized|unicode_nfkc,collapse_whitespace": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338", + "structured|normalized|unicode_nfkc,strip_punctuation": "8d821561269d698e53786efe5136f65e976aa53e3a7d592e12b29615dfb99338" + }, + "structured": "f54030eb9739c951", + "structured_row": true, + "tokens": [ + { + "alpha": true, + "c": "c3f03513b97ac375", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "c3f03513b97ac375" + }, + { + "alpha": true, + "c": "9ee71e296b9f12b0", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 6, + "name": true, + "r": "9ee71e296b9f12b0" + }, + { + "alpha": true, + "c": "474017e2662aec63", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "474017e2662aec63" + }, + { + "alpha": true, + "c": "e2c9d9dd2be64c93", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "dbeb4aa0ff7e457c" + }, + { + "alpha": true, + "c": "e85574407f1c63d2", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 8, + "name": true, + "r": "e85574407f1c63d2" + }, + { + "alpha": true, + "c": "f0d7c32ddfe55ff9", + "digit": false, + "gen": false, + "glyph": false, + "idsh": false, + "n": 4, + "name": true, + "r": "291356604e133bf5" + } + ] + }, + "landmarks": [ + { + "distance_px": 52, + "dx_px": 21, + "dy_px": 48, + "ocr_text": "Action", + "relation": "above" + }, + { + "distance_px": 58, + "dx_px": -2, + "dy_px": -58, + "ocr_text": "Open", + "relation": "below" + } + ], + "ocr_text": "Open", + "region": [ + 695, + 154, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Open", + "role": "button", + "selector": "#open-p1", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_005.png" + }, + "rung_used": "ocr", + "screenshot": "heals/step_005/screen.png", + "step_id": "step_005" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane SampleKnee pain referralHigh", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Open'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 777, + 186 + ], + "rung": "ocr", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_005", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_006_after.png", + "api_fallback": null, + "before_png": "steps/step_006_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 113, + 159 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 62, + "dx_px": 34, + "dy_px": -52, + "ocr_text": "Encounters", + "relation": "below" + }, + { + "distance_px": 85, + "dx_px": 24, + "dy_px": -82, + "ocr_text": "No encounters yet.", + "relation": "below" + } + ], + "ocr_text": "New Encounter", + "region": [ + 33, + 127, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "New Encounter", + "role": "button", + "selector": "#new-encounter", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_006.png" + }, + "old_anchor": { + "click_point": [ + 114, + 159 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 62, + "dx_px": 34, + "dy_px": -52, + "ocr_text": "Encounters", + "relation": "below" + }, + { + "distance_px": 85, + "dx_px": 24, + "dy_px": -82, + "ocr_text": "No encounters yet.", + "relation": "below" + } + ], + "ocr_text": "New Encounter", + "region": [ + 34, + 127, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "New Encounter", + "role": "button", + "selector": "#new-encounter", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_006.png" + }, + "rung_used": "ocr", + "screenshot": "heals/step_006/screen.png", + "step_id": "step_006" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'New Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 113, + 159 + ], + "rung": "ocr", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_006", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_007_after.png", + "api_fallback": null, + "before_png": "steps/step_007_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 85, + 214 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 71, + "dx_px": 44, + "dy_px": -56, + "ocr_text": "Note", + "relation": "below" + }, + { + "distance_px": 76, + "dx_px": -27, + "dy_px": 71, + "ocr_text": "New Encounter", + "relation": "above" + } + ], + "ocr_text": "Triage", + "region": [ + 5, + 182, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Triage", + "role": "button", + "selector": "#type-triage", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_007.png" + }, + "old_anchor": { + "click_point": [ + 85, + 214 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 71, + "dx_px": 44, + "dy_px": -56, + "ocr_text": "Note", + "relation": "below" + }, + { + "distance_px": 76, + "dx_px": -27, + "dy_px": 71, + "ocr_text": "New Encounter", + "relation": "above" + } + ], + "ocr_text": "Triage", + "region": [ + 5, + 182, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Triage", + "role": "button", + "selector": "#type-triage", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_007.png" + }, + "rung_used": "ocr", + "screenshot": "heals/step_007/screen.png", + "step_id": "step_007" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Triage'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 85, + 214 + ], + "rung": "ocr", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_007", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_008_after.png", + "api_fallback": null, + "before_png": "steps/step_008_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 344, + 350 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 194, + "dx_px": 138, + "dy_px": 137, + "ocr_text": "Consult", + "relation": "left_of" + }, + { + "distance_px": 286, + "dx_px": 135, + "dy_px": 252, + "ocr_text": "Jane Sample — MRN P1 — DOB 1980-01-01", + "relation": "above" + } + ], + "ocr_text": null, + "region": [ + 104, + 254, + 480, + 192 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Note", + "role": "textbox", + "selector": "#note", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_008.png" + }, + "old_anchor": { + "click_point": [ + 344, + 350 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 194, + "dx_px": 138, + "dy_px": 137, + "ocr_text": "Consult", + "relation": "left_of" + }, + { + "distance_px": 286, + "dx_px": 135, + "dy_px": 252, + "ocr_text": "Jane Sample — MRN P1 — DOB 1980-01-01", + "relation": "above" + } + ], + "ocr_text": null, + "region": [ + 104, + 254, + 480, + 192 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Note", + "role": "textbox", + "selector": "#note", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_008.png" + }, + "rung_used": "geometry", + "screenshot": "heals/step_008/screen.png", + "step_id": "step_008" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click recorded visual target", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 0.881, + "elapsed_ms": "", + "point": [ + 344, + 350 + ], + "rung": "geometry", + "structural_handle": null + }, + "risk": "reversible", + "risk_explanation": "control label has no retained consequential-write signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_008", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": null, + "after_png": "steps/step_009_after.png", + "api_fallback": null, + "before_png": "steps/step_009_before.png", + "delivery_attempted": true, + "delivery_receipt": null, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": null, + "identity": null, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": true, + "intent": "type ", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": null, + "program_scope": [], + "resolution": null, + "risk": "reversible", + "risk_explanation": "action has no retained consequential commit signal", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_009", + "submit_binding_verified": null, + "timings": "" + }, + { + "actuation": "guarded_coordinate", + "after_png": "steps/step_010_after.png", + "api_fallback": null, + "before_png": "steps/step_010_before.png", + "delivery_attempted": true, + "delivery_receipt": { + "delivered_at": "", + "native": false, + "operation": "guarded_coordinate_click", + "outcome_verified": false, + "receipt_id": "", + "status": "delivered", + "target_fingerprint": "" + }, + "delivery_uncertainty": null, + "drag_end_resolution": null, + "drift_oracle_calls": 0, + "effect_approved_unverified": false, + "effect_contract_hashes": [], + "effect_evidence": [], + "effect_results": [], + "effect_verified": null, + "elapsed_ms": "", + "error": null, + "exception_handled": false, + "failure_category": null, + "field_read": null, + "fresh_actuation_events": [], + "heal": { + "applied": true, + "kind": "anchor_refresh", + "new_anchor": { + "click_point": [ + 134, + 457 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 210, + "dx_px": 94, + "dy_px": 188, + "ocr_text": "Note", + "relation": "above" + }, + { + "distance_px": 254, + "dx_px": -72, + "dy_px": 244, + "ocr_text": "Consult", + "relation": "above" + } + ], + "ocr_text": "Save Encounter", + "region": [ + 54, + 425, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Save Encounter", + "role": "button", + "selector": "#save-encounter", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_010.png" + }, + "old_anchor": { + "click_point": [ + 134, + 457 + ], + "context_text": null, + "form_identity": null, + "identifier_crop": null, + "identifier_region": null, + "identity_template": { + "band_len": 0, + "concats": [], + "param_token_indices": {}, + "rests_on_confusable_identifier": false, + "salt": "9588ca8dd8f70661010db0bc535ec9bf", + "schema_version": 1, + "signal_hashes": { + "structured|exact|": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,casefold": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace": "503fb2093ed582b9b541f011a9a4a385869a623f3abb1a9a48cc74dfa3228627", + "structured|normalized|unicode_nfkc,casefold,collapse_whitespace,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,casefold,strip_punctuation": "f0fd40595afc38e7633e42e23ca5d6b4f062fdbfecea41942112656a350e68eb", + "structured|normalized|unicode_nfkc,collapse_whitespace": "f189545cc4d03ef9477287fe81be842ac1cdf27732e907d82e62f792457f7f50", + "structured|normalized|unicode_nfkc,collapse_whitespace,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3", + "structured|normalized|unicode_nfkc,strip_punctuation": "a08db70cad85ce9f925fa222da36213dbd747b8a7ed691c967ceabab72c9cba3" + }, + "structured": "503fb2093ed582b9", + "structured_row": true, + "tokens": [] + }, + "landmarks": [ + { + "distance_px": 210, + "dx_px": 94, + "dy_px": 188, + "ocr_text": "Note", + "relation": "above" + }, + { + "distance_px": 254, + "dx_px": -72, + "dy_px": 244, + "ocr_text": "Consult", + "relation": "above" + } + ], + "ocr_text": "Save Encounter", + "region": [ + 54, + 425, + 160, + 64 + ], + "search_pad": 80, + "structural": { + "automation_id": null, + "frame_path": null, + "name": "Save Encounter", + "role": "button", + "selector": "#save-encounter", + "window_name": null + }, + "structured_identity": null, + "template": "templates/step_010.png" + }, + "rung_used": "ocr", + "screenshot": "heals/step_010/screen.png", + "step_id": "step_010" + }, + "identity": { + "abstain_reason": null, + "candidate_count": 1, + "coverage": 1.0, + "expected": "", + "hover": null, + "known_id_evidence": null, + "known_id_halt": null, + "look_halt": null, + "looks": [], + "mode": "structured", + "observed": "Jane Sample — MRN P1 — DOB 1980-01-01", + "param": null, + "pixel_evidence": null, + "quorum_required": null, + "quorum_verified": null, + "signal_evidence": [], + "status": "verified" + }, + "identity_first_frame_png": null, + "identity_first_read": null, + "identity_reobserved": false, + "input_retried": false, + "input_verified": null, + "intent": "click 'Save Encounter'", + "interstitial_actions": [], + "ok": true, + "postcondition_drift_rescues": [], + "postcondition_page_scale": null, + "postconditions_ok": true, + "program_scope": [], + "resolution": { + "confidence": 1.0, + "elapsed_ms": "", + "point": [ + 134, + 457 + ], + "rung": "ocr", + "structural_handle": null + }, + "risk": "irreversible", + "risk_explanation": "retained action context names a consequential state change", + "risk_review_required": false, + "safety_halt": false, + "safety_refusal_evidence": null, + "skipped": false, + "starting_state_settled": null, + "step_id": "step_010", + "submit_binding_verified": null, + "timings": "" + } + ], + "run_id_sha256": "", + "rung_counts": { + "geometry": 3, + "ocr": 5 + }, + "screenshots_may_leave_box": false, + "source_recording_sha256": null, + "started_at": "", + "success": true, + "surface_override": false, + "terminal_outcome": null, + "total_ms": "", + "transaction_billable": false, + "transaction_outcome": "COMPLETED_UNVERIFIED", + "transaction_platform_fault": false, + "visited_states": [], + "workflow_contract_sha256": "4e2641e241b18190da19e426f9e5890d6f8dcca4e49ce544d924f2b521f4e681", + "workflow_name": "golden-triage" + }, + "trace": [ + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + }, + { + "args": [ + 214, + 195 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "nurse.demo" + ], + "call": "type_text" + }, + { + "args": [ + 214, + 264 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "mockmed-demo-pass" + ], + "call": "type_text" + }, + { + "args": [ + 120, + 324 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 777, + 186 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 113, + 159 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 85, + 214 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + 344, + 350 + ], + "call": "click", + "kwargs": { + "double": false + } + }, + { + "args": [ + "Golden triage booking three months" + ], + "call": "type_text" + }, + { + "call": "cancel_pending_structural_guards" + }, + { + "args": [ + 134, + 457 + ], + "call": "arm_guarded_coordinate" + }, + { + "call": "cancel_guarded_coordinate" + }, + { + "args": [ + 134, + 457 + ], + "call": "act_guarded_coordinate", + "kwargs": { + "double": false, + "expected_frame_sha256": "e1279f4bc5f9d5aed67409a63ea016fed425884ebbbfdd314f0d19503820e6f4" + } + }, + { + "args": [ + null + ], + "call": "set_qualification_input_guard" + } + ] +} diff --git a/packages/flow/tests/golden_runs/harness.py b/packages/flow/tests/golden_runs/harness.py new file mode 100644 index 0000000000..520d9bc1b4 --- /dev/null +++ b/packages/flow/tests/golden_runs/harness.py @@ -0,0 +1,308 @@ +"""Golden runs: prove a refactor leaves what a run does and writes unchanged. + +A golden run executes a workflow with the real ``Replayer`` against a real +backend and a local fixture app, then keeps three things: + +* the run report, with values that change on every run (times, durations, + run ids, temporary paths) replaced by placeholders; +* the SHA-256 of every file the run wrote, except files whose bytes embed + those values (the report itself, which is compared normalized instead); +* the backend action trace: every call that delivers input or changes the + app's state (click, type, press, scroll, drag, hover, guard arming and + cancelling, dialogs), in order, with its arguments summarized. Observations + such as screenshots are left out, because settle loops poll a number of + times that depends on timing. + +The baselines are generated in CI on Linux, where the browser build is +pinned, and committed. A behavior-preserving change must reproduce them +exactly. See docs/design/DECOMPOSITION.md, section 3.1. +""" + +from __future__ import annotations + +import hashlib +import inspect +import json +import os +import re +import sys +from dataclasses import dataclass, field +from enum import Enum +from pathlib import Path +from typing import Any, Callable + +BASELINES = Path(__file__).parent / "baselines" +WRITE_ENV = "OPENADAPT_GOLDEN_WRITE" +OUT_ENV = "OPENADAPT_GOLDEN_OUT" + +# Report keys whose values differ between two identical runs: wall-clock +# times, durations, run ids and what is derived from them, and the digest of +# the observed environment (it covers the fixture server's ephemeral port). +# Everything else, digests of the committed bundle included, is compared. +VOLATILE_KEYS = re.compile( + r"(_at|_ms|^timings|^run_id|_run_id|^run_id_sha256|^idempotency_key|" + r"^observed_environment_digest|^started|^elapsed)$" +) +# Random per-run tokens that other fields refer to (see Normalizer). +NONCE_KEYS = re.compile(r"(fingerprint|^receipt_id|_token)$") +_FLOAT_DIGITS = 3 + +# Backend methods that act on the app. Everything else only observes it. +ACTION_METHODS = re.compile( + r"^(click|right_click|hover|scroll|press|press_guarded|type_text|" + r"type_text_guarded|drag|drag_guarded|drag_structural_guarded|" + r"act_guarded_coordinate|act_structural|arm_[a-z_]+|cancel_[a-z_]+|" + r"take_dialogs|expect_page_close|set_qualification_input_guard|" + r"select_option[a-z_]*|navigate|goto)$" +) + + +def tracing_backend(inner: Any, trace: list[dict[str, Any]]) -> Any: + """The same backend, recording every action call into ``trace``. + + The result is an instance of a subclass of the backend's own class that + shares the original's instance state, so every capability check gives the + same answer: the backend protocols are ``runtime_checkable``, and on + Python 3.12 ``isinstance`` looks their members up statically on the + class, which a ``__getattr__`` proxy would fail. Calls the backend makes + on itself are recorded too. + """ + base = type(inner) + namespace: dict[str, Any] = {} + for name in dir(base): + if not ACTION_METHODS.match(name): + continue + static = inspect.getattr_static(base, name) + if isinstance(static, (staticmethod, classmethod, property)) or not callable( + static + ): + continue + namespace[name] = _traced_method(name, getattr(base, name), trace) + cls = type(f"Tracing{base.__name__}", (base,), namespace) + traced = object.__new__(cls) + traced.__dict__ = inner.__dict__ # shared state, not a copy + return traced + + +def _traced_method( + name: str, function: Callable[..., Any], trace: list[dict[str, Any]] +) -> Callable[..., Any]: + def method(self: Any, *args: Any, **kwargs: Any) -> Any: + entry: dict[str, Any] = {"call": name} + if args: + entry["args"] = [summarize(a) for a in args] + if kwargs: + entry["kwargs"] = {k: summarize(v) for k, v in sorted(kwargs.items())} + trace.append(entry) + try: + result = function(self, *args, **kwargs) + except BaseException as exc: + entry["raised"] = type(exc).__name__ + raise + if isinstance(result, (bytes, bytearray)): + entry["returned"] = summarize(result) + return result + + method.__name__ = name + return method + + +def summarize(value: Any) -> Any: + """A stable, JSON-friendly summary of a call argument.""" + if isinstance(value, (bytes, bytearray)): + return {"sha256": hashlib.sha256(value).hexdigest()[:16], "len": len(value)} + if isinstance(value, float): + return round(value, _FLOAT_DIGITS) + if isinstance(value, (str, int, bool)) or value is None: + return value + if isinstance(value, Enum): + return f"{type(value).__name__}.{value.name}" + if isinstance(value, (list, tuple)): + return [summarize(v) for v in value] + if isinstance(value, dict): + return {str(k): summarize(v) for k, v in sorted(value.items(), key=str)} + if hasattr(value, "model_dump"): + return { + "type": type(value).__name__, + **summarize(value.model_dump(mode="json")), + } + if hasattr(value, "__dataclass_fields__"): + fields = {n: getattr(value, n) for n in value.__dataclass_fields__} + return {"type": type(value).__name__, **summarize(fields)} + return {"type": type(value).__name__} + + +class Normalizer: + """Replaces values that change between identical runs with placeholders. + + Times, durations and run ids become ````. Random guard tokens and + receipt ids (``NONCE_KEYS``) become ````, numbered by first + appearance and replaced wherever the same value appears again, so the + baseline still shows that the handle a step resolved is the handle it + acted on. Use one instance for everything one run produced. + """ + + def __init__(self, roots: list[str]) -> None: + self.roots = [r for r in roots if r] + self.nonces: dict[str, str] = {} + + def collect(self, value: Any, key: str = "") -> None: + """Number every nonce value before normalizing, in document order.""" + if isinstance(value, dict): + for k, v in value.items(): + self.collect(v, k) + elif isinstance(value, list): + for v in value: + self.collect(v, key) + elif isinstance(value, str) and key and NONCE_KEYS.search(key.lower()): + if value not in self.nonces: + count = sum(1 for p in self.nonces.values() if p.startswith(f"<{key}#")) + self.nonces[value] = f"<{key}#{count + 1}>" + + def __call__(self, value: Any, key: str = "") -> Any: + if key and VOLATILE_KEYS.search(key.lower()) and value is not None: + return f"<{key}>" + if isinstance(value, dict): + return {k: self(v, k) for k, v in value.items()} + if isinstance(value, list): + return [self(v, key) for v in value] + if isinstance(value, float): + return round(value, _FLOAT_DIGITS) + if isinstance(value, str): + if value in self.nonces: + return self.nonces[value] + for i, root in enumerate(self.roots): + value = value.replace(root, f"") + return value + return value + + +def normalize(value: Any, *, roots: list[str]) -> Any: + """Normalize one value on its own (see :class:`Normalizer`).""" + normalizer = Normalizer(roots) + normalizer.collect(value) + return normalizer(value) + + +def artifact_hashes(run_dir: Path, *, skip: set[str]) -> dict[str, str]: + """SHA-256 of every file a run wrote, keyed by its path in the run dir.""" + hashes = {} + for path in sorted(p for p in run_dir.rglob("*") if p.is_file()): + rel = path.relative_to(run_dir).as_posix() + if rel in skip: + continue + hashes[rel] = hashlib.sha256(path.read_bytes()).hexdigest() + return hashes + + +@dataclass +class GoldenResult: + """What a scenario produced, ready to compare with its baseline.""" + + report: dict[str, Any] + artifacts: dict[str, str] + trace: list[dict[str, Any]] + environment: dict[str, str] = field(default_factory=dict) + # Ground truth read from the live app after the run: tells a safe halt + # from a wrong action the report did not notice. + app_state: dict[str, Any] = field(default_factory=dict) + + def as_json(self) -> dict[str, Any]: + return { + "environment": self.environment, + "app_state": self.app_state, + "report": self.report, + "artifacts": self.artifacts, + "trace": self.trace, + } + + +def environment() -> dict[str, str]: + """What the baseline depends on outside the code under test.""" + import importlib.metadata as metadata + + env = {"platform": sys.platform} + try: + env["playwright"] = metadata.version("playwright") + except metadata.PackageNotFoundError: + env["playwright"] = "absent" + return env + + +def check_or_write(name: str, produce: Callable[[], GoldenResult]) -> None: + """Compare a scenario with its baseline, or write the baseline. + + In write mode the scenario runs twice and the two results must be equal, + so a value that changes between identical runs is found before it is + committed. The actual result is also written to ``$OPENADAPT_GOLDEN_OUT`` + when set, so CI can upload it. + """ + import pytest + + baseline_path = BASELINES / f"{name}.json" + writing = os.environ.get(WRITE_ENV) == "1" + if not writing: + if not baseline_path.is_file(): + pytest.skip(f"no baseline for {name}; generate it in CI ({WRITE_ENV}=1)") + expected = json.loads(baseline_path.read_text(encoding="utf-8")) + if expected["environment"].get("platform") != sys.platform: + pytest.skip( + f"baseline recorded on {expected['environment'].get('platform')}; " + "screens render differently on other platforms" + ) + + first = produce() + actual = first.as_json() + _write_out(name, actual) + + if writing: + second = produce().as_json() + assert _canonical(second) == _canonical(actual), ( + f"{name}: two identical runs differ; normalize the changing value " + "before writing a baseline:\n" + _first_difference(actual, second) + ) + BASELINES.mkdir(parents=True, exist_ok=True) + baseline_path.write_text(_canonical(actual), encoding="utf-8") + return + + if expected["environment"] != actual["environment"]: + raise AssertionError( + f"{name}: baseline environment {expected['environment']} differs from " + f"{actual['environment']}; regenerate the baselines in CI " + f"({WRITE_ENV}=1) in a change of its own." + ) + assert _canonical(actual) == _canonical(expected), ( + f"{name}: the run differs from its golden baseline:\n" + + _first_difference(expected, actual) + ) + + +def _canonical(value: Any) -> str: + return json.dumps(value, indent=1, sort_keys=True, ensure_ascii=False) + "\n" + + +def _write_out(name: str, actual: dict[str, Any]) -> None: + out = os.environ.get(OUT_ENV) + if out: + Path(out).mkdir(parents=True, exist_ok=True) + (Path(out) / f"{name}.json").write_text(_canonical(actual), encoding="utf-8") + + +def _first_difference(expected: Any, actual: Any, path: str = "$") -> str: + if type(expected) is not type(actual): + return f"{path}: {expected!r} != {actual!r}" + if isinstance(expected, dict): + for key in sorted(set(expected) | set(actual)): + if key not in expected: + return f"{path}.{key}: unexpected {actual[key]!r}"[:2000] + if key not in actual: + return f"{path}.{key}: missing (expected {expected[key]!r})"[:2000] + if expected[key] != actual[key]: + return _first_difference(expected[key], actual[key], f"{path}.{key}") + if isinstance(expected, list): + for i, (a, b) in enumerate(zip(expected, actual)): + if a != b: + return _first_difference(a, b, f"{path}[{i}]") + if len(expected) != len(actual): + return f"{path}: length {len(expected)} != {len(actual)}" + return f"{path}: {expected!r} != {actual!r}"[:2000] diff --git a/packages/flow/tests/golden_runs/test_golden_runs.py b/packages/flow/tests/golden_runs/test_golden_runs.py new file mode 100644 index 0000000000..e6d88445d9 --- /dev/null +++ b/packages/flow/tests/golden_runs/test_golden_runs.py @@ -0,0 +1,171 @@ +"""Golden runs of the replayer against the real browser and MockMed. + +Each scenario replays one committed bundle (the canonical MockMed triage +demo, recorded and compiled once in CI on Linux) under a different MockMed +drift, through the real ``Replayer`` and ``PlaywrightBackend``. The run +report, the hashes of every file the run wrote, the backend action trace and +the live app state afterwards must match the committed baseline exactly. + +A behavior-preserving refactor reproduces every baseline. A deliberate +behavior change regenerates them in CI in a change of its own: +``OPENADAPT_GOLDEN_WRITE=1 pytest tests/golden_runs`` (see harness.py). + +Scenarios that depend on timing (MockMed's ``slow`` drift) are left out on +purpose: a golden run must give the same result every time. +""" + +from __future__ import annotations + +import json +import os +import shutil +from collections.abc import Iterator +from pathlib import Path + +import pytest + +from openadapt_flow.backends.playwright_backend import PlaywrightBackend +from openadapt_flow.ir import Workflow +from openadapt_flow.runtime import Replayer +from tests.golden_runs.harness import ( + BASELINES, + WRITE_ENV, + GoldenResult, + Normalizer, + artifact_hashes, + check_or_write, + environment, + tracing_backend, +) + +pytestmark = pytest.mark.timeout(900) + +NOTE_TEXT = "Golden triage booking three months" +PARAMS = {"note": NOTE_TEXT} +VIEWPORT = {"width": 1280, "height": 800} +BUNDLE_DIR = BASELINES / "bundles" / "mockmed-triage" + +# name -> (MockMed drift, use_structural) +SCENARIOS: dict[str, tuple[str, bool]] = { + # A clean run that saves the encounter. + "mockmed_pass": ("", False), + # The same run with the structural (DOM) rung enabled. + "mockmed_pass_structural": ("", True), + # The target patient row is missing: the identity check halts before input. + "mockmed_missing_row": ("missing", False), + # A look-alike row sits above the target: never act on the wrong patient. + "mockmed_lookalike_row": ("lookalike", False), + # More rows than recorded: still the right patient or a halt. + "mockmed_data_growth": ("grow", False), + # A modal covers the page: the postcondition fails and names the step. + "mockmed_modal": ("modal", False), + # The Save button is renamed: an irreversible step refuses a low rung. + "mockmed_rename": ("rename", False), + # A different theme: lower rungs re-locate targets and heal anchors. + "mockmed_theme": ("theme", False), + # Rows sorted differently from the recording. + "mockmed_sort": ("sort", False), +} + + +@pytest.fixture(scope="module") +def browser(bundle_dir: Path) -> Iterator[object]: + # Depends on bundle_dir so a recording, which runs its own sync + # Playwright, finishes before this one starts (one per thread). + from playwright.sync_api import sync_playwright + + with sync_playwright() as playwright: + chromium = playwright.chromium.launch(headless=True) + yield chromium + chromium.close() + + +@pytest.fixture(scope="module") +def mockmed_url() -> Iterator[str]: + from openadapt_flow.mockmed.server import serve + + url, stop = serve(port=0) + yield url.rstrip("/") + stop() + + +@pytest.fixture(scope="module") +def bundle_dir(mockmed_url: str, tmp_path_factory: pytest.TempPathFactory) -> Path: + """The committed bundle; recorded and compiled only when writing baselines.""" + if (BUNDLE_DIR / "workflow.json").is_file(): + return BUNDLE_DIR + if os.environ.get(WRITE_ENV) != "1": + pytest.skip(f"no committed bundle at {BUNDLE_DIR}; generate in CI") + from openadapt_flow.compiler import compile_recording + from openadapt_flow.demo_driver import record_triage_demo + + recording = record_triage_demo( + mockmed_url, tmp_path_factory.mktemp("recording"), note_text=NOTE_TEXT + ) + staging = tmp_path_factory.mktemp("bundle") + compile_recording(recording, staging, name="golden-triage") + BUNDLE_DIR.parent.mkdir(parents=True, exist_ok=True) + shutil.copytree(staging, BUNDLE_DIR) + return BUNDLE_DIR + + +def _replay( + browser: object, + bundle: Path, + url: str, + run_dir: Path, + *, + use_structural: bool, +) -> GoldenResult: + page = browser.new_page(viewport=VIEWPORT, device_scale_factor=1) + trace: list[dict] = [] + try: + page.goto(url) + backend = tracing_backend(PlaywrightBackend(page), trace) + Replayer(backend, use_structural=use_structural).run( + Workflow.load(bundle), + params=PARAMS, + bundle_dir=bundle, + run_dir=run_dir, + ) + app_state = { + "hash": page.evaluate("location.hash"), + "banner": page.evaluate( + "(document.getElementById('saved-banner') || {}).textContent || null" + ), + "enc_item": page.evaluate( + "(document.querySelector('.enc-item') || {}).textContent || null" + ), + } + finally: + page.close() + report = json.loads((run_dir / "report.json").read_text(encoding="utf-8")) + normalizer = Normalizer([str(run_dir), str(bundle), url]) + normalizer.collect(report) + return GoldenResult( + report=normalizer(report), + # The report embeds times and paths; it is compared normalized above. + artifacts=artifact_hashes(run_dir, skip={"report.json"}), + trace=normalizer(trace), + environment=environment(), + app_state=normalizer(app_state), + ) + + +@pytest.mark.parametrize("name", sorted(SCENARIOS)) +def test_golden_run( + name: str, + browser: object, + mockmed_url: str, + bundle_dir: Path, + tmp_path: Path, +) -> None: + drift, use_structural = SCENARIOS[name] + url = f"{mockmed_url}/?drift={drift}" if drift else f"{mockmed_url}/" + attempts = iter(range(1, 10)) + + def produce() -> GoldenResult: + run_dir = tmp_path / f"run{next(attempts)}" + return _replay(browser, bundle_dir, url, run_dir, use_structural=use_structural) + + check_or_write(name, produce) diff --git a/packages/flow/tests/golden_runs/test_harness.py b/packages/flow/tests/golden_runs/test_harness.py new file mode 100644 index 0000000000..68d6847618 --- /dev/null +++ b/packages/flow/tests/golden_runs/test_harness.py @@ -0,0 +1,104 @@ +"""The golden-run harness records faithfully and hides only volatile values.""" + +from __future__ import annotations + +from pathlib import Path + +import pytest + +from openadapt_flow.backend import ( + GuardedCoordinateActionBackend, + RemoteActuationBackend, + RichPointerActionBackend, +) +from tests.golden_runs.harness import ( + artifact_hashes, + normalize, + tracing_backend, +) + + +class _PointerOnly: + viewport = (1280, 800) + + def screenshot(self) -> bytes: + return b"png-bytes" + + def click(self, x: int, y: int) -> None: + self.clicked = (x, y) + + def right_click(self, x: int, y: int) -> None: ... + + def drag(self, x0: int, y0: int, x1: int, y1: int) -> None: ... + + def hover(self, x: int, y: int) -> None: ... + + +def test_proxy_has_exactly_the_capabilities_of_the_backend() -> None: + inner = _PointerOnly() + proxy = tracing_backend(inner, []) + for protocol in ( + RichPointerActionBackend, + GuardedCoordinateActionBackend, + RemoteActuationBackend, + ): + assert isinstance(proxy, protocol) == isinstance(inner, protocol), protocol + + +def test_proxy_records_calls_in_order_and_forwards_results() -> None: + trace: list[dict] = [] + inner = _PointerOnly() + proxy = tracing_backend(inner, trace) + + assert proxy.screenshot() == b"png-bytes" + proxy.click(10, y=20) + + assert inner.clicked == (10, 20) # state is shared with the original + assert isinstance(proxy, _PointerOnly) + assert proxy.viewport == (1280, 800) + # Observations such as screenshots are not part of the action trace. + assert trace == [{"call": "click", "args": [10], "kwargs": {"y": 20}}] + + +def test_proxy_records_a_raised_exception() -> None: + class Failing: + def click(self, x: int, y: int) -> None: + raise TimeoutError("gone") + + trace: list[dict] = [] + with pytest.raises(TimeoutError): + tracing_backend(Failing(), trace).click(1, 2) + assert trace == [{"call": "click", "args": [1, 2], "raised": "TimeoutError"}] + + +def test_normalize_hides_times_ids_and_roots_but_keeps_outcomes() -> None: + report = { + "success": False, + "started_at": "2026-10-24T10:00:00Z", + "run_id": "abc", + "steps": [ + {"elapsed_ms": 1234, "timeout_s": 5.0, "error": "halted in /tmp/x/run"} + ], + "confidence": 0.123456, + } + assert normalize(report, roots=["/tmp/x"]) == { + "success": False, + "started_at": "", + "run_id": "", + "steps": [ + { + "elapsed_ms": "", + "timeout_s": 5.0, + "error": "halted in /run", + } + ], + "confidence": 0.123, + } + + +def test_artifact_hashes_skip_named_files(tmp_path: Path) -> None: + (tmp_path / "steps").mkdir() + (tmp_path / "steps" / "a.png").write_bytes(b"a") + (tmp_path / "report.json").write_text("{}") + hashes = artifact_hashes(tmp_path, skip={"report.json"}) + assert list(hashes) == ["steps/a.png"] diff --git a/packages/flow/tests/test_import_surface.py b/packages/flow/tests/test_import_surface.py new file mode 100644 index 0000000000..f4e8144b11 --- /dev/null +++ b/packages/flow/tests/test_import_surface.py @@ -0,0 +1,116 @@ +"""Names other code relies on stay importable while large modules are split. + +The decomposition plan (docs/design/DECOMPOSITION.md) moves code out of the +modules below. Each move re-exports what it moves, so every import that works +today keeps working. This test pins that surface: the names each module +defines at top level, the names any file in the monorepo imports from it, and +the methods of ``Replayer`` (tests call private methods on an instance). + +The snapshot is ``fixtures/import_surface.json``. When a change deliberately +removes a name (dead code, not a move), regenerate it and say why in the pull +request: + + OPENADAPT_WRITE_IMPORT_SURFACE=1 pytest tests/test_import_surface.py +""" + +from __future__ import annotations + +import ast +import importlib +import json +import os +import re +from pathlib import Path + +import pytest + +FLOW = Path(__file__).resolve().parents[1] +PACKAGES = FLOW.parent +SNAPSHOT = Path(__file__).parent / "fixtures" / "import_surface.json" +MODULES = { + "openadapt_flow.runtime.replayer": "openadapt_flow/runtime/replayer.py", + "openadapt_flow.__main__": "openadapt_flow/__main__.py", + "openadapt_flow.qualification": "openadapt_flow/qualification.py", + "openadapt_flow.ir": "openadapt_flow/ir.py", +} +CLASSES = {"openadapt_flow.runtime.replayer": ["Replayer"]} + + +def _defined(source: str) -> set[str]: + names: set[str] = set() + for node in ast.parse(source).body: + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)): + names.add(node.name) + elif isinstance(node, ast.Assign): + names.update(t.id for t in node.targets if isinstance(t, ast.Name)) + elif isinstance(node, ast.AnnAssign) and isinstance(node.target, ast.Name): + names.add(node.target.id) + return names + + +def _imported_elsewhere(module: str) -> set[str]: + pattern = re.compile( + rf"^\s*from {re.escape(module)} import (\([^)]*\)|[^\n]*)", re.MULTILINE + ) + names: set[str] = set() + for path in PACKAGES.rglob("*.py"): + if ".venv" in path.parts or "node_modules" in path.parts: + continue + text = path.read_text(encoding="utf-8", errors="replace") + for match in pattern.finditer(text): + clause = re.sub(r"#[^\n]*", "", match.group(1)) + for item in clause.strip("()").split(","): + name = item.strip().split(" as ")[0].strip() + if name.isidentifier(): + names.add(name) + return names + + +def _methods(module: str, cls: str) -> set[str]: + source = (FLOW / MODULES[module]).read_text(encoding="utf-8") + for node in ast.parse(source).body: + if isinstance(node, ast.ClassDef) and node.name == cls: + return { + n.name + for n in node.body + if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef)) + } + raise AssertionError(f"{module}.{cls} not found") + + +def _current() -> dict[str, list[str]]: + surface: dict[str, list[str]] = {} + for module, rel in MODULES.items(): + source = (FLOW / rel).read_text(encoding="utf-8") + surface[module] = sorted(_defined(source) | _imported_elsewhere(module)) + for cls in CLASSES.get(module, []): + surface[f"{module}:{cls}"] = sorted(_methods(module, cls)) + return surface + + +def test_snapshot_is_current_when_regenerating() -> None: + if os.environ.get("OPENADAPT_WRITE_IMPORT_SURFACE") != "1": + pytest.skip("set OPENADAPT_WRITE_IMPORT_SURFACE=1 to regenerate") + SNAPSHOT.write_text(json.dumps(_current(), indent=1) + "\n", encoding="utf-8") + + +@pytest.mark.parametrize("module", sorted(MODULES)) +def test_every_pinned_name_is_still_importable(module: str) -> None: + pinned = json.loads(SNAPSHOT.read_text(encoding="utf-8"))[module] + imported = importlib.import_module(module) + missing = [name for name in pinned if not hasattr(imported, name)] + assert missing == [], ( + f"{module} no longer provides {missing}. A move must re-export what it " + "moves; see the docstring of this test to regenerate after a deliberate " + "removal." + ) + + +@pytest.mark.parametrize( + "module, cls", [(m, c) for m, classes in sorted(CLASSES.items()) for c in classes] +) +def test_every_pinned_method_is_still_on_the_class(module: str, cls: str) -> None: + pinned = json.loads(SNAPSHOT.read_text(encoding="utf-8"))[f"{module}:{cls}"] + klass = getattr(importlib.import_module(module), cls) + missing = [name for name in pinned if not hasattr(klass, name)] + assert missing == [], f"{module}.{cls} lost methods {missing}" diff --git a/scripts/check_file_size_ratchet.py b/scripts/check_file_size_ratchet.py new file mode 100644 index 0000000000..0ff6f7c06c --- /dev/null +++ b/scripts/check_file_size_ratchet.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +"""Fail when a file listed in the decomposition plan grows past its budget. + +The budgets live in one table in packages/flow/docs/design/DECOMPOSITION.md, +between the ``size-ratchet:begin`` and ``size-ratchet:end`` markers. A file may +shrink; it may not grow. When a change shrinks a file, lower its budget in the +same change so the gain is kept. Raising a budget is a reviewed edit to that +table. + +Usage: python scripts/check_file_size_ratchet.py [--root PATH] +""" + +from __future__ import annotations + +import argparse +import re +import sys +from dataclasses import dataclass +from pathlib import Path + +DOC = Path("packages/flow/docs/design/DECOMPOSITION.md") +BEGIN = "" +END = "" +ROW = re.compile(r"^\|\s*`([^`]+)`\s*\|\s*(\d+)\s*\|\s*$") + + +@dataclass(frozen=True) +class Budget: + path: str + lines: int + + +def parse_budgets(doc_text: str) -> list[Budget]: + """Read the budget rows between the markers; refuse a missing or empty table.""" + try: + start = doc_text.index(BEGIN) + len(BEGIN) + end = doc_text.index(END, start) + except ValueError: + raise ValueError(f"{DOC}: size-ratchet markers not found") from None + budgets = [] + for line in doc_text[start:end].splitlines(): + match = ROW.match(line.strip()) + if match: + budgets.append(Budget(match.group(1), int(match.group(2)))) + if not budgets: + raise ValueError(f"{DOC}: size-ratchet table has no rows") + paths = [b.path for b in budgets] + duplicates = sorted({p for p in paths if paths.count(p) > 1}) + if duplicates: + raise ValueError(f"{DOC}: listed more than once: {', '.join(duplicates)}") + return budgets + + +def count_lines(path: Path) -> int: + """Count lines the way ``wc -l`` does.""" + return path.read_bytes().count(b"\n") + + +def check(root: Path) -> tuple[list[str], list[str]]: + """Return (failures, notes) for the budgets in ``root``'s plan.""" + budgets = parse_budgets((root / DOC).read_text(encoding="utf-8")) + failures: list[str] = [] + notes: list[str] = [] + for budget in budgets: + path = root / budget.path + if not path.is_file(): + failures.append( + f"{budget.path}: listed in {DOC} but missing. If it was split or " + "removed, delete its row in the same change." + ) + continue + lines = count_lines(path) + if lines > budget.lines: + failures.append( + f"{budget.path}: {lines} lines, budget {budget.lines} " + f"(+{lines - budget.lines}). Move code out instead of adding it, " + f"or raise the budget in {DOC} with a reason in the pull request." + ) + elif lines < budget.lines: + notes.append( + f"{budget.path}: {lines} lines, budget {budget.lines}. " + f"Lower the budget to {lines} in {DOC}." + ) + return failures, notes + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument( + "--root", type=Path, default=Path(__file__).resolve().parents[1] + ) + args = parser.parse_args(argv) + try: + failures, notes = check(args.root) + except ValueError as exc: + print(f"error: {exc}", file=sys.stderr) + return 2 + for note in notes: + print(f"note: {note}") + for failure in failures: + print(f"error: {failure}", file=sys.stderr) + return 1 if failures else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/verify_moved_code.py b/scripts/verify_moved_code.py new file mode 100644 index 0000000000..d048f3bdcf --- /dev/null +++ b/scripts/verify_moved_code.py @@ -0,0 +1,409 @@ +#!/usr/bin/env python3 +"""Prove that a change only moves Python code, without editing it. + +Used for the move commits of the decomposition plan +(packages/flow/docs/design/DECOMPOSITION.md, section 4.2). For every Python +file that changed between ``--base`` and the working tree, each function, +method and other statement that was in the base version must still exist, +with an identical AST, somewhere under the search roots of the working tree. +Positions, comments and formatting are ignored; names, signatures, decorators +and bodies must match exactly. + +A move commit may add three kinds of code, which are reported, not refused: + +* imports, and re-export assignments such as ``name = other.name``; +* protocol stubs: functions whose body is only ``...`` or a docstring; +* class headers whose bases changed (``class Replayer(IdentityChecks, ...)``). + +Any other new function body fails the check unless ``--allow-new`` is given, +because a move commit must not contain an edit. + +It also lists test patches that name a moved module global by its old module +(``"pkg.old.name"`` strings), since the moved code no longer reads that global +from the old module. + +Usage: + python scripts/verify_moved_code.py [--base origin/main] [--root PATH] + (compares with the merge base of --base and HEAD) + [--search packages] [--allow-new] +""" + +from __future__ import annotations + +import argparse +import ast +import re +import subprocess +import sys +from collections import Counter +from dataclasses import dataclass, field +from pathlib import Path + + +@dataclass(frozen=True) +class Unit: + """One comparable piece of code: where it was, and its normalized AST.""" + + file: str + qualname: str + lineno: int + dump: str + is_function: bool + # A statement that documents or declares but does nothing at run time: + # a docstring, or an annotation with no value (a protocol attribute). + is_declaration: bool = False + # Module-level names a function reads (it looks them up in its module). + reads: frozenset[str] = frozenset() + + +@dataclass +class Result: + missing: list[Unit] = field(default_factory=list) + new_bodies: list[Unit] = field(default_factory=list) + new_stubs: list[Unit] = field(default_factory=list) + changed_bases: list[str] = field(default_factory=list) + stale_patches: list[str] = field(default_factory=list) + moved: int = 0 + + @property + def ok(self) -> bool: + return not self.missing and not self.new_bodies + + +def _dump(node: ast.AST) -> str: + return ast.dump(node, annotate_fields=True, include_attributes=False) + + +def _is_import(node: ast.stmt) -> bool: + if isinstance(node, (ast.Import, ast.ImportFrom)): + return True + # ``if TYPE_CHECKING:`` blocks hold imports and the mixin base alias. + return ( + isinstance(node, ast.If) + and isinstance(node.test, ast.Name) + and node.test.id == "TYPE_CHECKING" + ) + + +def _is_reexport(node: ast.stmt) -> bool: + """``name = module.name`` or ``name = other_name``: a re-export, not logic.""" + return ( + isinstance(node, ast.Assign) + and len(node.targets) == 1 + and isinstance(node.targets[0], ast.Name) + and isinstance(node.value, (ast.Name, ast.Attribute)) + ) + + +def _is_stub(node: ast.FunctionDef | ast.AsyncFunctionDef) -> bool: + body = list(node.body) + if ( + body + and isinstance(body[0], ast.Expr) + and isinstance(body[0].value, ast.Constant) + ): + body = body[1:] # docstring + return all( + isinstance(stmt, ast.Expr) + and isinstance(stmt.value, ast.Constant) + and stmt.value.value is Ellipsis + for stmt in body + ) + + +def units(source: str, file: str) -> tuple[list[Unit], dict[str, list[str]]]: + """Comparable units of a module, and each class's base expressions.""" + tree = ast.parse(source, filename=file) + out: list[Unit] = [] + bases: dict[str, list[str]] = {} + + def walk(body: list[ast.stmt], prefix: str) -> None: + for node in body: + if _is_import(node): + continue + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + reads = frozenset( + sub.id + for sub in ast.walk(node) + if isinstance(sub, ast.Name) and isinstance(sub.ctx, ast.Load) + ) + out.append( + Unit( + file, + prefix + node.name, + node.lineno, + _dump(node), + True, + reads=reads, + ) + ) + elif isinstance(node, ast.ClassDef): + name = prefix + node.name + bases[name] = [ast.unparse(b) for b in node.bases] + [ + ast.unparse(k) for k in node.keywords + ] + for deco in node.decorator_list: + out.append( + Unit( + file, + f"{name}@{ast.unparse(deco)}", + node.lineno, + _dump(deco), + False, + ) + ) + walk(node.body, name + ".") + else: + label = f"{prefix}" + declaration = ( + isinstance(node, ast.AnnAssign) and node.value is None + ) or ( + isinstance(node, ast.Expr) + and isinstance(node.value, ast.Constant) + and isinstance(node.value.value, str) + ) + out.append( + Unit(file, label, node.lineno, _dump(node), False, declaration) + ) + + walk(tree.body, "") + return out, bases + + +def _git(root: Path, *args: str) -> str: + return subprocess.run( + ["git", *args], cwd=root, check=True, capture_output=True, text=True + ).stdout + + +def _in_roots(path: str, search: list[str]) -> bool: + """Tests and scripts are outside the roots: retargeted patches are edits.""" + return any(path == r or path.startswith(r.rstrip("/") + "/") for r in search) + + +def changed_python_files(root: Path, base: str, search: list[str]) -> list[str]: + names = _git(root, "diff", "--name-only", base, "--", "*.py").split() + return sorted(n for n in names if _in_roots(n, search) and "/tests/" not in n) + + +def base_source(root: Path, base: str, path: str) -> str | None: + try: + return _git(root, "show", f"{base}:{path}") + except subprocess.CalledProcessError: + return None # new file + + +def _module_name(path: str) -> str | None: + """``packages/flow/openadapt_flow/runtime/replayer.py`` -> dotted module.""" + parts = Path(path).with_suffix("").parts + for i, part in enumerate(parts): + if part.startswith("openadapt"): + return ".".join(parts[i:]) + return None + + +def verify(root: Path, base: str, search: list[str]) -> Result: + result = Result() + changed = changed_python_files(root, base, search) + + head_units: Counter[str] = Counter() + head_by_dump: dict[str, list[Unit]] = {} + for search_root in search: + for path in sorted((root / search_root).rglob("*.py")): + if ".venv" in path.parts or "node_modules" in path.parts: + continue + rel = path.relative_to(root).as_posix() + try: + found, _ = units(path.read_text(encoding="utf-8"), rel) + except (SyntaxError, UnicodeDecodeError): + continue + for unit in found: + head_units[unit.dump] += 1 + head_by_dump.setdefault(unit.dump, []).append(unit) + + base_units: Counter[str] = Counter() + # (old module, name) -> modules whose moved code now reads that name. + moved_reads: dict[tuple[str, str], set[str]] = {} + for path in changed: + old = base_source(root, base, path) + if old is None: + continue + old_units, old_bases = units(old, path) + new_file = root / path + new_units: list[Unit] = [] + new_bases: dict[str, list[str]] = {} + if new_file.is_file(): + new_units, new_bases = units(new_file.read_text(encoding="utf-8"), path) + new_here = {u.dump for u in new_units} + old_module = _module_name(path) + module_level = _module_level_names(old) + for unit in old_units: + if unit.dump not in head_units: + result.missing.append(unit) + elif unit.dump not in new_here: + base_units[unit.dump] += 1 # left this file; may land elsewhere + result.moved += 1 + landed = [ + m + for u in head_by_dump.get(unit.dump, []) + if u.file != path and (m := _module_name(u.file)) + ] + if old_module and landed: + names = set(unit.reads & module_level) + if unit.is_function and "." not in unit.qualname: + names.add(unit.qualname) + for name in names: + moved_reads.setdefault((old_module, name), set()).update(landed) + for cls, old_cls_bases in old_bases.items(): + if cls in new_bases and new_bases[cls] != old_cls_bases: + result.changed_bases.append( + f"{path}: class {cls}({', '.join(old_cls_bases)}) -> " + f"({', '.join(new_bases[cls])})" + ) + + # Code in the working tree that the base did not have, in changed or new files. + untracked = _git(root, "ls-files", "--others", "--exclude-standard", "--", "*.py") + all_changed = set(changed) | { + n for n in untracked.split() if _in_roots(n, search) and "/tests/" not in n + } + for path in sorted(all_changed): + new_file = root / path + if not new_file.is_file(): + continue + old = base_source(root, base, path) + old_dumps = Counter(u.dump for u in units(old, path)[0]) if old else Counter() + tree = ast.parse(new_file.read_text(encoding="utf-8"), filename=path) + stubs = { + _dump(n) + for n in ast.walk(tree) + if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef)) and _is_stub(n) + } + reexports = { + _dump(n) + for n in ast.walk(tree) + if isinstance(n, ast.stmt) and _is_reexport(n) + } + for unit in units(new_file.read_text(encoding="utf-8"), path)[0]: + if unit.dump in old_dumps: + old_dumps[unit.dump] -= 1 + if old_dumps[unit.dump] == 0: + del old_dumps[unit.dump] + continue + if base_units[unit.dump] > 0: + base_units[unit.dump] -= 1 # moved here from a changed file + continue + # Protocol attribute declarations and docstrings are not logic. + if unit.dump in stubs or unit.dump in reexports or unit.is_declaration: + result.new_stubs.append(unit) + else: + result.new_bodies.append(unit) + + result.stale_patches = stale_patches(root, moved_reads) + return result + + +def _module_level_names(source: str) -> set[str]: + """Names bound at module level: imports, functions, classes, constants.""" + names: set[str] = set() + for node in ast.parse(source).body: + if isinstance(node, (ast.Import, ast.ImportFrom)): + names |= {(a.asname or a.name).split(".")[0] for a in node.names} + elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)): + names.add(node.name) + elif isinstance(node, ast.Assign): + names |= {t.id for t in node.targets if isinstance(t, ast.Name)} + elif isinstance(node, ast.AnnAssign) and isinstance(node.target, ast.Name): + names.add(node.target.id) + return names + + +def _patches(text: str, module: str, name: str) -> list[int]: + """Lines that patch ``module.name``, by dotted string or module alias.""" + lines = [] + pattern = rf"[\"']{re.escape(module)}\.{re.escape(name)}[\"']" + for match in re.finditer(pattern, text): + lines.append(text.count("\n", 0, match.start()) + 1) + parent, _, leaf = module.rpartition(".") + aliases = set(re.findall(rf"import {re.escape(module)} as (\w+)", text)) + aliases |= set( + re.findall(rf"from {re.escape(parent)} import {leaf} as (\w+)", text) + ) + if re.search(rf"from {re.escape(parent)} import {leaf}\b(?! as)", text): + aliases.add(leaf) + for alias in aliases: + for match in re.finditer( + rf"setattr\(\s*{re.escape(alias)}\s*,\s*[\"']{re.escape(name)}[\"']", text + ): + lines.append(text.count("\n", 0, match.start()) + 1) + return lines + + +def stale_patches(root: Path, moved: dict[tuple[str, str], set[str]]) -> list[str]: + """Tests that patch a name through its old module only. + + Moved code reads module-level names from its new module, so a test that + patches ``old.name`` no longer affects it. A test is flagged unless it + also patches the name in every module the moved code now reads it from. + """ + if not moved: + return [] + hits = [] + for path in sorted(root.rglob("test*.py")): + if ".venv" in path.parts: + continue + text = path.read_text(encoding="utf-8", errors="replace") + rel = path.relative_to(root).as_posix() + for (old, name), new_modules in sorted(moved.items()): + old_lines = _patches(text, old, name) + if not old_lines: + continue + unpatched = sorted(m for m in new_modules if not _patches(text, m, name)) + if unpatched: + hits.append( + f"{rel}:{old_lines[0]}: patches {old}.{name}; moved code reads " + f"it from {', '.join(unpatched)}" + ) + return hits + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("--base", default="origin/main") + parser.add_argument( + "--root", type=Path, default=Path(__file__).resolve().parents[1] + ) + parser.add_argument("--search", action="append", default=None) + parser.add_argument("--allow-new", action="store_true") + args = parser.parse_args(argv) + # Compare with where this branch left the base, not with the base's tip, + # so commits that landed on the base since then do not count as edits. + fork_point = _git(args.root, "merge-base", args.base, "HEAD").strip() + result = verify(args.root, fork_point, args.search or ["packages"]) + + print(f"moved units: {result.moved}") + for line in result.changed_bases: + print(f"class bases changed: {line}") + for unit in result.new_stubs: + print(f"new stub or re-export: {unit.file}:{unit.lineno} {unit.qualname}") + for hit in result.stale_patches: + print(f"retarget patch: {hit}") + for unit in result.missing: + print( + f"error: {unit.file}:{unit.lineno} {unit.qualname} is gone or was edited", + file=sys.stderr, + ) + for unit in result.new_bodies: + level = "note" if args.allow_new else "error" + print( + f"{level}: {unit.file}:{unit.lineno} {unit.qualname} is new code", + file=sys.stderr, + ) + if result.missing or result.stale_patches: + return 1 + if result.new_bodies and not args.allow_new: + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tests/test_file_size_ratchet.py b/tests/test_file_size_ratchet.py new file mode 100644 index 0000000000..e13c06fdfa --- /dev/null +++ b/tests/test_file_size_ratchet.py @@ -0,0 +1,85 @@ +"""scripts/check_file_size_ratchet.py keeps the largest files from growing.""" + +from __future__ import annotations + +import importlib.util +import sys +from pathlib import Path + +import pytest + +ROOT = Path(__file__).resolve().parents[1] +SCRIPT = ROOT / "scripts/check_file_size_ratchet.py" +_spec = importlib.util.spec_from_file_location("check_file_size_ratchet", SCRIPT) +assert _spec and _spec.loader +ratchet = importlib.util.module_from_spec(_spec) +# dataclasses look the module up in sys.modules while the class is built. +sys.modules[_spec.name] = ratchet +_spec.loader.exec_module(ratchet) + + +def _repo(tmp_path: Path, table: str, files: dict[str, int]) -> Path: + doc = tmp_path / ratchet.DOC + doc.parent.mkdir(parents=True) + doc.write_text( + f"# Plan\n\n{ratchet.BEGIN}\n| File | Line budget |\n|---|---:|\n" + f"{table}{ratchet.END}\n", + encoding="utf-8", + ) + for name, lines in files.items(): + path = tmp_path / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("x\n" * lines, encoding="utf-8") + return tmp_path + + +def test_listed_files_are_within_budget() -> None: + failures, _notes = ratchet.check(ROOT) + assert failures == [] + + +def test_growth_past_budget_fails(tmp_path: Path) -> None: + root = _repo(tmp_path, "| `a.py` | 10 |\n", {"a.py": 11}) + failures, _notes = ratchet.check(root) + assert len(failures) == 1 + assert "a.py: 11 lines, budget 10 (+1)" in failures[0] + assert ratchet.main(["--root", str(root)]) == 1 + + +def test_equal_passes_and_shrink_asks_to_lower(tmp_path: Path) -> None: + root = _repo( + tmp_path, "| `a.py` | 10 |\n| `b.py` | 10 |\n", {"a.py": 10, "b.py": 7} + ) + failures, notes = ratchet.check(root) + assert failures == [] + assert notes == [ + f"b.py: 7 lines, budget 10. Lower the budget to 7 in {ratchet.DOC}." + ] + assert ratchet.main(["--root", str(root)]) == 0 + + +def test_missing_listed_file_fails(tmp_path: Path) -> None: + root = _repo(tmp_path, "| `gone.py` | 10 |\n", {}) + failures, _notes = ratchet.check(root) + assert len(failures) == 1 and "missing" in failures[0] + + +@pytest.mark.parametrize( + "doc_text", + [ + "no markers at all", + f"{ratchet.BEGIN}\n| File | Line budget |\n{ratchet.END}", + f"{ratchet.BEGIN}\n| `a.py` | 1 |\n| `a.py` | 2 |\n{ratchet.END}", + ], + ids=["no-markers", "empty-table", "duplicate-row"], +) +def test_malformed_table_is_refused(doc_text: str) -> None: + with pytest.raises(ValueError): + ratchet.parse_budgets(doc_text) + + +def test_plan_lists_the_ten_largest_files() -> None: + budgets = ratchet.parse_budgets((ROOT / ratchet.DOC).read_text(encoding="utf-8")) + paths = {budget.path for budget in budgets} + assert "packages/flow/openadapt_flow/runtime/replayer.py" in paths + assert len(paths) == 10 diff --git a/tests/test_verify_moved_code.py b/tests/test_verify_moved_code.py new file mode 100644 index 0000000000..8cdcabe8ac --- /dev/null +++ b/tests/test_verify_moved_code.py @@ -0,0 +1,217 @@ +"""scripts/verify_moved_code.py tells a pure move from an edit.""" + +from __future__ import annotations + +import importlib.util +import subprocess +import sys +import textwrap +from pathlib import Path + +import pytest + +ROOT = Path(__file__).resolve().parents[1] +SCRIPT = ROOT / "scripts/verify_moved_code.py" +_spec = importlib.util.spec_from_file_location("verify_moved_code", SCRIPT) +assert _spec and _spec.loader +verify_moved_code = importlib.util.module_from_spec(_spec) +# dataclasses look the module up in sys.modules while the class is built. +sys.modules[_spec.name] = verify_moved_code +_spec.loader.exec_module(verify_moved_code) + +PKG = "packages/demo/openadapt_demo" + +BASE = '''\ +"""Replayer.""" +import os + +LIMIT = 3 + + +def helper(x): + return x + LIMIT + + +class Replayer: + def __init__(self): + self.backend = os.name + + def run(self): + return self._check() and helper(1) + + def _check(self): + # the identity check + return len(self.backend) > 0 +''' + +MOVED_REPLAYER = '''\ +"""Replayer.""" +import os + +from openadapt_demo.replay.identity import LIMIT, IdentityChecks, helper # noqa: F401 + + +class Replayer(IdentityChecks): + def __init__(self): + self.backend = os.name + + def run(self): + return self._check() and helper(1) +''' + +MIXIN = """\ +from typing import TYPE_CHECKING, Any, Optional, Protocol + +LIMIT = 3 + + +class _IdentityHost(Protocol): + "What the identity checks read from the host." + + backend: str + frames: Optional[dict[str, Any]] + + def run(self) -> bool: ... + + +if TYPE_CHECKING: + _Base = _IdentityHost +else: + _Base = object + + +def helper(x): + return x + LIMIT + + +class IdentityChecks(_Base): + "Identity checks." + + def _check(self): + return len(self.backend) > 0 +""" + + +def _git(repo: Path, *args: str) -> None: + subprocess.run(["git", *args], cwd=repo, check=True, capture_output=True) + + +@pytest.fixture +def repo(tmp_path: Path) -> Path: + _git(tmp_path, "init", "-q") + _git(tmp_path, "config", "user.email", "t@example.com") + _git(tmp_path, "config", "user.name", "t") + _write(tmp_path, f"{PKG}/replayer.py", BASE) + _write(tmp_path, f"{PKG}/__init__.py", "") + _git(tmp_path, "add", "-A") + _git(tmp_path, "commit", "-q", "-m", "base") + return tmp_path + + +def _write(repo: Path, rel: str, text: str) -> None: + path = repo / rel + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(textwrap.dedent(text), encoding="utf-8") + + +def _verify(repo: Path) -> verify_moved_code.Result: + return verify_moved_code.verify(repo, "HEAD", ["packages"]) + + +def test_a_pure_move_into_a_mixin_passes(repo: Path) -> None: + _write(repo, f"{PKG}/replayer.py", MOVED_REPLAYER) + _write(repo, f"{PKG}/replay/__init__.py", "") + _write(repo, f"{PKG}/replay/identity.py", MIXIN) + + result = _verify(repo) + + assert result.ok, (result.missing, result.new_bodies) + assert result.moved == 3 # LIMIT, helper and Replayer._check + assert any( + "class Replayer() -> (IdentityChecks)" in c for c in result.changed_bases + ) + stubs = {unit.qualname for unit in result.new_stubs} + assert {"_IdentityHost.run"} <= stubs + # Docstrings and attribute declarations, even with nested types, are stubs. + assert len(result.new_stubs) == 5 + assert verify_moved_code.main(["--root", str(repo), "--base", "HEAD"]) == 0 + + +def test_an_edit_hidden_in_a_move_fails(repo: Path) -> None: + _write(repo, f"{PKG}/replayer.py", MOVED_REPLAYER) + _write(repo, f"{PKG}/replay/__init__.py", "") + _write(repo, f"{PKG}/replay/identity.py", MIXIN.replace("> 0", ">= 0")) + + result = _verify(repo) + + assert [unit.qualname for unit in result.missing] == ["Replayer._check"] + assert [unit.qualname for unit in result.new_bodies] == ["IdentityChecks._check"] + assert verify_moved_code.main(["--root", str(repo), "--base", "HEAD"]) == 1 + + +def test_new_logic_fails_unless_allowed(repo: Path) -> None: + _write(repo, f"{PKG}/replayer.py", BASE + "\n\ndef extra():\n return 1\n") + + result = _verify(repo) + + assert result.missing == [] + assert [unit.qualname for unit in result.new_bodies] == ["extra"] + args = ["--root", str(repo), "--base", "HEAD"] + assert verify_moved_code.main(args) == 1 + assert verify_moved_code.main([*args, "--allow-new"]) == 0 + + +def test_a_patch_through_the_old_module_is_flagged(repo: Path) -> None: + _write(repo, f"{PKG}/replayer.py", MOVED_REPLAYER) + _write(repo, f"{PKG}/replay/__init__.py", "") + _write(repo, f"{PKG}/replay/identity.py", MIXIN) + _write( + repo, + "packages/demo/tests/test_demo.py", + "def test_x(monkeypatch):\n" + ' monkeypatch.setattr("openadapt_demo.replayer.helper", lambda x: 0)\n', + ) + + result = _verify(repo) + + assert result.stale_patches == [ + "packages/demo/tests/test_demo.py:2: patches openadapt_demo.replayer.helper; " + "moved code reads it from openadapt_demo.replay.identity" + ] + assert verify_moved_code.main(["--root", str(repo), "--base", "HEAD"]) == 1 + + +def test_a_patched_import_the_moved_code_reads_is_flagged_until_retargeted( + tmp_path: Path, +) -> None: + """The case the first real move hit: moved code reads an imported name.""" + _git(tmp_path, "init", "-q") + _git(tmp_path, "config", "user.email", "t@example.com") + _git(tmp_path, "config", "user.name", "t") + base = BASE.replace("return len(self.backend) > 0", "return len(os.sep) > 0") + _write(tmp_path, f"{PKG}/replayer.py", base) + _write(tmp_path, f"{PKG}/__init__.py", "") + _git(tmp_path, "add", "-A") + _git(tmp_path, "commit", "-q", "-m", "base") + _write(tmp_path, f"{PKG}/replayer.py", MOVED_REPLAYER) + _write(tmp_path, f"{PKG}/replay/__init__.py", "") + mixin = MIXIN.replace("LIMIT = 3", "import os\n\nLIMIT = 3", 1).replace( + "return len(self.backend) > 0", "return len(os.sep) > 0" + ) + _write(tmp_path, f"{PKG}/replay/identity.py", mixin) + test = ( + "def test_x(monkeypatch):\n" + ' monkeypatch.setattr("openadapt_demo.replayer.os", None)\n' + ) + _write(tmp_path, "packages/demo/tests/test_demo.py", test) + + assert _verify(tmp_path).stale_patches == [ + "packages/demo/tests/test_demo.py:2: patches openadapt_demo.replayer.os; " + "moved code reads it from openadapt_demo.replay.identity" + ] + + retargeted = test + ( + ' monkeypatch.setattr("openadapt_demo.replay.identity.os", None)\n' + ) + _write(tmp_path, "packages/demo/tests/test_demo.py", retargeted) + assert _verify(tmp_path).stale_patches == []