agent-manager 0.29.1 (new formula) - #298792
Conversation
| assert_match version.to_s, shell_output("#{bin}/agent-manager --version") | ||
| assert_match "usage: agent-manager rename", shell_output("#{bin}/agent-manager rename 2>&1", 1) |
There was a problem hiding this comment.
We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.
In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.
- Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
- You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?
Some advice for specific cases:
- If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
- If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
- If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
- Same if the software requires a virtual machine, docker instance, etc. to be running.
There was a problem hiding this comment.
Thanks for the quick review! Swapped the usage check for tests that actually run the app:
- pipes a JSON-RPC session into the built-in MCP server (initialize + tools/list) and checks the handshake reports the formula version (so the ldflags wiring too) and that the tool registry lists create_terminal
- boots the TUI under a PTY and waits for the header to render, which also covers the tmux dependency since the app refuses to start without tmux on PATH
|
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?brew test <formula>?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?Drafted with Grok (xAI). I wrote and reviewed the formula, built it from source, ran
brew testandbrew audit --new --online --strict, and kept the commit author as myself.Open-source Go CLI (Apache-2.0). Builds from the v0.29.1 source tarball.
tmuxis a runtime dependency.main.buildSource=Homebrewdisables in-place self-update so upgrades stay onbrew upgrade.Notability: https://github.com/YoanWai/agent-manager — 312 stars, created 2026-07-15 (30 days). Self-submission.
A third-party tap cask already exists at
yoanwai/tap/agent-managerfor the prebuilt binary. This formula is the source build forbrew install agent-manager.