fix(#6418): pass ORIGINATING_URL and REPO_FULL_NAME in GitLab dispatch - #6419
Conversation
|
🤖 Finished Review · ✅ Success · Started 4:39 PM UTC · Completed 5:00 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runLooks good to me Previous run (2)ReviewFindingsCritical
Medium
Low
Labels: PR modifies GitLab dispatch code in internal/poll/ and scaffold template, fixing a bug affecting the retro agent on GitLab Next steps:
|
Addressing review findingsCritical: backward-incompatible HMAC contract changeThis is a deployment ordering concern, not a code bug. Both sides of the contract (Go The required rollout order is: re-scaffold enrolled repos first (to deploy the updated template), then deploy the updated poller. This is inherent to any HMAC key addition and doesn't need special code — it's the same sequence used when the original HMAC keys were added. Repos without Medium: HMAC contract versioningAcknowledged as a useful future enhancement. The current approach (source-level test + coordinated deploy) works for the small number of enrolled GitLab repos. A version/key-count field would add complexity without solving the deployment ordering requirement. Filed as a follow-up consideration. Low: code duplication / missed reuse — FIXEDReplaced the inline URL construction in Low: test adequacy — FIXEDAdded Low: stale variable enumeration in ADR 0067 — FIXEDAdded Additional fix: missing RETRO_COMMENT for GitLabThe retro agent needs |
4d9aa6d to
e17ac7f
Compare
Site previewPreview: https://ea92a5e8-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 5:18 PM UTC · Completed 5:31 PM UTC Commit: |
Superseded by updated review
Pass ORIGINATING_URL and REPO_FULL_NAME as pipeline variables in the GitLab poller dispatch, fixing the retro agent harness env validation failure on GitLab. Uses the existing entityURL() helper for URL construction. Also: - Extract RETRO_COMMENT from EVENT_PAYLOAD_B64 in the GitLab agent template for retro stages (parity with GitHub workflow) - Add both new keys to signedDispatchKeys and HMAC shell verification - Update TestComputeDispatchHMAC_MatchesPython3 with realistic values for the new keys - Update ADR 0067 trust-boundary variable enumeration Closes #6418 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
e17ac7f to
25a7009
Compare
|
🤖 Finished Review · ✅ Success · Started 5:35 PM UTC · Completed 5:50 PM UTC Commit: |
| @@ -13,10 +13,12 @@ func newTestPoller(client GitLabClient, opts Options) *Poller { | |||
| opts.PipelineRef = "main" | |||
| } | |||
| return &Poller{ | |||
There was a problem hiding this comment.
[low] test helper completeness
newTestPoller hardcodes projectPath, owner, and repo independently rather than deriving owner/repo from projectPath via splitOwnerRepo(). The production New() constructor derives owner and repo from projectPath. Using splitOwnerRepo would prevent future drift between these fields.
Suggested fix: Consider having newTestPoller call splitOwnerRepo(projectPath) to derive owner and repo, rather than hardcoding all three independently.
|
🤖 Finished Retro · ✅ Success · Started 5:54 PM UTC · Completed 6:07 PM UTC Commit: |
Retro: PR #6419 — pass
|
Summary
Pass
ORIGINATING_URL,REPO_FULL_NAME, andRETRO_COMMENTto the GitLab retro agent, fixing the harness env validation failure on GitLab.Related Issue
Changes
internal/poll/dispatch.go: SetORIGINATING_URLvia the existingentityURL()helper andREPO_FULL_NAMEtop.projectPath. Add both tosignedDispatchKeysfor HMAC protection.internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/fullsend-agent.yml: AddORIGINATING_URLandREPO_FULL_NAMEto the HMAC verification printf format, maintaining sorted key order to match the GosignedDispatchKeysslice. ExtractRETRO_COMMENTfromEVENT_PAYLOAD_B64for retro stages (parity with GitHub'sreusable-retro.ymlwhich sets it fromevent_payload.comment.body).internal/poll/dispatch_test.go: Add tests for issue events, MR events, and subgroup project paths. AddORIGINATING_URLandREPO_FULL_NAMEwith realistic values toTestComputeDispatchHMAC_MatchesPython3.internal/poll/state_test.go: SetgitlabURLandprojectPathon the test poller so dispatch tests produce realistic URLs.docs/ADRs/0067-gitlab-cron-polling-event-dispatch.md: AddORIGINATING_URLandREPO_FULL_NAMEto the trust-boundary variable enumeration.GITLAB_TOKENis already handled by the agent template (export GITLAB_TOKEN="${FULLSEND_FORGE_TOKEN}") and does not need to be in the dispatch payload.Testing
go test ./internal/poll/...— all tests passgo vet ./internal/poll/...— cleanTestSignedDispatchKeys_MatchShellTemplatevalidates Go/shell HMAC key syncTestComputeDispatchHMAC_MatchesPython3validates cross-language HMAC consistency with all 11 keysChecklist
!for breaking changes)Closes #6418