Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(dif): log errors in tryProguard and tryObject catch blocks - #1513

Merged
jared-outpost[bot] merged 3 commits into
mainfrom
fix/dif-find-silent-catches
Sep 3, 2026
Merged

jared-outpost[bot] merged 3 commits into
mainfrom
fix/dif-find-silent-catches

Conversation

@cursor

@cursor cursor Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bug

tryProguard() and tryObject() in src/lib/dif/find.ts contained three silent catch blocks that discarded errors when reading, hashing, or parsing debug-information files during debug-files find.

Root cause

Three catch blocks used bare catch { return; } without any logging, violating the project's silent-catch prohibition. Users running sentry debug-files find had no way to diagnose why certain files were silently skipped.

Reproduction

Any file I/O error (permissions, corrupted files, disk issues) during debug file scanning would be silently swallowed, providing no diagnostic output even with --verbose.

Fix

  • Added logger.debug() to all three catch blocks in tryProguard (ProGuard UUID computation) and tryObject (format peek + debug file parse)
  • Updated the silent-catch baseline to reflect the fixes
Open in Web View Automation 

Three catch blocks in find.ts silently discarded errors when reading,
hashing, or parsing debug-information files. Users running
`debug-files find` had no way to tell why certain files were skipped.
Added logger.debug() to each catch block so failures appear with
--verbose.

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@vercel

vercel Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 3, 2026 1:50pm UTC

Request Review

@BYK
BYK marked this pull request as ready for review September 3, 2026 13:43
@BYK BYK added the jared Trigger the Jared agent to work on stuff label Sep 3, 2026
"src/lib/detect-agent.ts": 2,
"src/lib/dev-script.ts": 2,
"src/lib/dif/find.ts": 3,
"src/lib/dif/find.ts": 0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jared, I thought we got rid of this baseline thing in favor of a lint rule?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the baseline is still the enforcement mechanism — it's the ratchet from #1471 (check:errors in CI, script/check-error-patterns.ts). there's no biome/eslint rule that replaced it; biome's noEmptyBlockStatements only catches syntactically-empty catch {}, not comment-only or return-only silent catches, which is why the custom checker + baseline exists. dropping this file's count from 3→0 is the intended way to record the fix, so the ratchet can only shrink. happy to open a follow-up if you want to migrate to a lint rule, but that's out of scope here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jared, I think this was replaced in #1487???

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right — #1487 landed the grit rule (lint-rules/no-silent-catch.grit) and wired it via biome.jsonc override on src/**. the old check-error-patterns.ts + baseline is still wired in CI (check:errors) for now, but the grit rule is the active enforcement going forward. the baseline drop in this PR is just the last ratchet record before the migration; once the grit rule is the sole source of truth the baseline file can be removed. thanks for the correction.

@BYK

BYK commented Sep 3, 2026

Copy link
Copy Markdown
Member

Jared, take over the PR, get it ready to be merged and then merge when ready.

@jared-outpost

jared-outpost Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

taken over. the CI failure was a formatter error — the logger.debug line in tryProguard exceeded biome's line width and needed wrapping. fixed in ad61744; lint, typecheck, and check:errors all pass locally now.

the warden: security-review failure was a transient provider outage ("all 3 chunks failed to analyze"), not a real finding — the companion warden run reported no issues. it'll clear on the re-run.

enabled squash auto-merge; it'll land as soon as the required CI Status check goes green. (the extra chore: regenerate docs commit is from the repo's docs-regen bot, not a source change.)

@jared-outpost
jared-outpost Bot merged commit 3fa2060 into main Sep 3, 2026
31 of 34 checks passed
@jared-outpost
jared-outpost Bot deleted the fix/dif-find-silent-catches branch September 3, 2026 13:58

This branch was successfully deployed

1 active deployment
Preview — 340a24aa Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

jared Trigger the Jared agent to work on stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants