Skip to content

refactor(tools): update GitHub tool slugs for clarity and remove deprecated entry#2766

Merged
M3gA-Mind merged 4 commits into
tinyhumansai:mainfrom
YellowSnnowmann:fix/composio-curated-slug-audit
May 28, 2026
Merged

refactor(tools): update GitHub tool slugs for clarity and remove deprecated entry#2766
M3gA-Mind merged 4 commits into
tinyhumansai:mainfrom
YellowSnnowmann:fix/composio-curated-slug-audit

Conversation

@YellowSnnowmann
Copy link
Copy Markdown
Contributor

@YellowSnnowmann YellowSnnowmann commented May 27, 2026

fix(composio): update GitHub action slugs

Summary

  • Updates the GitHub Composio provider to use the current v3 action slugs:
    • GITHUB_GET_THE_AUTHENTICATED_USER
    • GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS
  • Updates GitHub provider tests to assert the new curated slugs.
  • Updates inline GitHub sync/provider comments and error text so they match the runtime action names.

Validation

  • Verified the new GitHub slugs against the backend execute endpoint:
    • Current slugs returned ActionExecute_ConnectedAccountNotFound, which confirms the tool slug is recognized but the account is not connected.
    • Old slug GITHUB_GET_AUTHENTICATED_USER returned Tool_ToolNotFound.
  • Ran focused test:
cargo test --manifest-path /Users/cardinal/Desktop/projects/main/openhuman/Cargo.toml curated_tools_contains_core_actions --lib

Result: passed.
Closes: #2768

Notes

  • This PR intentionally includes only the GitHub runtime/test slug changes.
  • Other platform slug audit changes remain local and are not part of this PR.

Summary by CodeRabbit

  • Updates
    • Removed standalone "Close Issue" tool from GitHub catalog; use "Update Issue" with state:"closed" instead.
    • Admin delete tool now targets deleting Git references rather than branches.
    • Curated GitHub actions expanded to include repository-related actions (list repositories and create a repository for the authenticated user).

Review Change Stack

@YellowSnnowmann YellowSnnowmann requested a review from a team May 27, 2026 14:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

📝 Walkthrough

Walkthrough

The PR updates the GitHub Composio provider tool catalog to remove a dedicated close-issue entry in favor of inline guidance using update-issue with a state parameter, and migrates the admin deletion tool from branch-specific to generic reference deletion.

Changes

GitHub Composio Tool Catalog Entry Updates

Layer / File(s) Summary
Tool catalog comment for issue closing
src/openhuman/memory_sync/composio/providers/github/tools.rs
Removed the dedicated GITHUB_CLOSE_AN_ISSUE entry and added inline guidance to use GITHUB_UPDATE_AN_ISSUE with state:"closed".
Admin delete action and test updates
src/openhuman/memory_sync/composio/providers/github/tools.rs, src/openhuman/memory_sync/composio/providers/github/tests.rs
Swapped the admin destructive tool slug from the branch-specific variant to GITHUB_DELETE_A_REFERENCE (requires refs/... full ref), and updated unit tests to assert new repository-related slugs, the GITHUB_DELETE_A_REFERENCE slug, and the absence of GITHUB_CLOSE_AN_ISSUE.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2488: Related edits to the GitHub curated tool catalog and corresponding test assertions (close-issue removal and delete->reference change).

Suggested reviewers

  • senamakel

Poem

A rabbit hops through code so clean,
Notes swapped and tests made keen,
Close with update, refs take flight,
Small edits roll into the night. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor(tools): update GitHub tool slugs for clarity and remove deprecated entry' accurately summarizes the main changes: updating GitHub Composio tool slugs and removing the deprecated close-issue entry.
Linked Issues check ✅ Passed The pull request fully addresses the requirements from issue #2768: updates outdated GitHub Composio action slugs (GITHUB_GET_AUTHENTICATED_USER to GITHUB_GET_THE_AUTHENTICATED_USER and GITHUB_SEARCH_ISSUES to GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS), removes deprecated close-issue entry, and updates corresponding test assertions.
Out of Scope Changes check ✅ Passed All changes are scoped to GitHub provider slug updates and test assertions as specified in issue #2768; no unrelated or out-of-scope modifications are present in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


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

@coderabbitai coderabbitai Bot added rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. working A PR that is being worked on by the team. labels May 27, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 27, 2026
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

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

@YellowSnnowmann hey! the code looks good to me — slug updates are correct, the error message in provider.rs is consistent, and the test assertions are aligned. a few notes:

Undocumented changes in tools.rs: The PR body only mentions GITHUB_GET_THE_AUTHENTICATED_USER and GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS, but the diff also renames GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER, GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER, GITHUB_DELETE_A_BRANCHGITHUB_DELETE_A_REFERENCE, and removes GITHUB_CLOSE_AN_ISSUE. These all look intentional and correct, but worth documenting in the PR body for the changelog — especially the CLOSE_AN_ISSUE removal and the branch→reference rename, since those are behavioral changes from the caller's perspective.

