Skip to content

feat(cloudkit): commit schema source of truth + MS SavedGame; fix ck:schema live-run bugs (#455) - #464

Merged
wei18 merged 2 commits into
mainfrom
feat/455-cloudkit-schema
Jun 10, 2026
Merged

wei18 merged 2 commits into
mainfrom
feat/455-cloudkit-schema

Conversation

@wei18

@wei18 wei18 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

First real-token run of ck:schema — the #337 tooling had three never-live-tested bugs, all fixed; both containers' schema committed as source of truth.

Task fixes (verified live)

  • save-token: positional arg only (stdin piping → "Interaction was required")
  • validate-schema: --environment is required
  • production deploy is not scriptable: import-schema is development-only, no promote subcommand exists → task now prints the CloudKit Console steps and exits (promotion stays user-owned by construction)

Schema

  • minesweeper.ckdb (new): MonetizationState (all 5 app-writable fields) + SavedGame per feat(minesweeper): saved-game store (snapshot↔CloudKit, MS-native summary) (#455) #463 (minimal indexes: status QUERYABLE only — prod indexes are add-only, start minimal)
  • sudoku.ckdb (new, exported from Dev): +3 MonetizationState fields the code writes but Production lacks (lastShownDate/dismissedDate/lastSeenWallClock) — discovered via prod-vs-code field audit; banner-dismiss persistence has been silently failing in prod (JIT schema never runs in Production)
  • Both validated + deployed to Development + round-trip-export verified. Production promotion = user clicks "Deploy Schema Changes to Production…" in Console (both containers).

README workflow + cloudkit-schema-ops skill updated (new Live-run gotchas section, 6 findings). Refs #455.

🤖 Generated with Claude Code

wei18 and others added 2 commits June 10, 2026 16:33
…schema live-run bugs (#455)

First real-token run of ck:schema (#337 tooling was never live-tested). Three task bugs fixed:
- save-token: cktool takes the token as positional arg only (stdin piping fails non-interactively)
- validate-schema: --environment is required
- production deploy: import-schema is development-only and cktool has NO promote subcommand -> the task now prints the Console-only steps (Deploy Schema Changes to Production...) and exits; promotion stays naturally user-owned

Schema source of truth committed (validated + deployed to both Development containers, round-trip export verified):
- cloudkit/minesweeper.ckdb (NEW): MonetizationState (all 5 app-writable fields) + SavedGame per #463 (8 fields; minimal indexes — status QUERYABLE only)
- cloudkit/sudoku.ckdb (NEW, exported): + 3 MonetizationState fields the code writes but Production lacked (lastShownDate/dismissedDate/lastSeenWallClock) — banner-dismiss persistence was silently failing in prod (JIT schema never runs in Production)

cloudkit/README.md workflow updated (hand-author path + Console-only promote); cloudkit-schema-ops SKILL gains a Live-run gotchas section (6 findings).

Co-Authored-By: Claude Fable 5 <[email protected]>
…ctions, fix index-contract comment

CR (APPROVE-WITH-NITS) findings applied:
- 5 docs still instructed the dead 'deploy --env production --i-am-sure' (foundations §7.7.2 table+guard prose, both app-store review checklists, skills index ×3) → rewritten to the Console-only promote; MS checklist marked done (prod == .ckdb verified 2026-06-10)
- #MISE description no longer advertises the removed gate; --i-am-sure kept as documented legacy no-op so old commands degrade to instructions
- usage() sed range made robust (2,/^set /p + grep) — was printing code lines into --help
- MinesweeperSavedGameStore index-contract comment no longer claims recordName QUERYABLE (contradicted the .ckdb; Sudoku+MS Production now both run statusEquals without it)

Both Production containers verified byte-identical to cloudkit/*.ckdb after the user's Console promote.

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 merged commit 3495888 into main Jun 10, 2026
4 checks passed
@wei18
wei18 deleted the feat/455-cloudkit-schema branch June 10, 2026 09:24
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