diff --git a/docs/reports/cbz-workspace-hygiene-20261029/EVIDENCE.json b/docs/reports/cbz-workspace-hygiene-20261029/EVIDENCE.json new file mode 100644 index 000000000..18d1fd986 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/EVIDENCE.json @@ -0,0 +1,511 @@ +{ + "at": "2026-10-29T20:52:49.033962+00:00", + "scope": "current public synthetic engineering source/report evidence only; raw private inventories/archive locators withheld", + "source_files": { + "tools/workspace_git_inventory.py": { + "bytes": 27119, + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314" + }, + "tools/workspace_git_inventory_mutations.py": { + "bytes": 18930, + "sha256": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f" + }, + "tests/test_workspace_git_inventory.py": { + "bytes": 17972, + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844" + }, + "tests/test_workspace_git_inventory_mutations.py": { + "bytes": 17092, + "sha256": "4273fe5b946232f07751864a82e8773974c75663538744dcea79788d4923bebd" + } + }, + "historical_manifest": { + "path": "original-EVIDENCE.json", + "source_commit": "60cd4516cd1ad54d778b33b22df289dfe86ee0d8", + "path_mapping": { + "README.md": "original-README.md" + } + }, + "files": { + "README.md": { + "bytes": 11562, + "sha256": "f7b33914d354e43ccc8a0bca989324babde0e65d0f9a1ff5bd4d4aae1ed0ba5d" + }, + "REGISTRY-HANDOFF.md": { + "bytes": 3833, + "sha256": "66b30ca491be705f294d227ea0e608c54143feee20411826577e006a62fd7499" + }, + "SOURCE.json": { + "bytes": 1007, + "sha256": "90714405faf67ef7985ddf74a2c96e66ac896c2a04952a98229474061448a5db" + }, + "collector-normal.log": { + "bytes": 1856, + "sha256": "c8d55853c5082525da552587a83a2fa613038e13fd919d0f13d8b8e397296a8d" + }, + "collector-optimized.log": { + "bytes": 1856, + "sha256": "279c793570bf5e751a18833d74e47989d06b570ee283dae9d4beb6dcbc5e9d59" + }, + "correction/CORE-RESULT.json": { + "bytes": 1809, + "sha256": "dc3f26d1b532ffd48ab603aec06e4cb00b9ed1a27769f735e8a3bac6c380e41d" + }, + "correction/REPRODUCTION-RESULT.json": { + "bytes": 1927, + "sha256": "587ec776e790845ca6ebdc866de31a5ec7f30a78b2946b2cfade9176b5d50971" + }, + "correction/final/AUTHOR-SUMMARY.json": { + "bytes": 926, + "sha256": "57fc50a822e0dd50528764e81dc746949c021da6332393e66ccac2647cf9077d" + }, + "correction/final/COMPANION-HANDOFF.md": { + "bytes": 6905, + "sha256": "d4884c482e928224594fb95339ee60160be848c94e01f8219897ba8f29f3faad" + }, + "correction/final/NEGATIVE-INPUTS.json": { + "bytes": 3750, + "sha256": "978486585ed17324f22ae511327e19d67e261285274410daba0df340504e637c" + }, + "correction/final/SOURCE.json": { + "bytes": 874, + "sha256": "489906c556f4c51451e9d02690cb4099bc0293502255ae44d64f815af0424fdc" + }, + "correction/final/collector-mutations-normal/ambiguous-filter-key.json": { + "bytes": 1223, + "sha256": "d8823932e60e16603d37d1e9be1a7d3af94ac80e755c224c4ae50c702e22d7dd" + }, + "correction/final/collector-mutations-normal/ambiguous-filter-key.log": { + "bytes": 1470, + "sha256": "fa7cf94f94c254e8fa10681544ebb8ba645a4f2162b2aaabe1844dd12393a775" + }, + "correction/final/collector-mutations-normal/baseline.json": { + "bytes": 6592, + "sha256": "9e0dd3a83a0580879e1f90445f8751e0ea4b7c8c723c7a454fbd560d057cf5b7" + }, + "correction/final/collector-mutations-normal/baseline.log": { + "bytes": 2189, + "sha256": "13473ea393ddd31e58aba66d00859b841cec904c80685046608308260a74c482" + }, + "correction/final/collector-mutations-normal/disable-redaction.json": { + "bytes": 1145, + "sha256": "f329fbba3745322a54a005589f6996d589bfb63cff756080e10c7d8022aa3568" + }, + "correction/final/collector-mutations-normal/disable-redaction.log": { + "bytes": 7732, + "sha256": "7c7d61a05cd94347905f38e5e23310e8368e81be4cc96565bcdcb026edbd1ac1" + }, + "correction/final/collector-mutations-normal/exclude-node-modules.json": { + "bytes": 1145, + "sha256": "f329fbba3745322a54a005589f6996d589bfb63cff756080e10c7d8022aa3568" + }, + "correction/final/collector-mutations-normal/exclude-node-modules.log": { + "bytes": 2935, + "sha256": "a66a6168112aa5b85f296acd768b81a2bd6df7441ba6a93a5fc37dc6dd2ecad8" + }, + "correction/final/collector-mutations-normal/execute-clean-filter.json": { + "bytes": 1121, + "sha256": "fc8b266f9a569d1782280b2aa98bdfa49974979d3078770d903b821fbeb7740d" + }, + "correction/final/collector-mutations-normal/execute-clean-filter.log": { + "bytes": 652, + "sha256": "515dcdb39c62b24b158a6e0d82417d79cc2adf11e29c17fefdc6965e30e43c81" + }, + "correction/final/collector-mutations-normal/false-complete.json": { + "bytes": 1199, + "sha256": "78a6613fc3a11c3164273b357ce0ef0f595f986c344b5950098adca8ff3aac7d" + }, + "correction/final/collector-mutations-normal/false-complete.log": { + "bytes": 704, + "sha256": "e16a9dad1852292d7fa43db5abf8797f4d0a610b4d2af2de68fd16f9ef03deb1" + }, + "correction/final/collector-mutations-normal/redact-path-identities.json": { + "bytes": 1181, + "sha256": "463096190b94f18d88816bfdabab3ea66f0d62170429391c74b6dd18dd111828" + }, + "correction/final/collector-mutations-normal/redact-path-identities.log": { + "bytes": 984, + "sha256": "df29c1e4e8a6a4cac761c406a33c86745ae7efa43cdc75181181e36e232bc3ae" + }, + "correction/final/collector-mutations-normal/results.json": { + "bytes": 23331, + "sha256": "c45784cc8f7c934ef335522da708ae58dbb3ee7aaebd27096335b86cf33fdba2" + }, + "correction/final/collector-mutations-normal/unvalidated-metadata.json": { + "bytes": 1199, + "sha256": "4958e916443cdab81d13d2b773f8c1af7f80a82627e3a58b297ea4ae77ad04d7" + }, + "correction/final/collector-mutations-normal/unvalidated-metadata.log": { + "bytes": 704, + "sha256": "864ac3c7e351e7866606a78c3dadd4d8679908be8d707aa62a01a0d59355340a" + }, + "correction/final/collector-mutations-optimized/ambiguous-filter-key.json": { + "bytes": 1223, + "sha256": "680ff00c71059481a1ad97dae578b854064df9690fb32407b197b5d76055fa1d" + }, + "correction/final/collector-mutations-optimized/ambiguous-filter-key.log": { + "bytes": 1470, + "sha256": "83b15e5eb0706c24b7143ea2f2d502bb6ed40187e43836d7a1daa059ae911375" + }, + "correction/final/collector-mutations-optimized/baseline.json": { + "bytes": 6592, + "sha256": "ed9915b010871c655ecf8f4ea6ef6fab3c82b8fa44f776eb5a404f8e9679059b" + }, + "correction/final/collector-mutations-optimized/baseline.log": { + "bytes": 2189, + "sha256": "bac678d02cf8e369054a8542a88ac9c71beb82daed9b60a0fc3261201c7c229d" + }, + "correction/final/collector-mutations-optimized/disable-redaction.json": { + "bytes": 1145, + "sha256": "c422bd530531a70c4a51eae40fa4ec89283cafb20fb665b43a477730f5251e0e" + }, + "correction/final/collector-mutations-optimized/disable-redaction.log": { + "bytes": 7732, + "sha256": "882db8f502ae02d7ce8d560a503a623818e2cf824e5766d30cc49bb9591cf46c" + }, + "correction/final/collector-mutations-optimized/exclude-node-modules.json": { + "bytes": 1145, + "sha256": "c422bd530531a70c4a51eae40fa4ec89283cafb20fb665b43a477730f5251e0e" + }, + "correction/final/collector-mutations-optimized/exclude-node-modules.log": { + "bytes": 2935, + "sha256": "1415bca742bb6047707b51dfee915736d38e9d38d7c55da01de6a215cd02bfc7" + }, + "correction/final/collector-mutations-optimized/execute-clean-filter.json": { + "bytes": 1121, + "sha256": "44239d7f88a40a7b96da2243dbb9f93da5d6aa041103f37f148b6ab18f7e95c4" + }, + "correction/final/collector-mutations-optimized/execute-clean-filter.log": { + "bytes": 652, + "sha256": "1ba8e151f46dc610878f9d76986853dbfbf08b24c39062e85ac9548edb9c51c3" + }, + "correction/final/collector-mutations-optimized/false-complete.json": { + "bytes": 1199, + "sha256": "aab940a36ae33f72ac528990536bdc4f6133ebcb95e9bf063936ad5b8a6bbb81" + }, + "correction/final/collector-mutations-optimized/false-complete.log": { + "bytes": 704, + "sha256": "0c0aae79b63f787be0d44df394925b3aad904d43cbc0795ce7c59dfaeb96f34f" + }, + "correction/final/collector-mutations-optimized/redact-path-identities.json": { + "bytes": 1181, + "sha256": "2d7022d4e669e155be0bc784b27bed67ebe3dad0e065900c3afc00889148d5ee" + }, + "correction/final/collector-mutations-optimized/redact-path-identities.log": { + "bytes": 984, + "sha256": "51bf66edcf2dcd7c6d7a432cf91400ea38bbe2fc2cc85c1874e0e162aa0e2ae9" + }, + "correction/final/collector-mutations-optimized/results.json": { + "bytes": 23331, + "sha256": "7d8160056271fa5af9f38063a7a59d266ef9323033370243a0fa2cb9dbe11267" + }, + "correction/final/collector-mutations-optimized/unvalidated-metadata.json": { + "bytes": 1199, + "sha256": "382409c707e27f358a11cdf7670929d07f5f31e23d9cb726a7054f29e3703076" + }, + "correction/final/collector-mutations-optimized/unvalidated-metadata.log": { + "bytes": 704, + "sha256": "6f221aa39c0b3a4fd2bdddbcc05b3d704c909d8ab6de7eec971fcea51f7e6196" + }, + "correction/final/guard-controls/escaping-assertion-runner.py": { + "bytes": 18898, + "sha256": "fe4551c2d0322780fbee3807123b4938ce0752ec9d701ccce3e4dd9211d5d11a" + }, + "correction/final/guard-controls/escaping-assertion.log": { + "bytes": 1264, + "sha256": "0af74c5f165731eb8b2eb8d600419b59545bcc56f5539706ea384a3b36e8a585" + }, + "correction/final/guard-controls/population-runner.py": { + "bytes": 18791, + "sha256": "b6e4188590e2b93de1dd3cecfc37d974ce2472a283bcae4a86c62fc610e12172" + }, + "correction/final/guard-controls/population.log": { + "bytes": 1290, + "sha256": "bf0366fde193cb9e6ed36fc2525971cc73e82604f0710ec03d8d4c2deecf43f0" + }, + "correction/final/guard-controls/pristine-class-runner.py": { + "bytes": 18970, + "sha256": "9dcf793b1b39a8269047f56825ce35af3bb56f4c64f6d0efb26ca9430cee38f6" + }, + "correction/final/guard-controls/pristine-class.log": { + "bytes": 1198, + "sha256": "70b21229e74ac2d3f81d0de7e90d303513234a31d4612f6544d92c7e769e0d6f" + }, + "correction/final/guard-controls/pristine-method-runner.py": { + "bytes": 18827, + "sha256": "50ddc5dd12ac142c5ea7e89a367272280db8c7d3701f424441735fe52dc36019" + }, + "correction/final/guard-controls/pristine-method.log": { + "bytes": 1220, + "sha256": "fdaf61067268ea67e1169b4916c570bd0dd9cc8f9bda977268f82d7f454f4383" + }, + "correction/final/guard-controls/results.json": { + "bytes": 2205, + "sha256": "6fb6230d128fe60b0586ddfd1ce91895909e6028901d06617ef975472b9212b3" + }, + "correction/final/guard-controls/subtests-runner.py": { + "bytes": 18813, + "sha256": "8ba594c75c20e4747bcb1eced7e7c95b087e57ad44055222a3f9a496756cc053" + }, + "correction/final/guard-controls/subtests.log": { + "bytes": 1068, + "sha256": "65a6f4835f9a2ed7020c1d391daf42940ec67728095182c335a201c70042d25a" + }, + "correction/final/guard-controls.py.txt": { + "bytes": 3861, + "sha256": "3b1ea9d6fb6dd866552ce0a1363ad1083dff52db0946b1457bf327507dc2d285" + }, + "correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.json": { + "bytes": 1223, + "sha256": "680ff00c71059481a1ad97dae578b854064df9690fb32407b197b5d76055fa1d" + }, + "correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.log": { + "bytes": 1470, + "sha256": "247a1a92f2ee3e1975acabf3ff66100903112cdb9962a92cea52b1bc98a2c0bd" + }, + "correction/final/parent-collector-mutations-optimized/baseline.json": { + "bytes": 6592, + "sha256": "ed9915b010871c655ecf8f4ea6ef6fab3c82b8fa44f776eb5a404f8e9679059b" + }, + "correction/final/parent-collector-mutations-optimized/baseline.log": { + "bytes": 2189, + "sha256": "e6a3cb8e3ce828b8c1922e85999010a2d3abc911665518b6bf5123f417258ebe" + }, + "correction/final/parent-collector-mutations-optimized/disable-redaction.json": { + "bytes": 1145, + "sha256": "c422bd530531a70c4a51eae40fa4ec89283cafb20fb665b43a477730f5251e0e" + }, + "correction/final/parent-collector-mutations-optimized/disable-redaction.log": { + "bytes": 7732, + "sha256": "93239be7f8e20d252fb66db1f0f121254ff30b6161b05df4023ade195f50a6f5" + }, + "correction/final/parent-collector-mutations-optimized/exclude-node-modules.json": { + "bytes": 1145, + "sha256": "c422bd530531a70c4a51eae40fa4ec89283cafb20fb665b43a477730f5251e0e" + }, + "correction/final/parent-collector-mutations-optimized/exclude-node-modules.log": { + "bytes": 2935, + "sha256": "3758854ff4e65626aea604088a193f5847af98c7349a186af984f2e303399346" + }, + "correction/final/parent-collector-mutations-optimized/execute-clean-filter.json": { + "bytes": 1121, + "sha256": "44239d7f88a40a7b96da2243dbb9f93da5d6aa041103f37f148b6ab18f7e95c4" + }, + "correction/final/parent-collector-mutations-optimized/execute-clean-filter.log": { + "bytes": 652, + "sha256": "31745c396a77ac2ab68b0a32d38b61a578e86537449ce54c197c08bc1acb4f3c" + }, + "correction/final/parent-collector-mutations-optimized/false-complete.json": { + "bytes": 1199, + "sha256": "aab940a36ae33f72ac528990536bdc4f6133ebcb95e9bf063936ad5b8a6bbb81" + }, + "correction/final/parent-collector-mutations-optimized/false-complete.log": { + "bytes": 704, + "sha256": "872e3f7354dafd6663d293523dcf0ad58e78dfcf7c0ba76fe0bbfa8267e4a64c" + }, + "correction/final/parent-collector-mutations-optimized/redact-path-identities.json": { + "bytes": 1181, + "sha256": "2d7022d4e669e155be0bc784b27bed67ebe3dad0e065900c3afc00889148d5ee" + }, + "correction/final/parent-collector-mutations-optimized/redact-path-identities.log": { + "bytes": 984, + "sha256": "294535a9a0d502778debff2a3166461b30dc8b6a74a7831866192a1119be0c24" + }, + "correction/final/parent-collector-mutations-optimized/results.json": { + "bytes": 23382, + "sha256": "78707b9de16d460b1bfcd356a6c1a9f738cb71d681067eb48f0e4dc97254d3b9" + }, + "correction/final/parent-collector-mutations-optimized/unvalidated-metadata.json": { + "bytes": 1199, + "sha256": "382409c707e27f358a11cdf7670929d07f5f31e23d9cb726a7054f29e3703076" + }, + "correction/final/parent-collector-mutations-optimized/unvalidated-metadata.log": { + "bytes": 704, + "sha256": "ae2f054c2ba6f2da8523bf31d49dd6d8cd7db5468826b999a039199b2f142b47" + }, + "correction/final/parent-targeted/RESULT.json": { + "bytes": 3695, + "sha256": "db10cb6f3c73a8500c0ed57c5ef9b0d1f3607a23cead130102f1466858a2affb" + }, + "correction/final/parent-targeted/callback_without_escaping-RESULT.json": { + "bytes": 525, + "sha256": "5d18a9231147551e1f84088f2aaebb00abdf3f606b934339b9d89877985f7e94" + }, + "correction/final/parent-targeted/callback_without_escaping.log": { + "bytes": 271, + "sha256": "fd845413b7905e12d5a8a2aaf4e6cf50117ad3459b5220d3227919a2b6447eec" + }, + "correction/final/parent-targeted/loader_cannot-RESULT.json": { + "bytes": 490, + "sha256": "f842278aee105e31c0bbd090e06cded69882872c0e187aaf890ba98277af452d" + }, + "correction/final/parent-targeted/loader_cannot.log": { + "bytes": 793, + "sha256": "479f3d650fe2eef73d796dfd0a5641565471efa5f038c5049a028b91fcf0d74e" + }, + "correction/final/parent-targeted/mutations-optimized-RESULT.json": { + "bytes": 497, + "sha256": "42aed8269f7815b87da1f1af1e342e9fb09d72261a90c0bf78fba96f0e1a9289" + }, + "correction/final/parent-targeted/mutations-optimized.log": { + "bytes": 173, + "sha256": "c2d1786af8d334094b3483e2a3598d868c7f4009820593b0eaf7ada2d59f2478" + }, + "correction/final/parent-targeted/native_and_foreign_subtest-RESULT.json": { + "bytes": 529, + "sha256": "b464c335491ca2ae875060ea69c477d70fe5708fddb49ac692b2eac32fc9e96b" + }, + "correction/final/parent-targeted/native_and_foreign_subtest.log": { + "bytes": 278, + "sha256": "1624d7d13da9ca24872dede0cfbc669ebea3649d7f4a4e1753052615cc192772" + }, + "correction/final/parent-targeted/setup_assertion-RESULT.json": { + "bytes": 495, + "sha256": "9d16353448e73bfe5c940c5fa6512c65c203b1bd592c2262100b99cafb90b54a" + }, + "correction/final/parent-targeted/setup_assertion.log": { + "bytes": 277, + "sha256": "9b2e3fe0a11c875b9095bbd32565a2294869d053c3bd3b25b1e5771facf412aa" + }, + "correction/final/qualified-python311-normal.log": { + "bytes": 5327, + "sha256": "512db6d4ac38585f3fc5fe22a2647a3868b40810b0cf05980f5754b600ad9fe3" + }, + "correction/final/qualified-python311-optimized.log": { + "bytes": 5327, + "sha256": "1bef66dd1e412568875db3f6e141618131b7c84ffc9e02958249a5541601ff30" + }, + "correction/final/qualified-python312-normal.log": { + "bytes": 5327, + "sha256": "496660aaa14c7b8abb7b181cc5c5a8c8b1e22f5a0a2a5fc8ebd720ee9af8f669" + }, + "correction/final/qualified-python312-optimized.log": { + "bytes": 5327, + "sha256": "1bb7808acc88a20ad86f725f98bbdff6a177284c2dace7cadd5ac6266b7c79a4" + }, + "correction/intermediate-population-RESULT.json": { + "bytes": 1303, + "sha256": "1afc8bf270a70537823a861123ec0e67cdcbef2ed22621961d46c4ccc5de3fc9" + }, + "correction/intermediate-population-baseline.log": { + "bytes": 2269, + "sha256": "a065a11c08cb16d1656013f64c430ba33188894a3780235421753ce2b93032d1" + }, + "correction/legacy-atlas-DISPOSITION.md": { + "bytes": 12704, + "sha256": "97b0a371666dfb9d9aed6c2bdf06843af221d9c7f57f6376c0b03174f4e7a8a0" + }, + "correction/original-lifecycle-RESULT.json": { + "bytes": 4163, + "sha256": "724da2430ce986d220ddc409dd78347f16e2b5a70d1dd390f9495e55601c9d4a" + }, + "correction/original-lifecycle-baseline.log": { + "bytes": 1680, + "sha256": "19931812a0c7151fc61a462b73f9e9e47c40134e53f94c293932b1109730b226" + }, + "correction/original-lifecycle-disable-redaction.log": { + "bytes": 866, + "sha256": "548bf9405552de83a5db6813e257da8f694d8ee0b0b4ae51299b42f11a91bdfa" + }, + "correction/original-lifecycle-exclude-node-modules.log": { + "bytes": 866, + "sha256": "548bf9405552de83a5db6813e257da8f694d8ee0b0b4ae51299b42f11a91bdfa" + }, + "correction/original-lifecycle-execute-clean-filter.log": { + "bytes": 850, + "sha256": "ba0635e95507f3b5d8e5e058f56ddb0d795f1b295c099e7cdafc24a23ad93454" + }, + "correction/original-lifecycle-false-complete.log": { + "bytes": 902, + "sha256": "620616b52d4715b7216048df4b32b0a883a5b423e5cc47d8b1f4a9c31f7cdc90" + }, + "correction/original-three-regressions-RED.log": { + "bytes": 4715, + "sha256": "0db800797a042c0521aae3a026ec90f661a131fe756a1ce8ff7df55c9f0ef055" + }, + "correction/python311-normal.log": { + "bytes": 2497, + "sha256": "6c75e07be800ac8ea3290ca8698d409bfb5df35203e0dcee33c37e075a20de99" + }, + "correction/python311-optimized.log": { + "bytes": 2497, + "sha256": "ae239c725d5a30966e1a1b47cfa2be21b54ac68369de6b8ba551a42d0c5bf488" + }, + "correction/python312-normal.log": { + "bytes": 2497, + "sha256": "2246408104fe88093c2404ad0ef5bbd78982be3a4a77b014a0edca567eb5e6cd" + }, + "correction/python312-optimized.log": { + "bytes": 2497, + "sha256": "3af0ee856a7d07da397432b6f5b97a800ddb52c0fd56e074dde40b766e42b9e5" + }, + "correction/review-REVIEW.md": { + "bytes": 2631, + "sha256": "4b6fd553db71b681d7703296acba79d84d01d0091a78a97650991f2e7a2fe86e" + }, + "correction/review-SOURCE.json": { + "bytes": 1193, + "sha256": "73d68ceb997f6ee03ebfb6fdda4f18fe2ea647a8aba839521b32eca3b4414bac" + }, + "correction/review-normal-core.log": { + "bytes": 2352, + "sha256": "5d750210bf5466821fee853e74aaaf752d25d036edea6c36eea212077b3b30d9" + }, + "correction/review-optimized-core.log": { + "bytes": 2352, + "sha256": "22bf0d08934659a80f2283cd200440707c2d6aea01775c6d0118c91c04c4ac62" + }, + "final15-normal.log": { + "bytes": 2590, + "sha256": "557a06a0ccc8aa86b5c7d35e74232e623668328c506f5c0ac34ba58cc8accfef" + }, + "final15-optimized.log": { + "bytes": 2590, + "sha256": "d48e77490ff4e8e44477d19be4e99d47824112678575e9358ce12f1f20d1b843" + }, + "mutation-baseline.log": { + "bytes": 1680, + "sha256": "0f967c385208a3b391994b748ef2db56f5d34e8e05e6fac25d8e3758484e2f4b" + }, + "mutation-disable-redaction.log": { + "bytes": 8020, + "sha256": "51cfc84a530574fcd6d0e5e2968f9202002d937f9a6a7a9a88f3315e24db937c" + }, + "mutation-exclude-node-modules.log": { + "bytes": 3205, + "sha256": "87012cb90d2e361378a8b1fe20b72821b611bab83e2d03ef2d7dd76b09312886" + }, + "mutation-execute-clean-filter.log": { + "bytes": 967, + "sha256": "af01905297a9abcb151c556f7c44e2334344dadca186c874914d2d867e6339a9" + }, + "mutation-false-complete.log": { + "bytes": 970, + "sha256": "baa10781039acb92e64b3127fd38c739a8f6ee367733cb911b687bac53b3fc13" + }, + "mutations.json": { + "bytes": 4667, + "sha256": "e3d0afc776ab553c6a06a62cc77b293f64bfef5adc6697fd4be40e54a5ed5676" + }, + "original-EVIDENCE.json": { + "bytes": 2287, + "sha256": "991deff9d3aafbc3be38cfe9ffa6c0603054144207d5f7b5d00632dd6f474d03" + }, + "original-README.md": { + "bytes": 6208, + "sha256": "280e9f4192acebc9c722c1ba633f2b8a9b4d51e44edc45b3f167748c79715379" + }, + "runner-controls.json": { + "bytes": 219, + "sha256": "288366545e640d29f82dd9a5a6c39a95429f2db024756ac88323875ab3fcedd0" + }, + "runner-normal-initial.log": { + "bytes": 766, + "sha256": "66b0c8ad4babb0463f431bf761b4d7e289e2cc14b9e845e97fee665d9ad76d2d" + }, + "runner-optimized-initial.log": { + "bytes": 766, + "sha256": "f9a2e4e802dcb12fde08564b1a9993a168aaa7d7d13dd68ccbf853d8cb5fcdcc" + } + } +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/README.md b/docs/reports/cbz-workspace-hygiene-20261029/README.md new file mode 100644 index 000000000..6eee73038 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/README.md @@ -0,0 +1,67 @@ +# Read-only workspace Git inventory + +This stdlib tool records physical Git candidates, linked worktrees, common stores, refs, tags, stashes, redacted remotes and submodules. An exit0 means **complete observations, not clean Git or CBZ-0**. Raw inventories retain exact filesystem identities and must remain private; remote credentials and diagnostic values are redacted. + +This contribution belongs to [the canonical consolidation](https://github.com/d6g8k5htny-coder/main/issues/684). Canonical baseline documents and serial remote integration remain with that writer. No mathematical source, proof status, scientific disposition or dependency is changed. Local census observations do not substitute for federation remote inventory or the G0–G11 final verification vector. + +## Admission corrections + +The original source at `60cd4516cd1ad54d778b33b22df289dfe86ee0d8` passed its original15 tests and four mutations. An independent same-family engineering review then reproduced three real gaps; its merge-ready disposition was withdrawn before integration. + +- Valid filter names containing `=` could execute configured programs. Overrides now transport complete config keys and values separately through `GIT_CONFIG_COUNT`, and verify effective suppression before status. Config discovery or transport failure refuses status. Regression fixtures first prove native Git executes both parent and recursive-submodule filter programs, then prove collection executes neither. +- Ordinary asset directories containing `HEAD` and `objects` hid nested repositories. Metadata pruning now requires exact successful `rev-parse --resolve-git-dir` validation of the candidate. Ancestor repository discovery cannot establish that identity. +- Whole-report credential redaction collapsed distinct filesystem paths. Redaction now applies to remote URL and diagnostic values; root, worktree, store, symlink, status and error-path identities remain exact, including unusual bytes. + +The original four mutation purposes are retained, and three mutants restore these defects. A separate controlled experiment against the original companion also demonstrated that setup assertions could be miscredited as mutation kills. Its original green result is retained as historical evidence, not final certification. The final companion qualifies exact pristine class/function/code identities before loader execution and exact loaded/started/body-entry/body-exit populations. Only an actual escaping designated-body AssertionError can count; lifecycle, callback-only, deferred-body and subtest reports refuse. Actual parent optimization propagates to children. No scanner or kernel-gate claim follows from this engineering tool. + +## Reproduce and register + +Use Python3.11+ and Git2.31+ on a POSIX host. Actual collector verification uses Python3.11.17/Python3.12.14 and Git2.52.0. No third-party imports or network access are needed. Output parents must exist; files/directories must be new. + +```sh +python3 -S -B tools/workspace_git_inventory.py --root /workspace --output /private/existing-parent/new-inventory.json --command-timeout 10 --total-timeout 900 +python3 -S -B -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3 -S -B -O -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3 -S -B tools/workspace_git_inventory_mutations.py --output /private/existing-parent/new-mutation-directory +python3 -S -B -O tools/workspace_git_inventory_mutations.py --output /private/existing-parent/new-optimized-mutation-directory +``` + +Collector output is exclusive-create0600. The companion creates an exclusive0700 directory and0600 logs/results, derives source/test paths from its own location, and uses its running interpreter. Collector defaults are10seconds per Git command,1800seconds overall and32MiB combined output per command. Failures terminate/reap only owned children. + +Registry handoff for canonical GOVERNANCE/TOOLING/STATUS: register `tools/workspace_git_inventory.py` as the read-only Phase1/G10 assessment tool and `tools/workspace_git_inventory_mutations.py` as its self-test companion. They are self-contained, maintenance owner none, serving criteria1/9/11 and G10/G11 assessment. Consumers must inspect recorded dirtiness, stashes, refs and coverage errors and combine remote branch/PR evidence; collector exit0 is not a cleanliness gate. + + +## Final corrected qualification + +[Final source hashes](correction/final/SOURCE.json), [author result counts](correction/final/AUTHOR-SUMMARY.json) and [bounded implementation/replay handoff](correction/final/COMPANION-HANDOFF.md) bind the completed generation: **31 = 14 core tests + 17 companion controls**, passing normally and optimized on Python3.11.17 and3.12.14, zero skips/errors/failures. The normal and actual-optimized companions each detect **7/7 collector source mutants**. **Five separate companion-guard regressions** are caught by their designated blackbox assertions; the parent inspected all five raw traces, not just their count-based summary. Those five historical guard runs use normal Python; no optimized guard-mutation execution is asserted. + +The parent independently replays the original seven review fixtures and all14 core tests in all four runtime modes. [Final frozen-source targeted runs](correction/final/parent-targeted/RESULT.json) additionally pass four loader-substitution controls, callback/subtest/setup refusal and a complete7/7 companion run with actual optimized children. The parent did not complete a new full31 aggregate run: one trial crossed a changing intermediate source generation and another was interrupted by an environment reconnect; both are retained privately without success credit. Author aggregate runs remain separately attributed. Hume's nonauthor core review is preserved separately; the final companion receives author/parent self-review and targeted execution, not a completed independent-review verdict. + +Baseline completeness is an exact fourteen-method manifest, not a count alone. A loader cannot substitute duplicate methods, expose14 but execute one repeatedly, rebind a same-name class or alias every method to one body. The frozen synchronous protocol rejects coroutine/generator functions and deferred return values, every subtest report and assertions from setup/teardown/cleanup. It retains the exact escaping AssertionError object and verifies the designated method traceback. Arbitrary malicious Python source or external testing plugins are outside this finite engineering contract. + +The five intentionally corrupted guard source files are [hash-indexed negative fixtures](correction/final/NEGATIVE-INPUTS.json), never admitted tools or imported by production checks. + +For the optional historical five-guard replay, run `python3 -S -B docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls.py.txt CHECKOUT NEW_PRIVATE_OUTPUT`. Both arguments are explicit; the output parent must exist. Read each retained traceback and verify the named meta-test assertion, zero errors and the expected mutation. Its simple summary is not an independent lifecycle/certification authority; the current permanent31-test suite and seven-mutant companion are the reusable tool checks. The frozen recipe's original three-guard docstring predates its actual five-case list; original bytes are preserved. + +The surrounding [legacy Atlas disposition](correction/legacy-atlas-DISPOSITION.md) is a read-only source inventory: #399 is partially superseded, and #501's acquisition delta remains unlanded. It grants neither integration nor proof coverage. Root retains disposition/integration ownership. + +## Historical observations and recoverability + +The following census counts came from the original collector and are historical, unqualified interval observations after the reproduced completeness gaps. They must not be used as final G10 evidence. + +Initial private census:74candidates,24stores,73worktree observations,17dirty worktrees and0stashes. Its sole error was a zero-byte invalid Git marker in derived package cache; it correctly returned incomplete/exit1. Later complete census found65worktrees after the scratch fixtures were retired. After53 retired Atlas roots were archived and removed, the next complete census recorded10stores/12worktrees/0errors/0stashes; only this author checkout was dirty. These are interval observations, not a current or global G10-pass claim. + +Recovery was verified before local cleanup:112,040 scratch entries and138,102 retired-root entries matched independent filesystem/path censuses and native tar byte comparison. Fifty stale IPC sockets were explicitly recorded as non-file endpoints. A native-verified all-ref/reflog Git bundle restored all42 distinct retired HEAD commits in a fresh temporary mirror. Entire shared Git metadata, including original indexes/staging states, was separately byte-verified;23 old local engineering branches were then conditionally pruned at their archived SHAs. No mathematical source branch was pruned by this unit. Private archive locators, raw inventory paths and custody mappings remain private. + +An existing Python3.11 installation was discovered to have lived in scratch. Its exact archived runtime was restored to a maintained location, owner-local link repaired, member bytes/modes verified, and11 normal/optimized core tests rerun. Initial missing-runtime and comparison failures are retained privately; they are not relabelled successful checks. DefaultPython3.12 remained available. + +## Limits and authority + +Observations are non-atomic. Internal directory links are followed once; exact validated Git metadata is excluded. External directory links, malformed markers, coverage errors, command timeouts and output ceilings are explicit incompleteness. Git ignore rules apply to untracked status; physical discovery has no cache or node_modules exclusion. Collection disables configured hooks, clean/process filters, fsmonitor, automatic maintenance, optional locks and lazy network fetch. It performs no remote fetch, preservation/deletion, unreachable-object audit or proof certification. Git versions that ignore the required configuration transport fail closed before status. + +Private archive locators, raw inventory paths and custody mappings remain private. The path-preserving report is not safe to publish merely because credential URL fields were redacted. + +Actual authors: OpenAI/GPT-6/Codex Kepler for collector and companion corrections; parent for permanent companion controls, integration and verification. Hume independently reproduced the original defects but is from the same provider family. Organizational-independence credit0; scientific effect NONE. Existing source failures and historical evidence remain preserved. + + +Original `SOURCE.json`, logs and `mutations.json` describe the original admission. [Original evidence manifest](original-EVIDENCE.json) and [original README bytes](original-README.md) preserve that source snapshot; replay its README entry against `original-README.md`, or read all original paths at commit `60cd4516cd1ad54d778b33b22df289dfe86ee0d8`. The current evidence manifest binds the current report and correction receipts separately. Original [three-regression RED](correction/original-three-regressions-RED.log), [setup-only false admission](correction/original-lifecycle-RESULT.json), [parent core results](correction/CORE-RESULT.json), [original fixture replay](correction/REPRODUCTION-RESULT.json) and [nonauthor core correction review](correction/review-REVIEW.md) remain explicit. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/REGISTRY-HANDOFF.md b/docs/reports/cbz-workspace-hygiene-20261029/REGISTRY-HANDOFF.md new file mode 100644 index 000000000..fb8e1bc40 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/REGISTRY-HANDOFF.md @@ -0,0 +1,18 @@ +# Registry and decision handoff to canonical B-003 writer + +This namespaced addendum does not create a competing canonical registry. + +| Tool | Purpose / usage | Verification / maintenance | CBZ criteria | +|---|---|---|---| +| `tools/workspace_git_inventory.py` | Read-only local Git observation; run `python3 -S -B tools/workspace_git_inventory.py --root /workspace --output /private/existing-parent/new.json --command-timeout 10 --total-timeout 900`. Inspect both coverage and recorded state. | Python3.11+, Git2.31+, POSIX. Fourteen core tests, normal/optimized in both observed Python versions; seven source-mutant controls via companion. No third-party package; maintenance owner none, self-contained. | 1/9/11, G10/G11 assessment only. | +| `tools/workspace_git_inventory_mutations.py` | Baseline and seven known defect-restoring mutations; run `python3 -S -B tools/workspace_git_inventory_mutations.py --output /private/existing-parent/new-dir`, then with `-O` and a different new directory. | 31 aggregate controls (14 core +17 companion) pass normal/O in Python3.11/3.12; 7 collector mutants pass normal/actual-O. Five separate historical guard regressions have inspected designated assertion traces. Privacy, exclusivity, failed/empty baseline, survivor, lifecycle, loader identity, callback, subtest and deferred-body controls are retained. | 9/11, tool self-verification; no mathematical certification. | + +Layer B operational choice: a mutation is credited only for an assertion attributable to its designated test body with the expected complete selected population. Setup/teardown/cleanup failures, loader errors, missing tests, skips or abnormal execution are not detection. Actual optimized execution must propagate to child tests and be observed. This strengthens the original grader; it does not change mathematical bounds, remove tests, hide original failures or establish any theorem. + +Layer C decisions: old699 source admission was withdrawn when concrete review fixtures reproduced configured filter execution, missed nested repositories and path identity collapse; each is fixed at source with retained adverse tests. A separate owned lifecycle control reproduced an original count-only companion false admission; the corrected companion is verified before readmission. Previous raw evidence is preserved and explicitly historical. Same-provider author/reviewer sessions provide no organizational-independence or scientific-acceptance credit. + +Privacy: exact filesystem identities deliberately remain in private inventories. URL redaction is not a publication/privacy classifier. Publish aggregate scope facts and recovery evidence identities only, not raw private inventories, locators or custody logs. + +Root must transplant this finished-tool registration and the exact observed correction commands/results into canonical GOVERNANCE/TOOLING/STATUS and append the corresponding decision ledger entries during serial integration. This is a concrete integration payload, not a request for owner approval or a new review gate. Global final-run G0–G11 and cold-start acceptance remain separate obligations. + +Historical verification recipe: `docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls.py.txt CHECKOUT NEW_PRIVATE_OUTPUT`, executed with Python3 -S -B, creates five owned guard-mutant fixtures and retains raw test output. Purpose: reproduce the five actual regression experiments; not a future generic mutation-grading oracle. Self-verification: five intended meta-test assertion traces inspected, zero unittest errors; actual source digests and logs are in correction/final/guard-controls. Maintenance owner none, frozen evidence recipe, serving criterion9 provenance. It is optional and does not participate in the final federation gate vector without explicit canonical admission. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/SOURCE.json b/docs/reports/cbz-workspace-hygiene-20261029/SOURCE.json new file mode 100644 index 000000000..47ded4cbc --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/SOURCE.json @@ -0,0 +1,29 @@ +{ + "base": "81acc060341e8a31cc4cd4f9523ef71fb6c06175", + "files": { + "tools/workspace_git_inventory.py": { + "bytes": 24122, + "sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301" + }, + "tools/workspace_git_inventory_mutations.py": { + "bytes": 7717, + "sha256": "086e44a9ca848db5b2b987198d30ef9008675b9495ebe75a68a09c5b63eda383" + }, + "tests/test_workspace_git_inventory.py": { + "bytes": 10223, + "sha256": "cfd1c780d093a0d08c86c2a22a01c1215e0443f222647d20fef9fc57a48511b4" + }, + "tests/test_workspace_git_inventory_mutations.py": { + "bytes": 4784, + "sha256": "e1d94f8302e09a6198466ab5913972206500c7be1b50f4c04fd99cc86c63be1a" + } + }, + "verification": { + "normal_tests": 15, + "optimized_tests": 15, + "core_baseline_tests": 11, + "known_mutations": 4, + "detected_mutations": 4 + }, + "scope": "Self-tested engineering observation tool, not LayerA mathematical certification, cleanGit or globalgate/CBZ claim" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/collector-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/collector-normal.log new file mode 100644 index 000000000..bf1f7cd1a --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/collector-normal.log @@ -0,0 +1,16 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 1.094s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/collector-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/collector-optimized.log new file mode 100644 index 000000000..fabc6cc93 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/collector-optimized.log @@ -0,0 +1,16 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 1.049s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/CORE-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/CORE-RESULT.json new file mode 100644 index 000000000..b73759168 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/CORE-RESULT.json @@ -0,0 +1,43 @@ +{ + "at": "2026-10-29T19:58:55.845160+00:00", + "scope": "parent core verification only; runner correction remains in progress", + "before": { + "tools/workspace_git_inventory.py": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "tests/test_workspace_git_inventory.py": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844" + }, + "after": { + "tools/workspace_git_inventory.py": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "tests/test_workspace_git_inventory.py": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844" + }, + "source_unchanged": true, + "runs": [ + { + "label": "python312-normal", + "command": "python3.12 -S -B -m unittest tests.test_workspace_git_inventory -v", + "exit_observed": 0, + "log": "python312-normal.log", + "log_sha256": "2246408104fe88093c2404ad0ef5bbd78982be3a4a77b014a0edca567eb5e6cd" + }, + { + "label": "python312-optimized", + "command": "python3.12 -S -B -O -m unittest tests.test_workspace_git_inventory -v", + "exit_observed": 0, + "log": "python312-optimized.log", + "log_sha256": "3af0ee856a7d07da397432b6f5b97a800ddb52c0fd56e074dde40b766e42b9e5" + }, + { + "label": "python311-normal", + "command": "python3.11 -S -B -m unittest tests.test_workspace_git_inventory -v", + "exit_observed": 0, + "log": "python311-normal.log", + "log_sha256": "6c75e07be800ac8ea3290ca8698d409bfb5df35203e0dcee33c37e075a20de99" + }, + { + "label": "python311-optimized", + "command": "python3.11 -S -B -O -m unittest tests.test_workspace_git_inventory -v", + "exit_observed": 0, + "log": "python311-optimized.log", + "log_sha256": "ae239c725d5a30966e1a1b47cfa2be21b54ac68369de6b8ba551a42d0c5bf488" + } + ] +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/REPRODUCTION-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/REPRODUCTION-RESULT.json new file mode 100644 index 000000000..c2cf882bb --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/REPRODUCTION-RESULT.json @@ -0,0 +1,71 @@ +{ + "exit_observed": 0, + "passed": true, + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "driver_sha256": "8b1cd3cb308d271e8befc368f382e36c645b9aa756b9846075297864304bc2a0", + "raw_sha256": "0c4b40f6a113d9fbfd33c15696a1443f852ca8da39dfcdcac77978b3714764eb", + "cases": [ + { + "case": "valid-filter-name", + "name": "audit", + "marker_written": false, + "native_status_control_marker": true, + "cli_marker_written": false, + "complete": true + }, + { + "case": "valid-filter-name", + "name": "eq=name", + "marker_written": false, + "native_status_control_marker": true, + "cli_marker_written": false, + "complete": true + }, + { + "case": "valid-filter-name", + "name": "eq==name", + "marker_written": false, + "native_status_control_marker": true, + "cli_marker_written": false, + "complete": true + }, + { + "case": "valid-filter-name", + "name": "has.dot", + "marker_written": false, + "native_status_control_marker": true, + "cli_marker_written": false, + "complete": true + }, + { + "case": "valid-filter-name", + "name": "hyphen-name", + "marker_written": false, + "native_status_control_marker": true, + "cli_marker_written": false, + "complete": true + }, + { + "case": "ordinary-HEAD-and-objects", + "nested_discovered": true, + "nested_discovered_after_removing_asset_HEAD": true, + "counter_control_complete": true, + "complete": true + }, + { + "case": "path-query-redaction", + "original_names": [ + "untracked?token=first", + "untracked?token=second", + "line\nbreak\t\udcff" + ], + "observed_paths": [ + "line\nbreak\t\udcff", + "untracked?token=first", + "untracked?token=second" + ], + "complete": true + } + ], + "fixtures_remaining": 0 +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/AUTHOR-SUMMARY.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/AUTHOR-SUMMARY.json new file mode 100644 index 000000000..9e891f7b6 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/AUTHOR-SUMMARY.json @@ -0,0 +1,28 @@ +{ + "source": "SOURCE-FINAL.json", + "changed_source_files": 2, + "collector_unchanged": true, + "core_tests_unchanged": true, + "baseline_manifest": 14, + "source_mutants": 7, + "separate_guard_mutations_detected": 5, + "core_tests": 14, + "companion_meta_tests": 17, + "aggregate_modes": { + "python311_normal": 31, + "python311_optimized": 31, + "python312_normal": 31, + "python312_optimized": 31 + }, + "all_aggregate_runs_passed": true, + "source_mutants_qualified_normal_and_actual_optimized": true, + "frozen639_loader_control": "exit0 / falsely admitted", + "corrected_loader_control": "exit1 / no mutants run", + "qualification_logs_prefix": "qualified-", + "self_review": "Author review plus automated controls; no independent review, mathematical certification, cleanliness or global gate claim", + "versions": { + "python3": "3.12.14", + "python3.11": "3.11.17", + "git": "git version 2.52.0" + } +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/COMPANION-HANDOFF.md b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/COMPANION-HANDOFF.md new file mode 100644 index 000000000..0d04aeaf4 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/COMPANION-HANDOFF.md @@ -0,0 +1,110 @@ +# Finite companion population and callback correction + +Only `tools/workspace_git_inventory_mutations.py` and +`tests/test_workspace_git_inventory_mutations.py` changed in +`/workspace/cbz-workspace-git-hygiene-20261029`. Collector and core-test hashes +remain `697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314` +and `b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844`. +No core edit, staging, commit, canonical documentation, GitHub/publication, +census or foreign-source change was performed. Parent owns those surfaces. +`SOURCE-FINAL.json` records exact final hashes; `PATCH.diff` is this unit's +two-file delta against the personally verified frozen `639be769...` runner. + +## Reproduced gaps and bounded rule + +`population-before/results.json` and `CONTROL-BEFORE.json` personally reproduce +exit0/complete=true/all_detected=true with fourteen separate instances of only +the unborn/detached test. The original assertions and named mutant selection +remain unchanged in the copied fixture. `population-RED.log` additionally shows +a suite loading all fourteen distinct methods but actually executing only one +fourteen times. `class-RED.log` reproduces admission of an unexpected subclass. +`reproduce_population.py` retains the frozen and corrected replay controls. +The corrected replay exits1 and runs zero mutants (`CONTROL-AFTER.json`). + +Baseline admission now requires the exact explicit fourteen-method manifest, +once each. The companion freezes the original InventoryTests class object, +canonical ID prefix, method function objects and code objects BEFORE calling the +loader. Method names/printed IDs alone are insufficient: `pristine-class-RED.log` +reproduces a loader substituting another class with the same displayed name; +`method-alias-RED.log` reproduces all fourteen names aliased to one actual body. +Both benign controls are rejected by the final source. + +Loaded identities, framework-started identities, actual body-entry identities +and body-exit identities must each match the expected multiset exactly, with +pristine class/function/code checks at load and actual execution. Duplicates, +omissions, unexpected types, rebinding and aliasing are refused. Normal return +or an actual escaping synchronous exception records body exit; rejected deferred +returns do not. Baselines must additionally pass all fourteen tests without +fixture issues, unsupported bodies, skips, errors or optimization mismatch. +Named mutants must load/start/enter/exit precisely their expected case once. + +The driver retains the EXACT escaping AssertionError object from the designated +body. A reported failure must refer to that same object, in body phase and with +the method in its traceback. `callback-RED.log` reproduces a swallowed assertion +fed manually to result.addFailure; the corrected source rejects it. Existing +outer lifecycle phase attribution remains, including setup/teardown/cleanup +refusal even when a method was called by a fixture. + +Current core bodies have no subtests (personally checked with rg). All subtest +reports are explicitly unsupported, including successful reports and foreign +parents. `subtest-RED.log` reproduces native subtest false credit before this +guard; black-box tests cover native failure, foreign-parent failure (one failure, +zero errors), and fourteen successful fixture subtests refusing the baseline. +No generic subtest/async/plugin engine is introduced. Deferred-body refusal, +actual -O propagation, zero-test/error/survivor/lifecycle controls remain. + +This is a bounded engineering verifier for the frozen synchronous stdlib +InventoryTests protocol. It does not certify arbitrary malicious Python sources +or testing plugins, mathematical truth, clean Git, global gates or CBZ-0. + +## Verification, counts and reproducibility + +The unchanged source-mutation contract is **14 baseline methods / 7 meaningful +source mutants**. This sidecar does not import peer 26/22 counts. The aggregate +test population is **31 = 14 unchanged core + 17 companion meta tests**. +Final source-bound results are in `SUMMARY.json`; current aggregate logs use the +`qualified-python312-*` / `qualified-python311-*` names. Older 29/30-test logs, +trial reports and intermediate source snapshots are historical, not final +qualification. `SOURCE-INTERMEDIATE.json`, `INTERMEDIATE-PATCH.diff`, and the +explicit intermediate runner/meta files preserve those exact inputs. + +Final observed qualification: **31/31 PASS in all four aggregate modes**, normal +and -O on Python3.11.17 and3.12.14, no failures/errors/skips. The two standalone +companion modes qualify **7/7** source mutants with actual child optimization0/1. +All **5/5** separate guard mutations are caught by their black-box assertion +tests, with zero unittest errors. `SUMMARY.json` records these final observations. + +`mutations-qualified-normal/results.json` and +`mutations-qualified-optimized/results.json` retain the seven source-mutant +reports, exact loaded/started/body identities, real escaping assertion attribution +and actual child optimization. All seven mutation edits/targets are unchanged. + +`check_guard_mutations.py` separately tests five companion-guard regressions: +remove population gates, remove escaping-object provenance, remove subtest +refusal, recapture a loader-rebound class, and bypass pristine method checks. +Each must cause its designated black-box meta test to fail by assertion, not +error/timeout. Raw mutated copies/hashes/logs/results are under +`guard-mutations-qualified/`; these five auditor controls are separate from the +seven collector source mutants. + +From a checkout with existing Python/Git: + +```sh +python3.11 -S -B -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3.11 -S -B -O -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3 -S -B -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3 -S -B -O -m unittest discover -s tests -p 'test_workspace_git_inventory*.py' -v +python3 -S -B tools/workspace_git_inventory_mutations.py --output /private/existing-parent/NEW-directory +python3 -S -B -O tools/workspace_git_inventory_mutations.py --output /private/existing-parent/ANOTHER-NEW-directory +``` + +No dependencies or runtime links were installed/changed. Existing limits remain: +60s baseline, 20s per source mutant, 90s per black-box companion CLI call; private +exclusive output directory0700/files0600. Guard-control tests have a finite180s +outer subprocess timeout. Only owned temporary copies/children are used. + +Parent registry/report updates should use the final hashes, exact31 aggregate +tests,14 expected baseline identities,7 source mutants and5 separate guard +mutations. Source-bound GREEN/RED history is preserved; no approval or merge +claim is made. Author self-review plus automated evidence, actual OpenAI/GPT-6 +Codex engineering only, org0/scienceNONE. This releases only this bounded unit. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/NEGATIVE-INPUTS.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/NEGATIVE-INPUTS.json new file mode 100644 index 000000000..d4d1b27f2 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/NEGATIVE-INPUTS.json @@ -0,0 +1,55 @@ +{ + "scope": "precise engineering adverse-input boundary, not a mathematical-proof quarantine or globalgate exclusion", + "entries": [ + { + "id": "GIT-NEG-001", + "path": "docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion-runner.py", + "sha256": "fe4551c2d0322780fbee3807123b4938ce0752ec9d701ccce3e4dd9211d5d11a", + "classification": "ENGINEERING_NEGATIVE_FIXTURE", + "boundary": "Intentionally corrupted companion source used only as regression test data. Not an admitted tool or proof certificate; no closed/production code depends on this file. The four frozen source files in SOURCE.json are separate.", + "why_failing": "Restores a demonstrated false-admission guard defect; corresponding raw meta-test assertion rejects it.", + "owner": "none", + "maintenance": "zero" + }, + { + "id": "GIT-NEG-002", + "path": "docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population-runner.py", + "sha256": "b6e4188590e2b93de1dd3cecfc37d974ce2472a283bcae4a86c62fc610e12172", + "classification": "ENGINEERING_NEGATIVE_FIXTURE", + "boundary": "Intentionally corrupted companion source used only as regression test data. Not an admitted tool or proof certificate; no closed/production code depends on this file. The four frozen source files in SOURCE.json are separate.", + "why_failing": "Restores a demonstrated false-admission guard defect; corresponding raw meta-test assertion rejects it.", + "owner": "none", + "maintenance": "zero" + }, + { + "id": "GIT-NEG-003", + "path": "docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class-runner.py", + "sha256": "9dcf793b1b39a8269047f56825ce35af3bb56f4c64f6d0efb26ca9430cee38f6", + "classification": "ENGINEERING_NEGATIVE_FIXTURE", + "boundary": "Intentionally corrupted companion source used only as regression test data. Not an admitted tool or proof certificate; no closed/production code depends on this file. The four frozen source files in SOURCE.json are separate.", + "why_failing": "Restores a demonstrated false-admission guard defect; corresponding raw meta-test assertion rejects it.", + "owner": "none", + "maintenance": "zero" + }, + { + "id": "GIT-NEG-004", + "path": "docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method-runner.py", + "sha256": "50ddc5dd12ac142c5ea7e89a367272280db8c7d3701f424441735fe52dc36019", + "classification": "ENGINEERING_NEGATIVE_FIXTURE", + "boundary": "Intentionally corrupted companion source used only as regression test data. Not an admitted tool or proof certificate; no closed/production code depends on this file. The four frozen source files in SOURCE.json are separate.", + "why_failing": "Restores a demonstrated false-admission guard defect; corresponding raw meta-test assertion rejects it.", + "owner": "none", + "maintenance": "zero" + }, + { + "id": "GIT-NEG-005", + "path": "docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests-runner.py", + "sha256": "8ba594c75c20e4747bcb1eced7e7c95b087e57ad44055222a3f9a496756cc053", + "classification": "ENGINEERING_NEGATIVE_FIXTURE", + "boundary": "Intentionally corrupted companion source used only as regression test data. Not an admitted tool or proof certificate; no closed/production code depends on this file. The four frozen source files in SOURCE.json are separate.", + "why_failing": "Restores a demonstrated false-admission guard defect; corresponding raw meta-test assertion rejects it.", + "owner": "none", + "maintenance": "zero" + } + ] +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/SOURCE.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/SOURCE.json new file mode 100644 index 000000000..249997a8a --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/SOURCE.json @@ -0,0 +1,30 @@ +{ + "files": [ + { + "path": "tools/workspace_git_inventory.py", + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "bytes": 27119, + "changed": false + }, + { + "path": "tools/workspace_git_inventory_mutations.py", + "sha256": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "bytes": 18930, + "changed": true + }, + { + "path": "tests/test_workspace_git_inventory.py", + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "bytes": 17972, + "changed": false + }, + { + "path": "tests/test_workspace_git_inventory_mutations.py", + "sha256": "4273fe5b946232f07751864a82e8773974c75663538744dcea79788d4923bebd", + "bytes": 17092, + "changed": true + } + ], + "core_unchanged": true, + "core_tests_unchanged": true +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.json new file mode 100644 index 000000000..31bdd6979 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_completed_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.log new file mode 100644 index 000000000..ef1a82044 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/ambiguous-filter-key.log @@ -0,0 +1,13 @@ +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... FAIL + +====================================================================== +FAIL: test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true : [{'kind': 'unsafe_configuration', 'path': '/tmp/tmpwy5dmmmq/workspace/parent', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpwy5dmmmq/workspace/parent/.git/modules/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpwy5dmmmq/workspace/parent/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpwy5dmmmq/workspace/source', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}] + +---------------------------------------------------------------------- +Ran 1 test in 0.693s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.json new file mode 100644 index 000000000..591a70f03 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.json @@ -0,0 +1 @@ +{"tests_run": 14, "successful": true, "failures": 0, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 14, "designated_body_calls": 0, "body_failures": 0, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": []} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.log new file mode 100644 index 000000000..eb51644bb --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/baseline.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (census_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 9.232s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.json new file mode 100644 index 000000000..145d7a909 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.log new file mode 100644 index 000000000..8eac301be --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/disable-redaction.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: 'password' unexpectedly found in '{"schema_version": 1, "started_at": "2026-10-29T20:37:11.166750+00:00", "root": "/tmp/tmpmv9rpe4i/workspace", "purpose": "Observed Git census only; not a clean-state or mathematical certification", "non_atomic_observations": true, "complete": true, "errors": [], "policy": {"walk_exclusions": ["Validated exact Git metadata internals only; node_modules is searched"], "symlinks": "Follow internal directory targets once by device/inode; record all links; external directory targets are uncovered/incomplete", "paths": "NUL Git records; filesystem surrogateescape; JSON ensure_ascii=true", "read_only": "Optional locks, hooks, filters, maintenance and lazy network fetch disabled; no Git mutation commands", "status": "porcelain v1 -z --untracked-files=all; Git ignore rules still apply", "url_redaction": "Remote URLs and diagnostic values only; filesystem identities preserved"}, "limits": {"git_timeout_seconds": 10, "total_timeout_seconds": 1800, "max_command_bytes": 33554432}, "stores": [{"path": "/tmp/tmpmv9rpe4i/workspace/primary/.git", "representative": "/tmp/tmpmv9rpe4i/workspace/linked\\nworktree", "refs": [{"name": "refs/heads/linked-branch", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/master", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/other", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/stash", "object": "b35465416b2804c8b83b0d47d6b9549e725ad935", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/tags/annotated", "object": "2ff62d525ac043ce8d4f8deb3a9c958d67be98dd", "type": "tag", "peeled_object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "peeled_type": "commit", "symbolic_target": ""}, {"name": "refs/tags/v1", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpmv9rpe4i/workspace/primary", "HEAD": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master"}, {"worktree": "/tmp/tmpmv9rpe4i/workspace/linked\\nworktree", "HEAD": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/linked-branch"}], "stashes": [{"object": "b35465416b2804c8b83b0d47d6b9549e725ad935", "selector": "stash@{0}"}]}, {"path": "/tmp/tmpmv9rpe4i/workspace/primary/nested/.git", "representative": "/tmp/tmpmv9rpe4i/workspace/primary/nested", "refs": [{"name": "refs/heads/master", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpmv9rpe4i/workspace/primary/nested", "HEAD": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master"}], "stashes": []}, {"path": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package/.git", "representative": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package", "refs": [{"name": "refs/heads/master", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package", "HEAD": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master"}], "stashes": []}], "worktrees": [{"path": "/tmp/tmpmv9rpe4i/workspace/linked\\nworktree", "common_store": "/tmp/tmpmv9rpe4i/workspace/primary/.git", "observed_at": "2026-10-29T20:37:11.247814+00:00", "exists": true, "head": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/linked-branch", "status": [], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpmv9rpe4i/workspace/primary/.git/worktrees/linked-worktree", "detached": false, "unborn": false, "local_refs": [{"name": "refs/worktree/census", "object": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}]}, {"path": "/tmp/tmpmv9rpe4i/workspace/primary", "common_store": "/tmp/tmpmv9rpe4i/workspace/primary/.git", "observed_at": "2026-10-29T20:37:11.273118+00:00", "exists": true, "head": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master", "status": [{"xy": " M", "path": "tracked"}, {"xy": "??", "path": "nested/"}, {"xy": "??", "path": "node_modules/package/"}, {"xy": "??", "path": "untracked\\nname\\tand spaces"}], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpmv9rpe4i/workspace/primary/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpmv9rpe4i/workspace/primary/nested", "common_store": "/tmp/tmpmv9rpe4i/workspace/primary/nested/.git", "observed_at": "2026-10-29T20:37:11.297018+00:00", "exists": true, "head": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpmv9rpe4i/workspace/primary/nested/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package", "common_store": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package/.git", "observed_at": "2026-10-29T20:37:11.313208+00:00", "exists": true, "head": "3c65148106ee1a5032db98ebd133d8dd8ef9ec0a", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package/.git", "detached": false, "unborn": false, "local_refs": []}], "discovered_roots": ["/tmp/tmpmv9rpe4i/workspace/linked\\nworktree", "/tmp/tmpmv9rpe4i/workspace/primary", "/tmp/tmpmv9rpe4i/workspace/primary/nested", "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package"], "symlinks": [], "git_metadata_not_traversed": ["/tmp/tmpmv9rpe4i/workspace/primary/.git", "/tmp/tmpmv9rpe4i/workspace/primary/nested/.git", "/tmp/tmpmv9rpe4i/workspace/primary/node_modules/package/.git"], "directories_visited": 6, "empty_discovery": false, "finished_at": "2026-10-29T20:37:11.335041+00:00", "git_commands": 73}' + +---------------------------------------------------------------------- +Ran 1 test in 0.321s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.json new file mode 100644 index 000000000..145d7a909 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.log new file mode 100644 index 000000000..ec2c239ff --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/exclude-node-modules.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmpi4dj8wq1/workspace/primary/node_modules/package' not found in {'/tmp/tmpi4dj8wq1/workspace/linked\nworktree': {'path': '/tmp/tmpi4dj8wq1/workspace/linked\nworktree', 'common_store': '/tmp/tmpi4dj8wq1/workspace/primary/.git', 'observed_at': '2026-10-29T20:37:10.844749+00:00', 'exists': True, 'head': 'fd3db60c3ab6850402fe93edfc97309b293733c8', 'branch': 'refs/heads/linked-branch', 'status': [], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmpi4dj8wq1/workspace/primary/.git/worktrees/linked-worktree', 'detached': False, 'unborn': False, 'local_refs': [{'name': 'refs/worktree/census', 'object': 'fd3db60c3ab6850402fe93edfc97309b293733c8', 'type': 'commit', 'peeled_object': '', 'peeled_type': '', 'symbolic_target': ''}]}, '/tmp/tmpi4dj8wq1/workspace/primary': {'path': '/tmp/tmpi4dj8wq1/workspace/primary', 'common_store': '/tmp/tmpi4dj8wq1/workspace/primary/.git', 'observed_at': '2026-10-29T20:37:10.862772+00:00', 'exists': True, 'head': 'fd3db60c3ab6850402fe93edfc97309b293733c8', 'branch': 'refs/heads/master', 'status': [{'xy': ' M', 'path': 'tracked'}, {'xy': '??', 'path': 'nested/'}, {'xy': '??', 'path': 'node_modules/package/'}, {'xy': '??', 'path': 'untracked\nname\tand spaces'}], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmpi4dj8wq1/workspace/primary/.git', 'detached': False, 'unborn': False, 'local_refs': []}, '/tmp/tmpi4dj8wq1/workspace/primary/nested': {'path': '/tmp/tmpi4dj8wq1/workspace/primary/nested', 'common_store': '/tmp/tmpi4dj8wq1/workspace/primary/nested/.git', 'observed_at': '2026-10-29T20:37:10.881687+00:00', 'exists': True, 'head': 'fd3db60c3ab6850402fe93edfc97309b293733c8', 'branch': 'refs/heads/master', 'status': [], 'submodules': [], 'remotes': [], 'bare': False, 'git_dir': '/tmp/tmpi4dj8wq1/workspace/primary/nested/.git', 'detached': False, 'unborn': False, 'local_refs': []}} + +---------------------------------------------------------------------- +Ran 1 test in 0.267s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.json new file mode 100644 index 000000000..8884d44f0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_completed_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.log new file mode 100644 index 000000000..608dfd73b --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/execute-clean-filter.log @@ -0,0 +1,13 @@ +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... FAIL + +====================================================================== +FAIL: test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.186s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.json new file mode 100644 index 000000000..e124c32ba --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.log new file mode 100644 index 000000000..950494f0e --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/false-complete.log @@ -0,0 +1,13 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... FAIL + +====================================================================== +FAIL: test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.095s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.json new file mode 100644 index 000000000..de72c995d --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_completed_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.log new file mode 100644 index 000000000..b5e115499 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/redact-path-identities.log @@ -0,0 +1,18 @@ +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... FAIL + +====================================================================== +FAIL: test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmp4dnl9_ss/workspace/root?token=[REDACTED]' != '/tmp/tmp4dnl9_ss/workspace/root?token=root-value' +- /tmp/tmp4dnl9_ss/workspace/root?token=[REDACTED] +? ^^^^^^^^^^ ++ /tmp/tmp4dnl9_ss/workspace/root?token=root-value +? ^^^^^^^^^^ + + +---------------------------------------------------------------------- +Ran 1 test in 0.270s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/results.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/results.json new file mode 100644 index 000000000..315c2ab2d --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/results.json @@ -0,0 +1,535 @@ +{ + "schema_version": 1, + "purpose": "Git census self-tests only; no mathematical certification or Git cleanliness claim", + "started_at": "2026-10-29T20:37:01.097590+00:00", + "python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]", + "python_executable": "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "sources": { + "collector": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory.py", + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "bytes": 27119 + }, + "tests": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "bytes": 17972 + }, + "runner": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory_mutations.py", + "sha256": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "bytes": 18930 + } + }, + "baseline": { + "test": "entire suite", + "log": "baseline.log", + "metrics": "baseline.json", + "timeout_seconds": 60, + "returncode": 0, + "tests_run": 14, + "successful": true, + "failures": 0, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 14, + "designated_body_calls": 0, + "body_failures": 0, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [], + "passed": true + }, + "mutations": [ + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "exclude-node-modules.log", + "metrics": "exclude-node-modules.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "exclude-node-modules", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "f560150342ce90b929af82d91915fb234795c0483f6125f72f2042a0f7f6e495", + "replacement": { + "old": "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "new": "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):" + }, + "detected_by_assertion": true + }, + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "disable-redaction.log", + "metrics": "disable-redaction.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "disable-redaction", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "96de2ee56ba150d36ef0e4e733ff7d99add85cfeaf831ad29eed105601e22740", + "replacement": { + "old": "def _redact(value):\n", + "new": "def _redact(value):\n return value\n" + }, + "detected_by_assertion": true + }, + { + "test": "test_status_does_not_execute_configured_clean_filter", + "log": "execute-clean-filter.log", + "metrics": "execute-clean-filter.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "execute-clean-filter", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "cda6093a4baf09a1e2b5ba20123396fdc0cea9a38422c8ea61b6f429b56e93a4", + "replacement": { + "old": "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + "new": "settings += []" + }, + "detected_by_assertion": true + }, + { + "test": "test_broken_marker_and_external_directory_boundary_are_not_silent", + "log": "false-complete.log", + "metrics": "false-complete.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "false-complete", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "716375e9f7099967219e48708beb7e1572b63e3915b5aee55c6b2b1e4347dd3a", + "replacement": { + "old": "complete=not reader.errors", + "new": "complete=True" + }, + "detected_by_assertion": true + }, + { + "test": "test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "log": "ambiguous-filter-key.log", + "metrics": "ambiguous-filter-key.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "ambiguous-filter-key", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "d7a4d5157bd9429eedd59f346a6664459120653921e2886e9b01daf7341c8e4b", + "replacement": { + "old": "key, _, value = setting.rpartition('=')", + "new": "key, _, value = setting.partition('=')" + }, + "detected_by_assertion": true + }, + { + "test": "test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "log": "unvalidated-metadata.log", + "metrics": "unvalidated-metadata.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "unvalidated-metadata", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "2c6177f5f94e62b129a4f3fbd06049f618498df2693e1e50cbb1fc8bbf8d9a13", + "replacement": { + "old": "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + "new": "exact = True" + }, + "detected_by_assertion": true + }, + { + "test": "test_remote_redaction_preserves_all_filesystem_identity_fields", + "log": "redact-path-identities.log", + "metrics": "redact-path-identities.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "redact-path-identities", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "5862cb449eba24b181b30e0a2f0fc02f57e3fd63547f5ee85864d6652f96cf56", + "replacement": { + "old": " return report\n", + "new": " return _redact(report)\n" + }, + "detected_by_assertion": true + } + ], + "errors": [], + "complete": true, + "all_detected": true, + "finished_at": "2026-10-29T20:37:13.584267+00:00" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.json new file mode 100644 index 000000000..60a02f862 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 0, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_completed_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.log new file mode 100644 index 000000000..9b307f46d --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-normal/unvalidated-metadata.log @@ -0,0 +1,13 @@ +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... FAIL + +====================================================================== +FAIL: test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true + +---------------------------------------------------------------------- +Ran 1 test in 0.237s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.json new file mode 100644 index 000000000..5daecb5e7 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_completed_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.log new file mode 100644 index 000000000..0972197be --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/ambiguous-filter-key.log @@ -0,0 +1,13 @@ +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... FAIL + +====================================================================== +FAIL: test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true : [{'kind': 'unsafe_configuration', 'path': '/tmp/tmpnfjh_y0c/workspace/parent', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpnfjh_y0c/workspace/parent/.git/modules/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpnfjh_y0c/workspace/parent/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpnfjh_y0c/workspace/source', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}] + +---------------------------------------------------------------------- +Ran 1 test in 0.677s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.json new file mode 100644 index 000000000..6772ea4ba --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.json @@ -0,0 +1 @@ +{"tests_run": 14, "successful": true, "failures": 0, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 14, "designated_body_calls": 0, "body_failures": 0, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": []} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.log new file mode 100644 index 000000000..69ef3c1a5 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/baseline.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (census_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 9.390s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.json new file mode 100644 index 000000000..6cc4b162f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.log new file mode 100644 index 000000000..2d9e6a4eb --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/disable-redaction.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: 'password' unexpectedly found in '{"schema_version": 1, "started_at": "2026-10-29T20:37:12.246482+00:00", "root": "/tmp/tmpd9sxw18b/workspace", "purpose": "Observed Git census only; not a clean-state or mathematical certification", "non_atomic_observations": true, "complete": true, "errors": [], "policy": {"walk_exclusions": ["Validated exact Git metadata internals only; node_modules is searched"], "symlinks": "Follow internal directory targets once by device/inode; record all links; external directory targets are uncovered/incomplete", "paths": "NUL Git records; filesystem surrogateescape; JSON ensure_ascii=true", "read_only": "Optional locks, hooks, filters, maintenance and lazy network fetch disabled; no Git mutation commands", "status": "porcelain v1 -z --untracked-files=all; Git ignore rules still apply", "url_redaction": "Remote URLs and diagnostic values only; filesystem identities preserved"}, "limits": {"git_timeout_seconds": 10, "total_timeout_seconds": 1800, "max_command_bytes": 33554432}, "stores": [{"path": "/tmp/tmpd9sxw18b/workspace/primary/.git", "representative": "/tmp/tmpd9sxw18b/workspace/linked\\nworktree", "refs": [{"name": "refs/heads/linked-branch", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/master", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/other", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/stash", "object": "4037ecd230fab4dc87bf5049202ad2fa5876fc90", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/tags/annotated", "object": "1e82bef47c79e2504e59954050fe167ede5dc174", "type": "tag", "peeled_object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "peeled_type": "commit", "symbolic_target": ""}, {"name": "refs/tags/v1", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpd9sxw18b/workspace/primary", "HEAD": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master"}, {"worktree": "/tmp/tmpd9sxw18b/workspace/linked\\nworktree", "HEAD": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/linked-branch"}], "stashes": [{"object": "4037ecd230fab4dc87bf5049202ad2fa5876fc90", "selector": "stash@{0}"}]}, {"path": "/tmp/tmpd9sxw18b/workspace/primary/nested/.git", "representative": "/tmp/tmpd9sxw18b/workspace/primary/nested", "refs": [{"name": "refs/heads/master", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpd9sxw18b/workspace/primary/nested", "HEAD": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master"}], "stashes": []}, {"path": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package/.git", "representative": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package", "refs": [{"name": "refs/heads/master", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package", "HEAD": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master"}], "stashes": []}], "worktrees": [{"path": "/tmp/tmpd9sxw18b/workspace/linked\\nworktree", "common_store": "/tmp/tmpd9sxw18b/workspace/primary/.git", "observed_at": "2026-10-29T20:37:12.354312+00:00", "exists": true, "head": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/linked-branch", "status": [], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpd9sxw18b/workspace/primary/.git/worktrees/linked-worktree", "detached": false, "unborn": false, "local_refs": [{"name": "refs/worktree/census", "object": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}]}, {"path": "/tmp/tmpd9sxw18b/workspace/primary", "common_store": "/tmp/tmpd9sxw18b/workspace/primary/.git", "observed_at": "2026-10-29T20:37:12.376442+00:00", "exists": true, "head": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master", "status": [{"xy": " M", "path": "tracked"}, {"xy": "??", "path": "nested/"}, {"xy": "??", "path": "node_modules/package/"}, {"xy": "??", "path": "untracked\\nname\\tand spaces"}], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpd9sxw18b/workspace/primary/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpd9sxw18b/workspace/primary/nested", "common_store": "/tmp/tmpd9sxw18b/workspace/primary/nested/.git", "observed_at": "2026-10-29T20:37:12.396595+00:00", "exists": true, "head": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpd9sxw18b/workspace/primary/nested/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package", "common_store": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package/.git", "observed_at": "2026-10-29T20:37:12.448582+00:00", "exists": true, "head": "a9cd3cf2c1c1e928327bc398e2f7adf959c4073f", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package/.git", "detached": false, "unborn": false, "local_refs": []}], "discovered_roots": ["/tmp/tmpd9sxw18b/workspace/linked\\nworktree", "/tmp/tmpd9sxw18b/workspace/primary", "/tmp/tmpd9sxw18b/workspace/primary/nested", "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package"], "symlinks": [], "git_metadata_not_traversed": ["/tmp/tmpd9sxw18b/workspace/primary/.git", "/tmp/tmpd9sxw18b/workspace/primary/nested/.git", "/tmp/tmpd9sxw18b/workspace/primary/node_modules/package/.git"], "directories_visited": 6, "empty_discovery": false, "finished_at": "2026-10-29T20:37:12.486681+00:00", "git_commands": 73}' + +---------------------------------------------------------------------- +Ran 1 test in 0.360s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.json new file mode 100644 index 000000000..6cc4b162f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.log new file mode 100644 index 000000000..fa7d422ec --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/exclude-node-modules.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmpnq279_fn/workspace/primary/node_modules/package' not found in {'/tmp/tmpnq279_fn/workspace/linked\nworktree': {'path': '/tmp/tmpnq279_fn/workspace/linked\nworktree', 'common_store': '/tmp/tmpnq279_fn/workspace/primary/.git', 'observed_at': '2026-10-29T20:37:11.679836+00:00', 'exists': True, 'head': '3c65148106ee1a5032db98ebd133d8dd8ef9ec0a', 'branch': 'refs/heads/linked-branch', 'status': [], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmpnq279_fn/workspace/primary/.git/worktrees/linked-worktree', 'detached': False, 'unborn': False, 'local_refs': [{'name': 'refs/worktree/census', 'object': '3c65148106ee1a5032db98ebd133d8dd8ef9ec0a', 'type': 'commit', 'peeled_object': '', 'peeled_type': '', 'symbolic_target': ''}]}, '/tmp/tmpnq279_fn/workspace/primary': {'path': '/tmp/tmpnq279_fn/workspace/primary', 'common_store': '/tmp/tmpnq279_fn/workspace/primary/.git', 'observed_at': '2026-10-29T20:37:11.696707+00:00', 'exists': True, 'head': '3c65148106ee1a5032db98ebd133d8dd8ef9ec0a', 'branch': 'refs/heads/master', 'status': [{'xy': ' M', 'path': 'tracked'}, {'xy': '??', 'path': 'nested/'}, {'xy': '??', 'path': 'node_modules/package/'}, {'xy': '??', 'path': 'untracked\nname\tand spaces'}], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmpnq279_fn/workspace/primary/.git', 'detached': False, 'unborn': False, 'local_refs': []}, '/tmp/tmpnq279_fn/workspace/primary/nested': {'path': '/tmp/tmpnq279_fn/workspace/primary/nested', 'common_store': '/tmp/tmpnq279_fn/workspace/primary/nested/.git', 'observed_at': '2026-10-29T20:37:11.719248+00:00', 'exists': True, 'head': '3c65148106ee1a5032db98ebd133d8dd8ef9ec0a', 'branch': 'refs/heads/master', 'status': [], 'submodules': [], 'remotes': [], 'bare': False, 'git_dir': '/tmp/tmpnq279_fn/workspace/primary/nested/.git', 'detached': False, 'unborn': False, 'local_refs': []}} + +---------------------------------------------------------------------- +Ran 1 test in 0.284s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.json new file mode 100644 index 000000000..a365d3bce --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_completed_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.log new file mode 100644 index 000000000..a1fb889a8 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/execute-clean-filter.log @@ -0,0 +1,13 @@ +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... FAIL + +====================================================================== +FAIL: test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.217s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.json new file mode 100644 index 000000000..fe6e28fe0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.log new file mode 100644 index 000000000..3242b2313 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/false-complete.log @@ -0,0 +1,13 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... FAIL + +====================================================================== +FAIL: test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.098s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.json new file mode 100644 index 000000000..f67683714 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_completed_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.log new file mode 100644 index 000000000..fd910b893 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/redact-path-identities.log @@ -0,0 +1,18 @@ +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... FAIL + +====================================================================== +FAIL: test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmp1kr9e8c2/workspace/root?token=[REDACTED]' != '/tmp/tmp1kr9e8c2/workspace/root?token=root-value' +- /tmp/tmp1kr9e8c2/workspace/root?token=[REDACTED] +? ^^^^^^^^^^ ++ /tmp/tmp1kr9e8c2/workspace/root?token=root-value +? ^^^^^^^^^^ + + +---------------------------------------------------------------------- +Ran 1 test in 0.218s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/results.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/results.json new file mode 100644 index 000000000..fc792572f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/results.json @@ -0,0 +1,535 @@ +{ + "schema_version": 1, + "purpose": "Git census self-tests only; no mathematical certification or Git cleanliness claim", + "started_at": "2026-10-29T20:37:01.364701+00:00", + "python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]", + "python_executable": "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "sources": { + "collector": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory.py", + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "bytes": 27119 + }, + "tests": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "bytes": 17972 + }, + "runner": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory_mutations.py", + "sha256": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "bytes": 18930 + } + }, + "baseline": { + "test": "entire suite", + "log": "baseline.log", + "metrics": "baseline.json", + "timeout_seconds": 60, + "returncode": 0, + "tests_run": 14, + "successful": true, + "failures": 0, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 14, + "designated_body_calls": 0, + "body_failures": 0, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [], + "passed": true + }, + "mutations": [ + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "exclude-node-modules.log", + "metrics": "exclude-node-modules.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "exclude-node-modules", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "f560150342ce90b929af82d91915fb234795c0483f6125f72f2042a0f7f6e495", + "replacement": { + "old": "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "new": "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):" + }, + "detected_by_assertion": true + }, + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "disable-redaction.log", + "metrics": "disable-redaction.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "disable-redaction", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "96de2ee56ba150d36ef0e4e733ff7d99add85cfeaf831ad29eed105601e22740", + "replacement": { + "old": "def _redact(value):\n", + "new": "def _redact(value):\n return value\n" + }, + "detected_by_assertion": true + }, + { + "test": "test_status_does_not_execute_configured_clean_filter", + "log": "execute-clean-filter.log", + "metrics": "execute-clean-filter.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "execute-clean-filter", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "cda6093a4baf09a1e2b5ba20123396fdc0cea9a38422c8ea61b6f429b56e93a4", + "replacement": { + "old": "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + "new": "settings += []" + }, + "detected_by_assertion": true + }, + { + "test": "test_broken_marker_and_external_directory_boundary_are_not_silent", + "log": "false-complete.log", + "metrics": "false-complete.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "false-complete", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "716375e9f7099967219e48708beb7e1572b63e3915b5aee55c6b2b1e4347dd3a", + "replacement": { + "old": "complete=not reader.errors", + "new": "complete=True" + }, + "detected_by_assertion": true + }, + { + "test": "test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "log": "ambiguous-filter-key.log", + "metrics": "ambiguous-filter-key.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "ambiguous-filter-key", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "d7a4d5157bd9429eedd59f346a6664459120653921e2886e9b01daf7341c8e4b", + "replacement": { + "old": "key, _, value = setting.rpartition('=')", + "new": "key, _, value = setting.partition('=')" + }, + "detected_by_assertion": true + }, + { + "test": "test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "log": "unvalidated-metadata.log", + "metrics": "unvalidated-metadata.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "unvalidated-metadata", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "2c6177f5f94e62b129a4f3fbd06049f618498df2693e1e50cbb1fc8bbf8d9a13", + "replacement": { + "old": "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + "new": "exact = True" + }, + "detected_by_assertion": true + }, + { + "test": "test_remote_redaction_preserves_all_filesystem_identity_fields", + "log": "redact-path-identities.log", + "metrics": "redact-path-identities.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "redact-path-identities", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "5862cb449eba24b181b30e0a2f0fc02f57e3fd63547f5ee85864d6652f96cf56", + "replacement": { + "old": " return report\n", + "new": " return _redact(report)\n" + }, + "detected_by_assertion": true + } + ], + "errors": [], + "complete": true, + "all_detected": true, + "finished_at": "2026-10-29T20:37:15.987887+00:00" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.json new file mode 100644 index 000000000..2ad6b3af1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_completed_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.log new file mode 100644 index 000000000..d4db29bd0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/collector-mutations-optimized/unvalidated-metadata.log @@ -0,0 +1,13 @@ +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... FAIL + +====================================================================== +FAIL: test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true + +---------------------------------------------------------------------- +Ran 1 test in 0.154s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls.py.txt b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls.py.txt new file mode 100644 index 000000000..d745e4145 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls.py.txt @@ -0,0 +1,68 @@ +"""Three finite mutations of the companion guards, separate from its seven source mutants.""" +import hashlib +import json +import os +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile + +os.umask(0o077) +root = Path(sys.argv[1]).resolve() +output = Path(sys.argv[2]).resolve() +output.mkdir(mode=0o700) +runner = 'tools/workspace_git_inventory_mutations.py' +original = (root / runner).read_text() +cases = [ + ('population', [" baseline.get('population_valid') is True and\n", + " row.get('population_valid') is True and\n"], + 'test_loader_cannot_replace_population_with_duplicate_method'), + ('escaping-assertion', [" and issue['escaping_assertion']"], + 'test_callback_without_escaping_assertion_cannot_kill'), + ('subtests', [" baseline.get('subtests') == 0 and\n", + " row.get('subtests') == 0 and\n"], + 'test_native_and_foreign_subtest_reports_are_unsupported'), + ('pristine-class', [], 'test_loader_cannot_rebind_pristine_class_identity'), + ('pristine-method', [], 'test_loader_cannot_alias_expected_methods_to_one_body'), +] +rows = [] +with tempfile.TemporaryDirectory(prefix='inventory-guard-mutations-') as temporary: + for name, removals, selected in cases: + fixture = Path(temporary) / name + for rel in [runner, 'tools/workspace_git_inventory.py', 'tests/test_workspace_git_inventory.py', + 'tests/test_workspace_git_inventory_mutations.py']: + destination = fixture / rel + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(root / rel, destination) + text = original + for target in removals: + if text.count(target) != 1: + raise RuntimeError('Nonunique guard mutation: ' + name) + text = text.replace(target, '') + if name == 'pristine-class': + if text.count('records = {}') != 1: + raise RuntimeError('Nonunique class-capture mutation') + text = text.replace('records = {}', 'inventory_class = module.InventoryTests\nrecords = {}') + if name == 'pristine-method': + target = 'return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName]' + if text.count(target) != 1: + raise RuntimeError('Nonunique method-capture mutation') + text = text.replace(target, 'return True') + (fixture / runner).write_text(text) + (output / (name + '-runner.py')).write_text(text) + command = [sys.executable, '-S', '-B', '-m', 'unittest', 'discover', '-s', str(fixture / 'tests'), + '-p', 'test_workspace_git_inventory_mutations.py', '-k', selected, '-v'] + trial = subprocess.run(command, cwd=fixture, capture_output=True, timeout=180) + raw = trial.stdout + trial.stderr + (output / (name + '.log')).write_bytes(raw) + detected = trial.returncode == 1 and b'FAILED (failures=1)' in raw + rows.append({'guard': name, 'test': selected, 'returncode': trial.returncode, + 'detected_by_assertion': detected, 'removed': removals, + 'mutant_sha256': hashlib.sha256(text.encode()).hexdigest()}) +report = {'sources': {str(root / rel): hashlib.sha256((root / rel).read_bytes()).hexdigest() + for rel in [runner, 'tests/test_workspace_git_inventory_mutations.py']}, + 'guards': rows, 'all_detected': len(rows) == 5 and all(r['detected_by_assertion'] for r in rows)} +(output / 'results.json').write_text(json.dumps(report, indent=2) + '\n') +print(json.dumps({'guard_mutations': len(rows), 'all_detected': report['all_detected']})) +raise SystemExit(0 if report['all_detected'] else 1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion-runner.py b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion-runner.py new file mode 100644 index 000000000..e06759ee1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion-runner.py @@ -0,0 +1,344 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName] + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('population_valid') is True and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('subtests') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('population_valid') is True and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('subtests') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion.log new file mode 100644 index 000000000..5cee0d4a5 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/escaping-assertion.log @@ -0,0 +1,18 @@ +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... FAIL + +====================================================================== +FAIL: test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/inventory-guard-mutations-1jn0wbvv/escaping-assertion/tests/test_workspace_git_inventory_mutations.py", line 164, in test_callback_without_escaping_assertion_cannot_kill + report = self.callback_control( + ^^^^^^^^^^^^^^^^^^^^^^ + File "/tmp/inventory-guard-mutations-1jn0wbvv/escaping-assertion/tests/test_workspace_git_inventory_mutations.py", line 155, in callback_control + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) +AssertionError: 0 != 1 : {"output": "/tmp/tmpkipnmst0/evidence", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} + + +---------------------------------------------------------------------- +Ran 1 test in 7.753s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population-runner.py b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population-runner.py new file mode 100644 index 000000000..3417a4bc3 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population-runner.py @@ -0,0 +1,342 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName] + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] and issue['escaping_assertion'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('subtests') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('subtests') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population.log new file mode 100644 index 000000000..6a24cf339 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/population.log @@ -0,0 +1,18 @@ +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... FAIL + +====================================================================== +FAIL: test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/inventory-guard-mutations-1jn0wbvv/population/tests/test_workspace_git_inventory_mutations.py", line 200, in test_loader_cannot_replace_population_with_duplicate_method + baseline = self.reject_population( + ^^^^^^^^^^^^^^^^^^^^^^^ + File "/tmp/inventory-guard-mutations-1jn0wbvv/population/tests/test_workspace_git_inventory_mutations.py", line 136, in reject_population + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) +AssertionError: 0 != 1 : {"output": "/tmp/tmpa45w2o16/evidence", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} + + +---------------------------------------------------------------------- +Ran 1 test in 4.045s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class-runner.py b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class-runner.py new file mode 100644 index 000000000..ab5a02fdb --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class-runner.py @@ -0,0 +1,345 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +inventory_class = module.InventoryTests +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName] + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] and issue['escaping_assertion'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('population_valid') is True and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('subtests') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('population_valid') is True and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('subtests') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class.log new file mode 100644 index 000000000..173c8daf0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-class.log @@ -0,0 +1,17 @@ +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... FAIL + +====================================================================== +FAIL: test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/inventory-guard-mutations-1jn0wbvv/pristine-class/tests/test_workspace_git_inventory_mutations.py", line 215, in test_loader_cannot_rebind_pristine_class_identity + self.reject_population( + File "/tmp/inventory-guard-mutations-1jn0wbvv/pristine-class/tests/test_workspace_git_inventory_mutations.py", line 136, in reject_population + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) +AssertionError: 0 != 1 : {"output": "/tmp/tmpv5zjin6r/evidence", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} + + +---------------------------------------------------------------------- +Ran 1 test in 9.461s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method-runner.py b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method-runner.py new file mode 100644 index 000000000..c358cd847 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method-runner.py @@ -0,0 +1,344 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return True + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] and issue['escaping_assertion'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('population_valid') is True and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('subtests') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('population_valid') is True and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('subtests') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method.log new file mode 100644 index 000000000..8a19b4666 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/pristine-method.log @@ -0,0 +1,17 @@ +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... FAIL + +====================================================================== +FAIL: test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/inventory-guard-mutations-1jn0wbvv/pristine-method/tests/test_workspace_git_inventory_mutations.py", line 224, in test_loader_cannot_alias_expected_methods_to_one_body + self.reject_population( + File "/tmp/inventory-guard-mutations-1jn0wbvv/pristine-method/tests/test_workspace_git_inventory_mutations.py", line 136, in reject_population + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) +AssertionError: 0 != 1 : {"output": "/tmp/tmpuninrczo/evidence", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} + + +---------------------------------------------------------------------- +Ran 1 test in 4.146s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/results.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/results.json new file mode 100644 index 000000000..e1b32ce39 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/results.json @@ -0,0 +1,57 @@ +{ + "sources": { + "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory_mutations.py": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory_mutations.py": "4273fe5b946232f07751864a82e8773974c75663538744dcea79788d4923bebd" + }, + "guards": [ + { + "guard": "population", + "test": "test_loader_cannot_replace_population_with_duplicate_method", + "returncode": 1, + "detected_by_assertion": true, + "removed": [ + " baseline.get('population_valid') is True and\n", + " row.get('population_valid') is True and\n" + ], + "mutant_sha256": "b6e4188590e2b93de1dd3cecfc37d974ce2472a283bcae4a86c62fc610e12172" + }, + { + "guard": "escaping-assertion", + "test": "test_callback_without_escaping_assertion_cannot_kill", + "returncode": 1, + "detected_by_assertion": true, + "removed": [ + " and issue['escaping_assertion']" + ], + "mutant_sha256": "fe4551c2d0322780fbee3807123b4938ce0752ec9d701ccce3e4dd9211d5d11a" + }, + { + "guard": "subtests", + "test": "test_native_and_foreign_subtest_reports_are_unsupported", + "returncode": 1, + "detected_by_assertion": true, + "removed": [ + " baseline.get('subtests') == 0 and\n", + " row.get('subtests') == 0 and\n" + ], + "mutant_sha256": "8ba594c75c20e4747bcb1eced7e7c95b087e57ad44055222a3f9a496756cc053" + }, + { + "guard": "pristine-class", + "test": "test_loader_cannot_rebind_pristine_class_identity", + "returncode": 1, + "detected_by_assertion": true, + "removed": [], + "mutant_sha256": "9dcf793b1b39a8269047f56825ce35af3bb56f4c64f6d0efb26ca9430cee38f6" + }, + { + "guard": "pristine-method", + "test": "test_loader_cannot_alias_expected_methods_to_one_body", + "returncode": 1, + "detected_by_assertion": true, + "removed": [], + "mutant_sha256": "50ddc5dd12ac142c5ea7e89a367272280db8c7d3701f424441735fe52dc36019" + } + ], + "all_detected": true +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests-runner.py b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests-runner.py new file mode 100644 index 000000000..f8d593282 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests-runner.py @@ -0,0 +1,342 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName] + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] and issue['escaping_assertion'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('population_valid') is True and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('population_valid') is True and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests.log new file mode 100644 index 000000000..f73c48b2a --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/guard-controls/subtests.log @@ -0,0 +1,15 @@ +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... FAIL + +====================================================================== +FAIL: test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/inventory-guard-mutations-1jn0wbvv/subtests/tests/test_workspace_git_inventory_mutations.py", line 194, in test_native_and_foreign_subtest_reports_are_unsupported + self.assertEqual(result.returncode, 1, result.stdout + result.stderr) +AssertionError: 0 != 1 : {"output": "/tmp/tmpm1_17t9g/passing-baseline-subtests", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} + + +---------------------------------------------------------------------- +Ran 1 test in 24.579s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.json new file mode 100644 index 000000000..5daecb5e7 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_started_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "body_completed_tests": ["census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.log new file mode 100644 index 000000000..b1e79e248 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/ambiguous-filter-key.log @@ -0,0 +1,13 @@ +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... FAIL + +====================================================================== +FAIL: test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true : [{'kind': 'unsafe_configuration', 'path': '/tmp/tmpkmliwzr8/workspace/parent', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpkmliwzr8/workspace/parent/.git/modules/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpkmliwzr8/workspace/parent/module', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}, {'kind': 'unsafe_configuration', 'path': '/tmp/tmpkmliwzr8/workspace/source', 'operation': 'status', 'message': 'Configuration suppression could not be verified; status refused'}] + +---------------------------------------------------------------------- +Ran 1 test in 0.390s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.json new file mode 100644 index 000000000..6772ea4ba --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.json @@ -0,0 +1 @@ +{"tests_run": 14, "successful": true, "failures": 0, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 14, "designated_body_calls": 0, "body_failures": 0, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": []} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.log new file mode 100644 index 000000000..207570eb4 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/baseline.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (census_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 6.144s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.json new file mode 100644 index 000000000..6cc4b162f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.log new file mode 100644 index 000000000..682f9a227 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/disable-redaction.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: 'password' unexpectedly found in '{"schema_version": 1, "started_at": "2026-10-29T20:48:52.174367+00:00", "root": "/tmp/tmppvi_y9c1/workspace", "purpose": "Observed Git census only; not a clean-state or mathematical certification", "non_atomic_observations": true, "complete": true, "errors": [], "policy": {"walk_exclusions": ["Validated exact Git metadata internals only; node_modules is searched"], "symlinks": "Follow internal directory targets once by device/inode; record all links; external directory targets are uncovered/incomplete", "paths": "NUL Git records; filesystem surrogateescape; JSON ensure_ascii=true", "read_only": "Optional locks, hooks, filters, maintenance and lazy network fetch disabled; no Git mutation commands", "status": "porcelain v1 -z --untracked-files=all; Git ignore rules still apply", "url_redaction": "Remote URLs and diagnostic values only; filesystem identities preserved"}, "limits": {"git_timeout_seconds": 10, "total_timeout_seconds": 1800, "max_command_bytes": 33554432}, "stores": [{"path": "/tmp/tmppvi_y9c1/workspace/primary/.git", "representative": "/tmp/tmppvi_y9c1/workspace/linked\\nworktree", "refs": [{"name": "refs/heads/linked-branch", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/master", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/other", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/stash", "object": "54a9dd2c0c6ada071014372a8bfb3cc45942790c", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/tags/annotated", "object": "923c4eac0eccddea7e4c944c2afcadf07308bec0", "type": "tag", "peeled_object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "peeled_type": "commit", "symbolic_target": ""}, {"name": "refs/tags/v1", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmppvi_y9c1/workspace/primary", "HEAD": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master"}, {"worktree": "/tmp/tmppvi_y9c1/workspace/linked\\nworktree", "HEAD": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/linked-branch"}], "stashes": [{"object": "54a9dd2c0c6ada071014372a8bfb3cc45942790c", "selector": "stash@{0}"}]}, {"path": "/tmp/tmppvi_y9c1/workspace/primary/nested/.git", "representative": "/tmp/tmppvi_y9c1/workspace/primary/nested", "refs": [{"name": "refs/heads/master", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmppvi_y9c1/workspace/primary/nested", "HEAD": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master"}], "stashes": []}, {"path": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package/.git", "representative": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package", "refs": [{"name": "refs/heads/master", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package", "HEAD": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master"}], "stashes": []}], "worktrees": [{"path": "/tmp/tmppvi_y9c1/workspace/linked\\nworktree", "common_store": "/tmp/tmppvi_y9c1/workspace/primary/.git", "observed_at": "2026-10-29T20:48:52.237472+00:00", "exists": true, "head": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/linked-branch", "status": [], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmppvi_y9c1/workspace/primary/.git/worktrees/linked-worktree", "detached": false, "unborn": false, "local_refs": [{"name": "refs/worktree/census", "object": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}]}, {"path": "/tmp/tmppvi_y9c1/workspace/primary", "common_store": "/tmp/tmppvi_y9c1/workspace/primary/.git", "observed_at": "2026-10-29T20:48:52.256869+00:00", "exists": true, "head": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master", "status": [{"xy": " M", "path": "tracked"}, {"xy": "??", "path": "nested/"}, {"xy": "??", "path": "node_modules/package/"}, {"xy": "??", "path": "untracked\\nname\\tand spaces"}], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmppvi_y9c1/workspace/primary/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmppvi_y9c1/workspace/primary/nested", "common_store": "/tmp/tmppvi_y9c1/workspace/primary/nested/.git", "observed_at": "2026-10-29T20:48:52.272555+00:00", "exists": true, "head": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmppvi_y9c1/workspace/primary/nested/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package", "common_store": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package/.git", "observed_at": "2026-10-29T20:48:52.289913+00:00", "exists": true, "head": "938af31411b5d343309e88ddcc7d51975bcd5ae4", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package/.git", "detached": false, "unborn": false, "local_refs": []}], "discovered_roots": ["/tmp/tmppvi_y9c1/workspace/linked\\nworktree", "/tmp/tmppvi_y9c1/workspace/primary", "/tmp/tmppvi_y9c1/workspace/primary/nested", "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package"], "symlinks": [], "git_metadata_not_traversed": ["/tmp/tmppvi_y9c1/workspace/primary/.git", "/tmp/tmppvi_y9c1/workspace/primary/nested/.git", "/tmp/tmppvi_y9c1/workspace/primary/node_modules/package/.git"], "directories_visited": 6, "empty_discovery": false, "finished_at": "2026-10-29T20:48:52.302919+00:00", "git_commands": 73}' + +---------------------------------------------------------------------- +Ran 1 test in 0.204s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.json new file mode 100644 index 000000000..6cc4b162f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_started_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "body_completed_tests": ["census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.log new file mode 100644 index 000000000..78bad6ecd --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/exclude-node-modules.log @@ -0,0 +1,13 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmp1d1l36jg/workspace/primary/node_modules/package' not found in {'/tmp/tmp1d1l36jg/workspace/linked\nworktree': {'path': '/tmp/tmp1d1l36jg/workspace/linked\nworktree', 'common_store': '/tmp/tmp1d1l36jg/workspace/primary/.git', 'observed_at': '2026-10-29T20:48:51.717960+00:00', 'exists': True, 'head': '7b8da82bdef0506ea7e057d941de5dcb1f3b1f0e', 'branch': 'refs/heads/linked-branch', 'status': [], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmp1d1l36jg/workspace/primary/.git/worktrees/linked-worktree', 'detached': False, 'unborn': False, 'local_refs': [{'name': 'refs/worktree/census', 'object': '7b8da82bdef0506ea7e057d941de5dcb1f3b1f0e', 'type': 'commit', 'peeled_object': '', 'peeled_type': '', 'symbolic_target': ''}]}, '/tmp/tmp1d1l36jg/workspace/primary': {'path': '/tmp/tmp1d1l36jg/workspace/primary', 'common_store': '/tmp/tmp1d1l36jg/workspace/primary/.git', 'observed_at': '2026-10-29T20:48:51.744310+00:00', 'exists': True, 'head': '7b8da82bdef0506ea7e057d941de5dcb1f3b1f0e', 'branch': 'refs/heads/master', 'status': [{'xy': ' M', 'path': 'tracked'}, {'xy': '??', 'path': 'nested/'}, {'xy': '??', 'path': 'node_modules/package/'}, {'xy': '??', 'path': 'untracked\nname\tand spaces'}], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmp1d1l36jg/workspace/primary/.git', 'detached': False, 'unborn': False, 'local_refs': []}, '/tmp/tmp1d1l36jg/workspace/primary/nested': {'path': '/tmp/tmp1d1l36jg/workspace/primary/nested', 'common_store': '/tmp/tmp1d1l36jg/workspace/primary/nested/.git', 'observed_at': '2026-10-29T20:48:51.762691+00:00', 'exists': True, 'head': '7b8da82bdef0506ea7e057d941de5dcb1f3b1f0e', 'branch': 'refs/heads/master', 'status': [], 'submodules': [], 'remotes': [], 'bare': False, 'git_dir': '/tmp/tmp1d1l36jg/workspace/primary/nested/.git', 'detached': False, 'unborn': False, 'local_refs': []}} + +---------------------------------------------------------------------- +Ran 1 test in 0.195s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.json new file mode 100644 index 000000000..a365d3bce --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_started_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "body_completed_tests": ["census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.log new file mode 100644 index 000000000..311ad3921 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/execute-clean-filter.log @@ -0,0 +1,13 @@ +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... FAIL + +====================================================================== +FAIL: test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.128s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.json new file mode 100644 index 000000000..fe6e28fe0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_started_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "body_completed_tests": ["census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.log new file mode 100644 index 000000000..c5112ac5c --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/false-complete.log @@ -0,0 +1,13 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... FAIL + +====================================================================== +FAIL: test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.056s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.json new file mode 100644 index 000000000..f67683714 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_started_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "body_completed_tests": ["census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.log new file mode 100644 index 000000000..1d17fc87c --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/redact-path-identities.log @@ -0,0 +1,18 @@ +test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... FAIL + +====================================================================== +FAIL: test_remote_redaction_preserves_all_filesystem_identity_fields (census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: '/tmp/tmp5pq8iti5/workspace/root?token=[REDACTED]' != '/tmp/tmp5pq8iti5/workspace/root?token=root-value' +- /tmp/tmp5pq8iti5/workspace/root?token=[REDACTED] +? ^^^^^^^^^^ ++ /tmp/tmp5pq8iti5/workspace/root?token=root-value +? ^^^^^^^^^^ + + +---------------------------------------------------------------------- +Ran 1 test in 0.119s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/results.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/results.json new file mode 100644 index 000000000..a8e01b616 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/results.json @@ -0,0 +1,535 @@ +{ + "schema_version": 1, + "purpose": "Git census self-tests only; no mathematical certification or Git cleanliness claim", + "started_at": "2026-10-29T20:48:44.885973+00:00", + "python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]", + "python_executable": "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "sources": { + "collector": { + "path": "/workspace/cbz-20261029/git-parent-frozen-qualification/source/tools/workspace_git_inventory.py", + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "bytes": 27119 + }, + "tests": { + "path": "/workspace/cbz-20261029/git-parent-frozen-qualification/source/tests/test_workspace_git_inventory.py", + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "bytes": 17972 + }, + "runner": { + "path": "/workspace/cbz-20261029/git-parent-frozen-qualification/source/tools/workspace_git_inventory_mutations.py", + "sha256": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "bytes": 18930 + } + }, + "baseline": { + "test": "entire suite", + "log": "baseline.log", + "metrics": "baseline.json", + "timeout_seconds": 60, + "returncode": 0, + "tests_run": 14, + "successful": true, + "failures": 0, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 14, + "designated_body_calls": 0, + "body_failures": 0, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete", + "census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child", + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "census_tests.InventoryTests.test_hanging_git_is_killed_and_reported", + "census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion", + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit", + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle", + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink", + "census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [], + "passed": true + }, + "mutations": [ + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "exclude-node-modules.log", + "metrics": "exclude-node-modules.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "exclude-node-modules", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "f560150342ce90b929af82d91915fb234795c0483f6125f72f2042a0f7f6e495", + "replacement": { + "old": "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "new": "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):" + }, + "detected_by_assertion": true + }, + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "disable-redaction.log", + "metrics": "disable-redaction.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "disable-redaction", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "96de2ee56ba150d36ef0e4e733ff7d99add85cfeaf831ad29eed105601e22740", + "replacement": { + "old": "def _redact(value):\n", + "new": "def _redact(value):\n return value\n" + }, + "detected_by_assertion": true + }, + { + "test": "test_status_does_not_execute_configured_clean_filter", + "log": "execute-clean-filter.log", + "metrics": "execute-clean-filter.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "execute-clean-filter", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "cda6093a4baf09a1e2b5ba20123396fdc0cea9a38422c8ea61b6f429b56e93a4", + "replacement": { + "old": "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + "new": "settings += []" + }, + "detected_by_assertion": true + }, + { + "test": "test_broken_marker_and_external_directory_boundary_are_not_silent", + "log": "false-complete.log", + "metrics": "false-complete.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "false-complete", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "716375e9f7099967219e48708beb7e1572b63e3915b5aee55c6b2b1e4347dd3a", + "replacement": { + "old": "complete=not reader.errors", + "new": "complete=True" + }, + "detected_by_assertion": true + }, + { + "test": "test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "log": "ambiguous-filter-key.log", + "metrics": "ambiguous-filter-key.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "ambiguous-filter-key", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "d7a4d5157bd9429eedd59f346a6664459120653921e2886e9b01daf7341c8e4b", + "replacement": { + "old": "key, _, value = setting.rpartition('=')", + "new": "key, _, value = setting.partition('=')" + }, + "detected_by_assertion": true + }, + { + "test": "test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "log": "unvalidated-metadata.log", + "metrics": "unvalidated-metadata.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "unvalidated-metadata", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "2c6177f5f94e62b129a4f3fbd06049f618498df2693e1e50cbb1fc8bbf8d9a13", + "replacement": { + "old": "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + "new": "exact = True" + }, + "detected_by_assertion": true + }, + { + "test": "test_remote_redaction_preserves_all_filesystem_identity_fields", + "log": "redact-path-identities.log", + "metrics": "redact-path-identities.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 1, + "unsupported_bodies": 0, + "body_calls": 1, + "designated_body_calls": 1, + "body_failures": 1, + "subtests": 0, + "fixture_issues": 0, + "expected_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_started_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "body_completed_tests": [ + "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields" + ], + "loaded_population_valid": true, + "execution_population_valid": true, + "population_valid": true, + "issues": [ + { + "test": "census_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields", + "kind": "failure", + "phase": "test_body", + "origin_in_test_body": true, + "escaping_assertion": true, + "designated": true + } + ], + "mutation": "redact-path-identities", + "source_sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "mutant_sha256": "5862cb449eba24b181b30e0a2f0fc02f57e3fd63547f5ee85864d6652f96cf56", + "replacement": { + "old": " return report\n", + "new": " return _redact(report)\n" + }, + "detected_by_assertion": true + } + ], + "errors": [], + "complete": true, + "all_detected": true, + "finished_at": "2026-10-29T20:48:54.548947+00:00" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.json new file mode 100644 index 000000000..2ad6b3af1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.json @@ -0,0 +1 @@ +{"tests_run": 1, "successful": false, "failures": 1, "errors": 0, "skipped": 0, "expected_failures": 0, "unexpected_successes": 0, "optimization": 1, "unsupported_bodies": 0, "body_calls": 1, "designated_body_calls": 1, "body_failures": 1, "subtests": 0, "fixture_issues": 0, "expected_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_started_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "body_completed_tests": ["census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories"], "loaded_population_valid": true, "execution_population_valid": true, "population_valid": true, "issues": [{"test": "census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories", "kind": "failure", "phase": "test_body", "origin_in_test_body": true, "escaping_assertion": true, "designated": true}]} \ No newline at end of file diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.log new file mode 100644 index 000000000..55a433f55 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-collector-mutations-optimized/unvalidated-metadata.log @@ -0,0 +1,13 @@ +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... FAIL + +====================================================================== +FAIL: test_ordinary_head_objects_assets_do_not_hide_nested_repositories (census_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "", line 83, in tracked +AssertionError: False is not true + +---------------------------------------------------------------------- +Ran 1 test in 0.099s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/RESULT.json new file mode 100644 index 000000000..f87a71a9f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/RESULT.json @@ -0,0 +1,118 @@ +{ + "at": "2026-10-29T20:48:54.565431+00:00", + "source_files": { + "tools/workspace_git_inventory.py": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "tools/workspace_git_inventory_mutations.py": "918f434fb793259fc977ced8a3ce972e0ba3cefe4d1007d1d90bcddc1a59ea5f", + "tests/test_workspace_git_inventory.py": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "tests/test_workspace_git_inventory_mutations.py": "4273fe5b946232f07751864a82e8773974c75663538744dcea79788d4923bebd" + }, + "source_unchanged": true, + "immutable_copy": true, + "runs": [ + { + "label": "loader_cannot", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "loader_cannot", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 13.428256158000295, + "log": "loader_cannot.log", + "log_sha256": "479f3d650fe2eef73d796dfd0a5641565471efa5f038c5049a028b91fcf0d74e" + }, + { + "label": "callback_without_escaping", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "callback_without_escaping", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 5.857167567999568, + "log": "callback_without_escaping.log", + "log_sha256": "fd845413b7905e12d5a8a2aaf4e6cf50117ad3459b5220d3227919a2b6447eec" + }, + { + "label": "native_and_foreign_subtest", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "native_and_foreign_subtest", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 18.911358352997922, + "log": "native_and_foreign_subtest.log", + "log_sha256": "1624d7d13da9ca24872dede0cfbc669ebea3649d7f4a4e1753052615cc192772" + }, + { + "label": "setup_assertion", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "setup_assertion", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 6.640693811001256, + "log": "setup_assertion.log", + "log_sha256": "9b2e3fe0a11c875b9095bbd32565a2294869d053c3bd3b25b1e5771facf412aa" + }, + { + "label": "mutations-optimized", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-O", + "tools/workspace_git_inventory_mutations.py", + "--output", + "/workspace/cbz-20261029/git-parent-targeted-qualification/mutations-optimized" + ], + "exit_observed": 0, + "elapsed_seconds": 9.862137694999547, + "log": "mutations-optimized.log", + "log_sha256": "c2d1786af8d334094b3483e2a3598d868c7f4009820593b0eaf7ada2d59f2478" + } + ], + "scope": "targeted parent verification only; author aggregate31x4 modes remains separately attributed; no finalG0/G5/G10/CBZ claim" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping-RESULT.json new file mode 100644 index 000000000..edb4f9b82 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping-RESULT.json @@ -0,0 +1,22 @@ +{ + "label": "callback_without_escaping", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "callback_without_escaping", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 5.857167567999568, + "log": "callback_without_escaping.log", + "log_sha256": "fd845413b7905e12d5a8a2aaf4e6cf50117ad3459b5220d3227919a2b6447eec" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping.log new file mode 100644 index 000000000..ae0eee741 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/callback_without_escaping.log @@ -0,0 +1,6 @@ +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... ok + +---------------------------------------------------------------------- +Ran 1 test in 5.779s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot-RESULT.json new file mode 100644 index 000000000..6e769637f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot-RESULT.json @@ -0,0 +1,22 @@ +{ + "label": "loader_cannot", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "loader_cannot", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 13.428256158000295, + "log": "loader_cannot.log", + "log_sha256": "479f3d650fe2eef73d796dfd0a5641565471efa5f038c5049a028b91fcf0d74e" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot.log new file mode 100644 index 000000000..91314bdea --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/loader_cannot.log @@ -0,0 +1,9 @@ +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... ok +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... ok +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... ok +test_loader_cannot_substitute_unexpected_class (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_substitute_unexpected_class) ... ok + +---------------------------------------------------------------------- +Ran 4 tests in 13.339s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized-RESULT.json new file mode 100644 index 000000000..ed16bd669 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized-RESULT.json @@ -0,0 +1,16 @@ +{ + "label": "mutations-optimized", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-O", + "tools/workspace_git_inventory_mutations.py", + "--output", + "/workspace/cbz-20261029/git-parent-targeted-qualification/mutations-optimized" + ], + "exit_observed": 0, + "elapsed_seconds": 9.862137694999547, + "log": "mutations-optimized.log", + "log_sha256": "c2d1786af8d334094b3483e2a3598d868c7f4009820593b0eaf7ada2d59f2478" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized.log new file mode 100644 index 000000000..47a43d518 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/mutations-optimized.log @@ -0,0 +1 @@ +{"output": "/workspace/cbz-20261029/git-parent-targeted-qualification/mutations-optimized", "baseline_passed": true, "mutations": 7, "all_detected": true, "complete": true} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest-RESULT.json new file mode 100644 index 000000000..4aa54fe72 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest-RESULT.json @@ -0,0 +1,22 @@ +{ + "label": "native_and_foreign_subtest", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "native_and_foreign_subtest", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 18.911358352997922, + "log": "native_and_foreign_subtest.log", + "log_sha256": "1624d7d13da9ca24872dede0cfbc669ebea3649d7f4a4e1753052615cc192772" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest.log new file mode 100644 index 000000000..7df7285e3 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/native_and_foreign_subtest.log @@ -0,0 +1,6 @@ +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... ok + +---------------------------------------------------------------------- +Ran 1 test in 18.802s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion-RESULT.json new file mode 100644 index 000000000..798635885 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion-RESULT.json @@ -0,0 +1,22 @@ +{ + "label": "setup_assertion", + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-S", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_workspace_git_inventory_mutations.py", + "-k", + "setup_assertion", + "-v" + ], + "exit_observed": 0, + "elapsed_seconds": 6.640693811001256, + "log": "setup_assertion.log", + "log_sha256": "9b2e3fe0a11c875b9095bbd32565a2294869d053c3bd3b25b1e5771facf412aa" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion.log new file mode 100644 index 000000000..470d6f398 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/parent-targeted/setup_assertion.log @@ -0,0 +1,6 @@ +test_setup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_setup_assertion_cannot_count_as_mutation_detection) ... ok + +---------------------------------------------------------------------- +Ran 1 test in 6.548s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-normal.log new file mode 100644 index 000000000..d82f4b6e4 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-normal.log @@ -0,0 +1,36 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... ok +test_child_optimization_matches_companion (test_workspace_git_inventory_mutations.MutationRunnerTests.test_child_optimization_matches_companion) ... ok +test_cleanup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_cleanup_assertion_cannot_count_as_mutation_detection) ... ok +test_deferred_test_bodies_cannot_pass_baseline (test_workspace_git_inventory_mutations.MutationRunnerTests.test_deferred_test_bodies_cannot_pass_baseline) ... ok +test_failed_baseline_never_runs_mutations (test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_loaded_population_must_actually_execute_each_expected_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loaded_population_must_actually_execute_each_expected_body) ... ok +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... ok +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... ok +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... ok +test_loader_cannot_substitute_unexpected_class (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_substitute_unexpected_class) ... ok +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... ok +test_requires_new_output_and_keeps_private_success_evidence (test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_setup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_setup_assertion_cannot_count_as_mutation_detection) ... ok +test_surviving_mutant_is_failure (test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_teardown_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_teardown_assertion_cannot_count_as_mutation_detection) ... ok +test_test_error_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok +test_zero_test_baseline_cannot_report_success (test_workspace_git_inventory_mutations.MutationRunnerTests.test_zero_test_baseline_cannot_report_success) ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 150.156s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-optimized.log new file mode 100644 index 000000000..91bcae77f --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python311-optimized.log @@ -0,0 +1,36 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... ok +test_child_optimization_matches_companion (test_workspace_git_inventory_mutations.MutationRunnerTests.test_child_optimization_matches_companion) ... ok +test_cleanup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_cleanup_assertion_cannot_count_as_mutation_detection) ... ok +test_deferred_test_bodies_cannot_pass_baseline (test_workspace_git_inventory_mutations.MutationRunnerTests.test_deferred_test_bodies_cannot_pass_baseline) ... ok +test_failed_baseline_never_runs_mutations (test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_loaded_population_must_actually_execute_each_expected_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loaded_population_must_actually_execute_each_expected_body) ... ok +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... ok +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... ok +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... ok +test_loader_cannot_substitute_unexpected_class (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_substitute_unexpected_class) ... ok +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... ok +test_requires_new_output_and_keeps_private_success_evidence (test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_setup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_setup_assertion_cannot_count_as_mutation_detection) ... ok +test_surviving_mutant_is_failure (test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_teardown_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_teardown_assertion_cannot_count_as_mutation_detection) ... ok +test_test_error_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok +test_zero_test_baseline_cannot_report_success (test_workspace_git_inventory_mutations.MutationRunnerTests.test_zero_test_baseline_cannot_report_success) ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 165.250s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-normal.log new file mode 100644 index 000000000..f075b799b --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-normal.log @@ -0,0 +1,36 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... ok +test_child_optimization_matches_companion (test_workspace_git_inventory_mutations.MutationRunnerTests.test_child_optimization_matches_companion) ... ok +test_cleanup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_cleanup_assertion_cannot_count_as_mutation_detection) ... ok +test_deferred_test_bodies_cannot_pass_baseline (test_workspace_git_inventory_mutations.MutationRunnerTests.test_deferred_test_bodies_cannot_pass_baseline) ... ok +test_failed_baseline_never_runs_mutations (test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_loaded_population_must_actually_execute_each_expected_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loaded_population_must_actually_execute_each_expected_body) ... ok +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... ok +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... ok +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... ok +test_loader_cannot_substitute_unexpected_class (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_substitute_unexpected_class) ... ok +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... ok +test_requires_new_output_and_keeps_private_success_evidence (test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_setup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_setup_assertion_cannot_count_as_mutation_detection) ... ok +test_surviving_mutant_is_failure (test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_teardown_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_teardown_assertion_cannot_count_as_mutation_detection) ... ok +test_test_error_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok +test_zero_test_baseline_cannot_report_success (test_workspace_git_inventory_mutations.MutationRunnerTests.test_zero_test_baseline_cannot_report_success) ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 147.238s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-optimized.log new file mode 100644 index 000000000..cb5c810c8 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/final/qualified-python312-optimized.log @@ -0,0 +1,36 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_callback_without_escaping_assertion_cannot_kill (test_workspace_git_inventory_mutations.MutationRunnerTests.test_callback_without_escaping_assertion_cannot_kill) ... ok +test_child_optimization_matches_companion (test_workspace_git_inventory_mutations.MutationRunnerTests.test_child_optimization_matches_companion) ... ok +test_cleanup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_cleanup_assertion_cannot_count_as_mutation_detection) ... ok +test_deferred_test_bodies_cannot_pass_baseline (test_workspace_git_inventory_mutations.MutationRunnerTests.test_deferred_test_bodies_cannot_pass_baseline) ... ok +test_failed_baseline_never_runs_mutations (test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_loaded_population_must_actually_execute_each_expected_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loaded_population_must_actually_execute_each_expected_body) ... ok +test_loader_cannot_alias_expected_methods_to_one_body (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_alias_expected_methods_to_one_body) ... ok +test_loader_cannot_rebind_pristine_class_identity (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_rebind_pristine_class_identity) ... ok +test_loader_cannot_replace_population_with_duplicate_method (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_replace_population_with_duplicate_method) ... ok +test_loader_cannot_substitute_unexpected_class (test_workspace_git_inventory_mutations.MutationRunnerTests.test_loader_cannot_substitute_unexpected_class) ... ok +test_native_and_foreign_subtest_reports_are_unsupported (test_workspace_git_inventory_mutations.MutationRunnerTests.test_native_and_foreign_subtest_reports_are_unsupported) ... ok +test_requires_new_output_and_keeps_private_success_evidence (test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_setup_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_setup_assertion_cannot_count_as_mutation_detection) ... ok +test_surviving_mutant_is_failure (test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_teardown_assertion_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_teardown_assertion_cannot_count_as_mutation_detection) ... ok +test_test_error_cannot_count_as_mutation_detection (test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok +test_zero_test_baseline_cannot_report_success (test_workspace_git_inventory_mutations.MutationRunnerTests.test_zero_test_baseline_cannot_report_success) ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 167.344s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-RESULT.json new file mode 100644 index 000000000..4d564557b --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-RESULT.json @@ -0,0 +1,36 @@ +{ + "at": "2026-10-29T20:16:21.113380+00:00", + "scope": "owned copied-source baseline population control; production source unchanged", + "control": "load_tests returns fourteen separate instances of one normal existing test, omitting other13 baseline methods; named mutant selection unchanged", + "process_exit_observed": 0, + "baseline": { + "test": "entire suite", + "log": "baseline.log", + "metrics": "baseline.json", + "timeout_seconds": 60, + "returncode": 0, + "tests_run": 14, + "successful": true, + "failures": 0, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "optimization": 0, + "unsupported_bodies": 0, + "body_calls": 14, + "designated_body_calls": 0, + "body_failures": 0, + "fixture_issues": 0, + "issues": [], + "passed": true + }, + "reported_complete": true, + "reported_all_detected": true, + "source_sha256": { + "tools/workspace_git_inventory.py": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "tools/workspace_git_inventory_mutations.py": "639be76921b14ae9843223ea12d255b28bd9a6389ec980f68a78d747f147ae1d", + "tests/test_workspace_git_inventory.py": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844" + }, + "source_unchanged_during_control": true +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-baseline.log new file mode 100644 index 000000000..526641ffb --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/intermediate-population-baseline.log @@ -0,0 +1,19 @@ +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 1.151s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/legacy-atlas-DISPOSITION.md b/docs/reports/cbz-workspace-hygiene-20261029/correction/legacy-atlas-DISPOSITION.md new file mode 100644 index 000000000..de9f1a095 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/legacy-atlas-DISPOSITION.md @@ -0,0 +1,63 @@ +# Legacy Atlas source disposition against public Main c93cec70 + +**#399 is partially superseded, with substantial route/relationship bounds and Reset behavior still absent. #501's published acquisition/coherence delta remains absent in full. Neither PR can be described as entirely present on Main.** This is a source-disposition payload for Root's existing serial queue, not a merge, closure, approval or takeover. + +Actual performer: OpenAI / GPT-6 / Codex, non-author of these two PRs, with prior Atlas/formal/source-diagnostic exposure. Same-family review, organizational-independence credit 0; scientific effect NONE. No scientific correctness, alignment, acceptance or global gate determination is attempted. + +The public native Main ref was read at pickup and again before delivery: `c93cec70223281492709ff74ca84fed5dc6e40e8`, tree `ccb5b5a357fdf1e96dc105eef8bee918cd09f23b`. All comparisons below bind that commit, not the shared worktree's older HEAD or a proposed composition. + +| PR | Exact head | Exact native base | Full inventory | Substantive / release-query-only paths | +|---|---|---|---:|---:| +| #399 | `7c610fe5c1b82ba6541f660a8607ddf94f5b8216` | `f16b947fec8bcada0fed1cbe0d9600a590ee19d7` | 177 | 4 / 173 | +| #501 | `64aa716ce399c240ef8afb6ec79a236c7040abbf` | `0acbc2ffe0f9edbd53cbe9aee466ccbe070b7e36` | 78 | 58 / 20 | + +Native complete changed-file inventories and per-file patches match the exact Git base→head path inventories. [SOURCE-BINDING.json](SOURCE-BINDING.json) records commit/tree/blob/byte/SHA256 identities and file presence. `source/` preserves public before/after/current files; `semantic-patches/` contains only substantive base→head differences. This preserves the reviewed source payload, not a full-history recovery archive. + +Release exclusions are established by executing the unchanged pinned Main release helper's `transform(text, suffix, without_release)` over recognized live URL spans. [RELEASE-NORMALIZATION.json](RELEASE-NORMALIZATION.json) records all 255 path observations and normalized hashes. The 173 and 20 exclusions mean equality of each PR's base/head **after that specific normalization**. They are not raw byte-equality claims and do not mean current Main's complete file bodies equal the old branches. No old release values should be transplanted onto Main. + +## #399: present filters; missing compact route and relation bounds + +All ten literal substantive unified hunks are split into 21 behavior units in [HUNK-DISPOSITIONS.json](HUNK-DISPOSITIONS.json). This avoids calling a mixed hunk wholly delivered. + +| Substantive behavior | Current disposition and evidence | +|---|---| +| Conjunctive classification/kind/layer filters in Graph and List, across search and neighborhood | **PRESENT.** Current `atlas.mjs:96` passes all three filters to both branches. `current-model.mjs:209–214` applies them to the complete candidate set. Current controller tests at `test_current_site.mjs:237–274` cover Graph/List, complete paging/count annotation, Share/reload/history and refused pins. Four focused tests freshly passed. | +| Filter values in Share/history; collapse retaining filters and selection | **PRESENT.** `atlas.mjs:59,104,117`; focused test `:256–269` confirms search, selection, reload and Back/Forward persistence. No old-source identity is inferred. | +| Filter-count wording and route disclosure preservation | **SUPERSEDED in presentation/lifecycle.** Current count wording uses `Active exact metadata filters: kind: candidate` (`atlas.mjs:97`) rather than old `kind=candidate`. Same-node disclosures are restored by ID, with changed/refused-node reset (`atlas.mjs:63,80–83`; existing test `:226`). Preserve this current behavior. | +| Reset clears classification/kind/layer | **ABSENT.** Current `atlas.mjs:104` clears search/offset and calls `shell.reset()`; it does not clear those state fields. `atlas-shell.mjs:79` changes layout mode only. Current filter support therefore does not discharge the old Reset obligation. | +| Additional filter-only/complete-inspector explanation and explicit `No nodes match` announcement | **ABSENT as the added text.** Current `atlas.mjs:97` shows active constraints and zero counts but lacks those added messages. Existing empty/refusal rendering must not be mistaken for the exact old announcement. | +| Scalar-only reach cache; immutable adjacency index; compact BFS/predecessor/depth/prefix cache | **ABSENT.** `atlas.mjs:25` still caches full `downstreamReach` objects. `current-model.mjs:218–249` rescans edges and retains complete reachable-ID/path arrays. Fresh model probe confirms the four new scalar/window APIs are absent. | +| Safe `atlas-route-page` state, Share/reload/history restoration and selection/Collapse/Reset page resets | **ABSENT.** `current-model.mjs:259–266` has no routePage; `atlas.mjs:59–60,104,117` has no route-page machinery. Probe of page333367 returns no routePage field. | +| Exact 150-occurrence route windows, prefix totals, direct middle/last access, continuation and incoming boundary edges | **ABSENT.** `atlas.mjs:80` renders full `requiredDependencyPaths`; no compact route API, pager or segment window is installed. Retention of the old full-output API contract is baseline behavior, not the new compact implementation. | +| 150-row direct-neighbor windows and keyboard page controls | **ABSENT.** Relationship presentation is separately **SUPERSEDED** by current Depends on/Used by cards and disclosures. `atlas-relationships.mjs:7–9,19–32` still maps every matching edge without paging. The newer names/cards do not discharge the missing bound. | +| Six added Node cases and added browser controls | The conjunctive-filter assertion role is **SUPERSEDED** by the current four controller tests. The other five Node additions for route-page/concatenation/chain/fanout/index reuse are **ABSENT**. The browser's new route/relation guards, metadata-filter roundtrip case and 10,000-node/50,000-edge cases are **ABSENT**; `current_site_browser_check.py:601` retains only the preexisting synthetic-large-render-window baseline. Current Node filters do not establish those browser or performance results. | + +Suggested canonical disposition: **PARTIAL_SUPERSESSION_WITH_RETAINED_UNLANDED_OBLIGATIONS**. Preserve the exact four-file old source and historical results; carry forward a precise missing-behavior list. An eventual bounded adoption would reconcile the route/bounds/Reset hunks with current shell, relationship presentation, disclosure/focus/source-refusal behavior. Replacing old complete files would erase later work. This diagnostic does not start that implementation. + +## #501: public H5 is not the private current composition + +All 58 substantive literal hunks are individually listed in the machine payload. Fifty-five are added paths absent from the current tree. The remaining three files—`current-model.mjs`, `test_current_observation_coherence.mjs`, and `current_site_browser_check.py`—equal #501's base under the specified release-query normalization. Their added substantive delta has not landed. + +| Public H5 component | Current disposition and evidence | +|---|---| +| Abortable response-body reading, bounded streaming/cancellation and one caller budget | **ABSENT.** Current `current-model.mjs:66–80` still reads `arrayBuffer()` and has no added `abortable`/`readBytes` protocol. | +| Strict 16KiB metadata, duplicate/escaped-key rejection, admitted metadata schemas, 16MiB identity bound and calendar validation | **ABSENT.** The added `readMetadata` path is not in the current implementation. | +| Two existing integrity attempts followed by one metadata/successor pair, exact digest/bytes verification and observation-time join | **ABSENT.** Current code stops after `current.json` and the page-digest keyed retry. A fresh probe validates H5's frozen old/new fixtures, then demonstrates that an old document receiving the newer valid payload refuses after exactly two requests with no metadata request. This confirms the concrete unlanded behavior without weakening admission. | +| Coherence assertions requiring the metadata/four-request sequence | **ABSENT.** Current tests `test_current_observation_coherence.mjs:30–40` still assert two requests. Current browser `:283–315` does not route or bind metadata and allows one–two requests for persistent refusal. The two case names already exist; #501 changes their assertion bodies. | +| New `test_current_site_transition.mjs`, synthetic old/new/corrupt/metadata/freezes, merge-source guard and guard tests | **ABSENT on Main**, preserved in public H5. These are real delivered source, not proof of current execution or current-profile coverage. | +| Capture-regression/launcher/supervisor, rewrite-observation helper and their fixed child/shadow/ledger fixtures | **ABSENT on Main**, preserved under their exact original paths. Source headers explicitly describe Source-only/NOT_RUN or provisional scope; later native comments report separate bounded synthetic executions. Neither constitutes the future current-profile implementation. | +| Two investigative workflow additions | **ABSENT on Main and historical execution envelopes.** The transition workflow opens `SOURCE-FROZEN R1 DRAFT`, binds a fixed candidate freeze (`:171–188`) and retains pending composition/runtime channels. The rewrite workflow binds that freeze and literal producer/guard hashes (`:37,54–72`). Their candidate freeze names base0ac and three exact production blobs. They are not ready-made current-Main workflows. Preserve their source/history; do not silently reintroduce them as current evidence. | + +The public author record [501/6470313254](https://github.com/d6g8k5htny-coder/main/pull/501#issuecomment-6470313254) explicitly distinguishes private uncommitted tree `b8ade5113e3e83534c6b3aaf25761a6950285e74` on b953, with the two old workflows omitted, from published H5 `64aa716c`. That private composition was unavailable to this review and is **NOT REVIEWED**. Its reported checks, later plan-only review, 11/78 synthetic foundations and 4-control/15-specimen observation are not rebound to Mainc93 or declared one combined run. + +The same public record/PR body leaves current Task1 construction, current-profile collector/schema/controls, V2 consumer/fixtures/recorder, independent supervisor, full169-member browser/transport qualification, current generated/served applicability and spoken-AT evidence outstanding. They are **not delivered in this public head as that current-profile work**. This does not assert whether additional private Source later exists. Do not label all that scope complete from the acquisition fix, similarly named historical supervisor, plan review or CI. + +Suggested canonical disposition: **UNLANDED_ACQUISITION_CORE_WITH_SEPARATE_HISTORICAL_HARNESS_AND_UNDELIVERED_CURRENT_PROFILE_SCOPE**. Preserve H5 and its original evidence. Root can separately decide narrow current-source acquisition/coherence adoption and disposition the old investigative envelopes, retaining exact future-scope obligations rather than converting them into a new review gate. + +## Actual checks, ownership and release + +I read current #684 and PR claim/discussion records before comparison and again read #684 before delivery. No duplicate active source-disposition owner was found. #399's actual integrator release is [6177366070](https://github.com/d6g8k5htny-coder/main/pull/399#issuecomment-6177366070), read back at6177376455; its source-author release6175592018 is separate. No foreign role is released here. #501's private-source boundary remains as its author recorded it. + +Personal execution was limited to source/hash/inventory/normalization checks, **four existing current filter-controller tests (4 PASS, zero failures/skips, exit0)**, and the bounded synthetic model probe (exit0). The first isolated test launch lacked a top-level fixture from an imported test module and exited1 before the selected tests ran; its original log is retained. After copying that exact c93 fixture without altering test source, the four selected tests passed. No full suite, browser, old scale benchmark, CI replay, artifact access or mathematical test was run. + +No worktree/index/source/ref/PR was changed. One expressly permitted public object fetch was needed because501's head was missing locally; it used the existing `/workspace/main` metadata with `--no-write-fetch-head --no-tags --no-recurse-submodules` and disabled automatic maintenance, with no new clone or branch update. All evidence writes are under this task directory. Canonical governance/closure/integration remains Root's B-003 queue. This finite read-only task is complete and only its own scope is released. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-RESULT.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-RESULT.json new file mode 100644 index 000000000..8caf7fe5e --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-RESULT.json @@ -0,0 +1,106 @@ +{ + "at": "2026-10-29T19:54:04.628650+00:00", + "source_head": "60cd4516cd1ad54d778b33b22df289dfe86ee0d8", + "source_hashes": { + "tools/workspace_git_inventory.py": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "tools/workspace_git_inventory_mutations.py": "086e44a9ca848db5b2b987198d30ef9008675b9495ebe75a68a09c5b63eda383", + "tests/test_workspace_git_inventory.py": "cfd1c780d093a0d08c86c2a22a01c1215e0443f222647d20fef9fc57a48511b4" + }, + "scope": "Owned temporary test-suite lifecycle control only; original production collector/runner copied unchanged; original tests retain all assertions. No sourceworkspace mutation.", + "controlled_setup": "For temporary mutant filenames only, raise unittest assertion before selected test body; production baseline filename remains allowed.", + "process_exit_observed": 0, + "baseline_passed": true, + "reported_all_detected": true, + "reported_complete": true, + "mutations": [ + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "exclude-node-modules.log", + "metrics": "exclude-node-modules.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "exclude-node-modules", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "738a7606715fa6d525ef42e08df30c430778f0a3b9fef0e5c164e35675eb6ec7", + "replacement": { + "old": "if entry.name == '.git':", + "new": "if entry.name in ('.git', 'node_modules'):" + }, + "detected_by_assertion": true + }, + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "disable-redaction.log", + "metrics": "disable-redaction.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "disable-redaction", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "ce0e30dda743732a436d0d0ea2de2420741bd67e1d0e0b8e0637b7a99605b431", + "replacement": { + "old": "def _redact(value):\n", + "new": "def _redact(value):\n return value\n" + }, + "detected_by_assertion": true + }, + { + "test": "test_status_does_not_execute_configured_clean_filter", + "log": "execute-clean-filter.log", + "metrics": "execute-clean-filter.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "execute-clean-filter", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "43c4e2f57394deaf470b40681ff797e64f77a1d3f110ab2437cb3bb60efccc0b", + "replacement": { + "old": "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + "new": "settings += []" + }, + "detected_by_assertion": true + }, + { + "test": "test_broken_marker_and_external_directory_boundary_are_not_silent", + "log": "false-complete.log", + "metrics": "false-complete.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "false-complete", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "b9128e53cd5341e3a9d36b4923b1b17aa3b59080378bb64d6c6ff63a8097302b", + "replacement": { + "old": "complete=not reader.errors", + "new": "complete=True" + }, + "detected_by_assertion": true + } + ], + "each_mutation_log_has_control_setup_assertion": true +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-baseline.log new file mode 100644 index 000000000..841448b63 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-baseline.log @@ -0,0 +1,16 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (census_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 1.101s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-disable-redaction.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-disable-redaction.log new file mode 100644 index 000000000..00b1b54b1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-disable-redaction.log @@ -0,0 +1,14 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/cbz-lifecycle-review-m98xiox8/tests/test_workspace_git_inventory.py", line 159, in _controlled_lifecycle_setup + self.fail('CONTROL: setup assertion before the designated test body') +AssertionError: CONTROL: setup assertion before the designated test body + +---------------------------------------------------------------------- +Ran 1 test in 0.001s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-exclude-node-modules.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-exclude-node-modules.log new file mode 100644 index 000000000..00b1b54b1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-exclude-node-modules.log @@ -0,0 +1,14 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/cbz-lifecycle-review-m98xiox8/tests/test_workspace_git_inventory.py", line 159, in _controlled_lifecycle_setup + self.fail('CONTROL: setup assertion before the designated test body') +AssertionError: CONTROL: setup assertion before the designated test body + +---------------------------------------------------------------------- +Ran 1 test in 0.001s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-execute-clean-filter.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-execute-clean-filter.log new file mode 100644 index 000000000..163b3c3b3 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-execute-clean-filter.log @@ -0,0 +1,14 @@ +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... FAIL + +====================================================================== +FAIL: test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/cbz-lifecycle-review-m98xiox8/tests/test_workspace_git_inventory.py", line 159, in _controlled_lifecycle_setup + self.fail('CONTROL: setup assertion before the designated test body') +AssertionError: CONTROL: setup assertion before the designated test body + +---------------------------------------------------------------------- +Ran 1 test in 0.001s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-false-complete.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-false-complete.log new file mode 100644 index 000000000..02ed76ead --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-lifecycle-false-complete.log @@ -0,0 +1,14 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... FAIL + +====================================================================== +FAIL: test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/cbz-lifecycle-review-m98xiox8/tests/test_workspace_git_inventory.py", line 159, in _controlled_lifecycle_setup + self.fail('CONTROL: setup assertion before the designated test body') +AssertionError: CONTROL: setup assertion before the designated test body + +---------------------------------------------------------------------- +Ran 1 test in 0.001s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/original-three-regressions-RED.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-three-regressions-RED.log new file mode 100644 index 000000000..a0080e4f7 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/original-three-regressions-RED.log @@ -0,0 +1,48 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... FAIL +test_hanging_git_is_killed_and_reported (test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... FAIL +test_output_limit_and_total_deadline_are_explicit (test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... FAIL +test_rename_arbitrary_path_bytes_and_symlink_cycle (test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +====================================================================== +FAIL: test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 172, in test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status + self.assertFalse(any(p.exists()for p in markers),'Collector executed an equals-named filter') +AssertionError: True is not false : Collector executed an equals-named filter + +====================================================================== +FAIL: test_ordinary_head_objects_assets_do_not_hide_nested_repositories (test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 185, in test_ordinary_head_objects_assets_do_not_hide_nested_repositories + self.assertTrue({str(outer),str(nested),str(deep)}.issubset(d['discovered_roots'])) +AssertionError: False is not true + +====================================================================== +FAIL: test_remote_redaction_preserves_all_filesystem_identity_fields (test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 203, in test_remote_redaction_preserves_all_filesystem_identity_fields + self.assertEqual(d['root'],str(self.root)) +AssertionError: '/tmp/tmpasrp285_/workspace/root?token=[REDACTED]' != '/tmp/tmpasrp285_/workspace/root?token=root-value' +- /tmp/tmpasrp285_/workspace/root?token=[REDACTED] +? ^^^^^^^^^^ ++ /tmp/tmpasrp285_/workspace/root?token=root-value +? ^^^^^^^^^^ + + +---------------------------------------------------------------------- +Ran 14 tests in 1.730s + +FAILED (failures=3) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-normal.log new file mode 100644 index 000000000..c6a43856d --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-normal.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (tests.test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (tests.test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (tests.test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.842s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-optimized.log new file mode 100644 index 000000000..0d1d4a889 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/python311-optimized.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (tests.test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (tests.test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (tests.test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.650s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-normal.log new file mode 100644 index 000000000..891534af5 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-normal.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (tests.test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (tests.test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (tests.test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.479s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-optimized.log new file mode 100644 index 000000000..7aac10968 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/python312-optimized.log @@ -0,0 +1,19 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (tests.test_workspace_git_inventory.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (tests.test_workspace_git_inventory.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (tests.test_workspace_git_inventory.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.174s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/review-REVIEW.md b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-REVIEW.md new file mode 100644 index 000000000..b9ccff34c --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-REVIEW.md @@ -0,0 +1,39 @@ +PASS_SCOPED_CORE_CORRECTIONS — all three original findings resolved at the exact reviewed hashes. + +- Collector SHA256: `697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314` +- Core tests SHA256: `b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844` + +Both files matched the supplied hashes before and after execution. This binds working-file bytes; +it does not assign them an unobserved new native commit or hosted execution. + +WGI-01 (P1): corrected. Separate environment key/value transport preserves `=` in config +subsections; status verifies suppression and refuses unsafe discovery/transport. The unchanged +original fixtures observe zero filter execution in inventory and CLI for all five names, while +all five native positive controls execute. The core regression additionally exercises the +parent/submodule pair and refusal paths. + +WGI-02 (P1): corrected. Exact `--resolve-git-dir` validation replaces the filename-only metadata +heuristic. The original nested repository is found through both API and CLI. The added core +regression covers deeper objects/assets directories and their symlink, with existing metadata +exclusion tests retained. + +WGI-03 (P2): corrected. Field-scoped redaction preserves the two query-shaped filenames and +newline/tab/nonUTF8 bytes, including CLI JSON roundtrip. The added test retains filesystem +identities across roots, repos, worktrees, links and error targets while redacting URL and +diagnostic credential values. + +Actual reviewer execution: **14/14 core tests normal,14/14 optimized**, zero failures/errors/skips; +**all seven unmodified original fixture replays** complete, CLI exit0, output0600. Original +fixture script was copied byte-for-byte into this new directory; original evidence was not +modified. Its source-label header is historical; the unchanged import path reads the collector +bound above. The raw results, logs and exact script hash are retained here. Fixtures cleaned. + +No new concrete defect was established within this bounded correction scope. This is a scoped +engineering result, not a universal configuration/isolation proof or an integration approval. +Changing companion lifecycle code was excluded; parent3.11 and native CI results are not claimed +as reviewer executions. No global audit, installation, source/ref/PR/canonical-doc mutation or +mathematical/independent-family credit. + +Actual reviewer: OpenAI Codex, separate nonauthor, same provider/source-test exposed, +organizational independence0, science NONE. Root684/B003 keeps serial integration. Only this +core correction-review unit is CLOSED and released; prior roles remain closed. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/review-SOURCE.json b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-SOURCE.json new file mode 100644 index 000000000..14df49e05 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-SOURCE.json @@ -0,0 +1,24 @@ +{ + "scope": "Core correction only; changing companion runner excluded. Working source files bound by SHA256, not a claim of new hosted commit execution.", + "files": [ + { + "path": "tools/workspace_git_inventory.py", + "bytes": 27119, + "sha256": "697f87e9184728b90caaf50e2fe9a71fbb950719c6d325987f114271c343c314", + "git_blob_sha1": "1889a5b72f1b1787d8b8e4cf4e0e0ffec4d519bf" + }, + { + "path": "tests/test_workspace_git_inventory.py", + "bytes": 17972, + "sha256": "b3d94e36111154fd255193c118d87128e39aca2aea1dcd8f5cc2f72837743844", + "git_blob_sha1": "89b8f4ebcebe4a236e9d4c2ce2e05ac74d0baea4" + } + ], + "original_findings_source": "/workspace/cbz-20261029/git-tool-review/findings.json", + "original_reproducer_sha256": "e1284fe1e7e3edad4c6da8ca5978a9b028613143f33ac7072de0b3cbc3e01591", + "copied_reproducer_sha256": "e1284fe1e7e3edad4c6da8ca5978a9b028613143f33ac7072de0b3cbc3e01591", + "reproducer_exact_copy": true, + "historical_reproducer_source_labels": "Copied script header describes original source; its unchanged absolute import path reads the current source bound above.", + "python": "Python 3.12.14", + "git": "git version 2.52.0" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/review-normal-core.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-normal-core.log new file mode 100644 index 000000000..37eb82382 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-normal-core.log @@ -0,0 +1,21 @@ +{"tests": 14, "successful": true, "failures": 0, "errors": 0, "skipped": 0, "optimized": 0} + +test_broken_marker_and_external_directory_boundary_are_not_silent (frozen_core_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (frozen_core_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (frozen_core_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (frozen_core_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (frozen_core_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (frozen_core_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (frozen_core_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (frozen_core_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (frozen_core_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (frozen_core_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (frozen_core_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (frozen_core_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (frozen_core_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (frozen_core_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.414s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/correction/review-optimized-core.log b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-optimized-core.log new file mode 100644 index 000000000..74925bacc --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/correction/review-optimized-core.log @@ -0,0 +1,21 @@ +{"tests": 14, "successful": true, "failures": 0, "errors": 0, "skipped": 0, "optimized": 1} + +test_broken_marker_and_external_directory_boundary_are_not_silent (frozen_core_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (frozen_core_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (frozen_core_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status (frozen_core_tests.InventoryTests.test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status) ... ok +test_hanging_git_is_killed_and_reported (frozen_core_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (frozen_core_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (frozen_core_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_ordinary_head_objects_assets_do_not_hide_nested_repositories (frozen_core_tests.InventoryTests.test_ordinary_head_objects_assets_do_not_hide_nested_repositories) ... ok +test_output_limit_and_total_deadline_are_explicit (frozen_core_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_remote_redaction_preserves_all_filesystem_identity_fields (frozen_core_tests.InventoryTests.test_remote_redaction_preserves_all_filesystem_identity_fields) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (frozen_core_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (frozen_core_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (frozen_core_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (frozen_core_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 14 tests in 5.214s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/final15-normal.log b/docs/reports/cbz-workspace-hygiene-20261029/final15-normal.log new file mode 100644 index 000000000..5c25234c8 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/final15-normal.log @@ -0,0 +1,20 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_failed_baseline_never_runs_mutations (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_requires_new_output_and_keeps_private_success_evidence (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_surviving_mutant_is_failure (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_test_error_cannot_count_as_mutation_detection (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok + +---------------------------------------------------------------------- +Ran 15 tests in 7.141s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/final15-optimized.log b/docs/reports/cbz-workspace-hygiene-20261029/final15-optimized.log new file mode 100644 index 000000000..3e0a00669 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/final15-optimized.log @@ -0,0 +1,20 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (tests.test_workspace_git_inventory.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (tests.test_workspace_git_inventory.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (tests.test_workspace_git_inventory.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (tests.test_workspace_git_inventory.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (tests.test_workspace_git_inventory.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (tests.test_workspace_git_inventory.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (tests.test_workspace_git_inventory.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (tests.test_workspace_git_inventory.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (tests.test_workspace_git_inventory.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (tests.test_workspace_git_inventory.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (tests.test_workspace_git_inventory.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok +test_failed_baseline_never_runs_mutations (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_requires_new_output_and_keeps_private_success_evidence (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_surviving_mutant_is_failure (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_test_error_cannot_count_as_mutation_detection (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok + +---------------------------------------------------------------------- +Ran 15 tests in 7.837s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutation-baseline.log b/docs/reports/cbz-workspace-hygiene-20261029/mutation-baseline.log new file mode 100644 index 000000000..9e9664674 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutation-baseline.log @@ -0,0 +1,16 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... ok +test_cli_private_output_and_nonzero_incomplete (census_tests.InventoryTests.test_cli_private_output_and_nonzero_incomplete) ... ok +test_closed_streams_do_not_leave_a_hanging_child (census_tests.InventoryTests.test_closed_streams_do_not_leave_a_hanging_child) ... ok +test_hanging_git_is_killed_and_reported (census_tests.InventoryTests.test_hanging_git_is_killed_and_reported) ... ok +test_metadata_directory_alias_does_not_escape_git_exclusion (census_tests.InventoryTests.test_metadata_directory_alias_does_not_escape_git_exclusion) ... ok +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... ok +test_output_limit_and_total_deadline_are_explicit (census_tests.InventoryTests.test_output_limit_and_total_deadline_are_explicit) ... ok +test_rename_arbitrary_path_bytes_and_symlink_cycle (census_tests.InventoryTests.test_rename_arbitrary_path_bytes_and_symlink_cycle) ... ok +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... ok +test_submodule_bare_store_shallow_and_internal_symlink (census_tests.InventoryTests.test_submodule_bare_store_shallow_and_internal_symlink) ... ok +test_unborn_and_detached_heads_are_observations_not_errors (census_tests.InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 1.013s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutation-disable-redaction.log b/docs/reports/cbz-workspace-hygiene-20261029/mutation-disable-redaction.log new file mode 100644 index 000000000..a0720466e --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutation-disable-redaction.log @@ -0,0 +1,15 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 59, in test_nested_linked_state_refs_stash_and_redacted_remotes + raw=json.dumps(d);self.assertNotIn('password',raw);self.assertNotIn('token=secret',raw) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: 'password' unexpectedly found in '{"schema_version": 1, "started_at": "2026-10-29T18:06:54.833602+00:00", "root": "/tmp/tmpkjds4k1d/workspace", "purpose": "Observed Git census only; not a clean-state or mathematical certification", "non_atomic_observations": true, "complete": true, "errors": [], "policy": {"walk_exclusions": ["Git metadata internals only; node_modules is searched"], "symlinks": "Follow internal directory targets once by device/inode; record all links; external directory targets are uncovered/incomplete", "paths": "NUL Git records; filesystem surrogateescape; JSON ensure_ascii=true", "read_only": "Optional locks, hooks, filters, maintenance and lazy network fetch disabled; no Git mutation commands", "status": "porcelain v1 -z --untracked-files=all; Git ignore rules still apply", "url_redaction": "userinfo and known credential query values redacted"}, "limits": {"git_timeout_seconds": 10, "total_timeout_seconds": 1800, "max_command_bytes": 33554432}, "stores": [{"path": "/tmp/tmpkjds4k1d/workspace/primary/.git", "representative": "/tmp/tmpkjds4k1d/workspace/linked\\nworktree", "refs": [{"name": "refs/heads/linked-branch", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/master", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/heads/other", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/stash", "object": "dcc96842f8652e906fe6f6cb460bb066c79b3569", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}, {"name": "refs/tags/annotated", "object": "1cfdd51b37a81b08bb32d999052858a669f5f9a6", "type": "tag", "peeled_object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "peeled_type": "commit", "symbolic_target": ""}, {"name": "refs/tags/v1", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpkjds4k1d/workspace/primary", "HEAD": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master"}, {"worktree": "/tmp/tmpkjds4k1d/workspace/linked\\nworktree", "HEAD": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/linked-branch"}], "stashes": [{"object": "dcc96842f8652e906fe6f6cb460bb066c79b3569", "selector": "stash@{0}"}]}, {"path": "/tmp/tmpkjds4k1d/workspace/primary/nested/.git", "representative": "/tmp/tmpkjds4k1d/workspace/primary/nested", "refs": [{"name": "refs/heads/master", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpkjds4k1d/workspace/primary/nested", "HEAD": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master"}], "stashes": []}, {"path": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package/.git", "representative": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package", "refs": [{"name": "refs/heads/master", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}], "remotes": [], "bare": false, "shallow": false, "registered_worktrees": [{"worktree": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package", "HEAD": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master"}], "stashes": []}], "worktrees": [{"path": "/tmp/tmpkjds4k1d/workspace/linked\\nworktree", "common_store": "/tmp/tmpkjds4k1d/workspace/primary/.git", "observed_at": "2026-10-29T18:06:54.884637+00:00", "exists": true, "head": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/linked-branch", "status": [], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpkjds4k1d/workspace/primary/.git/worktrees/linked-worktree", "detached": false, "unborn": false, "local_refs": [{"name": "refs/worktree/census", "object": "9a556deca51a0f42fa7f44b6c733db3b75812031", "type": "commit", "peeled_object": "", "peeled_type": "", "symbolic_target": ""}]}, {"path": "/tmp/tmpkjds4k1d/workspace/primary", "common_store": "/tmp/tmpkjds4k1d/workspace/primary/.git", "observed_at": "2026-10-29T18:06:54.896687+00:00", "exists": true, "head": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master", "status": [{"xy": " M", "path": "tracked"}, {"xy": "??", "path": "nested/"}, {"xy": "??", "path": "node_modules/package/"}, {"xy": "??", "path": "untracked\\nname\\tand spaces"}], "submodules": [], "remotes": [{"name": "origin", "fetch_urls": ["https://name:password@example.invalid/repo.git?token=secret"], "push_urls": []}, {"name": "scp", "fetch_urls": ["[REDACTED]@example.invalid:repo.git"], "push_urls": []}], "bare": false, "git_dir": "/tmp/tmpkjds4k1d/workspace/primary/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpkjds4k1d/workspace/primary/nested", "common_store": "/tmp/tmpkjds4k1d/workspace/primary/nested/.git", "observed_at": "2026-10-29T18:06:54.908211+00:00", "exists": true, "head": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpkjds4k1d/workspace/primary/nested/.git", "detached": false, "unborn": false, "local_refs": []}, {"path": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package", "common_store": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package/.git", "observed_at": "2026-10-29T18:06:54.920511+00:00", "exists": true, "head": "9a556deca51a0f42fa7f44b6c733db3b75812031", "branch": "refs/heads/master", "status": [], "submodules": [], "remotes": [], "bare": false, "git_dir": "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package/.git", "detached": false, "unborn": false, "local_refs": []}], "discovered_roots": ["/tmp/tmpkjds4k1d/workspace/linked\\nworktree", "/tmp/tmpkjds4k1d/workspace/primary", "/tmp/tmpkjds4k1d/workspace/primary/nested", "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package"], "symlinks": [], "git_metadata_not_traversed": ["/tmp/tmpkjds4k1d/workspace/primary/.git", "/tmp/tmpkjds4k1d/workspace/primary/nested/.git", "/tmp/tmpkjds4k1d/workspace/primary/node_modules/package/.git", "/tmp/tmpkjds4k1d/workspace/linked\\nworktree/.git"], "directories_visited": 6, "empty_discovery": false, "finished_at": "2026-10-29T18:06:54.932532+00:00", "git_commands": 66}' + +---------------------------------------------------------------------- +Ran 1 test in 0.167s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutation-exclude-node-modules.log b/docs/reports/cbz-workspace-hygiene-20261029/mutation-exclude-node-modules.log new file mode 100644 index 000000000..06d193f27 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutation-exclude-node-modules.log @@ -0,0 +1,15 @@ +test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) ... FAIL + +====================================================================== +FAIL: test_nested_linked_state_refs_stash_and_redacted_remotes (census_tests.InventoryTests.test_nested_linked_state_refs_stash_and_redacted_remotes) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 48, in test_nested_linked_state_refs_stash_and_redacted_remotes + for p in [repo,linked,nested,dependency]:self.assertIn(str(p),roots) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: '/tmp/tmp8gn6iebb/workspace/primary/node_modules/package' not found in {'/tmp/tmp8gn6iebb/workspace/linked\nworktree': {'path': '/tmp/tmp8gn6iebb/workspace/linked\nworktree', 'common_store': '/tmp/tmp8gn6iebb/workspace/primary/.git', 'observed_at': '2026-10-29T18:06:54.639754+00:00', 'exists': True, 'head': '9a556deca51a0f42fa7f44b6c733db3b75812031', 'branch': 'refs/heads/linked-branch', 'status': [], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmp8gn6iebb/workspace/primary/.git/worktrees/linked-worktree', 'detached': False, 'unborn': False, 'local_refs': [{'name': 'refs/worktree/census', 'object': '9a556deca51a0f42fa7f44b6c733db3b75812031', 'type': 'commit', 'peeled_object': '', 'peeled_type': '', 'symbolic_target': ''}]}, '/tmp/tmp8gn6iebb/workspace/primary': {'path': '/tmp/tmp8gn6iebb/workspace/primary', 'common_store': '/tmp/tmp8gn6iebb/workspace/primary/.git', 'observed_at': '2026-10-29T18:06:54.652077+00:00', 'exists': True, 'head': '9a556deca51a0f42fa7f44b6c733db3b75812031', 'branch': 'refs/heads/master', 'status': [{'xy': ' M', 'path': 'tracked'}, {'xy': '??', 'path': 'nested/'}, {'xy': '??', 'path': 'node_modules/package/'}, {'xy': '??', 'path': 'untracked\nname\tand spaces'}], 'submodules': [], 'remotes': [{'name': 'origin', 'fetch_urls': ['https://[REDACTED]@example.invalid/repo.git?token=[REDACTED]'], 'push_urls': []}, {'name': 'scp', 'fetch_urls': ['[REDACTED]@example.invalid:repo.git'], 'push_urls': []}], 'bare': False, 'git_dir': '/tmp/tmp8gn6iebb/workspace/primary/.git', 'detached': False, 'unborn': False, 'local_refs': []}, '/tmp/tmp8gn6iebb/workspace/primary/nested': {'path': '/tmp/tmp8gn6iebb/workspace/primary/nested', 'common_store': '/tmp/tmp8gn6iebb/workspace/primary/nested/.git', 'observed_at': '2026-10-29T18:06:54.665706+00:00', 'exists': True, 'head': '9a556deca51a0f42fa7f44b6c733db3b75812031', 'branch': 'refs/heads/master', 'status': [], 'submodules': [], 'remotes': [], 'bare': False, 'git_dir': '/tmp/tmp8gn6iebb/workspace/primary/nested/.git', 'detached': False, 'unborn': False, 'local_refs': []}} + +---------------------------------------------------------------------- +Ran 1 test in 0.141s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutation-execute-clean-filter.log b/docs/reports/cbz-workspace-hygiene-20261029/mutation-execute-clean-filter.log new file mode 100644 index 000000000..7982a6f0c --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutation-execute-clean-filter.log @@ -0,0 +1,15 @@ +test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) ... FAIL + +====================================================================== +FAIL: test_status_does_not_execute_configured_clean_filter (census_tests.InventoryTests.test_status_does_not_execute_configured_clean_filter) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 128, in test_status_does_not_execute_configured_clean_filter + d=self.census();self.assertTrue(d['complete'],d['errors']);self.assertFalse(marker.exists()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.117s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutation-false-complete.log b/docs/reports/cbz-workspace-hygiene-20261029/mutation-false-complete.log new file mode 100644 index 000000000..e22d945e7 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutation-false-complete.log @@ -0,0 +1,15 @@ +test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) ... FAIL + +====================================================================== +FAIL: test_broken_marker_and_external_directory_boundary_are_not_silent (census_tests.InventoryTests.test_broken_marker_and_external_directory_boundary_are_not_silent) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", line 81, in test_broken_marker_and_external_directory_boundary_are_not_silent + d=self.census();self.assertFalse(d['complete']);self.assertTrue(d['errors']) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: True is not false + +---------------------------------------------------------------------- +Ran 1 test in 0.049s + +FAILED (failures=1) diff --git a/docs/reports/cbz-workspace-hygiene-20261029/mutations.json b/docs/reports/cbz-workspace-hygiene-20261029/mutations.json new file mode 100644 index 000000000..04fc58ea0 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/mutations.json @@ -0,0 +1,133 @@ +{ + "schema_version": 1, + "purpose": "Git census self-tests only; no mathematical certification or Git cleanliness claim", + "started_at": "2026-10-29T18:06:53.363254+00:00", + "python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]", + "python_executable": "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "sources": { + "collector": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory.py", + "sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "bytes": 24122 + }, + "tests": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tests/test_workspace_git_inventory.py", + "sha256": "cfd1c780d093a0d08c86c2a22a01c1215e0443f222647d20fef9fc57a48511b4", + "bytes": 10223 + }, + "runner": { + "path": "/workspace/cbz-workspace-git-hygiene-20261029/tools/workspace_git_inventory_mutations.py", + "sha256": "086e44a9ca848db5b2b987198d30ef9008675b9495ebe75a68a09c5b63eda383", + "bytes": 7717 + } + }, + "baseline": { + "test": "entire suite", + "log": "baseline.log", + "metrics": "baseline.json", + "timeout_seconds": 60, + "returncode": 0, + "tests_run": 11, + "successful": true, + "failures": 0, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "passed": true + }, + "mutations": [ + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "exclude-node-modules.log", + "metrics": "exclude-node-modules.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "exclude-node-modules", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "738a7606715fa6d525ef42e08df30c430778f0a3b9fef0e5c164e35675eb6ec7", + "replacement": { + "old": "if entry.name == '.git':", + "new": "if entry.name in ('.git', 'node_modules'):" + }, + "detected_by_assertion": true + }, + { + "test": "test_nested_linked_state_refs_stash_and_redacted_remotes", + "log": "disable-redaction.log", + "metrics": "disable-redaction.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "disable-redaction", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "ce0e30dda743732a436d0d0ea2de2420741bd67e1d0e0b8e0637b7a99605b431", + "replacement": { + "old": "def _redact(value):\n", + "new": "def _redact(value):\n return value\n" + }, + "detected_by_assertion": true + }, + { + "test": "test_status_does_not_execute_configured_clean_filter", + "log": "execute-clean-filter.log", + "metrics": "execute-clean-filter.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "execute-clean-filter", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "43c4e2f57394deaf470b40681ff797e64f77a1d3f110ab2437cb3bb60efccc0b", + "replacement": { + "old": "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + "new": "settings += []" + }, + "detected_by_assertion": true + }, + { + "test": "test_broken_marker_and_external_directory_boundary_are_not_silent", + "log": "false-complete.log", + "metrics": "false-complete.json", + "timeout_seconds": 20, + "returncode": 1, + "tests_run": 1, + "successful": false, + "failures": 1, + "errors": 0, + "skipped": 0, + "expected_failures": 0, + "unexpected_successes": 0, + "mutation": "false-complete", + "source_sha256": "26227abc4b92cc2b9dc5e487158aacdde1b87c6d97d3a4b0929c0702e3d37301", + "mutant_sha256": "b9128e53cd5341e3a9d36b4923b1b17aa3b59080378bb64d6c6ff63a8097302b", + "replacement": { + "old": "complete=not reader.errors", + "new": "complete=True" + }, + "detected_by_assertion": true + } + ], + "errors": [], + "complete": true, + "all_detected": true, + "finished_at": "2026-10-29T18:06:55.340338+00:00" +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/original-EVIDENCE.json b/docs/reports/cbz-workspace-hygiene-20261029/original-EVIDENCE.json new file mode 100644 index 000000000..06c7d961e --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/original-EVIDENCE.json @@ -0,0 +1,65 @@ +{ + "scope": "Public synthetic self-test/source evidence only; raw private inventory and recovery archive locators withheld", + "files": { + "README.md": { + "bytes": 6208, + "sha256": "280e9f4192acebc9c722c1ba633f2b8a9b4d51e44edc45b3f167748c79715379" + }, + "SOURCE.json": { + "bytes": 1007, + "sha256": "90714405faf67ef7985ddf74a2c96e66ac896c2a04952a98229474061448a5db" + }, + "collector-normal.log": { + "bytes": 1856, + "sha256": "c8d55853c5082525da552587a83a2fa613038e13fd919d0f13d8b8e397296a8d" + }, + "collector-optimized.log": { + "bytes": 1856, + "sha256": "279c793570bf5e751a18833d74e47989d06b570ee283dae9d4beb6dcbc5e9d59" + }, + "final15-normal.log": { + "bytes": 2590, + "sha256": "557a06a0ccc8aa86b5c7d35e74232e623668328c506f5c0ac34ba58cc8accfef" + }, + "final15-optimized.log": { + "bytes": 2590, + "sha256": "d48e77490ff4e8e44477d19be4e99d47824112678575e9358ce12f1f20d1b843" + }, + "mutation-baseline.log": { + "bytes": 1680, + "sha256": "0f967c385208a3b391994b748ef2db56f5d34e8e05e6fac25d8e3758484e2f4b" + }, + "mutation-disable-redaction.log": { + "bytes": 8020, + "sha256": "51cfc84a530574fcd6d0e5e2968f9202002d937f9a6a7a9a88f3315e24db937c" + }, + "mutation-exclude-node-modules.log": { + "bytes": 3205, + "sha256": "87012cb90d2e361378a8b1fe20b72821b611bab83e2d03ef2d7dd76b09312886" + }, + "mutation-execute-clean-filter.log": { + "bytes": 967, + "sha256": "af01905297a9abcb151c556f7c44e2334344dadca186c874914d2d867e6339a9" + }, + "mutation-false-complete.log": { + "bytes": 970, + "sha256": "baa10781039acb92e64b3127fd38c739a8f6ee367733cb911b687bac53b3fc13" + }, + "mutations.json": { + "bytes": 4667, + "sha256": "e3d0afc776ab553c6a06a62cc77b293f64bfef5adc6697fd4be40e54a5ed5676" + }, + "runner-controls.json": { + "bytes": 219, + "sha256": "288366545e640d29f82dd9a5a6c39a95429f2db024756ac88323875ab3fcedd0" + }, + "runner-normal-initial.log": { + "bytes": 766, + "sha256": "66b0c8ad4babb0463f431bf761b4d7e289e2cc14b9e845e97fee665d9ad76d2d" + }, + "runner-optimized-initial.log": { + "bytes": 766, + "sha256": "f9a2e4e802dcb12fde08564b1a9993a168aaa7d7d13dd68ccbf853d8cb5fcdcc" + } + } +} diff --git a/docs/reports/cbz-workspace-hygiene-20261029/original-README.md b/docs/reports/cbz-workspace-hygiene-20261029/original-README.md new file mode 100644 index 000000000..041b468f8 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/original-README.md @@ -0,0 +1,36 @@ +# Read-only workspace Git inventory + +The federation census initially missed nested execution fixtures and an empty package-cache `.git` marker. This stdlib tool records every physical Git candidate, linked worktree, common store, ref/tag/stash, configured redacted remote and submodule. It preserves unusual path bytes and fails closed on uncovered paths, malformed markers, Git errors, deadlines or output limits. An exit0 means **complete observations, not clean Git or CBZ-0**. + +This is a disjoint contribution to [the canonical consolidation](https://github.com/d6g8k5htny-coder/main/issues/684). It does not certify mathematical claims or replace G0–G4, remote repository inventory, regression, pin or status-truth gates. No dependency, mathematical source, scientific disposition or existing test is changed. + +## Reproduce and register + +Use Python3.11+ and Git on a POSIX host; actual parent verification used Python3.12.14 and Git2.52.0. No third-party imports or network access are needed. Output parents must already exist; output files/directories must be new. + +```sh +python3 -S -B tools/workspace_git_inventory.py --root /workspace --output /private/existing-parent/new-inventory.json --command-timeout 10 --total-timeout 900 +python3 -S -B -m unittest tests.test_workspace_git_inventory tests.test_workspace_git_inventory_mutations -v +python3 -S -B -O -m unittest tests.test_workspace_git_inventory tests.test_workspace_git_inventory_mutations -v +python3 -S -B tools/workspace_git_inventory_mutations.py --output /private/existing-parent/new-mutation-directory +``` + +Collector output is exclusive-create0600. The companion creates an exclusive0700 directory and0600 logs/results. It derives source/test paths from its own location and uses its running interpreter. Defaults:10seconds per Git command,1800seconds overall and32MiB combined output per command; failures kill/reap only owned children. The companion requires all11 core tests to pass with zero skips/errors before four known mutations. A surviving mutant or test error cannot count as detection. It retains source/mutant identities and metrics, then removes its owned temporary mutant copies. + +Registry handoff for canonical GOVERNANCE/TOOLING/STATUS: register `tools/workspace_git_inventory.py` as a read-only Phase1/G10 assessment tool and `tools/workspace_git_inventory_mutations.py` as its self-test companion. Both are self-contained, maintenance owner none, serving criteria1/9/11 and G10/G11 assessment. The collector performs no mathematical certification and does not turn dirty states into a failing completeness check; gate consumers must inspect the recorded state and combine remote branch/PR evidence. + +## Verification and observed cleanup + +The11 collector tests cover nested/node_modules repositories, linked and bare stores, refs/tags/stash/submodules, shallow/unborn/detached state, LF/tab/non-UTF8/rename paths, metadata nonmutation, clean-filter execution prevention, credential redaction, broken markers, symlink boundaries, bounded hangs and output. Four companion tests exercise required/private/exclusive output, failed-baseline refusal, a surviving no-op mutant and test-error refusal. The independently run companion baseline passes11 and detects4/4 weakened collectors by assertion failures. It was also run from `/tmp` to verify directory independence. Core tests passed under both Python3.11.17 and3.12.14. Versioned final normal/optimized test logs and source hashes accompany this report. The companion's internal child core suite uses its explicit-S/-B flags; the separate optimized core suite checks optimized collector behavior. + +Initial private census:74candidates,24stores,73worktree observations,17dirty worktrees and0stashes. Its sole error was a zero-byte invalid Git marker in derived package cache; it correctly returned incomplete/exit1. Later complete census found65worktrees after the scratch fixtures were retired. After53 retired Atlas roots were archived and removed, the next complete census recorded10stores/12worktrees/0errors/0stashes; only this author checkout was dirty. These are interval observations, not a current or global G10-pass claim. + +Recovery was verified before local cleanup:112,040 scratch entries and138,102 retired-root entries matched independent filesystem/path censuses and native tar byte comparison. Fifty stale IPC sockets were explicitly recorded as non-file endpoints. A native-verified all-ref/reflog Git bundle restored all42 distinct retired HEAD commits in a fresh temporary mirror. Entire shared Git metadata, including original indexes/staging states, was separately byte-verified;23 old local engineering branches were then conditionally pruned at their archived SHAs. No mathematical source branch was pruned by this unit. Private archive locators, raw inventory paths and custody mappings remain private. + +An existing Python3.11 installation was discovered to have lived in scratch. Its exact archived runtime was restored to a maintained location, owner-local link repaired, member bytes/modes verified, and11 normal/optimized core tests rerun. Initial missing-runtime and comparison failures are retained privately; they are not relabelled successful checks. DefaultPython3.12 remained available. + +## Limits and authority + +Observations are non-atomic. Internal directory symlinks are followed once; Git metadata aliases are excluded. External directory links and coverage errors are explicit incompleteness. Git ignore rules still apply to untracked status; discovery has no node_modules or cache exclusion. Configured hooks, clean/process filters, fsmonitor, automatic maintenance, optional locks and lazy network fetch are disabled for collection. No unreachable-object/reflog audit, remote fetch, preservation/deletion, proof closure, all-platform guarantee or global baseline pass follows from collector exit0. + +Actual authors: OpenAI/Codex Kepler for the collector/migration/companion, parent for permanent companion tests and integration. Self-review and actual automated controls; organizational-independence credit0 and scientific effect NONE. Canonical baseline documents and serial remote integration remain with #684's existing writer. diff --git a/docs/reports/cbz-workspace-hygiene-20261029/runner-controls.json b/docs/reports/cbz-workspace-hygiene-20261029/runner-controls.json new file mode 100644 index 000000000..4054483e5 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/runner-controls.json @@ -0,0 +1,14 @@ +[ + { + "control": "broken Git rejects baseline before mutations", + "passed": true + }, + { + "control": "survivor-rejected", + "passed": true + }, + { + "control": "error-rejected", + "passed": true + } +] diff --git a/docs/reports/cbz-workspace-hygiene-20261029/runner-normal-initial.log b/docs/reports/cbz-workspace-hygiene-20261029/runner-normal-initial.log new file mode 100644 index 000000000..9d5495ab1 --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/runner-normal-initial.log @@ -0,0 +1,9 @@ +test_failed_baseline_never_runs_mutations (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_requires_new_output_and_keeps_private_success_evidence (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_surviving_mutant_is_failure (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_test_error_cannot_count_as_mutation_detection (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok + +---------------------------------------------------------------------- +Ran 4 tests in 6.911s + +OK diff --git a/docs/reports/cbz-workspace-hygiene-20261029/runner-optimized-initial.log b/docs/reports/cbz-workspace-hygiene-20261029/runner-optimized-initial.log new file mode 100644 index 000000000..997018a5b --- /dev/null +++ b/docs/reports/cbz-workspace-hygiene-20261029/runner-optimized-initial.log @@ -0,0 +1,9 @@ +test_failed_baseline_never_runs_mutations (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_failed_baseline_never_runs_mutations) ... ok +test_requires_new_output_and_keeps_private_success_evidence (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_requires_new_output_and_keeps_private_success_evidence) ... ok +test_surviving_mutant_is_failure (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_surviving_mutant_is_failure) ... ok +test_test_error_cannot_count_as_mutation_detection (tests.test_workspace_git_inventory_mutations.MutationRunnerTests.test_test_error_cannot_count_as_mutation_detection) ... ok + +---------------------------------------------------------------------- +Ran 4 tests in 6.736s + +OK diff --git a/tests/test_workspace_git_inventory.py b/tests/test_workspace_git_inventory.py new file mode 100644 index 000000000..89b8f4ebc --- /dev/null +++ b/tests/test_workspace_git_inventory.py @@ -0,0 +1,244 @@ +"""Real-Git census tests: discovery, native state, failure boundaries and privacy.""" +import importlib.util +import json +import os +from pathlib import Path +import shlex +import shutil +import signal +import stat +import subprocess +import sys +import tempfile +import unittest + +TOOL=Path(__file__).resolve().parents[1]/'tools/workspace_git_inventory.py' + + +class InventoryTests(unittest.TestCase): + def setUp(self): + self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup) + self.root=Path(self.temp.name)/'workspace';self.root.mkdir() + + def git(self,path,*args): + return subprocess.check_output(['git','-C',str(path),*args],stderr=subprocess.PIPE) + + def repo(self,name): + p=self.root/name;p.mkdir(parents=True);self.git(p,'init','-q') + self.git(p,'config','user.name','Census Test');self.git(p,'config','user.email','census@example.invalid') + (p/'tracked').write_text('initial\n');self.git(p,'add','tracked');self.git(p,'commit','-qm','initial') + return p + + def census(self,**options): + spec=importlib.util.spec_from_file_location('git_inventory',TOOL) + module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module) + return module.inventory(self.root,**options) + + def test_nested_linked_state_refs_stash_and_redacted_remotes(self): + repo=self.repo('primary');self.git(repo,'branch','other');self.git(repo,'tag','v1') + self.git(repo,'tag','-am','annotated test','annotated') + (repo/'tracked').write_text('stashed\n');self.git(repo,'stash','push','-qm','retained stash') + self.git(repo,'remote','add','origin','https://name:password@example.invalid/repo.git?token=secret') + self.git(repo,'remote','add','scp','private-user@example.invalid:repo.git') + linked=self.root/('linked'+chr(10)+'worktree');self.git(repo,'worktree','add','-qb','linked-branch',str(linked)) + self.git(linked,'update-ref','refs/worktree/census','HEAD') + nested=self.repo('primary/nested');dependency=self.repo('primary/node_modules/package') + (repo/'tracked').write_text('dirty\n');name='untracked'+chr(10)+'name'+chr(9)+'and spaces';(repo/name).write_text('new') + before=(repo/'.git/index').read_bytes() + metadata={str(p.relative_to(repo/'.git')):p.read_bytes() for p in (repo/'.git').rglob('*') if p.is_file()} + d=self.census();self.assertTrue(d['complete'],d['errors']) + roots={r['path']:r for r in d['worktrees']} + for p in [repo,linked,nested,dependency]:self.assertIn(str(p),roots) + self.assertEqual(len(d['stores']),3) + self.assertEqual(roots[str(linked)]['branch'],'refs/heads/linked-branch') + self.assertTrue(any(r['name']=='refs/worktree/census'for r in roots[str(linked)]['local_refs'])) + status=roots[str(repo)]['status'];self.assertTrue(any(r['path']==name and r['xy']=='??'for r in status)) + self.assertTrue(any(r['path']=='tracked'and'M'in r['xy']for r in status)) + store=next(s for s in d['stores']if s['path']==str(repo/'.git')) + refs={r['name']:r['object']for r in store['refs']};self.assertIn('refs/heads/other',refs);self.assertIn('refs/tags/v1',refs) + tag=next(r for r in store['refs']if r['name']=='refs/tags/annotated') + self.assertEqual(tag['type'],'tag');self.assertEqual(tag['peeled_object'],self.git(repo,'rev-parse','HEAD').decode().strip()) + self.assertEqual(len(store['stashes']),1) + raw=json.dumps(d);self.assertNotIn('password',raw);self.assertNotIn('token=secret',raw) + self.assertIn('REDACTED',raw);self.assertEqual((repo/'.git/index').read_bytes(),before) + self.assertNotIn('private-user',raw) + self.assertEqual(metadata,{str(p.relative_to(repo/'.git')):p.read_bytes() for p in (repo/'.git').rglob('*') if p.is_file()}) + + def test_submodule_bare_store_shallow_and_internal_symlink(self): + source=self.repo('source');parent=self.repo('parent') + subpath='sub'+chr(10)+'module' + self.git(parent,'-c','protocol.file.allow=always','submodule','add','-q','--name','module',str(source),subpath) + bare=self.root/'bare.git';subprocess.check_call(['git','clone','-q','--bare',str(source),str(bare)]) + shallow=self.root/'shallow';subprocess.check_call(['git','clone','-q','--depth','1',source.as_uri(),str(shallow)]) + (self.root/'alias').symlink_to(parent,target_is_directory=True) + d=self.census();self.assertTrue(d['complete'],d['errors']) + work=next(r for r in d['worktrees']if r['path']==str(parent)) + self.assertEqual(work['submodules'][0]['path'],subpath);self.assertTrue(work['submodules'][0]['initialized']) + self.assertTrue(next(s for s in d['stores']if s['path']==str(shallow/'.git'))['shallow']) + self.assertTrue(any(s['path']==str(bare)and s['bare']for s in d['stores'])) + self.assertTrue(any(s['path']==str(self.root/'alias')for s in d['symlinks'])) + + def test_broken_marker_and_external_directory_boundary_are_not_silent(self): + self.repo('good');broken=self.root/'broken';broken.mkdir();(broken/'.git').write_text('gitdir: /does/not/exist\n') + cycle=self.root/'cyclic-marker';cycle.mkdir();(cycle/'.git').symlink_to(cycle/'.git') + external=Path(self.temp.name)/'outside';external.mkdir();(self.root/'external').symlink_to(external,target_is_directory=True) + d=self.census();self.assertFalse(d['complete']);self.assertTrue(d['errors']) + self.assertTrue(any(e['kind']=='external_directory_symlink'for e in d['errors'])) + self.assertIn(str(broken),d['discovered_roots']) + + def test_cli_private_output_and_nonzero_incomplete(self): + self.repo('good');bad=self.root/'broken';bad.mkdir();(bad/'.git').write_text('invalid\n') + out=Path(self.temp.name)/'inventory.json' + r=subprocess.run(['python3','-S',str(TOOL),'--root',str(self.root),'--output',str(out)],capture_output=True,text=True) + self.assertNotEqual(r.returncode,0);self.assertTrue(out.exists(),r.stderr) + self.assertEqual(stat.S_IMODE(out.stat().st_mode),0o600) + self.assertFalse(json.loads(out.read_bytes())['complete']) + + def test_hanging_git_is_killed_and_reported(self): + self.repo('repo');fake=Path(self.temp.name)/'git-hang' + fake.write_text('#!/usr/bin/env python3\nimport time\ntime.sleep(30)\n');fake.chmod(0o700) + d=self.census(git=str(fake),command_timeout=.1,total_timeout=3) + self.assertFalse(d['complete']);self.assertTrue(any(e['kind']=='timeout'for e in d['errors'])) + + def test_closed_streams_do_not_leave_a_hanging_child(self): + self.repo('repo');fake=Path(self.temp.name)/'git-closed';pidfile=Path(self.temp.name)/'pid' + fake.write_text('#!/usr/bin/env python3\nimport os,time,pathlib\npathlib.Path('+repr(str(pidfile))+').write_text(str(os.getpid()))\nos.close(1)\nos.close(2)\ntime.sleep(30)\n') + fake.chmod(0o700) + try: + d=self.census(git=str(fake),command_timeout=.1,total_timeout=3) + self.assertFalse(d['complete']);self.assertTrue(any(e['kind']=='timeout'for e in d['errors'])) + with self.assertRaises(ProcessLookupError):os.kill(int(pidfile.read_text()),0) + finally: + if pidfile.exists(): + try:os.killpg(int(pidfile.read_text()),signal.SIGKILL) + except ProcessLookupError:pass + + def test_rename_arbitrary_path_bytes_and_symlink_cycle(self): + repo=self.repo('repo');old='old'+chr(10)+'name';new='new'+chr(9)+os.fsdecode(b'\xff') + (repo/old).write_text('content');self.git(repo,'add',old);self.git(repo,'commit','-qm','path') + self.git(repo,'mv',old,new) + (self.root/'cycle-a').symlink_to(self.root/'cycle-b');(self.root/'cycle-b').symlink_to(self.root/'cycle-a') + d=self.census();self.assertFalse(d['complete']);self.assertTrue(any(e['kind']=='filesystem'for e in d['errors'])) + r=next(w for w in d['worktrees']if w['path']==str(repo)) + renamed=next(r for r in r['status']if'R'in r['xy']) + self.assertEqual((renamed['path'],renamed['original_path']),(new,old)) + self.assertEqual(json.loads(json.dumps(d))['worktrees'],d['worktrees']) + + def test_status_does_not_execute_configured_clean_filter(self): + repo=self.repo('filtered');marker=Path(self.temp.name)/'FILTER-RAN' + script=Path(self.temp.name)/'filter.py';script.write_text('import pathlib,sys\npathlib.Path('+repr(str(marker))+').write_text("bad")\nsys.stdout.write(sys.stdin.read())\n') + self.git(repo,'config','filter.audit.clean','python3 '+str(script)) + (repo/'.gitattributes').write_text('tracked filter=audit\n');(repo/'tracked').write_text('changed\n') + d=self.census();self.assertTrue(d['complete'],d['errors']);self.assertFalse(marker.exists()) + + def test_output_limit_and_total_deadline_are_explicit(self): + self.repo('repo');fake=Path(self.temp.name)/'git-noisy' + fake.write_text('#!/usr/bin/env python3\nimport sys\nsys.stdout.write("x"*100000)\n');fake.chmod(0o700) + d=self.census(git=str(fake),max_command_bytes=128) + self.assertFalse(d['complete']);self.assertTrue(any(e['kind']=='output_limit'for e in d['errors'])) + d=self.census(total_timeout=0) + self.assertFalse(d['complete']);self.assertTrue(any(e['kind']=='deadline'for e in d['errors'])) + + def test_metadata_directory_alias_does_not_escape_git_exclusion(self): + repo=self.repo('repo');hidden=repo/'.git/objects/hidden';hidden.mkdir() + self.git(hidden,'init','-q');(self.root/'objects-alias').symlink_to(repo/'.git/objects',target_is_directory=True) + d=self.census();self.assertTrue(d['complete'],d['errors']) + self.assertNotIn(str(hidden),d['discovered_roots']) + + def test_unborn_and_detached_heads_are_observations_not_errors(self): + empty=self.root/'unborn';empty.mkdir();self.git(empty,'init','-q') + repo=self.repo('detached');self.git(repo,'checkout','-q','--detach') + d=self.census();self.assertTrue(d['complete'],d['errors']) + by={w['path']:w for w in d['worktrees']} + self.assertTrue(by[str(empty)]['unborn']);self.assertIsNone(by[str(empty)]['head']) + self.assertTrue(by[str(repo)]['detached']);self.assertIsNone(by[str(repo)]['branch']) + + def test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status(self): + source=self.repo('source');parent=self.repo('parent') + self.git(parent,'-c','protocol.file.allow=always','submodule','add','-q',str(source),'module') + child=parent/'module';markers=[] + for number,(repo,name) in enumerate([(parent,'eq=name'),(child,'eq==name')]): + marker=Path(self.temp.name)/('FILTER-'+str(number));markers.append(marker) + script=Path(self.temp.name)/('filter-'+str(number)+'.py') + script.write_text('import pathlib,sys\npathlib.Path('+repr(str(marker))+').write_text("executed")\nsys.stdout.buffer.write(sys.stdin.buffer.read())\n') + self.git(repo,'config','filter.'+name+'.clean',shlex.quote(sys.executable)+' '+shlex.quote(str(script))) + self.git(repo,'config','filter.'+name+'.required','true') + (repo/'.gitattributes').write_text('tracked filter='+name+'\n') + self.assertEqual(self.git(repo,'check-attr','-z','filter','--','tracked').split(b'\0')[2],name.encode()) + (repo/'tracked').write_text('changed\n') + # Native parent status exercises both its own and recursive child filter. + self.git(parent,'status','--porcelain=v1','-z','--ignore-submodules=none') + self.assertTrue(all(p.exists()for p in markers),'Native recursive positive control did not run both filters') + for p in markers:p.unlink() + d=self.census();self.assertTrue(d['complete'],d['errors']) + self.assertFalse(any(p.exists()for p in markers),'Collector executed an equals-named filter') + out=Path(self.temp.name)/'equals-cli.json' + result=subprocess.run([sys.executable,'-S','-B',str(TOOL),'--root',str(self.root),'--output',str(out)],capture_output=True) + self.assertEqual(result.returncode,0,result.stderr) + self.assertTrue(json.loads(out.read_bytes())['complete']) + self.assertFalse(any(p.exists()for p in markers),'CLI executed an equals-named filter') + # A failed filter-key census must refuse status, without an unsafe fallback. + status_marker=Path(self.temp.name)/'STATUS-RAN';wrapper=Path(self.temp.name)/'git-config-failure' + native=shutil.which('git') + wrapper.write_text('#!/usr/bin/env python3\nimport os,pathlib,sys\na=sys.argv[1:]\nif "config" in a and "--name-only" in a:sys.exit(7)\nif "status" in a:pathlib.Path('+repr(str(status_marker))+').write_text("unsafe")\nos.execv('+repr(native)+',['+repr(native)+',*a])\n') + wrapper.chmod(0o700) + rejected=self.census(git=str(wrapper));self.assertFalse(rejected['complete']) + self.assertTrue(any(e['kind']=='unsafe_configuration'for e in rejected['errors'])) + self.assertFalse(status_marker.exists());self.assertFalse(any(p.exists()for p in markers)) + # Simulate a Git implementation that ignores the separate config transport. + ignored=Path(self.temp.name)/'git-ignores-config-environment' + ignored.write_text('#!/usr/bin/env python3\nimport os,pathlib,sys\na=sys.argv[1:]\nif "status" in a:pathlib.Path('+repr(str(status_marker))+').write_text("unsafe")\nfor key in list(os.environ):\n if key=="GIT_CONFIG_COUNT" or key.startswith(("GIT_CONFIG_KEY_","GIT_CONFIG_VALUE_")):os.environ.pop(key)\nos.execv('+repr(native)+',['+repr(native)+',*a])\n') + ignored.chmod(0o700) + unsupported=self.census(git=str(ignored));self.assertFalse(unsupported['complete']) + self.assertTrue(any(e['kind']=='unsafe_configuration'for e in unsupported['errors'])) + self.assertFalse(status_marker.exists());self.assertFalse(any(p.exists()for p in markers)) + + def test_ordinary_head_objects_assets_do_not_hide_nested_repositories(self): + outer=self.repo('outer');assets=outer/'assets';assets.mkdir() + (assets/'HEAD').write_text('ordinary asset, not Git metadata\n');(assets/'objects').mkdir() + nested=self.repo('outer/assets/nested');deep=self.repo('outer/assets/objects/deep') + alias=self.root/'objects-alias';alias.symlink_to(assets/'objects',target_is_directory=True) + d=self.census();self.assertTrue(d['complete'],d['errors']) + self.assertTrue({str(outer),str(nested),str(deep)}.issubset(d['discovered_roots'])) + self.assertNotIn(str(assets),d['discovered_roots']) + self.assertTrue({str(nested),str(deep)}.issubset({w['path']for w in d['worktrees']})) + self.assertNotIn('not_followed',next(s for s in d['symlinks']if s['path']==str(alias))) + out=Path(self.temp.name)/'assets-cli.json' + result=subprocess.run([sys.executable,'-S','-B',str(TOOL),'--root',str(self.root),'--output',str(out)],capture_output=True) + self.assertEqual(result.returncode,0,result.stderr) + self.assertTrue({str(nested),str(deep)}.issubset(json.loads(out.read_bytes())['discovered_roots'])) + + def test_remote_redaction_preserves_all_filesystem_identity_fields(self): + self.root=self.root/'root?token=root-value';self.root.mkdir() + repo=self.repo('repo?token=first');second=self.repo('repo?token=second') + names=['untracked?token=first','untracked?token=second','line\nname\t'+os.fsdecode(b'\xff')] + for name in names:(repo/name).write_text('fixture\n') + self.git(repo,'remote','add','origin','https://private-user:private-password@example.invalid/repo?token=remote-secret') + linked=self.root/'linked?token=worktree';self.git(repo,'worktree','add','-qb','linked',str(linked)) + alias=self.root/'alias?token=link';alias.symlink_to(repo,target_is_directory=True) + d=self.census();self.assertTrue(d['complete'],d['errors']) + self.assertEqual(d['root'],str(self.root)) + self.assertTrue({str(repo),str(second),str(linked)}.issubset(d['discovered_roots'])) + work=next(w for w in d['worktrees']if w['path']==str(repo)) + self.assertEqual({r['path']for r in work['status']},set(names)) + self.assertEqual(work['git_dir'],str(repo/'.git'));self.assertEqual(work['common_store'],str(repo/'.git')) + store=next(s for s in d['stores']if s['path']==str(repo/'.git')) + self.assertTrue({str(repo),str(linked)}.issubset({r['worktree']for r in store['registered_worktrees']})) + link=next(s for s in d['symlinks']if s['path']==str(alias));self.assertEqual(link['target'],str(repo)) + raw=json.dumps(d);self.assertNotIn('private-password',raw);self.assertNotIn('remote-secret',raw) + self.assertNotIn('private-user',raw);self.assertIn('REDACTED',raw) + out=Path(self.temp.name)/'paths-cli.json' + result=subprocess.run([sys.executable,'-S','-B',str(TOOL),'--root',str(self.root),'--output',str(out)],capture_output=True) + self.assertEqual(result.returncode,0,result.stderr) + cli=json.loads(out.read_bytes());self.assertEqual(cli['root'],str(self.root)) + self.assertEqual(next(w for w in cli['worktrees']if w['path']==str(repo))['status'],work['status']) + bad=self.root/'bad?token=error-secret';bad.mkdir();(bad/'.git').write_text('invalid\n') + external=Path(self.temp.name)/'outside?token=external-value';external.mkdir() + (self.root/'external?token=link').symlink_to(external,target_is_directory=True) + incomplete=self.census();self.assertFalse(incomplete['complete']) + error=next(e for e in incomplete['errors']if e['path']==str(bad)) + self.assertNotIn('error-secret',error['stderr']);self.assertIn('REDACTED',error['stderr']) + self.assertEqual(next(e for e in incomplete['errors']if e['kind']=='external_directory_symlink')['target'],str(external)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_workspace_git_inventory_mutations.py b/tests/test_workspace_git_inventory_mutations.py new file mode 100644 index 000000000..d4322ce3b --- /dev/null +++ b/tests/test_workspace_git_inventory_mutations.py @@ -0,0 +1,311 @@ +"""CLI and false-success controls for the census mutation self-test runner.""" +import hashlib +import json +import os +from pathlib import Path +import shutil +import stat +import subprocess +import sys +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parents[1] + + +class MutationRunnerTests(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.source = self.root / 'source' + (self.source / 'tools').mkdir(parents=True) + (self.source / 'tests').mkdir() + for path in ['tools/workspace_git_inventory.py', 'tools/workspace_git_inventory_mutations.py', 'tests/test_workspace_git_inventory.py']: + shutil.copyfile(ROOT / path, self.source / path) + self.runner = self.source / 'tools/workspace_git_inventory_mutations.py' + self.output = self.root / 'evidence' + + def run_cli(self, *, override=None, env=None, output=True): + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + if override is None: + command = [*interpreter, str(self.runner)] + else: + driver = ( + 'import importlib.util,sys\n' + 'p=sys.argv[1];s=importlib.util.spec_from_file_location("runner",p)\n' + 'm=importlib.util.module_from_spec(s);s.loader.exec_module(m)\n' + + override + '\n' + 'sys.argv=[p]+sys.argv[2:];raise SystemExit(m.main())\n') + command = [*interpreter, '-c', driver, str(self.runner)] + if output: + command += ['--output', str(self.output)] + return subprocess.run(command, cwd=self.root, env=env, capture_output=True, text=True, timeout=90) + + def report(self): + return json.loads((self.output / 'results.json').read_bytes()) + + def reject_lifecycle_assertion(self, stage): + copied = self.source / 'tests/test_workspace_git_inventory.py' + control = '\n# Owned temporary lifecycle negative control; original assertions retained.\n' + control += '_original_setup=InventoryTests.setUp\n_original_teardown=InventoryTests.tearDown\n' + if stage == 'tearDown': + control += ('def _controlled_teardown(self):\n' + ' _original_teardown(self)\n' + ' if TOOL.name != "workspace_git_inventory.py":self.fail("CONTROL tearDown assertion")\n' + 'InventoryTests.tearDown=_controlled_teardown\n') + else: + control += ('def _cleanup_assertion(case):case.fail("CONTROL cleanup assertion")\n' + 'def _controlled_setup(self):\n' + ' _original_setup(self)\n' + ' if TOOL.name != "workspace_git_inventory.py":\n') + control += (' self.fail("CONTROL setUp assertion")\n' if stage == 'setUp' else + ' self.addCleanup(_cleanup_assertion,self)\n') + control += 'InventoryTests.setUp=_controlled_setup\n' + with copied.open('a') as stream: + stream.write(control) + # All seven scratch sources deliberately survive. Only the lifecycle + # assertion fails; no canonical test or production source is weakened. + result = self.run_cli(override='m.CASES=[(n,o,o,t) for n,o,_new,t in m.CASES]') + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) + report = self.report() + self.assertTrue(report['baseline']['passed']) + self.assertEqual(len(report['mutations']), 7) + self.assertFalse(report['all_detected']) + self.assertFalse(report['complete']) + for row in report['mutations']: + self.assertEqual(row['failures'], 1) + self.assertEqual(row['errors'], 0) + self.assertFalse(row['detected_by_assertion']) + self.assertEqual(row['body_calls'], 0 if stage == 'setUp' else 1) + self.assertEqual(row['issues'][0]['phase'], stage) + self.assertFalse(row['issues'][0]['origin_in_test_body']) + + def test_setup_assertion_cannot_count_as_mutation_detection(self): + self.reject_lifecycle_assertion('setUp') + + def test_teardown_assertion_cannot_count_as_mutation_detection(self): + self.reject_lifecycle_assertion('tearDown') + + def test_cleanup_assertion_cannot_count_as_mutation_detection(self): + self.reject_lifecycle_assertion('cleanup') + + def test_child_optimization_matches_companion(self): + copied = self.source / 'tests/test_workspace_git_inventory.py' + with copied.open('a') as stream: + stream.write('\nimport sys\n_optimization_setup=InventoryTests.setUp\n' + 'def _require_optimization(self):\n' + ' _optimization_setup(self)\n' + ' self.assertEqual(sys.flags.optimize,' + str(sys.flags.optimize) + ')\n' + 'InventoryTests.setUp=_require_optimization\n') + result = self.run_cli() + self.assertEqual(result.returncode, 0, result.stderr + result.stdout) + report = self.report() + self.assertTrue(report['complete']) + self.assertEqual(report['baseline']['optimization'], sys.flags.optimize) + self.assertTrue(all(row['optimization'] == sys.flags.optimize for row in report['mutations'])) + + def test_deferred_test_bodies_cannot_pass_baseline(self): + copied = self.source / 'tests/test_workspace_git_inventory.py' + original = copied.read_text() + controls = { + 'coroutine': 'async def _unsupported(self):\n self.fail("unexecuted coroutine body")\n', + 'generator': 'def _unsupported(self):\n yield None\n self.fail("unexecuted generator body")\n', + 'async_generator': 'async def _unsupported(self):\n yield None\n self.fail("unexecuted async-generator body")\n', + 'returned_generator': 'def _deferred(self):\n yield None\n self.fail("unexecuted returned generator")\ndef _unsupported(self):\n return _deferred(self)\n', + } + for kind, control in controls.items(): + copied.write_text(original + '\n' + control + + 'InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors=_unsupported\n') + self.output = self.root / ('unsupported-' + kind) + result = self.run_cli() + self.assertEqual(result.returncode, 1, kind + ': ' + result.stdout + result.stderr) + report = self.report() + self.assertFalse(report['baseline']['passed'], kind) + self.assertEqual(report['baseline']['unsupported_bodies'], 1, kind) + self.assertEqual(report['mutations'], [], kind) + self.assertFalse(report['complete'], kind) + + def reject_population(self, control, *, loaded_valid): + copied = self.source / 'tests/test_workspace_git_inventory.py' + with copied.open('a') as stream: + stream.write('\n' + control) + result = self.run_cli() + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) + report = self.report() + self.assertFalse(report['baseline']['passed']) + self.assertFalse(report['baseline']['population_valid']) + self.assertEqual(report['baseline']['loaded_population_valid'], loaded_valid) + self.assertEqual(report['mutations'], []) + self.assertFalse(report['complete']) + return report['baseline'] + + def callback_control(self, body): + copied = self.source / 'tests/test_workspace_git_inventory.py' + with copied.open('a') as stream: + stream.write('\nimport sys\ndef _callback_control(original):\n' + ' def controlled(self):\n' + ' if TOOL.name=="workspace_git_inventory.py":return original(self)\n' + body + + ' return controlled\n' + 'for _name in list(vars(InventoryTests)):\n' + ' if _name.startswith("test_"):setattr(InventoryTests,_name,_callback_control(getattr(InventoryTests,_name)))\n') + result = self.run_cli() + self.assertEqual(result.returncode, 1, result.stderr + result.stdout) + report = self.report() + self.assertTrue(report['baseline']['passed']) + self.assertFalse(report['complete']) + self.assertEqual(len(report['mutations']), 7) + self.assertTrue(all(not r['detected_by_assertion'] for r in report['mutations'])) + return report + + def test_callback_without_escaping_assertion_cannot_kill(self): + report = self.callback_control( + ' try:self.fail("CONTROL swallowed callback assertion")\n' + ' except AssertionError:self._outcome.result.addFailure(self,sys.exc_info())\n') + for row in report['mutations']: + self.assertTrue(row['population_valid']) + self.assertEqual(row['failures'], 1) + self.assertEqual(row['errors'], 0) + self.assertFalse(row['issues'][0]['escaping_assertion']) + + def test_native_and_foreign_subtest_reports_are_unsupported(self): + copied = self.source / 'tests/test_workspace_git_inventory.py' + original = copied.read_text() + for kind, body in [ + ('native', ' with self.subTest(control="native"):self.fail("CONTROL subtest")\n'), + ('foreign', ' foreign=unittest.FunctionTestCase(lambda:None)\n' + ' subtest=unittest.case._SubTest(foreign,"CONTROL foreign",{})\n' + ' try:self.fail("CONTROL foreign subtest")\n' + ' except AssertionError:self._outcome.result.addSubTest(foreign,subtest,sys.exc_info())\n')]: + copied.write_text(original) + self.output = self.root / ('subtest-' + kind) + report = self.callback_control(body) + self.assertTrue(all(row['subtests'] == 1 for row in report['mutations']), kind) + self.assertTrue(all(row['failures'] == 1 and row['errors'] == 0 for row in report['mutations']), kind) + copied.write_text(original + '\n_original_setup=InventoryTests.setUp\n' + 'def _passing_subtest(self):\n' + ' _original_setup(self)\n' + ' with self.subTest(control="passing fixture subtest"):pass\n' + 'InventoryTests.setUp=_passing_subtest\n') + self.output = self.root / 'passing-baseline-subtests' + result = self.run_cli() + self.assertEqual(result.returncode, 1, result.stdout + result.stderr) + self.assertEqual(self.report()['baseline']['subtests'], 14) + self.assertFalse(self.report()['baseline']['passed']) + self.assertEqual(self.report()['mutations'], []) + + def test_loader_cannot_replace_population_with_duplicate_method(self): + baseline = self.reject_population( + 'def load_tests(loader,tests,pattern):\n' + ' return unittest.TestSuite(InventoryTests("test_unborn_and_detached_heads_are_observations_not_errors") for _ in range(14))\n', + loaded_valid=False) + self.assertEqual(baseline['tests_run'], 14) + self.assertEqual(len(set(baseline['loaded_tests'])), 1) + self.assertEqual(len(set(baseline['body_completed_tests'])), 1) + + def test_loader_cannot_substitute_unexpected_class(self): + self.reject_population( + 'class OtherInventoryTests(InventoryTests):pass\n' + 'def load_tests(loader,tests,pattern):\n' + ' return loader.loadTestsFromTestCase(OtherInventoryTests)\n', loaded_valid=False) + + def test_loader_cannot_rebind_pristine_class_identity(self): + self.reject_population( + 'def load_tests(loader,tests,pattern):\n' + ' class OtherInventoryTests(InventoryTests):pass\n' + ' OtherInventoryTests.__module__=InventoryTests.__module__\n' + ' OtherInventoryTests.__qualname__=InventoryTests.__qualname__\n' + ' globals()["InventoryTests"]=OtherInventoryTests\n' + ' return loader.loadTestsFromTestCase(OtherInventoryTests)\n', loaded_valid=False) + + def test_loader_cannot_alias_expected_methods_to_one_body(self): + self.reject_population( + 'def load_tests(loader,tests,pattern):\n' + ' body=InventoryTests.test_unborn_and_detached_heads_are_observations_not_errors\n' + ' for name in loader.getTestCaseNames(InventoryTests):setattr(InventoryTests,name,body)\n' + ' return tests\n', loaded_valid=False) + + def test_loaded_population_must_actually_execute_each_expected_body(self): + baseline = self.reject_population( + 'class RepeatedExecution(unittest.TestSuite):\n' + ' def run(self,result,debug=False):\n' + ' case=next(c for c in self._tests[0] if c._testMethodName=="test_unborn_and_detached_heads_are_observations_not_errors")\n' + ' for _ in range(14):case.run(result)\n' + ' return result\n' + 'def load_tests(loader,tests,pattern):return RepeatedExecution(tests)\n', loaded_valid=True) + self.assertEqual(baseline['tests_run'], 14) + self.assertEqual(baseline['body_calls'], 14) + self.assertEqual(len(set(baseline['loaded_tests'])), 14) + self.assertEqual(len(set(baseline['started_tests'])), 1) + self.assertEqual(len(set(baseline['body_completed_tests'])), 1) + + def test_requires_new_output_and_keeps_private_success_evidence(self): + missing = self.run_cli(output=False) + self.assertEqual(missing.returncode, 2) + self.assertFalse(self.output.exists()) + result = self.run_cli() + self.assertEqual(result.returncode, 0, result.stderr + result.stdout) + report = self.report() + self.assertTrue(report['complete']) + self.assertTrue(report['baseline']['passed']) + self.assertEqual(report['baseline']['tests_run'], 14) + self.assertEqual(len(report['mutations']), 7) + self.assertTrue(all(row['detected_by_assertion'] for row in report['mutations'])) + self.assertEqual(stat.S_IMODE(self.output.stat().st_mode), 0o700) + for path in self.output.iterdir(): + self.assertEqual(stat.S_IMODE(path.stat().st_mode), 0o600) + before = {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in self.output.iterdir()} + repeated = self.run_cli() + self.assertEqual(repeated.returncode, 2) + self.assertEqual(before, {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in self.output.iterdir()}) + + def test_failed_baseline_never_runs_mutations(self): + fake = self.root / 'bin' + fake.mkdir() + git = fake / 'git' + git.write_text('#!/bin/sh\nexit 7\n') + git.chmod(0o700) + env = os.environ.copy() + env['PATH'] = str(fake) + os.pathsep + env['PATH'] + result = self.run_cli(env=env) + self.assertEqual(result.returncode, 1, result.stderr) + report = self.report() + self.assertFalse(report['baseline']['passed']) + self.assertEqual(report['mutations'], []) + self.assertFalse(report['complete']) + + def test_zero_test_baseline_cannot_report_success(self): + result = self.run_cli(override='m.DRIVER=m.DRIVER.replace("unittest.defaultTestLoader.loadTestsFromModule(module)","unittest.TestSuite()")') + self.assertEqual(result.returncode, 1, result.stderr) + report = self.report() + self.assertEqual(report['baseline']['tests_run'], 0) + self.assertTrue(report['baseline']['successful']) + self.assertFalse(report['baseline']['passed']) + self.assertEqual(report['mutations'], []) + self.assertFalse(report['complete']) + + def test_surviving_mutant_is_failure(self): + result = self.run_cli(override='n,o,_new,t=m.CASES[0];m.CASES[0]=(n,o,o,t)') + self.assertEqual(result.returncode, 1, result.stderr) + report = self.report() + self.assertTrue(report['baseline']['passed']) + self.assertEqual(report['mutations'][0]['returncode'], 0) + self.assertFalse(report['mutations'][0]['detected_by_assertion']) + self.assertFalse(report['all_detected']) + self.assertFalse(report['complete']) + + def test_test_error_cannot_count_as_mutation_detection(self): + result = self.run_cli(override='n,o,new,_t=m.CASES[0];m.CASES[0]=(n,o,new,"nonexistent_test")') + self.assertEqual(result.returncode, 1, result.stderr) + report = self.report() + self.assertTrue(report['baseline']['passed']) + self.assertEqual(report['mutations'][0]['errors'], 1) + self.assertFalse(report['mutations'][0]['detected_by_assertion']) + self.assertFalse(report['all_detected']) + self.assertFalse(report['complete']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/workspace_git_inventory.py b/tools/workspace_git_inventory.py new file mode 100644 index 000000000..1889a5b72 --- /dev/null +++ b/tools/workspace_git_inventory.py @@ -0,0 +1,543 @@ +#!/usr/bin/env python3 +"""Read-only recursive Git observations, not a clean-state or mathematical certificate. + +Search every physical directory, including ignored/node_modules directories, +except Git metadata internals. Follow internal directory symlinks once by inode; +record external directory links as uncovered boundaries (incomplete/nonzero). +Git output uses NUL records. JSON ensure_ascii preserves arbitrary path bytes +through Python's filesystem surrogateescape convention. No network is needed. +""" +from __future__ import annotations + +import argparse +import datetime +import json +import math +import os +from pathlib import Path +import re +import selectors +import signal +import subprocess +import time + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _text(raw): + return os.fsdecode(raw) + + +def _line(raw): + return _text(raw[:-1] if raw.endswith(b'\n') else raw) + + +def _redact(value): + if isinstance(value, dict): + return {key: _redact(item) for key, item in value.items()} + if isinstance(value, list): + return [_redact(item) for item in value] + if not isinstance(value, str): + return value + value = re.sub(r'([A-Za-z][A-Za-z0-9+.-]*://)[^/\s]+@', + r'\1[REDACTED]@', value) + value = re.sub(r'(?i)([?&](?:access_token|token|password|passwd|secret|signature|key|auth)=)[^&#\s]*', + r'\1[REDACTED]', value) + return value + + +def _remote_url(value): + value = _redact(value) + if '://' not in value: + value = re.sub(r'^[^/\s]+@(?=[^/:\s]+:)', '[REDACTED]@', value) + return value + + +class Git: + def __init__(self, git, command_timeout, total_timeout, max_command_bytes): + self.executable = git + self.command_timeout = command_timeout + self.deadline = time.monotonic() + total_timeout + self.max_bytes = max_command_bytes + self.errors = [] + self.commands = 0 + self.metadata_cache = {} + self.configuration_complete = True + self.env = os.environ.copy() + for name in ['GIT_DIR', 'GIT_WORK_TREE', 'GIT_COMMON_DIR', 'GIT_INDEX_FILE', + 'GIT_OBJECT_DIRECTORY', 'GIT_ALTERNATE_OBJECT_DIRECTORIES', 'GIT_NAMESPACE']: + self.env.pop(name, None) + for name in list(self.env): + if name in ('GIT_CONFIG_COUNT', 'GIT_CONFIG_PARAMETERS') or name.startswith(('GIT_CONFIG_KEY_', 'GIT_CONFIG_VALUE_')): + self.env.pop(name) + self.env.update(GIT_OPTIONAL_LOCKS='0', GIT_TERMINAL_PROMPT='0', GIT_NO_LAZY_FETCH='1') + self.base = ['core.fsmonitor=false', 'core.untrackedCache=false', + 'core.hooksPath=/dev/null', 'maintenance.auto=false', 'gc.auto=0', + 'core.quotePath=false', 'protocol.allow=never'] + self.base += ['protocol.' + name + '.allow=never' + for name in ['http', 'https', 'ssh', 'git', 'file', 'ext']] + + def error(self, kind, path, operation, **detail): + diagnostics = {key: _redact(value) if key in ('message', 'stderr') else value + for key, value in detail.items()} + self.errors.append({'kind': kind, 'path': str(path), 'operation': _redact(operation), **diagnostics}) + + def expired(self): + return time.monotonic() >= self.deadline + + def run(self, cwd, *args, allowed=(0,), settings=(), expected_stderr_on=()): + operation = ' '.join(args[:3]) + remaining = self.deadline - time.monotonic() + if remaining <= 0: + self.error('deadline', cwd, operation) + return None + command = [self.executable, '--no-optional-locks'] + # All override values here are fixed strings without '='. Split at the + # LAST separator, then transport key/value separately (Git >= 2.31). + # This also propagates intact through Git's recursive submodule status. + environment = self.env.copy() + overrides = [*self.base, *settings] + environment['GIT_CONFIG_COUNT'] = str(len(overrides)) + for number, setting in enumerate(overrides): + key, _, value = setting.rpartition('=') + environment['GIT_CONFIG_KEY_' + str(number)] = key + environment['GIT_CONFIG_VALUE_' + str(number)] = value + command += ['-C', str(cwd), *args] + self.commands += 1 + try: + process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + env=environment, start_new_session=True) + except OSError as exc: + self.error('spawn', cwd, operation, message=str(exc)) + return None + streams = {process.stdout: bytearray(), process.stderr: bytearray()} + selector = selectors.DefaultSelector() + for stream in streams: + selector.register(stream, selectors.EVENT_READ) + cutoff = time.monotonic() + min(self.command_timeout, remaining) + failure = None + try: + while selector.get_map(): + if time.monotonic() >= cutoff: + failure = 'timeout' + break + for key, _ in selector.select(min(.1, max(0, cutoff - time.monotonic()))): + chunk = os.read(key.fd, 65536) + if not chunk: + selector.unregister(key.fileobj) + continue + if sum(len(b) for b in streams.values()) + len(chunk) > self.max_bytes: + failure = 'output_limit' + break + streams[key.fileobj].extend(chunk) + if failure: + break + if not failure: + try: + code = process.wait(timeout=max(0, cutoff - time.monotonic())) + except subprocess.TimeoutExpired: + failure = 'timeout' + if failure: + try: + os.killpg(process.pid, signal.SIGKILL) + except ProcessLookupError: + pass + try: + code = process.wait(timeout=1) + except subprocess.TimeoutExpired: + self.error('child_not_reaped', cwd, operation, pid=process.pid) + code = None + finally: + selector.close() + for stream in streams: + stream.close() + out, err = bytes(streams[process.stdout]), bytes(streams[process.stderr]) + if failure: + self.error(failure, cwd, operation, stderr=_text(err), output_bytes=len(out)) + return None + if code not in allowed or (err and code not in expected_stderr_on): + self.error('git_error' if code not in allowed else 'git_stderr', cwd, operation, + returncode=code, stderr=_text(err)) + return None + return code, out + + +def _is_git_metadata(directory, git): + try: + directory = Path(directory).resolve() + except (OSError, RuntimeError) as exc: + git.error('filesystem', directory, 'metadata validation', message=str(exc)) + return False + if directory not in git.metadata_cache: + if not ((directory / 'HEAD').is_file() and + ((directory / 'objects').is_dir() or (directory / 'commondir').is_file())): + git.metadata_cache[directory] = False + return False + # --resolve-git-dir validates THIS candidate, without ancestor discovery. + # Exit 128 is an expected negative probe, not permission to prune it. + result = git.run(directory, 'rev-parse', '--resolve-git-dir', str(directory), + allowed=(0, 128), expected_stderr_on=(128,)) + exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory + git.metadata_cache[directory] = exact + return git.metadata_cache[directory] + + +def _discover(root, git): + stack = [root] + visited = set() + roots = set() + symlinks = [] + skipped_metadata = [] + while stack: + if git.expired(): + git.error('deadline', root, 'recursive discovery', pending_directories=len(stack)) + break + directory = stack.pop() + try: + stat = directory.stat() + identity = stat.st_dev, stat.st_ino + if identity in visited: + continue + visited.add(identity) + if os.path.lexists(directory / '.git'): + roots.add(str(directory.resolve())) + # Prune only exact, validated Git metadata, including bare stores. + if _is_git_metadata(directory, git): + roots.add(str(directory.resolve())) + skipped_metadata.append(str(directory)) + continue + with os.scandir(directory) as entries: + for entry in entries: + if git.expired(): + git.error('deadline', directory, 'recursive discovery') + break + if entry.name == '.git' and _is_git_metadata(Path(entry.path), git): + skipped_metadata.append(entry.path) + continue + try: + if entry.is_symlink(): + target = Path(entry.path).resolve() + is_directory = entry.is_dir() + record = {'path': entry.path, 'target': str(target), + 'directory': is_directory, 'exists': target.exists()} + symlinks.append(record) + if is_directory: + if any(_is_git_metadata(parent, git) for parent in target.parents): + record['not_followed'] = 'Git metadata internals' + skipped_metadata.append(str(target)) + elif target.is_relative_to(root): + stack.append(target) + else: + git.error('external_directory_symlink', entry.path, + 'recursive discovery', target=str(target)) + continue + if entry.is_dir(follow_symlinks=False): + stack.append(Path(entry.path)) + except (OSError, RuntimeError) as exc: + git.error('filesystem', entry.path, 'recursive discovery', message=str(exc)) + except OSError as exc: + git.error('filesystem', directory, 'recursive discovery', message=str(exc)) + return sorted(roots), symlinks, skipped_metadata, len(visited) + + +def _config(git, cwd, pattern, source=(), settings=()): + result = git.run(cwd, 'config', *source, '--null', '--name-only', '--get-regexp', pattern, + allowed=(0, 1), settings=settings) + if result is None: + return {} + values = {} + for key in result[1].split(b'\0'): + if not key: + continue + name = _text(key) + value = git.run(cwd, 'config', *source, '--null', '--get-all', name, allowed=(0, 1), settings=settings) + if value is not None: + values[name] = [_text(v) for v in value[1].split(b'\0')[:-1]] + return values + + +def _settings_and_remotes(git, cwd): + # Reading config does not execute it. Disable filter programs for status; + # URL overrides and protocol denial also prevent lazy partial-clone fetch. + names = git.run(cwd, 'config', '--null', '--name-only', '--get-regexp', + r'^(filter\..*\.(clean|process|required)|remote\..*\.(url|pushurl|promisor)|protocol\..*\.allow)$', + allowed=(0, 1)) + settings = [] + remotes = {} + if names is None: + git.configuration_complete = False + return settings, [] + for raw in names[1].split(b'\0'): + if not raw: + continue + key = _text(raw) + if key.startswith('filter.'): + prefix = key.rsplit('.', 1)[0] + settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false'] + elif key.startswith('protocol.'): + settings.append(key + '=never') + elif key.startswith('remote.'): + name, field = key[7:].rsplit('.', 1) + settings += ['remote.' + name + '.url=', 'remote.' + name + '.pushurl=', + 'remote.' + name + '.promisor=false'] + row = remotes.setdefault(name, {'name': name, 'fetch_urls': [], 'push_urls': []}) + if field in ('url', 'pushurl'): + result = git.run(cwd, 'config', '--null', '--get-all', key, allowed=(0, 1)) + if result is not None: + row['fetch_urls' if field == 'url' else 'push_urls'] = [ + _remote_url(_text(v)) for v in result[1].split(b'\0')[:-1]] + return list(dict.fromkeys(settings)), list(remotes.values()) + + +def _refs(git, cwd, settings, prefixes=()): + result = git.run(cwd, 'for-each-ref', + '--format=%(refname)%00%(objectname)%00%(objecttype)%00%(*objectname)%00%(*objecttype)%00%(symref)%00', + *prefixes, settings=settings) + rows = [] + if result is None: + return rows + fields = result[1].split(b'\0') + if fields[-1] in (b'', b'\n'): + fields.pop() + if len(fields) % 6: + git.error('parse', cwd, 'refs', message='Invalid NUL field count') + return rows + for i in range(0, len(fields), 6): + names = ['name', 'object', 'type', 'peeled_object', 'peeled_type', 'symbolic_target'] + row = dict(zip(names, map(_text, fields[i:i + 6]))) + row['name'] = row['name'].removeprefix('\n') + rows.append(row) + return rows + + +def _registered_worktrees(git, cwd, settings): + result = git.run(cwd, 'worktree', 'list', '--porcelain', '-z', settings=settings) + rows = [] + if result is None: + return rows + for block in result[1].split(b'\0\0'): + if not block: + continue + row = {} + for field in block.split(b'\0'): + if not field: + continue + key, _, value = field.partition(b' ') + row[_text(key)] = (_redact(_text(value)) if key in (b'locked', b'prunable') else _text(value)) if value else True + if 'worktree' not in row: + git.error('parse', cwd, 'worktree list', message='Missing worktree path') + else: + rows.append(row) + return rows + + +def _status(git, path, settings): + if not git.configuration_complete: + git.error('unsafe_configuration', path, 'status', message='Filter configuration discovery failed; status refused') + return None + # Fail closed if this Git does not honor separate config key/value transport, + # including keys with '='. Inspect final effective values before any status. + checks = ['core.fsmonitor=false', *(s for s in settings if s.startswith('filter.'))] + for setting in dict.fromkeys(checks): + key, _, expected = setting.rpartition('=') + result = git.run(path, 'config', '--null', '--get-all', key, allowed=(0, 1), settings=settings) + if (result is None or result[0] != 0 or not result[1].endswith(b'\0') or + result[1].split(b'\0')[-2] != os.fsencode(expected)): + git.error('unsafe_configuration', path, 'status', message='Configuration suppression could not be verified; status refused') + return None + result = git.run(path, 'status', '--porcelain=v1', '-z', '--untracked-files=all', + '--ignore-submodules=none', settings=settings) + if result is None: + return None + fields = result[1].split(b'\0') + if fields[-1] == b'': + fields.pop() + rows = [] + i = 0 + while i < len(fields): + raw = fields[i] + i += 1 + if len(raw) < 4 or raw[2:3] != b' ': + git.error('parse', path, 'status', message='Invalid porcelain record') + return None + row = {'xy': _text(raw[:2]), 'path': _text(raw[3:])} + if b'R' in raw[:2] or b'C' in raw[:2]: + if i == len(fields): + git.error('parse', path, 'status', message='Missing rename origin') + return None + row['original_path'] = _text(fields[i]) + i += 1 + rows.append(row) + return rows + + +def _submodules(git, path, settings, bare, head): + result = git.run(path, *(['ls-tree', '-r', '-z', 'HEAD'] if bare else ['ls-files', '--stage', '-z']), + settings=settings) if not bare or head else (0, b'') + modules = {} + if result is not None: + for raw in result[1].split(b'\0'): + if not raw: + continue + header, separator, name = raw.partition(b'\t') + fields = header.split() + if not separator or len(fields) != 3: + git.error('parse', path, 'submodule index/tree', message='Invalid entry') + continue + if fields[0] == b'160000': + modules[_text(name)] = {'path': _text(name), 'object': _text(fields[2] if bare else fields[1]), + 'index_stage': None if bare else int(fields[2])} + source = ('--blob', 'HEAD:.gitmodules') if bare else ('--file', str(path / '.gitmodules')) + if (bare and modules) or (not bare and (path / '.gitmodules').exists()): + config = _config(git, path, r'^submodule\..*\.(path|url)$', source, settings) + for key, values in config.items(): + if key.endswith('.path'): + name = key[len('submodule.'):-len('.path')] + for module_path in values: + row = modules.setdefault(module_path, {'path': module_path, 'object': None, 'index_stage': None}) + row['name'] = name + row['urls'] = [_remote_url(url) for url in config.get('submodule.' + name + '.url', [])] + for row in modules.values(): + row['initialized'] = False if bare else os.path.lexists(path / row['path'] / '.git') + return sorted(modules.values(), key=lambda row: os.fsencode(row['path'])) + + +def inventory(root, *, git='git', command_timeout=10, total_timeout=1800, max_command_bytes=32 * 1024 * 1024): + reader = Git(git, command_timeout, total_timeout, max_command_bytes) + try: + root = Path(root).resolve() + except (OSError, RuntimeError) as exc: + reader.error('filesystem', root, 'resolve root', message=str(exc)) + root = Path(os.path.abspath(root)) + report = {'schema_version': 1, 'started_at': _now(), 'root': str(root), + 'purpose': 'Observed Git census only; not a clean-state or mathematical certification', + 'non_atomic_observations': True, 'complete': False, 'errors': reader.errors, + 'policy': {'walk_exclusions': ['Validated exact Git metadata internals only; node_modules is searched'], + 'symlinks': 'Follow internal directory targets once by device/inode; record all links; external directory targets are uncovered/incomplete', + 'paths': 'NUL Git records; filesystem surrogateescape; JSON ensure_ascii=true', + 'read_only': 'Optional locks, hooks, filters, maintenance and lazy network fetch disabled; no Git mutation commands', + 'status': 'porcelain v1 -z --untracked-files=all; Git ignore rules still apply', + 'url_redaction': 'Remote URLs and diagnostic values only; filesystem identities preserved'}, + 'limits': {'git_timeout_seconds': command_timeout, 'total_timeout_seconds': total_timeout, + 'max_command_bytes': max_command_bytes}, 'stores': [], 'worktrees': []} + roots, links, skipped, directory_count = _discover(root, reader) + report.update(discovered_roots=roots, symlinks=links, git_metadata_not_traversed=skipped, + directories_visited=directory_count, empty_discovery=not roots) + stores = {} + candidates = {} + for path in roots: + if reader.expired(): + reader.error('deadline', path, 'repository census') + break + common = reader.run(path, 'rev-parse', '--path-format=absolute', '--git-common-dir') + if common is None: + continue + common_path = str(Path(_line(common[1])).resolve()) + if common_path not in stores: + settings, remotes = _settings_and_remotes(reader, path) + bare = reader.run(common_path, 'rev-parse', '--is-bare-repository', settings=settings) + shallow = reader.run(common_path, 'rev-parse', '--is-shallow-repository', settings=settings) + refs = [ref for ref in _refs(reader, path, settings) + if not ref['name'].startswith(('refs/worktree/', 'refs/bisect/', 'refs/rewritten/'))] + registered = _registered_worktrees(reader, path, settings) + store = {'path': common_path, 'representative': path, 'refs': refs, 'remotes': remotes, + 'bare': None if bare is None else _line(bare[1]) == 'true', + 'shallow': None if shallow is None else _line(shallow[1]) == 'true', + 'registered_worktrees': registered, 'stashes': []} + if any(row['name'] == 'refs/stash' for row in refs): + stashes = reader.run(path, 'stash', 'list', '-z', '--format=%H%x00%gd', settings=settings) + if stashes is not None: + fields = stashes[1].split(b'\0') + if fields[-1] == b'': + fields.pop() + if len(fields) % 2: + reader.error('parse', path, 'stash list', message='Invalid NUL field count') + else: + store['stashes'] = [{'object': _text(fields[i]), 'selector': _text(fields[i + 1])} + for i in range(0, len(fields), 2)] + stores[common_path] = store, settings + for row in registered: + candidates[str(Path(row['worktree']).resolve())] = common_path + inside = reader.run(path, 'rev-parse', '--is-inside-work-tree') + if inside is not None and _line(inside[1]) == 'true': + candidates[path] = common_path + # Include worktree-specific config, then propagate safe filter/remote + # overrides through Git's own recursive submodule status subprocesses too. + per_worktree_settings = {} + per_worktree_remotes = {} + for path in sorted(candidates): + if reader.expired(): + reader.error('deadline', path, 'worktree configuration') + break + if Path(path).is_dir(): + per_worktree_settings[path], per_worktree_remotes[path] = _settings_and_remotes(reader, path) + all_settings = list(dict.fromkeys(setting for _, settings in stores.values() + for setting in settings)) + all_settings += list(dict.fromkeys(setting for settings in per_worktree_settings.values() + for setting in settings)) + for path, common in sorted(candidates.items()): + if reader.expired(): + reader.error('deadline', path, 'worktree census') + break + work = {'path': path, 'common_store': common, 'observed_at': _now(), + 'exists': Path(path).is_dir(), 'head': None, 'branch': None, + 'status': None, 'submodules': [], 'remotes': per_worktree_remotes.get(path, [])} + report['worktrees'].append(work) + if not work['exists']: + reader.error('missing_worktree', path, 'worktree census') + continue + settings = list(dict.fromkeys([*stores[common][1], *all_settings])) + bare = reader.run(path, 'rev-parse', '--is-bare-repository', settings=settings) + work['bare'] = None if bare is None else _line(bare[1]) == 'true' + git_dir = reader.run(path, 'rev-parse', '--path-format=absolute', '--git-dir', settings=settings) + work['git_dir'] = None if git_dir is None else _line(git_dir[1]) + head = reader.run(path, 'rev-parse', '--verify', '--quiet', 'HEAD', allowed=(0, 1), settings=settings) + branch = reader.run(path, 'symbolic-ref', '--quiet', 'HEAD', allowed=(0, 1), settings=settings) + work['head'] = _line(head[1]) if head and head[0] == 0 else None + work['branch'] = _line(branch[1]) if branch and branch[0] == 0 else None + work['detached'] = branch is not None and branch[0] == 1 + work['unborn'] = work['head'] is None and work['branch'] is not None + work['local_refs'] = _refs(reader, path, settings, + ('refs/worktree', 'refs/bisect', 'refs/rewritten')) + if head is not None and work['head'] is None and work['branch'] is None: + reader.error('unresolved_head', path, 'HEAD identity') + if work['bare'] is False: + work['status'] = _status(reader, Path(path), settings) + work['submodules'] = _submodules(reader, Path(path), settings, work['bare'], work['head']) + final_head = reader.run(path, 'rev-parse', '--verify', '--quiet', 'HEAD', allowed=(0, 1), settings=settings) + if head is not None and final_head is not None and head != final_head: + reader.error('changed_during_observation', path, 'HEAD identity') + report['stores'] = [stores[path][0] for path in sorted(stores)] + report.update(finished_at=_now(), git_commands=reader.commands, complete=not reader.errors) + return report + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--root', type=Path, default=Path('/workspace')) + parser.add_argument('--output', type=Path, required=True) + parser.add_argument('--git', default='git') + parser.add_argument('--command-timeout', type=float, default=10) + parser.add_argument('--total-timeout', type=float, default=1800) + parser.add_argument('--max-command-bytes', type=int, default=32 * 1024 * 1024) + args = parser.parse_args() + if (not math.isfinite(args.command_timeout) or not math.isfinite(args.total_timeout) or + args.command_timeout <= 0 or args.total_timeout <= 0 or args.max_command_bytes <= 0): + parser.error('All resource limits must be positive and finite') + report = inventory(args.root, git=args.git, command_timeout=args.command_timeout, + total_timeout=args.total_timeout, max_command_bytes=args.max_command_bytes) + descriptor = os.open(args.output, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600) + with os.fdopen(descriptor, 'w', encoding='utf-8') as output: + os.fchmod(output.fileno(), 0o600) + json.dump(report, output, ensure_ascii=True, indent=2) + output.write('\n') + print(json.dumps({'output': str(args.output), 'complete': report['complete'], + 'stores': len(report['stores']), 'worktrees': len(report['worktrees']), + 'errors': len(report['errors'])})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/tools/workspace_git_inventory_mutations.py b/tools/workspace_git_inventory_mutations.py new file mode 100644 index 000000000..ae3a91cba --- /dev/null +++ b/tools/workspace_git_inventory_mutations.py @@ -0,0 +1,344 @@ +#!/usr/bin/env python3 +"""Verify the Git census baseline and seven adverse mutations, not Git cleanliness. + +Requires a NEW --output directory. Retains private logs, hashes and results there; +mutant sources exist only in an owned temporary directory. Uses Python stdlib. +""" +from __future__ import annotations + +import argparse +import datetime +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import tempfile + + +REQUIRED_BASELINE_TESTS = 14 +REQUIRED_MUTATIONS = 7 +EXPECTED_BASELINE_METHODS = ( + 'test_nested_linked_state_refs_stash_and_redacted_remotes', + 'test_submodule_bare_store_shallow_and_internal_symlink', + 'test_broken_marker_and_external_directory_boundary_are_not_silent', + 'test_cli_private_output_and_nonzero_incomplete', + 'test_hanging_git_is_killed_and_reported', + 'test_closed_streams_do_not_leave_a_hanging_child', + 'test_rename_arbitrary_path_bytes_and_symlink_cycle', + 'test_status_does_not_execute_configured_clean_filter', + 'test_output_limit_and_total_deadline_are_explicit', + 'test_metadata_directory_alias_does_not_escape_git_exclusion', + 'test_unborn_and_detached_heads_are_observations_not_errors', + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status', + 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories', + 'test_remote_redaction_preserves_all_filesystem_identity_fields', +) + +CASES = [ + ('exclude-node-modules', "if entry.name == '.git' and _is_git_metadata(Path(entry.path), git):", + "if entry.name == 'node_modules' or (entry.name == '.git' and _is_git_metadata(Path(entry.path), git)):", + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('disable-redaction', 'def _redact(value):\n', 'def _redact(value):\n return value\n', + 'test_nested_linked_state_refs_stash_and_redacted_remotes'), + ('execute-clean-filter', "settings += [prefix + '.clean=', prefix + '.process=', prefix + '.required=false']", + 'settings += []', 'test_status_does_not_execute_configured_clean_filter'), + ('false-complete', 'complete=not reader.errors', 'complete=True', + 'test_broken_marker_and_external_directory_boundary_are_not_silent'), + ('ambiguous-filter-key', "key, _, value = setting.rpartition('=')", "key, _, value = setting.partition('=')", + 'test_equals_filter_keys_are_suppressed_in_direct_and_recursive_status'), + ('unvalidated-metadata', + "exact = result is not None and result[0] == 0 and Path(_line(result[1])).resolve() == directory", + 'exact = True', 'test_ordinary_head_objects_assets_do_not_hide_nested_repositories'), + ('redact-path-identities', ' return report\n', ' return _redact(report)\n', + 'test_remote_redaction_preserves_all_filesystem_identity_fields'), +] + +DRIVER = r''' +import collections, importlib.util, inspect, json, os, pathlib, sys, unittest +test, tool, result, name, population = sys.argv[1:] +manifest = json.loads(population) +spec = importlib.util.spec_from_file_location('census_tests', test) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +module.TOOL = pathlib.Path(tool) +inventory_class = module.InventoryTests +canonical_prefix = spec.name + '.InventoryTests.' +pristine_methods = {method: getattr(inventory_class, method) for method in manifest['methods']} +pristine_codes = {method: getattr(function, '__code__', None) for method, function in pristine_methods.items()} +suite = (unittest.defaultTestLoader.loadTestsFromName('InventoryTests.' + name, module) + if name else unittest.defaultTestLoader.loadTestsFromModule(module)) +records = {} +loaded_tests, started_tests, body_started_tests, body_completed_tests = [], [], [], [] +loaded_classes, execution_classes = [], [] +expected_methods = manifest['methods'] +manifest_valid = (len(expected_methods) == manifest['count'] > 0 and + len(set(expected_methods)) == len(expected_methods) and + (not name or name in expected_methods)) +expected_tests = [canonical_prefix + method for method in ([name] if name else expected_methods)] + +def identity(case): + return type(case).__module__ + '.' + type(case).__qualname__ + '.' + str(getattr(case, '_testMethodName', '')) + +def pristine_method(case, method): + function = getattr(method, '__func__', method) + expected = pristine_methods.get(case._testMethodName) + return function is expected and expected is not None and function.__code__ is pristine_codes[case._testMethodName] + +def observe(destination, case, method=None): + destination.append(identity(case)) + actual = method if method is not None else getattr(case, case._testMethodName) + execution_classes.append(type(case) is inventory_class and pristine_method(case, actual)) + +def instrument(tests): + for case in tests: + if isinstance(case, unittest.TestSuite): + instrument(case) + continue + loaded_tests.append(identity(case)) + loaded_classes.append(type(case) is inventory_class) + method = getattr(case, case._testMethodName) + loaded_classes[-1] = loaded_classes[-1] and pristine_method(case, method) + function = getattr(method, '__func__', method) + record = {'phase': 'outside', 'raised': {}, 'body_calls': 0, 'escaping_assertion': None, + 'code': getattr(function, '__code__', None), + 'unsupported': (inspect.iscoroutinefunction(method) or inspect.isgeneratorfunction(method) or + inspect.isasyncgenfunction(method)), + 'inventory_case': type(case) is inventory_class, + 'designated': type(case) is inventory_class and case._testMethodName == name} + records[id(case)] = record + for attribute, phase in [('_callSetUp', 'setUp'), ('_callTestMethod', 'test_body'), + ('_callTearDown', 'tearDown'), ('_callCleanup', 'cleanup')]: + original = getattr(case, attribute) + def tracked(*args, _original=original, _phase=phase, _record=record, _case=case, **kwargs): + previous = _record['phase'] + _record['phase'] = _phase + if _phase == 'test_body': + body = args[0] + def invoke_body(): + if _record['unsupported']: + raise TypeError('Unsupported coroutine/generator test body') + _record['body_calls'] += 1 + observe(body_started_tests, _case, body) + try: + returned = body() + except BaseException as exc: + if isinstance(exc, AssertionError): + _record['escaping_assertion'] = exc + observe(body_completed_tests, _case, body) + raise + if inspect.isawaitable(returned) or inspect.isgenerator(returned) or inspect.isasyncgen(returned): + _record['unsupported'] = True + if inspect.iscoroutine(returned) or inspect.isgenerator(returned): + returned.close() + raise TypeError('Unsupported deferred test-body result') + observe(body_completed_tests, _case, body) + return returned + args = (invoke_body, *args[1:]) + try: + return _original(*args, **kwargs) + except BaseException as exc: + # Result.addFailure runs after unittest catches the exception, + # so retain the phase on this exception instead of a last-phase flag. + _record['raised'][id(exc)] = _phase + raise + finally: + _record['phase'] = previous + setattr(case, attribute, tracked) + +class AttributedResult(unittest.TextTestResult): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.issues = [] + self.subtests = 0 + + def startTest(self, case): + observe(started_tests, case) + super().startTest(case) + + def record_issue(self, case, err, kind): + record = records.get(id(case)) + phase = record['raised'].get(id(err[1]), record['phase']) if record else 'unknown_fixture' + traceback = err[2] + origin = False + while traceback is not None: + if (record and record['inventory_case'] and record['code'] is not None and + traceback.tb_frame.f_code is record['code']): + origin = True + traceback = traceback.tb_next + self.issues.append({'test': case.id(), 'kind': kind, 'phase': phase, + 'origin_in_test_body': origin, + 'escaping_assertion': bool(record and isinstance(err[1], AssertionError) and + record['escaping_assertion'] is err[1]), + 'designated': bool(record and record['designated'])}) + + def addFailure(self, case, err): + self.record_issue(case, err, 'failure') + super().addFailure(case, err) + + def addError(self, case, err): + self.record_issue(case, err, 'error') + super().addError(case, err) + + def addSubTest(self, case, subtest, err): + # This finite InventoryTests verifier supports no subtest protocol, + # including successful reports and callbacks with foreign parents. + self.subtests += 1 + if err is not None: + self.record_issue(case, err, 'failure' if issubclass(err[0], case.failureException) else 'error') + super().addSubTest(case, subtest, err) + +instrument(suite) +run = unittest.TextTestRunner(verbosity=2, resultclass=AttributedResult).run(suite) +loaded_population_valid = (manifest_valid and all(loaded_classes) and + collections.Counter(loaded_tests) == collections.Counter(expected_tests)) +execution_population_valid = (all(execution_classes) and + all(collections.Counter(actual) == collections.Counter(expected_tests) + for actual in (started_tests, body_started_tests, body_completed_tests))) +summary = {'tests_run': run.testsRun, 'successful': run.wasSuccessful(), + 'failures': len(run.failures), 'errors': len(run.errors), + 'skipped': len(run.skipped), 'expected_failures': len(run.expectedFailures), + 'unexpected_successes': len(run.unexpectedSuccesses), 'optimization': sys.flags.optimize, + 'unsupported_bodies': sum(record['unsupported'] for record in records.values()), + 'body_calls': sum(record['body_calls'] for record in records.values()), + 'designated_body_calls': sum(record['body_calls'] for record in records.values() if record['designated']), + 'body_failures': sum(issue['kind'] == 'failure' and issue['phase'] == 'test_body' and + issue['origin_in_test_body'] and issue['designated'] and issue['escaping_assertion'] for issue in run.issues), + 'subtests': run.subtests, + 'fixture_issues': sum(issue['phase'] != 'test_body' for issue in run.issues), + 'expected_tests': expected_tests, 'loaded_tests': loaded_tests, 'started_tests': started_tests, + 'body_started_tests': body_started_tests, 'body_completed_tests': body_completed_tests, + 'loaded_population_valid': loaded_population_valid, + 'execution_population_valid': execution_population_valid, + 'population_valid': loaded_population_valid and execution_population_valid, + 'issues': run.issues} +with os.fdopen(os.open(result, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'w') as output: + json.dump(summary, output) +raise SystemExit(0 if run.wasSuccessful() else 1) +''' + + +def _now(): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +def _sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def _write_json(path, value): + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as output: + json.dump(value, output, ensure_ascii=True, indent=2) + output.write('\n') + + +def _trial(test, tool, output, label, name='', timeout=20): + metrics = output / (label + '.json') + log = output / (label + '.log') + row = {'test': name or 'entire suite', 'log': log.name, 'metrics': metrics.name, + 'timeout_seconds': timeout} + interpreter = [sys.executable, '-S', '-B'] + if sys.flags.optimize: + interpreter.append('-' + 'O' * sys.flags.optimize) + with os.fdopen(os.open(log, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), 'wb') as stream: + child = subprocess.Popen([*interpreter, '-c', DRIVER, + str(test), str(tool), str(metrics), name, + json.dumps({'methods': EXPECTED_BASELINE_METHODS, 'count': REQUIRED_BASELINE_TESTS})], + stdout=stream, stderr=subprocess.STDOUT, start_new_session=True) + try: + row['returncode'] = child.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(child.pid, signal.SIGKILL) + child.wait() + row.update(returncode=child.returncode, error='timeout') + if 'error' not in row: + try: + row.update(json.loads(metrics.read_bytes())) + if row.get('optimization') != sys.flags.optimize: + row['error'] = 'Child optimization does not match companion' + except (OSError, ValueError) as exc: + row['error'] = 'Missing/invalid test metrics: ' + str(exc) + return row + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path, help='New private evidence directory') + args = parser.parse_args() + output = args.output.absolute() + try: + output.mkdir(mode=0o700) + output.chmod(0o700) + except OSError as exc: + parser.error('Cannot exclusively create output directory: ' + str(exc)) + os.umask(0o077) + root = Path(__file__).resolve().parents[1] + tool = root / 'tools/workspace_git_inventory.py' + test = root / 'tests/test_workspace_git_inventory.py' + report = {'schema_version': 1, 'purpose': 'Git census self-tests only; no mathematical certification or Git cleanliness claim', + 'started_at': _now(), 'python': sys.version, 'python_executable': sys.executable, + 'sources': {}, 'baseline': {}, 'mutations': [], 'errors': [], + 'complete': False, 'all_detected': False} + try: + original = tool.read_bytes() + for label, path in [('collector', tool), ('tests', test), ('runner', Path(__file__).resolve())]: + raw = path.read_bytes() + report['sources'][label] = {'path': str(path), 'sha256': _sha(raw), 'bytes': len(raw)} + baseline = _trial(test, tool, output, 'baseline', timeout=60) + baseline['passed'] = (baseline.get('returncode') == 0 and baseline.get('tests_run') == REQUIRED_BASELINE_TESTS and + baseline.get('population_valid') is True and + baseline.get('body_calls') == REQUIRED_BASELINE_TESTS and + baseline.get('unsupported_bodies') == 0 and + baseline.get('subtests') == 0 and + baseline.get('optimization') == sys.flags.optimize and 'error' not in baseline and + baseline.get('successful') is True and + all(baseline.get(key) == 0 for key in + ('failures', 'errors', 'skipped', 'expected_failures', 'unexpected_successes'))) + report['baseline'] = baseline + if baseline['passed']: + text = original.decode('utf-8') + with tempfile.TemporaryDirectory(prefix='workspace-git-inventory-mutations-') as temporary: + for name, old, new, selected in CASES: + if text.count(old) != 1: + raise ValueError('Mutation target is not unique: ' + name) + mutant = Path(temporary) / (name + '.py') + raw = text.replace(old, new).encode('utf-8') + mutant.write_bytes(raw) + row = _trial(test, mutant, output, name, selected) + row.update(mutation=name, source_sha256=_sha(original), mutant_sha256=_sha(raw), + replacement={'old': old, 'new': new}) + row['detected_by_assertion'] = ( + row.get('returncode') == 1 and row.get('tests_run') == 1 and + row.get('population_valid') is True and + row.get('failures') == 1 and row.get('successful') is False and + row.get('body_calls') == 1 and row.get('designated_body_calls') == 1 and + row.get('unsupported_bodies') == 0 and + row.get('subtests') == 0 and + row.get('body_failures') == 1 and row.get('fixture_issues') == 0 and + len(row.get('issues', [])) == 1 and row.get('optimization') == sys.flags.optimize and + all(row.get(key) == 0 for key in + ('errors', 'skipped', 'expected_failures', 'unexpected_successes')) and 'error' not in row) + report['mutations'].append(row) + else: + report['errors'].append('Baseline did not pass all ' + str(REQUIRED_BASELINE_TESTS) + ' tests without skips/errors; no mutations run') + for label, source in report['sources'].items(): + if _sha(Path(source['path']).read_bytes()) != source['sha256']: + report['errors'].append('Source changed during verification: ' + label) + report['all_detected'] = (len(report['mutations']) == REQUIRED_MUTATIONS and + all(row['detected_by_assertion'] for row in report['mutations'])) + report['complete'] = bool(baseline['passed'] and report['all_detected'] and not report['errors']) + except Exception as exc: + report['errors'].append(type(exc).__name__ + ': ' + str(exc)) + report['finished_at'] = _now() + _write_json(output / 'results.json', report) + print(json.dumps({'output': str(output), 'baseline_passed': report['baseline'].get('passed', False), + 'mutations': len(report['mutations']), 'all_detected': report['all_detected'], + 'complete': report['complete']})) + return 0 if report['complete'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main())