Skip to content

ci(starchart): publish chart refreshes through reviewed PRs - #1178

Merged
scttbnsn merged 3 commits into
dev/v1.8from
fix/v1.8-starchart-pr
Sep 13, 2026
Merged

scttbnsn merged 3 commits into
dev/v1.8from
fix/v1.8-starchart-pr

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Change

Fix Starchart run 34543970454, where generation succeeded but the shared workflow's direct dev-branch push correctly failed with GH013 because all 11 required checks were missing.

Keep the renderer pinned at 11004e42d7d19e86eb3b7777c467ec9522b784e1. Create a unique branch from the current dispatched dev head, render there with the existing Actions identity, then use the existing Crowdin GitHub App to open a normal chart-update PR. Scott explicitly approved that App reuse. Its credential is minted only in the publication job, restricted to this repository and Contents/PR write. No App secrets are passed to the renderer. The new preparation/publication checkouts do not persist credentials; the unchanged shared renderer retains its existing Actions checkout credential for the temporary-branch push. Publication executes the trusted dispatch revision rather than generated-branch code.

The publisher compares immutable source/head SHAs, accepts only modifications to the two existing chart SVGs, verifies the created PR, reuses it on a publication retry, and deletes only this run's branch when the charts are unchanged. It rejects main, tags, malformed refs and unexpected generated paths. Failed-job retries retain the original preparation attempt. Failed rendering/publication keeps its branch for diagnosis; it never pushes to dev/main or auto-merges.

No repository settings, branch protection, production website deployment, release metadata, dependency pins or shared upstream workflow changes. This PR targets dev/v1.8; it does not change the workflows already present on the soaking 1.6/1.7 lines.

Verification

  • Two workflow contract tests failed before replacing direct dev-branch rendering.
  • Real CLI regression tests caught and then verified retry attempt propagation and rejecting a tag whose name resembles a dev branch. Branch-creation reread verification also has a negative regression.
  • 28 helper tests pass, including real subprocess/CLI execution with only the GitHub transport replaced. They cover chart-only diffs, initial failure, no changes, divergent history, PR failures, deduplication and exact-head verification.
  • 13 focused workflow tests pass. Zizmor and scoped Qlty pass.
  • First bounded independent source review found no actionable issues. It did not exercise the actual App installation or hosted execution.
  • First normal full push stopped at YAML comment spacing. Only those three spaces were corrected. Normal retry passed all applicable gates in 407.26 seconds on exact head 1b38c7a4480fe185bafd7f877c6fcfc0316508d4: app/UI configured coverage 100%, both builds, typecheck, script/workflow/website tests, static checks and Zizmor. Optional Docker skipped normally. No bypasses or weakened checks.

Hosted workflow execution with the App remains to be verified after reviewed integration. Existing release dispatches target dev refs, so don't run this feature branch as a substitute for that verification or promote unrelated product changes to main.

Threat model: trusted maintainers and release automation dispatching trusted repository revisions, a pinned renderer consuming external stargazer data, protected dev/main branches, and least-privilege reuse of an existing repository App. No hostile-maintainer bypass or new chart generator is in scope.

Changelog

  • ✨ Added prepare and publish jobs for isolated chart branches and reviewed chart PRs.
  • ✨ Added scripts/starchart-pr.mjs for branch preparation, chart-only diff validation, PR reuse/creation, verification, retries, and cleanup.
  • ✨ Added tests for workflow policy, dispatch wiring, rendering, retries, deduplication, SHA validation, and failure cases.
  • 🔧 Changed Starchart publishing from direct pushes to PR-based publishing.
  • 🔒 Scoped GitHub App credentials to repository operations and hardened runner egress.

Concerns

  • ⚠️ Complete hosted verification of the GitHub App installation.
  • ⚠️ Confirm failed publish runs preserve branches and expose sufficient diagnostics.
  • ⚠️ Confirm concurrency behavior does not cancel or orphan valid chart refresh attempts.

Greptile's completed first review covers exact head 1b38c7a, reports no concrete correctness/security regressions and rates it 5/5. CodeRabbit's completed first source review also found no actionable comments on that head.

Current integration checkpoint

Current head ab87260dbc1339e16cbb81294cb0496c260d4797 normally incorporates landed dev 356e3984121eaf01e3bd17b8883bd961ad2ecfd3. The only conflict was adjacent changelog bullets; both are retained. All five Starchart implementation/test files are byte-identical to the reviewed first head. A bounded independent integration review found no issues.

The normal full push on this head passed in 356.03 seconds: configured app/UI coverage 100%, both builds, typecheck and applicable static/script/workflow/96 website tests. No gate bypass. Greptile's second review covers this exact head and reports 5/5 with no findings. CodeRabbit skipped the incremental changelog-only delta under the repository's existing path filter; its completed first review covers all five unchanged source/test files. Required hosted CI is pending. Actual App workflow execution remains unverified until reviewed integration and dispatch.

@vercel

vercel Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydock-website Ready Ready Preview Sep 13, 2026 3:35pm UTC
drydockdemo-website Ready Ready Preview Sep 13, 2026 3:35pm UTC

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 466975fb-0ac6-4016-ba0e-5edb009ebf05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5d57a7a5-1580-49b5-8315-d385ea99574c

📥 Commits

Reviewing files that changed from the base of the PR and between 08f44af and 1b38c7a.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (5)
  • .github/tests/harden-runner-workflow.test.ts
  • .github/tests/release-cut-starchart-dispatch.test.ts
  • .github/workflows/starchart.yml
  • scripts/starchart-pr.mjs
  • scripts/starchart-pr.test.mjs

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The workflow now prepares a run-scoped chart branch, renders charts from that branch, and publishes a validated chart pull request. The new script validates branches, SHAs, comparisons, chart file changes, and pull request state. It supports reruns, unchanged charts, and CLI execution through gh. Workflow tests verify job dependencies, App authentication, branch wiring, and hardened runner policies. Script tests cover success and rejection paths.

Suggested labels: second-opinion

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1b38c

The workflow intentionally prepares from the current target-branch head, and later base movement does not establish invalid chart publication. It is ready for normal merge checks.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.8-starchart-pr

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@greptileai Review exact head 1b38c7a4480fe185bafd7f877c6fcfc0316508d4. Review App credential scope and job isolation, run-branch creation and failed-job retries, immutable chart-only diff checks, no-change cleanup and PR event triggering. Threat model: trusted maintainer/release dispatch, pinned renderer with external star data, protected dev/main. No hostile-maintainer scenario or new generator.

@coderabbitai coderabbitai Bot added the second-opinion Summon Greptile for a second-opinion review label Sep 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@greptileai Review exact head 1b38c7a4480fe185bafd7f877c6fcfc0316508d4. Review for correctness, security issues, and cross-file regressions.

@greptile-apps

greptile-apps Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR replaces direct Starchart pushes to protected development branches with isolated rendering branches and reviewed, chart-only pull requests.

  • Adds preparation and publication jobs with narrowly scoped permissions and blocked runner egress.
  • Uses the existing repository-scoped GitHub App credential only during PR publication.
  • Validates branch identity, immutable SHAs, generated history, allowed chart paths, and the resulting pull request.
  • Adds workflow contract and helper tests covering retries, deduplication, cleanup, malformed refs, unexpected output, and verification failures.
  • Since the previous review, the five Starchart implementation and test files remain unchanged; integration added only adjacent changelog entries already landed on the base branch.

Confidence Score: 5/5

The exact reviewed head appears safe to merge, with no permission or publication-contract regression introduced by the base integration.

No actionable correctness, security, or repository-rule violations remain; the Starchart source and test files are unchanged since the clean previous review, and the only integration resolution within this PR’s files preserves both adjacent changelog entries.

Important Files Changed

Filename Overview
.github/workflows/starchart.yml Introduces isolated branch preparation and App-authenticated PR publication without exposing the App credential to the renderer.
scripts/starchart-pr.mjs Implements strict branch, SHA, history, generated-path, retry, PR-verification, and unchanged-chart cleanup contracts.
scripts/starchart-pr.test.mjs Covers successful publication and relevant failure, retry, validation, deduplication, and cleanup paths.
.github/tests/release-cut-starchart-dispatch.test.ts Verifies dispatch-derived targeting, renderer isolation, and least-privilege App publication wiring.
.github/tests/harden-runner-workflow.test.ts Adds the preparation and publication jobs to the blocked-egress policy contract.
CHANGELOG.md Documents reviewed Starchart PR publication while retaining adjacent changelog entries from the integrated base.

Reviews (2): Last reviewed commit: "chore(starchart): reconcile landed v1.8 ..." | Re-trigger Greptile

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@greptileai Review exact head ab87260dbc1339e16cbb81294cb0496c260d4797. Second pass, exact current head. Threat model: trusted release dispatch, pinned renderer, protected dev/main, repository-scoped existing App. Inspect integration against prior reviewed 1b38c7a: all five Starchart source/test files are unchanged; only adjacent changelog conflict was resolved while incorporating already-landed dev changes. Confirm no permission or publication-contract regression. No hostile-maintainer scenarios or new subsystems.

@scttbnsn
scttbnsn merged commit 6e75b37 into dev/v1.8 Sep 13, 2026
33 of 34 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.8-starchart-pr branch September 13, 2026 16:01
@scttbnsn

Copy link
Copy Markdown
Contributor Author

Merged as 6e75b37 after all required checks passed. The fetched dev/v1.8 tree exactly matches the tested PR head.

Hosted verification passed: https://github.com/CodesWhat/drydock/actions/runs/34767348694. Preparation, the pinned renderer and App-authenticated publication all succeeded. The existing codeswhat-crowdin-sync App opened #1183 against dev/v1.8 with only the two expected SVGs. Both light and dark charts render correctly in the browser. Main and release tags were untouched.

scttbnsn added a commit that referenced this pull request Nov 2, 2026