Skip to content

Add auto-commit, push & pull features for Git - #16651

Merged
pluto-han merged 45 commits into
JabRef:mainfrom
LoayTarek5:git-integration-slr
Sep 6, 2026
Merged

pluto-han merged 45 commits into
JabRef:mainfrom
LoayTarek5:git-integration-slr

Conversation

@LoayTarek5

@LoayTarek5 LoayTarek5 commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a git section to the library properties with three per-library settings: automatically commit when the library is saved, push after committing, and regularly pull remote changes.
uses the same semantic merge as the File > Git menu actions rather than a plain JGit pull.
Git configuration was also moved out of the Network preferences and the Share to GitHub dialog into its own preferences tab, where it gained the pull interval.

Steps to test

1-Put a .bib library inside a Git repository with a remote.
2- Set the repository URL, username and PAT in Preferences > Git.
3- Open the library > Library properties > Git then tick "Automatically commit when library is saved".
4-Edit an entry and save, then a commit named "Update references" appears in the repository.
5-Tick "Automatically push changes after committing" and save again, the commit reaches the remote.
6. Tick "Regularly pull remote changes", push a change from another clone, and wait for the pull interval.

SLR_GIT_TEST.mp4

Related issues and pull requests

Closes #12630

AI usage

Claude Sonnet 5 to investigate some files and review my code, also helped me to generate tests and some UI stuff, all ai-generated code was reviewed by myself

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I added one sentence (max 20 words) to CHANGELOG.md describing the change from the user's point of view (if the change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@github-actions github-actions Bot added good second issue Issues that involve a tour of two or three interweaved components in JabRef component: slr component: git labels Aug 22, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Add per-library Git auto commit/push/pull and new Git preferences tab

✨ Enhancement 🧪 Tests ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Add per-library Git settings for automatic commit, push, and scheduled pull.
• Run semantic pull/merge on save and on schedule, with conflict-aware UI handling.
• Move GitHub credentials and pull interval into a dedicated Git preferences tab.
Diagram

graph TD
  F["Library MetaData"] --> A["SaveDatabaseAction"] --> B["GitAutoSync"] --> D["GitSyncService"] --> E[("Git repository")]
  H["Prefs: GitTab"] --> G["GitPreferences"] --> C["GitPullScheduler"]
  F --> C
  C --> B
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use a single shared scheduler service instead of per-library executors
  • ➕ Avoids creating a new thread pool per open library
  • ➕ Centralizes lifecycle management and reduces leak risk
  • ➕ Easier to apply backoff/jitter and global rate limiting
  • ➖ Requires more plumbing (registry keyed by BibDatabaseContext/path)
  • ➖ More complex shutdown semantics when libraries open/close frequently
2. Trigger auto-pull via existing Git pull action infrastructure
  • ➕ Maximizes reuse of existing UI/action error handling and telemetry
  • ➕ Reduces duplicate merge/pull logic across UI vs background triggers
  • ➖ Actions are typically user-driven/modal; requires adaptation to non-modal notifications
  • ➖ Potentially harder to keep automated behavior quiet/non-disruptive
3. Persist pull interval per-library (metadata) rather than global preference
  • ➕ Allows different libraries to have different sync cadences
  • ➕ More portable when sharing libraries across machines
  • ➖ Adds more metadata keys and UI complexity in library properties
  • ➖ Harder to manage organization-wide defaults

Recommendation: The PR’s approach (per-library enablement flags in metadata + global pull interval/credentials) is a good balance of portability and simplicity, and reuses JabRef’s semantic merge via GitSyncService. The main follow-up worth considering is consolidating GitPullScheduler into a shared scheduler to avoid per-library thread pools and to strengthen lifecycle guarantees.

Files changed (30) +901 / -405

Enhancement (15) +732 / -7
LibraryTab.javaStart/stop scheduled Git pulls with library lifecycle +9/-0

Start/stop scheduled Git pulls with library lifecycle

• Starts GitPullScheduler when autosave/backup managers are installed for a library. Shuts the scheduler down on tab close with error handling.

jabgui/src/main/java/org/jabref/gui/LibraryTab.java

