BUILD200 (2026.11.05.1) — закрепить плашку удаления и снимать штраф после гола по ACK vMix

This commit is contained in:
2026-11-05 11:48:31 +03:00
parent 011e84485e
commit 2a243e3441
30 changed files with 3044 additions and 207 deletions

920
BUILD200_FILES.json Normal file
View File

@@ -0,0 +1,920 @@
{
"build": "2026.11.05.1",
"base": "2026.10.02.9",
"includes": [
"BUILD190",
"BUILD191",
"BUILD192",
"BUILD193",
"BUILD194",
"BUILD195",
"BUILD196",
"BUILD197",
"BUILD198",
"BUILD199",
"BUILD200"
],
"commit": "BUILD200 (2026.11.05.1) — закрепить плашку удаления и снимать штраф после гола по ACK vMix",
"files": [
{
"path": ".gitignore",
"sha256": "d0e4125cc77ffb6fe131f51a63ef891e283c8ec752f0190171ce1ea0ffe6c3e0",
"bytes": 2700
},
{
"path": "BUILD190_FILES.json",
"sha256": "f979a8156e98fd6dd80343af5663c66f8289865696ba4d07d7f85bfe3bc3079a",
"bytes": 7141
},
{
"path": "BUILD191_FILES.json",
"sha256": "1c9746db60634c90b78a206551f91fc7f94bd5479019f269abc5cf82b6912a02",
"bytes": 14718
},
{
"path": "BUILD192_FILES.json",
"sha256": "8983da5618fac5d5eaf72a1fdc1525a669d860294c2ee95b1f88682e3c51865c",
"bytes": 16776
},
{
"path": "BUILD193_FILES.json",
"sha256": "3fcee5bd81015b6151fcfe082fcc3ac053cb7d064816f8475435e91b8334f621",
"bytes": 17232
},
{
"path": "BUILD194_FILES.json",
"sha256": "ad27c7a970f92626fd995e913f8da6341fe696f773cbd108ba51c86e528f99cd",
"bytes": 32959
},
{
"path": "BUILD195_FILES.json",
"sha256": "edf1c14ca1b618f86e4844c33eb994c9a9b75f8bbfb62e220daf0b7a8a5a0a57",
"bytes": 21637
},
{
"path": "BUILD196_FILES.json",
"sha256": "308368e8f80186e365abb57b81523a2105c7a8941389dfe014a5a69ee1e62ba3",
"bytes": 23753
},
{
"path": "BUILD197_FILES.json",
"sha256": "e07b44797f745b18872ca16e86b85b1d7d3ff8e663f041c0805cf0b708d6e049",
"bytes": 24608
},
{
"path": "BUILD198_FILES.json",
"sha256": "c492de6e39e6e8b5cb258958af081cd5e98dca5ccd6561fe513ea5b48015f3c2",
"bytes": 28600
},
{
"path": "BUILD199_FILES.json",
"sha256": "fdbe37b593516c95dea959b40362c0a796a7eee0db0f9d7e1f13bb0e45b6afc3",
"bytes": 29470
},
{
"path": "README.md",
"sha256": "68fe3614823e1f3cd1c80f5532d39998c04bd78afadd32eaf497b9e5108f364e",
"bytes": 4416
},
{
"path": "UPDATE.txt",
"sha256": "6e168c30ec83e75da9ace48feb63fab249b46d4a4c49314870d6df6207679154",
"bytes": 2507
},
{
"path": "agent/README.md",
"sha256": "cb71a6cd73e0915b92996a3c07f90ad07791063b79ce4b2f2e1210a6661ee7f3",
"bytes": 5982
},
{
"path": "agent/agent.exe",
"sha256": "a8fbec7c3e1dd92ac7fdbdc042b6a283e09d6f53d7779fcb7bcaa4a4146c1b0a",
"bytes": 6951424
},
{
"path": "agent/build198_priority_test.go",
"sha256": "0905e557fd29d95a4905fae92dcc6aa04ac480c83ebbec6a1c198bcab634e2dd",
"bytes": 20060
},
{
"path": "agent/core.go",
"sha256": "56569ea03a2eab6448cb1e8d6f67110fa16cac31a11c8935b0827e6ed713c83a",
"bytes": 43233
},
{
"path": "agent/dispatch.go",
"sha256": "65877b44b220b8b50f58449cc66f5e50f64a2519f4a1b8a2e5bf3d1141e19815",
"bytes": 33186
},
{
"path": "agent/dispatch_test.go",
"sha256": "ac52e2749898c99f12472f2b67ee521711c23ff3ef129ed149482d10831403a3",
"bytes": 26528
},
{
"path": "app.py",
"sha256": "51e2f9f114610206789ff7fdd6e6267b0f4efee9b00da522e5605ed6fe2ed8b6",
"bytes": 29470
},
{
"path": "cleanup_project.py",
"sha256": "8376ff02ee0e945dec90583f37908a33206f65426ddd2f5052e50fc095bdb895",
"bytes": 8926
},
{
"path": "deploy.sh",
"sha256": "233ee1f9781344a4323d82f4ce2f6caf08078c235331ff16a60eaf680dbf7770",
"bytes": 214
},
{
"path": "docs/ADMIN.md",
"sha256": "c663e9d83caef6c13fd533af9f5ae14496e4f3bb6ebfd7e640090a677ad04c6b",
"bytes": 18693
},
{
"path": "docs/ARCHITECTURE.md",
"sha256": "e0f09cf8ef4074699d33deb7b5a4d063bbc14066f3d1c5f625f5ab4bea6aecb8",
"bytes": 14635
},
{
"path": "docs/CHANGELOG.md",
"sha256": "c12684516fab5ce7cb95704ae358a98499b7c196792be006871f15ed85f55dee",
"bytes": 30695
},
{
"path": "docs/OPERATOR.md",
"sha256": "612513c462625b7898847715ae03bf1c009549e036800fed53ae77e08c0e8e5c",
"bytes": 29645
},
{
"path": "docs/history.zip",
"sha256": "a7e454514a9b1b5258c8794cfa3921913151f2090cf5d1d9eca22ccbe747f766",
"bytes": 132008
},
{
"path": "docs/validation.json",
"sha256": "1e75c7461ae16cfe758b0ed9b65b20d809e99f528fdb3b8e3c5a2d2f31fcf003",
"bytes": 381046
},
{
"path": "hockey_data/agent_bridge.py",
"sha256": "a96235d9dc7d5c9acaf7408a527d37b8fdf7569588f04b0c62ed98e8c9bbd2ee",
"bytes": 375358
},
{
"path": "hockey_data/async_work.py",
"sha256": "833e305a79d97b0fc2ea187f64b76f30dd25f95f466e218311ee0fc34f8e11c9",
"bytes": 5432
},
{
"path": "hockey_data/auth_bridge.py",
"sha256": "2fb09b52f71352aaf61988b13dfc36fa17116376d33c272013ac69b7ba1dbc1f",
"bytes": 15480
},
{
"path": "hockey_data/auth_router.py",
"sha256": "c13e3339af6bf7ca31449cf980ba5d6e03068663f28badd75d96ecbb77c6d05e",
"bytes": 9201
},
{
"path": "hockey_data/broadcast_readiness.py",
"sha256": "7a48a3495f01dbe6d2b8e4dc8469090a173df2b35df40accb476eb424f221d1d",
"bytes": 20158
},
{
"path": "hockey_data/client.py",
"sha256": "bcee5981010b445d8173f6a08054c248dd2cf6b892170331afa8febef34678a6",
"bytes": 4419
},
{
"path": "hockey_data/config.py",
"sha256": "0d884ffe07c4174c3dcc57353bdb496614e5baec6942d653c4c50549f76658ff",
"bytes": 27503
},
{
"path": "hockey_data/mapping_context.py",
"sha256": "91451e82b86283937015e470008e7ef298ad0781d4c74f2f066168769737fd56",
"bytes": 101826
},
{
"path": "hockey_data/match_access.py",
"sha256": "90d11f2eeefd3a4048648c6266b8b79afcbe0fa2dd678fa3093c698afbe701d5",
"bytes": 32637
},
{
"path": "hockey_data/models.py",
"sha256": "b6a92c2f150c04eec21146501a1ddc28fd1b9e3d6bf644e1cdd7fd9520c1611e",
"bytes": 79958
},
{
"path": "hockey_data/program_log.py",
"sha256": "53f67011c495036e352d195aba2bb33fa9243e72084b5f5da9e05a246e299016",
"bytes": 27225
},
{
"path": "hockey_data/program_log_router.py",
"sha256": "a1bd17416a6c2391a6c5edebd0ca392a22f8b1da61828bfae3d0392dbef25f0f",
"bytes": 3184
},
{
"path": "hockey_data/router.py",
"sha256": "dea3de285b92322cd6b3d70c62d0fd1c589ddd0600b198cfd4ac517d8b638cd1",
"bytes": 71028
},
{
"path": "hockey_data/service.py",
"sha256": "92d3cc563ac3d2c5c5ba773240973d7dcc9ee6a09aff8ac6a094da70e32d270d",
"bytes": 424104
},
{
"path": "hockey_data/snapshot_storage.py",
"sha256": "1b09601bd2c25387e032ea12526bd8e4cef0fb11f1efd1223a4ba8386382e824",
"bytes": 2148
},
{
"path": "hockey_data/static/admin-directories.css",
"sha256": "0868659d35895e8295c40649009f0a4e6d9edd7b7c0f727c0da8940df9686bbe",
"bytes": 117382
},
{
"path": "hockey_data/static/admin-directories.js",
"sha256": "6e39b3fb54e76dfb8682fbbdcd5e8f31b1253029c08c91021efe02609a64fbb7",
"bytes": 302838
},
{
"path": "hockey_data/static/agent-devices.js",
"sha256": "228940fc269f0905d4438db0bdf5a463fed40d8f9a801996e01f0a3b5bc1e748",
"bytes": 27649
},
{
"path": "hockey_data/static/agent-diagnostics.css",
"sha256": "a0d0129b26c9dfc70d828586f8f70099569ce50e1bd9b25e21c72114d09f6d42",
"bytes": 11804
},
{
"path": "hockey_data/static/agent-diagnostics.js",
"sha256": "ff54dcf994c977f2c5989da033e66b9fae229a3eac968d0fa84b0fbec19a47d4",
"bytes": 25136
},
{
"path": "hockey_data/static/client-performance.js",
"sha256": "ecc9df717aa5df5130d50b24c26f4af3679b74ea938a3ed85211bd2c4cf862a3",
"bytes": 3138
},
{
"path": "hockey_data/static/mapping-requests.js",
"sha256": "83a429526ff65a816d1bd188f5126a75805582448cbb80da645b132594a62a0a",
"bytes": 5081
},
{
"path": "hockey_data/static/match-access.js",
"sha256": "568864e29af2f9dcb45d22308651f2217cb4bc3b0290bf109986d9200f18ce6e",
"bytes": 28817
},
{
"path": "hockey_data/static/match-status-header.js",
"sha256": "2ade3c97f6df878be97af1c85ec616a1d6d48ae18beecdfaa17fee2641356b21",
"bytes": 25869
},
{
"path": "hockey_data/static/program-log.css",
"sha256": "25557fcb942d6e8c874f43ac0f145f1eae800d11e99593eee4cee7e3aa964c8f",
"bytes": 7589
},
{
"path": "hockey_data/static/program-log.js",
"sha256": "d6676a4c00380ce88c74ce6c8267098f5ffca3371fec4a97665a4aeff7b7d1a8",
"bytes": 24733
},
{
"path": "hockey_data/static/tournament-menu.css",
"sha256": "617f9c2ae15a7473579187c332409592a0a4fc026ee4461185abc0a56b613a51",
"bytes": 45159
},
{
"path": "hockey_data/static/tournament-menu.js",
"sha256": "4b5b543d9035836bef21f079ddada76b38b40b33771a77b984d3313b7f566ff7",
"bytes": 160269
},
{
"path": "hockey_data/web_observability.py",
"sha256": "1297a9b88c3b097f96541b5e60511b377ac705ff10ca848466faf65026a1aa27",
"bytes": 13883
},
{
"path": "khl_site/khl_data_center.py",
"sha256": "b51871d647ed6a1e1e2a97f5bb7450c1aa47cf9fbc4b4172c5bb6f387b0fb635",
"bytes": 55045
},
{
"path": "requirements.txt",
"sha256": "bddefda981e4fa23e6de55be1dfbe6f2590f49c488dd737741db804c8984950c",
"bytes": 242
},
{
"path": "settings/README.md",
"sha256": "d27d9d50e73c1d5acafb1cf412cb1812a6988f15b4da1c69ae1f167183db6b4c",
"bytes": 866
},
{
"path": "tests/broadcast_readiness_frontend.cjs",
"sha256": "08ecac4dbebdbfb9618daad4c7746161f2615471036bb6c8d1d89a61f4893ef8",
"bytes": 11530
},
{
"path": "tests/build196_penalty_lifecycle.cjs",
"sha256": "bd51b467d478cebb1cef048aca0ced2dda99eecbd24dc5fadd69624bbc28e812",
"bytes": 34208
},
{
"path": "tests/build196_scoreboard_delay.cjs",
"sha256": "ebd99d9a500a5a5f8d1fd33ebbaa95ace7fd76eeee191586260e07b07686a14c",
"bytes": 34064
},
{
"path": "tests/build197_roster_mapping.cjs",
"sha256": "9b3a2d43b6986828738ff923d8ee43f52ecd2c75f3ac6da349b3eaf696d308e5",
"bytes": 32189
},
{
"path": "tests/build198_match_access_loading.cjs",
"sha256": "fdd49ecce97d5731d91e6c5150abf715ec44af9fd82f5fff920421f9b3e06856",
"bytes": 16556
},
{
"path": "tests/build198_presentation.cjs",
"sha256": "e072a9b52cdde31cb3f395fe7e0f622361f61f3e7b7308d140135278aa0affb8",
"bytes": 53621
},
{
"path": "tests/build199_aux_gate.cjs",
"sha256": "788a7b799a766f789cb300f53be5a4ae0daed5fa2631c1edf06664d21fcaa221",
"bytes": 28909
},
{
"path": "tests/build199_aux_header.cjs",
"sha256": "19479dd23574cdd6aec455290a13e15348d783dbbbce997f7791198fca2623c0",
"bytes": 13553
},
{
"path": "tests/build199_goal_penalty.cjs",
"sha256": "f867a308882dc50ef98b3040da7a50c866b39375e11dab866c1310fdaa5e11f0",
"bytes": 27229
},
{
"path": "tests/build199_penalty_clock.cjs",
"sha256": "78c5f0ff87dcdb58cd624a19ae0f29cca975e2093bfa61990685f2ccc986c6e6",
"bytes": 13177
},
{
"path": "tests/build200_goal_ack.cjs",
"sha256": "561007f7ee97104da9bd1208f7de4c8bfbb0ee8ea8d7908468703a74e08406a3",
"bytes": 16533
},
{
"path": "tests/build200_penalty_display.cjs",
"sha256": "63d90a8aa1ef524d4449eb1109d9c8dcdb8206fc2aa5eb64b4101055dbfe5b8c",
"bytes": 16915
},
{
"path": "tests/hotfix_penalty_visibility.cjs",
"sha256": "36f27846bc57bfc5debfcd9afc01efcde3924232143d2dc03a685e646b637d0e",
"bytes": 12637
},
{
"path": "tests/import_admission_harness.py",
"sha256": "29bba52b09d9ac31e7bc0b0d06679c71ad3e8341c802269f950e497b79c77921",
"bytes": 19668
},
{
"path": "tests/mapping_browser_requests.cjs",
"sha256": "c946e66523672eaa3f32f1d33ce754ff8ffe43bf6004389c58759b6c6a09f919",
"bytes": 18877
},
{
"path": "tests/match_selection_frontend.cjs",
"sha256": "b2d88d0a3fcf169794a734191badda34801a85f8ce8ddcc98531b9b414333f9c",
"bytes": 32425
},
{
"path": "tests/multi_match_harness.py",
"sha256": "f3f2a694ee736cf63a7acd32ef2af860b187bcd9e3dbd6ca21974bdd3bd870fe",
"bytes": 44744
},
{
"path": "tests/multi_match_title_harness.py",
"sha256": "ff319a94d7936aa8cf3d3c36d97d2b840a6c31fea9ab25f570afd0a80208efe8",
"bytes": 4229
},
{
"path": "tests/program_log_browser.cjs",
"sha256": "2dd38a1fcf8bc9ed341dc29c274cf8d0fd2128bc3d80e919bc39e0bdd5bf67b4",
"bytes": 8696
},
{
"path": "tests/program_log_frontend.cjs",
"sha256": "9c394c7e3c6dbe468f4d36933d6267cbfb0dbba11b529c79440fbc977fa05505",
"bytes": 2328
},
{
"path": "tests/roster_first_selection.cjs",
"sha256": "1b8027c6d2bd8803c06f00666164e220fcd35d230ea60f5656c360919b1113dd",
"bytes": 5925
},
{
"path": "tests/runtime_timer_contracts.cjs",
"sha256": "bb6d31ca41f8934ba060cf0e311d1f3c579e0413a10a3a0a3e0914c823f3716d",
"bytes": 25456
},
{
"path": "tests/runtime_timer_transport.cjs",
"sha256": "b2438bcc315fa7464ff64e55a0999b046aada79e9a75d0f07fa8ad5f1a8235e5",
"bytes": 16378
},
{
"path": "tests/stage2_penalty_countdown.cjs",
"sha256": "6c8834ce70782796a999c7156e96c7d586df5b792699edadd1d3a20cb62f0069",
"bytes": 6520
},
{
"path": "tests/test_agent_bridge.py",
"sha256": "3bb71dfafb0e259947caca740e882529124991c3f4aaa27219545eb0ec18b4d8",
"bytes": 34586
},
{
"path": "tests/test_broadcast_readiness.py",
"sha256": "241b897dd7a671ac45ac0d211a046a05fc9c0b085b1143970bec59986febe44c",
"bytes": 8059
},
{
"path": "tests/test_build100_shortcut_delivery_key_edge.py",
"sha256": "c0430c1d5496ab418622b30078851e1012e4b823febd8e714c0ddad44029bf3b",
"bytes": 4480
},
{
"path": "tests/test_build101_simple_timer_runtime.py",
"sha256": "15dcb9bab6c3b27cdcccf01c8bfb732cbf77a3a9b3380067eb18a5cefab35962",
"bytes": 1449
},
{
"path": "tests/test_build103_space_timer_fast_transport.py",
"sha256": "2c475c7ea8e28e0d53723c84d042dec4fede3f8cb4ec3a5c05daad23a47e875c",
"bytes": 5047
},
{
"path": "tests/test_build104_timer_stop_no_rollback.py",
"sha256": "5242c3769449348b3e9e55cce2367ead178cc6ab3194a5ad188b0c5ab69b3d45",
"bytes": 1047
},
{
"path": "tests/test_build105_suspend_countdown_pause.py",
"sha256": "7e3c098b2fbeaf145a0220fc7a00ffcaac634e7b6be94a40e1e22f1bd0f63616",
"bytes": 1051
},
{
"path": "tests/test_build106_runtime_authoritative_timer.py",
"sha256": "7a86b6e35bf15be01c55a53972afaf69947cc39009cc699febf6cfd118b974bc",
"bytes": 3977
},
{
"path": "tests/test_build107_pause_change_countdown.py",
"sha256": "40d5939a69ab8db155f7abb8ace9c66dda381feca7428f6c23c131c9a69b889b",
"bytes": 1161
},
{
"path": "tests/test_build108_native_pause_no_resync.py",
"sha256": "6eb175812f75c64d4a1bccaa7fed6ee25a0c82cc8acec76abfbf15059ae5f3c4",
"bytes": 1253
},
{
"path": "tests/test_build110_match_roster_atomic_switch.py",
"sha256": "c4e4e3c25a0624c8623a2a2ba5226ce5db7714d68b8699727476042c87c612eb",
"bytes": 1975
},
{
"path": "tests/test_build111_agent_match_handoff.py",
"sha256": "c28248e1b4faa9a78f3ab4e3081a7ffa6d0f8cb8e365e52f58374299613be720",
"bytes": 3593
},
{
"path": "tests/test_build190_mapping_delivery.py",
"sha256": "7100cab3bfcfc99b84cf8494f79aa9300dd6f2dfba95db597535dcd2ba4d1fb3",
"bytes": 14348
},
{
"path": "tests/test_build192_import_admission.py",
"sha256": "b1078b9033beb03ca494d447de1f084b3c657a4022deec4a29741f88d8068b73",
"bytes": 19332
},
{
"path": "tests/test_build192_mapping_browser_requests.py",
"sha256": "7cdbe7e8d7ecf00ade2a56ff88644b52600bccc1798972bb34f5648841150241",
"bytes": 730
},
{
"path": "tests/test_build192_mapping_connectivity.py",
"sha256": "9ccfeaa005ce410444e4b4b58e9091a0a35fea0aeef260121e9b8e4da9ae48f5",
"bytes": 14451
},
{
"path": "tests/test_build192_mapping_delivery.py",
"sha256": "2a749fb2d2ef78c8c19adde97e2636cc33c8939b6dc582524f5bbdb913687417",
"bytes": 26781
},
{
"path": "tests/test_build194_broadcast_readiness.py",
"sha256": "3a7628201d49746fe6324c4953da7a5cda19523cd8e4f349376bf17838140083",
"bytes": 34490
},
{
"path": "tests/test_build194_broadcast_readiness_frontend.py",
"sha256": "fab794057e663758b3431d1882a00329e35b800e35ddc799414bbb0b17626496",
"bytes": 632
},
{
"path": "tests/test_build194_inventory_session.py",
"sha256": "3ce4b48918cc763c519f7968044e0268c8238a1875d3d545adf50459aebc9703",
"bytes": 11664
},
{
"path": "tests/test_build194_mapping_title_transport.py",
"sha256": "c04b6b1db01aff8c787644a3d53087da7042dfc1579df319ca253db2e849a340",
"bytes": 28619
},
{
"path": "tests/test_build194_match_selection_frontend.py",
"sha256": "129b3cedf3580f2c5e82decb9953bf4f79780311e1c3cda48d16861edb9f93d8",
"bytes": 1094
},
{
"path": "tests/test_build194_score_auto_refresh.py",
"sha256": "1a85c78cd21b4b1f00b3054bf40c1313d6b7ecb6c6c638d7362e90b969fb3f52",
"bytes": 3545
},
{
"path": "tests/test_build194_score_sync.py",
"sha256": "0a845f5017ca537384343b48f77732cf8cbc5de4c3fa21e442dec4cb4c40eed4",
"bytes": 10572
},
{
"path": "tests/test_build195_mapping_config_apply.py",
"sha256": "27a61655223daf080d42c6d6ccc5d788f494f7bbc028228050937833eec7eb07",
"bytes": 16891
},
{
"path": "tests/test_build196_delay_settings.py",
"sha256": "9ecf43db04efd2e68f1d02181eff0c17a479e175a49e754cb4d6776dbf3630fd",
"bytes": 9441
},
{
"path": "tests/test_build196_penalty_lifecycle.py",
"sha256": "96c0d381ede3945edc594b152411e1c854ba437c7fbd3ae09bfd2b28689bf302",
"bytes": 2741
},
{
"path": "tests/test_build196_roster_first_selection.py",
"sha256": "d9534f8aab8d2f15c536442a7b9d6ccb5456abaf0be78d4c9e2a91be7bc3ad35",
"bytes": 5528
},
{
"path": "tests/test_build196_scoreboard_delay.py",
"sha256": "2a461ccc132c333a046966016234d571999e718329ef54b96a4e099356e4f54b",
"bytes": 873
},
{
"path": "tests/test_build197_roster_mapping.py",
"sha256": "cfad9b08883edfe5bac970326b3252d1e7976ae34a182ac9090adfce84c595f9",
"bytes": 1543
},
{
"path": "tests/test_build197_roster_mapping_backend.py",
"sha256": "3da4acd9145e48b0f12941c387bd7edecbd1391baacbfe5c961b5cd7087f2ad8",
"bytes": 13170
},
{
"path": "tests/test_build198_match_access_loading.py",
"sha256": "384e186c2e31838d563340e3ae54f2fe7a44906df1c139dbfab500f249ed0af9",
"bytes": 1239
},
{
"path": "tests/test_build198_presentation.py",
"sha256": "9ab801f07b65708667e700f128e3572601dd82b615c9b8c2a33aee66d7942e0b",
"bytes": 2504
},
{
"path": "tests/test_build198_priority_transport.py",
"sha256": "979ecbaab904e7eb65b523314e9561fcbec464e91bc7c2ab876de23584a9bd20",
"bytes": 29366
},
{
"path": "tests/test_build199_aux_gate.py",
"sha256": "ff13e9d23026bc8ab2de0ddbcd5b3a0bb953f736a98edbe0100f5586a630d7a1",
"bytes": 2478
},
{
"path": "tests/test_build199_aux_header.py",
"sha256": "7de28bb7046ef1c675256af0aad2aaa6d161ada2fe95e99d559123d779514b41",
"bytes": 806
},
{
"path": "tests/test_build199_goal_penalty.py",
"sha256": "0b3acdc79f007e8e1bdee67609d7af4cd5550d2f7dd3826dca4ff3514457d92f",
"bytes": 1943
},
{
"path": "tests/test_build199_penalty_clock.py",
"sha256": "4f8f6415cc93a4e6499620ff8166dd1009b6ce601553d2992af7f1125fdbeb7d",
"bytes": 2216
},
{
"path": "tests/test_build200_display_owner_persistence.py",
"sha256": "f38f7ab1399e97399227285b23fed0c3c572332533ef17d73c682467667ec1fe",
"bytes": 2889
},
{
"path": "tests/test_build200_goal_ack.py",
"sha256": "4c944d45d67e1ca2684fdcd6677c33ae14dfaf69daf72d5d0efed646f182bae0",
"bytes": 1579
},
{
"path": "tests/test_build200_penalty_display.py",
"sha256": "ec2bedd53ef67656e8f73ecd76b475147ea359027df6e6dcdccd04eb3d1db3d8",
"bytes": 1607
},
{
"path": "tests/test_build44_strength_vmix_sync.py",
"sha256": "6d09821a237ca6205f8dfba200468fb45b9241e2edf8c4bbca65baedca51b621",
"bytes": 1648
},
{
"path": "tests/test_build47_team_state_scoreboard_overlays.py",
"sha256": "00629a64af079ad365185a36f99abebfb7a7f64e1907677f2c48676828cbdefc",
"bytes": 2268
},
{
"path": "tests/test_build48_broadcast_states.py",
"sha256": "edefc5c8205b3f0ca012f38b2217fde782b7d88ae9e70c128f9db3ed284dac11",
"bytes": 4484
},
{
"path": "tests/test_build53_bottom_command_dock.py",
"sha256": "6f6d2a3b7d3db6879486dce05324f62a2e604947c16dec87779107ccb2898418",
"bytes": 3003
},
{
"path": "tests/test_build55_agent_and_account_events.py",
"sha256": "8e2ec9426d37757d5055c84dce4e59fea0093c1709161fca449657a972df1d7b",
"bytes": 2479
},
{
"path": "tests/test_build56_trigger_save_onair.py",
"sha256": "24a985ccea0fa6f23598e854a122aeb274d55cc408f45fcd74bd64755f9663e7",
"bytes": 1134
},
{
"path": "tests/test_build57_quick_panel_parameters.py",
"sha256": "cfb79c3f0c20eabee6b2e160d1432da8877e3bbb90d3d272d1ffcc7884c55a64",
"bytes": 3556
},
{
"path": "tests/test_build58_onair_target_matching.py",
"sha256": "1172386e7ab3d91e22b88dcf3d884c52710ced85b3cb65b6fc2a0dda5de9658b",
"bytes": 1133
},
{
"path": "tests/test_build59_toasts_and_adaptive_runtime.py",
"sha256": "3273d58e9443d6a3a61f0954991af2b7c79617fa38857dd781c64a44f2e06120",
"bytes": 1416
},
{
"path": "tests/test_build62_quick_panel_onair_reconcile.py",
"sha256": "63e04eb974112351ef98784843b5482293f87c77563c2ae49ea6b080b428fbae",
"bytes": 1472
},
{
"path": "tests/test_build69_runtime_entry_admin_editor.py",
"sha256": "05224179ad589e201f60b4b0745c7e9580b932b57b8f138aedb5ff137d0b3d28",
"bytes": 4134
},
{
"path": "tests/test_build72_portable_mapping_transfer.py",
"sha256": "db805a5313835323d48d70f8fc245b8b9eb08fa96d5ee205d4c28829b092c94b",
"bytes": 8788
},
{
"path": "tests/test_build75_mapping_collapsed_rescan.py",
"sha256": "0f37304936eb3cd4fb51d31567f3d811d718b6c5635750dee5cba1fad9c90164",
"bytes": 6964
},
{
"path": "tests/test_build76_mapping_compact_copy.py",
"sha256": "635438d45f133e9215a68c455d9f6c214e3e35a112f43c22d76da4c6460d169c",
"bytes": 8134
},
{
"path": "tests/test_build77_penalty_overlay_auto_in.py",
"sha256": "af30e8e6a06f1c20ed1d885d626070f688e22b9d06a9c039f365c8046117cfd4",
"bytes": 1240
},
{
"path": "tests/test_build78_penalty_mapping_context_auto_sync.py",
"sha256": "10d892d3edcd9b02198a300fd35ff76e5e647617c9f6cf10e0b163eec0eccc8c",
"bytes": 1278
},
{
"path": "tests/test_build83_penalty_advantage_and_server_onair.py",
"sha256": "2570e04380ac28120cd12708a0b9180a977a24bc9be2dbb1d98619fc4cf2d785",
"bytes": 2446
},
{
"path": "tests/test_build85_penalty_advantage_sql_reference.py",
"sha256": "5ef68485f4bf7d6f5ea5a544d7e4f572da982ae33fd4396a25ed5ff17199c3f0",
"bytes": 3301
},
{
"path": "tests/test_build86_penalty_context_prepared_titles.py",
"sha256": "2778c2ef13ce60dec9ab41fad51587e71e4819eea9b9d1f5234bd511bf371ea1",
"bytes": 4209
},
{
"path": "tests/test_build87_penalty_strength_rebalance.py",
"sha256": "836b6f928d05b8573f1353da239c28a733b39301077a6b8167563126c1d7617c",
"bytes": 996
},
{
"path": "tests/test_build88_complex_penalty_display.py",
"sha256": "3d589caea4eb37d7edd50e1e9d9d9b219d40093b988a830251c454d65a85ea3a",
"bytes": 2401
},
{
"path": "tests/test_build89_single_penalty_plate_transition.py",
"sha256": "8401dda1cbda38a36835d5de6f2c1966ad373b9dcdac92a09f561816643fe915",
"bytes": 3500
},
{
"path": "tests/test_build93_countdown_reseed_on_start.py",
"sha256": "0ec4c080dbb5003bbfd5a21365afbafabc3087d9f58785f4146f45d4d2e3baa8",
"bytes": 1059
},
{
"path": "tests/test_build95_countdown_explicit_start_stop_sync.py",
"sha256": "a35e05fe67e6fea2eb4e9a6e5dbe7c6f706fc809ad55a3bbdd2fbc97a706be10",
"bytes": 1443
},
{
"path": "tests/test_build96_penalty_strength_transition_state_machine.py",
"sha256": "be1814d23a2657a5caaf8e13f11fce3232dda5139e22c4f667ea6aba9d05b89d",
"bytes": 5539
},
{
"path": "tests/test_build97_mapping_chunked_transport.py",
"sha256": "353c0ee7311fbb8716e894d44301f720fc037acd043389bc111d8d822e84b4db",
"bytes": 10490
},
{
"path": "tests/test_build98_timer_countdown_sync_fixed_pin.py",
"sha256": "5c201d43439b25f85d6eba9fd205a0c8c5fa344b1106d65cf6a37eb13385588d",
"bytes": 2016
},
{
"path": "tests/test_hotfix_mapping_transport.py",
"sha256": "fc0637ce8a2a9c49ef55398a4968c0bd88577188772664baa03f175adde9a91c",
"bytes": 7153
},
{
"path": "tests/test_hotfix_penalty_visibility.py",
"sha256": "d222c210166e5067060953a3e908278294b4034c0e45fd1deada1c75ab91d0e3",
"bytes": 564
},
{
"path": "tests/test_khl_refresh_and_career.py",
"sha256": "11ec4abb200586ba4b02f5e5e58d7a4c3569cb153c1f4e4cb0edfccb58d50ba1",
"bytes": 18143
},
{
"path": "tests/test_khl_site_module.py",
"sha256": "94950e623ee6b02e57291a8227ecdafe501d9a9dcc4d728f61820d5577ce9473",
"bytes": 1655
},
{
"path": "tests/test_mapping_admin_visibility.py",
"sha256": "76085e0a7dae3312315fe109a2f7f3d50665aefa1c71456f2fd3e83f40b1a99a",
"bytes": 3547
},
{
"path": "tests/test_mapping_publications.py",
"sha256": "830547cb6e0efd9e38e944dc9ce91b21049ead59f4dd36b3c5fb517980f7302a",
"bytes": 16185
},
{
"path": "tests/test_multi_agent_mapping_recovery.py",
"sha256": "34512d80c328f76e7973942ec46ada0d25cfbbf8f7d8e90aea14992a0f81507f",
"bytes": 8963
},
{
"path": "tests/test_program_log.py",
"sha256": "780e1abb0bddd31393a4330418c0e89c320977fbdebbdd3e64d8e7fa854a06d3",
"bytes": 9195
},
{
"path": "tests/test_shortcut_sequences.py",
"sha256": "71daa7d9158e77da7a450a3f8e6742eb4eec05c993917b15229a5a260973c07a",
"bytes": 10577
},
{
"path": "tests/test_stable_vmix_input_identity.py",
"sha256": "479e8d12bc01b38461ee50f9ea2286bd84b19dc09ee52639a71c65240b286f51",
"bytes": 5711
},
{
"path": "tests/test_storage_maintenance.py",
"sha256": "45e6424437df347531bd446969d01ac482ae29eba2c72da8b25fbe862b651d52",
"bytes": 10519
},
{
"path": "tests/test_web_observability.py",
"sha256": "e6f4f1868c8d31b73ed499b68f851efcd9a497829c464e2d3a809a10ccdbf07d",
"bytes": 9507
},
{
"path": "tests/timer_contract_support.py",
"sha256": "88285cec8118a37a2fbe25db47b076725318baa67ac9d341bdd8ce68a592aa9c",
"bytes": 2403
},
{
"path": "tests/ui_contract_support.py",
"sha256": "e3a64451071235f8c1e916c9163f36cf10c28aa487c0db903ec259f4a63b13c4",
"bytes": 596
},
{
"path": "tests/ui_legacy_contracts.cjs",
"sha256": "483958d4b1c57946c9912169dd0fcae09ccbac47cd8eeda0b3e346b0338cbbbe",
"bytes": 28443
},
{
"path": "ui_builder/manager.py",
"sha256": "897a84d98e761bf31f46bc88c3a152d915651624b38abfdef1a1c760a339e340",
"bytes": 38577
},
{
"path": "ui_builder/static/app.js",
"sha256": "7818311c57510e16a45db0314101498d70c470e398d501cb4f633cfe80f084e6",
"bytes": 1140562
},
{
"path": "ui_builder/static/styles.css",
"sha256": "8b981b28279ce95aeb329920338f5c0ff83d28e94dbc8ebcaed1609194a79db6",
"bytes": 310246
},
{
"path": "ui_builder/storage.py",
"sha256": "e80da2f3b98f98bbdbd1022a08eb14b914acf763149219d16fd290a57b0c5f2e",
"bytes": 3823
}
],
"agent_executable_changed": false,
"agent_change_baseline": "BUILD199",
"agent_release_context": {
"version": "1.5.6",
"path": "agent/agent.exe",
"sha256": "a8fbec7c3e1dd92ac7fdbdc042b6a283e09d6f53d7779fcb7bcaa4a4146c1b0a",
"bytes": 6951424,
"changed_since_build199": false,
"new_go_run_for_build200": false,
"go_source_sha256": {
"agent/build198_priority_test.go": "0905e557fd29d95a4905fae92dcc6aa04ac480c83ebbec6a1c198bcab634e2dd",
"agent/core.go": "56569ea03a2eab6448cb1e8d6f67110fa16cac31a11c8935b0827e6ed713c83a",
"agent/dispatch.go": "65877b44b220b8b50f58449cc66f5e50f64a2519f4a1b8a2e5bf3d1141e19815",
"agent/dispatch_test.go": "ac52e2749898c99f12472f2b67ee521711c23ff3ef129ed149482d10831403a3",
"agent/main.go": "3f033c7da4f77c215e5b287401de8800c0650574321aac4104c5cc189d5e7cd3",
"agent/main_windows.go": "06d544f9f5047883a695b88de0d6861971c1a32efa319d5bcca6bb39ccd7af75",
"agent/scanner_test.go": "2eccdff0dcba1c67c5de609b7289e7116574a6e4a6d090cbef50f5ae6356290b"
},
"historical_go_evidence_build": "BUILD198",
"historical_go_tests": {
"passed": 33,
"subtests_passed": 10,
"failed": 0,
"skipped": 0,
"report": {
"path": "audit/build198_agent_go_final.jsonl",
"sha256": "551e9afd6568f1a4fd0a75cd375d2561389d0a5e2f15c877f11f10727311a70a",
"bytes": 36766
}
},
"historical_go_race": {
"passed": 33,
"subtests_passed": 10,
"failed": 0,
"skipped": 0,
"report": {
"path": "audit/build198_agent_go_final_race.jsonl",
"sha256": "a997b9ded2531307132ca885561e9211b17e7c6279a01ee396c608c79258a0e3",
"bytes": 36775
}
},
"windows_gui_amd64": true,
"executed_on_windows_for_build200": false
},
"preserved_user_files_verified": 1215
}

View File

@@ -1,18 +1,20 @@
# Хоккейное управление для vMix # Хоккейное управление для vMix
BUILD199 · `2026.11.03.1` BUILD200 · `2026.11.05.1`
Рядом с MAIN TIMER появился переключатель «Плашки · F2». Он разрешает связанные Рядом с MAIN TIMER появился переключатель «Плашки · F2». Он разрешает связанные
удаления, пустые ворота и отложенный штраф; без разрешения выдаётся основной счёт. удаления, пустые ворота и отложенный штраф; без разрешения выдаётся основной счёт.
Выключение снимает связанные плашки и сохраняет работу часов и заполнение данных. Выключение снимает связанные плашки и сохраняет работу часов и заполнение данных.
Разрешение сохраняется для выбранного матча; у нового матча оно выключено. Разрешение сохраняется для выбранного матча; у нового матча оно выключено.
Добавление второго удаления не повторяет IN уже показанного Input. После гола При встречных удалениях 2/4 минуты плашка сохраняет закреплённую сторону при
в большинстве подходящий малый штраф завершается по правилам IIHF; первая часть переходе 4on4 → PP, без повторной выдачи уже показанного Input.
2+2 оставляет 2:00, большой штраф сохраняется. Начальная загрузка и синхронизация При включённом F2 после гола в большинстве команды vMix подтверждаются до завершения
счёта не считаются новым голом. Подробности — в инструкции оператора. удаления в панели; при ошибке доставки карточка сохраняется для проверки.
Обычный гол не требует отметки «ШБ»: она нужна только для штрафного броска.
Правила 2+2 и больших штрафов сохранены; подробнее — в инструкции оператора.
Зритель получает DATA/Mapping в свой Agent, управляющие действия доступны оператору. Зритель получает DATA/Mapping в свой Agent, управляющие действия доступны оператору.
В BUILD199 используется прежний **Agent 1.5.6**, его конфигурация сохраняется. В BUILD200 используется прежний **Agent 1.5.6**, его конфигурация сохраняется.
Операторская панель: матчи и составы Stat2TV/КХЛ, таймеры, удаления, статистика, Операторская панель: матчи и составы Stat2TV/КХЛ, таймеры, удаления, статистика,
SQL/Mapping и передача титров в vMix через персональные Agent. SQL/Mapping и передача титров в vMix через персональные Agent.

View File

@@ -1,27 +1,28 @@
BUILD199 · 2026.11.03.1 BUILD200 · 2026.11.05.1
Commit: BUILD199 (2026.11.03.1) — исправить удаления и добавить разрешение плашек Commit: BUILD200 (2026.11.05.1) — закрепить плашку удаления и снимать штраф после гола по ACK vMix
Исправлены повторная выдача работающей плашки удаления, разрешение дополнительных Плашка удаления сохраняет закреплённую сторону при переходе 4on4 → PP.
плашек через галочку/F2 и завершение подходящих малых штрафов после гола большинства. Обработка гола сначала подтверждает нужные команды vMix, затем завершает
соответствующее удаление в панели. При ошибке доставки карточка сохраняется.
Подробности и правила: docs/CHANGELOG.md и docs/OPERATOR.md. Подробности и правила: docs/CHANGELOG.md и docs/OPERATOR.md.
УСТАНОВКА УСТАНОВКА
hockey_BUILD199_update.zip — накопительное обновление BUILD190–199 для BUILD189–198. hockey_BUILD200_update.zip — накопительное обновление BUILD190–200 для BUILD189–199.
Остановите сервер и Agent, сохраните резервную копию проекта и базы данных. Остановите сервер и Agent, сохраните резервную копию проекта и базы данных.
Распакуйте update ZIP в корень проекта с заменой файлов, затем запустите сервер Распакуйте update ZIP в корень проекта с заменой файлов, затем запустите сервер
и Agent и обновите страницу. Настройки, .env и agent/agent_config.json не входят и Agent и обновите страницу. Настройки, .env и agent/agent_config.json не входят
в update и сохраняются. Agent 1.5.6 и его исходники не менялись относительно BUILD198. в update и сохраняются. Agent 1.5.6 и его исходники не менялись относительно BUILD199.
При переходе с BUILD189–191 выполните в Python/venv приложения: При переходе с BUILD189–191 выполните в Python/venv приложения:
python -m pip install -r requirements.txt python -m pip install -r requirements.txt
С BUILD192–198 зависимости не менялись. С BUILD192–199 зависимости не менялись.
Полный ZIP содержит приватный снимок BUILD198; более свежие настройки текущего Полный ZIP содержит приватный снимок BUILD199; более свежие настройки текущего
эфира сохраняйте при установке. В update приватного снимка нет. эфира сохраняйте при установке. В update приватного снимка нет.
ПРОВЕРКИ ПРОВЕРКИ
Новый полный локальный прогон: 1049 passed, 0 failed/errors, без skip/xfail. Новый полный локальный прогон: 1091 passed, 0 failed/errors, без skip/xfail.
QA доказательства и ограничения: docs/validation.json. Новых Go/race-прогонов QA доказательства и ограничения: docs/validation.json. Новых Go/race-прогонов
или сборки Agent для BUILD199 не было; его байты совпадают с BUILD198. или сборки Agent для BUILD200 не было; его байты совпадают с BUILD199.
Архив проверен наложением на восстановленный FULL198. Предыдущий накопительный Архив проверен наложением на восстановленный FULL199. Предыдущий накопительный
UPDATE198 сохранён и расширен; старые архивы BUILD189–197 заново не проверялись. UPDATE199 сохранён и расширен; старые архивы BUILD189–198 заново не проверялись.
Рабочая VM и реальный vMix в локальной проверке не использовались. Рабочая VM и реальный vMix в локальной проверке не использовались.

