From fe659e7b7cd40ff5ae974cf22c1787104cdd11b9 Mon Sep 17 00:00:00 2001 From: AlexanderLevenskikh Date: Tue, 1 Dec 2026 18:25:00 +0500 Subject: [PATCH 1/2] revalidate a healthy late source event within the original capture budget --- .../2026-12-01/windows-react-46650876381.json | 1476 +++++++++++++++++ .../2026-12-01/windows-react-46650876381.md | 84 + .../windows-retention-revalidation.md | 91 + source_snapshot.py | 215 ++- tests/test_source_retention_revalidation.py | 198 +++ 5 files changed, 1989 insertions(+), 75 deletions(-) create mode 100644 docs/audits/2026-12-01/windows-react-46650876381.json create mode 100644 docs/audits/2026-12-01/windows-react-46650876381.md create mode 100644 docs/audits/2026-12-01/windows-retention-revalidation.md create mode 100644 tests/test_source_retention_revalidation.py diff --git a/docs/audits/2026-12-01/windows-react-46650876381.json b/docs/audits/2026-12-01/windows-react-46650876381.json new file mode 100644 index 0000000..36d46cc --- /dev/null +++ b/docs/audits/2026-12-01/windows-react-46650876381.json @@ -0,0 +1,1476 @@ +{ + "aggregate": { + "attempts": [ + { + "elapsedSeconds": 25.281, + "exitCode": 0, + "id": "attempt-01", + "outputSha256": "0999a1f53298b142422c94d53b170748792d802379be4cdf9fc62c9e789d0f44", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "ed3f91bd7316c40eb3756120c6277efb7445ba1eda211d1fb572dbc00cb62982" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "64916773e3c8159e961ff0e744657707d477c8378b6dad800bc3f26021bda1ed" + }, + "verification.json": { + "bytes": 7879, + "sha256": "3c8be6de0aa9430c0572ae6b02778938464e143b6b460c07df335ca0ec6855c6" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.141, + "exitCode": 0, + "id": "attempt-02", + "outputSha256": "c5ac45d8fa88f43bf4fdd61d9ce76a9a767a8bc84ea2b8b84d321383dd9c19fb", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "c2552018b83551a8fff3f0b72da520c0e56d19489b2bd580d30e3a07d69c692a" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "cb1d3f7110cb76a6f90a81130bf2de424014f8038f54f957021b2af0be362fb9" + }, + "verification.json": { + "bytes": 7878, + "sha256": "577b935635119d19c0097ddb13fa52ef9ff7b5e4cbf1ed86e5b4932429f9f74c" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.047, + "exitCode": 0, + "id": "attempt-03", + "outputSha256": "d6a6bd1364252e7f3b80bd7e053f255ca4ef98fcd25bf0b26da11e833d25dc1f", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "0d7c5ab322e92a9f23558e1a78da09c2c7e9dbf90f8684fb1f8cbb7226c40732" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "52771226302c9bab7f2f935c139f65973ed53f8286c322a387b1bc726c4b397a" + }, + "verification.json": { + "bytes": 7878, + "sha256": "f4ec925f0feb366eb250a013df7ae5e82df695f628aa4b3d8db45236db91fb30" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.047, + "exitCode": 0, + "id": "attempt-04", + "outputSha256": "b39ce0a3c8eae4cd771f953e8501a2ac607d202182a984ec51b0e0e975a3ff08", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "c5706cf252f6eaf3c54c1cb164064892870e486bee1f3f0799c6e0dc5c1a9acd" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "aa8ea7dec64df844832085204cd96b1fc6dfb19f31eb954e65f6fba5d57a9155" + }, + "verification.json": { + "bytes": 7879, + "sha256": "6672972056134d94638d7dcfd2531a609087414533002591368c4f12c7bf1b6b" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.14, + "exitCode": 0, + "id": "attempt-05", + "outputSha256": "d7db02aa4cc61869fd1eb3470b99f04568a9029ed43a2e84a088632db8ed4e49", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "6aa650947c2403e99809c49cee56233dafc74a2adbfaf26586bd2db8e4357e51" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "3707097305870666dfc9a960e4072085514248490f82ccad622f8a7c56ac8883" + }, + "verification.json": { + "bytes": 7879, + "sha256": "91c690e4fc02c2e7e99f3887585f263cbae431320a04fb85ae14c86910b0460e" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.141, + "exitCode": 0, + "id": "attempt-06", + "outputSha256": "11d632596b94984ea19f61355b452552e5f165cc8ca651141c19c72dff0b6faf", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "c7f196be2daa77f0af08a2ecd17c1e19336d37e3e5bf895d32d37b71ee585abb" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "f8b50f7160c04a09b20587d68b7b5a26256c5afe4e419103c37d08acf9e85a6b" + }, + "verification.json": { + "bytes": 7879, + "sha256": "644089cdc6efd08907a8f62d84e8d6eed614dcfc535e376e9159ed6d05cde0f1" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.093, + "exitCode": 0, + "id": "attempt-07", + "outputSha256": "39721fca1d3e0a4213e0f5d6851728e0b62f3e3729311945135d34ce3b961a36", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "15bec19e42b11397e5255ccc6244aa412364ed9d40c1d23412d2426ceafe5cd4" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "179ba03e54eec96c3abdca5f77996c57b330baba9a7364b66ef0741a19abbf44" + }, + "verification.json": { + "bytes": 7879, + "sha256": "b5bc94427949a4bab1e9d6f98602b671e375eaef78e3e0dd58031c3257c48918" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.172, + "exitCode": 0, + "id": "attempt-08", + "outputSha256": "ca5a3f304230eb0d0f17aa1d2be9cfb40a0759daa1f3ec42358ce792fda167ad", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "cb4ad263a9e87137c3351650014d2e3231c568ccc6d767975266ad4ccd92e9a9" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "449c81cb218c41dae9699c7128199218a03818f3090c8fc181d9dd1cb0f7de5d" + }, + "verification.json": { + "bytes": 7878, + "sha256": "aad7041a5eca22563d4d588f22ae1d22c7ea29ec4a50a9bc36aed68494c5985c" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.0, + "exitCode": 0, + "id": "attempt-09", + "outputSha256": "9491e55bf71348508f1c2b377c83213b42a72b0c7d17e6260ad385373789f398", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "955c9ce4dc46f00b3c42420fb7053169d5ef51a8004f43282500e2da07dee4e9" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "851a2733ba3084f2f5d5e1d38db0219f2a7d4b8b5f82d30038aac0ec841909f0" + }, + "verification.json": { + "bytes": 7878, + "sha256": "d4c7837fc7e2bc062af0042187b3da244f7a228f0277724c566128782cdb88d2" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 18.656, + "errorSha256": "45d205168ecb3b196e0c96cf75c6e5af779d112b616d6be9a5699d07e5ad368d", + "errorType": "ValueError", + "exitCode": 1, + "id": "attempt-10", + "outputSha256": "4a32ff0ad1d5b016c99a353e777f05f40288920c2e66b71e2dd428f0d71bcc75", + "receipts": { + "verification-diagnostics.json": { + "bytes": 6364, + "sha256": "fdd9f731cf07c812e464047c81a73b55cb8e211eb555da965c8bcf13cbd241bb" + }, + "verification.json": { + "bytes": 569, + "sha256": "6bb963e7797d5f3765bc82719356bf7964e00b8443e897b1073c75d2f660b311" + } + }, + "status": "FAIL", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 6094, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.093, + "exitCode": 0, + "id": "attempt-11", + "outputSha256": "31cb88d333b5345327f71bd81a19b8622dd2cbe4ae5556414bdc69c581c6521d", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "849505aa07e8ebb299469a1cae5d42fab84792f9e014ef8adaa4a62cc9f0d62e" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "cb1d3f7110cb76a6f90a81130bf2de424014f8038f54f957021b2af0be362fb9" + }, + "verification.json": { + "bytes": 7879, + "sha256": "ff6ac20106ae60826a08a3fd1667c40e35e8c6793d8bb32f78586fc8cc78fe1d" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + }, + { + "elapsedSeconds": 23.141, + "exitCode": 0, + "id": "attempt-12", + "outputSha256": "c5b7cc7fdbb4915fe9d22bcfe6d925795ef94f331eb09a94991a0b7ed9db91f3", + "receipts": { + "report.json": { + "bytes": 997, + "sha256": "fb850d483d18a626cb53f4086ba6d550195d42ace3f074097521926e9cd30939" + }, + "verification-diagnostics.json": { + "bytes": 9091, + "sha256": "e5a3ed917c21f4631b09403be76fa620c49b78511da2a4d98f3ccab46d5c6e92" + }, + "verification.json": { + "bytes": 7878, + "sha256": "dcfe8aaa16e6e42cbdd204210b6af9c93a84f0f5be5c3815893e0e2e3a42332c" + } + }, + "status": "PASS", + "supervision": { + "attach_before_execution": true, + "captured_bytes": 934, + "descendants_remaining": 0, + "descendants_terminated": 0, + "dropped_bytes": 0, + "output_truncated": false, + "quality": "guaranteed-tree", + "quiescence_ms": 0 + } + } + ], + "authority": "BOUNDED_NATIVE_OBSERVATION_ONLY", + "coreRevision": "1113e47d93e3129ff7cd9018b6be22573775bed2", + "elapsedSeconds": 275.0, + "imageOS": "win25-vs2026", + "imageVersion": "20261123.321.1", + "inputs": { + "scripts/react_workspace_watcher_diagnostics.py": "d8c122e236154381c2ee0c240182439e8c36420161e27a0297770b07b9dbb211", + "scripts/repeat_react_workspace.py": "3dc213e93992f998347adb577b9de8a8601f989314b7712d50134012b183e8b3", + "scripts/smoke_react_workspace.py": "43fa2b1879928794633c149b45bd45891a1566f69edbfe6c5ec76f8040766d7e", + "tests/fixtures/react_workspace.json": "5cd3e5f1059198dfaf0cc329c4631b88b039cd4d0410be301db03c6b4a4b2b38" + }, + "mcpVersion": "0.2.35", + "platform": "win32", + "policy": { + "automaticRetries": false, + "freshWorkspaceAndCache": true, + "modelCalls": 0, + "perAttemptSeconds": 180, + "plannedAttempts": 12, + "totalSeconds": 900 + }, + "python": "3.12.10", + "runAttempt": "1", + "runId": "46650876381", + "schema": 1, + "sourceCommit": "4c8764783cac45bd0319d6c265ad08cc8b6490ea", + "sourceInputsUnchanged": true, + "status": "FAIL", + "wheelSha256": "66e93e0a7cefbdf149cdd6e2303f3fe136a998247b2818b54770d54897782ff8" + }, + "artifactBytes": 58112, + "artifactId": 15490290830, + "artifactSha256": "daa9fd851457768a9119e5f0cec90e239900d9ec41be2b8e32ed7c417c65557e", + "authority": "RETAINED_NATIVE_DIAGNOSTIC_EVIDENCE_ONLY", + "coreCommit": "1113e47d93e3129ff7cd9018b6be22573775bed2", + "failedDiagnostics": { + "authority": "DIAGNOSTIC_ONLY", + "events": [ + { + "backend": "ReadDirectoryChangesW-overlapped", + "bufferBytes": 65536, + "event": "filesystem.watcher.armed", + "outcome": "passed" + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "backend": "ReadDirectoryChangesW-overlapped", + "bufferBytes": 65536, + "event": "filesystem.watcher.armed", + "outcome": "passed" + }, + { + "event": "source.snapshot.live-continuity", + "outcome": "watcher-hit" + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 10, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "event": "source.snapshot.live-continuity", + "outcome": "watcher-event-strong-revalidation" + }, + { + "backend": "ReadDirectoryChangesW-overlapped", + "bufferBytes": 65536, + "event": "filesystem.watcher.armed", + "outcome": "passed" + }, + { + "continuityRestored": false, + "event": "source.snapshot.live-continuity", + "failureReason": "RELEVANT_EVENT", + "outcome": "watcher-retention-refused" + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "REFUSED", + "relevantEventCount": 1, + "retainedEventCount": 1, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "RETENTION", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1586, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "REFUSED", + "relevantEventCount": 1, + "retainedEventCount": 1, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "event": "workspace.input-rejected", + "failureReason": "SOURCE_CONTINUITY" + } + ], + "publicFixturePaths": [ + { + "fixturePathId": "ROOT", + "relativePath": ".", + "relativePathSha256": "cdb4ee2aea69cc6a83331bbe96dc2caa9a299d21329efb0336fc02a82e1839a8" + }, + { + "fixturePathId": "ROOT_MANIFEST", + "relativePath": "package.json", + "relativePathSha256": "7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519" + }, + { + "fixturePathId": "ROOT_LOCK", + "relativePath": "package-lock.json", + "relativePathSha256": "053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519" + }, + { + "fixturePathId": "WORKSPACE_PARENT", + "relativePath": "packages", + "relativePathSha256": "b28b1ed9821f38c64524ea13e19264bb0772f8376afffd5d8a1f8277621833eb" + }, + { + "fixturePathId": "APP_DIRECTORY", + "relativePath": "packages/app", + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4" + }, + { + "fixturePathId": "APP_MANIFEST", + "relativePath": "packages/app/package.json", + "relativePathSha256": "9fa008865bef344ab2f931a4ddf20163882b86ee764718adacf098dc19991946" + }, + { + "fixturePathId": "APP_SOURCE", + "relativePath": "packages/app/main.cjs", + "relativePathSha256": "7e93d7a750f58a212dd0062d44af1680457496eb4f216febc7bf8dcf36007242" + }, + { + "fixturePathId": "LEGACY_DIRECTORY", + "relativePath": "packages/legacy", + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb" + }, + { + "fixturePathId": "LEGACY_MANIFEST", + "relativePath": "packages/legacy/package.json", + "relativePathSha256": "32441c0145c4a7c5b2c81141d9bbf5c79d46dfb9166bd910697c5b340e2b7022" + }, + { + "fixturePathId": "LEGACY_SOURCE", + "relativePath": "packages/legacy/main.cjs", + "relativePathSha256": "e92e3d6f11940222ee69cc3cca86b2cbe60c4717ef0ff51edbde290414267a44" + }, + { + "fixturePathId": "UI_DIRECTORY", + "relativePath": "packages/ui", + "relativePathSha256": "26725b8410f0a6b1027ca7ee545ac941922cf7e16921c89aa344e2af102d619c" + }, + { + "fixturePathId": "UI_MANIFEST", + "relativePath": "packages/ui/package.json", + "relativePathSha256": "1ae5a5e8c23bd3bc31ea590a9cbe48eb9ad3bbddc0fb5732d08c04a53c8ad51d" + }, + { + "fixturePathId": "UI_SOURCE", + "relativePath": "packages/ui/index.cjs", + "relativePathSha256": "f58373dfbafb8a1a75cdb855a14dabc1d9c272af3f2f2d52b5e225e0750e2c84" + }, + { + "fixturePathId": "DEPENDENCY_DIRECTORY", + "relativePath": "node_modules", + "relativePathSha256": "dba27c31aad935787bb275c3e5e4e957708f15386de599eff1db476022cd7e4c" + }, + { + "fixturePathId": "DRAIN_DIRECTORY", + "relativePath": ".dependency-roadmap", + "relativePathSha256": "15d4b15ae40b97a57a2b37c2cd247c432fa9cffc2d1d114094e470b0a969f366" + } + ], + "schemaVersion": 1 + }, + "failedVerification": { + "error": "CURRENT_WORKSPACE_INPUT_CHANGED", + "operations": [ + { + "argvDigest": "67e2f8bbdebfcc224c1864d960d3bd79834eea2c702da70323c3e96b822874ac", + "cancelled": false, + "commandIndex": null, + "descendantsRemaining": 0, + "durationMs": 702, + "elapsedStartMs": 484, + "operation": "strict-frozen-install", + "returnCode": 0, + "supervision": "guaranteed-tree", + "timedOut": false + } + ], + "status": "WORKSPACE_VERIFICATION_UNPROVEN", + "verificationAdmissionSha256": "e1a65e6f8725cba6ad5d21c5656eb989597a62080926d92955a3c74d626542dc", + "verificationAttemptId": "d9272ddbde63490e86029fe509bb86ab" + }, + "interpretation": { + "eventTimeIdentity": "UNPROVEN", + "exactWriterCause": "UNPROVEN", + "historical46615397868Cause": "UNPROVEN_ORIGINAL_EVENT_PATH_NOT_RETAINED", + "historicalMcpIssue53": "OPEN_ORIGINAL_RECEIPT_ABSENT", + "newFailure": "LATE_RELEVANT_EVENT_ATTRIBUTED_TO_LEGACY_DIRECTORY", + "runtimeReleaseAccepted": false + }, + "jobId": 142654406091, + "mcpCommit": "4c8764783cac45bd0319d6c265ad08cc8b6490ea", + "observations": [ + { + "attempt": "attempt-01", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1587, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-02", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 4, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1584, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-03", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1585, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-04", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1585, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-05", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 4, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1586, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-06", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1584, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-07", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 4, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1587, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-08", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1586, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-09", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1587, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-10", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "continuityRestored": false, + "event": "source.snapshot.live-continuity", + "failureReason": "RELEVANT_EVENT", + "outcome": "watcher-retention-refused" + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "REFUSED", + "relevantEventCount": 1, + "retainedEventCount": 1, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "RETENTION", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1586, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "REFUSED", + "relevantEventCount": 1, + "retainedEventCount": 1, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "event": "workspace.input-rejected", + "failureReason": "SOURCE_CONTINUITY" + } + ], + "status": "FAIL" + }, + { + "attempt": "attempt-11", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 4, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1584, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + } + ], + "status": "PASS" + }, + { + "attempt": "attempt-12", + "guardEvents": [ + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 4, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 5, + "event": "ci.fixture.watcher-retention", + "filterCalls": 1, + "guardPhase": "RETENTION", + "originalResult": "ACCEPTED", + "relevantEventCount": 0, + "retainedEventCount": 0, + "truncated": false + }, + { + "capture": "GUARD_FILTER_INPUT", + "deliveredEventCount": 1586, + "event": "ci.fixture.watcher-continuity", + "filterCalls": 1, + "guardPhase": "LIVE_CONTINUITY", + "originalResult": "ACCEPTED", + "relevantEventCount": 2, + "retainedEventCount": 2, + "truncated": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "LEGACY_DIRECTORY", + "canonicalPathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "event": "ci.fixture.watcher-event", + "eventIndex": 0, + "excludedComponent": false, + "fixturePathId": "LEGACY_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 15, + "relativePathSha256": "f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb", + "shortNameShape": false + }, + { + "actionCode": 3, + "canonicalExcludedComponent": false, + "canonicalFixturePathId": "APP_DIRECTORY", + "canonicalPathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "event": "ci.fixture.watcher-event", + "eventIndex": 1, + "excludedComponent": false, + "fixturePathId": "APP_DIRECTORY", + "guardPhase": "LIVE_CONTINUITY", + "kind": "DIRECTORY", + "pathLength": 12, + "relativePathSha256": "f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4", + "shortNameShape": false + } + ], + "status": "PASS" + } + ], + "receiptMembersIndependentlyVerified": 35, + "runId": 46650876381, + "schema": 1 +} diff --git a/docs/audits/2026-12-01/windows-react-46650876381.md b/docs/audits/2026-12-01/windows-react-46650876381.md new file mode 100644 index 0000000..c518c7f --- /dev/null +++ b/docs/audits/2026-12-01/windows-react-46650876381.md @@ -0,0 +1,84 @@ +# Retained postmerge Windows source-continuity refusal + +## Native result + +MCP [run 46650876381](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876381), +[job 142654406091](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876381/job/142654406091), +tested merged MCP `4c8764783cac45bd0319d6c265ad08cc8b6490ea` with Core +`1113e47d93e3129ff7cd9018b6be22573775bed2`. All twelve preassigned observations +ran once: **11 PASS, 1 FAIL, 0 NOT_RUN**. Attempt 10 failed; attempts 11 and 12 +were the remaining planned observations, not retries. The aggregate remains +FAIL. No model calls, test exclusions or changes to the fixture/toolchain occurred. + +The installed wheel SHA-256 was +`66e93e0a7cefbdf149cdd6e2303f3fe136a998247b2818b54770d54897782ff8`. +Runner image was `win25-vs2026` / `20261123.321.1`, Python `3.12.10`. +The aggregate reports unchanged source-input hashes and 275.0 seconds elapsed. + +[Artifact 15490290830](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876381/artifacts/15490290830) +was independently downloaded: 58,112 bytes, SHA-256 +`daa9fd851457768a9119e5f0cec90e239900d9ec41be2b8e32ed7c417c65557e`. +Every one of its 35 report/verification/diagnostics members matches the exact +size and digest in aggregate.json. The failed observation has verification and +diagnostic receipts but no success report; that absence is preserved. The +companion JSON retains the aggregate, all member identities, all twelve +observations' guard facts and the complete failed receipts. + +## Exact failed boundary + +The failed receipt records strict-frozen-install exit code 0, guaranteed-tree +supervision, zero descendants, and no timeout/cancellation. It then returns +WORKSPACE_VERIFICATION_UNPROVEN / CURRENT_WORKSPACE_INPUT_CHANGED. + +| Actual filter input | Relevant action | Public fixture path | Guard result | +| --- | --- | --- | --- | +| Outer live continuity | FILE_ACTION_MODIFIED (3) | packages/app | Strong revalidation, ultimately REFUSED | +| Nested new-watcher retention | FILE_ACTION_MODIFIED (3) | packages/legacy | REFUSED / RELEVANT_EVENT | + +The outer filter received 1,586 notifications, one relevant; the nested filter +received five notifications, one relevant. Both captures are complete and +untruncated. The legacy path digest is +`f1384e862c6f02509034d8c37701f72d376eedc9e0998820b58285724f3d4cfb`; +the app digest is +`f5d9f195cce3dff50cd9d60fb2c00be6d87d4e79ccfb74151c34090c600b7ea4`. +For both, post-verdict observation reports DIRECTORY, matching normalized and +canonical hashes, no short-name shape, and no excluded path component. + +The authoritative decision sequence is live relevant event → complete source +manifest comparison → candidate retention RELEVANT_EVENT → SOURCE_CONTINUITY +refusal. At this Core revision the retention call is reached only after the +complete manifest key matches the sealed source. The candidate then refuses +any relevant notification without a second full capture. All eleven successful +observations delivered both app and legacy action-3 notifications to the outer +live filter and none to either retention filter. Thus the new evidence isolates +the different decision boundary, while preserving the failed result. + +## Scope of the diagnosis + +The two directory notifications being split across the revalidation boundary +is consistent with a timing-sensitive retention refusal. No evidence proves +the exact writer syscall, event-time filesystem object identity, or that the +notification was harmless metadata. In particular, the old retention guard +checks relevant events before root/project identity; its RELEVANT_EVENT reason +alone does not prove that simultaneous identity loss was absent. + +A proposed repair can avoid that uncertainty by allowing at most one extra +complete matching source capture under the same demonstrably healthy watcher, +original identities and original deadline. It must preserve every event, +reject any new relevant suffix during the final capture, and reject delivery, +overflow, thread, identity and deadline failures. It must not ignore directory +notifications or trust the post-verdict stat as authorization. This report +records evidence for that proposal; it does not claim that a runtime repair has +already passed native qualification. + +The earlier [failed run 46615397868](https://github.com/levencode-labs/deploom-mcp/actions/runs/46615397868) +still lacks its original relevant event path. Its exact cause remains +OPEN_DIAGNOSIS_REQUIRED, and [historical MCP issue #53](https://github.com/levencode-labs/deploom-mcp/issues/53) +remains separate and unresolved. The earlier PR84 twelve-PASS series is retained +as a separate observation; it does not replace this eleven-PASS/one-FAIL result. + +Ordinary merged MCP CI [46650876113](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876113) +completed 13/13 jobs successfully and the actual native audit +[46650876031](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876031) +completed 4/4 jobs successfully. Those successes do not override the failed +Windows observation series. No release acceptance follows from this report. diff --git a/docs/audits/2026-12-01/windows-retention-revalidation.md b/docs/audits/2026-12-01/windows-retention-revalidation.md new file mode 100644 index 0000000..a8a50fc --- /dev/null +++ b/docs/audits/2026-12-01/windows-retention-revalidation.md @@ -0,0 +1,91 @@ +# Bounded strong revalidation for a late Windows retention event + +## Observed problem + +MCP [native observation run 46650876381](https://github.com/levencode-labs/deploom-mcp/actions/runs/46650876381) +at MCP `4c8764783cac45bd0319d6c265ad08cc8b6490ea` / Core +`1113e47d93e3129ff7cd9018b6be22573775bed2` preserved twelve planned results: +eleven passed and attempt 10 failed. The exact failed guard received +FILE_ACTION_MODIFIED for `packages/legacy` during candidate retention, after a +matching complete source-manifest capture. The outer live watcher had already +received FILE_ACTION_MODIFIED for `packages/app`. Successful observations saw +both before strong revalidation. Both paths were observed as directories after +the verdict; that observation is diagnostic and cannot authorize ignoring them. + +Artifact `15490290830` is 58,112 bytes, SHA-256 +`daa9fd851457768a9119e5f0cec90e239900d9ec41be2b8e32ed7c417c65557e`. +All 35 retained receipt members were independently verified against the +aggregate; the failed attempt and its missing success report are preserved. +The retained [analysis](windows-react-46650876381.md) and +[receipt evidence](windows-react-46650876381.json) keep those original results. +The exact originating writer operation remains unproven. Earlier failed run +46615397868 and historical MCP issue #53 remain separate unresolved evidence. + +## Rule and authority + +The existing healthy-live-event rule permits a complete matching source +manifest to establish a new boundary. The repair applies that same rule at most +once more when a healthy candidate watcher observes a late relevant event. + +1. The first complete source manifest must match. A mismatch immediately + refuses, even if a later read could observe restored bytes. +2. Retention drains the watcher and verifies delivery, thread and original + root/project object identities. Those failures take priority over relevant + events. Only a healthy RELEVANT_EVENT refusal permits another capture. +3. The second complete manifest uses the same candidate watcher, the original + caller deadline and the cursor of the already drained event prefix. The + entire event history remains intact; no watcher is cleared or rearmed for + this extra capture. +4. Final retention requires a matching manifest, a proven drain, live healthy + delivery, unchanged identities and no new relevant event after that cursor. + A second relevant event or exhausted time refuses. There are at most two + full captures in one continuation. +5. On success, the accepted prefix cursor is retained alongside the watcher. + Later events remain outside it and must pass the ordinary live guard. A + healthy event does not cause the accepted prefix to be scanned repeatedly. + +The cursor does not declare any path or event harmless. It records only the +prefix preceding the new complete capture. Notifications arriving during that +capture are in its suffix and therefore block acceptance. A watcher error or +identity loss cannot gain authorization from an equal endpoint manifest. +Queued errors discovered when retiring the preceding live watcher also refuse; +failed replacement arming cannot fall through to manifest-only authorization +after a previously proven stream. + +The existing policy permits a witnessed mutation restored before a healthy +strong capture to match the original manifest. This patch preserves that +policy; it does not claim that every historical transient mutation permanently +poisons a snapshot. Mutation during the final capture and lost-interval +mutation/restoration remain refusals for this continuation. Existing callers +abort and retire or replace a snapshot after False. This patch does not add +persistent snapshot poisoning or authorize callers to retry a refused epoch. + +## Deterministic controls + +The new split-notification regression uses real complete manifests and injects +the retained native event sequence through controlled watchers. It fails on +Core `1113e47` at the expected acceptance assertion and passes with the repair. +The repair must also pass these focused controls: + +| Control | Required result | +| --- | --- | +| App notification, matching capture, late legacy notification, matching quiet capture | PASS, exactly two captures, one candidate watcher | +| Subsequent continuation with only the previously accounted prefix | PASS without a new full capture | +| Covered file changed after the first capture | FAIL | +| First manifest mismatches, then bytes are restored | FAIL without a second capture | +| Relevant event and same-byte root-directory replacement | FAIL with identity priority | +| Relevant event and overflow | FAIL without another capture | +| Queued error during old watcher stop | FAIL without replacement arming | +| Replacement watcher cannot arm after a proven stream | FAIL without manifest-only fallback | +| Relevant events continue through the second capture | FAIL after exactly two captures | +| File mutation/restoration during the final capture | FAIL despite equal endpoint bytes | +| First capture uses six seconds of a ten-second original budget | Second receives four seconds; expiry refuses | + +Local verification: new regression file 10 passed; existing live-continuity +diagnostic file seven passed and two native-Windows tests skipped on Linux; +existing exact-budget controls six passed and strict cleanup controls eight +passed (31 passed, two native-only skips in total). +Native qualification of the changed runtime is a separate required result. +Watcher buffers, path exclusions, source hashes, fixtures, package versions +and model/API policy remain unchanged. Every accepted capture still needs the +complete manifest and the healthy quiet watcher boundary described above. diff --git a/source_snapshot.py b/source_snapshot.py index 8665c21..35fae21 100644 --- a/source_snapshot.py +++ b/source_snapshot.py @@ -164,6 +164,7 @@ class SourceSnapshot: _DirectoryWatcher, Optional[tuple[int, int]], Optional[tuple[int, int]], + int, # Event prefix already covered by a complete matching manifest. ], ] = {} _LOCK = threading.RLock() @@ -1573,30 +1574,68 @@ def _arm_live_source_watcher(live_root: Path, live_project: Path): return None -def _retain_live_source_watcher(snapshot, candidate, live_root, live_project): +def _live_source_watcher_failure(candidate, live_root, live_project, *, deadline=None, drain=True): + """Check a proven stream without recovering delivery or object-identity loss.""" + watcher, root_identity, project_identity = candidate + + def failure(): + if watcher.errors: + return "OVERFLOW" if any("overflow" in error.lower() for error in watcher.errors) else "DELIVERY" + thread = watcher._thread + alive = thread is not None and thread.is_alive() + # A thread probe or asynchronous delivery may have reported an error. + if watcher.errors: + return "OVERFLOW" if any("overflow" in error.lower() for error in watcher.errors) else "DELIVERY" + if not alive: + return "THREAD" + if (root_identity is None or project_identity is None + or _tree_object_identity(live_root) != root_identity + or _tree_object_identity(live_project) != project_identity): + return "IDENTITY" + if deadline is not None and time.monotonic() >= deadline: + return "TIMEOUT" + if watcher.errors: + return "OVERFLOW" if any("overflow" in error.lower() for error in watcher.errors) else "DELIVERY" + return None + + reason = failure() + if reason is not None or not drain: + return reason + remaining = 2.0 if deadline is None else min(2.0, deadline - time.monotonic()) + # _drain_watcher has a 50 ms minimum. Never let it extend this caller's + # original budget, including the second capture's remaining budget. + if remaining < 0.05: + return "TIMEOUT" + drained = _drain_watcher(watcher, live_root, timeout_seconds=remaining) + return failure() or (None if drained else "DRAIN") + + +def _retain_live_source_watcher( + snapshot, candidate, live_root, live_project, *, event_cursor=0, deadline=None, retention_facts=None, +): # Only the complete manifest comparison can establish the first boundary. # Delivery and both identities must still match before publishing a watcher. watcher, root_identity, project_identity = candidate - drained = not watcher.errors and _drain_watcher(watcher, live_root) - thread_alive = drained and watcher._thread and watcher._thread.is_alive() - if watcher.errors: - reason = "OVERFLOW" if any("overflow" in error.lower() for error in watcher.errors) else "DELIVERY" - elif not drained: - reason = "DRAIN" - elif not thread_alive: - reason = "THREAD" - elif _content_relevant_events(list(watcher.events)): - reason = "RELEVANT_EVENT" - elif (_tree_object_identity(live_root) != root_identity - or _tree_object_identity(live_project) != project_identity): - reason = "IDENTITY" - else: + reason = _live_source_watcher_failure(candidate, live_root, live_project, deadline=deadline) + delivered = list(watcher.events) + if reason is None: + if type(event_cursor) is not int or not 0 <= event_cursor <= len(delivered): + reason = "EVENT_CURSOR" + else: + relevant = _content_relevant_events(delivered[event_cursor:]) + # An event cannot hide a simultaneous identity/delivery failure. + reason = _live_source_watcher_failure( + candidate, live_root, live_project, deadline=deadline, drain=False, + ) or ("RELEVANT_EVENT" if relevant else None) + if reason is None: key = _active_key(snapshot.original_project_path) with _LOCK: if key not in _LIVE_SOURCE_WATCHERS: - _LIVE_SOURCE_WATCHERS[key] = snapshot, watcher, root_identity, project_identity + _LIVE_SOURCE_WATCHERS[key] = snapshot, watcher, root_identity, project_identity, len(delivered) return True reason = "EXISTING_WATCHER" + if retention_facts is not None: + retention_facts.update(failureReason=reason, eventCursor=len(delivered)) emit_observability_event( "source.snapshot.live-continuity", outcome="watcher-retention-refused", @@ -1617,6 +1656,7 @@ def source_snapshot_live_source_continuity( policy = snapshot.input_policy or SourceInputPolicy() if snapshot.policy_key != policy.key: return False + deadline = None if timeout_seconds == 0 else time.monotonic() + float(timeout_seconds) live_root = ( Path(snapshot.git_root).expanduser().resolve() @@ -1632,23 +1672,18 @@ def source_snapshot_live_source_continuity( with _LOCK: entry = _LIVE_SOURCE_WATCHERS.get(key) + required_identities = None if entry is not None and entry[0] is snapshot: - _snap, watcher, sealed_root_identity, sealed_project_identity = entry + _snap, watcher, sealed_root_identity, sealed_project_identity = entry[:4] + event_cursor = entry[4] if len(entry) > 4 else 0 + required_identities = sealed_root_identity, sealed_project_identity thread = watcher._thread - delivery_and_identity_ok = bool( - sealed_root_identity is not None - and sealed_project_identity is not None - and _tree_object_identity(live_root) == sealed_root_identity - and _tree_object_identity(live_project) == sealed_project_identity - and thread is not None - and thread.is_alive() - and not watcher.errors - and _drain_watcher(watcher, live_root) - and not watcher.errors - and _tree_object_identity(live_root) == sealed_root_identity - and _tree_object_identity(live_project) == sealed_project_identity + failure_reason = _live_source_watcher_failure( + (watcher, sealed_root_identity, sealed_project_identity), live_root, live_project, deadline=deadline, ) - if not delivery_and_identity_ok: + if failure_reason is None and (type(event_cursor) is not int or not 0 <= event_cursor <= len(watcher.events)): + failure_reason = "EVENT_CURSOR" + if failure_reason is not None: # Diagnostic facts only: never rescan/re-arm to recover this lost # interval. Invalidation must keep the existing fail-closed verdict. error_kinds = sorted({ @@ -1662,10 +1697,6 @@ def source_snapshot_live_source_continuity( project_matches = (sealed_project_identity is not None and _tree_object_identity(live_project) == sealed_project_identity) thread_alive = bool(thread is not None and thread.is_alive()) - reason = ("OVERFLOW" if "OVERFLOW" in error_kinds - else "IDENTITY" if not root_matches or not project_matches - else "THREAD" if not thread_alive - else "DELIVERY" if error_kinds else "DRAIN") delivered = list(watcher.events) emit_observability_event( "source.snapshot.live-continuity", @@ -1677,7 +1708,7 @@ def source_snapshot_live_source_continuity( watchedRootsCount=1, deliveredEventCount=len(delivered), relevantEventCount=len(_content_relevant_events(delivered)), - failureReason=reason, + failureReason=failure_reason, watcherErrorKinds=error_kinds, rootIdentityMatches=root_matches, projectIdentityMatches=project_matches, @@ -1688,7 +1719,7 @@ def source_snapshot_live_source_continuity( _retire_live_source_watcher(snapshot) return False - relevant_events = _content_relevant_events(list(watcher.events)) + relevant_events = _content_relevant_events(list(watcher.events)[event_cursor:]) if not relevant_events: emit_observability_event( "source.snapshot.live-continuity", @@ -1706,6 +1737,12 @@ def source_snapshot_live_source_continuity( authority="SOURCE_TRUTH_GUARD", ) _retire_live_source_watcher(snapshot) + # stop() can expose a queued overflow or a failed cancellation. Such an + # interval must never become a manifest-only or freshly armed success. + if (watcher.errors or (watcher._thread is not None and watcher._thread.is_alive()) + or _tree_object_identity(live_root) != sealed_root_identity + or _tree_object_identity(live_project) != sealed_project_identity): + return False entry = None if entry is not None: @@ -1715,50 +1752,78 @@ def source_snapshot_live_source_continuity( stale[1].stop() candidate_watcher = _arm_live_source_watcher(live_root, live_project) - - try: - observed = build_source_tree_manifest( - live_root, - policy=policy, - timeout_seconds=timeout_seconds, - progress=progress, - progress_label="hot SourceSnapshot live-source continuity", - ) - except BaseException: + if required_identities is not None and ( + candidate_watcher is None or candidate_watcher[1:] != required_identities): if candidate_watcher is not None: candidate_watcher[0].stop() - raise - - if observed.key != snapshot.manifest_key: - if candidate_watcher is not None: - candidate_watcher[0].stop() - emit_observability_event( - "source.snapshot.live-continuity", - snapshotKey=snapshot.key, - outcome="manifest-mismatch", - expectedDigest=snapshot.manifest_key, - observedDigest=observed.key, - authority="SOURCE_TRUTH_GUARD", - ) return False - if candidate_watcher is not None: - if not _retain_live_source_watcher(snapshot, candidate_watcher, live_root, live_project): + retained = False + event_cursor = 0 + try: + # At most one extra complete capture. Both captures use the SAME + # candidate watcher and original deadline; no event history is erased. + for capture_index in range(2): + remaining = 0 if deadline is None else deadline - time.monotonic() + if deadline is not None and remaining <= 0: + return False + if candidate_watcher is not None and _live_source_watcher_failure( + candidate_watcher, live_root, live_project, deadline=deadline, drain=False) is not None: + return False + observed = build_source_tree_manifest( + live_root, + policy=policy, + timeout_seconds=remaining, + exact_timeout=deadline is not None, + progress=progress, + progress_label="hot SourceSnapshot live-source continuity", + ) + if observed.key != snapshot.manifest_key: + emit_observability_event( + "source.snapshot.live-continuity", + snapshotKey=snapshot.key, + outcome="manifest-mismatch", + expectedDigest=snapshot.manifest_key, + observedDigest=observed.key, + authority="SOURCE_TRUTH_GUARD", + ) + return False + if deadline is not None and time.monotonic() >= deadline: + return False + if candidate_watcher is not None: + facts = {} + if not _retain_live_source_watcher( + snapshot, candidate_watcher, live_root, live_project, + event_cursor=event_cursor, deadline=deadline, retention_facts=facts): + if capture_index != 0 or facts.get("failureReason") != "RELEVANT_EVENT": + return False + # The prior full manifest matched and this complete, + # healthy delivered prefix will be covered again. Only a + # quiet suffix around the next full capture can authorize + # retention. Unknown/late file and directory events are + # treated alike; no post-event type inference is used. + event_cursor = facts["eventCursor"] + emit_observability_event( + "source.snapshot.live-continuity", snapshotKey=snapshot.key, + outcome="watcher-retention-strong-revalidation", captureIndex=2, + authority="SOURCE_TRUTH_GUARD", + ) + continue + retained = True + outcome = "manifest-match-watcher-armed" + else: + # This fallback is available only when no proven live stream + # was lost. Its next continuation again requires a full scan. + outcome = "manifest-match" + emit_observability_event( + "source.snapshot.live-continuity", snapshotKey=snapshot.key, + outcome=outcome, authority="SOURCE_TRUTH_GUARD", + ) + return True + return False + finally: + if candidate_watcher is not None and not retained: candidate_watcher[0].stop() - return False - outcome = "manifest-match-watcher-armed" - else: - # No proven event stream => this one continuation is authorized only by - # the full manifest comparison; the next continuation repeats it. - outcome = "manifest-match" - - emit_observability_event( - "source.snapshot.live-continuity", - snapshotKey=snapshot.key, - outcome=outcome, - authority="SOURCE_TRUTH_GUARD", - ) - return True def validate_source_snapshot( diff --git a/tests/test_source_retention_revalidation.py b/tests/test_source_retention_revalidation.py new file mode 100644 index 0000000..28e1d81 --- /dev/null +++ b/tests/test_source_retention_revalidation.py @@ -0,0 +1,198 @@ +"""A healthy late event needs a bounded full capture, never a weaker guard.""" +from contextlib import contextmanager +from pathlib import Path +from types import SimpleNamespace +from unittest.mock import patch +import shutil +import tempfile +import unittest + +import source_snapshot as core + + +class Watcher: + def __init__(self, events=(), stop_error=None): + self.events = list(events) + self.errors = [] + self.alive = True + self.stops = 0 + self.stop_error = stop_error + self._thread = SimpleNamespace(is_alive=lambda: self.alive) + + def stop(self): + self.stops += 1 + self.alive = False + if self.stop_error: + self.errors.append(self.stop_error) + + +class RetentionRevalidationTests(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.project = Path(self.temp.name) / "fixture" + self.project.mkdir() + (self.project / "package.json").write_text('{"name":"retention-test","version":"1.0.0"}') + for name in ("app", "legacy"): + directory = self.project / "packages" / name + directory.mkdir(parents=True) + (directory / "source.txt").write_text("original") + + @contextmanager + def scenario(self, after_capture, *, old_stop_error=None, no_candidate=False, clock=None): + with core.verification_source_snapshot_scope(self.project, timeout_seconds=15, strict_cleanup=True) as snapshot: + identity = core._tree_object_identity(self.project) + old = Watcher([(3, "packages/app")], stop_error=old_stop_error) + candidate = Watcher() + key = core._active_key(self.project) + core._LIVE_SOURCE_WATCHERS[key] = (snapshot, old, identity, identity) + actual_build = core.build_source_tree_manifest + state = SimpleNamespace(snapshot=snapshot, old=old, candidate=candidate, captures=0, + budgets=[], key=key) + + def build(*args, **kwargs): + state.captures += 1 + state.budgets.append(kwargs["timeout_seconds"]) + result = actual_build(*args, **kwargs) + after_capture(state) + return result + + with patch.object(core, "_drain_watcher", return_value=True), patch.object( + core, "_arm_live_source_watcher", return_value=None if no_candidate else (candidate, identity, identity) + ) as arm, patch.object(core, "build_source_tree_manifest", side_effect=build), patch.object( + core, "emit_observability_event") as emit: + state.arm = arm + state.emit = emit + if clock is None: + state.result = core.source_snapshot_live_source_continuity(snapshot, timeout_seconds=10) + else: + with patch.object(core.time, "monotonic", side_effect=lambda: clock[0]): + state.result = core.source_snapshot_live_source_continuity(snapshot, timeout_seconds=10) + yield state + + @staticmethod + def one_late_directory(state): + if state.captures == 1: + state.candidate.events.append((3, "packages/legacy")) + + def test_split_directory_notifications_require_second_full_capture(self): + with self.scenario(self.one_late_directory) as state: + self.assertTrue(state.result) + self.assertEqual(state.captures, 2) + state.arm.assert_called_once() + self.assertEqual(state.candidate.stops, 0) + self.assertEqual(state.candidate.events, [(3, "packages/legacy")]) + self.assertLessEqual(state.budgets[1], state.budgets[0]) + self.assertIs(core._LIVE_SOURCE_WATCHERS[state.key][1], state.candidate) + # The retained prefix was measured again, so it must not cause an + # endless new full scan on every subsequent continuation. + self.assertTrue(core.source_snapshot_live_source_continuity(state.snapshot, timeout_seconds=10)) + self.assertEqual(state.captures, 2) + # A later covered-file event remains outside that accepted prefix. + (self.project / "packages/legacy/source.txt").write_text("changed") + state.candidate.events.append((3, "packages/legacy/source.txt")) + self.assertFalse(core.source_snapshot_live_source_continuity(state.snapshot, timeout_seconds=10)) + + def test_covered_file_change_after_first_capture_refuses(self): + def mutate(state): + if state.captures == 1: + (self.project / "packages/legacy/source.txt").write_text("changed") + state.candidate.events.append((3, "packages/legacy/source.txt")) + with self.scenario(mutate) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 2) + self.assertEqual(state.candidate.stops, 1) + self.assertNotIn(state.key, core._LIVE_SOURCE_WATCHERS) + + def test_first_manifest_mismatch_cannot_be_retried_into_restoration(self): + actual = core.build_source_tree_manifest + with patch.object(core, "_arm_live_source_watcher"): + # Capture the original sealed source before changing live bytes. + with core.verification_source_snapshot_scope(self.project, timeout_seconds=15, strict_cleanup=True) as snapshot: + (self.project / "packages/legacy/source.txt").write_text("changed") + identity = core._tree_object_identity(self.project) + candidate = Watcher() + calls = [] + def build(*args, **kwargs): + calls.append(True) + observed = actual(*args, **kwargs) + (self.project / "packages/legacy/source.txt").write_text("original") + candidate.events.append((3, "packages/legacy/source.txt")) + return observed + with patch.object(core, "_arm_live_source_watcher", return_value=(candidate, identity, identity)), patch.object( + core, "_drain_watcher", return_value=True), patch.object(core, "build_source_tree_manifest", side_effect=build): + self.assertFalse(core.source_snapshot_live_source_continuity(snapshot, timeout_seconds=10)) + self.assertEqual(len(calls), 1) + self.assertEqual(candidate.stops, 1) + + def test_event_cannot_mask_same_bytes_directory_replacement(self): + def replace(state): + if state.captures == 1: + moved = self.project.with_name("original-directory") + self.project.rename(moved) + shutil.copytree(moved, self.project) + state.candidate.events.append((3, "packages/legacy")) + with self.scenario(replace) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 1) + self.assertIn("IDENTITY", [c.kwargs.get("failureReason") for c in state.emit.call_args_list]) + + def test_overflow_with_relevant_event_does_not_recapture(self): + def overflow(state): + self.one_late_directory(state) + state.candidate.errors.append("ReadDirectoryChangesW buffer overflow") + with self.scenario(overflow) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 1) + self.assertNotIn(state.key, core._LIVE_SOURCE_WATCHERS) + + def test_stop_error_cannot_fall_back_to_new_watcher(self): + with self.scenario(self.one_late_directory, old_stop_error="queued overflow during stop") as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 0) + state.arm.assert_not_called() + + def test_failed_arm_cannot_fall_back_from_proven_stream(self): + with self.scenario(self.one_late_directory, no_candidate=True) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 0) + + def test_continuous_relevant_events_exhaust_two_capture_budget(self): + def continuous(state): + state.candidate.events.append((3, "packages/legacy")) + with self.scenario(continuous) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 2) + self.assertEqual(len(state.candidate.events), 2) + self.assertEqual(state.candidate.stops, 1) + + def test_transient_file_change_during_final_capture_remains_unproven(self): + def transient(state): + self.one_late_directory(state) + if state.captures == 2: + path = self.project / "packages/legacy/source.txt" + path.write_text("temporary-untrusted") + path.write_text("original") + state.candidate.events.extend([(3, "packages/legacy/source.txt"), (3, "packages/legacy/source.txt")]) + with self.scenario(transient) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 2) + self.assertEqual(state.candidate.stops, 1) + + def test_second_capture_uses_original_deadline(self): + clock = [100.0] + def expire(state): + self.one_late_directory(state) + if state.captures == 1: + clock[0] = 106.0 + else: + clock[0] = 111.0 + with self.scenario(expire, clock=clock) as state: + self.assertFalse(state.result) + self.assertEqual(state.captures, 2) + self.assertEqual(state.budgets, [10.0, 4.0]) + self.assertEqual(state.candidate.stops, 1) + + +if __name__ == "__main__": + unittest.main() From 8299d5b76499d591909be5066011cb6cb6f8c096 Mon Sep 17 00:00:00 2001 From: AlexanderLevenskikh Date: Tue, 1 Dec 2026 19:34:02 +0500 Subject: [PATCH 2/2] Fail closed when source watcher validation reaches its deadline Recheck the original deadline after entering the publication lock and after filtering the delivered event suffix. Add deterministic controls for both paths and preserve the existing timeout invalidation. --- source_snapshot.py | 18 ++++++--- tests/test_source_retention_revalidation.py | 44 +++++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/source_snapshot.py b/source_snapshot.py index 35fae21..261791d 100644 --- a/source_snapshot.py +++ b/source_snapshot.py @@ -1630,10 +1630,13 @@ def _retain_live_source_watcher( if reason is None: key = _active_key(snapshot.original_project_path) with _LOCK: - if key not in _LIVE_SOURCE_WATCHERS: + if deadline is not None and time.monotonic() >= deadline: + reason = "TIMEOUT" + elif key in _LIVE_SOURCE_WATCHERS: + reason = "EXISTING_WATCHER" + else: _LIVE_SOURCE_WATCHERS[key] = snapshot, watcher, root_identity, project_identity, len(delivered) return True - reason = "EXISTING_WATCHER" if retention_facts is not None: retention_facts.update(failureReason=reason, eventCursor=len(delivered)) emit_observability_event( @@ -1681,8 +1684,14 @@ def source_snapshot_live_source_continuity( failure_reason = _live_source_watcher_failure( (watcher, sealed_root_identity, sealed_project_identity), live_root, live_project, deadline=deadline, ) - if failure_reason is None and (type(event_cursor) is not int or not 0 <= event_cursor <= len(watcher.events)): - failure_reason = "EVENT_CURSOR" + if failure_reason is None: + delivered = list(watcher.events) + if type(event_cursor) is not int or not 0 <= event_cursor <= len(delivered): + failure_reason = "EVENT_CURSOR" + else: + relevant_events = _content_relevant_events(delivered[event_cursor:]) + if deadline is not None and time.monotonic() >= deadline: + failure_reason = "TIMEOUT" if failure_reason is not None: # Diagnostic facts only: never rescan/re-arm to recover this lost # interval. Invalidation must keep the existing fail-closed verdict. @@ -1719,7 +1728,6 @@ def source_snapshot_live_source_continuity( _retire_live_source_watcher(snapshot) return False - relevant_events = _content_relevant_events(list(watcher.events)[event_cursor:]) if not relevant_events: emit_observability_event( "source.snapshot.live-continuity", diff --git a/tests/test_source_retention_revalidation.py b/tests/test_source_retention_revalidation.py index 28e1d81..94d38b4 100644 --- a/tests/test_source_retention_revalidation.py +++ b/tests/test_source_retention_revalidation.py @@ -179,6 +179,50 @@ def transient(state): self.assertEqual(state.captures, 2) self.assertEqual(state.candidate.stops, 1) + def test_retention_rejects_deadline_reached_while_acquiring_lock(self): + clock = [100.0] + identity = core._tree_object_identity(self.project) + snapshot = SimpleNamespace(original_project_path=self.project) + candidate = Watcher() + facts = {} + key = core._active_key(self.project) + self.addCleanup(core._LIVE_SOURCE_WATCHERS.pop, key, None) + + @contextmanager + def delayed_lock(): + clock[0] = 110.0 + yield + + with patch.object(core, "_LOCK", delayed_lock()), patch.object( + core, "_drain_watcher", return_value=True), patch.object( + core.time, "monotonic", side_effect=lambda: clock[0]): + self.assertFalse(core._retain_live_source_watcher( + snapshot, (candidate, identity, identity), self.project, self.project, + deadline=110.0, retention_facts=facts, + )) + self.assertEqual(facts["failureReason"], "TIMEOUT") + self.assertNotIn(key, core._LIVE_SOURCE_WATCHERS) + + def test_watcher_hit_rejects_deadline_reached_filtering_irrelevant_events(self): + with self.scenario(self.one_late_directory) as state: + self.assertTrue(state.result) + clock = [100.0] + actual_filter = core._content_relevant_events + state.candidate.events.append((3, "node_modules/ignored.txt")) + + def delayed_filter(events): + result = actual_filter(events) + clock[0] = 110.0 + return result + + with patch.object(core.time, "monotonic", side_effect=lambda: clock[0]), patch.object( + core, "_content_relevant_events", side_effect=delayed_filter): + self.assertFalse(core.source_snapshot_live_source_continuity(state.snapshot, timeout_seconds=10)) + self.assertEqual(state.captures, 2) + self.assertEqual(state.candidate.stops, 1) + self.assertNotIn(state.key, core._LIVE_SOURCE_WATCHERS) + self.assertIn("TIMEOUT", [call.kwargs.get("failureReason") for call in state.emit.call_args_list]) + def test_second_capture_uses_original_deadline(self): clock = [100.0] def expire(state):