Skip to content

fix(plugin): graceful chmod failure in SessionStats init (#1206)#1207

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/1206-graceful-chmod-failure
Apr 3, 2026
Merged

fix(plugin): graceful chmod failure in SessionStats init (#1206)#1207
JeremyDev87 merged 1 commit into
masterfrom
fix/1206-graceful-chmod-failure

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • os.chmod() in SessionStats.__init__() (stats.py:43) is now wrapped in try/except OSError
  • On failure, a warning is printed to stderr instead of crashing the plugin
  • Added test_chmod_failure_graceful test to verify graceful handling

Test plan

  • python3 -m pytest tests/test_stats.py -v — 27/27 passed
  • yarn workspace codingbuddy test — 5821 passed
  • yarn workspace codingbuddy build — success

Closes #1206

Wrap os.chmod() in try/except OSError so that PermissionError on
managed home directories or restricted environments no longer crashes
the entire plugin. A stderr warning is emitted instead.

Closes #1206
@JeremyDev87 JeremyDev87 added the fix label Apr 3, 2026
@vercel

vercel Bot commented Apr 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 3, 2026 1:51pm

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ Review complete — all comments addressed

Code Review:

  • os.chmod wrapped in try/except OSError with stderr warning — correct
  • test_chmod_failure_graceful test using monkeypatch — clean
  • No unused imports, no dead code
  • CI: 27/27 checks pass

LGTM

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit 7f07a23 into master Apr 3, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/1206-graceful-chmod-failure branch April 3, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugin): graceful chmod failure in SessionStats initialization

1 participant