Skip to content

fix(#6602): skip .gitlab-ci.yml during GitLab scaffold install - #6640

Closed
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6602-preserve-existing-gitlab-ci
Closed

fix(#6602): skip .gitlab-ci.yml during GitLab scaffold install#6640
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6602-preserve-existing-gitlab-ci

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Skip .gitlab-ci.yml from the GitLab scaffold install payload so that fullsend repos install --forge gitlab no longer overwrites a consumer's existing CI pipeline configuration. The fullsend-owned sub-files under .gitlab/ci/ (dispatch, agent, poll) are still installed unconditionally — adopters add the corresponding include: directives to their own .gitlab-ci.yml.

Changes

  • internal/scaffold/installfiles.go: Add .gitlab-ci.yml to the skip list in CollectGitLabPerRepoInstallFiles(), matching the existing .gitignore skip pattern
  • internal/repos/remote_scaffold.go: Remove .gitlab-ci.yml from scaffoldGitLabPaths so the remote scaffold fetch (pinned-ref installs) matches the local scaffold behavior
  • internal/repos/ref_ops.go: Update comment in collectGitLabUpgradeTemplates to note the install path now also skips .gitlab-ci.yml (defensive guard kept)
  • internal/scaffold/scaffold_gitlab_test.go: Add TestCollectGitLabPerRepoInstallFiles_SkipsRootPipeline verifying the skip and confirming sub-files are still present
  • internal/repos/install_test.go: Update TestBuildScaffoldFiles_GitLab to assert .gitlab-ci.yml is absent from install output

Testing

  • go test ./internal/scaffold/... passes
  • go test ./internal/repos/... passes
  • New test TestCollectGitLabPerRepoInstallFiles_SkipsRootPipeline validates the fix
  • Patch coverage above 80% threshold on all changed production functions

Closes #6602

Post-script verification

  • Branch is not main/master (agent/6602-preserve-existing-gitlab-ci)
  • Secret scan passed (gitleaks — d0d567bb7f882f797898e1d478948a4d82bfd1d6..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

CollectGitLabPerRepoInstallFiles and the remote scaffold path
(scaffoldGitLabPaths) unconditionally included .gitlab-ci.yml in
the install payload. This overwrote a consumer's existing CI
pipeline configuration when running fullsend repos install on a
repo that already had CI set up.

Skip .gitlab-ci.yml from install output, matching the existing
.gitignore skip pattern. The fullsend-owned sub-files under
.gitlab/ci/ (dispatch, agent, poll) are still installed
unconditionally. Adopters add the corresponding include:
directives to their own .gitlab-ci.yml. The upgrade path
(collectGitLabUpgradeTemplates) already skipped .gitlab-ci.yml
for the same reason — this aligns the install path.

Closes #6602
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner August 26, 2026 13:30
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Aug 26, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 26, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:32 PM UTC · Completed 1:47 PM UTC

Commit: 57f9e26 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.79

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Aug 26, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Small, well-scoped bug fix (45 lines, 5 files) that adds a file exclusion to the GitLab scaffold installer. No protected paths, no security-sensitive files, no CI workflow or dependency changes. Test ratio is decent at 0.40. Bot author with prior contributions. Overall low-to-moderate risk.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [test-structure-consistency] internal/scaffold/scaffold_gitlab_test.go — The new TestCollectGitLabPerRepoInstallFiles_SkipsRootPipeline test uses a different assertion pattern from the adjacent _SkipsGitignore test. The new test adds positive assert.Contains checks for sub-files, while its sibling uses only negative assertions. The structural difference is justified — the .gitlab-ci.yml exclusion has a sibling concern (sub-files must remain present) that .gitignore does not — but the inconsistency is worth noting.

Labels: PR modifies GitLab scaffold install and remote scaffold code paths under internal/scaffold/ and internal/repos/

@ggallen

ggallen commented Aug 28, 2026

Copy link
Copy Markdown
Member

Closing — this approach (skip .gitlab-ci.yml entirely) was superseded by the merge approach in PR #6724, which merges fullsend's entries into the existing file instead of skipping it. The target issue #6602 was already closed when #6724 merged.

See #6717 for the full decomposition. The only remaining item is #6721 (drift detection to skip unnecessary writes when fullsend entries are already present).

@ggallen ggallen closed this Aug 28, 2026
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 28, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 2:25 PM UTC · Completed 2:43 PM UTC

Commit: 57f9e26 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.89

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #6640 — skip .gitlab-ci.yml during GitLab scaffold install

What happened

Issue #6602 reported that fullsend repos install --forge gitlab destructively overwrites an existing .gitlab-ci.yml. The workflow ran cleanly through three stages:

  1. Triage (run 32972842835, $1.04) — correctly identified the root cause and presented two fix approaches: "merge the include: directives" or "skip the root file entirely." Applied ready-to-code without recommending a preferred approach.
  2. Code (run 32973514303, $3.21) — read the triage guidance, explicitly weighed both options, and chose "skip" because it was simpler and consistent with the existing .gitignore skip pattern. Produced PR fix(#6602): skip .gitlab-ci.yml during GitLab scaffold install #6640 (5 files, 45 lines).
  3. Review (run 32974610771, $4.79) — dispatched 5 sub-agents (Correctness, Style, Intent & Coherence, Docs, Risk). All validated the implementation; none questioned whether "skip entirely" was the right design choice. Approved with ready-for-merge.

A human reviewer (ggallen) recognized that "skip entirely" was the wrong approach — it left users with a manual step to wire up include: directives. They filed #6653 specifying a merge approach, which landed as PRs #6661 and #6724. PR #6640 was closed without merging.

Assessment

The agents performed their individual tasks correctly — the code was well-written and tested, the review was thorough on implementation quality. The failure was at the design decision layer: the code agent chose the simpler implementation over the better user experience, and the review agent validated correctness without questioning the approach. Total wasted agent cost: ~$9.04.

The triage agent had enough context to recommend the merge approach (it noted the tradeoff explicitly) but presented both options as equal. The code agent then optimized for implementation simplicity ("skip is simpler and consistent with existing patterns") over user experience ("merge avoids a manual step").

Existing issues that would have prevented this

All improvement opportunities identified in this retro are covered by existing open issues. This workflow provides additional supporting evidence for each:

  • fullsend-ai/agents#629 — Triage should suppress ready-to-code when multiple approaches exist without clear priority. In this case, triage presented "merge or skip" as equal, triggering the code agent to choose independently. New evidence: the code agent chose the inferior approach because no preference was expressed.
  • fullsend-ai/agents#745 — Triage should evaluate approach quality when multiple strategies exist. Here, the triage agent's own analysis noted that "skip" requires manual user action while "merge" doesn't, but it didn't use this to recommend one over the other.
  • fullsend-ai/agents#259 — Code agent should surface its chosen approach before implementing. If the code agent had asked "I plan to skip the file entirely — is that OK?" before writing code, a human could have redirected to the merge approach, saving ~$8 in wasted work.
  • fullsend-ai/fullsend#1469 — Review agent should assess feature-level design, not just implementation. The review's Intent & Coherence sub-agent confirmed scope alignment but never questioned whether "skip entirely" was the right design choice for the user experience.
  • fullsend-ai/agents#988 — Pre-retro should skip retro on superseded PRs whose linked issue is already resolved. Issue Using fullsend repos install --forge gitlab within a project will replace existing .gitlab.ci.yml content #6602 was already closed when this retro was triggered by PR fix(#6602): skip .gitlab-ci.yml during GitLab scaffold install #6640's closure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch Review effort 1/5 risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using fullsend repos install --forge gitlab within a project will replace existing .gitlab.ci.yml content

1 participant