Skip to content

fix+feat: category_routing (#93), X-RateLimit headers (#105), workflow_run webhook (#101) - #114

Closed
HongmingWang-Rabbit wants to merge 2 commits into
mainfrom
fix/108-clean
Closed

fix+feat: category_routing (#93), X-RateLimit headers (#105), workflow_run webhook (#101)#114
HongmingWang-Rabbit wants to merge 2 commits into
mainfrom
fix/108-clean

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Supersedes PR #108 and PR #109 — same code, rebased cleanly onto current main (post PRs #94, #95, #99, #106).

The original branches were created before those PRs merged and showed -965 deletions vs main (they would have reverted supervised.go, wsauth_middleware_test.go, and org_path_test.go). The commits themselves were clean — this branch is just those two commits cherry-picked onto main.

Changes (from PR #108)

  • org-templates/molecule-dev/org.yaml — add research/plugins/template/channels to category_routing defaults. Without these, evolution crons firing with those categories found no target and their audit summaries silently dropped at PM.
  • platform/internal/middleware/ratelimit.go — emit X-RateLimit-Limit / -Remaining / -Reset on every response (allowed and throttled) and Retry-After on 429s per RFC 6585.
  • platform/internal/middleware/ratelimit_test.go — 2 new tests covering allowed and throttled paths.

Changes (from PR #109)

  • platform/internal/handlers/webhooks.gobuildGitHubA2APayload now handles workflow_run events, routing failed CI runs to a workspace via the existing X-Molecule-Workspace-ID webhook path. Only completed runs with failure/cancelled/timed_out conclusions fan out.
  • platform/internal/handlers/webhooks_workflow_test.go — 4 new tests: failure path, success skip, non-completed skip, short-SHA edge case.

Test plan

  • All changes cherry-pick cleanly onto main with zero conflicts
  • No existing files deleted or reverted
  • CI (blocked by GitHub Actions runner quota — waiting for recovery)

Closes #93, #105, #101

🤖 Generated with Claude Code

Hongming Wang and others added 2 commits April 15, 2026 07:37
Closes #93 and #105.

#93 — add research/plugins/template/channels entries to org.yaml
category_routing defaults. Without them, evolution crons firing with
these categories found no target and their audit summaries silently
dropped at PM. Routes each back to the role that generated it so the
author acts on their own findings.

#105 — emit X-RateLimit-Limit / -Remaining / -Reset on every response
(allowed and throttled) and Retry-After on 429s per RFC 6585. 2 tests
cover both paths. Clients and monitoring tools can now back off
proactively instead of polling into 429 walls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closes #101 layer 1: buildGitHubA2APayload now handles workflow_run
events, routing failed CI runs to a workspace via the existing
X-Molecule-Workspace-ID / webhook path. Only completed runs with a
failure/cancelled/timed_out conclusion fan out — success/skipped/neutral
are dropped via errIgnoredGitHubAction.

Surface message is human-readable + includes the run URL so DevOps can
jump straight to the failing job. Metadata carries the full run context
(workflow_name, run_id, run_number, conclusion, head_branch, head_sha,
run_url, trigger_event) for programmatic handling.

4 new tests cover the failure path, success skip, non-completed action
skip, and short-SHA edge case.

Layer 2 (org.yaml wiring for DevOps workspace + GITHUB_WEBHOOK_SECRET
docs) stays as a follow-up PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor Author

Superseded: #108 and #109 (both merged tonight as 7a41d67 and 8ba8801 respectively) landed the same changes via --admin merge after their original CI runs were blocked by an unrelated GitHub Actions billing cap on the org. git log --oneline origin/main confirms #93/#105/#101 are all on main. Closing as duplicate.

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.

fix(template): add missing category_routing entries for evolution crons (research/plugins/template/channels)

1 participant