View File

@@ -8,7 +8,7 @@ Windows x64: персональный канал между Hockey Web и лок
2. Сохраните существующий `agent_config.json`: в нём идентификатор устройства, 2. Сохраните существующий `agent_config.json`: в нём идентификатор устройства,
ключ и адреса подключения. ключ и адреса подключения.
3. Для версии ниже 1.5.6 замените `agent.exe` из текущего архива и запустите его. 3. Для версии ниже 1.5.6 замените `agent.exe` из текущего архива и запустите его.
В BUILD199 используется тот же проверенный Agent 1.5.6; повторная замена В BUILD200 используется тот же проверенный Agent 1.5.6; повторная замена
уже установленного 1.5.6 не требуется. уже установленного 1.5.6 не требуется.
4. Проверьте версию **1.5.6**, связь с сервером и vMix, выбранный матч и назначение. 4. Проверьте версию **1.5.6**, связь с сервером и vMix, выбранный матч и назначение.

2
app.py
View File

@@ -42,7 +42,7 @@ from hockey_data.program_log_router import create_program_log_router
from hockey_data.web_observability import WebAuditMiddleware, apply_web_cache_policy, create_browser_event_router, install_runtime_audit from hockey_data.web_observability import WebAuditMiddleware, apply_web_cache_policy, create_browser_event_router, install_runtime_audit
BASE_DIR = Path(__file__).resolve().parent BASE_DIR = Path(__file__).resolve().parent
BUILD_VERSION = "2026.11.03.1" BUILD_VERSION = "2026.11.05.1"
# compatibility: BUILD_VERSION = "2026.09.24.2" # compatibility: BUILD_VERSION = "2026.09.24.2"
# compatibility: BUILD_VERSION = "2026.09.23.8" # compatibility: BUILD_VERSION = "2026.09.23.8"
# compatibility: BUILD_VERSION = "2026.09.23.7" # compatibility: BUILD_VERSION = "2026.09.23.7"

View File

@@ -33,7 +33,7 @@ Stat2TV также может использовать существующий
## Обновление и восстановление ## Обновление и восстановление
В BUILD199 обновляются сервер и веб-интерфейс. Agent 1.5.6 остаётся прежним. В BUILD200 обновляются сервер и веб-интерфейс. Agent 1.5.6 остаётся прежним.
После установки перезапустите сервер и перезагрузите операторские вкладки После установки перезапустите сервер и перезагрузите операторские вкладки
через Ctrl+F5. Проверьте F2, выключенное разрешение плашек нового матча, через Ctrl+F5. Проверьте F2, выключенное разрешение плашек нового матча,
2+4 минуты на разных сторонах и гол большинства с малым/двойным малым штрафом. 2+4 минуты на разных сторонах и гол большинства с малым/двойным малым штрафом.
@@ -59,7 +59,7 @@ Stat2TV также может использовать существующий
`agent_config.json`. Версия видна в окне Agent; прежний Agent продолжит работать `agent_config.json`. Версия видна в окне Agent; прежний Agent продолжит работать
с ограниченными пакетами. Зависимости Python с BUILD193 не изменились. с ограниченными пакетами. Зависимости Python с BUILD193 не изменились.
Три целочисленных поля публикации Mapping добавляются существующим механизмом Три целочисленных поля публикации Mapping добавляются существующим механизмом
миграции схемы. После запуска проверьте `/api/health`: версия `2026.11.03.1`. миграции схемы. После запуска проверьте `/api/health`: версия `2026.11.05.1`.
BUILD195 исправляет HTTP 500 при применении конфига с новым Agent: обёртка журнала BUILD195 исправляет HTTP 500 при применении конфига с новым Agent: обёртка журнала
теперь передаёт параметры проверки подключения и поколения в отправитель. теперь передаёт параметры проверки подключения и поколения в отправитель.

View File

@@ -15,6 +15,11 @@
## Поток данных ## Поток данных
BUILD200 сохраняет владельца плашки удаления вместе с её циклом показа, чтобы
переход 4on4 → PP не переносил текущий титр на другую сторону. Подтверждение
нужных команд vMix предшествует фиксации завершения штрафа в панели; ошибка
доставки сохраняет карточку для проверки, неизвестный исход не воспроизводится.
BUILD199 хранит разрешение связанных плашек в флаге матча BUILD199 хранит разрешение связанных плашек в флаге матча
`scoreboard_auxiliaries_enabled`. Checkbox и F2 используют один контролируемый `scoreboard_auxiliaries_enabled`. Checkbox и F2 используют один контролируемый
запрос; на отправке заново проверяются матч, роль, версия намерения и конкретные запрос; на отправке заново проверяются матч, роль, версия намерения и конкретные

View File

@@ -1,5 +1,23 @@
# Изменения и история # Изменения и история
## BUILD200 — 5 ноября 2026 · 2026.11.05.1
Commit: `BUILD200 (2026.11.05.1) — закрепить плашку удаления и снимать штраф после гола по ACK vMix`.
- При встречных удалениях 2/4 минуты плашка сохраняет закреплённую сторону
в переходе 4on4 → PP, работающий Countdown не получает лишнюю повторную выдачу.
- При включённом F2 команды vMix после гола большинства подтверждаются до завершения
удаления в панели. При ошибке доставки карточка остаётся для проверки.
- Для обычного гола не требуется включать «ШБ»; отметка остаётся исключением
для настоящего штрафного броска. Правила малых, двойных малых и больших сохранены.
- Agent 1.5.6 и зависимости не изменились; пользовательские настройки обновлением
не заменяются.
Локальная проверка: **1091/1091 PASS**, без ошибок и пропусков. 42 новые
проверки входят в полный прогон; 262 файла исходников и тестов сохраняли
зафиксированные SHA. Использованы локальные Node/ASGI/Chromium и модель vMix
на границе HTTP; рабочая VM и физический vMix не подключались.
## BUILD199 — 3 ноября 2026 · 2026.11.03.1 ## BUILD199 — 3 ноября 2026 · 2026.11.03.1
Commit: `BUILD199 (2026.11.03.1) — исправить удаления и добавить разрешение плашек`. Commit: `BUILD199 (2026.11.03.1) — исправить удаления и добавить разрешение плашек`.

View File

@@ -109,6 +109,20 @@ Agent 1.5.6 выделяет срочную очередь для времени
## Таймеры и удаления ## Таймеры и удаления
В BUILD200 при встречных удалениях 2/4 минуты плашка сохраняет закреплённую
сторону при переходе 4on4 → PP. Слева 2, справа 4: правый титр показывает
4on4 2:00, затем на нём же powerplay 2:00. При зеркальном сочетании закрепляется
левый титр. Повторная выдача счёта не перезапускает работающий Countdown.
Для автоматического снятия после обычного гола большинства включите «Плашки · F2».
Достаточно кнопки +1 или нового гола SQL/API; дополнительно включать «ШБ» не нужно. При завершении штрафа требуемые
команды vMix подтверждаются до удаления карточки из панели. Если подтверждения
нет, карточка сохраняется: проверьте ошибку и журнал перед повтором.
При выключенном F2 автоматическое завершение по голу не выполняется; включение
F2 впоследствии не обрабатывает уже прошедшие голы.
Если один Input содержит поля нескольких удалений, обнуляется и останавливается
поле снятого штрафа; общий Input сохраняет оставшиеся удаления.
В BUILD199 рядом с MAIN TIMER находится «Плашки · F2». Без галочки основной В BUILD199 рядом с MAIN TIMER находится «Плашки · F2». Без галочки основной
счёт выходит самостоятельно: связанные удаления, пустые ворота и отложенный счёт выходит самостоятельно: связанные удаления, пустые ворота и отложенный
штраф не выдаются. F2 переключает ту же настройку; эта клавиша зарезервирована штраф не выдаются. F2 переключает ту же настройку; эта клавиша зарезервирована

View File

