Skip to content

ci(deploy): typecheck the Cloudflare deploy package - #6120

Closed
wtfsayo wants to merge 2 commits into
lidge-jun:devfrom
wtfsayo:ci/deploy-cloudflare-typecheck
Closed

wtfsayo wants to merge 2 commits into
lidge-jun:devfrom
wtfsayo:ci/deploy-cloudflare-typecheck

Conversation

@wtfsayo

@wtfsayo wtfsayo commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds CI coverage for the Cloudflare deploy package. Maintainer triage on #6077 (T4-P-6077) asked for this before a hosting release. It's split out of #6077 so the workflow change gets its own security review under MAINTAINERS.md, and so the hub PR isn't held behind that sponsorship.

  • New job cloudflare-deploy in .github/workflows/ci.yml:
    • runs on Linux, 10-minute timeout, contents: read, no secrets;
    • reuses the checkout action already pinned in the file (with persist-credentials: false) and ./.github/actions/setup-project-bun;
    • steps: a frozen-lockfile install of deploy/cloudflare, then bun run typecheck there, then a root install, then bun test tests/service/cloudflare-deploy.test.ts.
  • Trigger: a new narrow deploy filter in the changes job, covering deploy/**, docker/cloudflare-supervisor.ts, tests/service/cloudflare-deploy.test.ts and .github/workflows/ci.yml. It applies to pull requests only, like the existing docs, structure, setup_action and remote_helper filters. The aggregate ci check requires the job to succeed when the filter matches and to be skipped otherwise.
  • Deliberately not changed: deploy/** is not added to the push-event path allowlist. The parity tests tie that allowlist to the full cross-platform matrix, so it would run every lane for a Worker-only edit. That's the same accepted gap as docs-site/** and structure/**, and all three release branches require a pull request, so every change still passes this job.
  • Left out: wrangler deploy --dry-run. With the containers entry it builds the root Docker image, which docker smoke already covers.
  • Tests and docs: new deploy cases in ci-scope-gaps.test.ts; CHANGES_DEPLOY is set in ci-privacy-gate.test.ts and ci-review-lanes.test.ts, because the gate script runs under set -u. structure/ops/cross-platform-ci.md and structure/ops/docs-and-release.md describe the job.

Depends on #6077, which adds deploy/cloudflare, docker/cloudflare-supervisor.ts and the test this job runs. On today's dev, structure:check fails because the ops doc names those two files, and the job itself would have nothing to typecheck. I'll rebase this onto dev once #6077 lands; it stays a draft until then.

Verification

On the #6077 branch, where the files exist:

  • The job's own steps pass locally: the deploy install and bun run typecheck, the root install, and tests/service/cloudflare-deploy.test.ts (29 pass).
  • bun test tests/ci-workflows: all pass except two test-runner.test.ts cases ("a bare pass/fail run removes its preload-owned TEMP root"), which fail the same way on untouched dev.
  • bun run typecheck, bun run structure:check and bun run privacy:scan pass.

On this branch (today's dev plus this commit): bun run typecheck passes. bun test tests/ci-workflows shows 1383 pass and 3 fail: the same two test-runner cases, plus the structure-docs guard, which fails only because of the #6077 dependency above.

Not run: the job itself on GitHub Actions. Fork pull requests need a maintainer to approve workflow runs. actionlint isn't installed locally.

An independent security re-review covered this job with #6077's fixes: minimum permissions, pinned actions, frozen lockfiles, persist-credentials: false, no secrets, and pull-request code never sees a write token. It found nothing.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

🤖 Generated with Claude Code

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Adds a narrow Linux job for pull requests touching deploy/**,
docker/cloudflare-supervisor.ts or its test: frozen-lockfile install of
deploy/cloudflare, `bun run typecheck`, and
tests/service/cloudflare-deploy.test.ts. It runs with contents: read, no
secrets and the file's existing pinned actions, and the aggregate ci
check requires it only when its filter matches. deploy/** stays out of
the push allowlist, which parity tests tie to the full matrix, the same
accepted gap as docs-site/**.

Depends on the Cloudflare hub (lidge-jun#6077), which adds the files it checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@github-actions github-actions Bot added chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). intake: hygiene-blocked Deterministic PR hygiene checks failed labels Sep 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: .github/workflows/ci.yml.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 48 / 80

이 PR은 Cloudflare Worker 패키지를, 그 폴더만 고친 변경에서도 검사하게 만듭니다. 루트 타입 검사는 deploy/cloudflare까지 들어가지 않습니다. ci 필터도 deploy/**를 빼 두었습니다. 그래서 Worker 파일만 고치면 큰 테스트가 전부 건너뛰고도 성공으로 끝날 수 있습니다. 그걸 막으려고 changes에 deploy 필터를 넣고, 리눅스 잡 cloudflare-deploy를 추가했습니다. 잡은 패키지 자기 lockfile로 설치하고 bun run typecheck를 돌립니다. 이 스크립트는 tsc --noEmit입니다. 그다음 루트를 설치하고 tests/service/cloudflare-deploy.test.ts를 실행합니다. 권한은 워크플로 기본값인 저장소 읽기이고, 깃허브에 저장된 비밀값은 이 잡에 넘기지 않습니다. checkout은 이 파일에 이미 고정된 커밋이고 persist-credentials: false입니다. wrangler deploy는 하지 않습니다. 컨테이너 설정이 있으면 dry-run이 루트 도커 이미지를 만들고, 그 검사는 이미 docker smoke가 합니다. 베이스는 dev입니다. 검사 대상 파일은 #6077에 있고, 이 PR은 그 검사가 빠지지 않게 하는 CI만 떼어 낸 draft입니다.

.github/workflows/ci.yml:1209 - 이 브랜치에는 deploy/cloudflare가 없습니다. 필터가 .github/workflows/ci.yml도 포함해서 이 PR만으로 잡이 켜집니다. 그러면 없는 폴더에서 bun install --frozen-lockfile을 합니다. #6077이 dev에 들어가기 전에는 이 잡이 실패합니다. 작성자가 같은 이유로 draft라고 적어 두었습니다.

structure/ops/cross-platform-ci.md:31 - "세 필터 모두 ci.yml을 넣는다"고 적혀 있습니다. remote_helper 필터는 native/remote-workspace-helper/**만 가집니다. ci.yml을 넣는 필터는 setup_action과 이번 deploy입니다.

메인테이너의 판단이 필요한 지점

  • #6077이 dev에 들어간 뒤에 이 브랜치를 그 위로 다시 얹고, 잡이 통과한 뒤에 합칠지. 지금 커밋은 그대로 합치면 검사가 깨집니다.
  • deploy/**를 push 경로에서 뺀 것. docs-site/**, structure/**와 같은 예외이고, main과 preview가 PR을 요구한다는 전제에 기대고 있습니다.
  • .github/workflows/ci.yml을 고쳐서 hygiene가 maintainer-sponsored를 요구합니다. 이 잡에는 비밀값도 쓰기 토큰도 없습니다.
  • dry-run을 빼 두고 docker smoke에 맡긴 것을 충분한 검사로 볼지.

너의 추천
이미 있는 setup-action, remote-helper와 같은 모양이고, 권한을 넓히지 않았습니다. 남겨 두고 #6077 다음에 합치는 쪽이 맞습니다. rebase 뒤에 잡이 실제로 통과하는지 보고, 31행의 "세 필터 모두 ci.yml"만 고친 다음 스폰서 라벨을 달면 됩니다.

이 댓글은 grok-bot이 작성했습니다

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • hygiene: unsponsored_surface.

What to do

  • Fix unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: .github/workflows/ci.yml.
  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ⬜ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.
@wtfsayo Tick the boxes once required local validation has passed with commands, results, and any full-suite exception documented, your branch is on the latest dev commit, and every correct Codex and CodeRabbit finding is resolved.

The ops doc said all three narrow filters list ci.yml; remote_helper does
not.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@wtfsayo

wtfsayo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I fixed structure/ops/cross-platform-ci.md:31 in fe66dbaf2: only setup_action and deploy list ci.yml (remote_helper has just native/remote-workspace-helper/**), and the sentence now says so. Agreed on the rest: this stays a draft until #6077 is on dev. I'll then rebase it, confirm the job passes on the rebased head, and it's ready for the sponsorship label.

@Ingwannu

Copy link
Copy Markdown
Owner

Exact-head hold for fe66dba: this workflow change enables the new deploy filter, but this branch does not contain deploy/cloudflare or its tests. Approving it now would make the new job enter a directory that does not exist. Dependency #6077 is still open/draft, both branches are currently 111 commits behind dev, and this head has no product-CI proof (hygiene/enforce-target are failing on sponsorship).

Please keep this draft blocked until #6077 lands, then rebase onto current dev, prove the new job on the exact head, and obtain workflow-maintainer sponsorship. The workflow permission/pinning/aggregate wiring otherwise looked clean in this pass.

@lidge-jun

Copy link
Copy Markdown
Owner

Closing during triage: draft inactive since late September and now far behind dev. Happy to review a fresh rebase on dev.

@lidge-jun lidge-jun closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants