Skip to content

t1328: Matterbridge agent — subagent doc and helper script for multi-platform chat bridging#2387

Merged
marcusquinn merged 1 commit intomainfrom
feature/t1328
Feb 26, 2026
Merged

t1328: Matterbridge agent — subagent doc and helper script for multi-platform chat bridging#2387
marcusquinn merged 1 commit intomainfrom
feature/t1328

Conversation

@alex-solovyev
Copy link
Collaborator

@alex-solovyev alex-solovyev commented Feb 26, 2026

Summary

  • Adds .agents/services/communications/matterbridge.md — subagent doc covering installation, matterbridge.toml configuration, gateway setup, Docker deployment, REST API, and SimpleX bridge via matterbridge-simplex adapter
  • Adds .agents/scripts/matterbridge-helper.sh — helper script for setup, start/stop/status/logs, update, and SimpleX bridge Docker Compose management
  • Adds .agents/configs/matterbridge-simplex-compose.yml and .agents/configs/matterbridge-simplex.toml.example — Docker Compose template and config template for SimpleX-Matterbridge bridge stack
  • Adds .agents/scripts/tests/test-matterbridge-helper.sh — 23-test suite (23/23 pass); fixes Linux-first stat format for permissions check
  • Security/privacy warnings cross-referenced to tools/security/opsec.md (t1327.6), not duplicated

Verification

  • ShellCheck: zero violations on matterbridge-helper.sh and test script
  • Tests: 23/23 pass (help, simplex-bridge init/status/logs, unknown commands, compose/config template validation, shellcheck gate)

Ref #2254

Summary by CodeRabbit

  • Tests
    • Updated permission-check logic in test script to optimize OS detection order, prioritizing Linux path with macOS fallback. No functional changes to test behavior or validation thresholds.

…ck (t1328)

stat -c '%a' is the Linux format; stat -f '%Lp' is macOS-only.
Previous order caused false failure on Linux where -f outputs full stat block.
@gemini-code-assist
Copy link

Summary of Changes

Hello @alex-solovyev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces comprehensive support for multi-platform chat bridging using Matterbridge. It provides detailed documentation, a robust helper script for managing the Matterbridge agent, and pre-configured Docker Compose setups specifically for integrating with SimpleX. The changes aim to simplify deployment and operation while ensuring cross-platform compatibility and adherence to security best practices.

Highlights

  • Matterbridge Documentation: Added a subagent documentation file (.agents/services/communications/matterbridge.md) covering installation, configuration, gateway setup, Docker deployment, REST API, and SimpleX bridge.
  • Matterbridge Helper Script: Introduced a helper script (.agents/scripts/matterbridge-helper.sh) to streamline setup, start/stop/status/logs, updates, and SimpleX bridge Docker Compose management.
  • SimpleX Bridge Configuration: Included Docker Compose and configuration templates (.agents/configs/matterbridge-simplex-compose.yml, .agents/configs/matterbridge-simplex.toml.example) for the SimpleX-Matterbridge bridge stack.
  • Testing and Cross-Platform Compatibility: Added a 23-test suite (.agents/scripts/tests/test-matterbridge-helper.sh) for the helper script, including a fix for Linux-first stat format for permissions checks.
  • Security and Privacy: Ensured security and privacy warnings are cross-referenced to tools/security/opsec.md instead of being duplicated.
Changelog
  • .agents/scripts/tests/test-matterbridge-helper.sh
    • Updated the stat command usage to correctly handle permission checks on both Linux (-c '%a') and macOS (-f '%Lp') systems.
Activity
  • The matterbridge-helper.sh and its test script passed ShellCheck with zero violations.
  • A comprehensive test suite of 23 tests for the helper script passed successfully, covering various functionalities including help, SimpleX bridge initialization, status, logs, unknown commands, compose/config template validation, and ShellCheck gate.
  • This pull request addresses and references issue t1328: Matterbridge agent for multi-platform chat bridging #2254.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 89 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Thu Feb 26 18:32:55 UTC 2026: Code review monitoring started
Thu Feb 26 18:32:55 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 89

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 89
  • VULNERABILITIES: 0

Generated on: Thu Feb 26 18:32:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbcddc3 and 827a64e.

📒 Files selected for processing (1)
  • .agents/scripts/tests/test-matterbridge-helper.sh

Walkthrough

The permission-check logic in test_simplex_bridge_init was reordered to prioritize Linux stat syntax over macOS syntax, with the fallback reversed accordingly. An explanatory comment was added. The threshold (600 permissions) and error handling remain unchanged.

Changes

Cohort / File(s) Summary
Test Utility Refactor
.agents/scripts/tests/test-matterbridge-helper.sh
Reversed stat command invocation order in permission check: Linux-first approach (stat -c '%a') now precedes macOS fallback (stat -f '%Lp'). Added explanatory comment for clarity.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

needs-review

Poem

📜 Stat commands dance in the shell,
Linux first, then macOS to tell—
Permissions checked with graceful care,
Fallbacks ready, no unexpected snare! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main contribution: adding Matterbridge agent documentation, helper script, and configuration templates for multi-platform chat bridging.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t1328

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Matterbridge agent helper script, along with documentation and tests. The changes are well-structured. My review focuses on a small improvement in the test script to align with the project's error handling guidelines, specifically regarding the use of 2>/dev/null for cross-platform compatibility. The existing comment is valid and aligns with the repository's rules, so it has been kept as is.

local perms
perms="$(stat -f '%Lp' "$config_path" 2>/dev/null || stat -c '%a' "$config_path" 2>/dev/null || echo "unknown")"
# stat -c '%a' is Linux; stat -f '%Lp' is macOS
perms="$(stat -c '%a' "$config_path" 2>/dev/null || stat -f '%Lp' "$config_path" 2>/dev/null || echo "unknown")"

Choose a reason for hiding this comment

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

medium

Using 2>/dev/null here suppresses all errors from stat, including potentially useful ones like 'command not found' or permission errors. This goes against the repository's general rules which discourage blanket error suppression. While removing it will cause a benign 'invalid option' error to be printed on the non-matching platform, it ensures that more critical errors are not hidden. This is a better trade-off for script robustness and debugging.

Suggested change
perms="$(stat -c '%a' "$config_path" 2>/dev/null || stat -f '%Lp' "$config_path" 2>/dev/null || echo "unknown")"
perms="$(stat -c '%a' "$config_path" || stat -f '%Lp' "$config_path" || echo "unknown")"
References
  1. Avoid using '2>/dev/null' for blanket suppression of command errors in shell scripts to ensure that authentication, syntax, or system issues remain visible for debugging.
  2. Avoid using 2>/dev/null to suppress errors on file operations if the file's existence has already been verified (e.g., [[ -f "$file" ]] or an early return). This practice is redundant for 'file not found' errors and can mask other important issues like permissions problems.

@marcusquinn marcusquinn merged commit f036228 into main Feb 26, 2026
25 checks passed
alex-solovyev added a commit that referenced this pull request Feb 26, 2026
…ck (t1328) (#2387)

stat -c '%a' is the Linux format; stat -f '%Lp' is macOS-only.
Previous order caused false failure on Linux where -f outputs full stat block.
@alex-solovyev alex-solovyev deleted the feature/t1328 branch February 26, 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