Skip to content

fix(#9392): keep deleting uninstall vars and secrets after a failure - #9394

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/9392-uninstall-continue-deletes
Open

fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/9392-uninstall-continue-deletes

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

fullsend repos uninstall now tries to delete every one of a repository's fullsend variables and secrets, even when one delete fails. Before, uninstallRepoResources stopped each delete loop at the first failure, so the remaining credentials stayed in the repository and every rerun stopped at the same name.

Changes

  • internal/repos/uninstall.go: when a variable or secret delete fails, the loop records the error and moves on to the next name. The errors are combined into the existing errors.Join result, so the repository is still reported as FAILED and every failed delete is listed. Errors from deleting the trigger-token and webhook-secret still go through safeAPIError, so the server's error text stays hidden.
  • internal/repos/uninstall_delete_errors_test.go: new tests use a wrapped forge.FakeClient that fails selected names (the first and a middle one):
    • GitHub: checks that every variable and secret is still attempted, each failure appears in the error, and the counts include only successful deletes.
    • GitLab: checks that every secret is still attempted, the trigger-token and webhook-secret failures are listed, and the server's error text is hidden.

Testing

  • New tests fail without the fix and pass with it
  • go test -race ./internal/repos/ passes
  • Applicable hooks run directly and pass: gofmt, go vet, the whitespace/EOF/private-key/merge-conflict checks, gitleaks and the broken-symlink lint. pre-commit itself could not fetch its hook repos in the sandbox (TLS failure), and the semgrep hook did not run because its pinned ruleset could not be downloaded.
  • Tests added for the new behavior

🤖 Generated with Claude Code


Closes #9392

Post-script verification

  • Branch is not main/master (agent/9392-uninstall-continue-deletes)
  • Secret scan passed (gitleaks — edc87cff31da34689be418a8b5ae5256502e8422..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

uninstallRepoResources deleted a repository's fullsend variables and
secrets in two loops that returned at the first failed delete, so no
name later in either list was attempted. A rerun stopped at the same
name for as long as that delete kept failing, leaving every later
credential in the repository.

Both loops now record each failed delete and continue with the
remaining names. The collected errors are joined into the existing
errors.Join result, so the repository is still reported as failed and
every failed delete is listed. The trigger-token and webhook-secret
delete errors keep their redaction via safeAPIError. Vars/secrets
counts reflect only successful deletes.

New tests wrap forge.FakeClient to fail selected names (first and
middle) and assert every name is still attempted, each failure is
reported, counts are correct, and webhook credential errors withhold
the server text.

Note: pre-commit could not fetch remote hook repos (TLS failure in
the sandbox). Hooks applicable to the changed Go files were run
directly (gofmt, go vet, whitespace/EOF/private-key/merge-conflict
checks, gitleaks, broken-symlink lint) and passed. The semgrep hook
was skipped because its pinned ruleset could not be downloaded.

Closes #9392

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:36 PM UTC · Completed 9:43 PM UTC

Commit: bd4a822 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.13

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

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Small, well-tested bug fix by a bot with scope matching issue #9392, with moderate risk driven by high regression churn and change coupling in uninstall.go and modifying existing behavior without a feature flag.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me


Labels: Go bug fix in the repos uninstall CLI path.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge go Pull requests that update go code type/bug Confirmed defect in existing behavior component/install CLI install and app setup labels Nov 12, 2026
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch was previously deployed

1 inactive deployment
dev — bd4a822d Deployed Nov 12, 2026 by fullsend-ai-coder[bot] via behaviour #20006
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 go Pull requests that update go code ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate type/bug Confirmed defect in existing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repos uninstall stops deleting a repository's variables and secrets at the first failed delete

1 participant