feat(poll): wire up event router for GitLab cron-polling dispatch - #5534
Conversation
|
🤖 Review · |
Site previewPreview: https://40357556-site.fullsend-ai.workers.dev Commit: |
PR Summary by QodoWire event routing into GitLab poller dispatch (HarnessRouter + config agents)
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
3d4c1e5 to
4372576
Compare
|
🤖 Finished Review · ✅ Success · Started 3:02 PM UTC · Completed 3:19 PM UTC |
Code Review by Qodo
1.
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Prior review findings resolved: The silent-no-op-on-unknown-command-prefix finding is resolved — Previous runReviewFindingsLow
Prior review findings resolved: The latent-fork-bypass finding is resolved — Previous run (2)ReviewFindingsLow
Prior review findings resolved: The test-adequacy finding is resolved — Previous run (3)ReviewFindingsLow
Previous run (4)ReviewFindingsLow
Prior review findings resolved: The fail-open finding ( Previous run (5)ReviewFindingsMedium
Low
Previous run (6)ReviewFindingsMedium
Low
Prior review findings resolved: The interface-coherence finding ( Previous run (7)ReviewFindingsHigh
Medium
Low
Previous run (8)ReviewFindingsMedium
Low
Labels: PR adds event routing logic in the dispatch package with Go code changes |
4372576 to
ead38ad
Compare
|
🤖 Finished Review · ✅ Success · Started 3:26 PM UTC · Completed 3:46 PM UTC |
ead38ad to
5a6fa14
Compare
|
🤖 Finished Review · ✅ Success · Started 3:51 PM UTC · Completed 4:07 PM UTC |
Superseded by updated review
5a6fa14 to
ebd8029
Compare
|
🤖 Review · |
ebd8029 to
ec17090
Compare
waynesun09
left a comment
There was a problem hiding this comment.
4-agent review squad verification pass on round-2's fixes (fast-poll GetMergeRequest for MRSource/MRTarget, isForkOrUnknown extraction) — both confirmed correct and complete by all 4 agents, no regressions, consistent at both call sites.
1 HIGH + 1 MEDIUM survived verification and are posted inline below. Note: agents initially split on the HIGH finding's severity (2/4 independently found the same mechanism; a third assessed it as test-coverage-only). I traced poll.go's watermark logic directly myself before posting to resolve the disagreement — the finding is real, not just a coverage gap.
Posting as COMMENT only, per standing convention (no approve/request-changes).
51f3de5 to
9c0c71e
Compare
|
🤖 Review · |
9c0c71e to
9abf915
Compare
|
🤖 Finished Review · ✅ Success · Started 8:31 PM UTC · Completed 8:44 PM UTC |
c5b1850 to
62f5226
Compare
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 9:14 PM UTC · Completed 9:31 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
4-agent review squad, round 4, at current head 9abf9153. Round-3's HIGH finding (GetMergeRequest failure causing permanent watermark loss of MR slash commands) is confirmed fixed — all 4 agents independently traced the minSkippedAt fix end-to-end through poll.go's watermark logic, including the specific edge case that mattered (the zero-events time.Now() fallback correctly gets overridden by the minSkippedAt clamp). The regression test asserts the exact timestamp value, not just presence. The previously-flagged GetMergeRequest HTTP client tests are confirmed adequate and consistent with the file's existing conventions.
A fresh full pass over the 13-file scope surfaced no new MEDIUM+ issues. Two optional LOW/style notes (a pre-existing, not-this-PR's-fault gap in Run()-level end-to-end test coverage for watermark holdback, and a minor opportunity to dedupe the "track earliest timestamp" pattern into the existing trackFailure-style helper) were left out per the medium-and-above posting threshold — neither is blocking.
Approving.
waynesun09
left a comment
There was a problem hiding this comment.
Round 4 review squad: round-3's HIGH finding (watermark loss of MR slash commands) confirmed fixed by all 4 agents, no new MEDIUM+ issues found. Approving.
waynesun09
left a comment
There was a problem hiding this comment.
Round 4 review squad: round-3's HIGH finding confirmed fixed by all 4 agents, no new MEDIUM+ issues found. Approving.
Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
62f5226 to
ada69a8
Compare
|
🤖 Finished Review · ✅ Success · Started 9:35 PM UTC · Completed 9:47 PM UTC |
There was a problem hiding this comment.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/dispatch/router.go:109: [low] authorization-bypass-via-entity-author
Entity authors bypass the triage role check on needs-info issues. Intentional per ADR 0067 and documented in a code comment.
internal/dispatch/router.go:151: [low] missing-authorization-check
routeMerge dispatches the retro stage without an actor role check. Intentional: only users with Maintainer+ access can merge (forge-level gate), and retro is read-only. Documented in the methods doc comment.
internal/dispatch/router.go(file-level): Line 374 · [low] architectural-coherence
ADR 0067 prescribes CEL trigger expressions for routing; this PR implements hard-coded Go routing rules as an interim. The deviation is properly documented in the HarnessRouter doc comment and acknowledged in docs/contributing/go-code.md.
internal/dispatch/event.go(file-level): Line 190 · [low] design-direction
RoleLevel/HasRole are exported from the dispatch package. When the dispatch core is built (#2896-#2901), authorization should be centralized there per ADR 0061. Not blocking - just a note for future direction.
|
🤖 Finished Retro · ✅ Success · Started 10:20 PM UTC · Completed 10:39 PM UTC |
Retro: PR #5534 — feat(poll): wire up event router for GitLab cron-polling dispatchA human-authored PR (+1203/−16, 13 files) implementing Phase 5 of GitLab cron-polling support. Reviewed over ~7.5 hours with 16 review agent runs, 4 fix agent runs, and 84 source-repo workflow dispatches before merging. Timeline
Key FindingsReview quality gap: The bot missed 3 HIGH findings (all within the diff) and approved the PR 4 times while HIGH bugs remained. All 3 HIGH findings required tracing invariants across 2–4 files in the same diff — fork-protection contract in Finding noise: The bot re-raised the same intentional-by-design findings (entity-author bypass per ADR 0067, merge role check, CEL vs Go routing) ~8 times each across review cycles, producing ~37 noise comment instances that the author had to repeatedly dismiss. CI volume: 40 of 62 Fix regression undetected: 2 of the 3 HIGH findings were direct consequences of fixes applied during the review session. The bot re-reviewed post-fix and approved without detecting the regressions. Evidence Supporting Existing Issues (proposals skipped as duplicates)
What Went Well
|
Summary
HarnessRouterimplementingdispatch.EventRouterwith routing rules from ADR 0067: slash commands (/fs-X), label triggers (ready-to-code→ code,ready-for-review→ review), merge → retro, changes-requested → fix, needs-info → triageRoleLevel/HasRoleon the dispatch package as the single source of truth for role hierarchy comparisons (ADR 0054)fullsend poll --forge gitlabso discovered events actually dispatch to agent stages (previously the router was always nil)GetAuthenticatedUserID()for proper event filtering--fullsend-dirflag (default.fullsend) to locate config.yaml for agent discovery/fs-{name}slash commandsTest plan
go build ./...compiles cleanlygo test ./internal/dispatch/...passesgo test ./internal/poll/...passes (existing tests unaffected)go vetclean🤖 Generated with Claude Code