Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(test): repair telemetry_e2e fixture broken by #158 empty-files gu…
…ardrail

Same root cause as this PR's get_edge_cases_e2e fixes: #158's guardrail
(empty applicable-files map -> "patch has no applicable files", exit 1)
broke get_emits_patch_fetched_telemetry_on_uuid_lookup_success, whose mock
patch-view used "files": {} while asserting a successful get. Give it a
recordable new-file entry (afterHash = git-blob sha256 of the decoded blob)
so the success + telemetry assertions hold; guardrail untouched. Verified
with a full `cargo test --workspace --no-fail-fast` pass that these two
binaries held the only 5 casualties, now all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
  • Loading branch information
mikolalysenko and claude committed Aug 13, 2026
commit 28af3a022d2b62c1baf4a48acc95cbb97c948ea1
11 changes: 10 additions & 1 deletion crates/socket-patch-cli/tests/telemetry_e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,16 @@ async fn get_emits_patch_fetched_telemetry_on_uuid_lookup_success() {
"publishedAt": "2024-06-01T00:00:00Z",
"license": "MIT",
"description": "test patch",
"files": {},
// A recordable new-file patch (afterHash is the git-blob sha256 of
// the decoded blobContent "patched\n"). Post-#158, a patch whose
// applicable-files map is empty is a hard failure ("no applicable
// files"), so the success path this test asserts needs a real file.
"files": {
"package/index.js": {
"afterHash": "d2802877eb1c2f442d30d18abcb281cb2830875571624544f2f1acb36480997e",
"blobContent": "cGF0Y2hlZAo=",
}
},
"vulnerabilities": {},
});
let mock = setup_mock(
Expand Down
Loading