Skip to content

feat: add secure PR screenshot automation - #21

Merged
leoncheng57 merged 3 commits into
mainfrom
feat/pr-screenshot-ci
Aug 21, 2026
Merged

feat: add secure PR screenshot automation#21
leoncheng57 merged 3 commits into
mainfrom
feat/pr-screenshot-ci

Conversation

@leoncheng57

@leoncheng57 leoncheng57 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • parse strict fenced screenshots requests from PR descriptions
  • capture the production SPA/BFF against deterministic Playwright mocks only
  • validate untrusted artifacts before same-repository publication and sticky comments
  • clean up only the closed PR's publication and marker-owned comment
  • integrate the merged OpenCode 1.18.21 operations and expanded reminder catalogue

Security

The capture workflow is read-only and receives no secrets. A trusted default-branch workflow_run binds artifacts to the run SHA and publishes PNG bytes only when the PR head repository matches this repository. Fork artifacts are linked but never copied to gh-pages. The close workflow never checks out or executes PR code.

Verification

  • npm run typecheck: client, server, and tools configs passed
  • npm test: 21 files, 202 tests passed
  • npm run build: production client and server passed
  • npm run test:e2e: 121 passed, 1 screenshot-only placeholder skipped
  • npm run screenshots:local: 2 PNGs captured and validated, including desktop and full:
  • actionlint: all 4 workflows passed
  • git diff --check: passed
  • no mock/BFF ports remained after capture

The publisher is intentionally a default-branch workflow_run; this bootstrap PR proves capture via its artifact, and inline publication activates after merge.

/?directory=/tmp/mock-project
full:/sessions/ses_mock_done?directory=/tmp/mock-project

@leoncheng57
leoncheng57 marked this pull request as ready for review August 21, 2026 19:47
@leoncheng57
leoncheng57 merged commit 2b5c388 into main Aug 21, 2026
3 of 4 checks passed
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