fix(#6415): add fix-stage environment for GitLab dispatch - #6417
Conversation
87d59a9 to
8039bb8
Compare
|
🤖 Finished Review · ✅ Success · Started 4:19 PM UTC · Completed 4:35 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsCritical
High
Medium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsLow
|
8039bb8 to
553f939
Compare
|
🤖 Finished Review · ✅ Success · Started 5:37 PM UTC · Completed 6:14 PM UTC Commit: |
553f939 to
8654e46
Compare
Site previewPreview: https://b8cb3e12-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 6:20 PM UTC · Completed 6:56 PM UTC Commit: |
8654e46 to
e3a7238
Compare
|
🤖 Finished Review · ✅ Success · Started 7:04 PM UTC · Completed 7:24 PM UTC Commit: |
Wire all fix-stage environment variables into the GitLab CI agent template (fullsend-agent.yml) for poller-dispatched fix pipelines. Parallels the GitHub reusable-fix.yml contract. Key changes: - Pre-fetch review body from MR notes API with pagination - Decode is_bot from EVENT_PAYLOAD_B64 (not PIPELINE_SOURCE) - Resolve TRIGGER_SOURCE from event payload (bot username or note author), with numeric validation on note_author_id - Extract HUMAN_INSTRUCTION from /fs-fix note body - Count prior fix-agent commits with pagination (up to 500) - Export all forge.gitlab env vars (REPO_FULL_NAME, MR_NUMBER, GITLAB_MR_URL, PUSH_TOKEN, PUSH_TOKEN_SOURCE, GIT_BOT_EMAIL) - Guard GITLAB_MR_URL against MR_IID=0 - Set PUSH_TOKEN_SOURCE to "pat" (matching run.go convention) Closes #6415 Signed-off-by: Greg Allen <ggallen@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
e3a7238 to
1878f39
Compare
|
🤖 Finished Review · ✅ Success · Started 7:33 PM UTC · Completed 7:50 PM UTC Commit: |
Superseded by updated review
|
🤖 Finished Retro · ✅ Success · Started 8:55 PM UTC · Completed 9:10 PM UTC Commit: |
Retro: PR #6417 — add fix-stage environment for GitLab dispatchVerdict: workflow went well. No novel improvement proposals — all identified opportunities map to existing open issues. Evidence for those issues is noted below. Timeline
What went well
What could go better (evidence for existing issues)
|
Summary
STAGE=fixgated block in the GitLab agent template (fullsend-agent.yml) that pre-fetches the review body from the GitLab Notes API and exports all fix-stage environment variables required by the harnessis_botfrom the event payload (notPIPELINE_SOURCE, since all GitLab fix dispatches are API-triggered)TARGET_BRANCH,TRIGGER_SOURCE,HUMAN_INSTRUCTION,FIX_ITERATION,PRE_AGENT_HEAD,REPO_FULL_NAME,MR_NUMBER,GITLAB_MR_URL,PUSH_TOKEN,PUSH_TOKEN_SOURCE,GIT_BOT_EMAILreusable-fix.yml)GITLAB_MR_URLagainstMR_IID=0MAX_REVIEW_BYTESnamed constant to the review-stage pre-fetch block for consistencyTestGitLabAgentTemplateFixReviewBodyPreFetchtest covering all new fix-stage elementsContext
The fix agent was entirely non-functional on GitLab because the harness requires
REVIEW_BODY_FILEviahost_filesand multiple env vars viaenv.runner, but the GitLab dispatch pipeline never set any of them. The GitHub reusable workflow (reusable-fix.yml) handles this correctly; this change adds the equivalent for GitLab using the Notes API and GitLab CI variables.Testing
go test ./internal/scaffold/ -run TestGitLab— all 17 tests pass including the newTestGitLabAgentTemplateFixReviewBodyPreFetchgo vet ./internal/scaffold/— cleanCloses #6415