Fix SonarCloud deploy gate resilience#1104
Open
simple-agent-manager[bot] wants to merge 4 commits into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
mainCI runs from being canceled by newer pushes, while preserving cancellation for superseded PR commits, so every successful merge can trigger the production deploy workflow.Validation
pnpm lintpnpm typecheckpnpm testpnpm build,pnpm --filter @simple-agent-manager/shared typecheck,pnpm --filter @simple-agent-manager/shared test,pnpm --filter @simple-agent-manager/shared lint,git diff --check, YAML parse check for edited workflows; follow-up shared package typecheck/test after duplication cleanupStaging Verification (REQUIRED for all code changes — merge-blocking)
Deploy Stagingworkflow triggered manually and passed for this branchStaging Verification Evidence
smoke-testsjob passed.UI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
.github/workflows/ci.yml: CI still runs the same jobs, butcancel-in-progressnow only applies to pull request events. This keeps every successfulmainCI run alive long enough to emit a successfulworkflow_runevent..github/workflows/deploy.yml: production deploy remains gated ongithub.event.workflow_run.conclusion == 'success'for the GitHub Actions CI workflow only. SonarCloud remains a separate GitHub App check and does not control this deploy gate.packages/shared/src/constants/ai-services.ts: model catalog entries now share provider/scope/unified-ID construction helpers, removing the top duplicated Sonar block without changing exported model metadata.sonar-project.properties: suppressestext:S8566only forpackages/cli/go.mod, which is a standard-library-only module where Go does not generatego.sum.Untested Gaps
Post-Mortem (Required for bug fix PRs)
What broke
Automated production deploys could be skipped when a
mainCI run did not finish successfully. The project also had SonarCloud Quality Gate failures from duplication, reliability findings, and many historical security hotspots.Root cause
The deploy workflow depends on the GitHub Actions CI
workflow_runconclusion. Rapidmainupdates could cancel earlier CI runs, producing non-success conclusions that skipped deploys. Separately, SonarCloud reported quality failures as an independent GitHub App check.Class of bug
Deployment orchestration coupling and quality-gate drift.
Why it wasn't caught
The deploy trigger behavior was not validated against rapid consecutive
mainpushes, and SonarCloud's quality report had accumulated unresolved false positives and duplicated catalog data.Process fix included in this PR
.github/workflows/ci.yml: preserves completedmainCI runs for deploy triggering..github/workflows/deploy.yml: documents the CI-only deploy gate and SonarCloud decoupling.sonar-project.properties: adds a narrow suppression for the standard-library-only Go module lockfile false positive.Post-mortem file
N/A: existing context was captured in
docs/notes/2026-05-19-cli-sonar-quality-gap-postmortem.md; this PR scopes the process fix to workflow/config changes.Specialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to human — N/A: all manual specialist reviews completed; merge is still deferred to human per task requestpackages/cli/go.mod; no credential/auth surface changed.Exceptions (If any)
Agent Preflight (Required)
Classification
External References
mainCI, production deploy, staging deploy, and SonarCloud Code Analysis.Codebase Impact Analysis
.github/workflows/ci.yml: CI concurrency behavior for PR vs main runs..github/workflows/deploy.yml: production deploy gating documentation.packages/shared/src/constants/ai-services.ts: AI model catalog construction.prototype-blurred-bg.html: duplicate CSS border declarations removed.sonar-project.properties: narrow false-positive suppression forpackages/cli/go.mod.Documentation & Specs
tasks/archive/2026-05-23-fix-sonarcloud-quality-gate.md.Constitution & Risk Check
Checked Principle XI / no hardcoded values via constitution-validator. Main tradeoff:
mainCI runs no longer cancel each other, increasing CI usage slightly while making production deploy triggers reliable. PR CI still cancels superseded commits.