SaveDatabaseAction.javaAuto-commit (and optional push) after saving a library +20/-0

Auto-commit (and optional push) after saving a library

• Introduces an autoCommit hook after successful saves to run GitAutoSync based on per-library metadata. Ensures GitPullScheduler is shut down when performing Save As and closing the original context.

jabgui/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java

MainMenu.javaWire Git share action with Git preferences +1/-1

Wire Git share action with Git preferences

• Updates the Git share menu action construction to pass GitPreferences, enabling early validation (repository URL configured) before opening the share dialog.

jabgui/src/main/java/org/jabref/gui/frame/MainMenu.java

GitAutoSync.javaAdd background auto commit/pull/push with semantic merge +181/-0

Add background auto commit/pull/push with semantic merge

• Implements commit-on-save and pull/push flows using GitSyncService prepareMerge/finalizeMerge and GitMergeApplier to apply plans/resolutions. Uses notifications for failures and prompts only when conflict resolution is needed for pull-then-push.

jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java

GitPullScheduler.javaSchedule periodic Git pulls per open library +101/-0

Schedule periodic Git pulls per open library

• Adds a scheduled executor that periodically calls GitAutoSync.pull when enabled in library metadata. Scheduler starts only for libraries within a Git repo and reads the auto-pull flag on each run; shutdown is tied to BibDatabaseContext.

jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java

LibraryPropertiesViewModel.javaAdd Git tab to library properties +3/-1

Add Git tab to library properties

• Registers the new GitPropertiesView tab so per-library Git auto-sync flags can be edited alongside other library settings.

jabgui/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesViewModel.java

GitPropertiesView.javaImplement Git library properties tab UI +38/-0

Implement Git library properties tab UI

• Introduces a library-properties tab with checkboxes for auto-commit, auto-push, and auto-pull. Disables auto-push unless auto-commit is enabled.

jabgui/src/main/java/org/jabref/gui/libraryproperties/git/GitPropertiesView.java

GitPropertiesViewModel.javaBind Git library properties to MetaData flags +48/-0

Bind Git library properties to MetaData flags

• Adds view model properties that read/write MetaData gitAutoCommit/gitAutoPush/gitAutoPull. Implements setValues/storeSettings for the properties tab contract.

jabgui/src/main/java/org/jabref/gui/libraryproperties/git/GitPropertiesViewModel.java

GitTab.javaNew preferences UI for GitHub credentials and pull interval +65/-0

New preferences UI for GitHub credentials and pull interval

• Adds a dedicated Git preferences tab with fields for repository URL, username, PAT, PAT persistence, and a pull interval. Keeps the existing 'Check GitHub access' action and adds validation and help links.

jabgui/src/main/java/org/jabref/gui/preferences/git/GitTab.java

GitTabViewModel.javaPreferences backing model for Git settings and validation +167/-0

Preferences backing model for Git settings and validation

• Implements preference storage/binding for repository URL, username, PAT, PAT persistence, and pull interval. Provides validation for positive integer pull interval and keeps GitHub access checking behavior.

jabgui/src/main/java/org/jabref/gui/preferences/git/GitTabViewModel.java

GitProperties.fxmlFXML for Git library properties tab +23/-0

FXML for Git library properties tab

• Adds the Git properties layout with three checkboxes corresponding to auto commit, auto push, and scheduled pull.

jabgui/src/main/resources/org/jabref/gui/libraryproperties/git/GitProperties.fxml

MetaDataSerializer.javaSerialize Git auto-sync flags into jabref-meta comments +9/-0

Serialize Git auto-sync flags into jabref-meta comments

• Adds serialization of gitAutoPull/gitAutoCommit/gitAutoPush to the metadata comment map when enabled.

jablib/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java

GitPreferences.javaAdd configurable pull interval to Git preferences +20/-2

Add configurable pull interval to Git preferences

• Extends GitPreferences with an IntegerProperty pullInterval, defaulting to 5 minutes, and exposes getter/setter/property for binding.

jablib/src/main/java/org/jabref/logic/git/preferences/GitPreferences.java

MetaDataParser.javaParse Git auto-sync flags from jabref-meta comments +6/-0

