From 9b006a9fcfa90e084887901ec0fb1ce83f1c40ce Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Oct 2026 11:21:54 +0000 Subject: [PATCH] ci: publish PR screenshots to a ci-screenshots branch A separate job with write access downloads the screenshots artifact and force-pushes it as a single commit, so screens can be reviewed with a plain git fetch. The build job keeps read-only permissions; forks are skipped. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ docs/DECISIONS.md | 1 + 2 files changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 951c33dd..8de0e028 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,6 +137,29 @@ jobs: path: out/publish/ retention-days: 14 + screenshots: + name: Screenshots branch + # Same-repository pull requests only: forks never get a writable token. + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + name: screenshots + path: screenshots + - name: Publish to the ci-screenshots branch (one commit, overwritten each run) + working-directory: screenshots + run: | + git init -q -b ci-screenshots + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -q -m "Screenshots of ${{ github.event.pull_request.head.sha }}" + git push -q -f "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" HEAD:refs/heads/ci-screenshots + postgres: name: PostgreSQL ${{ matrix.pg }} integration strategy: diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 024d4cc0..df5f3c41 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -88,3 +88,4 @@ One line per decision: date · decision · alternative · reason. | 2026-10-02 | Automatic output stops at 4K UHD; no automatic stacking advice. | 8K / temporal-median denoise | 8K stays a manual choice; a median erases moving stars and stillness cannot be verified reliably. | | 2026-10-02 | Apply records a missing-data reason only where no advice exists; Optimise returns modules to Auto and only adds to the user's hero, exclusions, offset or output cap; a preset's own choices are stored as manual values, content-derived values stay Auto. | Overwrite | Manual values stay in force; re-analysis does not undo a chosen preset. | | 2026-10-02 | Advisor namespace is `Titano.Core.Advice` (class `Advisor`). | `Titano.Core.Advisor` | A class named like its namespace needed an alias in every `Titano.Core.*` caller. | +| 2026-10-02 | CI also force-pushes each same-repository PR run's screenshots as one commit to the `ci-screenshots` branch (separate job, only it has `contents: write`). | Artifact only | Artifacts need an authenticated download; a branch can be fetched with plain git for visual review. The branch never merges and holds a single commit. |