Repository navigation
feat: CI-only モード向けの個人 sandbox ツーリング - #204
Merged
Merged
Conversation
This was referenced Dec 2, 2026
h13
force-pushed
the
feat/192-personal-sandbox
branch
from
December 2, 2026 10:34
eb86397 to
2be6159
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #192
概要
CI-only モード(共有デプロイ ID を CI/CD 専用に制限する構成)の開発者が、共有トークンなしで手元開発を完結できる個人 sandbox ツーリングを追加する。
scripts/init-sandbox.sh: 個人アカウントの clasp 認証で個人用 Apps Script プロジェクトを作成し.clasp-sandbox.json(gitignored)を書く。--title/--typeは init.sh と同じ。CI 変数設定・GCP 紐付けはしないscripts/sandbox-push.sh+pnpm run sandbox: check → build →clasp -P .clasp-sandbox.json push -f。-P指定のため.clasp.jsonには触れない(Permissive 開発者の deploy 用コピーを壊さない)FLEET_DEPLOY_ACCOUNT設定時、clasp show-authorized-user --jsonの email と比較し、共有デプロイアカウントで認証中なら警告して停止。email が取得できない場合は警告のみで続行(fail-open)。Permissive のdeploy経路には影響しない.gitignore:.clasp-sandbox.jsonを追加.templatesyncignore: 新規スクリプト 2 本を whitelist に追加clasp -P .clasp-sandbox.json run/logs/open-scriptの使い方を記載Acceptance Criteria との対応
clasp run/logs/openまで完結できる → README 記載のフロー(clasp login→init-sandbox.sh→pnpm run sandbox→-Pサブコマンド).clasp-sandbox.jsonが commit されない → .gitignore 追加templatesyncignore_checkが通る → 新規スクリプトを whitelist に追加(本 PR の CI で検証)FLEET_DEPLOY_ACCOUNTと一致するアカウントで認証している場合、sandbox 用 push が停止する → ガード実装Test Plan
bash -n/ shellcheck 両スクリプトでエラーなしpnpm run check(lint / typecheck / test、coverage 100%)+pnpm run buildグリーン.clasp-sandbox.json不在時に sandbox-push が明確なエラーで停止することを確認FLEET_DEPLOY_ACCOUNT一致(大文字小文字差あり)で exit 1、不一致で通過clasp -P run/logsはレビュー時に確認いただきたい(当方の認証では実行していない)備考
sandboxを採用(devは「dev 環境に出す」と誤読されるため回避)-u/--user(named credentials)もあるが、本 PR では既定ユーザーのみ使用。named user の活用は CI-only Deploy Identity + Personal Sandbox — 実装トラッキング #197 の Open Question(優先度低)のまま