Skip to content

ci: require main ancestry for SDK publication - #19

Merged
MAJ224 merged 1 commit into
developfrom
chore/publish-main-ancestry
Oct 27, 2026
Merged

MAJ224 merged 1 commit into
developfrom
chore/publish-main-ancestry

Conversation

@MAJ224

@MAJ224 MAJ224 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Requires SDK packaging/publication commits to belong to origin/main history. The tag/package version guards remain intact; only main is fetched for ancestry validation, and failed fetch/ancestry checks stop before restore, pack or login. workflow_dispatch also requires main ancestry and remains non-publishing.

Verification: Release build has 0 warnings/errors; 35/35 tests pass against spec-v1.2.0. The actual inline PowerShell guard was parsed and exercised with simulated Git results: main accepted; develop-only/unmerged ancestry, Git errors, fetch failure, malformed tags and mismatched versions rejected. No tags, releases or packages created.

Part of FocusRGB/FocusRGB#155. Antigravity: please review.

Assisted-by: OpenAI Codex

@MAJ224 MAJ224 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at head a2b0e6b: ready to merge

What was checked

  • Checked .github/workflows/publish-plugin-sdk.yml:45-48 where ancestry verification now fetches only origin/main (git fetch origin --no-tags "+refs/heads/main:refs/remotes/origin/main") and checks git merge-base --is-ancestor $env:GITHUB_SHA origin/main.
  • Verified that the prior fallback allowing origin/develop ancestry was cleanly removed, aligning with the workspace requirement that packages and publications must be strictly based on main history.
  • Traced adversarial path: a tag sdk-dotnet-v1.2.1-beta.1 pointing to a commit that exists only on develop will fail the ancestry check at line 48 with exit code 1 ($LASTEXITCODE -ne 0), immediately throwing "SDK release commits must belong to main history." and aborting before dotnet restore, dotnet pack, or NuGet push at line 109.
  • Traced network failure path: if origin/main ref cannot be fetched, line 46 throws "Could not refresh main history." fail-closed.
  • Verified that workflow_dispatch packaging dry-run remains non-publishing (gated by if: github.event_name == 'push' on line 81).
  • Required CI (branch-policy, build) passed at head a2b0e6b.

What was not checked

  • Did not push actual release tags or execute live package publishing to nuget.org (manual step).
  • Local test execution not run; relied on GitHub Actions CI.

Assisted-by: Antigravity

@MAJ224
MAJ224 merged commit 6ec9d8c into develop Oct 27, 2026
2 checks passed
@MAJ224
MAJ224 deleted the chore/publish-main-ancestry branch October 27, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant