File size: 87,751 Bytes
5a9e79d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 | {
"instance_id": "CPython_PEP-669_Low-Impact-Monitoring-for-CPython_PR-103083",
"repo": "python/cpython",
"language": "C, Python",
"image": "lolbench/cpython-pr-103083:1",
"base_commit": "dce2d38cb04b541bad477ccc1040a68fa70a9a69",
"base_commit_note": "The PR was rebased before merge \u2014 the parent of merge commit 411b1692811b2ecac59cb0df0f920861c7cf179a is dce2d38cb04b541bad477ccc1040a68fa70a9a69 (2023-04-04, 'gh-103092: Isolate msvcrt (#103248)'); solution.patch / eval_tests.patch apply cleanly there but not at the PR-creation-time tip. Same pattern as PEP-617 / PEP-634 / PEP-654.",
"pr_head_sha": "411b1692811b2ecac59cb0df0f920861c7cf179a",
"merge_commit_sha": "411b1692811b2ecac59cb0df0f920861c7cf179a",
"diff_source": "github_pr_recomputed_against_merge_parent",
"env": {
"PYTHON_BUILD_DIR": "/workspace/cpython",
"LANG": "C.UTF-8"
},
"timeout_s": 5400,
"resource_caps": {
"cpu": 4,
"mem_gb": 7
},
"solution_patch_sha256": "6db52071ad341071c6b7c2fcd194ef33494b1bfc2cd57bc35957f076489e3c9d",
"eval_tests_patch_sha256": "39401b31e137fe0295154398b7ad73995d27983c0e550e2f79111273ac82d13f",
"omitted_patch_sha256": "8a3ddd5e63e00ea2eec3615fb642753ebe181396b190d3354c7a17d74be645e1",
"omitted_patch_note": "INFORMATIONAL ARTIFACT ONLY. Contains just the NEWS entry (Misc/NEWS.d/next/Core and Builtins/...rst \u2014 path has a literal space, header quoting diverges from the API's raw format). Note: an earlier draft of this bundle also moved Lib/test/test_sys_settrace.py to omitted.patch on a mistaken 'except* syntax breaks the parser' rationale (host Python 3.9 audit tool can't parse the file because of pre-existing 3.11+ except* syntax, but the eval-container ./python is 3.12+ and parses it fine). Per Codex H2 review, test_sys_settrace.py is now correctly in eval_tests.patch.",
"solution_patch_note": "Python/generated_cases.c.h (+854/-540 lines, the generated bytecode-dispatch table) has an empty patch field in pr_files_cache because the GitHub API truncates very large diffs; the canonical content was reconstructed via `git diff dce2d38c..411b1692 -- Python/generated_cases.c.h` on the local clone. Same fix pattern as PEP-617's parse.c, PEP-634's parser.c, PEP-654's parser.c.",
"agent_contract": {
"input": "/in/solution.patch",
"output": "/out/agent_report.json",
"invocation": "docker run --rm --network=none -v $(pwd)/solution.patch:/in/solution.patch:ro -v $(pwd)/out:/out lolbench/cpython-pr-103083:1"
},
"test_framework": "cpython_unittest",
"test_level": "public-api",
"test_cmd": "./python -m unittest -v $TESTS",
"log_parser": "programmatic_testresult",
"log_parser_config": {
"runner": "unittest.TestLoader.loadTestsFromName + TextTestRunner.run, JSON-serialized verdicts"
},
"ptrace_required": false,
"docker_run_extra_args": [],
"fail_to_pass": [
"test.test_monitoring.MonitoringBasicTest.test_has_objects",
"test.test_monitoring.MonitoringBasicTest.test_tool",
"test.test_monitoring.MonitoringCountTest.test_start_count",
"test.test_monitoring.MonitoringCountTest.test_resume_count",
"test.test_monitoring.MonitoringCountTest.test_return_count",
"test.test_monitoring.MonitoringCountTest.test_call_count",
"test.test_monitoring.MonitoringCountTest.test_c_return_count",
"test.test_monitoring.MonitoringEventsTest.test_just_pass",
"test.test_monitoring.MonitoringEventsTest.test_just_raise",
"test.test_monitoring.MonitoringEventsTest.test_just_call",
"test.test_monitoring.MonitoringEventsTest.test_caught",
"test.test_monitoring.MonitoringEventsTest.test_nested_call",
"test.test_monitoring.SimulateProfileTest.test_balanced",
"test.test_monitoring.SimulateProfileTest.test_frame_stack",
"test.test_monitoring.MontoringDisableAndRestartTest.test_disable",
"test.test_monitoring.MontoringDisableAndRestartTest.test_restart",
"test.test_monitoring.TestSetGetEvents.test_global",
"test.test_monitoring.TestSetGetEvents.test_local",
"test.test_monitoring.TestUninitialized.test_get_local_events_uninitialized"
],
"pass_to_pass": [
"test.test_grammar.TokenTests.test_backslash",
"test.test_grammar.TokenTests.test_ellipsis",
"test.test_grammar.TokenTests.test_floats",
"test.test_grammar.TokenTests.test_plain_integers",
"test.test_grammar.TokenTests.test_long_integers",
"test.test_grammar.TokenTests.test_string_literals",
"test.test_grammar.GrammarTests.test_funcdef",
"test.test_grammar.GrammarTests.test_lambdef",
"test.test_grammar.GrammarTests.test_assert",
"test.test_grammar.GrammarTests.test_if",
"test.test_grammar.GrammarTests.test_while",
"test.test_grammar.GrammarTests.test_for",
"test.test_grammar.GrammarTests.test_try",
"test.test_grammar.GrammarTests.test_classdef",
"test.test_grammar.GrammarTests.test_atoms",
"test.test_grammar.GrammarTests.test_del_stmt",
"test.test_grammar.GrammarTests.test_pass_stmt",
"test.test_grammar.GrammarTests.test_break_stmt",
"test.test_grammar.GrammarTests.test_continue_stmt",
"test.test_grammar.GrammarTests.test_return",
"test.test_grammar.GrammarTests.test_yield",
"test.test_grammar.GrammarTests.test_raise",
"test.test_grammar.GrammarTests.test_import",
"test.test_grammar.GrammarTests.test_global",
"test.test_grammar.GrammarTests.test_nonlocal",
"test.test_grammar.GrammarTests.test_with_statement",
"test.test_grammar.GrammarTests.test_async_await",
"test.test_grammar.GrammarTests.test_dictcomps",
"test.test_grammar.GrammarTests.test_listcomps",
"test.test_grammar.GrammarTests.test_genexps",
"test.test_grammar.GrammarTests.test_comparison",
"test.test_grammar.GrammarTests.test_var_annot_basics",
"test.test_ast.AST_Tests.test_AST_objects",
"test.test_ast.AST_Tests.test_AST_garbage_collection",
"test.test_ast.AST_Tests.test_slice",
"test.test_ast.ASTHelpers_Test.test_parse",
"test.test_ast.ASTHelpers_Test.test_parse_in_error",
"test.test_ast.ASTHelpers_Test.test_dump",
"test.test_ast.ASTHelpers_Test.test_dump_indent",
"test.test_ast.ASTHelpers_Test.test_copy_location",
"test.test_ast.ConstantTests.test_singletons",
"test.test_ast.ConstantTests.test_literal_eval",
"test.test_ast.EndPositionTests.test_lambda",
"test.test_ast.EndPositionTests.test_func_def",
"test.test_code.CodeTest.test_newempty",
"test.test_code.CodeTest.test_constructor",
"test.test_code.CodeTest.test_qualname",
"test.test_code.CodeTest.test_replace",
"test.test_code.CodeLocationTest.test_positions",
"test.test_code.CodeLocationTest.test_lines",
"test.test_sys_settrace.TraceTestCase.test_set_and_retrieve_none",
"test.test_sys_settrace.TraceTestCase.test_set_and_retrieve_func",
"test.test_sys_settrace.TraceTestCase.test_01_basic",
"test.test_sys_settrace.JumpTestCase.test_jump_simple_forwards",
"test.test_sys_settrace.JumpTestCase.test_jump_simple_backwards",
"test.test_sys_settrace.TestEdgeCases.test_reentrancy"
],
"synthetic_tests": [],
"out_of_scope_surfaces": [
{
"surface": "test_monitoring methods that reach sys.monitoring._all_events() \u2014 8 methods via same-class check_lines/check_events helpers: LineMonitoringTest.test_linear/_branch/_try_except (via .check_lines), TestInstallIncrementallly.test_line_then_instruction/_instruction_then_line (via .check_events), TestLocalEvents.test_simple/_c_call/_try_except (via .check_events). PLUS the 14 from a prior round (MultipleMonitorsTest x4, LineMonitoringTest.test_lines_x3, ExceptionMontoringTest x1, TestManyEvents x3, TestLineAndInstructionEvents x3 \u2014 direct/inherited reaches).",
"reason": "Codex H1 + H1-redux: `sys.monitoring._all_events()` is a `_`-prefixed test-helper added by the PR. Per LoLBench Python public-surface rule, `_`-prefixed = private. F2P that exercises it would over-constrain agents to implement a private diagnostic API not part of documented PEP 669 surface. My first audit (checked direct + base-class inheritance) missed 8 more methods that call same-class `check_lines`/`check_events` helpers which internally use `_all_events()`. Re-audit with closure-over-same-class-helpers now correctly identifies all 22 affected methods."
},
{
"surface": "test__opcode.OpcodeTests.test_stack_effect / .test_stack_effect_jump",
"reason": "Codex H2-redux: test__opcode.py imports `from _opcode import stack_effect` and the selected methods call `_opcode.stack_effect()` directly. `_opcode` is a private extension module (`_`-prefixed). Per public-surface rule it's internal. The PR's hunk only adds the public `opcode.MIN_INSTRUMENTED_OPCODE` guard, but the test body's actual call path runs through private `_opcode`. Dropped."
},
{
"surface": "test_bdb P2P methods (8 candidates)",
"reason": "Codex M2-redux: every test_bdb test method enters `with TracerRun(self) as tracer`. The PR modifies `TracerRun.__exit__` (+2/-1) to add a `repr(self.tracer.set_list)` diagnostic line and a trailing newline. Per the fixture-taint rule, P2P methods + their shared helpers must be byte-identical pre/post. Even though the change is mostly diagnostic and shouldn't affect the green path, it technically taints the helper. Dropped all 8 test_bdb P2P candidates for cleanliness."
},
{
"surface": "test.test_sys.SysModuleSizeofTest.test_objecttypes (modified)",
"reason": "PR modifies the test's expected frame struct size string. ABI-level unit test, not user-facing. Excluded."
},
{
"surface": "test.test_code.CodeTest.test_invalid_bytecode (modified)",
"reason": "Asserts opname[229] == '<229>'. CPython-specific opcode-table internals. Excluded."
},
{
"surface": "TestInstallIncrementallly duplicate-name methods in upstream",
"reason": "Both already covered by H1-redux exclusion (they call check_events \u2192 _all_events anyway). Documented for completeness: upstream defines each method name twice; Python keeps the last binding."
},
{
"surface": "test_dis, test_sys, test_bdb minor mods (not in F2P or P2P)",
"reason": "Small post-state adjustments for new opcode numbering / sys.monitoring constants. Included in eval_tests.patch for fidelity but not scored. test_dis +12/-14 across many methods (would all be post-only); test_sys +1/-1 modifies the ABI test (excluded); test_bdb +2/-1 modifies a helper, see M2."
},
{
"surface": "test_sys_settrace.TestLinesAfterTraceStarted.test_events / TestSetLocalTrace.test_with_branches (PR-added)",
"reason": "These two classes are APPENDED to test_sys_settrace.py by eval_tests.patch (the PR's own test additions). They exercise sys.settrace + frame.f_trace + line events. Validation showed they PASS at pre-state without solution.patch, which means the PR's Python/legacy_tracing.c bridge is a BEHAVIOR-PRESERVING refactor of sys.settrace \u2014 these tests were added as regression locks for the rewrite, not because they exercise new observable behavior. They are not valid F2P (F2P must FAIL/ERROR at pre-state by the \u00a77 invariant). Dropped from F2P; still present in eval_tests.patch for fidelity."
}
],
"eval_tests_patch_notes": "eval_tests.patch contains 7 test-file hunks: NEW Lib/test/test_monitoring.py (1044 lines, the canonical PEP 669 test suite) + minor adjustments to test__opcode.py, test_bdb.py, test_code.py, test_dis.py, test_sys.py, test_sys_settrace.py. test_sys_settrace.py is included for fidelity even though no F2P selectors are drawn from it (see out_of_scope_surfaces).",
"fixture_taint_summary": "19 F2P all from a single file: Lib/test/test_monitoring.py (NEW, 1044 lines, the canonical PEP 669 test suite). All methods exercise the documented public sys.monitoring.* API (use_tool_id / register_callback / set_events / set_local_events / get_events / get_local_events / free_tool_id / DISABLE / events.*). 1 F2P (SimulateProfileTest.test_frame_stack) additionally uses sys._getframe \u2014 explicitly allowlisted in spec.json.public_surface_allowlist as a documented CPython implementation detail. Pre-state: sys.monitoring missing \u2192 AttributeError \u2192 all 19 ERROR. Post-state: PR adds Python/instrumentation.c + sysmodule.c sys.monitoring wiring \u2192 all 19 PASS. 56 P2P spread across 4 test files: 32 test_grammar.py (untouched) + 12 test_ast.py (untouched) + 6 test_code.py (PR modifies only test_invalid_bytecode, excluded; chosen methods + helpers unchanged) + 6 test_sys_settrace.py (PR only APPENDS 2 new classes; chosen pre-existing methods + helpers byte-identical pre/post). Ratio P2P/F2P = 2.95\u00d7.",
"triage": {
"fail_to_pass": {
"MonitoringBasicTest.test_has_objects": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringBasicTest.test_has_objects",
"fixture_taint_checked": true
},
"MonitoringBasicTest.test_tool": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringBasicTest.test_tool",
"fixture_taint_checked": true
},
"MonitoringCountTest.test_start_count": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringCountTest.test_start_count",
"fixture_taint_checked": true
},
"MonitoringCountTest.test_resume_count": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringCountTest.test_resume_count",
"fixture_taint_checked": true
},
"MonitoringCountTest.test_return_count": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringCountTest.test_return_count",
"fixture_taint_checked": true
},
"MonitoringCountTest.test_call_count": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringCountTest.test_call_count",
"fixture_taint_checked": true
},
"MonitoringCountTest.test_c_return_count": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringCountTest.test_c_return_count",
"fixture_taint_checked": true
},
"MonitoringEventsTest.test_just_pass": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringEventsTest.test_just_pass",
"fixture_taint_checked": true
},
"MonitoringEventsTest.test_just_raise": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringEventsTest.test_just_raise",
"fixture_taint_checked": true
},
"MonitoringEventsTest.test_just_call": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringEventsTest.test_just_call",
"fixture_taint_checked": true
},
"MonitoringEventsTest.test_caught": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringEventsTest.test_caught",
"fixture_taint_checked": true
},
"MonitoringEventsTest.test_nested_call": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MonitoringEventsTest.test_nested_call",
"fixture_taint_checked": true
},
"SimulateProfileTest.test_balanced": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.SimulateProfileTest.test_balanced",
"fixture_taint_checked": true
},
"SimulateProfileTest.test_frame_stack": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API. Also uses sys._getframe (per the allowlist below).",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [
"sys._getframe"
],
"runner_surface": "./python -m unittest -v test.test_monitoring.SimulateProfileTest.test_frame_stack",
"fixture_taint_checked": true
},
"MontoringDisableAndRestartTest.test_disable": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MontoringDisableAndRestartTest.test_disable",
"fixture_taint_checked": true
},
"MontoringDisableAndRestartTest.test_restart": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.MontoringDisableAndRestartTest.test_restart",
"fixture_taint_checked": true
},
"TestSetGetEvents.test_global": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.TestSetGetEvents.test_global",
"fixture_taint_checked": true
},
"TestSetGetEvents.test_local": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.TestSetGetEvents.test_local",
"fixture_taint_checked": true
},
"TestUninitialized.test_get_local_events_uninitialized": {
"system_reason": "Exercises PEP 669's sys.monitoring API through Python user code: registers an event callback, starts monitoring, runs code that triggers the instrumented opcodes (PY_START/RESUME/RETURN/CALL/LINE/INSTRUCTION/etc.), and asserts the callback recorded the expected events. Uses only the documented public sys.monitoring.* API.",
"public_surface": "sys.monitoring (use_tool_id, register_callback, set_events, get_events, set_local_events, free_tool_id, DISABLE, events.*)",
"internal_symbol_check": [
"_PyInstrumentation_*",
"_Py_Instrumentation",
"INSTRUMENTED_*",
"sys.monitoring._all_events"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_monitoring.TestUninitialized.test_get_local_events_uninitialized",
"fixture_taint_checked": true
}
},
"pass_to_pass": {
"TokenTests.test_backslash": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_backslash",
"fixture_taint_checked": true
},
"TokenTests.test_ellipsis": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_ellipsis",
"fixture_taint_checked": true
},
"TokenTests.test_floats": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_floats",
"fixture_taint_checked": true
},
"TokenTests.test_plain_integers": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_plain_integers",
"fixture_taint_checked": true
},
"TokenTests.test_long_integers": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_long_integers",
"fixture_taint_checked": true
},
"TokenTests.test_string_literals": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_string_literals",
"fixture_taint_checked": true
},
"GrammarTests.test_funcdef": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_funcdef",
"fixture_taint_checked": true
},
"GrammarTests.test_lambdef": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_lambdef",
"fixture_taint_checked": true
},
"GrammarTests.test_assert": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_assert",
"fixture_taint_checked": true
},
"GrammarTests.test_if": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_if",
"fixture_taint_checked": true
},
"GrammarTests.test_while": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_while",
"fixture_taint_checked": true
},
"GrammarTests.test_for": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_for",
"fixture_taint_checked": true
},
"GrammarTests.test_try": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_try",
"fixture_taint_checked": true
},
"GrammarTests.test_classdef": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_classdef",
"fixture_taint_checked": true
},
"GrammarTests.test_atoms": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_atoms",
"fixture_taint_checked": true
},
"GrammarTests.test_del_stmt": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_del_stmt",
"fixture_taint_checked": true
},
"GrammarTests.test_pass_stmt": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_pass_stmt",
"fixture_taint_checked": true
},
"GrammarTests.test_break_stmt": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_break_stmt",
"fixture_taint_checked": true
},
"GrammarTests.test_continue_stmt": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_continue_stmt",
"fixture_taint_checked": true
},
"GrammarTests.test_return": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_return",
"fixture_taint_checked": true
},
"GrammarTests.test_yield": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_yield",
"fixture_taint_checked": true
},
"GrammarTests.test_raise": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_raise",
"fixture_taint_checked": true
},
"GrammarTests.test_import": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_import",
"fixture_taint_checked": true
},
"GrammarTests.test_global": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_global",
"fixture_taint_checked": true
},
"GrammarTests.test_nonlocal": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_nonlocal",
"fixture_taint_checked": true
},
"GrammarTests.test_with_statement": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_with_statement",
"fixture_taint_checked": true
},
"GrammarTests.test_async_await": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_async_await",
"fixture_taint_checked": true
},
"GrammarTests.test_dictcomps": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_dictcomps",
"fixture_taint_checked": true
},
"GrammarTests.test_listcomps": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_listcomps",
"fixture_taint_checked": true
},
"GrammarTests.test_genexps": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_genexps",
"fixture_taint_checked": true
},
"GrammarTests.test_comparison": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_comparison",
"fixture_taint_checked": true
},
"GrammarTests.test_var_annot_basics": {
"system_reason": "Pre-existing grammar-rule test through compile()/exec; test_grammar.py is NOT modified by this PR.",
"public_surface": "compile() / exec() on Python source",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_var_annot_basics",
"fixture_taint_checked": true
},
"AST_Tests.test_AST_objects": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_AST_objects",
"fixture_taint_checked": true
},
"AST_Tests.test_AST_garbage_collection": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_AST_garbage_collection",
"fixture_taint_checked": true
},
"AST_Tests.test_slice": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_slice",
"fixture_taint_checked": true
},
"ASTHelpers_Test.test_parse": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ASTHelpers_Test.test_parse",
"fixture_taint_checked": true
},
"ASTHelpers_Test.test_parse_in_error": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ASTHelpers_Test.test_parse_in_error",
"fixture_taint_checked": true
},
"ASTHelpers_Test.test_dump": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ASTHelpers_Test.test_dump",
"fixture_taint_checked": true
},
"ASTHelpers_Test.test_dump_indent": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ASTHelpers_Test.test_dump_indent",
"fixture_taint_checked": true
},
"ASTHelpers_Test.test_copy_location": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ASTHelpers_Test.test_copy_location",
"fixture_taint_checked": true
},
"ConstantTests.test_singletons": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ConstantTests.test_singletons",
"fixture_taint_checked": true
},
"ConstantTests.test_literal_eval": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.ConstantTests.test_literal_eval",
"fixture_taint_checked": true
},
"EndPositionTests.test_lambda": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.EndPositionTests.test_lambda",
"fixture_taint_checked": true
},
"EndPositionTests.test_func_def": {
"system_reason": "Pre-existing public-ast test. test_ast.py is NOT modified by this PR.",
"public_surface": "public ast module",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_ast.EndPositionTests.test_func_def",
"fixture_taint_checked": true
},
"CodeTest.test_newempty": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeTest.test_newempty",
"fixture_taint_checked": true
},
"CodeTest.test_constructor": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeTest.test_constructor",
"fixture_taint_checked": true
},
"CodeTest.test_qualname": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeTest.test_qualname",
"fixture_taint_checked": true
},
"CodeTest.test_replace": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeTest.test_replace",
"fixture_taint_checked": true
},
"CodeLocationTest.test_positions": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeLocationTest.test_positions",
"fixture_taint_checked": true
},
"CodeLocationTest.test_lines": {
"system_reason": "Pre-existing CodeType test. test_code.py has +5/-5 on ONE test method (test_invalid_bytecode, excluded). All other test methods are byte-identical pre/post; their helpers are not modified either.",
"public_surface": "types.CodeType / code.co_* attributes",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_code.CodeLocationTest.test_lines",
"fixture_taint_checked": true
},
"TraceTestCase.test_set_and_retrieve_none": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.TraceTestCase.test_set_and_retrieve_none",
"fixture_taint_checked": true
},
"TraceTestCase.test_set_and_retrieve_func": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.TraceTestCase.test_set_and_retrieve_func",
"fixture_taint_checked": true
},
"TraceTestCase.test_01_basic": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.TraceTestCase.test_01_basic",
"fixture_taint_checked": true
},
"JumpTestCase.test_jump_simple_forwards": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.JumpTestCase.test_jump_simple_forwards",
"fixture_taint_checked": true
},
"JumpTestCase.test_jump_simple_backwards": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.JumpTestCase.test_jump_simple_backwards",
"fixture_taint_checked": true
},
"TestEdgeCases.test_reentrancy": {
"system_reason": "Pre-existing sys.settrace test. The PR's modification only APPENDS two new test classes (which would have been F2P candidates, but they pass pre-state because the PR's legacy_tracing.c bridge is a behavior-preserving refactor \u2014 see fixture_taint_summary). All pre-existing TraceTestCase / JumpTestCase / TestEdgeCases methods AND their shared helpers are byte-identical pre/post.",
"public_surface": "sys.settrace + frame.f_trace + classical trace events",
"internal_symbol_check": [
"sys.monitoring._all_events",
"_PyInstrumentation_*"
],
"runner_surface": "./python -m unittest -v test.test_sys_settrace.TestEdgeCases.test_reentrancy",
"fixture_taint_checked": true
}
}
},
"validated_at": "2026-05-20T06:20:46Z",
"public_surface_allowlist": [
{
"symbol": "sys._getframe",
"rationale": "Documented in https://docs.python.org/3/library/sys.html#sys._getframe as a CPython implementation detail. Despite the leading underscore (which the LoLBench Python public-surface rule treats as 'private by default'), sys._getframe is the canonical Python-level way to access the current frame from running code; it's used pervasively in tracing/profiling/debugging frameworks. For this PEP 669 instance \u2014 which is precisely about tracing/profiling/monitoring instrumentation \u2014 referring to sys._getframe is genuinely the user-facing way to install per-frame trace callbacks. 1 F2P uses it: test_monitoring.SimulateProfileTest.test_frame_stack. The agent does NOT need to re-implement sys._getframe; it's pre-existing CPython infrastructure the PR doesn't change.",
"tests": [
"test.test_monitoring.SimulateProfileTest.test_frame_stack"
]
}
],
"pr_link": "https://github.com/python/cpython/pull/103083",
"augmented": {
"suite_support": {
"orig": "original PR-derived selectors",
"aug": "augmented sys.monitoring behavioral tests",
"union": "orig + aug"
},
"eval_tests_patch": "eval_tests_aug.patch",
"eval_tests_aug_patch_sha256": "2dd2568bf98039d8a820eb622cdb9063fe7e51bbc50ddf431154db7cced8d1c8",
"f2p_aug_sha256": "2ae6e3ecfd1ff9efca56f35605c5fd78c25e7543b9a6dbc06566924c948e5169",
"p2p_aug_sha256": "b4d821f6797bb30fd16b558b0184d26e8703297fb0fe51d22aa626b3f96752d1",
"fail_to_pass": [
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_public_constants_are_power_of_two_and_tool_lifecycle",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_register_callback_replaces_previous_and_rejects_event_sets",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_set_events_requires_claimed_tool_and_call_group",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_local_line_events_are_scoped_to_one_code_object",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_instruction_and_branch_events_report_offsets",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_exception_unwind_and_handled_events_are_distinct",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_disable_return_value_and_restart_events",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_stop_iteration_event_is_separate_from_raise",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_multiple_tools_receive_same_event_and_disable_is_per_tool",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_global_line_events_cover_loop_branch_and_exception_paths",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_global_call_group_reports_c_return_and_c_raise",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_local_many_events_are_limited_to_target_code_object",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_generator_resume_yield_throw_and_unwind_events",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_overlapping_local_line_events_for_two_tools",
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_set_local_events_forces_reinstrumentation_when_up_to_date"
],
"pass_to_pass": [
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_settrace_line_events_for_branching_function",
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_setprofile_call_return_exception_shape",
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_call_tracing_preserves_existing_reentrant_trace_semantics",
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_frame_trace_opcodes_roundtrip_existing_attribute",
"test.test_sys_settrace.TestLinesAfterTraceStarted.test_events",
"test.test_sys_settrace.TestSetLocalTrace.test_with_branches"
],
"triage": {
"test_level_policy": "Augmented F2P selectors are system-synthetic CPython unittest tests that drive documented sys.monitoring public APIs from PEP 669. They do not invoke underscore-prefixed sys.monitoring helpers such as _all_events and do not call C/private source helpers. Augmented P2P selectors exercise pre-existing sys tracing/profile/frame behavior or existing eval-patch sys_settrace regression tests, and do not import sys.monitoring.",
"fail_to_pass": {
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_public_constants_are_power_of_two_and_tool_lifecycle": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Tool identifiers",
"Specification > Attributes of the `sys.monitoring` namespace"
],
"public_surface": "sys.monitoring.events constants, DISABLE, MISSING, DEBUGGER_ID/COVERAGE_ID/PROFILER_ID/OPTIMIZER_ID, use_tool_id, get_tool, free_tool_id",
"mutants_targeted": [
"mutant_001_sys_monitoring_registered_under_wrong_name",
"mutant_002_disable_sentinel_exposed_under_wrong_name",
"mutant_003_missing_aliases_disable",
"mutant_004_stop_iteration_event_misnamed",
"mutant_005_event_constants_are_ordinal_values",
"mutant_006_optimizer_id_is_wrong",
"mutant_007_public_tool_id_range_includes_internal_profile_id",
"mutant_008_use_tool_id_allows_overwrite",
"mutant_009_use_tool_id_accepts_non_string_name",
"mutant_010_free_tool_id_does_not_release_name",
"mutant_011_get_tool_always_returns_none"
],
"rationale": "Verifies the documented sys.monitoring namespace, event power-of-two encoding, predefined tool IDs, and public tool-id lifecycle semantics through Python user code.",
"source_symbol_invocation_check": "Only documented sys.monitoring public attributes/functions are invoked; no underscore-prefixed sys.monitoring helpers or C/private helpers are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_register_callback_replaces_previous_and_rejects_event_sets": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Register callback functions",
"Specification > Register callback functions > Callback function arguments"
],
"public_surface": "sys.monitoring.register_callback",
"mutants_targeted": [
"mutant_012_register_callback_accepts_multiple_events",
"mutant_013_register_callback_discards_previous_callback"
],
"rationale": "The PEP specifies one event per registration and says replacing a callback returns the previous callable.",
"source_symbol_invocation_check": "Only documented sys.monitoring.register_callback and event constants are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_set_events_requires_claimed_tool_and_call_group": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Setting events globally",
"Specification > The \"call\" event group",
"Specification > Register callback functions > Callback function arguments"
],
"public_surface": "sys.monitoring.set_events, get_events, register_callback for CALL/C_RETURN/C_RAISE",
"mutants_targeted": [
"mutant_014_set_events_allows_unclaimed_tool",
"mutant_016_c_return_group_can_be_set_independently",
"mutant_017_call_event_stripped_during_global_set"
],
"rationale": "Checks that tools must be claimed, ancillary C events cannot be enabled independently, and the CALL group delivers call/return/raise callbacks with the documented arguments.",
"source_symbol_invocation_check": "Only documented sys.monitoring public calls and constants are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_local_line_events_are_scoped_to_one_code_object": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Per code object events",
"Specification > Events in callback functions",
"Specification > Order of events"
],
"public_surface": "sys.monitoring.set_local_events, get_local_events, LINE callback",
"mutants_targeted": [
"mutant_018_get_local_events_always_zero",
"mutant_019_set_local_events_does_not_force_reinstrumentation"
],
"rationale": "Drives per-code-object LINE monitoring and verifies that local instrumentation is scoped to the selected code object and can be removed.",
"source_symbol_invocation_check": "Only documented sys.monitoring local-event APIs are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_instruction_and_branch_events_report_offsets": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Register callback functions > Callback function arguments",
"Specification > Order of events"
],
"public_surface": "sys.monitoring INSTRUCTION and BRANCH local callbacks",
"mutants_targeted": [],
"rationale": "Covers documented instruction and branch event delivery, including callback offset arguments, through ordinary Python branching code.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_exception_unwind_and_handled_events_are_distinct": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Register callback functions > Callback function arguments",
"Specification > Events in callback functions"
],
"public_surface": "sys.monitoring RAISE, PY_UNWIND, and EXCEPTION_HANDLED callbacks",
"mutants_targeted": [],
"rationale": "Exercises the documented exception-related monitoring events and their exception argument shape on a handled exception path.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_disable_return_value_and_restart_events": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Register callback functions > Callback function arguments",
"Specification > Events in callback functions"
],
"public_surface": "sys.monitoring.DISABLE and sys.monitoring.restart_events",
"mutants_targeted": [
"mutant_020_restart_events_does_not_advance_version"
],
"rationale": "The PEP says returning DISABLE suppresses the event until restart_events is called; this verifies the disable/restart lifecycle.",
"source_symbol_invocation_check": "Only documented sys.monitoring.DISABLE and restart_events are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_stop_iteration_event_is_separate_from_raise": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events > The STOP_ITERATION event",
"Specification > Register callback functions > Callback function arguments"
],
"public_surface": "sys.monitoring STOP_ITERATION and RAISE callbacks",
"mutants_targeted": [
"mutant_004_stop_iteration_event_misnamed",
"mutant_021_stop_iteration_dispatched_as_raise"
],
"rationale": "The PEP requires artificial generator StopIteration to be exposed through STOP_ITERATION rather than ordinary RAISE.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs are used."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_multiple_tools_receive_same_event_and_disable_is_per_tool": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Tool identifiers",
"Specification > Setting events globally",
"Specification > Register callback functions",
"Specification > Events in callback functions"
],
"public_surface": "sys.monitoring.use_tool_id, set_events, register_callback, DISABLE, restart_events",
"mutants_targeted": [
"mutant_020_restart_events_does_not_advance_version"
],
"rationale": "Exercises two claimed tools observing the same PY_START event and verifies that DISABLE suppresses only the returning tool until restart_events re-enables disabled events.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_global_line_events_cover_loop_branch_and_exception_paths": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Setting events globally",
"Specification > Register callback functions > Callback function arguments",
"Specification > Order of events"
],
"public_surface": "sys.monitoring LINE global callback",
"mutants_targeted": [],
"rationale": "Runs loop, branch, and handled-exception control flow under a global LINE callback to cover documented line-event instrumentation beyond straight-line code.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_global_call_group_reports_c_return_and_c_raise": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > The \"call\" event group",
"Specification > Register callback functions > Callback function arguments",
"Specification > Setting events globally"
],
"public_surface": "sys.monitoring CALL, C_RETURN, and C_RAISE callbacks",
"mutants_targeted": [
"mutant_016_c_return_group_can_be_set_independently",
"mutant_017_call_event_stripped_during_global_set"
],
"rationale": "Verifies that enabling the CALL group delivers documented ancillary C_RETURN and C_RAISE callbacks for successful and failing C calls.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_local_many_events_are_limited_to_target_code_object": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Per code object events",
"Specification > Register callback functions > Callback function arguments",
"Specification > The \"call\" event group"
],
"public_surface": "sys.monitoring.set_local_events with LINE, INSTRUCTION, CALL, RAISE, EXCEPTION_HANDLED callbacks",
"mutants_targeted": [
"mutant_018_get_local_events_always_zero",
"mutant_019_set_local_events_does_not_force_reinstrumentation"
],
"rationale": "Combines local line, instruction, call, and exception monitoring on one code object and checks that unrelated caller code remains outside the local event scope.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_generator_resume_yield_throw_and_unwind_events": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Per code object events",
"Specification > Register callback functions > Callback function arguments",
"Specification > Order of events"
],
"public_surface": "sys.monitoring PY_START, PY_RESUME, PY_YIELD, PY_THROW, and PY_UNWIND local callbacks",
"mutants_targeted": [],
"rationale": "Covers documented generator lifecycle events, including resume, yield, throw, and unwind paths, using only local monitoring on the generator code object.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
},
"test.test_pep669_monitoring_aug.MonitoringAugTest.test_overlapping_local_line_events_for_two_tools": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Specification > Events",
"Specification > Tool identifiers",
"Specification > Per code object events",
"Specification > Register callback functions > Callback function arguments"
],
"public_surface": "sys.monitoring.set_local_events with LINE callbacks for two tools",
"mutants_targeted": [],
"rationale": "Exercises overlapping local LINE monitoring for two claimed tools on the same code object, covering documented multi-tool local event behavior without private introspection.",
"source_symbol_invocation_check": "Only documented sys.monitoring public APIs/constants are used; no _all_events or private C helpers are invoked."
}
},
"pass_to_pass": {
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_settrace_line_events_for_branching_function": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "sys.settrace, sys.gettrace, ordinary Python branch execution",
"rationale": "Pins legacy line tracing semantics for branch-heavy Python code, an adjacent behavior that PEP 669 must preserve.",
"source_symbol_invocation_check": "Uses pre-existing public sys.settrace/sys.gettrace only; does not import sys.monitoring."
},
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_setprofile_call_return_exception_shape": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "sys.setprofile, sys.getprofile, Python call/return profiling",
"rationale": "Pins legacy profiling callback shape across call and return events while the PR rewrites tracing/profiling internals.",
"source_symbol_invocation_check": "Uses pre-existing public sys.setprofile/sys.getprofile only; does not import sys.monitoring."
},
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_call_tracing_preserves_existing_reentrant_trace_semantics": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "sys.call_tracing",
"rationale": "Preserves the documented reentrant tracing helper behavior that should remain unaffected by low-impact monitoring.",
"source_symbol_invocation_check": "Uses pre-existing public sys.call_tracing only; does not import sys.monitoring."
},
"test.test_pep669_tracing_stability_aug.TracingStabilityAugTest.test_frame_trace_opcodes_roundtrip_existing_attribute": {
"test_level": "system-synthetic",
"synthetic_author": "lolbench-aug",
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "frame.f_trace_opcodes on sys._getframe()",
"rationale": "Pins the existing frame trace-opcodes attribute roundtrip, an adjacent tracing surface retained for compatibility.",
"source_symbol_invocation_check": "Uses pre-existing frame tracing surface and sys._getframe; does not import sys.monitoring."
},
"test.test_sys_settrace.TestLinesAfterTraceStarted.test_events": {
"test_level": "project-regression",
"synthetic_author": "eval-tests-existing",
"requirement_sections": [
"Specification > Access to \"debug only\" features"
],
"public_surface": "sys.settrace and frame.f_trace on sys._getframe()",
"rationale": "Pins legacy line tracing after a trace function is attached to the current frame, an adjacent debug-only behavior the monitoring bridge must preserve.",
"source_symbol_invocation_check": "Uses pre-existing sys.settrace/sys._getframe frame tracing behavior; does not import sys.monitoring or invoke PR-only helpers."
},
"test.test_sys_settrace.TestSetLocalTrace.test_with_branches": {
"test_level": "project-regression",
"synthetic_author": "eval-tests-existing",
"requirement_sections": [
"Specification > Access to \"debug only\" features"
],
"public_surface": "sys.settrace, frame.f_trace, and frame.f_lineno",
"rationale": "Pins local trace assignment and branch line reporting through frame debug attributes while PEP 669 rewrites tracing internals.",
"source_symbol_invocation_check": "Uses pre-existing sys.settrace/sys._getframe frame tracing behavior; does not import sys.monitoring or invoke PR-only helpers."
}
}
},
"targets_mutants": [
"mutant_003_missing_aliases_disable",
"mutant_019_set_local_events_does_not_force_reinstrumentation"
],
"validation": {
"augmented_pre": {
"suite": "aug",
"f2p": {
"passed": 0,
"failed": 0,
"errored": 15,
"skipped": 0,
"total": 15
},
"p2p": {
"passed": 6,
"failed": 0,
"errored": 0,
"skipped": 0,
"total": 6
},
"resolved": false,
"note": "Pre-solution the aug module binds E=sys.monitoring.events at import, so all 15 F2P ERROR before any body runs; 6/6 P2P (legacy settrace/setprofile APIs) pass."
},
"augmented_post": {
"suite": "aug",
"f2p": {
"passed": 15,
"failed": 0,
"errored": 0,
"skipped": 0,
"total": 15
},
"p2p": {
"passed": 6,
"failed": 0,
"errored": 0,
"skipped": 0,
"total": 6
},
"resolved": true
},
"union_baseline": {
"suite": "union",
"f2p": {
"passed": 34,
"failed": 0,
"errored": 0,
"skipped": 0,
"total": 34
},
"p2p": {
"passed": 62,
"failed": 0,
"errored": 0,
"skipped": 0,
"total": 62
},
"resolved": true,
"note": "Clean solution under union (orig 19 F2P + aug 15 F2P; orig 56 P2P + aug 6 P2P)."
},
"mutants": {
"suite": "union",
"total": 21,
"killed": 21,
"equivalent": 0,
"result": "all_killed",
"per_mutant": "Union (34 F2P) run as the candidate against each of the 21 canonical mutants. All 21 are killed (union resolved=false). 20 are clean F2P-failure kills; mutant_002_disable_sentinel_exposed_under_wrong_name is a crash-kill: it renames the documented sys.monitoring.DISABLE sentinel, and the ORIGINAL hidden test test_monitoring.py uses a callback that returns sys.monitoring.DISABLE, so the missing attribute raises an AttributeError that escapes the in-process runner (harness_error, f2p E34) -- a genuine detection (clean passes 34/34) that cannot be made a clean assertion failure because it originates in the unmodifiable original test suite. The augmented suite is required for two mutants the original suite leaves alive: mutant_003_missing_aliases_disable (MISSING aliased to DISABLE -> killed by assertIsNot(DISABLE, MISSING) in test_public_constants...) and mutant_019_set_local_events_does_not_force_reinstrumentation (a second set_local_events on an up-to-date code object silently drops the added event -> killed by test_set_local_events_forces_reinstrumentation_when_up_to_date)."
}
},
"validation_status": "validated",
"coverage_attempts": 1,
"coverage_gate": {
"minimum_line_coverage_percent": 80,
"status": "below_target_documented",
"coverage_report": "coverage_out/coverage_report_union.json",
"union_line_coverage_percent": 48.9,
"union_covered_lines": 1112,
"executable_lines_in_patch": 2276,
"orig_baseline_percent": 39.9,
"coverage_complete": true,
"below_target_rationale": "The augmented sys.monitoring suite raises union line coverage from the orig 39.9% (908/2276) to 48.9% (1112/2276), the highest of the CPython instances. The >80% target is structurally out of reach against this denominator: ~557 of the 2276 executable lines are generated interpreter-dispatch code -- Python/bytecodes.c (260, 54%), Python/generated_cases.c.h (121, 30%) and Python/opcode_metadata.h (76, 5%) carry the per-opcode instrumentation hooks for every bytecode, the vast majority of which no single test program executes. The two behavioral files are well covered for reachable paths (Python/instrumentation.c 643/1270 = 51%, Python/legacy_tracing.c 163/323 = 50%, Python/ceval.c 40/59 = 68%, Objects/codeobject.c 27/37 = 73%); the residual instrumentation.c lines are error-recovery, tool-conflict, and rare-event branches not reachable through the documented sys.monitoring surface without crafting interpreter-internal states. Even full coverage of the behavioral logic would leave the generated per-opcode dispatch denominator far short of 80%."
}
},
"coverage": {
"orig": 39.89,
"aug": 48.86,
"union": 48.86,
"denominator": "union_executable_lines",
"aug_note": "equals union \u2014 harness does not isolate augmented-only suite"
}
}
|