fix(devin): make SessionEnd installation non-destructive#162
Merged
Yif-Yang merged 1 commit intoJul 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Hardens the Devin plugin installer and SessionEnd hook to be non-destructive and idempotent, ensuring existing project hooks/configs are preserved while still installing SkillOpt-Sleep’s integration safely.
Changes:
- Update installer to merge
hooks.v1.jsonevent arrays without overwriting existing hooks and to avoid duplicating the SkillOpt entry on reinstall. - Install the SessionEnd hook under a SkillOpt-specific filename to avoid clobbering an existing project
on-session-end.sh. - Improve robustness/UX: shell-quote the printed MCP server path and make the hook succeed when
HOMEis missing; add comprehensive installer/hook tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/test_devin_plugin.py |
Adds installer/hook tests covering idempotency, malformed configs, legacy hook preservation, and safe path quoting. |
plugins/devin/README.md |
Clarifies marker purpose (inspection/automation) vs current harvesting mechanism; documents non-destructive installer behavior. |
plugins/devin/install.sh |
Switches to Python-based merge (no overwrite of existing hooks), avoids duplicate installs, uses SkillOpt-specific hook filename, and prints a safely shell-quoted MCP path. |
plugins/devin/hooks/on-session-end.sh |
Makes the marker hook non-blocking when HOME is unavailable; clarifies marker semantics. |
plugins/devin/hooks/hooks.v1.json |
Updates hook command to point at the new SkillOpt-specific hook script name. |
CHANGELOG.md |
Notes the new non-destructive Devin installer + SessionEnd marker behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
18
to
19
| # Merge into existing hooks.v1.json instead of overwriting, so we don't | ||
| # destroy other project hooks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up hardening for #148:
on-session-end.shis not overwrittenHOMEis unavailableValidation
368 passed, 6 skippedbash -n plugins/devin/install.sh plugins/devin/hooks/on-session-end.shgit diff --checkclaude-opus-4.8: MERGE, no blocking findings.devin/hooks.v1.json,SessionEnd, andDEVIN_PROJECT_DIR