Skip to content

ci: dispatch App migration + retire dead docs step + installer hardening - #38

Merged
elkaix merged 6 commits into
mainfrom
feat/release-orchestration-p0
May 31, 2026
Merged

ci: dispatch App migration + retire dead docs step + installer hardening#38
elkaix merged 6 commits into
mainfrom
feat/release-orchestration-p0

Conversation

@elkaix

@elkaix elkaix commented May 31, 2026

Copy link
Copy Markdown
Member

P0 (1/2): migrate dispatch-pythinker-home-sync.yml to the pythinker-release-bot App token with fail-loud-on-empty; remove the dead pythinker-core pdoc gh-pages step (404 target); install-native.sh exponential backoff; install.ps1 /releases/latest-first with paginated fallback and backoff. No agent runtime deps. Sequencing note: promote-release.yml gate changes ship in PR-code-2 with the reconcile backstop.

Summary by CodeRabbit

  • Chores

    • Improved release workflow authentication for site sync and automated releases
    • Removed automated API documentation publishing to GitHub Pages
    • Updated changelog with pipeline improvements
  • Bug Fixes / Reliability

    • Enhanced native and Windows installer scripts to use exponential backoff and better asset-readiness checks for more reliable installs

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 969bfa60-ff22-4384-8d56-d921804c2df3

📥 Commits

Reviewing files that changed from the base of the PR and between 9120e22 and d4409ca.

📒 Files selected for processing (7)
  • .github/workflows/dispatch-pythinker-home-sync.yml
  • docs/public/install.ps1
  • docs/public/install.sh
  • scripts/install.ps1
  • tests/test_release_update_pipeline.py
  • web/public/install.ps1
  • web/public/install.sh

📝 Walkthrough

Walkthrough

This PR replaces legacy repo-dispatch token usage with a minted org GitHub App installation token, removes the gh-pages docs publishing job from the core release workflow, and adds exponential-backoff polling plus release asset-pair checks and API error formatting across bash and PowerShell installer scripts; tests and CHANGELOG updated.

Changes

Release Pipeline and Installer Improvements

Layer / File(s) Summary
GitHub App dispatch token migration
.github/workflows/dispatch-pythinker-home-sync.yml
Job env adds DISPATCH_OWNER/DISPATCH_REPO; workflow mints an installation token for pythinker-release-bot via actions/create-github-app-token scoped to pythinker-home, uses DISPATCH_TOKEN for repository_dispatch, and fails if token is empty.
PyPI-only release workflow
.github/workflows/release-pythinker-core.yml
Removes the docs job that generated API docs and pushed to gh-pages; workflow now only validates the tag and publishes the PyPI distribution.
Installer polling, asset-pair checks, and API error formatting
scripts/install-native.sh, docs/public/install.sh, web/public/install.sh, scripts/install.ps1, docs/public/install.ps1, web/public/install.ps1
Bash release_has_assets loops replaced by exponential backoff (initial 4s, doubling, capped 120s) with max elapsed timeout (~360s). PowerShell and docs/web copies add Test-ReleaseHasInstaller (checks PythinkerSetup-<ver>.exe + .sha256), Format-ReleaseApiError, and rework Get-LatestVersion to prefer /releases/latest with paginated fallback and polling until ready.
Tests and CHANGELOG
tests/test_release_update_pipeline.py, CHANGELOG.md
Add assertions verifying installer readiness gating and test ensuring dispatch workflow uses scoped GitHub App token and fails fast; add Unreleased changelog entry describing these changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

enhancement

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning Description lacks required template structure; missing Related Issue section, proper Description section, and incomplete Checklist items (no explicit confirmations). Add Related Issue link and expand Description section with clear rationale for each change. Confirm all checklist items have been completed.
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 70.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commits format with 'ci' type, clear scope covering the three main changes (dispatch migration, docs retirement, installer hardening), and descriptive summary.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-orchestration-p0

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/dispatch-pythinker-home-sync.yml:
- Around line 33-40: The GitHub App token step "Mint GitHub App token for
pythinker-home" (id: app-token; uses:
actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349)
currently yields a token with all installation permissions; narrow its scope by
adding the permission-contents: write input to the action invocation so the
minted token only has content write access. Keep the pinned SHA as-is
(fee1f7d63c2ff003460e3d139729b119787bc349) and ensure the new with:
permission-contents: write line is added alongside the existing app-id,
private-key, owner and repositories fields.

In `@scripts/install.ps1`:
- Around line 159-179: The loop currently swallows exceptions in both API calls
(the two catch {} blocks) so the final Fail message is generic; modify the code
to capture the exception object in each catch (e.g., assign $_ to a variable
like $lastApiError or $lastError inside each catch) and keep updating it
whenever an API call fails (reference $latestApi, $listApi,
Test-ReleaseHasInstaller). When triggering Fail (the "no published release..."
branch that uses $elapsed and $maxElapsed), append the captured error's
message/details to the Fail call so users see the underlying API error (e.g.,
include $lastError.Message or $lastError | Out-String).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 09c81b45-d31b-48f1-be8f-1fccd5b30976

📥 Commits

Reviewing files that changed from the base of the PR and between 9c3cb2b and 9120e22.

📒 Files selected for processing (5)
  • .github/workflows/dispatch-pythinker-home-sync.yml
  • .github/workflows/release-pythinker-core.yml
  • CHANGELOG.md
  • scripts/install-native.sh
  • scripts/install.ps1
💤 Files with no reviewable changes (1)
  • .github/workflows/release-pythinker-core.yml

Comment thread .github/workflows/dispatch-pythinker-home-sync.yml
Comment thread scripts/install.ps1
@elkaix
elkaix merged commit f0c080b into main May 31, 2026
25 checks passed
@elkaix
elkaix deleted the feat/release-orchestration-p0 branch July 17, 2026 20:04
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