Parse Git auto-sync flags from jabref-meta comments

• Adds parsing branches that read gitAutoPull/gitAutoCommit/gitAutoPush from metadata and set them on MetaData during import.

jablib/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java

MetaData.javaAdd per-library Git auto-sync metadata fields +41/-3

Add per-library Git auto-sync metadata fields

• Introduces constants and boolean fields for gitAutoPull/gitAutoCommit/gitAutoPush with getters/setters that post change events. Updates equals/hashCode/toString to include the new fields.

jablib/src/main/java/org/jabref/model/metadata/MetaData.java

Bug fix (1) +14 / -2
GitShareToGitHubAction.javaGuard GitHub share behind configured repository URL +14/-2

Guard GitHub share behind configured repository URL

• Adds GitPreferences dependency and shows an error dialog if the repository URL is missing. Keeps the enablement condition tied to a saved local database.

jabgui/src/main/java/org/jabref/gui/git/GitShareToGitHubAction.java

Refactor (5) +25 / -371
GitShareToGitHubDialogView.javaSimplify GitHub share dialog UI to a single confirmation message +2/-78

Simplify GitHub share dialog UI to a single confirmation message

• Removes credential fields and access-check UI from the dialog view, replacing it with a descriptive label. Delegates the share action to the view model and relies on preferences for configuration.

jabgui/src/main/java/org/jabref/gui/git/GitShareToGitHubDialogView.java

GitShareToGitHubDialogViewModel.javaMake share-to-GitHub use stored preferences only +13/-160

Make share-to-GitHub use stored preferences only

• Strips dialog-scoped credential properties, validators, and access-check logic; shares the active library to the repository configured in GitPreferences. Improves failure logging while keeping modal error reporting for share failures.

jabgui/src/main/java/org/jabref/gui/git/GitShareToGitHubDialogViewModel.java

NetworkTab.javaRemove Git configuration section from Network preferences +0/-30

Remove Git configuration section from Network preferences

• Deletes the Git configuration UI from the Network tab now that Git settings live in their own preferences tab.

jabgui/src/main/java/org/jabref/gui/preferences/network/NetworkTab.java

NetworkTabViewModel.javaRemove GitPreferences wiring from Network tab view model +0/-32

Remove GitPreferences wiring from Network tab view model

• Removes Git-related properties, setValues/storeSettings logic, and the GitPreferences constructor dependency from NetworkTabViewModel.

jabgui/src/main/java/org/jabref/gui/preferences/network/NetworkTabViewModel.java

GitShareToGitHubDialog.fxmlReduce share dialog FXML to simple description label +10/-71

Reduce share dialog FXML to simple description label

• Replaces the multi-field form with a single wrapping label and keeps Share/Cancel buttons. Sets a fixed preferred width to improve presentation.

jabgui/src/main/resources/org/jabref/gui/git/GitShareToGitHubDialog.fxml

Tests (5) +109 / -12
GitShareToGitHubActionTest.javaUpdate Git share action test for new constructor signature +4/-3

Update Git share action test for new constructor signature

• Adjusts the unit test to supply GitPreferences to GitShareToGitHubAction and modernizes assertions.

jabgui/src/test/java/org/jabref/gui/git/GitShareToGitHubActionTest.java

GitPropertiesViewModelTest.javaAdd tests for Git library properties view model +46/-0

Add tests for Git library properties view model

• Adds coverage verifying that setValues reads MetaData flags and storeSettings persists checkbox selections back into MetaData.

jabgui/src/test/java/org/jabref/gui/libraryproperties/git/GitPropertiesViewModelTest.java

GitTabViewModelTest.javaRename/move tests to GitTabViewModel +5/-9

Rename/move tests to GitTabViewModel

• Moves the former Git share dialog view model test into the new preferences view model package and updates construction to match GitTabViewModel.

jabgui/src/test/java/org/jabref/gui/preferences/git/GitTabViewModelTest.java

BibDatabaseWriterTest.javaTest writing Git auto-sync metadata flags +30/-0

Test writing Git auto-sync metadata flags

• Adds tests asserting that gitAutoPull/gitAutoCommit/gitAutoPush are emitted as jabref-meta comments when enabled.

jablib/src/test/java/org/jabref/logic/exporter/BibDatabaseWriterTest.java

BibtexParserTest.javaTest parsing Git auto-sync metadata flags +24/-0

Test parsing Git auto-sync metadata flags

• Adds integration tests verifying that jabref-meta comments set MetaData gitAutoPull/gitAutoCommit/gitAutoPush during parsing.

jablib/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java

Documentation (2) +14 / -11
CHANGELOG.mdDocument Git library properties and new Git preferences tab +2/-0

Document Git library properties and new Git preferences tab

• Adds user-facing changelog entries for the new Git section in library properties and for moving Git settings into a dedicated preferences tab.

CHANGELOG.md

JabRef_en.propertiesAdd localization for Git library properties and Git preferences UI +12/-11

Add localization for Git library properties and Git preferences UI

• Adds/adjusts strings for auto operations, pull interval validation, share dialog description, and missing repository URL error. Removes obsolete strings from the old share dialog and Network Git section.

jablib/src/main/resources/l10n/JabRef_en.properties

Other (2) +7 / -2
PreferencesDialogViewModel.javaRegister new Git preferences tab +3/-1

Register new Git preferences tab

• Adds GitTab to the preferences dialog tab list, separating Git settings from Network preferences.

jabgui/src/main/java/org/jabref/gui/preferences/PreferencesDialogViewModel.java

JabRefCliPreferences.javaPersist pull interval in CLI preferences bindings +4/-1

Persist pull interval in CLI preferences bindings

• Adds a new preference key for gitPullInterval, includes it in GitPreferences creation, and binds it for persistence.

jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. GitPullScheduler catches Exception 📘 Rule violation ☼ Reliability
Description
The scheduled pull task catches Exception, which is overly broad and can hide unexpected failures.
This violates the requirement to catch specific exceptions and avoid java.lang.Exception catches.
Code

jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java[R53-55]

+        } catch (Exception e) {
+            LOGGER.warn("Scheduled Git pull failed", e);
+        }
Evidence
PR Compliance ID 14 forbids catching java.lang.Exception. The new scheduler code introduces `catch
(Exception e)` in the scheduled pull task.

AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly: AGENTS.md: Exception Handling: Narrow try Blocks, Use Specific Exceptions, and Log Properly:...

