chore(agent): remove stale unscoped webhook routes from API router #93
Reference in New Issue
Block a user
Delete Branch "fix/remove-stale-api-webhook-routes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
compliance-agent/src/api/routes.rswas mounting the pre-M7.2-C webhook routes/webhook/{platform}/{repo_id}on the API server (port 3001), but the handlers incompliance-agent/src/webhooks/{gitea,github,gitlab}.rsexpect a(tenant_id, repo_id)path tuple after M7.2-C. Any request to those API-server routes would 500 on the path extraction mismatch.The webhook handlers are still mounted correctly on the separate webhook server (port 3002,
webhooks/server.rs) with the/webhook/{tenant_id}/{platform}/{repo_id}form, which is what the dashboard's webhook proxy forwards to.No functional change — the broken API-server routes never produced a successful response. This just drops dead code.
Test plan
cargo fmt --all -- --checkcleancargo clippy -p compliance-agent -- -D warningscleancargo test -p compliance-agent --lib— 228 pass (no change vs main)🤖 Generated with Claude Code
`compliance-agent/src/api/routes.rs` mounted the pre-M7.2-C webhook routes `/webhook/{platform}/{repo_id}` on the API server (port 3001), but the handlers in `compliance-agent/src/webhooks/{gitea,github, gitlab}.rs` expect a `(tenant_id, repo_id)` path tuple since the M7.2-C tenant-in-URL migration. Any request hitting those API-server routes would 500 on the path extraction mismatch — dead code from the M7.2-C migration not propagating to this file. The webhook handlers are still mounted correctly on the separate webhook server (port 3002, `compliance-agent/src/webhooks/server.rs`) with the `/webhook/{tenant_id}/{platform}/{repo_id}` form. That's what the dashboard's webhook proxy forwards to. No functional change — the broken routes never produced a successful response, so removing them just drops the surface area. Test plan - cargo fmt --all clean - cargo clippy -p compliance-agent -- -D warnings clean - cargo test -p compliance-agent --lib — 228 pass (no change vs main) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.