@@ -16,7 +16,7 @@ This document contains critical information about working with this codebase. Fo
1616 - Public APIs must have docstrings
1717 - Functions must be focused and small
1818 - Follow existing patterns exactly
19- - Line length: 88 chars maximum
19+ - Line length: 120 chars maximum
2020
21213 . Testing Requirements
2222 - Framework: ` uv run --frozen pytest `
@@ -26,15 +26,19 @@ This document contains critical information about working with this codebase. Fo
2626 - Bug fixes require regression tests
2727
2828- For commits fixing bugs or adding features based on user reports add:
29+
2930 ``` bash
3031 git commit --trailer " Reported-by:<name>"
3132 ```
33+
3234 Where ` <name> ` is the name of the user.
3335
3436- For commits related to a Github issue, add
37+
3538 ``` bash
3639 git commit --trailer " Github-Issue:#<number>"
3740 ```
41+
3842- NEVER ever mention a ` co-authored-by ` or similar aspects. In particular, never
3943 mention the tool used to create the commit message or PR.
4044
@@ -116,3 +120,15 @@ This document contains critical information about working with this codebase. Fo
116120 - Follow existing patterns
117121 - Document public APIs
118122 - Test thoroughly
123+
124+ ## Exception Handling
125+
126+ - ** Always use ` logger.exception() ` instead of ` logger.error() ` when catching exceptions**
127+ - Don't include the exception in the message: ` logger.exception("Failed") ` not ` logger.exception(f"Failed: {e}") `
128+ - ** Catch specific exceptions** where possible:
129+ - File ops: ` except (OSError, PermissionError): `
130+ - JSON: ` except json.JSONDecodeError: `
131+ - Network: ` except (ConnectionError, TimeoutError): `
132+ - ** Only catch ` Exception ` for** :
133+ - Top-level handlers that must not crash
134+ - Cleanup blocks (log at debug level)
0 commit comments