Comment thread jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java Outdated
Comment thread jablib/src/main/resources/l10n/JabRef_en.properties
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java Outdated
Comment on lines +49 to +52
try {
if (bibDatabaseContext.getMetaData().isGitAutoPull()) {
bibDatabaseContext.getDatabasePath().ifPresent(path -> gitAutoSync.pull(path, bibDatabaseContext));
}

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.

Action required

7. Auto-pull ignores unsaved edits 🐞 Bug ☼ Reliability

GitPullScheduler can trigger GitAutoSync.pull based only on metadata and Git working-tree status,
without checking whether the JabRef library has unsaved in-memory changes. This allows a scheduled
pull to apply merge changes into the live BibDatabaseContext and write to disk while the user is
editing, risking overwriting/confusing local unsaved work.
Agent Prompt
### Issue description
Scheduled auto-pull currently runs whenever `metaData.isGitAutoPull()` is true and the Git working tree is clean. It does **not** check JabRef’s “dirty” state (unsaved edits tracked via the undo manager / changed flag), so merges can be applied to the in-memory model (and written to disk) during active editing.

### Issue Context
- `GitPullScheduler.pull(...)` only checks `metaData.isGitAutoPull()`.
- `GitAutoSync.preparePull(...)` only checks `GitStatusSnapshot.uncommittedChanges()`.
- JabRef tracks unsaved edits via the LibraryTab undo manager (`undoManager.hasChanged()`), which is independent from Git’s working tree status.

### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java[48-55]
- jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java[128-155]
- jabgui/src/main/java/org/jabref/gui/LibraryTab.java[595-601]

### Suggested change
- Add an additional guard to scheduled pulls: skip if the associated LibraryTab has unsaved changes (e.g., `undoManager.hasChanged()` / tab changed property) or if the tab is currently saving.
- A clean way is to extend `GitPullScheduler.start(...)` to accept a `BooleanSupplier isSafeToPull` captured from the owning `LibraryTab`, so the scheduler can query the correct dirty/saving state per library before invoking `gitAutoSync.pull(...)`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this already fixed

Comment thread jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java Outdated
@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Aug 22, 2026
@subhramit
subhramit requested a review from wanling0000 August 22, 2026 18:06
@LoayTarek5 LoayTarek5 added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Aug 22, 2026
@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Aug 25, 2026
@LoayTarek5 LoayTarek5 removed the status: changes-required Pull requests that are not yet complete label Sep 4, 2026
@jabref-machine jabref-machine added the status: changes-required Pull requests that are not yet complete label Sep 5, 2026
@subhramit

Copy link
Copy Markdown
Member

Hi Loay, any changes pending here you wish to do? or rfr?

@LoayTarek5

Copy link
Copy Markdown
Collaborator Author

Hi Loay, any changes pending here you wish to do? or rfr?

All good, it is ready for review, i think i addressed all the previous reviews and i comments on ones that was need for decision


public SaveResult save(SaveDatabaseMode mode) {
return save(libraryTab.getBibDatabaseContext(), mode);
return save(mode, AutoCommit.ENABLED);

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.

Qn: why are we passing ENABLED here always?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

it iss the default for the existing signature, so callers that do not care keep the previous behaviour.

also the two that do care pass explicitly like GitCommitAction uses DISABLED so the commit action's own save doesnot commit twice, and AutosaveUiManager uses DISABLED for the autosave case koppor raised above

subhramit
subhramit previously approved these changes Sep 6, 2026

@subhramit subhramit left a comment

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.

Needs one final review.
All the requirements discussed seem to have been satisfied.

@jabref-machine jabref-machine removed the status: changes-required Pull requests that are not yet complete label Sep 6, 2026

@InAnYan InAnYan left a comment

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.

Sorry, killing the fun

Comment thread jabgui/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitAutoSync.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitPullScheduler.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/preferences/git/GitTabViewModel.java Outdated

public static final String GIT_AUTO_PULL = "gitAutoPull";
public static final String GIT_AUTO_COMMIT = "gitAutoCommit";
public static final String GIT_AUTO_PUSH = "gitAutoPush";

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.

This is an interesting questions. I think for now we can leave like this, and then decide later

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: awaiting-second-review For non-trivial changes labels Sep 6, 2026
Signed-off-by: subhramit <subhramit.bb@live.in>
@subhramit

subhramit commented Sep 6, 2026

Copy link
Copy Markdown
Member

@InAnYan took the opportunity to address, your comments felt valid. Can you take a look again now?
7c389e0

@InAnYan

InAnYan commented Sep 6, 2026

Copy link
Copy Markdown
Member

(Sorry for the french)
image

I think it's worth to have a button to go to Git preferences. Not a blocker, but I believe an important UX feature

@subhramit

Copy link
Copy Markdown
Member

I think it's worth to have a button to go to Git preferences. Not a blocker, but I believe an important UX feature

I have a similar idea about OpenOffice, since now its preferences are also divided across the panel settings and preferences tab.
@pluto-han Maybe when a user clicks settings, one of the options should be "More settings..."?

preferences,
stateManager,
taskExecutor,
Injector.instantiateModelOrService(GitHandlerRegistry.class),

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.

:)

Can be fixed in a follow-up

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.

no wait
this should go

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.

these take a lot of time later when working on something else so id rather do it now

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.

okay, then work, then approve and mergy!

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.

Okay I see why gpt missed it - this is a big one

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.

Check latest commit

InAnYan
InAnYan previously approved these changes Sep 6, 2026
Signed-off-by: subhramit <subhramit.bb@live.in>

@subhramit subhramit left a comment

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.

This was immense effort @LoayTarek5. Thank you for this.

@LoayTarek5

LoayTarek5 commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Yeahhhh🚀🎉.
Thanks to all reviewers, really

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Git integration as separate SLR library feature

8 participants