GITHUB_DELETE_A_REFERENCE: Worth a note in the tools comment that callers must pass a full ref path (e.g. refs/heads/branch-name), not just a branch name — DELETE_A_REFERENCE is more general than DELETE_A_BRANCH and would also delete tags if given the wrong ref. Low risk since this is curated tools, not user-facing input, but good to document.

Otherwise this is a clean fix. CI is nearly green — just one macOS e2e job still pending. once that clears, i'll come back and approve.

Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind 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

Overview

Small, focused slug audit — the runtime-critical constants in provider.rs are updated consistently with the curated list, and the doc comments/error strings are kept in sync. Validation evidence in the PR body (backend returning ConnectedAccountNotFound vs ToolNotFound) is the right way to confirm these slugs exist in Composio v3. One required fix before merge.


Required

Test coverage gapcurated_tools_contains_core_actions only asserts two of the six changed slugs. The three additional renames and the GITHUB_CLOSE_AN_ISSUE removal are uncovered; a future accidental revert won't be caught.

Suggested additions to tests.rs:

assert!(slugs.contains(&"GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER"));
assert!(slugs.contains(&"GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"));
assert!(slugs.contains(&"GITHUB_DELETE_A_REFERENCE"));
assert!(
    !slugs.contains(&"GITHUB_CLOSE_AN_ISSUE"),
    "GITHUB_CLOSE_AN_ISSUE removed — use GITHUB_UPDATE_AN_ISSUE with state:closed"
);

Minor

GITHUB_DELETE_A_BRANCHGITHUB_DELETE_A_REFERENCE is a semantic change. The Composio v3 action maps to GitHub's DELETE /repos/tinyhumansai/openhuman/git/refs/{ref}, which deletes any git reference (branches and tags alike), not just branches. Any caller that passes a ref expecting branch-only behavior could silently delete a tag. I've confirmed no agent prompts reference the old slug, so this is low risk — but worth a note in the commit message for ops awareness.


Nit

The removal comment in tools.rs is helpful; adding the concrete parameter makes it immediately actionable:

// GITHUB_CLOSE_AN_ISSUE — removed: no dedicated Composio slug.
// Use GITHUB_UPDATE_AN_ISSUE with {"state": "closed"} instead.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/openhuman/memory_sync/composio/providers/github/tools.rs (1)

180-180: ⚡ Quick win

Confirm old slug usage: only remains in the Composio GitHub fixture

The rename to GITHUB_CANCEL_A_WORKFLOW_RUN matches the Composio v3 naming convention, and there are no Rust/test references to the old GITHUB_CANCEL_WORKFLOW_RUN outside of test data. The only remaining occurrence of the old slug is in tests/fixtures/composio_github.json. Consider regenerating that fixture if it’s meant to mirror the current tool dump to avoid fixture drift.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/openhuman/memory_sync/composio/providers/github/tools.rs` at line 180,
The tool slug was renamed to GITHUB_CANCEL_A_WORKFLOW_RUN (previously
GITHUB_CANCEL_WORKFLOW_RUN) but the test fixture file composio_github.json still
contains the old slug; update that fixture to use GITHUB_CANCEL_A_WORKFLOW_RUN
(or regenerate the Composio GitHub fixture from the current tool dump) so tests
match the new slug used by the provider code (look for occurrences of
GITHUB_CANCEL_WORKFLOW_RUN and replace/regenerate accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/openhuman/memory_sync/composio/providers/github/tools.rs`:
- Line 180: The tool slug was renamed to GITHUB_CANCEL_A_WORKFLOW_RUN
(previously GITHUB_CANCEL_WORKFLOW_RUN) but the test fixture file
composio_github.json still contains the old slug; update that fixture to use
GITHUB_CANCEL_A_WORKFLOW_RUN (or regenerate the Composio GitHub fixture from the
current tool dump) so tests match the new slug used by the provider code (look
for occurrences of GITHUB_CANCEL_WORKFLOW_RUN and replace/regenerate
accordingly).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 904d1acb-1fe0-469b-9243-4bee11726a0f

📥 Commits

Reviewing files that changed from the base of the PR and between b84ed51 and a747ed3.

📒 Files selected for processing (1)
  • src/openhuman/memory_sync/composio/providers/github/tools.rs

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 28, 2026
…rated_tools_contains_core_actions

Addresses review feedback on tinyhumansai#2766: the previous assertion only covered two
of the six changed slugs, leaving LIST_REPOSITORIES, CREATE_A_REPOSITORY,
DELETE_A_REFERENCE, and the CLOSE_AN_ISSUE removal undetected by tests.

Also adds an inline comment on GITHUB_DELETE_A_REFERENCE documenting that
callers must pass a full ref path (refs/heads/ or refs/tags/) — the action
maps to GitHub's generic DELETE /git/refs/{ref} endpoint which can delete
tags as well as branches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/openhuman/memory_sync/composio/providers/github/tests.rs (1)

170-171: ⚡ Quick win

Confirm GITHUB_CURATED contains the new repository-action slugs.

  • GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER and GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER both exist in src/openhuman/memory_sync/composio/providers/github/tools.rs within the GITHUB_CURATED array, so the new tests.rs assertions align with the curated source.
  • Consider adding a brief comment explaining why these repository actions are intentionally included relative to the PR’s stated scope.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/openhuman/memory_sync/composio/providers/github/tests.rs` around lines
170 - 171, The test should explicitly assert the two repository-action slugs are
present and explain why they’re included: keep the assertions for
"GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER" and
"GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER" in
src/openhuman/memory_sync/composio/providers/github/tests.rs, and add a short
inline comment above those asserts stating that these slugs are present because
they are part of the curated GITHUB_CURATED array in
src/openhuman/memory_sync/composio/providers/github/tools.rs and are
intentionally included despite the PR’s narrower scope; reference the
GITHUB_CURATED symbol and the two slug strings in the comment so future
reviewers see the rationale.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/openhuman/memory_sync/composio/providers/github/tests.rs`:
- Around line 170-171: The test should explicitly assert the two
repository-action slugs are present and explain why they’re included: keep the
assertions for "GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER" and
"GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER" in
src/openhuman/memory_sync/composio/providers/github/tests.rs, and add a short
inline comment above those asserts stating that these slugs are present because
they are part of the curated GITHUB_CURATED array in
src/openhuman/memory_sync/composio/providers/github/tools.rs and are
intentionally included despite the PR’s narrower scope; reference the
GITHUB_CURATED symbol and the two slug strings in the comment so future
reviewers see the rationale.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2eb415c-a385-4c66-8556-6d171bd220c8

📥 Commits

Reviewing files that changed from the base of the PR and between a747ed3 and cb6540b.

📒 Files selected for processing (2)
  • src/openhuman/memory_sync/composio/providers/github/tests.rs
  • src/openhuman/memory_sync/composio/providers/github/tools.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/openhuman/memory_sync/composio/providers/github/tools.rs

@YellowSnnowmann
Copy link
Copy Markdown
Contributor Author

Thanks for the thorough reviews, @graycyrus and @M3gA-Mind!

Pushed cb6540b addressing all feedback:

@M3gA-Mind — required:

  • Added all four missing assertions to curated_tools_contains_core_actions: LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER, CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER, DELETE_A_REFERENCE, and a negative assertion that CLOSE_AN_ISSUE is absent (with the migration message as the failure string).

@graycyrus + @M3gA-MindGITHUB_DELETE_A_REFERENCE docs:

  • Added an inline comment in tools.rs explaining that callers must pass a full ref path (refs/heads/branch-name or refs/tags/v1.0), that a bare branch name 404s, and that the action is broader than the old DELETE_A_BRANCH (tags included). The ops-awareness note is now in the commit message too.

@graycyrus — undocumented changes:
Good call. The PR body previously only called out the two slug renames that triggered the investigation. The full list of changes is:

  • GITHUB_GET_THE_AUTHENTICATED_USER — slug corrected (was GITHUB_GET_AUTHENTICATED_USER)
  • GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS — slug corrected (was GITHUB_SEARCH_ISSUES)
  • GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER — slug corrected
  • GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER — slug corrected
  • GITHUB_DELETE_A_BRANCHGITHUB_DELETE_A_REFERENCE — Composio v3 rename; semantic note added to the comment
  • GITHUB_CLOSE_AN_ISSUE removed — no dedicated v3 slug; callers use UPDATE_AN_ISSUE with state:"closed"

@M3gA-Mind — nit (CLOSE_AN_ISSUE comment):
The comment in tools.rs already had the state:"closed" guidance from the previous commit. No change needed there.

@oxoxDev oxoxDev assigned oxoxDev and unassigned oxoxDev May 28, 2026
Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind left a comment

Choose a reason for hiding this comment

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

LGTM — the core fix (adding as a live entry) is correct and the expanded test coverage is solid. Approving.

Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind left a comment

Choose a reason for hiding this comment

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

LGTM — the core fix (adding GITHUB_DELETE_A_REFERENCE as a live CuratedTool entry) is correct and the expanded test coverage is solid. Approving.

@M3gA-Mind M3gA-Mind merged commit 442fef3 into tinyhumansai:main May 28, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Composio sync uses outdated action slugs

4 participants