Repository navigation
feat(asc): automate CloudKit schema deploy via xcrun cktool (Dev→Production, gated) (#337) - #350
Merged
Merged
Conversation
Wrap `xcrun cktool` as a `ck:schema` mise-task so the CloudKit Development→Production schema deploy becomes a commit-trackable, Leader-orderable step — mirroring ASCRegister for ASC metadata / GC. - mise-tasks/ck/schema: export / validate / deploy subcommands. Auth via CK_MANAGEMENT_TOKEN from secrets/.env (never printed/committed, fed to cktool save-token via stdin). Container IDs (public) hardcoded per --app sudoku|minesweeper. - Production deploy is USER-OWNED: gated behind a printed confirm gate + mandatory --i-am-sure flag (refuses otherwise). No live Production deploy performed — automation + docs only. - cloudkit/README.md: schema-source-of-truth location + seed/deploy flow. Actual .ckdb files seeded by user (needs live token + populated Dev container); intentionally absent from this PR. - secrets/.env.example + secrets/README.md: CK_MANAGEMENT_TOKEN / CK_TEAM_ID placeholders. - docs/foundations.md §7.7.2: command surface, Production guard, auth posture. - review docs: point the Production-schema gate at the new task (still user-owned). Co-Authored-By: Claude Opus 4.8 <[email protected]>
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 #337.
mise run ck:schema <export|validate|deploy> --app sudoku|minesweeper [--env development|production] [--i-am-sure]wrappingxcrun cktool. Management token fromsecrets/.env(never argv/echoed); Production deploy gated behind--i-am-sure(else exit 2);developmentis the safe default.Prereqs verified by Leader against live cktool: subcommands (export-schema/import-schema/validate-schema/save-token) + flags (--team-id/--container-id/--environment/--file/--output-file/--validate) match; verb→subcommand mapping correct; container IDs correct; bash -n clean.
CR (security-focused): APPROVE-WITH-NITS — token never in argv/echoed, no set -x, Production guard bypass-resistant, secrets/** gitignored (only .env.example committed), no .ckdb committed. Leader inline-fixed the Med+2Low (one coherent edit): added
trap … remove-token … EXITso the Production-capable token is purged on exit; replaced bogus--quiet+ here-string fallback with single stdinsave-token --force(fixes the re-run overwrite hang). Does NOT run live Production deploy (user-owned).🤖 Generated with Claude Code