paperclip/scripts
Dotta a20ecce409
feat: publish CODEOWNER-approved Storybook branch previews (#13226)
## Thinking Path

> - Paperclip helps people manage AI agents for work.
> - Maintainers use Storybook to review the board UI.
> - Reviews need public previews of selected repository branches.
> - Each branch needs its own URL so previews do not replace each other.
> - This pull request adds manual, CODEOWNER-controlled publishing to S3
and CloudFront.
> - The action returns stable branch links and permanent build links in
its summary and a Markdown artifact.

## Linked Issues or Issue Description

**What existing behavior does this improve?**

The existing Storybook build and manual visual-review workflow.

**Current behavior**

The repository has no manual branch-preview publisher. A single GitHub
Pages site cannot support independent publishers without combining their
output.

**Proposed behavior**

A CODEOWNER selects a source branch and approves publication. Each
branch has a stable CloudFront URL. A completed build becomes the branch
target only after its upload succeeds. The action attaches
`storybook-deployment.md` with the preview links and source commit.

**Reason and benefit**

Maintainers can share multiple branch previews at the same time. Branch
builds have no repository token permissions or AWS credentials.
Dependency caching and install hooks are disabled. The publisher cannot
write runner dashboard files or delete objects.

**Breaking changes**

None. Normal visual checks keep their existing behavior. This does not
change application code or GitHub Pages settings.

**Additional context**

Searched public issues and PRs for Storybook deployment work. No
duplicate deployment proposal was found. This is maintainer
infrastructure, not a roadmap-level core feature.

## What Changed

- Add `Storybook Deploy` with a source-branch input and a manual entry
through `Storybook Visual`.
- Check the original actor and rerunner against default-branch
CODEOWNERS. Require a protected deployment environment with CODEOWNER
reviewers.
- Separate public-source builds with no repository permissions from an
OIDC publisher restricted to the Storybook S3 prefix.
- Publish distinct branch URLs and retain build URLs. Preserve Storybook
deep links across the branch redirect.
- Add the run summary, a downloadable Markdown deployment report,
focused tests, and operator setup docs and IAM policies.

## Verification

- `node --test scripts/__tests__/storybook-deploy.test.mjs`: 19 tests
pass.
- `actionlint .github/workflows/storybook-deploy.yml
.github/workflows/storybook-visual.yml`: passes.
- [Feature branch live publication and deployment-only
rerun](https://github.com/paperclipai/paperclip/actions/runs/34533202273):
passed.
- [Master branch live
publication](https://github.com/paperclipai/paperclip/actions/runs/34533204743):
passed.
- Both public branch URLs render a component story without browser
errors. A deployment-only rerun updates only the selected branch entry
and preserves the previous build URL.
- AWS policy simulation allows Storybook uploads and denies dashboard
writes and object deletion.
- Full local typechecking passes. Full local tests, build, and
current-head PR checks are running.
- [Revised build and Markdown artifact
validation](https://github.com/paperclipai/paperclip/actions/runs/34605623088):
passed. Downloaded the report and verified its branch URL, build URL,
and source commit.
- The public verifier also checks that the stable branch URL points to
this build and rejects stale targets.

## Risks

- Storybook previews are public. Maintainers must publish only public UI
fixtures.
- Retained builds accumulate until an operator prunes them.
- Environment reviewers must stay synchronized with CODEOWNERS. The
workflow fails closed if its environment loses required protection.
- The existing CloudFront distribution is shared with runner reports.
Separate S3 prefixes and a dedicated role prevent the publisher from
overwriting those reports.

## Model Used

OpenAI GPT-6 via Codex, with reasoning, shell tools, and browser
verification. The exact runtime model ID and context-window size are not
exposed in this session.

## Checklist


- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-11 09:13:55 -05:00
..
__tests__ feat: publish CODEOWNER-approved Storybook branch previews (#13226) 2026-09-11 09:13:55 -05:00
install-sh-fixtures feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
lib feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
mcp-fixtures feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
smoke feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
tests feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
acpx-patch-packaging.test.mjs fix(paperclip-runner): bump claude-agent-acp pin to 0.73.0 (#13162) 2026-09-10 11:35:33 -07:00
assert-cloud-image-sentry.mjs Install the declared Sentry server package into the hosted image (#12330) 2026-08-27 19:10:49 -07:00
assert-orphan-reaping.sh fix(docker): make tini PID 1 in the server image so adopted orphans are reaped (#12137) 2026-08-25 09:52:39 -07:00
backfill-issue-reference-mentions.ts
backup-db.sh
benchmark-skill-preparation.ts fix(skills): reuse validated runtime revisions during preparation (#13042) 2026-09-08 09:35:32 -05:00
bootstrap-npm-package.mjs feat(release): bootstrap new npm packages with a placeholder publish (#11757) 2026-08-19 19:38:17 -07:00
bootstrap-npm-package.test.mjs feat(release): bootstrap new npm packages with a placeholder publish (#11757) 2026-08-19 19:38:17 -07:00
build-npm.sh feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
build-standalone-public-packages.mjs
capture-pap-2351-binding-picker.mjs
chat-adapter-patch-packaging.test.mjs feat: add opt-in chat provider and data foundation (#13100) 2026-09-09 13:49:12 -05:00
check-docker-deps-stage.mjs
check-forbidden-tokens.mjs
check-module-boundaries.mjs refactor(server): move the admission half of the deferred wake state machine into the wake-queue module (#13136) 2026-09-10 00:55:48 -07:00
check-module-boundaries.test.mjs refactor(server): move the admission half of the deferred wake state machine into the wake-queue module (#13136) 2026-09-10 00:55:48 -07:00
check-no-git-push.mjs
check-no-git-push.test.mjs
check-node-version-policy.mjs fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
check-release-package-bootstrap.mjs
check-release-package-bootstrap.test.mjs
check-task-chat-motion.mjs feat(ui): chat-style task view behind an experimental flag (#10606) 2026-08-01 02:26:47 -07:00
check-token-gates.mjs fix(ui): align the mobile task chat composer with the thread (#11296) 2026-08-14 12:53:11 -04:00
clean-install-git.sh feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
clean-install-npm.sh feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
clean-onboard-git.sh
clean-onboard-npm.sh
clean-onboard-ref.sh
cli-bundled-npm-dependencies.mjs feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
cloud-readiness.mjs fix(ci): verify deployable cloud artifacts independently (#13192) 2026-09-10 21:08:29 -07:00
codemod-extract-colors.mjs
codemod-extract-misc.mjs
codemod-extract-sizes.mjs
codemod-extract-type.mjs
codemod-type-ladder.mjs
codex-acp-network-policy.test.mjs fix(adapters): prevent engine fallback and preserve usable runtime defaults (#13105) 2026-09-09 13:27:24 -05:00
create-github-release.sh feat(release): draft stable notes at beta publish, read them from master at promotion (#11567) 2026-08-17 20:47:23 -07:00
dev-both.mjs feat(dev): add pnpm dev:mobile and dev:both for prebuilt UI preview (#10718) 2026-08-02 20:26:03 -07:00
dev-runner-native-binary.mjs feat(runner): integrate Codex native execution (#12616) 2026-08-31 22:51:17 -05:00
dev-runner-options.ts fix(dev): honor --data-dir isolation (#12193) 2026-08-26 09:08:31 -05:00
dev-runner-output.mjs
dev-runner-output.ts
dev-runner-paths.mjs
dev-runner-snapshot.mjs
dev-runner.mjs
dev-runner.ts fix(runner): recover native sessions across restarts (#12845) 2026-09-04 15:03:53 -05:00
dev-service-profile.ts
dev-service.ts fix(dev): honor --data-dir isolation (#12193) 2026-08-26 09:08:31 -05:00
discord-daily-digest.sh
docker-build-test.sh fix(docker): make tini PID 1 in the server image so adopted orphans are reaped (#12137) 2026-08-25 09:52:39 -07:00
docker-entrypoint.sh Ensure app-home ownership before the privilege drop, not only on remap (#10530) 2026-07-30 21:34:45 -07:00
docker-onboard-smoke.sh Follow the current onboarding arc in the release smoke (#12423) 2026-08-28 07:21:08 -07:00
docker-onboard-smoke.test.mjs Follow the current onboarding arc in the release smoke (#12423) 2026-08-28 07:21:08 -07:00
draft-stable-notes.sh feat(release): thorough notes skeletons — nest each PR's summary at creation (#12124) 2026-08-24 20:51:33 -07:00
draft-stable-notes.test.mjs feat(release): thorough notes skeletons — nest each PR's summary at creation (#12124) 2026-08-24 20:51:33 -07:00
e2e-install-lifecycle.sh fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
e2e-mcp-user-stories.mjs feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
e2e-shard-durations.json test(e2e): shorten and split Smoke Lab coverage (#12506) 2026-08-31 10:15:39 -05:00
e2e-shard.mjs feat(connections): connect services from native task feeds (#13058) 2026-09-08 15:55:26 -05:00
e2e-update-migrations.sh test(installer): cover cross-version update migrations (#10587) 2026-07-31 18:53:34 -07:00
ensure-plugin-build-deps.mjs
ensure-workspace-package-links.ts
extract-proposed-events.mjs Add telemetry proposal extractor (#9544) 2026-07-13 23:47:27 -07:00
extract-proposed-events.test.mjs Add telemetry proposal extractor (#9544) 2026-07-13 23:47:27 -07:00
general-server-shard-durations.json fix(ci): split release chat verification into test shards (#13198) 2026-09-10 20:30:30 -07:00
general-server-shard.mjs perf(ci): balance general-server test shards by recorded suite duration (#9516) 2026-07-13 12:25:54 -07:00
generate-company-assets.ts
generate-feature-catalog.ts Add a feature catalog build artifact derived from the experimental settings schema (#10055) 2026-07-22 18:12:56 -07:00
generate-npm-package-json.mjs fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
generate-org-chart-images.ts
generate-org-chart-satori-comparison.ts
generate-plugin-package-json.mjs
generate-runner-api-reference.mjs feat(runner): add guarded API search and call fallback (#13003) 2026-09-07 14:14:43 -05:00
generate-runner-experimental-api-metadata.mjs feat(runner): add guarded API search and call fallback (#13003) 2026-09-07 14:14:43 -05:00
generate-ui-package-json.mjs
ingest-app-definitions.mjs feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
install.sh fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
kill-agent-browsers.sh
kill-dev.sh
kill-vitest.sh
kill-workspaces.sh
link-plugin-dev-sdk.mjs
link-plugin-dev-sdk.test.js
measure-issue-chat-long-thread.mjs
migrate-inline-env-secrets.ts
paperclip-commit-metrics.ts
paperclip-issue-update.sh fix: verify issue-update writes instead of inferring success (#12051) 2026-08-23 16:56:51 -07:00
prepare-bundled-package.mjs Build isolated preview artifacts for exact-source deployments (#13041) 2026-09-08 09:21:58 -05:00
prepare-server-ui-dist.sh
preview-artifacts.mjs fix(release): publish exact-source cloud migrators on merge (#13188) 2026-09-10 21:07:38 -07:00
preview-artifacts.test.mjs fix(ci): bake the managed runtime identity into cloud images (#13210) 2026-09-11 00:58:27 -07:00
provision-worktree-runtime.sh fix(scripts): silence pnpm DEP0169 at provisioning install call sites (#12228) 2026-08-26 10:42:13 -07:00
provision-worktree.sh fix(workspaces): preserve dependency provisioning failures (#13093) 2026-09-09 10:14:58 -05:00
release-lib.sh fix(release): skip lifecycle scripts for bundle staging (#12585) 2026-08-31 09:14:08 -05:00
release-lib.test.mjs fix(release): skip lifecycle scripts for bundle staging (#12585) 2026-08-31 09:14:08 -05:00
release-package-manifest.json feat: add kimi-local adapter for Kimi Code CLI (CLI + ACP engines) (#9967) 2026-08-20 12:06:33 -07:00
release-package-map.mjs feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
release-package-map.test.mjs feat(cli): add managed install, update, and service lifecycle (#10045) 2026-07-31 18:52:23 -07:00
release-registry-versions.mjs perf(release): batch npm registry version queries (#9202) 2026-07-08 08:04:39 -07:00
release-registry-versions.test.mjs feat(release): add human-gated beta channel with stable soak enforcement (#11008) 2026-08-10 16:52:59 -07:00
release.sh feat(release): draft stable notes at beta publish, read them from master at promotion (#11567) 2026-08-17 20:47:23 -07:00
repair-pr-prep-workspace-attachment.mjs fix(workspaces): attach PR preparation to existing branches (#11703) 2026-08-21 17:23:18 -05:00
request-hot-restart.ts fix(server): preserve hot restart intent across path upgrade (#10593) 2026-07-31 21:55:59 -07:00
rollback-latest.sh
run-typecheck-build-gaps.mjs Add runtime asset build-gap guard 2026-07-13 08:35:30 -07:00
run-vitest-stable.mjs fix(ci): split release chat verification into test shards (#13198) 2026-09-10 20:30:30 -07:00
runner-api-eval-worker.ts feat(connections): connect services from native task feeds (#13058) 2026-09-08 15:55:26 -05:00
screenshot-blocked-inbox.mjs
screenshot-file-viewer.mjs
screenshot-fork-flow.mjs Skill Studio: three-pane skill IDE with sandboxed test runs (#9241) 2026-07-09 13:08:56 -05:00
screenshot-notion-connect-flow.mjs feat(apps): connect Notion through MCP OAuth (#11009) 2026-08-06 22:18:08 -05:00
screenshot-one.mjs
screenshot-pap2373.mjs
screenshot-recovery-card.cjs
screenshot-subissues.mjs
screenshot-verdicts.mjs feat: add attention queue and Decisions surface (#9380) 2026-07-10 17:09:57 -05:00
screenshot.cjs
serialized-shard-durations.json refactor: balance serialized server shards by recorded suite duration (#11528) 2026-08-17 20:30:44 -07:00
serve-storybook-static.mjs [codex] Document Storybook visual baseline platform lock (#9216) 2026-07-08 07:23:02 -05:00
service-onboard-smoke.sh test(release-smoke): cover the background-service leg of onboarding (#12151) 2026-08-25 01:05:27 -07:00
service-onboard-smoke.test.mjs test(release-smoke): cover the background-service leg of onboarding (#12151) 2026-08-25 01:05:27 -07:00
storybook-visual-baseline.mjs
test-install-sh-docker.sh fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
test-line-shard.mjs fix(ci): split release chat verification into test shards (#13198) 2026-09-10 20:30:30 -07:00
verify-release-registry-state.mjs feat(release): add human-gated beta channel with stable soak enforcement (#11008) 2026-08-10 16:52:59 -07:00
verify-release-registry-state.test.mjs feat(release): add human-gated beta channel with stable soak enforcement (#11008) 2026-08-10 16:52:59 -07:00