@@ -1,5 +1,5 @@
{ {
"current_build": "2026.11.03.1", "current_build": "2026.11.05.1",
"build194": { "build194": {
"commit": "BUILD194 — Mapping по титрам, стабильное переключение матчей и счёт из БД", "commit": "BUILD194 — Mapping по титрам, стабильное переключение матчей и счёт из БД",
"full_suite": { "full_suite": {
@@ -7091,5 +7091,627 @@
"For equal displayed remaining minor segments, use the selected eligible penalty according to the referee decision; without that choice the program warns and does not guess.", "For equal displayed remaining minor segments, use the selected eligible penalty according to the referee decision; without that choice the program warns and does not guess.",
"Explicit queued/coincidental metadata is honored. Three simultaneously started clocks without an assessment queue require operator review. Delayed-penalty display flags alone do not identify an unassessed penalty type." "Explicit queued/coincidental metadata is honored. Three simultaneously started clocks without an assessment queue require operator review. Delayed-penalty display flags alone do not identify an unassessed penalty type."
] ]
},
"build200": {
"commit": "BUILD200 (2026.11.05.1) — закрепить плашку удаления и снимать штраф после гола по ACK vMix",
"full_suite": {
"total_collected": 1091,
"passed": 1091,
"failed": 0,
"errors": 0,
"skipped": 0,
"xfailed": 0,
"xpassed": 0,
"exit_code": 0,
"duration_seconds": 308.592,
"failing_ids": [],
"collection_errors": [],
"environment": {
"python": "3.12.14",
"pytest": "9.2.0",
"SQLAlchemy": "2.1.6",
"fastapi": "0.162.0",
"httpx": "0.28.1",
"pydantic": "2.14.2"
}
},
"targeted_suites": {
"features": {
"total_collected": 42,
"passed": 42,
"failed": 0,
"errors": 0,
"skipped": 0,
"xfailed": 0,
"xpassed": 0,
"exit_code": 0,
"duration_seconds": 16.13,
"failing_ids": [],
"collection_errors": [],
"environment": {
"python": "3.12.14",
"pytest": "9.2.0",
"SQLAlchemy": "2.1.6",
"fastapi": "0.162.0",
"httpx": "0.28.1",
"pydantic": "2.14.2"
}
}
},
"source_sha256": {
"app.py": "51e2f9f114610206789ff7fdd6e6267b0f4efee9b00da522e5605ed6fe2ed8b6",
"hockey_data/service.py": "92d3cc563ac3d2c5c5ba773240973d7dcc9ee6a09aff8ac6a094da70e32d270d",
"ui_builder/static/app.js": "7818311c57510e16a45db0314101498d70c470e398d501cb4f633cfe80f084e6"
},
"test_sha256": {
"tests/build196_penalty_lifecycle.cjs": "bd51b467d478cebb1cef048aca0ced2dda99eecbd24dc5fadd69624bbc28e812",
"tests/build196_scoreboard_delay.cjs": "ebd99d9a500a5a5f8d1fd33ebbaa95ace7fd76eeee191586260e07b07686a14c",
"tests/build199_aux_gate.cjs": "788a7b799a766f789cb300f53be5a4ae0daed5fa2631c1edf06664d21fcaa221",
"tests/build199_goal_penalty.cjs": "f867a308882dc50ef98b3040da7a50c866b39375e11dab866c1310fdaa5e11f0",
"tests/build199_penalty_clock.cjs": "78c5f0ff87dcdb58cd624a19ae0f29cca975e2093bfa61990685f2ccc986c6e6",
"tests/build200_goal_ack.cjs": "561007f7ee97104da9bd1208f7de4c8bfbb0ee8ea8d7908468703a74e08406a3",
"tests/build200_penalty_display.cjs": "63d90a8aa1ef524d4449eb1109d9c8dcdb8206fc2aa5eb64b4101055dbfe5b8c",
"tests/hotfix_penalty_visibility.cjs": "36f27846bc57bfc5debfcd9afc01efcde3924232143d2dc03a685e646b637d0e",
"tests/runtime_timer_contracts.cjs": "bb6d31ca41f8934ba060cf0e311d1f3c579e0413a10a3a0a3e0914c823f3716d",
"tests/stage2_penalty_countdown.cjs": "6c8834ce70782796a999c7156e96c7d586df5b792699edadd1d3a20cb62f0069",
"tests/test_build200_display_owner_persistence.py": "f38f7ab1399e97399227285b23fed0c3c572332533ef17d73c682467667ec1fe",
"tests/test_build200_goal_ack.py": "4c944d45d67e1ca2684fdcd6677c33ae14dfaf69daf72d5d0efed646f182bae0",
"tests/test_build200_penalty_display.py": "ec2bedd53ef67656e8f73ecd76b475147ea359027df6e6dcdccd04eb3d1db3d8",
"tests/test_build83_penalty_advantage_and_server_onair.py": "2570e04380ac28120cd12708a0b9180a977a24bc9be2dbb1d98619fc4cf2d785",
"tests/test_build85_penalty_advantage_sql_reference.py": "5ef68485f4bf7d6f5ea5a544d7e4f572da982ae33fd4396a25ed5ff17199c3f0",
"tests/test_build87_penalty_strength_rebalance.py": "836b6f928d05b8573f1353da239c28a733b39301077a6b8167563126c1d7617c",
"tests/test_build88_complex_penalty_display.py": "3d589caea4eb37d7edd50e1e9d9d9b219d40093b988a830251c454d65a85ea3a",
"tests/test_build89_single_penalty_plate_transition.py": "8401dda1cbda38a36835d5de6f2c1966ad373b9dcdac92a09f561816643fe915"
},
"test_harness_review": {
"ok": true,
"build": "2026.11.05.1",
"root_reviewed": true,
"runtime_behavior_not_weakened": true,
"timings_unchanged": true,
"changes": [
{
"path": "tests/runtime_timer_contracts.cjs",
"before_sha256": "36ae05bac672738a91e69df033530043b9ca4121832af5e384200648ed460b73",
"after_sha256": "bb6d31ca41f8934ba060cf0e311d1f3c579e0413a10a3a0a3e0914c823f3716d",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Load actual newly called production helpers and model Mapping/physical ACK at the HTTP edge; preserve existing assertions and numeric timing settings. Hotfix awaits actual transport completion and supplies explicit external OUT tally before its existing F1 restore assertion.",
"review": "audit/build200_clock_fixture_maintenance_review.json"
},
{
"path": "tests/build196_penalty_lifecycle.cjs",
"before_sha256": "a026d2f3118562386d14150c54a3b7c9ea1d5f3b31e83a3b1066dc26162dce30",
"after_sha256": "bd51b467d478cebb1cef048aca0ced2dda99eecbd24dc5fadd69624bbc28e812",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Load actual newly called production helpers and model Mapping/physical ACK at the HTTP edge; preserve existing assertions and numeric timing settings. Hotfix awaits actual transport completion and supplies explicit external OUT tally before its existing F1 restore assertion.",
"review": "audit/build200_clock_fixture_maintenance_review.json"
},
{
"path": "tests/hotfix_penalty_visibility.cjs",
"before_sha256": "25d8ad6fb5db11e1486e4b40c96b967845f7409f3bf18ac4158101107338bcb5",
"after_sha256": "36f27846bc57bfc5debfcd9afc01efcde3924232143d2dc03a685e646b637d0e",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Load actual newly called production helpers and model Mapping/physical ACK at the HTTP edge; preserve existing assertions and numeric timing settings. Hotfix awaits actual transport completion and supplies explicit external OUT tally before its existing F1 restore assertion.",
"review": "audit/build200_clock_fixture_maintenance_review.json"
},
{
"path": "tests/stage2_penalty_countdown.cjs",
"before_sha256": "c2ebe885c6dec99c31239bb40ce67a45782cf1f52726756810308854e2eff04e",
"after_sha256": "6c8834ce70782796a999c7156e96c7d586df5b792699edadd1d3a20cb62f0069",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Load actual newly called production helpers and model Mapping/physical ACK at the HTTP edge; preserve existing assertions and numeric timing settings. Hotfix awaits actual transport completion and supplies explicit external OUT tally before its existing F1 restore assertion. Goal integration subsequently calls hockeyGoalResolutionData; the real helper definition was added to the same closure after an actual MissingHelper diagnostic. No assertions/timing values changed.",
"review": "audit/build200_clock_fixture_maintenance_review.json"
},
{
"path": "tests/build199_penalty_clock.cjs",
"before_sha256": "b8a70c1f03174a22e62c9bf65bfc3236cc0ba35e91bcc3ac88eb9da58b6fa6d7",
"after_sha256": "78c5f0ff87dcdb58cd624a19ae0f29cca975e2093bfa61990685f2ccc986c6e6",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Four cases follow the explicit new physical long-penalty owner; one initial IN is required when switching to a different Input, followed by an unchanged no-repeat reconciliation check. Existing countdown/running assertions remain.",
"review": "audit/build200_clock_fixture_maintenance_review.json"
},
{
"path": "tests/build196_scoreboard_delay.cjs",
"before_sha256": "53b44874a346f60f3019ffe9e53c45e6ec711ff9f52574fd77a4cde5d4059fa3",
"after_sha256": "ebd99d9a500a5a5f8d1fd33ebbaa95ace7fd76eeee191586260e07b07686a14c",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Import five actual production helper definitions needed by pending-delivery, current display target, caption guard and final native dispatch sampler. No production helper is stubbed. The final goal ticker also calls hockeyGoalResolutionData; its actual helper was added after six concrete MissingHelper diagnostics. Assertions and timing settings remain unchanged.",
"review": "audit/build200_release_fixture_maintenance.json"
},
{
"path": "tests/build199_aux_gate.cjs",
"before_sha256": "e9357192a936b0e3d36d4d0c3b660cb60ed3b814624fa48a60be8d3fdccbc076",
"after_sha256": "788a7b799a766f789cb300f53be5a4ae0daed5fa2631c1edf06664d21fcaa221",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Separate stale/fresh Mapping holds and await each real request. Stage the existing race through actual independent timer-fast transport because new cold-IN/conditional Mapping use one ordinary queue and cannot race themselves. Preserve every prior assertion and both explicit-caption modes.",
"review": "audit/build200_release_fixture_maintenance.json"
},
{
"path": "tests/build199_goal_penalty.cjs",
"before_sha256": "c6a9a6187bbfb6e8e063cbdfdb060fb59bb3987a8314b98ecb680566ddba3b29",
"after_sha256": "f867a308882dc50ef98b3040da7a50c866b39375e11dab866c1310fdaa5e11f0",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Two cases now require retaining the row and not persisting deletion before physical ACK. Unknown delivery additionally checks retained unknown status and no replay. The queued replacement fixture explicitly replaces the still-present original card; final protection of the new native assignment is unchanged. Only the exact diagnostic text was updated to the new explicit error.",
"review": "audit/build200_goal_fixture_maintenance.json"
},
{
"path": "tests/test_build83_penalty_advantage_and_server_onair.py",
"before_sha256": "bfb8cb1e312cd2fb81e0943d59499c11c25a78d0b044e1d39a075359f51c7f0f",
"after_sha256": "2570e04380ac28120cd12708a0b9180a977a24bc9be2dbb1d98619fc4cf2d785",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Replace obsolete source-string routing assertions with actual production-function execution for the same single-plate/shortest-transition intent and the explicitly requested physical owner. All unrelated backend strength, SQL, ordering and owner checks remain unchanged; testcase IDs are retained.",
"review": "audit/build200_static_contract_maintenance.json"
},
{
"path": "tests/test_build85_penalty_advantage_sql_reference.py",
"before_sha256": "a27869f76457dc3f2a21253f59026420874910ac0313dcda8c772010d99ce288",
"after_sha256": "5ef68485f4bf7d6f5ea5a544d7e4f572da982ae33fd4396a25ed5ff17199c3f0",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Replace obsolete source-string routing assertions with actual production-function execution for the same single-plate/shortest-transition intent and the explicitly requested physical owner. All unrelated backend strength, SQL, ordering and owner checks remain unchanged; testcase IDs are retained.",
"review": "audit/build200_static_contract_maintenance.json"
},
{
"path": "tests/test_build87_penalty_strength_rebalance.py",
"before_sha256": "dd3fa9118e8a4ce8d1fc3856380344551d258edc62ad01cf5368f52b2d19c5b2",
"after_sha256": "836b6f928d05b8573f1353da239c28a733b39301077a6b8167563126c1d7617c",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Replace obsolete source-string routing assertions with actual production-function execution for the same single-plate/shortest-transition intent and the explicitly requested physical owner. All unrelated backend strength, SQL, ordering and owner checks remain unchanged; testcase IDs are retained.",
"review": "audit/build200_static_contract_maintenance.json"
},
{
"path": "tests/test_build88_complex_penalty_display.py",
"before_sha256": "f72ca748f629d41d308478c6eed38d460695d74b52ddb59ebeeba39eb6d3b251",
"after_sha256": "3d589caea4eb37d7edd50e1e9d9d9b219d40093b988a830251c454d65a85ea3a",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Replace obsolete source-string routing assertions with actual production-function execution for the same single-plate/shortest-transition intent and the explicitly requested physical owner. All unrelated backend strength, SQL, ordering and owner checks remain unchanged; testcase IDs are retained.",
"review": "audit/build200_static_contract_maintenance.json"
},
{
"path": "tests/test_build89_single_penalty_plate_transition.py",
"before_sha256": "d9a8255c5ad2ace83b9d688dd0f5f4615f409eb94b3ddd1740f8b07b2753be66",
"after_sha256": "8401dda1cbda38a36835d5de6f2c1966ad373b9dcdac92a09f561816643fe915",
"timings_unchanged": true,
"expected_behavior_not_weakened": true,
"reason": "Replace obsolete source-string routing assertions with actual production-function execution for the same single-plate/shortest-transition intent and the explicitly requested physical owner. All unrelated backend strength, SQL, ordering and owner checks remain unchanged; testcase IDs are retained.",
"review": "audit/build200_static_contract_maintenance.json"
}
],
"negative_evidence": [
"audit/build200_affected_initial.json",
"audit/build200_affected_initial.log",
"audit/build200_affected_initial.xml"
],
"supporting_artifacts": [
"audit/build200_clock_fixture_maintenance.diff",
"audit/build200_release_fixture_maintenance.diff",
"audit/build200_goal_fixture_maintenance.diff",
"audit/build200_goal_legacy_initial.json",
"audit/build200_goal_legacy_initial.log",
"audit/build200_goal_legacy_initial.xml",
"audit/build200_goal_legacy_followup.json",
"audit/build200_goal_legacy_followup.log",
"audit/build200_goal_legacy_followup.xml",
"audit/build200_stage2_goal_dependency.diff",
"audit/build200_stage2_goal_dependency_before.json",
"audit/build200_stage2_goal_dependency_before.log",
"audit/build200_stage2_goal_dependency_before.xml",
"audit/build200_stage2_goal_dependency_after.json",
"audit/build200_stage2_goal_dependency_after.log",
"audit/build200_stage2_goal_dependency_after.xml",
"audit/build200_delay_goal_dependency.diff",
"audit/build200_before_history_fix_affected_final.json",
"audit/build200_before_history_fix_affected_final.log",
"audit/build200_before_history_fix_affected_final.xml",
"audit/build200_before_static_contract_fix_full_summary.json",
"audit/build200_before_static_contract_fix_full_summary.log",
"audit/build200_before_static_contract_fix_full_summary.xml",
"audit/build200_static_contract_maintenance.diff"
],
"note": "Root reviewed both exact diffs against immutable FULL199. Component runs are historical after further runtime integration. Only the eventual frozen joint full/features run proves current freshness; component counts overlap."
},
"new_full_suite_executed": true,
"agent_release_context": {
"version": "1.5.6",
"path": "agent/agent.exe",
"sha256": "a8fbec7c3e1dd92ac7fdbdc042b6a283e09d6f53d7779fcb7bcaa4a4146c1b0a",
"bytes": 6951424,
"changed_since_build199": false,
"new_go_run_for_build200": false,
"go_source_sha256": {
"agent/build198_priority_test.go": "0905e557fd29d95a4905fae92dcc6aa04ac480c83ebbec6a1c198bcab634e2dd",
"agent/core.go": "56569ea03a2eab6448cb1e8d6f67110fa16cac31a11c8935b0827e6ed713c83a",
"agent/dispatch.go": "65877b44b220b8b50f58449cc66f5e50f64a2519f4a1b8a2e5bf3d1141e19815",
"agent/dispatch_test.go": "ac52e2749898c99f12472f2b67ee521711c23ff3ef129ed149482d10831403a3",
"agent/main.go": "3f033c7da4f77c215e5b287401de8800c0650574321aac4104c5cc189d5e7cd3",
"agent/main_windows.go": "06d544f9f5047883a695b88de0d6861971c1a32efa319d5bcca6bb39ccd7af75",
"agent/scanner_test.go": "2eccdff0dcba1c67c5de609b7289e7116574a6e4a6d090cbef50f5ae6356290b"
},
"historical_go_evidence_build": "BUILD198",
"historical_go_tests": {
"passed": 33,
"subtests_passed": 10,
"failed": 0,
"skipped": 0,
"report": {
"path": "audit/build198_agent_go_final.jsonl",
"sha256": "551e9afd6568f1a4fd0a75cd375d2561389d0a5e2f15c877f11f10727311a70a",
"bytes": 36766
}
},
"historical_go_race": {
"passed": 33,
"subtests_passed": 10,
"failed": 0,
"skipped": 0,
"report": {
"path": "audit/build198_agent_go_final_race.jsonl",
"sha256": "a997b9ded2531307132ca885561e9211b17e7c6279a01ee396c608c79258a0e3",
"bytes": 36775
}
},
"windows_gui_amd64": true,
"executed_on_windows_for_build200": false
},
"regression_evidence": {
"functional_negatives": {
"controls": [
{
"label": "backend display owner survives timers API",
"report": {
"path": "audit/build200_owner_backend_before.json",
"sha256": "9b9c65c85daad0aa0f20163c842d9f778f52b5785b064b64265a1f11a0057520",
"bytes": 2261
},
"junit": {
"path": "audit/build200_owner_backend_before.xml",
"sha256": "9b3a018a820ef4955c69860f75152e3482178f084223fcdb313284cde1d57a26",
"bytes": 2460
},
"passed": 1,
"call_failures": 2,
"errors": 0,
"baseline_source_files": {
"hockey_data/service.py": {
"path": "audit/build200_backend_before/hockey_data/service.py",
"sha256": "b372ba7cd1d7abc1fea1889ff9a639d926ff1612be7bacf1eb1c2fc96f46b0bc",
"bytes": 423550
}
},
"note": "The BUILD200 backend test ran before production changes; service bytes were verified identical to the immutable FULL199 ZIP. Both physical owner sides were discarded by the real API, not by a missing helper."
},
{
"label": "physical penalty plate routing and presentation",
"report": {
"path": "audit/build200_display_before.json",
"sha256": "61328338b74ba58a418c2a6bfbd0e87b263fb2d465863165f21364c9e27ec8c1",
"bytes": 11471
},
"junit": {
"path": "audit/build200_display_before.xml",
"sha256": "9dd4b279b9d16ebd879b7627b3a3fd24ddf49a0268f5d64c3765496585394ec9",
"bytes": 26124
},
"passed": 3,
"call_failures": 16,
"errors": 0,
"baseline_source_files": {
"ui_builder/static/app.js": {
"path": "audit/build200_display_immutable199/ui_builder/static/app.js",
"sha256": "4c901b10a721859757286be438dfa6c449957976515a1329110b7e19c8927aa1",
"bytes": 1100741
}
},
"note": "Same actual browser cases run via BUILD200_RUNTIME_ROOT against the copied immutable BUILD199 app. Failures cover wrong plate, phase handoff, caption ordering and pending mixed command handling; compatibility passes are retained."
},
{
"label": "goal F2 permission and physical ACK before UI mutation",
"report": {
"path": "audit/build200_goal_before199.json",
"sha256": "d4e4790a00c711c4b0117bfd687ffdfe5f22b1d85119fbeb2d8cc856f0eef0c1",
"bytes": 8712
},
"junit": {
"path": "audit/build200_goal_before199.xml",
"sha256": "7b0cb75a5649336f0474a538ef81a4000584f9cc45826a22b6d2ee9ba1556638",
"bytes": 21104
},
"passed": 3,
"call_failures": 12,
"errors": 0,
"baseline_source_files": {
"ui_builder/static/app.js": {
"path": "audit/build200_goal_before199/ui_builder/static/app.js",
"sha256": "4c901b10a721859757286be438dfa6c449957976515a1329110b7e19c8927aa1",
"bytes": 1100741
}
},
"note": "Initial actual 15-case goal harness on immutable FULL199, with complete native JSON, JUnit and captured log. It proves optimistic UI mutation and missing F2 gating. Five further final-harness cases are measured in the combined current feature/full QA; the later 20-case negative without a captured log is not used as release evidence."
}
],
"artifacts": {
"audit/build200_backend_before/hockey_data/service.py": {
"path": "audit/build200_backend_before/hockey_data/service.py",
"sha256": "b372ba7cd1d7abc1fea1889ff9a639d926ff1612be7bacf1eb1c2fc96f46b0bc",
"bytes": 423550
},
"audit/build200_display_before.json": {
"path": "audit/build200_display_before.json",
"sha256": "61328338b74ba58a418c2a6bfbd0e87b263fb2d465863165f21364c9e27ec8c1",
"bytes": 11471
},
"audit/build200_display_before.log": {
"path": "audit/build200_display_before.log",
"sha256": "69a02db36405bd46fa7ab3d051548ace1807467fd00ab6e30ccff44da3c589f6",
"bytes": 20555
},
"audit/build200_display_before.xml": {
"path": "audit/build200_display_before.xml",
"sha256": "9dd4b279b9d16ebd879b7627b3a3fd24ddf49a0268f5d64c3765496585394ec9",
"bytes": 26124
},
"audit/build200_display_immutable199/ui_builder/static/app.js": {
"path": "audit/build200_display_immutable199/ui_builder/static/app.js",
"sha256": "4c901b10a721859757286be438dfa6c449957976515a1329110b7e19c8927aa1",
"bytes": 1100741
},
"audit/build200_goal_before199/ui_builder/static/app.js": {
"path": "audit/build200_goal_before199/ui_builder/static/app.js",
"sha256": "4c901b10a721859757286be438dfa6c449957976515a1329110b7e19c8927aa1",
"bytes": 1100741
},
"audit/build200_goal_before199.json": {
"path": "audit/build200_goal_before199.json",
"sha256": "d4e4790a00c711c4b0117bfd687ffdfe5f22b1d85119fbeb2d8cc856f0eef0c1",
"bytes": 8712
},
"audit/build200_goal_before199.log": {
"path": "audit/build200_goal_before199.log",
"sha256": "3b8c6c07e9586bceac9dd17106b09a2dd666c21b08e4bdf85a34ee994255273b",
"bytes": 14979
},
"audit/build200_goal_before199.xml": {
"path": "audit/build200_goal_before199.xml",
"sha256": "7b0cb75a5649336f0474a538ef81a4000584f9cc45826a22b6d2ee9ba1556638",
"bytes": 21104
},
"audit/build200_owner_backend_before.json": {
"path": "audit/build200_owner_backend_before.json",
"sha256": "9b9c65c85daad0aa0f20163c842d9f778f52b5785b064b64265a1f11a0057520",
"bytes": 2261
},
"audit/build200_owner_backend_before.log": {
"path": "audit/build200_owner_backend_before.log",
"sha256": "547d466eea7ad23822bc2ea932366e835ff058440e52a8bb25771e59646ed311",
"bytes": 2001
},
"audit/build200_owner_backend_before.xml": {
"path": "audit/build200_owner_backend_before.xml",
"sha256": "9b3a018a820ef4955c69860f75152e3482178f084223fcdb313284cde1d57a26",
"bytes": 2460
},
"audit/build200_regression_evidence.json": {
"path": "audit/build200_regression_evidence.json",
"sha256": "8316de5345b94260dbe31098158bca9b7ee3866bbe96456c6804b50f6d4bbd48",
"bytes": 6408
}
},
"infrastructure_failures_used_as_functional_proof": false
},
"maintenance_artifacts": {
"audit/build200_affected_initial.json": {
"path": "audit/build200_affected_initial.json",
"sha256": "772eaf53dd32d4114832d98baf42c848f335d0b4043a438742eaf329d71e7006",
"bytes": 157306
},
"audit/build200_affected_initial.log": {
"path": "audit/build200_affected_initial.log",
"sha256": "87bbd0dd8517f42570828651b2e062af23377103569fad0662956bac43dbf7fd",
"bytes": 63671
},
"audit/build200_affected_initial.xml": {
"path": "audit/build200_affected_initial.xml",
"sha256": "aa19abc7f0c1f5ade488f6a06aec13561240cbefba5b3bf2f1ccc2bc80e237df",
"bytes": 115727
},
"audit/build200_before_history_fix_affected_final.json": {
"path": "audit/build200_before_history_fix_affected_final.json",
"sha256": "6c393134092cc6fb664ce4b1cadda7fe09de544661e5513bbaa92ea9309e69fa",
"bytes": 154356
},
"audit/build200_before_history_fix_affected_final.log": {
"path": "audit/build200_before_history_fix_affected_final.log",
"sha256": "e935843ae07b05da46df3f13f8febc931b7d4bacdf5649e070be387181b972ea",
"bytes": 10952
},
"audit/build200_before_history_fix_affected_final.xml": {
"path": "audit/build200_before_history_fix_affected_final.xml",
"sha256": "986bc263303da0bcf477b0e96177097ad565810088f0851a041e846a736a6fa5",
"bytes": 55698
},
"audit/build200_before_static_contract_fix_full_summary.json": {
"path": "audit/build200_before_static_contract_fix_full_summary.json",
"sha256": "9ec6b50bd69ea4a30cfa9abef85ab2f14b38f24da18f8552f281ea1d216f7986",
"bytes": 550961
},
"audit/build200_before_static_contract_fix_full_summary.log": {
"path": "audit/build200_before_static_contract_fix_full_summary.log",
"sha256": "703d384151d721b1fec3a24b47f7715e2413c018d66728b395821cf0d9f37f9f",
"bytes": 5746
},
"audit/build200_before_static_contract_fix_full_summary.xml": {
"path": "audit/build200_before_static_contract_fix_full_summary.xml",
"sha256": "aec6484cb87eb6f11a3021674d8188d3e70c6052119e6c075047f000a8fdb1b0",
"bytes": 166056
},
"audit/build200_clock_fixture_maintenance.diff": {
"path": "audit/build200_clock_fixture_maintenance.diff",
"sha256": "8145abb6a05e6f296892ef2b18e4930df29933f89096dc9d094d9ce6e7b9ff0c",
"bytes": 20169
},
"audit/build200_clock_fixture_maintenance_review.json": {
"path": "audit/build200_clock_fixture_maintenance_review.json",
"sha256": "abc07118c103a404fc5e7a56d498bcda8536d2d088d633e840166ea913fcd8ab",
"bytes": 6993
},
"audit/build200_delay_goal_dependency.diff": {
"path": "audit/build200_delay_goal_dependency.diff",
"sha256": "4537b8501c207abec60c7e42e9bfa0746b6a85a7044cdf9673e751968dd42131",
"bytes": 557
},
"audit/build200_goal_fixture_maintenance.diff": {
"path": "audit/build200_goal_fixture_maintenance.diff",
"sha256": "f55e0399e544974017c08bb2a080a9a8cc35f79430febdeddb7fdc11760fb4b9",
"bytes": 2181
},
"audit/build200_goal_fixture_maintenance.json": {
"path": "audit/build200_goal_fixture_maintenance.json",
"sha256": "5cd658919b5529fa8076ce6ab5400504baf6b7399a3255b05a969a006f2b5845",
"bytes": 1524
},
"audit/build200_goal_legacy_followup.json": {
"path": "audit/build200_goal_legacy_followup.json",
"sha256": "a5e62c268a84454ab8e3802dc1ff1e46c41bfc109b2686a0de216eecd0df3b67",
"bytes": 1448
},
"audit/build200_goal_legacy_followup.log": {
"path": "audit/build200_goal_legacy_followup.log",
"sha256": "8a4fd6e1c346cd938ac5ea9c529aa5964186172335830d45758acb38f8dfaea5",
"bytes": 113
},
"audit/build200_goal_legacy_followup.xml": {
"path": "audit/build200_goal_legacy_followup.xml",
"sha256": "86ccd2fa7e4d169558ac6ddc62dbd1f2422fdbaf9ddea101daeae04df5132408",
"bytes": 512
},
"audit/build200_goal_legacy_initial.json": {
"path": "audit/build200_goal_legacy_initial.json",
"sha256": "3f81644dee3eb6daa94e00dc439c4a75434f045efb419668ea490a0e01430ebb",
"bytes": 1649
},
"audit/build200_goal_legacy_initial.log": {
"path": "audit/build200_goal_legacy_initial.log",
"sha256": "e90cd10853716335bbd11a651257e65094abad66ea9843c3ccf256ecaa69eb28",
"bytes": 2791
},
"audit/build200_goal_legacy_initial.xml": {
"path": "audit/build200_goal_legacy_initial.xml",
"sha256": "dafdf3b7f5b4726766f8e34d82531bd49d39bde61c47d8e6c745725ae6f4f663",
"bytes": 3701
},
"audit/build200_release_fixture_maintenance.diff": {
"path": "audit/build200_release_fixture_maintenance.diff",
"sha256": "14fbbe6b2b04fa05ea040708dda0ec7b7a8dc58d8c7b69b77e7b2b7103e3b878",
"bytes": 3381
},
"audit/build200_release_fixture_maintenance.json": {
"path": "audit/build200_release_fixture_maintenance.json",
"sha256": "3c704c576d54f7f6a12b4a67480c734bdf167e92d90935574f9161e98afa22b1",
"bytes": 8309
},
"audit/build200_stage2_goal_dependency.diff": {
"path": "audit/build200_stage2_goal_dependency.diff",
"sha256": "9ea3d247758d352017a30b604d9294b9fcfaa2aeef8004802c45ba8571f55ff7",
"bytes": 918
},
"audit/build200_stage2_goal_dependency_after.json": {
"path": "audit/build200_stage2_goal_dependency_after.json",
"sha256": "a45d84827453fc548de603934a707759ffd5cb7afb242d66ed9d63d3b48766b8",
"bytes": 958
},
"audit/build200_stage2_goal_dependency_after.log": {
"path": "audit/build200_stage2_goal_dependency_after.log",
"sha256": "c91dad03511eb111dba9f317cdb7962c64ec389c7d259de488e167c78aac1b31",
"bytes": 98
},
"audit/build200_stage2_goal_dependency_after.xml": {
"path": "audit/build200_stage2_goal_dependency_after.xml",
"sha256": "e829e9ed64980b58132d34bafabc9ede861126b6ba8b6243b8186b93cdaad0b4",
"bytes": 377
},
"audit/build200_stage2_goal_dependency_before.json": {
"path": "audit/build200_stage2_goal_dependency_before.json",
"sha256": "12a53dcdf9bb61edd70f3dfb8acc2fabacb09ca36d0fe915547baceb3189b950",
"bytes": 1056
},
"audit/build200_stage2_goal_dependency_before.log": {
"path": "audit/build200_stage2_goal_dependency_before.log",
"sha256": "798d0911db13e7fad4e3a9ace4c1fc6267ad7928eb80417751e621bf7408b583",
"bytes": 1941
},
"audit/build200_stage2_goal_dependency_before.xml": {
"path": "audit/build200_stage2_goal_dependency_before.xml",
"sha256": "52fa287ea81381c3d73e5fbd6beeb2f01e5021cea52566f2ddd2f3300a16dd57",
"bytes": 2380
},
"audit/build200_static_contract_maintenance.diff": {
"path": "audit/build200_static_contract_maintenance.diff",
"sha256": "8e8fa5e3de84339d68283661436cf0b742e9bb01d2a2989764a6402525b19673",
"bytes": 6135
},
"audit/build200_static_contract_maintenance.json": {
"path": "audit/build200_static_contract_maintenance.json",
"sha256": "a79759572230d840f101ea58e010e874dd56c8cc34d5da8c88c8a4b60ca3ef1c",
"bytes": 4027
},
"audit/build200_test_harness_review.json": {
"path": "audit/build200_test_harness_review.json",
"sha256": "edd625d0192c60a068711fbaf6876def9ff0c89ad1c35145d5345a6abbee67ad",
"bytes": 11382
}
},
"combined_features": {
"case_counts_by_file": {
"tests/test_build200_display_owner_persistence.py": 3,
"tests/test_build200_goal_ack.py": 20,
"tests/test_build200_penalty_display.py": 19
},
"artifacts": {
"audit/build200_features_final.json": {
"path": "audit/build200_features_final.json",
"sha256": "215c870c86f2f56c19fe0ca65c07465f5e2eb16f0fbb1079ca969022bc5468af",
"bytes": 20965
},
"audit/build200_features_final.log": {
"path": "audit/build200_features_final.log",
"sha256": "0d8c7e6edd7af157b4d4cdb13e388e688b2b0552785ef7f98213799df984ddcc",
"bytes": 113
},
"audit/build200_features_final.xml": {
"path": "audit/build200_features_final.xml",
"sha256": "84191011c67360a33525a07e7c1c6de3b4685eca75e7b92241da99783a076083",
"bytes": 5788
},
"audit/build200_full_hashes_features_after.json": {
"path": "audit/build200_full_hashes_features_after.json",
"sha256": "3d859d250f84c1db6bb160461791ae01ce8507eb591b20de3aa6880e0686fd89",
"bytes": 30535
}
},
"note": "One real combined current-source run; focused cases repeat in the full suite and are not added twice."
}
},
"behavior": [
"Keep the assigned physical penalty plate side through opposite2/4-minute penalties and4on4→power-play transitions; native clocks remain bound to their current event.",
"Prepare and confirm goal-related vMix commands before committing removal/shortening of the penalty card; retain the card on missing or failed ACK.",
"Preserve the existing F2 permission, viewer DATA separation and minor/double-minor/major/penalty-shot rules."
],
"limits": [
"Offline SQLite/ASGI and real production-function Node tests with deterministic browser/API/vMix HTTP doubles. No production VM, PostgreSQL, Stat2TV or physical vMix connection.",
"Agent1.5.6 and all seven Go files are byte-identical to BUILD199. No fresh Go/race, Agent build or Windows execution is claimed; earlier Agent evidence remains historical BUILD198 provenance.",
"Synthetic ACKs prove ordering and state-commit behavior, not physical vMix animation timing. Unknown delivery outcomes are not automatically replayed.",
"Normal power-play goals require no ShB mode. A real regulation penalty shot must still be marked by the operator or source goal_type; equal eligible minor segments require the referee-directed choice."
]
} }
} }

View File

