fix(#6718): add stages to root CI and skip workflow creation - #6724
Conversation
|
🤖 Finished Review · ✅ Success · Started 3:37 AM UTC · Completed 3:52 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.56 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsScore unchanged at 2 vs prior assessment: Tier 1 signals are identical (3 files, 272 lines, 0.33 test ratio, bot author), gitlabci.go gained one additional 30d commit but fix-commit rate and file age remain consistent with active stabilization; well-scoped high-priority bug fix with clear acceptance criteria keeps composite at moderate. Previous runRisk Assessment: moderate (2/5) DetailsScore increased from 1 to 2 vs prior assessment: PR now touches 3 files with 272 lines changed, test ratio dropped from 0.50 to 0.33, and gitlabci.go is a young file (~90 days) with 67% fix-commit rate in 90 days indicating active stabilization; still a well-scoped bug fix but the expanded scope and regression history on a maturing file warrant moderate rather than low risk. Previous run (2)Risk Assessment: low (1/5) DetailsLow-risk focused bug fix: 2 files changed with 50% test coverage ratio, no protected or security-sensitive paths, scoped precisely to the reported issue; the only notable signal is prior regression history on the file and lack of a rollback mechanism, but the strong test additions and narrow scope keep overall risk low. |
|
Looks good to me Previous runLooks good to me Previous run (2)ReviewFindingsMedium
Low
Labels: PR fixes GitLab CI installation merge logic (stages and workflow block handling) |
|
/fsi-fix - Rebase, fix all review issues, respond to and resolve all conversations. |
|
/fs-fix - Rebase, fix all review issues, respond to and resolve all conversations. |
|
🤖 Finished Fix · ✅ Success · Started 1:08 PM UTC · Completed 1:15 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.55 |
- Add fullsend stages (dispatch, poll, agent) to the manual GitLab teardown checklist in operations.md [stale-teardown-instructions] - Qualify the auto_cancel note to clarify it only applies when a workflow: block already exists [stale-behavioral-description] - Rename loop variable s to stage in removeStages for consistency with mergeStages [naming-consistency] Addresses review feedback on #6724
🔧 Fix agent — iteration 1 (human-triggered)Addressed all 3 review findings: updated manual teardown checklist to include fullsend stages, qualified the auto_cancel note for repos without a workflow: block, and renamed loop variable for naming consistency between mergeStages and removeStages. Fixed (3):
Tests: passedNext steps:
|
Site previewPreview: https://adc01463-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 1:17 PM UTC · Completed 1:32 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.00 |
MergeGitLabCI had two bugs that broke existing CI when installing fullsend into repos with an existing .gitlab-ci.yml: 1. Stages not added to root file: GitLab's deep merge only applies to hash maps — stages: is a YAML array and is overwritten, not merged (gitlab-org/gitlab#29980). When the root file already defined stages:, fullsend's stages (dispatch, poll, agent) from the included pipeline file were silently dropped. Added mergeStages() to append fullsend's stages directly to the root file's stages: array with deduplication. 2. Workflow block created when none exists: mergeWorkflow() unconditionally created a workflow: block with only fullsend's three rules, which gated all pipelines and killed push-triggered CI. Changed mergeWorkflow() to leave the workflow: block absent when none exists — fullsend's jobs self-filter via their own rules: entries. Also added removeStages() to UnmergeGitLabCI for clean uninstall, and removed the now-unused buildWorkflowNode() function. Note: golangci-lint was not available in the sandbox. go vet and gofmt passed. pre-commit could not fetch remote hook repos (HTTP 403); hooks were run directly (gofmt, go vet) and passed. Closes #6718
- Add fullsend stages (dispatch, poll, agent) to the manual GitLab teardown checklist in operations.md [stale-teardown-instructions] - Qualify the auto_cancel note to clarify it only applies when a workflow: block already exists [stale-behavioral-description] - Rename loop variable s to stage in removeStages for consistency with mergeStages [naming-consistency] Addresses review feedback on #6724
8aa04b4 to
ec5be0f
Compare
|
🤖 Finished Review · ✅ Success · Started 1:40 PM UTC · Completed 1:56 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.67 |
|
🤖 Finished Retro · ✅ Success · Started 2:03 PM UTC · Completed 2:17 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.60 |
Retro: PR #6724 — add stages to root CI and skip workflow creationThis PR fixed two GitLab CI merge-logic bugs (#6718): stages not added to the root Timeline
What went well
Observations and existing-issue evidence
AssessmentThe pipeline worked as designed. The single rework cycle was caused by the code agent missing doc updates (a known gap with existing tracking issues), and the review agent correctly caught the misses. The main structural inefficiency was the $5.67 spent on a rebase-triggered re-review. All improvement opportunities identified are already tracked by existing open issues. No new proposals are warranted. |
Summary
stages:array: When an existing.gitlab-ci.ymldefinesstages:, GitLab's deep merge (which only applies to hash maps) silently drops the stages from the includedfullsend-pipeline.yml.mergeStages()now appendsdispatch,poll, andagentdirectly to the root file'sstages:array, with deduplication.workflow:block when none exists: PreviouslymergeWorkflow()unconditionally created aworkflow:block with only fullsend's three rules (merge_request_event,schedule,api), which gated all pipelines and broke push-triggered CI. Now when noworkflow:block exists, it is left absent — fullsend's jobs self-filter via their ownrules:entries.removeStages()for clean uninstall:UnmergeGitLabCInow removes fullsend's stages during uninstall, matching the symmetry of include and workflow rule removal.Testing
TestMergeGitLabCI_ExistingWithoutWorkflowto verify no workflow block is created and fullsend stages are appendedTestMergeGitLabCI_StagesAddedToExistingArray— verifies stages are appended to existing arrayTestMergeGitLabCI_StagesDeduplicatesExisting— verifies no duplicate stagesTestMergeGitLabCI_NoWorkflowBlockCreatedWhenAbsent— verifies no workflow block when absentTestMergeGitLabCI_NoStagesKeyLeftAlone— verifies no stages key created when absentTestMergeGitLabCI_StagesIdempotent— verifies idempotency with all stages presentTestUnmergeGitLabCI_RemovesFullsendStages— verifies stage removal preserves user stagesTestUnmergeGitLabCI_RemovesStagesKeyWhenEmpty— verifies stages key removed when emptyTestMergeGitLabCI_PreservesCommentsto also check stage additionCloses #6718
Post-script verification
agent/6718-fix-gitlab-stages-workflow)6ca76244aaaa69a95badee6a064341689f879aaf..HEAD)