Add GitHub Actions workflow for MCP agent session backfill - #1052
Conversation
Lets operators dry-run and execute the production sweep with existing CF secrets, and documents the correct kody-production worker script. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Merged and dry-run triggered on |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5485103. Configure here.
|
|
||
| echo "Running backfill mode=${BACKFILL_MODE} origin=${BACKFILL_ORIGIN} worker_script=${BACKFILL_WORKER_SCRIPT}" | ||
| npm run backfill:mcp-agent-sessions -- "${args[@]}" | ||
| echo "AUDIT_PATH=${RUNNER_TEMP}/mcp-agent-session-backfill-${BACKFILL_MODE}.json" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Audit artifact skipped on failure
Medium Severity
AUDIT_PATH is written to GITHUB_ENV only after npm run backfill:mcp-agent-sessions succeeds. In execute mode, runMcpAgentSessionBackfill writes the audit file then exits with an error when failures remain, so later steps gated on env.AUDIT_PATH skip summarize and upload even though the audit JSON exists on the runner.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5485103. Configure here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a manually triggered GitHub Actions workflow for MCP agent session backfills, including dry-run/execute modes, audit summarization, and artifact upload. Updates contributor documentation with workflow usage, environment requirements, and ChangesMCP agent session backfill
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant GitHubActions
participant BackfillCLI
participant Worker
participant AuditArtifact
Operator->>GitHubActions: Dispatch mode, origin, and worker script
GitHubActions->>BackfillCLI: Run backfill command with credentials and arguments
BackfillCLI->>Worker: Paginate objects and call ownership RPC
Worker-->>BackfillCLI: Return session ownership data
BackfillCLI-->>GitHubActions: Write audit JSON
GitHubActions->>AuditArtifact: Summarize and upload audit JSON
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |


Summary
workflow_dispatchjob to dry-run/execute the MCP Agent session ownership backfill against production using existing Cloudflare + maintenance secrets.kody-production.Test plan
gh workflow run backfill-mcp-agent-sessions.yml -f mode=dry-runno_owner/ ownership conflicts / failures)-f mode=executeMade with Cursor
Summary by CodeRabbit
New Features
Documentation