@@ -7690,6 +7690,13 @@ class HockeyDataService:
"had_advantage": bool(source_cycle.get("had_advantage", False)) and bool(cycle_side), "had_advantage": bool(source_cycle.get("had_advantage", False)) and bool(cycle_side),
"last_advantage_side": cycle_side, "last_advantage_side": cycle_side,
} }
# The physical plate may stay on the longer opposing penalty while the
# actual numerical advantage changes. Keep these identities separate.
display_side = str(source_cycle.get("display_owner_side") or "").lower()
display_key = source_cycle.get("display_owner_event_key")
if display_side in {"home", "away"} and isinstance(display_key, str) and display_key.strip():
advantage_cycle["display_owner_side"] = display_side
advantage_cycle["display_owner_event_key"] = display_key.strip()[:256]
normalised = { normalised = {
"saved": True, "saved": True,

View File

@@ -14,6 +14,30 @@ function extract(name) {
assert.ok(end > start, `Missing production function end ${name}`); assert.ok(end > start, `Missing production function end ${name}`);
return source.slice(start, end + 4); return source.slice(start, end + 4);
} }
// Load new transport dependencies from production; existing I/O/DOM edges stay local.
function productionClosure(context, roots) {
const functions = new Map(), pattern = /^( {0,2})(?:async )?function (\w+)\(/gm;
let match;
while ((match = pattern.exec(source))) {
const start = match.index, lineEnd = source.indexOf('\n', start);
const singleLine = /\}\s*;?\s*$/.test(source.slice(start, lineEnd));
const end = singleLine ? lineEnd : source.indexOf('\n' + match[1] + '}', start) + match[1].length + 2;
assert.ok(end > start, 'Unclosed production helper ' + match[2]);
functions.set(match[2], source.slice(start, end));
}
const needed = new Set(roots);
function visit(name) {
assert.ok(functions.has(name), 'Missing actual production helper ' + name);
for (const candidate of functions.keys()) {
if (needed.has(candidate) || typeof context[candidate] === 'function') continue;
if (new RegExp('\\b' + candidate + '\\s*\\(').test(functions.get(name))) {
needed.add(candidate); visit(candidate);
}
}
}
roots.forEach(visit);
return [...needed].map(name => functions.get(name)).join('\n');
}
function fakeClock(start = 1000) { function fakeClock(start = 1000) {
let now = start, nextId = 1; let now = start, nextId = 1;
const tasks = new Map(); const tasks = new Map();
@@ -110,7 +134,7 @@ function makeRuntime(spec = {}) {
score: { home: 0, away: 0 }, flags: { scoreboard_auxiliaries_enabled: true }, values: {}, timers: clone(snapshot), strength: clone(strength) }; score: { home: 0, away: 0 }, flags: { scoreboard_auxiliaries_enabled: true }, values: {}, timers: clone(snapshot), strength: clone(strength) };
} }
const context = { const context = {
console: { ...console, error: (...args) => errors.push(args) }, Date: clock.Date, console: { ...console, error: (...args) => errors.push(args) }, Date: clock.Date, AbortController, URLSearchParams,
performance: { now: clock.now }, setTimeout: clock.setTimeout, clearTimeout: clock.clearTimeout, performance: { now: clock.now }, setTimeout: clock.setTimeout, clearTimeout: clock.clearTimeout,
state, boot: { mode: 'runtime' }, Map, Set, state, boot: { mode: 'runtime' }, Map, Set,
runtimeStorage: { getItem: key => storage.get(key) ?? null, setItem: (key, value) => storage.set(key, value) }, runtimeStorage: { getItem: key => storage.get(key) ?? null, setItem: (key, value) => storage.set(key, value) },
@@ -133,6 +157,7 @@ function makeRuntime(spec = {}) {
hockeySyncTeamStateOverlays: async () => true, hockeySyncScoreboardConditionalSteps: async () => true, hockeySyncTeamStateOverlays: async () => true, hockeySyncScoreboardConditionalSteps: async () => true,
hockeyTeamStateSequenceStep: () => false, buildShortcutRuntimeContext: () => ({}), hockeyTeamStateSequenceStep: () => false, buildShortcutRuntimeContext: () => ({}),
templateSequenceValue: value => value, vmixInputByRef: () => null, templateSequenceValue: value => value, vmixInputByRef: () => null,
hockeyRuntimeVmixInputTitle: async input => String(input), refreshQuickPanelOnAirClasses: noop,
vmixOverlayLayer: value => { const match = /^OverlayInput([1-8])(In|Out|toggle)$/.exec(value); return match ? { layer: match[1], action: match[2] } : null; }, vmixOverlayLayer: value => { const match = /^OverlayInput([1-8])(In|Out|toggle)$/.exec(value); return match ? { layer: match[1], action: match[2] } : null; },
sequenceStillOwnsRuntimeOverlay: () => false, sequenceMatchesRuntimeOverlay: () => false, sequenceStillOwnsRuntimeOverlay: () => false, sequenceMatchesRuntimeOverlay: () => false,
emitInteraction: (_component, event, details) => events.push({ event, details, at: clock.now() }), emitInteraction: (_component, event, details) => events.push({ event, details, at: clock.now() }),
@@ -148,8 +173,18 @@ function makeRuntime(spec = {}) {
finally { activeRequests -= 1; } finally { activeRequests -= 1; }
}, },
async fetch(url, options) { async fetch(url, options) {
assert.equal(url, '/api/hockey/agents/devices/OUTPUT-A/apply-mapping?source_code=strength');
assert.equal(options.method, 'POST'); assert.equal(options.method, 'POST');
if (url === '/api/hockey/vmix/sequence') {
const body = JSON.parse(options.body);
await context.sendRuntimeVmixTimerSequence(body.commands);
return { ok: true, status: 200, json: async () => ({ ok: true, confirmation: 'ack', applied: body.commands.length,
results: body.commands.map(command => ({ ok: true, function: command.Function, ack_waited: true })) }) };
}
if (url.startsWith('/api/hockey/agents/devices/OUTPUT-A/apply-mapping?') && !url.includes('source_code=strength')) {
return { ok: true, status: 200, json: async () => ({ ok: true, complete: true, mapping_ack_waited: true, confirmation: 'ack', applied: 1,
text_fields_total: 1, text_fields_confirmed: 1, missing: [], rule_missing: [], errors: [], warnings: [] }) };
}
assert.equal(url, '/api/hockey/agents/devices/OUTPUT-A/apply-mapping?source_code=strength');
mappingFetches.push({ at: clock.now(), control: clone(state.data.hockey.game_control), order: order.length }); mappingFetches.push({ at: clock.now(), control: clone(state.data.hockey.game_control), order: order.length });
order.push('mapping'); order.push('mapping');
const wait = holdNextMapping; holdNextMapping = null; const wait = holdNextMapping; holdNextMapping = null;
@@ -201,11 +236,12 @@ function makeRuntime(spec = {}) {
'hockeyTeamStateSequenceStep', 'shortcutVmixStepCommands', 'hockeyTeamStateSequenceStep', 'shortcutVmixStepCommands',
'hockeyAuxiliaryGateContext', 'hockeyScoreboardAuxiliariesEnabled', 'hockeyAuxiliaryGateContext', 'hockeyScoreboardAuxiliariesEnabled',
'hockeyObserveScoreForPenaltyGoal', 'hockeyGoalPenaltyContext', 'hockeyVmixTransportContext', 'hockeyObserveScoreForPenaltyGoal', 'hockeyGoalPenaltyContext', 'hockeyVmixTransportContext',
'hockeyObserveAuxiliaryGateControl']) { 'hockeyObserveAuxiliaryGateControl', 'hockeyPenaltyEntryDeliveryPending', 'hockeyPenaltyDisplayTargetAllowed', 'hockeyPenaltyCaptionTargetAllowed',
'hockeyPenaltyTargetDeliveryPending', 'hockeyPenaltyTransportSampler', 'sendRuntimeVmixSequence']) {
if (source.includes(`function ${name}(`)) names.push(name); if (source.includes(`function ${name}(`)) names.push(name);
} }
vm.createContext(context); vm.createContext(context);
vm.runInContext(names.map(extract).join('\n'), context, { filename: 'actual-app-lifecycle.js' }); vm.runInContext(productionClosure(context,names), context, { filename: 'actual-app-lifecycle.js' });
state.hockeyGameControl['GAME-A'] = control(context.hockeyGameTimerSnapshot()); state.hockeyGameControl['GAME-A'] = control(context.hockeyGameTimerSnapshot());
state.data.hockey.game_control = state.hockeyGameControl['GAME-A']; state.data.hockey.game_control = state.hockeyGameControl['GAME-A'];
const h = { context, state, main, board, game, component, targets, step, sequence, const h = { context, state, main, board, game, component, targets, step, sequence,

View File

@@ -202,6 +202,9 @@ function harness({ penaltyDelay = 2, teamDelay = 3, conditionalDelay = 0,
'hockeyEnsureAuxiliaryReadiness', 'hockeySetScoreboardAuxiliariesEnabled', 'hockeyEnsureAuxiliaryReadiness', 'hockeySetScoreboardAuxiliariesEnabled',
'hockeyNotifyAuxiliaryGate', 'hockeyAuxiliaryGateSnapshot', 'hockeyRefreshAuxiliaryGateControl', 'hockeyNotifyAuxiliaryGate', 'hockeyAuxiliaryGateSnapshot', 'hockeyRefreshAuxiliaryGateControl',
'hockeyRememberAuxiliaryHide', 'hockeyHideAuxiliaryGateOverlays', 'hockeyRememberAuxiliaryHide', 'hockeyHideAuxiliaryGateOverlays',
'hockeyPenaltyEntryDeliveryPending', 'hockeyPenaltyDisplayTargetAllowed',
'hockeyPenaltyCaptionTargetAllowed', 'hockeyPenaltyTargetDeliveryPending',
'hockeyPenaltyTransportSampler', 'hockeyGoalResolutionData',
]; ];
const constants = ['clone', 'clamp'].map(name => { const constants = ['clone', 'clamp'].map(name => {
const match = source.match(new RegExp('^ const ' + name + ' = .+;$', 'm')); const match = source.match(new RegExp('^ const ' + name + ' = .+;$', 'm'));

View File

@@ -169,12 +169,17 @@ cases.feature_old_mapping_cannot_replay_after_off_on = async () => {
const old = h.c.sendRuntimeVmixSequence([{ Function: 'OverlayInput2In', Input: 'PenaltyPlate' }], { sequence_id: 'legacy-penalty' }); const old = h.c.sendRuntimeVmixSequence([{ Function: 'OverlayInput2In', Input: 'PenaltyPlate' }], { sequence_id: 'legacy-penalty' });
await flush(); assert.equal(hold.started, true); await flush(); assert.equal(hold.started, true);
await h.gate.set(false); await h.gate.set(false);
await h.gate.set(true); await flush(); // Rearm now awaits the native plate's cold-caption Mapping. Hold that fresh
// preparation separately so the stale action is tested before fresh IN.
const fresh = h.holdMapping('PenaltyPlate');
const rearm = h.gate.set(true); await flush();
const actual = h.commands().length; const actual = h.commands().length;
h.release(hold); h.release(hold);
const result = await old; await flush(); const result = await old; await flush();
assert.equal(fresh.started, true, 'Fresh native preparation must reach its own Mapping request');
assert.equal(result.skipped, true); assert.equal(result.skipped, true);
assert.equal(h.commands().length, actual, 'Only the fresh reconciliation may issue the plate after rearm'); assert.equal(h.commands().length, actual, 'Only the fresh reconciliation may issue the plate after rearm');
h.release(fresh); assert.equal(await rearm, true); await flush();
}; };
cases.feature_off_error_stays_closed_and_retryable = async () => { cases.feature_off_error_stays_closed_and_retryable = async () => {
const h = runtime({ conditional: false, team: false }); armed(h); const h = runtime({ conditional: false, team: false }); armed(h);
@@ -422,7 +427,10 @@ cases.feature_native_ack_during_caption_mapping_cannot_duplicate_in = async () =
h.event.running = false; h.event.startedOnce = false; h.event.running = false; h.event.startedOnce = false;
if (explicitCaption) { h.conditionalStep.selected_name = 'Text.Text'; h.conditionalStep.value = '4on4'; } if (explicitCaption) { h.conditionalStep.selected_name = 'Text.Text'; h.conditionalStep.value = '4on4'; }
const native = h.holdFrame(commands => commands.some(command => command.Function === 'OverlayInput2In')); const native = h.holdFrame(commands => commands.some(command => command.Function === 'OverlayInput2In'));
await h.c.rebalanceVmixPenaltyTargets(); await flush(); // Cold native IN now awaits Mapping in the ordinary queue, so that same
// queue cannot race itself. The real independent timer transport can still
// report its IN while conditional Mapping is awaiting its HTTP response.
const prepared = h.c.sendRuntimeVmixTimerSequence([{ Function: 'OverlayInput2In', Input: 'PenaltyPlate' }]); await flush();
assert.equal(native.started, true); assert.equal(native.started, true);
assert.equal(h.state.vmixOverlayRuntime.has('2'), false); assert.equal(h.state.vmixOverlayRuntime.has('2'), false);
const caption = h.holdMapping('PenaltyPlate'); const caption = h.holdMapping('PenaltyPlate');
@@ -430,7 +438,7 @@ cases.feature_native_ack_during_caption_mapping_cannot_duplicate_in = async () =
assert.equal(caption.started, true, 'The conditional branch genuinely entered its not-on-air Mapping path'); assert.equal(caption.started, true, 'The conditional branch genuinely entered its not-on-air Mapping path');
h.release(native, { ok: true, applied: native.row.body.commands.length, confirmation: 'not_waited', h.release(native, { ok: true, applied: native.row.body.commands.length, confirmation: 'not_waited',
results: native.row.body.commands.map(command => ({ ok: true, function: command.Function, ack_waited: false })) }); results: native.row.body.commands.map(command => ({ ok: true, function: command.Function, ack_waited: false })) });
await flush(); await prepared; await flush();
assert.equal(h.state.vmixOverlayRuntime.get('2').input, 'PenaltyPlate'); assert.equal(h.state.vmixOverlayRuntime.get('2').input, 'PenaltyPlate');
const afterNative = h.frames.length; const afterNative = h.frames.length;
h.release(caption); const applied = await sync; await flush(); h.release(caption); const applied = await sync; await flush();

View File

@@ -266,11 +266,12 @@ cases.undo_does_not_overwrite_edit = async () => {
}; };
cases.unknown_ack_is_not_replayed = async () => { cases.unknown_ack_is_not_replayed = async () => {
const h = harness(); await h.prime(); const held = h.hold(); await h.score(0, 0); const h = harness(); await h.prime(); const held = h.hold(); await h.score(0, 0);
const pending = h.score(1, 0); await flush(); assert.equal(held.started, true); assert.equal(h.board().penalties.length, 0); const pending = h.score(1, 0); await flush(); assert.equal(held.started, true); assert.equal(h.board().penalties.length, 1);
assert.ok(h.persisted.some(x => x.penalty_board.penalties.length === 0), 'Desired final state is saved before ACK'); assert.equal(h.persisted.some(x => x.penalty_board.penalties.length === 0), false, 'Unconfirmed deletion must not be saved before ACK');
held.wait.reject(Object.assign(new Error('timeout'), { name: 'AbortError' })); await pending; held.wait.reject(Object.assign(new Error('timeout'), { name: 'AbortError' })); await pending;
const count = h.frames.length; await h.score(1, 0); assert.equal(h.frames.length, count); const count = h.frames.length; await h.score(1, 0); assert.equal(h.frames.length, count);
assert.ok(h.notices.some(x => /Подтверждение vMix не получено/.test(x[0]))); assert.ok(h.notices.some(x => /Нет подтверждения удаления в vMix/.test(x[0])));
assert.equal(h.board().penalties.length, 1); assert.equal(h.board().penalties[0].goalResolution.status, 'unknown');
}; };
cases.goal_marker_survives_history_limit = async () => { cases.goal_marker_survives_history_limit = async () => {
const h = harness(); h.board().history = Array.from({ length: 64 }, (_, n) => ({ id: 'old-' + n, type: 'finished', message: 'older' })); const h = harness(); h.board().history = Array.from({ length: 64 }, (_, n) => ({ id: 'old-' + n, type: 'finished', message: 'older' }));
@@ -291,8 +292,8 @@ cases.unrelated_external_negative_is_baseline = async () => {
cases.queued_old_zero_cannot_clear_new_assignment = async () => { cases.queued_old_zero_cannot_clear_new_assignment = async () => {
const h = harness(); await h.prime(); await h.score(0, 0); const h = harness(); await h.prime(); await h.score(0, 0);
const queue = deferred(); h.state.vmixUrgentCommandQueue = queue.promise; const queue = deferred(); h.state.vmixUrgentCommandQueue = queue.promise;
const goal = h.score(1, 0); await flush(); assert.equal(h.board().penalties.length, 0); const goal = h.score(1, 0); await flush(); assert.equal(h.board().penalties.length, 1);
h.board().penalties.push(penalty('replacement', 'away', '2', 60000)); h.board().penalties = [penalty('replacement', 'away', '2', 60000)];
await h.c.rebalanceVmixPenaltyTargets({ force: true }); await flush(); await h.c.rebalanceVmixPenaltyTargets({ force: true }); await flush();
const count = h.frames.length; const count = h.frames.length;
queue.resolve(); await goal; queue.resolve(); await goal;

View File

@@ -118,22 +118,27 @@ for (const side of ['home', 'away']) {
const h = runtime(penalty('four', side, 4)); const h = runtime(penalty('four', side, 4));
await h.context.rebalanceVmixPenaltyTargets({ scoreboardActive: true }); await h.context.rebalanceVmixPenaltyTargets({ scoreboardActive: true });
await settle(h); await settle(h);
const input = h.targets[other].input, start = h.native.trace.length; const input = h.targets[side].input, start = h.native.trace.length;
await addPreparedPenalty(h, penalty('two', other, 2)); await addPreparedPenalty(h, penalty('two', other, 2));
const commands = h.native.trace.slice(start).map(x => x.command); const commands = h.native.trace.slice(start).map(x => x.command);
assert.equal(h.native.clocks.get(input).positionMs, 120000, assert.equal(h.native.clocks.get(input).positionMs, 120000,
'A shorter opposing penalty supplies the new 4on4 transition countdown'); 'A shorter opposing penalty supplies the new 4on4 transition countdown');
assert.equal(h.native.clocks.get(input).running, true); assert.equal(h.native.clocks.get(input).running, true);
assert.ok(commands.some(x => x.Function === 'SetCountdown' && x.Input === input && x.Value === '00:02:00')); assert.ok(commands.some(x => x.Function === 'SetCountdown' && x.Input === input && x.Value === '00:02:00'));
assert.ok(!commands.some(x => /^OverlayInput[1-8]In$/.test(x.Function) && x.Input === input), assert.equal(commands.filter(x => /^OverlayInput[1-8]In$/.test(x.Function) && x.Input === input).length, 1,
'A changed transition timer is reseeded in place without replaying its plate IN'); 'The unequal-duration cycle switches once to the longer-penalty physical plate');
const reconciled = h.native.trace.length;
await h.context.rebalanceVmixPenaltyTargets({ scoreboardActive: true, forceOverlay: true });
await settle(h);
assert.ok(!h.native.trace.slice(reconciled).some(x => /^OverlayInput[1-8]In$/.test(x.command.Function) && x.command.Input === input),
'The newly selected physical plate must not replay IN during reconciliation');
assert.equal(h.errors.length, 0); assert.equal(h.errors.length, 0);
}; };
cases[`expired_two_continues_four_${side}`] = async () => { cases[`expired_two_continues_four_${side}`] = async () => {
const h = runtime(penalty('four', side, 4, 121000)); const h = runtime(penalty('four', side, 4, 121000));
await h.context.rebalanceVmixPenaltyTargets({ scoreboardActive: true }); await h.context.rebalanceVmixPenaltyTargets({ scoreboardActive: true });
await addPreparedPenalty(h, penalty('two', other, 2, 1000)); await addPreparedPenalty(h, penalty('two', other, 2, 1000));
const input = h.targets[other].input; const input = h.targets[side].input;
h.initialiseTicks(); h.initialiseTicks();
await h.frames(1000); await h.frames(1000);
await h.tick(40); await h.tick(40);

215
tests/build200_goal_ack.cjs Normal file
View File

@@ -0,0 +1,215 @@
'use strict';
// Reuse the established I/O fixture. State, goal rules, mutation and physical
// sender remain actual functions from the selected production app.js.
const fs = require('node:fs'), vm = require('node:vm'), path = require('node:path'), assert = require('node:assert/strict');
const legacy = fs.readFileSync(path.join(__dirname, 'build199_goal_penalty.cjs'), 'utf8');
const end = legacy.indexOf('\nconst cases = {};'); assert.ok(end > 0);
const ioFixture = legacy.slice(0, end).replace("['hockeyStoreGameControl', 'hockeyScoreCommand'",
"['controlHockeyPenalty', 'updateHockeyPenaltyBoards', 'hockeyStoreGameControl', 'hockeyScoreCommand'");
assert.notEqual(ioFixture, legacy.slice(0, end));
const { harness, penalty, flush, clone, assertInfrastructure } = new Function('require', 'process', '__dirname',
ioFixture + '\nreturn { harness, penalty, flush, clone, assertInfrastructure };')(require, process, __dirname);
const cases = {};
function nativeModel(h) {
const fixture = fs.readFileSync(path.join(__dirname, 'build196_penalty_lifecycle.cjs'), 'utf8');
const actual = name => { const begin = fixture.indexOf('function ' + name + '('), finish = fixture.indexOf('\n}', begin);
assert.ok(begin >= 0 && finish > begin); return fixture.slice(begin, finish + 2); };
const create = new Function('assert', ['milliseconds', 'createNativeCountdownModel'].map(actual).join('\n')
+ '\nreturn createNativeCountdownModel;')(assert);
const model = create({ 'HOME-plate': { durationMs: 0, positionMs: 0, running: false, visible: false },
'AWAY-plate': { durationMs: 0, positionMs: 0, running: false, visible: false } });
const fetch = h.c.fetch;
h.c.fetch = (url, options) => { if (url === '/api/hockey/vmix/sequence') model.apply(JSON.parse(options.body).commands);
return fetch(url, options); };
return model;
}
function deletedSnapshots(h) { return h.persisted.filter(row => row.penalty_board.penalties.length === 0); }
function prepareMatch(h) {
const counts = { home: 0, away: 0 }; for (const row of h.board().penalties) if (!row.finished && row.remainingMs > 0) counts[row.side]++;
Object.assign(h.server.strength, { home_penalties: counts.home, away_penalties: counts.away,
advantage_side: counts.home < counts.away ? 'home' : counts.away < counts.home ? 'away' : '',
state_label: counts.home === counts.away ? '4on4' : 'powerplay' });
for (const control of [h.state.data.hockey.game_control, h.state.hockeyGameControl['game-A']]) control.strength = clone(h.server.strength);
}
async function settlePhysical(h) { for (let pass = 0; pass < 4; pass++) { await h.state.vmixCommandQueue;
await h.state.vmixUrgentCommandQueue; await flush(); } }
async function beginGoal(h) { prepareMatch(h); await h.prime(); await settlePhysical(h); h.frames.length = 0;
await h.score(0, 0); await settlePhysical(h); h.frames.length = 0;
const hold = h.hold(); const goal = h.score(1, 0); await flush(); return { hold, goal }; }
cases.normal_goal_ack_before_row_delete = async () => {
const h = harness(), { hold, goal } = await beginGoal(h); assertInfrastructure(h);
assert.equal(hold.started, true, 'The goal must reach an actual ACK request');
assert.equal(h.board().penalties.length, 1, 'Keep the web row until vMix confirms its removal');
assert.equal(h.board().penalties[0].remainingMs, 90000, 'Pending output must not invent a finished web clock');
assert.equal(deletedSnapshots(h).length, 0, 'Do not persist a deletion before vMix ACK');
h.release(hold); await goal;
assert.equal(h.board().penalties.length, 0); assert.ok(deletedSnapshots(h).length > 0);
assert.ok(h.frames.every(frame => frame.ack || frame.body.delivery_mode === 'timer-fast-ordered'));
};
cases.f2_off_never_mutates_or_replays = async () => {
const h = harness(); h.server.flags.scoreboard_auxiliaries_enabled = false; h.state.data.hockey.game_control.flags.scoreboard_auxiliaries_enabled = false;
await h.prime(); await h.score(0, 0); await h.score(1, 0); assertInfrastructure(h);
assert.equal(h.board().penalties.length, 1, 'F2 OFF disables goal-driven removal');
h.server.flags.scoreboard_auxiliaries_enabled = true; h.state.data.hockey.game_control.flags.scoreboard_auxiliaries_enabled = true;
h.state.hockeyAuxiliaryGateVersion = (h.state.hockeyAuxiliaryGateVersion || 0) + 1;
await h.score(1, 0); assert.equal(h.board().penalties.length, 1, 'F2 ON must not replay a goal observed while OFF');
assert.equal(deletedSnapshots(h).length, 0);
};
cases.f2_off_during_ack_keeps_row = async () => {
const h = harness(), { hold, goal } = await beginGoal(h);
h.state.hockeyAuxiliaryGateVersion = (h.state.hockeyAuxiliaryGateVersion || 0) + 1;
h.server.flags.scoreboard_auxiliaries_enabled = false; h.state.data.hockey.game_control.flags.scoreboard_auxiliaries_enabled = false;
h.release(hold); await goal; assertInfrastructure(h);
assert.equal(h.board().penalties.length, 1); assert.equal(deletedSnapshots(h).length, 0);
};
cases.nack_keeps_row_without_replay = async () => {
const h = harness(), { hold, goal } = await beginGoal(h);
h.release(hold, { ok: false, confirmation: 'ack', applied: 0,
results: hold.row.body.commands.map(command => ({ ok: false, function: command.Function, ack_waited: true, reason: 'vmix_failed' })) });
await goal; assertInfrastructure(h); assert.equal(h.board().penalties.length, 1); assert.equal(deletedSnapshots(h).length, 0);
assert.ok(h.notices.some(row => /подтвержд|vMix/i.test(row[0])));
const sent = h.frames.length; await h.score(1, 0); assert.equal(h.frames.length, sent);
};
cases.unknown_ack_keeps_row_without_replay = async () => {
const h = harness(), { hold, goal } = await beginGoal(h);
hold.wait.reject(Object.assign(new Error('timeout'), { name: 'AbortError' })); await goal; assertInfrastructure(h);
assert.equal(h.board().penalties.length, 1); assert.equal(deletedSnapshots(h).length, 0);
assert.ok(h.board().penalties[0].goalResolution, 'Retain an explicit unresolved state on the visible row');
const sent = h.frames.length; await h.score(1, 0); assert.equal(h.frames.length, sent);
};
cases.double_first_ack_before_shortening = async () => {
const h = harness([penalty('double', 'away', '4', 180000)]), { hold, goal } = await beginGoal(h);
assertInfrastructure(h); assert.equal(h.board().penalties[0].remainingMs, 180000, 'Keep the original row until the two-minute seed is confirmed');
h.release(hold); await goal; assert.equal(h.board().penalties.length, 1); assert.equal(h.board().penalties[0].remainingMs, 120000);
assert.equal(h.commands().some(command => /OverlayInput\d+Out/.test(command.Function)), false);
};
cases.double_second_ack_before_delete = async () => {
const h = harness([penalty('double', 'away', '2+2', 90000)]), { hold, goal } = await beginGoal(h);
assertInfrastructure(h); assert.equal(h.board().penalties.length, 1);
h.release(hold); await goal; assert.equal(h.board().penalties.length, 0);
};
cases.duplicate_success_only_one_removal = async () => {
const h = harness(), { hold, goal } = await beginGoal(h); h.release(hold); await goal;
const sent = h.frames.length; await h.score(1, 0); assert.equal(h.frames.length, sent); assert.equal(h.board().penalties.length, 0);
};
cases.rehydrate_pending_does_not_repeat_goal = async () => {
const h = harness(), { hold, goal } = await beginGoal(h);
assert.equal(h.board().penalties.length, 1);
const saved = h.c.hockeyGameTimerSnapshot(); h.c.hockeyApplySavedTimers('game-A', saved);
h.c.hockeyStoreGameControl('game-A', clone(h.server), { render: false }); await flush();
assert.equal(h.frames.length, 1); h.release(hold); await goal; assert.equal(h.board().penalties.length, 0);
};
cases.role_change_before_ack_keeps_row = async () => {
const h = harness(), { hold, goal } = await beginGoal(h); h.rights(false); h.release(hold); await goal;
assert.equal(h.board().penalties.length, 1); assert.equal(deletedSnapshots(h).length, 0);
};
cases.major_and_equal_strength_do_not_delete = async () => {
for (const penalties of [[penalty('major', 'away', '5', 200000)], [penalty('home', 'home'), penalty('away', 'away')]]) {
const h = harness(penalties); await h.prime(); await h.score(0, 0); await h.score(1, 0);
assertInfrastructure(h); assert.equal(h.board().penalties.length, penalties.length); assert.equal(h.commands().length, 0);
}
};
cases.ordinary_goal_does_not_need_shb = async () => {
const h = harness(); assert.equal(Boolean(h.server.flags.score_penalty_shot), false);
const { hold, goal } = await beginGoal(h); assert.equal(h.board().penalties.length, 1); h.release(hold); await goal;
assert.equal(h.board().penalties.length, 0);
};
cases.penalty_shot_exception_stays = async () => {
const h = harness(); await h.prime(); await h.score(0, 0); await h.score(1, 0, { goal_type: 'penalty_shot' });
assertInfrastructure(h); assert.equal(h.board().penalties.length, 1); assert.equal(h.commands().length, 0);
};
cases.undo_waits_for_vmix_before_restore = async () => {
const h = harness(), { hold, goal } = await beginGoal(h); h.release(hold); await goal;
assert.equal(h.board().penalties.length, 0);
const undoHold = h.hold(); const undo = h.score(0, 0); await flush();
assert.equal(undoHold.started, true); assert.equal(h.board().penalties.length, 0, 'Undo must await physical restoration before recreating the web row');
h.release(undoHold); await undo; assert.equal(h.board().penalties.length, 1); assert.equal(h.board().penalties[0].remainingMs, 90000);
};
cases.undo_nack_does_not_invent_restored_row = async () => {
const h = harness(), { hold, goal } = await beginGoal(h); h.release(hold); await goal;
const undoHold = h.hold(); const undo = h.score(0, 0); await flush();
h.release(undoHold, { ok: false, confirmation: 'ack', applied: 0, results: undoHold.row.body.commands.map(() => ({ ok: false, ack_waited: true, reason: 'failed' })) });
await undo; assert.equal(h.board().penalties.length, 0);
};
cases.held_ack_pause_keeps_latest_native_time = async () => {
const h = harness([penalty('double', 'away', '4', 180000, { running: true })]), native = nativeModel(h);
const { hold, goal } = await beginGoal(h);
assert.equal(native.clocks.get('HOME-plate').positionMs, 120000);
h.advance(3000); native.advance(3000);
h.c.controlHockeyPenalty(h.component, 'double', 'pause'); await flush();
assert.equal(h.board().penalties[0].remainingMs, 180000, 'Only the proposed clock progresses while output awaits ACK');
assert.equal(native.clocks.get('HOME-plate').running, false);
h.release(hold); await goal; assertInfrastructure(h);
assert.equal(native.clocks.get('HOME-plate').positionMs, 117000);
assert.equal(native.clocks.get('HOME-plate').running, false);
assert.equal(h.board().penalties[0].remainingMs, 117000); assert.equal(h.board().penalties[0].running, false);
};
cases.held_ack_resume_keeps_latest_native_time = async () => {
const h = harness([penalty('double', 'away', '4', 180000)]), native = nativeModel(h);
const { hold, goal } = await beginGoal(h);
h.advance(3000); h.c.controlHockeyPenalty(h.component, 'double', 'start'); await flush();
assert.equal(native.clocks.get('HOME-plate').running, true);
h.advance(2000); native.advance(2000);
h.release(hold); await goal; assertInfrastructure(h);
assert.equal(native.clocks.get('HOME-plate').positionMs, 118000);
assert.equal(native.clocks.get('HOME-plate').running, true);
assert.equal(h.board().penalties[0].remainingMs, 118000); assert.equal(h.board().penalties[0].running, true);
};
cases.unmapped_current_segment_uses_other_field_ack = async () => {
const h = harness([penalty('A42', 'away', '2+2', 94000), penalty('A16', 'away', '2+2', 205000)]);
const { hold, goal } = await beginGoal(h);
assert.equal(hold.started, true); assert.equal(h.board().penalties.find(x => x.id === 'A16').remainingMs, 205000);
assert.ok(hold.row.body.commands.some(x => x.Function === 'SetCountdown' && x.Value === '00:01:34'));
assert.ok(!hold.row.body.commands.some(x => /OverlayInput\d+Out/.test(x.Function)));
h.release(hold); await goal; assertInfrastructure(h);
assert.equal(h.board().penalties.find(x => x.id === 'A16').remainingMs, 120000);
assert.equal(h.board().penalties.find(x => x.id === 'A42').remainingMs, 94000);
const result = h.board().history.find(x => x.goal)?.goal;
assert.equal(result.transport, 'confirmed_no_display'); assert.equal(result.delivery.physical_ack, true);
assert.equal(result.delivery.verification_targets.length, 1);
};
cases.shared_input_removes_only_chosen_field = async () => {
const h = harness([penalty('first', 'away', '2', 50000), penalty('second', 'away', '2', 90000)]);
h.timerStep.penalty_display_mode = 'all'; h.timerStep.home_penalty_targets.push({ id: 'H2', input: 'HOME-plate', selected_name: 'Other.Text', overlay: '2' });
prepareMatch(h); await h.prime(); await settlePhysical(h); await h.score(0, 0); await settlePhysical(h);
h.state.vmixPenaltyTargetAssignments.set('native-step:home:H2', { eventKey: h.component.action_id + ':second',
input: 'HOME-plate', selectedName: 'Other.Text', overlay: '2', running: false, visible: true, mode: 'countdown' });
h.frames.length = 0; const hold = h.hold(), goal = h.score(1, 0); await flush();
assert.ok(hold.row.body.commands.some(x => x.Function === 'SetCountdown' && x.SelectedName === 'Clock.Text' && x.Value === '00:00:00'));
assert.ok(!hold.row.body.commands.some(x => /OverlayInput\d+Out/.test(x.Function)));
assert.ok(!hold.row.body.commands.some(x => x.SelectedName === 'Other.Text'));
h.release(hold); await goal; assertInfrastructure(h);
assert.deepEqual(Array.from(h.board().penalties, x => x.id), ['second']);
assert.equal(h.state.vmixOverlayRuntime.get('2').input, 'HOME-plate');
assert.equal(h.board().history.find(x => x.goal).goal.delivery.shared_input_retained, true);
};
cases.joint_two_four_right_phase_goal_and_undo = async () => {
const h = harness([penalty('two', 'home', '2', 120000, { running: true }), penalty('four', 'away', '4', 240000, { running: true })]);
const native = nativeModel(h); prepareMatch(h); await h.prime(); await settlePhysical(h); await h.score(0, 0); await settlePhysical(h);
assert.equal(native.clocks.get('AWAY-plate').positionMs, 120000, 'The right physical clock starts with the current two-minute4on4 phase');
assert.equal(native.clocks.get('AWAY-plate').visible, true);
assert.equal(h.state.vmixOverlayRuntime.get('3').input, 'AWAY-plate');
assert.equal(h.state.hockeyPenaltyAdvantageCycle.displayOwnerSide, 'away');
assert.equal(h.c.penaltyDisplayEntriesByTargetSide(h.timerStep).holdingEqualStrength, true);
h.advance(120000); native.advance(120000); h.c.updateHockeyPenaltyBoards(h.c.performance.now()); await flush();
await h.c.rebalanceVmixPenaltyTargets(); await flush();
assert.deepEqual(Array.from(h.board().penalties, x => x.id), ['four']);
assert.equal(h.c.penaltyDisplayEntriesByTargetSide(h.timerStep).advantageSide, 'home');
assert.equal(native.clocks.get('AWAY-plate').positionMs, 120000); assert.equal(native.clocks.get('AWAY-plate').visible, true);
const hold = h.hold(), goal = h.score(1, 0); await flush();
assert.equal(hold.started, true); assert.ok(hold.row.body.commands.some(x => x.Function === 'OverlayInput3Out' && x.Input === 'AWAY-plate'));
assert.equal(h.board().penalties.length, 1, 'The actual right-plate OUT must be acknowledged before deleting its row');
h.release(hold); await goal; assertInfrastructure(h);
assert.equal(h.board().penalties.length, 0); assert.ok(deletedSnapshots(h).length > 0);
assert.equal(native.clocks.get('AWAY-plate').visible, false);
const undoHold = h.hold(), undo = h.score(0, 0); await flush();
assert.equal(h.board().penalties.length, 0); h.release(undoHold); await undo; assertInfrastructure(h);
assert.equal(h.board().penalties.length, 1); assert.equal(h.state.hockeyPenaltyAdvantageCycle.displayOwnerSide, 'away');
await h.c.rebalanceVmixPenaltyTargets(); await flush();
assert.equal(native.clocks.get('AWAY-plate').visible, true); assert.equal(native.clocks.get('HOME-plate').visible, false);
assert.equal(h.c.penaltyDisplayEntriesByTargetSide(h.timerStep).plateSide, 'away');
};
(async () => {
const name = process.argv[2]; assert.equal(typeof cases[name], 'function', 'Unknown BUILD200 ACK case ' + name);
await cases[name](); console.log('PASS BUILD200 goal ACK: ' + name);
})().catch(error => { console.error(error); process.exitCode = 1; });

View File

@@ -0,0 +1,258 @@
'use strict';
// Real browser runtime helpers and real transport; only HTTP, time and vMix are doubles.
const fs = require('node:fs');
const path = require('node:path');
const assert = require('node:assert/strict');
const fixture = fs.readFileSync(path.join(__dirname, 'build198_presentation.cjs'), 'utf8');
const end = fixture.indexOf('\nconst cases = {};');
assert.ok(end > 0);
// The server acknowledges every generic request without shortcut/button IDs,
// including a multi-command native preparation (agent_bridge.send_sequence).
const ioFixture = fixture.slice(0, end).replace(
'(!body.delivery_mode && !body.sequence_id && !body.button_id && body.commands.length === 1)',
'(!body.delivery_mode && !body.sequence_id && !body.button_id)');
assert.notEqual(ioFixture, fixture.slice(0, end));
const { harness, flush } = new Function('require', 'process', '__dirname', ioFixture
+ '\nreturn { harness, flush };')(require, process, __dirname);
const clone = value => JSON.parse(JSON.stringify(value));
const physicalFixture = fs.readFileSync(path.join(__dirname, 'build196_penalty_lifecycle.cjs'), 'utf8');
function physicalFunction(name) {
const begin = physicalFixture.indexOf(`function ${name}(`), finish = physicalFixture.indexOf('\n}', begin);
assert.ok(begin >= 0 && finish > begin);
return physicalFixture.slice(begin, finish + 2);
}
const nativeModel = new Function('assert', ['milliseconds', 'createNativeCountdownModel'].map(physicalFunction).join('\n')
+ '\nreturn createNativeCountdownModel;')(assert);
function event(id, side, minutes, remainingMs = minutes * 60000, running = true) {
return { id, external_id: id, side, teamPenalty: true, player: null, infraction: { id: 'minor' },
preset: String(minutes), durationMs: minutes * 60000, remainingMs, running,
startedOnce: running || remainingMs < minutes * 60000, finished: false,
readyEmitted: true, assignedEmitted: true, createdAt: 1, lastTimestamp: 100000 };
}
const opposite = side => side === 'home' ? 'away' : 'home';
const input = side => side === 'home' ? 'Penalty HOME' : 'Penalty AWAY';
function runtime(penalties, { captions = true } = {}) {
const h = harness({ penalties: true });
h.state.hockeyPenaltyBoards.board.penalties = penalties;
h.timerStep.home_penalty_targets = [{ id: 'home', input: input('home'), selected_name: 'Clock.Text', overlay: '2' }];
h.timerStep.away_penalty_targets = [{ id: 'away', input: input('away'), selected_name: 'Clock.Text', overlay: '2' }];
if (captions) for (const side of ['away', 'home']) h.sequence.steps.push({ id: 'caption-' + side,
type: 'vmix_command', enabled: true, function: 'OverlayInput2In', input: input(side),
selected_name: 'Text.Text', value: '{{ hockey.game_control.strength.state_label }}',
condition: 'has_' + opposite(side) + '_penalties' });
h.updateStrength = () => {
const counts = { home: 0, away: 0 };
for (const p of h.state.hockeyPenaltyBoards.board.penalties) if (!p.finished && p.remainingMs > 0) counts[p.side]++;
h.state.data.hockey.game_control.strength = { home_penalties: counts.home, away_penalties: counts.away,
home_skaters: 5 - counts.home, away_skaters: 5 - counts.away,
advantage_side: counts.home < counts.away ? 'home' : counts.away < counts.home ? 'away' : '',
state_label: counts.home === counts.away ? '4on4' : 'powerplay' };
};
h.updateStrength();
h.native = nativeModel({
[input('home')]: { durationMs: 0, positionMs: 0, running: false, visible: false },
[input('away')]: { durationMs: 0, positionMs: 0, running: false, visible: false },
ForeignClock: { durationMs: 75000, positionMs: 53000, running: true, visible: true, overlay: '8' },
});
const fetch = h.c.fetch;
h.c.fetch = async (url, options) => {
const response = await fetch(url, options);
if (url === '/api/hockey/vmix/sequence') {
const payload = await response.json();
if (response.ok && payload.ok) h.native.apply(JSON.parse(options.body).commands);
}
return response;
};
h.plan = () => h.c.penaltyDisplayEntriesByTargetSide(h.timerStep);
h.rebalance = async options => { const count = await h.c.rebalanceVmixPenaltyTargets({ scoreboardActive: true, ...options }); await flush(); return count; };
return h;
}
function assertOwner(h, side, id) {
const plan = h.plan();
assert.equal(plan.plateSide, side, 'The physical plate must belong to the longer opposing tail, independent of insertion order');
assert.equal(plan[side][0]?.event.id, id);
assert.equal(plan[opposite(side)].length, 0, 'Only one physical plate may be planned');
}
const cases = {};
for (const shortSide of ['home', 'away']) {
const longSide = opposite(shortSide);
for (const reverse of [false, true]) cases[`pair_${shortSide}_short_${reverse ? 'long_first' : 'short_first'}`] = async () => {
const rows = [event('two', shortSide, 2), event('four', longSide, 4)];
const h = runtime(reverse ? rows.reverse() : rows);
assertOwner(h, longSide, 'two');
await h.rebalance();
assert.deepEqual(h.ins().map(x => x.Input), [input(longSide)]);
assert.equal(h.native.clocks.get(input(longSide)).positionMs, 120000);
};
cases[`phase_expiry_${shortSide}_short`] = async () => {
const h = runtime([event('two', shortSide, 2), event('four', longSide, 4)]);
await h.rebalance();
h.state.hockeyPenaltyBoards.board.penalties = [event('four', longSide, 4, 120000)];
h.updateStrength(); const start = h.frames.length;
await h.rebalance();
assertOwner(h, longSide, 'four');
assert.equal(h.native.clocks.get(input(longSide)).positionMs, 120000);
assert.equal(h.native.clocks.get(input(longSide)).visible, true);
const commands = h.frames.slice(start).flatMap(x => x.body.commands);
assert.ok(commands.some(x => x.Function === 'SetCountdown' && x.Input === input(longSide) && x.Value === '00:02:00'));
assert.ok(!commands.some(x => /^OverlayInput[1-8](In|Out)$/.test(x.Function)), 'The same live physical plate changes phase without OUT/IN');
assert.equal(h.plan().advantageSide, shortSide, 'Physical ownership must not change real hockey advantage');
};
}
cases.reverse_insertion_remembers_owner = async () => {
const h = runtime([event('four', 'away', 4)]);
await h.rebalance();
h.state.hockeyPenaltyBoards.board.penalties.push(event('two', 'home', 2)); h.updateStrength();
await h.rebalance(); assertOwner(h, 'away', 'two');
assert.equal(h.state.vmixOverlayRuntime.get('2').input, input('away'));
};
cases.repeat_main_has_no_wrong_side_flash = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
await h.rebalance();
await h.c.runShortcutSequence(h.sequence.id, { throw_on_error: true }); await flush();
const start = h.frames.length;
await h.c.runShortcutSequence(h.sequence.id, { throw_on_error: true }); await flush();
const ins = h.frames.slice(start).flatMap(x => x.body.commands).filter(x => /^OverlayInput[1-8]In$/.test(x.Function));
assert.ok(ins.some(x => x.Input === 'Scoreboard'));
assert.ok(!ins.some(x => x.Input === input('home')), 'A repeated upper-score IN must never flash the unselected left native plate');
assert.equal(h.state.vmixOverlayRuntime.get('2').input, input('away'));
};
cases.conditional_and_fallback_same_owner = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
await h.rebalance();
await h.c.hockeySyncScoreboardConditionalSteps({ force: true });
assert.equal(h.state.vmixOverlayRuntime.get('2').input, input('away'), 'Conditional captions must agree with native routing');
const targets = h.c.hockeyPenaltyOverlayFallbackTargets();
assert.equal(targets.get('2').input, input('away'));
assert.ok(!h.ins().some(x => x.Input === input('home')));
};
cases.native_caption_data_ack_before_in = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
h.state.hockeyPenaltyAdvantageCycle = { hadAdvantage: true, lastAdvantageSide: 'away' };
const hold = h.holdMapping(input('away'));
const pending = h.rebalance(); await flush();
assert.equal(hold.started, true, 'A new native plate needs its non-clock caption DATA prepared');
assert.equal(h.ins().length, 0, 'Native IN must wait for caption Mapping ACK');
h.release(hold); await pending;
assert.equal(h.ins().at(-1).Input, input('away'));
const excluded = JSON.parse(new URL(hold.row.url, 'http://hockey.invalid').searchParams.get('exclude_fields'));
assert.ok(excluded.includes('Clock.Text'), 'Caption preparation must preserve the native countdown');
};
cases.native_cold_in_dedup_after_caption_mapping = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
const hold = h.holdMapping(input('away'));
const pending = h.rebalance(); await flush();
assert.equal(hold.started, true);
assert.equal(h.native.clocks.get(input('away')).positionMs, 120000);
await h.c.sendRuntimeVmixSequence([{ Function: 'OverlayInput2In', Input: input('away') }], { requireAck: true, skipTitleMapping: true, urgent: true });
h.native.advance(1000);
h.release(hold); const count = await pending;
assert.equal(h.ins().filter(command => command.Input === input('away')).length, 1, 'A native IN acknowledged during caption Mapping must not replay');
assert.equal(h.native.clocks.get(input('away')).positionMs, 119000);
assert.equal(count, 3, 'Only the acknowledged native Set/Stop/Start commands count as this request delivery');
};
for (const shortSide of ['home', 'away']) cases[`clock_continuity_pause_resume_${shortSide}_short`] = async () => {
const longSide = opposite(shortSide), two = event('two', shortSide, 2, 85000);
const h = runtime([two]);
await h.rebalance();
const target = input(longSide), start = h.frames.length;
h.state.hockeyPenaltyBoards.board.penalties.push(event('four', longSide, 4)); h.updateStrength();
await h.rebalance();
assertOwner(h, longSide, 'two');
assert.equal(h.native.clocks.get(target).positionMs, 85000);
assert.equal(h.frames.length, start, 'An unchanged transition preserves its native clock without new IN or seed');
assert.equal(h.c.controlHockeyPenalty(h.component, two.id, 'pause', '', { syncVmix: false }), true);
await h.rebalance();
assert.equal(h.native.clocks.get(target).positionMs, 240000, 'A running opposing event is the next actual transition while the first is stopped');
assert.equal(h.native.clocks.get(target).running, true);
for (const row of h.state.hockeyPenaltyBoards.board.penalties) assert.equal(h.c.controlHockeyPenalty(h.component, row.id, 'pause', '', { syncVmix: false }), true);
await h.rebalance();
assert.equal(h.native.clocks.get(target).positionMs, 85000);
assert.equal(h.native.clocks.get(target).running, false);
for (const row of h.state.hockeyPenaltyBoards.board.penalties) assert.equal(h.c.controlHockeyPenalty(h.component, row.id, 'start', '', { syncVmix: false }), true);
await h.rebalance();
assert.equal(h.native.clocks.get(target).positionMs, 85000);
assert.equal(h.native.clocks.get(target).running, true);
assert.equal(h.ins().filter(command => command.Input === target).length, 1);
assert.equal(h.native.clocks.get('ForeignClock').positionMs, 53000);
};
cases.tail_snapshot_and_hydration = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
await h.rebalance();
h.state.hockeyPenaltyBoards.board.penalties = [event('four', 'away', 4, 120000)]; h.updateStrength();
await h.rebalance();
h.installSnippet('if (false) { hockeyHistorySnapshot(); hockeyPenaltySnapshot(); normalizeStoredHockeyEvent(); } globalThis.takeSnapshot = () => hockeyGameTimerSnapshot(); globalThis.restoreTimers = (...args) => hockeyApplySavedTimers(...args);');
const snapshot = h.c.takeSnapshot();
assert.equal(snapshot.penalty_board.advantage_cycle.display_owner_side, 'away');
const next = runtime([], { captions: false });
next.installSnippet('if (false) { normalizeStoredHockeyEvent(); } globalThis.restoreTimers = (...args) => hockeyApplySavedTimers(...args);');
next.c.restoreTimers('gameA', clone(snapshot)); next.updateStrength();
assertOwner(next, 'away', 'four');
};
cases.pending_goal_snapshot_keeps_latest_pause = async () => {
const row = event('two', 'home', 2, 85000);
const h = runtime([row]); await h.rebalance();
row.goalResolution = { key: 'goal-1', status: 'pending', finished: false, remainingMs: 120000, message: '', at: '2026-11-05T00:00:00Z' };
row.running = false;
const key = h.c.penaltyMirrorKey(h.component, row);
h.state.hockeyGoalPenaltyPending = new Map([[key, { key: 'goal-1', entry: { component: h.component, event: row },
context: h.c.hockeyGoalPenaltyContext(), running: false, status: 'pending', finished: false, remainingMs: 120000 }]]);
h.installSnippet('if (false) { hockeyHistorySnapshot(); hockeyPenaltySnapshot(); normalizeStoredHockeyEvent(); } globalThis.takeSnapshot = () => hockeyGameTimerSnapshot(); globalThis.restoreTimers = (...args) => hockeyApplySavedTimers(...args);');
const snapshot = h.c.takeSnapshot();
snapshot.penalty_board.penalties[0].remainingMs = 111000;
snapshot.penalty_board.penalties[0].running = true;
h.c.restoreTimers('gameA', snapshot);
const restored = h.state.hockeyPenaltyBoards.board.penalties[0];
assert.equal(restored.remainingMs, 85000, 'An older snapshot cannot rewind the unresolved row');
assert.equal(restored.running, false, 'Pause while goal ACK is pending survives rehydration');
assert.equal(restored.goalResolution.key, 'goal-1');
};
cases.pending_goal_blocks_automatic_native_replay = async () => {
const row = event('two', 'home', 2);
const h = runtime([row]); await h.rebalance();
await h.c.hockeySyncScoreboardConditionalSteps({ force: true });
row.goalResolution = { key: 'goal-1', status: 'unknown', finished: true, remainingMs: 0 };
const start = h.frames.length;
await h.rebalance({ force: true, forceOverlay: true });
await h.c.hockeySyncScoreboardConditionalSteps({ force: true });
assert.equal(h.frames.length, start, 'An unresolved goal must not trigger native seed, IN or automatic conditional OUT');
assert.equal(h.native.clocks.get(input('away')).visible, true, 'Only the dedicated goal delivery may change its physical state');
h.installSnippet('globalThis.closeGate = () => hockeySetScoreboardAuxiliariesEnabled(false, { persist: false });');
await h.c.closeGate();
assert.ok(h.commands().slice(start).some(command => command.Function === 'OverlayInput2Out'), 'The operator can still close the auxiliary gate while goal resolution is unresolved');
};
cases.pending_goal_blocks_legacy_in_preserves_data = async () => {
const row = event('two', 'home', 2);
const h = runtime([row]); await h.rebalance();
row.goalResolution = { key: 'goal-1', status: 'pending', finished: true, remainingMs: 0 };
const start = h.commands().length;
const result = await h.c.sendRuntimeVmixSequence([
{ Function: 'SetText', Input: input('away'), SelectedName: 'Text.Text', Value: 'DATA remains available' },
{ Function: 'PreviewInput', Input: input('away') },
{ Function: 'OverlayInput2In', Input: input('away') },
{ Function: 'OverlayInput3In', Input: 'ForeignPenalty' },
], { skipTitleMapping: true });
const sent = h.commands().slice(start);
assert.ok(!sent.some(command => command.Function === 'OverlayInput2In'), 'A legacy interaction cannot replay a goal-pending native plate');
assert.ok(sent.some(command => command.Function === 'SetText'));
assert.ok(sent.some(command => command.Function === 'PreviewInput'));
assert.ok(sent.some(command => command.Function === 'OverlayInput3In' && command.Input === 'ForeignPenalty'));
assert.equal(result.auxiliary_blocked, 1);
};
cases.pure_equal_and_foreign_captions_unchanged = async () => {
const h = runtime([event('a', 'home', 2), event('b', 'away', 2)]);
assert.equal(h.plan().plateSide, '');
h.sequence.steps.push({ id: 'foreign', enabled: true, type: 'vmix_command', function: 'OverlayInput3In', input: 'ForeignPenalty', condition: 'has_penalties' });
await h.c.hockeySyncScoreboardConditionalSteps();
assert.ok(h.ins().some(x => x.Input === 'ForeignPenalty'), 'Non-native configured title animation is outside this routing fix');
};
cases.gate_off_blocks_every_penalty_in = async () => {
const h = runtime([event('two', 'home', 2), event('four', 'away', 4)]);
h.state.data.hockey.game_control.flags.scoreboard_auxiliaries_enabled = false;
await h.rebalance(); await h.c.hockeySyncScoreboardConditionalSteps({ force: true });
assert.equal(h.ins().length, 0);
assertOwner(h, 'away', 'two');
};
const name = process.argv[2];
assert.equal(typeof cases[name], 'function', 'Unknown scenario ' + name);
cases[name]().then(() => console.log('PASS: ' + name), error => { console.error(error.stack || error); process.exitCode = 1; });

View File

@@ -1,5 +1,29 @@
const fs=require('node:fs'), vm=require('node:vm'), path=require('node:path'), assert=require('node:assert/strict'); const fs=require('node:fs'), vm=require('node:vm'), path=require('node:path'), assert=require('node:assert/strict');
const source=fs.readFileSync(path.join(__dirname,'../ui_builder/static/app.js'),'utf8'); const source=fs.readFileSync(path.join(__dirname,'../ui_builder/static/app.js'),'utf8');
// Load new transport dependencies from production; existing I/O/DOM edges stay local.
function productionClosure(context, roots) {
const functions = new Map(), pattern = /^( {0,2})(?:async )?function (\w+)\(/gm;
let match;
while ((match = pattern.exec(source))) {
const start = match.index, lineEnd = source.indexOf('\n', start);
const singleLine = /\}\s*;?\s*$/.test(source.slice(start, lineEnd));
const end = singleLine ? lineEnd : source.indexOf('\n' + match[1] + '}', start) + match[1].length + 2;
assert.ok(end > start, 'Unclosed production helper ' + match[2]);
functions.set(match[2], source.slice(start, end));
}
const needed = new Set(roots);
function visit(name) {
assert.ok(functions.has(name), 'Missing actual production helper ' + name);
for (const candidate of functions.keys()) {
if (needed.has(candidate) || typeof context[candidate] === 'function') continue;
if (new RegExp('\\b' + candidate + '\\s*\\(').test(functions.get(name))) {
needed.add(candidate); visit(candidate);
}
}
}
roots.forEach(visit);
return [...needed].map(name => functions.get(name)).join('\n');
}
const names=['currentHockeyPenaltyEntries','activeHockeyPenaltyEntries','hockeyPenaltyHasStarted', const names=['currentHockeyPenaltyEntries','activeHockeyPenaltyEntries','hockeyPenaltyHasStarted',
'sortedPenaltyEntries','penaltyLocalAdvantageSide','penaltyDisplayEntriesByTargetSide', 'sortedPenaltyEntries','penaltyLocalAdvantageSide','penaltyDisplayEntriesByTargetSide',
'hockeyTimerSyncStepById','activateConfiguredPenaltyCountdowns','penaltyTargetAssignmentKey', 'hockeyTimerSyncStepById','activateConfiguredPenaltyCountdowns','penaltyTargetAssignmentKey',
@@ -19,10 +43,10 @@ const names=['currentHockeyPenaltyEntries','activeHockeyPenaltyEntries','hockeyP
'hockeyAuxiliaryGateContext','hockeyScoreboardAuxiliariesEnabled', 'hockeyAuxiliaryGateContext','hockeyScoreboardAuxiliariesEnabled',
'hockeyAuxiliaryVisibilityCommands','hockeyScoreboardAuxiliaryCommand', 'hockeyAuxiliaryVisibilityCommands','hockeyScoreboardAuxiliaryCommand',
'hockeyObserveScoreForPenaltyGoal','hockeyGoalPenaltyContext','noteHockeySelectionContext', 'hockeyObserveScoreForPenaltyGoal','hockeyGoalPenaltyContext','noteHockeySelectionContext',
'hockeyObserveAuxiliaryGateControl']; 'hockeyObserveAuxiliaryGateControl', 'hockeyPenaltyEntryDeliveryPending', 'hockeyPenaltyDisplayTargetAllowed', 'hockeyPenaltyCaptionTargetAllowed',
'hockeyPenaltyTargetDeliveryPending', 'hockeyPenaltyTransportSampler', 'sendRuntimeVmixSequence'];
const clampDefinition=source.match(/^ const clamp = .+;$/m);assert.ok(clampDefinition,'actual production clamp'); const clampDefinition=source.match(/^ const clamp = .+;$/m);assert.ok(clampDefinition,'actual production clamp');
const definitions=clampDefinition[0]+'\n'+names.map(name=>{const start=source.search(new RegExp(' (?:async )?function '+name+'\\('));
assert.ok(start>=0,name);return source.slice(start,source.indexOf('\n }',start)+4);}).join('\n');
const target={id:'home-slot',input:'home-penalty',selected_name:'Time.Text',overlay:'2'}; const target={id:'home-slot',input:'home-penalty',selected_name:'Time.Text',overlay:'2'};
const step={id:'timers',type:'hockey_vmix_timers_start',sync_vmix_penalties:true,home_penalty_targets:[target],away_penalty_targets:[]}; const step={id:'timers',type:'hockey_vmix_timers_start',sync_vmix_penalties:true,home_penalty_targets:[target],away_penalty_targets:[]};
const scoreboard={id:'score',is_scoreboard_sequence:true,steps:[{type:'vmix_command',function:'OverlayInput1In',input:'score-input'}]}; const scoreboard={id:'score',is_scoreboard_sequence:true,steps:[{type:'vmix_command',function:'OverlayInput1In',input:'score-input'}]};
@@ -37,8 +61,18 @@ const state={config:{components:[component],shortcut_sequences:[scoreboard,{id:'
vmixOverlayRuntime:new Map([['1',{input:'score-input'}]]),shortcutSequenceOverlayState:new Map(), vmixOverlayRuntime:new Map([['1',{input:'score-input'}]]),shortcutSequenceOverlayState:new Map(),
quickPanelServerOnAirSequences:new Set(),quickPanelOnAirSequences:new Set()}; quickPanelServerOnAirSequences:new Set(),quickPanelOnAirSequences:new Set()};
const noop=()=>{}; const noop=()=>{};
const ctx={console,state,performance,Date,setTimeout,clearTimeout,window:{UIBuilderRuntime:{patchData:patch=>Object.assign(state.data.hockey,patch.hockey)},dispatchEvent:noop},clone:value=>JSON.parse(JSON.stringify(value)),ensureHockeyBoardState:()=>board,hockeyCanControl:()=>allowed, const ctx={console,state,performance,Date,AbortController,URLSearchParams,setTimeout,clearTimeout,window:{setTimeout,clearTimeout,UIBuilderRuntime:{patchData:patch=>Object.assign(state.data.hockey,patch.hockey)},dispatchEvent:noop},clone:value=>JSON.parse(JSON.stringify(value)),ensureHockeyBoardState:()=>board,hockeyCanControl:()=>allowed,
currentRuntimeVmixDeviceId:()=> 'd',currentRuntimeHockeySessionToken:()=> 's', currentRuntimeVmixDeviceId:()=> 'd',currentRuntimeHockeySessionToken:()=> 's',
refreshQuickPanelOnAirClasses:noop,hockeyRuntimeVmixInputTitle:async input=>String(input),
async fetch(url,options={}) {
assert.equal(options.method,'POST');
if(url.startsWith('/api/hockey/agents/devices/d/apply-mapping?')) return {ok:true,status:200,json:async()=>({ok:true,complete:true,mapping_ack_waited:true,confirmation:'ack',applied:1,
text_fields_total:1,text_fields_confirmed:1,missing:[],rule_missing:[],errors:[],warnings:[]})};
assert.equal(url,'/api/hockey/vmix/sequence');
const body=JSON.parse(options.body);timeline.push('countdown-transport');sent.push(...body.commands);
return {ok:true,status:200,json:async()=>({ok:true,confirmation:'ack',applied:body.commands.length,
results:body.commands.map(command=>({ok:true,function:command.Function,ack_waited:true}))})};
},
padTimer:n=>String(n).padStart(2,'0'),sequencePenaltyTargets:(s,side)=>s[side+'_penalty_targets'], padTimer:n=>String(n).padStart(2,'0'),sequencePenaltyTargets:(s,side)=>s[side+'_penalty_targets'],
getByPath:()=>({}),rememberPenaltyAdvantagePlan:noop,emitInteraction:(_component,name)=>timeline.push(name),hockeyPenaltyContext:()=>({}), getByPath:()=>({}),rememberPenaltyAdvantagePlan:noop,emitInteraction:(_component,name)=>timeline.push(name),hockeyPenaltyContext:()=>({}),
addHockeyHistory:noop,hockeyInfractionWebLabel:()=>'',hockeySyncPenaltySideMappingContext:()=>Promise.resolve(), addHockeyHistory:noop,hockeyInfractionWebLabel:()=>'',hockeySyncPenaltySideMappingContext:()=>Promise.resolve(),
@@ -49,11 +83,12 @@ const ctx={console,state,performance,Date,setTimeout,clearTimeout,window:{UIBuil
shortcutSequenceById:id=>state.config.shortcut_sequences.find(s=>s.id===id), shortcutSequenceById:id=>state.config.shortcut_sequences.find(s=>s.id===id),
shortcutSequenceOverlayTargets:s=>s?.id==='score'?[{layer:'1',input:'score-input'}]:[], shortcutSequenceOverlayTargets:s=>s?.id==='score'?[{layer:'1',input:'score-input'}]:[],
shortcutSequencePreviewTargets:()=>[],sequenceStillOwnsRuntimeOverlay:()=>false}; shortcutSequencePreviewTargets:()=>[],sequenceStillOwnsRuntimeOverlay:()=>false};
vm.createContext(ctx);vm.runInContext(definitions,ctx); vm.createContext(ctx);vm.runInContext(clampDefinition[0]+'\n'+productionClosure(ctx,names),ctx);
const functions=()=>sent.map(c=>c.Function); const functions=()=>sent.map(c=>c.Function);
const settle=async()=>{for(let i=0;i<12;i++)await Promise.resolve();}; const settle=async()=>{for(let i=0;i<12;i++)await Promise.resolve();};
const serverState=()=>({game_id:'g',current_period:'1',flags:{scoreboard_auxiliaries_enabled:true},strength:{home_penalties:0,away_penalties:1,advantage_side:'home'}}); const serverState=()=>({game_id:'g',current_period:'1',flags:{scoreboard_auxiliaries_enabled:true},strength:{home_penalties:0,away_penalties:1,advantage_side:'home'}});
const afterSave=async()=>{ctx.hockeyStoreGameControl('g',serverState(),{render:false,dispatch:false});await settle();}; const afterSave=async()=>{ctx.hockeyStoreGameControl('g',serverState(),{render:false,dispatch:false});await settle();
await state.vmixUrgentCommandQueue;await state.vmixCommandQueue;await settle();};
(async()=>{ (async()=>{
// No local ON AIR latch, only authoritative vMix tally (e.g. after reload). // No local ON AIR latch, only authoritative vMix tally (e.g. after reload).
assert.equal(ctx.hockeyScoreboardIsLive(),true); assert.equal(ctx.hockeyScoreboardIsLive(),true);
@@ -93,7 +128,8 @@ const afterSave=async()=>{ctx.hockeyStoreGameControl('g',serverState(),{render:f
await ctx.rebalanceVmixPenaltyTargets({scoreboardActive:true,forceOverlay:true}); await ctx.rebalanceVmixPenaltyTargets({scoreboardActive:true,forceOverlay:true});
assert.deepEqual(functions(),['SetCountdown','StopCountdown','OverlayInput2In']); assert.deepEqual(functions(),['SetCountdown','StopCountdown','OverlayInput2In']);
assert.equal(sent[0].Value,'00:05:00'); assert.equal(sent[0].Value,'00:05:00');
sent.length=0;await ctx.rebalanceVmixPenaltyTargets({scoreboardActive:true,forceOverlay:true}); sent.length=0;state.vmixOverlayRuntime.delete('2'); // External penalty OUT tally: F1 must restore the plate without reseeding.
await ctx.rebalanceVmixPenaltyTargets({scoreboardActive:true,forceOverlay:true});
assert.deepEqual(functions(),['OverlayInput2In'],'showing scorebug again must not restart native timer'); assert.deepEqual(functions(),['OverlayInput2In'],'showing scorebug again must not restart native timer');
sent.length=0;allowed=false;state.vmixOverlayRuntime.set('1',{input:'score-input'}); sent.length=0;allowed=false;state.vmixOverlayRuntime.set('1',{input:'score-input'});
ctx.emitHockeyEventUpdated(component,event,'preset');await ctx.rebalanceVmixPenaltyTargets({force:true}); ctx.emitHockeyEventUpdated(component,event,'preset');await ctx.rebalanceVmixPenaltyTargets({force:true});

View File

@@ -13,6 +13,30 @@ function extract(name) {
assert.ok(end > start, `missing function end ${name}`); assert.ok(end > start, `missing function end ${name}`);
return source.slice(start, end + 4); return source.slice(start, end + 4);
} }
// Load new transport dependencies from production; existing I/O/DOM edges stay local.
function productionClosure(context, roots) {
const functions = new Map(), pattern = /^( {0,2})(?:async )?function (\w+)\(/gm;
let match;
while ((match = pattern.exec(source))) {
const start = match.index, lineEnd = source.indexOf('\n', start);
const singleLine = /\}\s*;?\s*$/.test(source.slice(start, lineEnd));
const end = singleLine ? lineEnd : source.indexOf('\n' + match[1] + '}', start) + match[1].length + 2;
assert.ok(end > start, 'Unclosed production helper ' + match[2]);
functions.set(match[2], source.slice(start, end));
}
const needed = new Set(roots);
function visit(name) {
assert.ok(functions.has(name), 'Missing actual production helper ' + name);
for (const candidate of functions.keys()) {
if (needed.has(candidate) || typeof context[candidate] === 'function') continue;
if (new RegExp('\\b' + candidate + '\\s*\\(').test(functions.get(name))) {
needed.add(candidate); visit(candidate);
}
}
}
roots.forEach(visit);
return [...needed].map(name => functions.get(name)).join('\n');
}
function runtime(extra = []) { function runtime(extra = []) {
const noop = () => {}; const noop = () => {};
const game = { action_id:'hockey_game_timer', type:'timer', props:{mode:'count_down',startTime:'20:00'} }; const game = { action_id:'hockey_game_timer', type:'timer', props:{mode:'count_down',startTime:'20:00'} };
@@ -34,8 +58,18 @@ function runtime(extra = []) {
runningShortcutSequences:new Set(),pendingShortcutSequenceRuns:new Map(),data:{}}; runningShortcutSequences:new Set(),pendingShortcutSequenceRuns:new Map(),data:{}};
let allowed = true; let allowed = true;
const compact = raw => Object.fromEntries(Object.entries(raw).map(([key,value])=>[key,typeof value==='function'?value():value])); const compact = raw => Object.fromEntries(Object.entries(raw).map(([key,value])=>[key,typeof value==='function'?value():value]));
const context = {console,performance:{now:()=>1000},state,boot:{mode:'runtime'},setTimeout,clearTimeout, const context = {console,Date,AbortController,URLSearchParams,performance:{now:()=>1000},state,boot:{mode:'runtime'},setTimeout,clearTimeout,
window:{HockeyMatchAccess:{storage:{getItem:()=> 'account-a'}}}, window:{setTimeout,clearTimeout,HockeyMatchAccess:{storage:{getItem:()=> 'account-a'}}},
refreshQuickPanelOnAirClasses:noop,hockeyRuntimeVmixInputTitle:async input=>String(input),
async fetch(url,options={}) {
assert.equal(options.method,'POST');
if(url.startsWith('/api/hockey/agents/devices/OUTPUT-A/apply-mapping?')) return {ok:true,status:200,json:async()=>({ok:true,complete:true,mapping_ack_waited:true,confirmation:'ack',applied:1,
text_fields_total:1,text_fields_confirmed:1,missing:[],rule_missing:[],errors:[],warnings:[]})};
assert.equal(url,'/api/hockey/vmix/sequence');
const body=JSON.parse(options.body);order.push('transport');sent.push(body.commands.map(compact));
return {ok:true,status:200,json:async()=>({ok:true,confirmation:'ack',applied:body.commands.length,
results:body.commands.map(command=>({ok:true,function:command.Function,ack_waited:true}))})};
},
padTimer:value=>String(value).padStart(2,'0'),clamp:(n,l,h)=>Math.max(l,Math.min(h,n)), padTimer:value=>String(value).padStart(2,'0'),clamp:(n,l,h)=>Math.max(l,Math.min(h,n)),
hockeyCanControl:()=>allowed,componentByActionId:id=>id===game.action_id?game:id===boardComponent.action_id?boardComponent:null, hockeyCanControl:()=>allowed,componentByActionId:id=>id===game.action_id?game:id===boardComponent.action_id?boardComponent:null,
isTimerComponent:c=>c===game,ensureTimerState:()=>main, isTimerComponent:c=>c===game,ensureTimerState:()=>main,
@@ -76,9 +110,10 @@ function runtime(extra = []) {
'hockeyScoreboardDelaySeconds','hockeyScoreboardPresentationContext','hockeyObserveScoreboardPresentation','hockeyScoreboardAuxiliaryReady', 'hockeyScoreboardDelaySeconds','hockeyScoreboardPresentationContext','hockeyObserveScoreboardPresentation','hockeyScoreboardAuxiliaryReady',
'hockeyScoreboardAuxiliaryDelay','hockeyScoreboardAuxiliaryTargetReady','hockeyMatchFlags', 'hockeyScoreboardAuxiliaryDelay','hockeyScoreboardAuxiliaryTargetReady','hockeyMatchFlags',
'hockeyScoreboardTeamStateSettings','hockeyTeamStateSetting','hockeyGameControlLanguage','shortcutVmixStepCommands', 'hockeyScoreboardTeamStateSettings','hockeyTeamStateSetting','hockeyGameControlLanguage','shortcutVmixStepCommands',
'hockeyAuxiliaryGateContext','hockeyScoreboardAuxiliariesEnabled',...extra]; 'hockeyAuxiliaryGateContext','hockeyScoreboardAuxiliariesEnabled','hockeyPenaltyEntryDeliveryPending', 'hockeyPenaltyDisplayTargetAllowed', 'hockeyPenaltyCaptionTargetAllowed',
'hockeyPenaltyTargetDeliveryPending', 'hockeyPenaltyTransportSampler', 'sendRuntimeVmixSequence',...extra];
vm.createContext(context); vm.createContext(context);
vm.runInContext([...new Set(names)].map(extract).join('\n'),context); vm.runInContext(productionClosure(context,[...new Set(names)]),context);
return {context,game,main,board,boardComponent,step,sequence,target,state,sent,events,order, return {context,game,main,board,boardComponent,step,sequence,target,state,sent,events,order,
allow:value=>{allowed=value;},clear:()=>{sent.length=events.length=order.length=0;}, allow:value=>{allowed=value;},clear:()=>{sent.length=events.length=order.length=0;},
functions:()=>sent.flat().map(command=>command.Function)}; functions:()=>sent.flat().map(command=>command.Function)};

View File

@@ -7,7 +7,7 @@ const assert = require('node:assert/strict');
const source = fs.readFileSync(path.join(__dirname, '../ui_builder/static/app.js'), 'utf8'); const source = fs.readFileSync(path.join(__dirname, '../ui_builder/static/app.js'), 'utf8');
const names = ['getByPath', 'hockeyTimerSyncStepById', 'activateConfiguredPenaltyCountdowns', 'penaltyTargetAssignmentKey', const names = ['getByPath', 'hockeyTimerSyncStepById', 'activateConfiguredPenaltyCountdowns', 'penaltyTargetAssignmentKey',
'penaltyMirrorKey', 'vmixCountdownValue', 'vmixGameCountdownControlCommands', 'vmixPenaltyCountdownControlCommands', 'penaltyMirrorKey', 'vmixCountdownValue', 'vmixGameCountdownControlCommands', 'vmixPenaltyCountdownControlCommands',
'rebalanceVmixPenaltyTargets', 'controlHockeyPenalty', 'runShortcutSequenceStep', 'hockeyPenaltyEntryDeliveryPending', 'hockeyGoalResolutionData', 'rebalanceVmixPenaltyTargets', 'controlHockeyPenalty', 'runShortcutSequenceStep',
'hockeyObserveScoreboardPresentation', 'hockeyScoreboardPresentationContext', 'hockeyTimerSelectedGameId', 'hockeyObserveScoreboardPresentation', 'hockeyScoreboardPresentationContext', 'hockeyTimerSelectedGameId',
'currentRuntimeVmixDeviceId', 'currentRuntimeHockeySessionToken']; 'currentRuntimeVmixDeviceId', 'currentRuntimeHockeySessionToken'];
const definitions = names.map(name => { const definitions = names.map(name => {

View File

@@ -0,0 +1,50 @@
"""The chosen physical plate survives the real timers API and a reload."""
from __future__ import annotations
import pytest
from hockey_data.service import HockeyDataService
from tests.test_stage1_match_access import env, timer
def penalty(identity, side, minutes):
return {"id": identity, "side": side, "teamPenalty": True, "infraction": {"id": "minor"},
"preset": str(minutes), "durationMs": minutes * 60000, "remainingMs": minutes * 60000,
"running": False, "startedOnce": True, "finished": False}
@pytest.mark.parametrize("long_side", ["home", "away"])
def test_display_owner_survives_timer_api_and_strength_transition(env, long_side):
assert env.claim().status_code == 200
short_side = "away" if long_side == "home" else "home"
long = penalty("long-four", long_side, 4)
short = penalty("short-two", short_side, 2)
cycle = {"had_advantage": True, "last_advantage_side": long_side,
"display_owner_side": long_side, "display_owner_event_key": "hockey_penalty_dashboard:long-four"}
body = timer(600000, False)
body["penalty_board"] = {"penalties": [short, long], "history": [], "advantage_cycle": cycle}
saved = env.client.put("/api/hockey/games/g/control/timers", headers=env.headers(), json=body)
assert saved.status_code == 200, saved.text
# A separate participant reads the actual persisted state, not a local response echo.
reloaded = env.client.get("/api/hockey/games/g/control", headers=env.headers("b")).json()
assert reloaded["timers"]["penalty_board"]["advantage_cycle"] == cycle
assert reloaded["strength"]["advantage_side"] == ""
# The 2:00 portion expires. The longer penalty keeps its physical plate even
# though the actual hockey advantage now belongs to the opposite team.
long["remainingMs"] = 120000
cycle["last_advantage_side"] = short_side
body["penalty_board"]["penalties"] = [long]
saved = env.client.put("/api/hockey/games/g/control/timers", headers=env.headers(), json=body)
assert saved.status_code == 200, saved.text
reloaded = env.client.get("/api/hockey/games/g/control", headers=env.headers("b")).json()
assert reloaded["timers"]["penalty_board"]["advantage_cycle"] == cycle
assert reloaded["strength"]["advantage_side"] == short_side
def test_invalid_display_owner_does_not_override_legacy_advantage():
legacy = {"had_advantage": True, "last_advantage_side": "away"}
for bad in ({"display_owner_side": "other", "display_owner_event_key": "board:p"},
{"display_owner_side": "home", "display_owner_event_key": ""},
{"display_owner_side": "home", "display_owner_event_key": ["board:p"]}):
result = HockeyDataService._normalise_game_timer_state({"penalty_board": {"advantage_cycle": {**legacy, **bad}}})
assert result["penalty_board"]["advantage_cycle"] == legacy

View File

@@ -0,0 +1,34 @@
"""Goal deletion requires actual vMix ACK before visible/persisted mutation."""
import os
from pathlib import Path
import shutil
import subprocess
import pytest
ROOT = Path(__file__).resolve().parents[1]
CASES = [
'normal_goal_ack_before_row_delete', 'f2_off_never_mutates_or_replays', 'f2_off_during_ack_keeps_row',
'nack_keeps_row_without_replay', 'unknown_ack_keeps_row_without_replay',
'double_first_ack_before_shortening', 'double_second_ack_before_delete',
'duplicate_success_only_one_removal', 'rehydrate_pending_does_not_repeat_goal',
'role_change_before_ack_keeps_row', 'major_and_equal_strength_do_not_delete',
'ordinary_goal_does_not_need_shb', 'penalty_shot_exception_stays',
'undo_waits_for_vmix_before_restore', 'undo_nack_does_not_invent_restored_row',
'held_ack_pause_keeps_latest_native_time', 'held_ack_resume_keeps_latest_native_time',
'unmapped_current_segment_uses_other_field_ack', 'shared_input_removes_only_chosen_field',
'joint_two_four_right_phase_goal_and_undo',
]
@pytest.mark.parametrize('case', CASES)
def test_goal_ack(case):
node = shutil.which('node')
assert node, 'Node is required for executable browser tests'
result = subprocess.run(
[node, str(ROOT / 'tests/build200_goal_ack.cjs'), case,
os.environ.get('BUILD200_RUNTIME_ROOT', str(ROOT))],
cwd=ROOT, text=True, capture_output=True, timeout=20,
)
assert result.returncode == 0, result.stdout + result.stderr
assert f'PASS BUILD200 goal ACK: {case}' in result.stdout, result.stdout + result.stderr

View File

@@ -0,0 +1,42 @@
"""Actual browser routing, Mapping ACK and native countdown regressions."""
from __future__ import annotations
import os
from pathlib import Path
import shutil
import subprocess
import pytest
ROOT = Path(__file__).resolve().parents[1]
SCENARIOS = tuple(
f"pair_{side}_short_{order}"
for side in ("home", "away") for order in ("short_first", "long_first")
) + tuple(f"phase_expiry_{side}_short" for side in ("home", "away")) + (
"reverse_insertion_remembers_owner",
"repeat_main_has_no_wrong_side_flash",
"conditional_and_fallback_same_owner",
"native_caption_data_ack_before_in",
"native_cold_in_dedup_after_caption_mapping",
"clock_continuity_pause_resume_home_short",
"clock_continuity_pause_resume_away_short",
"tail_snapshot_and_hydration",
"pending_goal_snapshot_keeps_latest_pause",
"pending_goal_blocks_automatic_native_replay",
"pending_goal_blocks_legacy_in_preserves_data",
"pure_equal_and_foreign_captions_unchanged",
"gate_off_blocks_every_penalty_in",
)
@pytest.mark.parametrize("scenario", SCENARIOS)
def test_penalty_display(scenario: str) -> None:
node = shutil.which("node")
assert node, "Node is required for actual browser runtime regressions"
runtime = Path(os.environ.get("BUILD200_RUNTIME_ROOT", ROOT))
completed = subprocess.run(
[node, str(ROOT / "tests/build200_penalty_display.cjs"), scenario, str(runtime)],
text=True, capture_output=True, timeout=20,
)
assert completed.returncode == 0, completed.stdout + completed.stderr
assert f"PASS: {scenario}" in completed.stdout

View File

@@ -1,3 +1,5 @@
from tests.test_build200_penalty_display import test_penalty_display as run_penalty_display
from tests.timer_contract_support import run_timer_contract
from pathlib import Path from pathlib import Path
from hockey_data.agent_bridge import VmixAgentHub from hockey_data.agent_bridge import VmixAgentHub
@@ -8,14 +10,10 @@ BRIDGE = (ROOT / "hockey_data/agent_bridge.py").read_text(encoding="utf-8")
def test_penalty_display_routes_only_one_transition_timer_to_advantage_target(): def test_penalty_display_routes_only_one_transition_timer_to_advantage_target():
start = APP_JS.index("function penaltyDisplayEntriesByTargetSide") """Execute the current single-plate contract, including the 2/4 owner pin."""
end = APP_JS.index("function hockeyPenaltySideMappingDetail", start) run_timer_contract('penalty_priority')
block = APP_JS[start:end] run_penalty_display('pair_home_short_long_first')
assert 'function penaltyLocalAdvantageSide' in APP_JS run_penalty_display('pair_away_short_long_first')
assert 'const all = [...home, ...away].sort' in block
assert 'if (!advantageSide)' in block
assert 'home: advantageSide === "home"' in block
assert 'away: advantageSide === "away"' in block
def test_penalty_rebalance_and_initial_timer_use_same_display_plan(): def test_penalty_rebalance_and_initial_timer_use_same_display_plan():

View File

@@ -1,3 +1,5 @@
from tests.test_build200_penalty_display import test_penalty_display as run_penalty_display
from tests.timer_contract_support import run_timer_contract
from pathlib import Path from pathlib import Path
from hockey_data.mapping_context import MappingDataService from hockey_data.mapping_context import MappingDataService
@@ -45,15 +47,10 @@ def test_strength_engine_reports_advantage_for_4x3_and_3x4():
def test_penalty_plate_routing_uses_single_advantage_side_and_global_shortest_timer(): def test_penalty_plate_routing_uses_single_advantage_side_and_global_shortest_timer():
start = APP_JS.index("function penaltyDisplayEntriesByTargetSide") """Execute the current single-plate contract, including the 2/4 owner pin."""
end = APP_JS.index("function hockeyPenaltySideMappingDetail", start) run_timer_contract('penalty_priority')
block = APP_JS[start:end] run_penalty_display('phase_expiry_home_short')
assert 'const all = [...home, ...away].sort' in block run_penalty_display('phase_expiry_away_short')
assert 'const advantageSide = penaltyLocalAdvantageSide(home.length, away.length);' in block
assert 'if (!advantageSide)' in block
assert 'transitionEntry = all[0]' in block
assert 'home: advantageSide === "home"' in block
assert 'away: advantageSide === "away"' in block
def test_database_schema_reference_lists_real_hockey_tables(tmp_path: Path): def test_database_schema_reference_lists_real_hockey_tables(tmp_path: Path):

View File

@@ -1,3 +1,4 @@
from tests.test_build200_penalty_display import test_penalty_display as run_penalty_display
from pathlib import Path from pathlib import Path
ROOT = Path(__file__).resolve().parents[1] ROOT = Path(__file__).resolve().parents[1]
@@ -15,11 +16,6 @@ def test_authoritative_strength_change_rebalances_penalty_targets():
def test_penalty_plan_rebalances_after_strength_refresh_to_single_advantage_plate(): def test_penalty_plan_rebalances_after_strength_refresh_to_single_advantage_plate():
start = APP_JS.index("function penaltyDisplayEntriesByTargetSide") """Execute the current single-plate contract, including the 2/4 owner pin."""
end = APP_JS.index("function hockeyPenaltySideMappingDetail", start) run_penalty_display('conditional_and_fallback_same_owner')
block = APP_JS[start:end]
assert 'penaltyLocalAdvantageSide(home.length, away.length)' in block
assert 'transitionEntry = all[0]' in block
assert 'routedToAdvantage: true' in block
assert 'if (!advantageSide)' in block

View File

@@ -1,3 +1,4 @@
from tests.test_build200_penalty_display import test_penalty_display as run_penalty_display
from pathlib import Path from pathlib import Path
from hockey_data.service import HockeyDataService from hockey_data.service import HockeyDataService
@@ -55,10 +56,7 @@ def test_single_remaining_penalty_outputs_pp_caption_on_opposite_team():
def test_display_plan_never_outputs_two_penalty_plates(): def test_display_plan_never_outputs_two_penalty_plates():
start = APP_JS.index("function penaltyDisplayEntriesByTargetSide") """Execute the current single-plate contract, including the 2/4 owner pin."""
end = APP_JS.index("function hockeyPenaltySideMappingDetail", start) run_penalty_display('pair_home_short_short_first')
block = APP_JS[start:end] run_penalty_display('pair_away_short_short_first')
assert 'const all = [...home, ...away].sort' in block run_penalty_display('pure_equal_and_foreign_captions_unchanged')
assert 'return { home: [], away: [], routedToAdvantage: false' in block
assert 'home: advantageSide === "home" && transitionEntry ? [transitionEntry] : []' in block
assert 'away: advantageSide === "away" && transitionEntry ? [transitionEntry] : []' in block

View File

@@ -1,3 +1,5 @@
from tests.test_build200_penalty_display import test_penalty_display as run_penalty_display
from tests.timer_contract_support import run_timer_contract
from pathlib import Path from pathlib import Path
from hockey_data.service import HockeyDataService from hockey_data.service import HockeyDataService
@@ -60,15 +62,10 @@ def test_two_vs_one_penalties_caption_only_advantage_team():
def test_runtime_plan_uses_one_plate_and_global_shortest_transition_timer(): def test_runtime_plan_uses_one_plate_and_global_shortest_transition_timer():
start = APP_JS.index("function penaltyDisplayEntriesByTargetSide") """Execute the current single-plate contract, including the 2/4 owner pin."""
end = APP_JS.index("function hockeyPenaltySideMappingDetail", start) run_timer_contract('penalty_priority')
block = APP_JS[start:end] run_penalty_display('phase_expiry_home_short')
assert 'const all = [...home, ...away].sort' in block run_penalty_display('phase_expiry_away_short')
assert 'const transitionEntry = all[0] || null;' in block
assert 'home: advantageSide === "home" && transitionEntry ? [transitionEntry] : []' in block
assert 'away: advantageSide === "away" && transitionEntry ? [transitionEntry] : []' in block
assert 'if (!advantageSide)' in block
assert 'return { home: [], away: [], routedToAdvantage: false' in block
def test_final_full_strength_action_only_runs_after_last_penalty_and_real_advantage(): def test_final_full_strength_action_only_runs_after_last_penalty_and_real_advantage():

File diff suppressed because it is too large Load Diff