Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

ci: add Cata dispatch workflow#1519

Merged
jpleva91 merged 1 commit intomainfrom
feat/cata-dispatch-workflow
Apr 4, 2026
Merged

ci: add Cata dispatch workflow#1519
jpleva91 merged 1 commit intomainfrom
feat/cata-dispatch-workflow

Conversation

@jpleva91
Copy link
Copy Markdown
Collaborator

@jpleva91 jpleva91 commented Apr 4, 2026

Summary

  • Adds cata-dispatch.yml GitHub Actions workflow to enable repository_dispatch events
  • Allows the Octi Pulpo brain to dispatch tasks to Cata agents running in this repo via GitHub Actions
  • Part of the governed SDLC pipeline where Octi Pulpo coordinates work across repos

Test plan

  • Verify workflow file passes GitHub Actions syntax validation
  • Test a repository_dispatch event from Octi Pulpo brain targeting this repo
  • Confirm Cata agent picks up and executes the dispatched task

🤖 Generated with Claude Code

Enables repository_dispatch events so the Octi Pulpo brain can dispatch
tasks to Cata agents via GitHub Actions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 4, 2026 16:14
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

Adds a GitHub Actions workflow to allow external orchestration (Octi Pulpo) to dispatch work to “Cata” agents running in this repository via repository_dispatch, aligning with the governed SDLC automation described in the PR.

Changes:

  • Introduces .github/workflows/cata-dispatch.yml triggered by repository_dispatch type octi-pulpo-dispatch.
  • Downloads a cata binary from AgentGuardHQ/cata releases and executes it with task metadata from client_payload.
  • Reports a completion message at the end of the job.

Comment on lines +6 to +9
jobs:
cata-agent:
runs-on: ubuntu-latest
if: |
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

GITHUB_TOKEN permissions are not explicitly set. Other workflows in this repo declare least-privilege permissions (e.g., contents: read). Please add an explicit permissions: block (workflow- or job-level) so the token scope is intentional and consistent, especially since this workflow can run on external dispatch.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +4
on:
repository_dispatch:
types: [octi-pulpo-dispatch]
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

Because this workflow runs on repository_dispatch, any actor who can send a dispatch to this repo can trigger it. Consider adding an allowlist check (e.g., github.event.sender.login/github.actor) and/or a shared-secret check in client_payload before running any jobs.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +44
- name: Run Cata agent
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This job injects DEEPSEEK_API_KEY and GITHUB_TOKEN into a process whose behavior is determined by client_payload.prompt. Tightening dispatch authentication/authorization is especially important here to avoid untrusted prompts leading to secret exfiltration.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +33
gh release download --repo AgentGuardHQ/cata \
--pattern "cata-linux-amd64" \
--output cata \
--clobber || echo "WARN: cata release not yet published"
chmod +x cata 2>/dev/null || true
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The workflow downloads and executes a cata binary from another repo without pinning a specific version/tag and without integrity verification. Please pin to a known release and verify a checksum/signature before executing to reduce supply-chain risk.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +54
./cata run \
--provider deepseek \
--model deepseek-chat \
--max-turns 100 \
"${TASK_PROMPT}" \
|| echo "WARN: cata exited non-zero for task ${TASK_ID}"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

./cata run ... || echo ... masks agent failures and will still mark this step successful even when the agent exits non-zero. Consider letting the command fail (or capturing the exit code and explicitly failing after reporting) so dispatchers can reliably detect failure.

Suggested change
./cata run \
--provider deepseek \
--model deepseek-chat \
--max-turns 100 \
"${TASK_PROMPT}" \
|| echo "WARN: cata exited non-zero for task ${TASK_ID}"
if ! ./cata run \
--provider deepseek \
--model deepseek-chat \
--max-turns 100 \
"${TASK_PROMPT}"; then
echo "WARN: cata exited non-zero for task ${TASK_ID}"
exit 1
fi

Copilot uses AI. Check for mistakes.
@jpleva91 jpleva91 merged commit 885b761 into main Apr 4, 2026
9 checks passed
@jpleva91 jpleva91 deleted the feat/cata-dispatch-workflow branch April 4, 2026 16:18
jpleva91 added a commit that referenced this pull request Apr 4, 2026
Enables repository_dispatch events so the Octi Pulpo brain can dispatch
tasks to Cata agents via GitHub Actions.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants