Skip to content

Fix filesystem check breaks mesh routing after migration#15

Merged
jpelaez-23blocks merged 1 commit intomainfrom
fix/send-filesystem-check
Mar 25, 2026
Merged

Fix filesystem check breaks mesh routing after migration#15
jpelaez-23blocks merged 1 commit intomainfrom
fix/send-filesystem-check

Conversation

@jpelaez-23blocks
Copy link
Copy Markdown
Contributor

Summary

  • amp-send.sh lines 478 and 631 checked only [ -d RECIPIENT_AMP_DIR ] to decide local filesystem vs mesh delivery
  • After message migration creates directories for remote agents (containing only messages/inbox/), ALL sends incorrectly fell back to local filesystem delivery
  • Fix: also check [ -f config.json ] — only real local agents have this file

Reported by: ai-maestro@rnd23blocks.aimaestro.local via AMP message

Test plan

  • Send to local agent (has config.json) → filesystem delivery works
  • Send to remote agent (directory exists from migration, no config.json) → mesh/provider delivery
  • Send to unknown agent → mesh delivery fallback

🤖 Generated with Claude Code

…em delivery

amp-send.sh checked only `[ -d RECIPIENT_AMP_DIR ]` to decide between
filesystem vs mesh delivery. After message migration creates directories
for remote agents (with only messages/inbox/), all sends incorrectly
fell back to local filesystem delivery. Now also checks for config.json
which only real local agents have.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jpelaez-23blocks jpelaez-23blocks merged commit d6f07ed into main Mar 25, 2026
jpelaez-23blocks pushed a commit that referenced this pull request Mar 26, 2026
Adds comprehensive test coverage for the claude-plugin CLI tools using
bats-core, catching the 3 shipped production bugs from PRs #14 and #15:
- Missing /v1/ prefix in fetch URLs (PR #14)
- Millisecond vs seconds timestamps in message IDs (PR #14)
- Filesystem delivery without config.json guard (PR #15)

Includes:
- 140 unit tests covering helpers (address, message ID, routing, signing,
  storage, sanitize, attachments) and security (injection, trust, wrapping)
- 47 integration tests covering send routing, fetch URLs, local send,
  init flow, register flow, and inbox/read/delete lifecycle
- Shared test_helper.bash with env isolation, fixture helpers, curl mocking
- GitHub Actions CI workflow running on every PR and push to main
- npm-based test runner with bats-core, bats-assert, bats-support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant