Skip to content

Fix 2#16

Merged
baxyz merged 4 commits intomainfrom
fix-2
Apr 7, 2026
Merged

Fix 2#16
baxyz merged 4 commits intomainfrom
fix-2

Conversation

@baxyz
Copy link
Copy Markdown
Contributor

@baxyz baxyz commented Apr 7, 2026

  • enhance SSH file synchronization
  • improve error messaging for copy failures
  • update version in feature configuration

Description

Please include a summary of what this PR does and why it's needed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring
  • Test improvement

Related Issues

Closes #(issue number)

How Has This Been Tested?

Describe the tests you ran and how to reproduce them:

  • Test A
  • Test B

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests for my changes
  • All new and existing tests passed locally
  • My commits follow the conventional commit format

Screenshots (if applicable)

Add screenshots for UI changes.

Additional Context

Add any other context about the PR here.

baxyz added 2 commits April 7, 2026 21:29
…andling

- bump version to 1.0.1
- enhance volume validation and error messages
- update hook event names to PascalCase
- enhance SSH file synchronization
- improve error messaging for copy failures
- update version in feature configuration
Copilot AI review requested due to automatic review settings April 7, 2026 19:36
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

✅ PR Validation Passed

All checks passed!


📋 Pipeline Status

Job Status
🧾 Conventional Commits passing
🧪 Feature Tests passing
🐚 ShellCheck passing

🤖 Generated by @helpers4 CI • 2026-04-07

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates two devcontainer features (peon-ping and local-mounts) to improve synchronization and runtime behavior, while also bumping their published feature versions.

Changes:

  • Add volume validation + more defensive JSON handling for peon-ping config/hooks generation.
  • Enhance local-mounts synchronization (fallback copy strategy + broader SSH file syncing) and adjust SSH agent guidance/detection to use ssh-add -l.
  • Bump feature versions for both features.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/peon-ping/install.sh Adds volume validation and hardens JSON read/write paths; updates Copilot hook generation.
src/peon-ping/devcontainer-feature.json Bumps peon-ping feature version to 1.0.1.
src/local-mounts/README.md Updates SSH agent setup instructions to use ssh-add -l checks.
src/local-mounts/install.sh Adds cp fallback logic, broadens SSH file sync, and changes runtime SSH agent socket detection.
src/local-mounts/devcontainer-feature.json Bumps local-mounts feature version to 1.0.8.
Comments suppressed due to low confidence (3)

src/local-mounts/README.md:67

  • These host-shell snippets use if ! ssh-add -l ...; then to decide whether to recreate the agent. ssh-add -l also returns non-zero when the agent is running but has no keys loaded, so this can unnecessarily kill/recreate a valid agent/socket. Consider branching on the specific “cannot connect to agent” failure case (and treating “no identities” as an alive agent).
```bash
# Stable SSH agent socket (optional, recommended for devcontainers)
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
if ! ssh-add -l &>/dev/null; then
    rm -f "$SSH_AUTH_SOCK"
    eval "$(ssh-agent -a "$SSH_AUTH_SOCK")" >/dev/null
    ssh-add 2>/dev/null
fi

src/local-mounts/README.md:79

  • Same issue as the zsh snippet above: ssh-add -l returns non-zero when the agent is reachable but has no identities, so this condition can recreate a healthy agent/socket unnecessarily. Consider checking for the specific “cannot connect to agent” case rather than treating any non-zero as failure.
```bash
# Stable SSH agent socket (optional, recommended for devcontainers)
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
if ! ssh-add -l >/dev/null 2>&1; then
    rm -f "$SSH_AUTH_SOCK"
    eval "$(ssh-agent -a "$SSH_AUTH_SOCK")" > /dev/null
    ssh-add 2>/dev/null
fi

src/local-mounts/README.md:90

  • Same issue as the other host-shell examples: ssh-add -l non-zero can mean “agent alive but no identities”, so this condition may recreate an agent unnecessarily (especially common before keys are added to the keychain). Consider distinguishing “cannot connect to agent” from “no identities” in the check.
```bash
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
if ! ssh-add -l &>/dev/null; then
    rm -f "$SSH_AUTH_SOCK"
    eval "$(ssh-agent -a "$SSH_AUTH_SOCK")" >/dev/null
    ssh-add --apple-use-keychain 2>/dev/null
fi

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

baxyz added 2 commits April 7, 2026 21:43
- refactor SSH agent check to use a function
- enhance error handling for agent responses
fix(peon-ping): 🐛 validate volume range using awk
@baxyz baxyz merged commit 1e49d5f into main Apr 7, 2026
21 checks passed
@baxyz baxyz deleted the fix-2 branch April 7, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants