From 8b2bd8ea910d7512700db1b4ad721c96c9e3124f Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 16:36:54 -0400 Subject: [PATCH 01/13] feat: add validated asynchronous local game persistence --- apps/mobile/src/local/save.ts | 134 ++++++++++++ apps/mobile/src/local/store.ts | 115 ++++++++++ packages/game-engine/src/game.ts | 2 +- packages/game-engine/src/index.ts | 2 + .../tests/nativePersistence.test.ts | 200 ++++++++++++++++++ 5 files changed, 452 insertions(+), 1 deletion(-) create mode 100644 apps/mobile/src/local/save.ts create mode 100644 apps/mobile/src/local/store.ts create mode 100644 packages/game-engine/tests/nativePersistence.test.ts diff --git a/apps/mobile/src/local/save.ts b/apps/mobile/src/local/save.ts new file mode 100644 index 0000000..e036e14 --- /dev/null +++ b/apps/mobile/src/local/save.ts @@ -0,0 +1,134 @@ +import { calculateTotal, calculateMaxPossibleScore, getCategories, getMaxCategoryScore, type CategoryId, type GameLog, type HighScores, type WireGame } from "@yahtzee/game-engine"; + +export const SAVE_KEY = "hemsoft-local-dice-v1"; +export const MODES = [5, 6, 8, 10] as const; +export interface Preferences { + name: string; + recentNames: string[]; + appearance: "system" | "light" | "dark"; + diceCount: number; + aiOpponents: number; +} +export interface ActiveGame { game: WireGame; revision: number; startedAt: string } +export interface LocalSave { + schemaVersion: 1; + rulesVersion: 2; + preferences: Preferences; + active: ActiveGame | null; + history: GameLog; + highScores: HighScores; +} + +export function emptySave(): LocalSave { + return { schemaVersion: 1, rulesVersion: 2, + preferences: { name: "", recentNames: [], appearance: "system", diceCount: 5, aiOpponents: 0 }, + active: null, history: { entries: [] }, highScores: { entries: [] } }; +} +function object(value: unknown): value is Record { + return typeof value === "object" && value !== null && !Array.isArray(value); +} +function integer(value: unknown, low: number, high: number): value is number { + return typeof value === "number" && Number.isSafeInteger(value) && value >= low && value <= high; +} +function text(value: unknown, max = 100): value is string { + return typeof value === "string" && value.trim().length > 0 && value.length <= max && Array.from(value).every((char) => char.charCodeAt(0) >= 32 && char.charCodeAt(0) !== 127); +} +function mode(value: unknown): value is number { return typeof value === "number" && MODES.some((n) => n === value); } +function date(value: unknown): value is string { + return typeof value === "string" && Number.isFinite(Date.parse(value)) && new Date(value).toISOString() === value; +} +function unique(values: unknown[]): boolean { return new Set(values).size === values.length; } + +export function validPreferences(value: unknown): value is Preferences { + if (!object(value)) return false; + const names = value.recentNames; + return (value.name === "" || text(value.name, 32)) && Array.isArray(names) && names.length <= 5 + && names.every((name) => text(name, 32)) && unique(names) + && ["system", "light", "dark"].includes(String(value.appearance)) + && mode(value.diceCount) && integer(value.aiOpponents, 0, 3); +} +function scorecard(value: unknown, diceCount: number, complete: boolean): boolean { + if (!object(value)) return false; + const allowed = getCategories(diceCount).map((category) => category.id as string); + const entries = Object.entries(value); + return (!complete || entries.length === allowed.length) && entries.every(([key, score]) => + allowed.includes(key) && integer(score, 0, getMaxCategoryScore(key as CategoryId, diceCount))); +} +function gamePlayers(value: unknown, diceCount: number, round: number, finished: boolean): boolean { + if (!Array.isArray(value) || value.length < 1 || value.length > 4) return false; + return value.every((player, index) => object(player) && text(player.id) && text(player.name, 32) + && player.isAi === (index !== 0) && scorecard(player.scores, diceCount, finished) + && (finished || Object.keys(player.scores as object).length === round - 1)) + && unique(value.map((player: Record) => player.id)); +} +function gameDice(value: Record, diceCount: number): boolean { + return Array.isArray(value.dice) && value.dice.length === diceCount && value.dice.every((die) => integer(die, 1, 6)) + && Array.isArray(value.held) && value.held.length <= diceCount && unique(value.held) + && value.held.every((index) => integer(index, 0, diceCount - 1)); +} +function wireGame(value: unknown): boolean { + if (!object(value) || !mode(value.diceCount)) return false; + const rounds = getCategories(value.diceCount).length; + if (!integer(value.currentRound, 1, rounds) || !["playing", "finished"].includes(String(value.status))) return false; + if (!gamePlayers(value.players, value.diceCount, value.currentRound, value.status === "finished")) return false; + const players = value.players as unknown[]; + return text(value.id) && value.maxRolls === 3 && value.totalRounds === rounds && integer(value.rollsLeft, 0, value.status === "finished" ? 3 : 2) + && integer(value.currentPlayerIndex, 0, players.length - 1) + && (value.status === "finished" ? value.currentRound === rounds : value.currentPlayerIndex === 0) + && gameDice(value, value.diceCount); +} +function activeGame(value: unknown): boolean { + return value === null || (object(value) && wireGame(value.game) + && integer(value.revision, 0, Number.MAX_SAFE_INTEGER) && date(value.startedAt)); +} +function resultPlayer(value: unknown, diceCount: number): boolean { + if (!object(value) || !text(value.name, 32) || typeof value.isAi !== "boolean" || !scorecard(value.scores, diceCount, true)) return false; + return value.score === calculateTotal({ id: "saved", name: value.name, scores: value.scores as Partial> }, diceCount).grandTotal; +} +function result(value: unknown): boolean { + if (!object(value) || !mode(value.diceCount) || !Array.isArray(value.players)) return false; + const diceCount = value.diceCount; + return text(value.id) && date(value.startedAt) && date(value.completedAt) && integer(value.durationSeconds, 0, Number.MAX_SAFE_INTEGER) + && value.players.length >= 1 && value.players.length <= 4 && value.players.every((player) => resultPlayer(player, diceCount)) + && value.players.some((player: Record) => player.name === value.winnerName); +} +function highScore(value: unknown): boolean { + if (!object(value) || !mode(value.diceCount)) return false; + return text(value.gameId) && text(value.playerName, 32) && typeof value.isAi === "boolean" && date(value.dateRecorded) + && integer(value.score, 0, calculateMaxPossibleScore({ id: "saved", name: "saved", scores: {} }, value.diceCount)) && integer(value.rankOriginal, 1, 10) && integer(value.rankCurrent, 1, 10); +} +function results(value: Record): boolean { + if (!object(value.history) || !object(value.highScores)) return false; + const history = value.history.entries, scores = value.highScores.entries; + if (!Array.isArray(history) || history.length > 500 || !history.every(result)) return false; + if (!Array.isArray(scores) || scores.length > 40 || !scores.every(highScore)) return false; + if (!unique(history.map((entry: Record) => entry.id))) return false; + if (!unique(scores.map((entry: Record) => JSON.stringify([entry.gameId, entry.playerName, entry.isAi])))) return false; + return MODES.every((diceCount) => { + const rows = scores.filter((entry: Record) => entry.diceCount === diceCount); + return rows.length <= 10 && rows.every((entry: Record, i) => entry.rankCurrent === i + 1 && (i === 0 || rows[i - 1].score >= entry.score)); + }); +} + +/** Never repair an unknown or damaged document by overwriting it with defaults. */ +export function decodeSave(raw: string): LocalSave { + if (raw.length > 4_000_000) throw new Error("Local save is too large. Your data has not been changed."); + const value: unknown = JSON.parse(raw); + if (!object(value) || value.schemaVersion !== 1 || value.rulesVersion !== 2 || !validPreferences(value.preferences) + || !activeGame(value.active) || !results(value)) throw new Error("Local save is damaged or uses unsupported rules. Your data has not been changed."); + const save = value as unknown as LocalSave; + if (save.active) { + const recorded = save.history.entries.some((entry) => entry.id === save.active!.game.id); + if ((save.active.game.status === "finished") !== recorded) throw new Error("Active game and completion record disagree. Your data has not been changed."); + } + return save; +} + +/** One-time migration of the old native client's local preferences, not server results. */ +export function migratePreferences(namesRaw: string | null, appearanceRaw: string | null): LocalSave { + const save = emptySave(); + const names: unknown = namesRaw === null ? [] : JSON.parse(namesRaw); + const preferences = { ...save.preferences, recentNames: names, appearance: appearanceRaw ?? "system" }; + if (!validPreferences(preferences)) throw new Error("Saved preferences could not be read. Your data has not been changed."); + return { ...save, preferences: { ...preferences, name: preferences.recentNames[0] ?? "" } }; +} diff --git a/apps/mobile/src/local/store.ts b/apps/mobile/src/local/store.ts new file mode 100644 index 0000000..4b79b12 --- /dev/null +++ b/apps/mobile/src/local/store.ts @@ -0,0 +1,115 @@ +import { addGameLogEntry, applySessionMove, fromWire, newSessionGame, updateHighScores, type Move } from "@yahtzee/game-engine"; +import { decodeSave, emptySave, migratePreferences, MODES, SAVE_KEY, validPreferences, type LocalSave, type Preferences } from "./save"; + +export interface StoragePort { + getItem(key: string): Promise; + setItem(key: string, value: string): Promise; + removeItem(key: string): Promise; +} +export interface LocalView { + data: LocalSave | null; + busy: boolean; + error: string | null; + canRetry: boolean; +} +type Pending = { data: LocalSave; bytes: string; reset: boolean }; +type Start = { name: string; diceCount: number; aiOpponents: number }; +const LEGACY_KEYS = ["yahtzee-recent-names", "yahtzee-theme"]; +const clone = (value: T): T => JSON.parse(JSON.stringify(value)) as T; + +function begin(data: LocalSave, options: Start, id: string): LocalSave { + const name = options.name.trim(); + const preferences = { ...data.preferences, ...options, name, + recentNames: [name, ...data.preferences.recentNames.filter((entry) => entry !== name)].slice(0, 5) }; + if (!name || !validPreferences(preferences) || !MODES.some((mode) => mode === options.diceCount)) throw new Error("Choose a supported mode and a name of 1 to 32 characters."); + if (data.active) throw new Error("Resume or discard the saved game before starting another."); + if (data.history.entries.some((entry) => entry.id === id) || data.highScores.entries.some((entry) => entry.gameId === id)) throw new Error("Could not create a unique game. Try again."); + const game = newSessionGame(name, options.diceCount, options.aiOpponents); + game.id = id; + return { ...data, preferences, active: { game, revision: 0, startedAt: new Date().toISOString() } }; +} +function nextMove(data: LocalSave, move: Move): LocalSave { + if (!data.active) throw new Error("No saved game is active."); + const game = applySessionMove(data.active.game, move); + const active = { ...data.active, game, revision: data.active.revision + 1 }; + if (game.status !== "finished") return { ...data, active }; + if (data.history.entries.some((entry) => entry.id === game.id)) throw new Error("This result has already been saved."); + const state = fromWire(game); + const history = addGameLogEntry(data.history, state, active.startedAt); + history.entries = history.entries.slice(-500); + // A wall-clock correction must not make a valid result unreadable. + history.entries.at(-1)!.durationSeconds = Math.max(0, history.entries.at(-1)!.durationSeconds); + return { ...data, active, history, highScores: updateHighScores(data.highScores, state) }; +} + +/** Acknowledgment follows one complete document write. Failed writes retain exact bytes for retry. */ +export function createLocalStore(storage: StoragePort, newId = () => `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`) { + let view: LocalView = { data: null, busy: false, error: null, canRetry: false }; + let pending: Pending | null = null; + const listeners = new Set<() => void>(); + const publish = (patch: Partial) => { + view = { ...view, ...patch }; + for (const listener of listeners) listener(); + }; + const stage = (data: LocalSave, reset = false) => { + const bytes = JSON.stringify(data); + pending = { data: decodeSave(bytes), bytes, reset }; + }; + const writePending = async () => { + if (!pending) throw new Error("No save is waiting to be retried."); + const transaction = pending; + if (transaction.reset) for (const key of LEGACY_KEYS) await storage.removeItem(key); + await storage.setItem(SAVE_KEY, transaction.bytes); + pending = null; + publish({ data: transaction.data, error: null, canRetry: false }); + }; + const attempt = async (operation: () => Promise): Promise => { + if (view.busy) return false; + publish({ busy: true, error: null }); + try { + await operation(); + return true; + } catch (error) { + publish({ error: error instanceof Error ? error.message : "Local storage is unavailable.", canRetry: pending !== null }); + return false; + } finally { publish({ busy: false }); } + }; + const update = (build: (data: LocalSave) => LocalSave) => attempt(async () => { + if (pending) throw new Error("Retry the pending save or reload the last saved data first."); + if (!view.data) throw new Error("Saved data is not available. Retry loading or choose an explicit reset."); + stage(build(clone(view.data))); + await writePending(); + }); + const load = () => attempt(async () => { + // Explicit reload abandons an unacknowledged in-memory move, never the saved document. + pending = null; + publish({ data: null, canRetry: false }); + const raw = await storage.getItem(SAVE_KEY); + if (raw !== null) { + const data = decodeSave(raw); + pending = null; + publish({ data, canRetry: false }); + return; + } + const data = migratePreferences(await storage.getItem(LEGACY_KEYS[0]), await storage.getItem(LEGACY_KEYS[1])); + stage(data); + await writePending(); + }); + return { + load, + getSnapshot: () => view, + subscribe: (listener: () => void) => { listeners.add(listener); return () => { listeners.delete(listener); }; }, + start: (options: Start) => update((data) => begin(data, options, newId())), + move: (move: Move) => update((data) => nextMove(data, move)), + retry: () => attempt(writePending), + discard: () => update((data) => ({ ...data, active: null })), + preferences: (patch: Partial) => update((data) => { + const preferences = { ...data.preferences, ...patch }; + if (!validPreferences(preferences)) throw new Error("Invalid local preferences."); + return { ...data, preferences }; + }), + // The UI must confirm deletion of games, results, names and preferences first. + resetAll: () => attempt(async () => { stage(emptySave(), true); await writePending(); }), + }; +} +export type LocalStore = ReturnType; diff --git a/packages/game-engine/src/game.ts b/packages/game-engine/src/game.ts index 6e759f8..9519139 100644 --- a/packages/game-engine/src/game.ts +++ b/packages/game-engine/src/game.ts @@ -116,7 +116,7 @@ const MAX_SCORE_TABLE: Record = { "maxi-yahtzee": 100, }; -function getMaxCategoryScore(catId: CategoryId, diceCount: number): number { +export function getMaxCategoryScore(catId: CategoryId, diceCount: number): number { const entry = MAX_SCORE_TABLE[catId]; return typeof entry === "function" ? entry(diceCount) : entry; } diff --git a/packages/game-engine/src/index.ts b/packages/game-engine/src/index.ts index 43a89e4..9b5a328 100644 --- a/packages/game-engine/src/index.ts +++ b/packages/game-engine/src/index.ts @@ -1,4 +1,5 @@ export { createOfflineBackend } from "./offline"; +export { newSessionGame, applySessionMove, fromWire, toWire, type WireGame, type Move } from "./session"; export { rollDie, rollDice, reroll } from "./dice"; export { upperScore, @@ -31,6 +32,7 @@ export { createGame, calculateTotal, calculateMaxPossibleScore, + getMaxCategoryScore, getUpperBonus, isGameComplete, getAvailableCategories, diff --git a/packages/game-engine/tests/nativePersistence.test.ts b/packages/game-engine/tests/nativePersistence.test.ts new file mode 100644 index 0000000..e36361d --- /dev/null +++ b/packages/game-engine/tests/nativePersistence.test.ts @@ -0,0 +1,200 @@ +import { describe, expect, test } from "bun:test"; +import { createLocalStore, type StoragePort } from "../../../apps/mobile/src/local/store"; +import { decodeSave, emptySave, migratePreferences, SAVE_KEY } from "../../../apps/mobile/src/local/save"; +import { getCategories } from "../src/scoring"; + +function fixture(initial: Record = {}) { + const values = new Map(Object.entries(initial)); + const state = { fail: null as "before" | "after" | null, readFailure: false, removeFailure: false, pause: Promise.resolve(), attempts: [] as string[] }; + const port: StoragePort = { + async getItem(key) { if (state.readFailure) throw new Error("Storage cannot be read"); return values.get(key) ?? null; }, + async setItem(key, value) { + state.attempts.push(value); await state.pause; + if (state.fail === "before") throw new Error("Storage full"); + values.set(key, value); + if (state.fail === "after") throw new Error("Write acknowledgment lost"); + }, + async removeItem(key) { if (state.removeFailure) throw new Error("Removal failed"); values.delete(key); }, + }; + let id = 0; + return { values, state, port, store: createLocalStore(port, () => `local-${++id}`), recreate: () => createLocalStore(port, () => `local-${++id}`) }; +} +const options = { name: "Guest", diceCount: 5, aiOpponents: 0 }; +const clone = (value: T): T => JSON.parse(JSON.stringify(value)) as T; + +describe("durable native storage boundary, without a native-runtime claim", () => { + test("migrates only legacy local preferences and preserves their original keys", async () => { + const f = fixture({ "yahtzee-recent-names": '["Ada","Lin"]', "yahtzee-theme": "dark" }); + let notices = 0; + const unsubscribe = f.store.subscribe(() => { notices++; }); + expect(await f.store.load()).toBe(true); + expect(f.store.getSnapshot().data?.preferences.name).toBe("Ada"); + expect(f.store.getSnapshot().data?.preferences.appearance).toBe("dark"); + expect(f.values.get("yahtzee-recent-names")).toBe('["Ada","Lin"]'); + expect(f.store.getSnapshot().data?.history.entries).toEqual([]); + expect(notices).toBeGreaterThan(0); unsubscribe(); + expect(await f.store.preferences({ appearance: "system", diceCount: 10 })).toBe(true); + const restarted = f.recreate(); await restarted.load(); + expect(restarted.getSnapshot().data?.preferences.diceCount).toBe(10); + expect(await restarted.preferences({ appearance: "purple" } as never)).toBe(false); + }); + + test("acknowledged dice, holds, rolls and revision survive process recreation", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + expect(await f.store.move({ kind: "hold", index: 0 })).toBe(true); + const held = f.store.getSnapshot().data!.active!.game.dice[0]; + expect(await f.store.move({ kind: "roll" })).toBe(true); + const saved = clone(f.store.getSnapshot().data!); + expect(saved.active!.game.dice[0]).toBe(held); + expect(saved.active!.game.held).toEqual([0]); + expect(saved.active!.revision).toBe(2); + const resumed = f.recreate(); expect(await resumed.load()).toBe(true); + expect(resumed.getSnapshot().data).toEqual(saved); + expect(await resumed.start(options)).toBe(false); + expect(await resumed.discard()).toBe(true); + expect(await resumed.start({ ...options, name: "Next" })).toBe(true); + }); + + test("failed writes block other moves and retry the exact staged bytes", async () => { + const f = fixture(); await f.store.load(); await f.store.start({ ...options, aiOpponents: 3 }); + const before = clone(f.store.getSnapshot().data!); + f.state.fail = "before"; + expect(await f.store.move({ kind: "score", category: "chance" })).toBe(false); + const staged = f.state.attempts.at(-1)!; + expect(f.store.getSnapshot().data).toEqual(before); + expect(await f.store.move({ kind: "roll" })).toBe(false); + expect(f.store.getSnapshot().canRetry).toBe(true); + f.state.fail = null; + expect(await f.store.retry()).toBe(true); + expect(f.state.attempts.at(-1)).toBe(staged); + expect(f.store.getSnapshot().data).toEqual(JSON.parse(staged)); + expect(await f.store.retry()).toBe(false); + }); + + test("slow saves reject overlapping actions rather than racing acknowledged state", async () => { + const f = fixture(); await f.store.load(); + let release!: () => void; + f.state.pause = new Promise((resolve) => { release = resolve; }); + const starting = f.store.start(options); + expect(f.store.getSnapshot().busy).toBe(true); + expect(await f.store.start(options)).toBe(false); + expect(f.store.getSnapshot().data?.active).toBeNull(); + release(); expect(await starting).toBe(true); + expect(f.store.getSnapshot().data?.active?.revision).toBe(0); + }); + + for (const diceCount of [5, 6, 8, 10]) for (const aiOpponents of [0, 3]) { + test(`${diceCount} dice / ${aiOpponents} AI completes once after a write-then-error and restart`, async () => { + const f = fixture(); await f.store.load(); + expect(await f.store.start({ ...options, diceCount, aiOpponents })).toBe(true); + const categories = getCategories(diceCount); + for (const category of categories.slice(0, -1)) expect(await f.store.move({ kind: "score", category: category.id })).toBe(true); + f.state.fail = "after"; + expect(await f.store.move({ kind: "score", category: categories.at(-1)!.id })).toBe(false); + expect(f.store.getSnapshot().error).toBe("Write acknowledgment lost"); + expect(f.store.getSnapshot().canRetry).toBe(true); + const exactBytes = f.values.get(SAVE_KEY)!; + f.state.fail = null; + const restarted = f.recreate(); expect(await restarted.load()).toBe(true); + const saved = restarted.getSnapshot().data!; + expect(saved.active?.game.status).toBe("finished"); + expect(saved.history.entries).toHaveLength(1); + expect(saved.highScores.entries).toHaveLength(aiOpponents + 1); + expect(await restarted.move({ kind: "roll" })).toBe(false); + expect(f.values.get(SAVE_KEY)).toBe(exactBytes); + expect(await f.store.retry()).toBe(true); + expect(f.values.get(SAVE_KEY)).toBe(exactBytes); + expect(await restarted.discard()).toBe(true); + expect(restarted.getSnapshot().data?.history.entries).toHaveLength(1); + }); + } + + test("unavailable and corrupt storage never become an implicit empty save", async () => { + const damaged = '{"schemaVersion":999}'; + const f = fixture({ [SAVE_KEY]: damaged }); + expect(await f.store.load()).toBe(false); + expect(await f.store.start(options)).toBe(false); + expect(f.values.get(SAVE_KEY)).toBe(damaged); + expect(f.state.attempts).toHaveLength(0); + expect(await f.store.resetAll()).toBe(true); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + f.state.readFailure = true; + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().data).toBeNull(); + expect(await f.store.start(options)).toBe(false); + f.state.readFailure = false; + expect(await f.store.load()).toBe(true); + }); + + test("a failed first save or explicit reset can be retried without losing unapproved data", async () => { + const f = fixture({ "yahtzee-theme": "dark" }); + f.state.fail = "before"; + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().canRetry).toBe(true); + expect(f.values.get("yahtzee-theme")).toBe("dark"); + f.state.fail = null; expect(await f.store.retry()).toBe(true); + await f.store.start(options); + f.state.removeFailure = true; + expect(await f.store.resetAll()).toBe(false); + expect(f.store.getSnapshot().data?.active).not.toBeNull(); + f.state.removeFailure = false; + expect(await f.store.retry()).toBe(true); + expect(f.values.has("yahtzee-theme")).toBe(false); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + }); + + test("explicit reload abandons only the unacknowledged move and honors the actual saved document", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const before = f.values.get(SAVE_KEY); + f.state.fail = "before"; await f.store.move({ kind: "roll" }); + f.state.fail = null; + expect(await f.store.load()).toBe(true); + expect(f.store.getSnapshot().canRetry).toBe(false); + expect(JSON.stringify(f.store.getSnapshot().data)).toBe(before); + for (const patch of [{ name: " " }, { name: "x".repeat(33) }, { diceCount: 2 }, { aiOpponents: 4 }]) { + await f.store.discard(); expect(await f.store.start({ ...options, ...patch })).toBe(false); + } + expect(await f.store.move({ kind: "roll" })).toBe(false); + }); + + test("keeps history at 500 and per-mode scores at ten without reusing a completed ID", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + for (const category of getCategories(5)) await f.store.move({ kind: "score", category: category.id }); + const saved = clone(f.store.getSnapshot().data!); + expect(() => decodeSave(JSON.stringify({ ...saved, history: { entries: [] } }))).toThrow("disagree"); + saved.active = null; + const entry = saved.history.entries[0], score = saved.highScores.entries[0]; + saved.history.entries = Array.from({ length: 500 }, (_, i) => ({ ...entry, id: `history-${i}` })); + saved.highScores.entries = Array.from({ length: 10 }, (_, i) => ({ ...score, gameId: `score-${i}`, rankCurrent: i + 1 })); + f.values.set(SAVE_KEY, JSON.stringify(saved)); + const duplicate = createLocalStore(f.port, () => "history-0"); await duplicate.load(); + expect(await duplicate.start(options)).toBe(false); + expect(duplicate.getSnapshot().error).toContain("unique game"); + const next = f.recreate(); expect(await next.load()).toBe(true); + expect(await next.start(options)).toBe(true); + for (const category of getCategories(5)) expect(await next.move({ kind: "score", category: category.id })).toBe(true); + expect(next.getSnapshot().data?.history.entries).toHaveLength(500); + expect(next.getSnapshot().data?.history.entries[0].id).toBe("history-1"); + expect(next.getSnapshot().data?.highScores.entries).toHaveLength(10); + expect(() => decodeSave(JSON.stringify({ ...saved, history: { entries: [...saved.history.entries, entry] } }))).toThrow(); + expect(() => decodeSave(JSON.stringify({ ...saved, highScores: { entries: [...saved.highScores.entries, { ...score, gameId: "eleventh" }] } }))).toThrow(); + }); + + test("restore rejects malformed, unsupported and out-of-bounds state without mutating it", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const save = f.store.getSnapshot().data!; + const variants = [ + { ...save, rulesVersion: 1 }, { ...save, schemaVersion: 2 }, + { ...save, preferences: { ...save.preferences, recentNames: ["Ada", "Ada"] } }, + { ...save, active: { ...save.active, revision: -1 } }, + { ...save, active: { ...save.active, game: { ...save.active!.game, held: [0, 0] } } }, + { ...save, active: { ...save.active, game: { ...save.active!.game, dice: [9] } } }, + { ...save, active: { ...save.active, game: { ...save.active!.game, currentRound: 99 } } }, + { ...save, history: { entries: [null] } }, { ...save, highScores: { entries: [null] } }, + ]; + for (const value of [null, [], ...variants]) expect(() => decodeSave(JSON.stringify(value))).toThrow(); + expect(() => decodeSave(" ".repeat(4_000_001))).toThrow("too large"); + expect(() => migratePreferences('["bad\\nname"]', null)).toThrow(); + expect(() => migratePreferences('not JSON', null)).toThrow(); + }); +}); From f09486a937035a003669e129b7bf695177a28815 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 17:37:52 -0400 Subject: [PATCH 02/13] feat: wire native offline gameplay and recovery screens --- .../surfaces/apps-mobile-app-index-tsx.md | 13 + apps/mobile/app/_layout.tsx | 25 +- apps/mobile/app/help.tsx | 15 + apps/mobile/app/history.tsx | 9 + apps/mobile/app/index.tsx | 418 +----------------- apps/mobile/src/local/LocalProvider.tsx | 28 ++ apps/mobile/src/local/store.ts | 8 +- apps/mobile/src/screens/Dice.tsx | 33 ++ apps/mobile/src/screens/Help.tsx | 56 +++ apps/mobile/src/screens/History.tsx | 27 ++ apps/mobile/src/screens/NativeGameScreen.tsx | 53 +++ apps/mobile/src/screens/NativeScorecard.tsx | 57 +++ apps/mobile/src/screens/Play.tsx | 58 +++ apps/mobile/src/screens/Results.tsx | 36 ++ apps/mobile/src/screens/Setup.tsx | 48 ++ apps/mobile/src/ui/Choice.tsx | 25 ++ apps/mobile/src/ui/colors.ios.ts | 11 + apps/mobile/src/ui/colors.ts | 1 + apps/mobile/src/ui/confirmation.ios.ts | 6 + apps/mobile/src/ui/confirmation.ts | 3 + apps/mobile/src/ui/controls.tsx | 44 ++ apps/mobile/src/ui/palette.ts | 19 + apps/mobile/src/ui/showChoice.ios.ts | 8 + apps/mobile/src/ui/showChoice.ts | 4 + apps/mobile/src/ui/useConfirmation.tsx | 27 ++ docs/function-risk.md | 6 +- packages/game-engine/src/index.ts | 1 + packages/game-engine/src/presentation.ts | 17 + .../tests/nativePersistence.test.ts | 18 + packages/ui/src/Scorecard.tsx | 19 +- playwright.config.ts | 6 +- quality-baseline.json | 7 +- tests/clients/fixtures.ts | 76 ++++ tests/clients/journeys.spec.ts | 98 +--- tests/clients/mobile.tsx | 25 +- tests/clients/native-safe-area.tsx | 6 + tests/clients/native-storage.ts | 16 +- tests/clients/native.spec.ts | 139 ++++++ tests/clients/server.ts | 1 + tests/clients/tsconfig.json | 2 +- 40 files changed, 921 insertions(+), 548 deletions(-) create mode 100644 apps/mobile/.impeccable/surfaces/apps-mobile-app-index-tsx.md create mode 100644 apps/mobile/app/help.tsx create mode 100644 apps/mobile/app/history.tsx create mode 100644 apps/mobile/src/local/LocalProvider.tsx create mode 100644 apps/mobile/src/screens/Dice.tsx create mode 100644 apps/mobile/src/screens/Help.tsx create mode 100644 apps/mobile/src/screens/History.tsx create mode 100644 apps/mobile/src/screens/NativeGameScreen.tsx create mode 100644 apps/mobile/src/screens/NativeScorecard.tsx create mode 100644 apps/mobile/src/screens/Play.tsx create mode 100644 apps/mobile/src/screens/Results.tsx create mode 100644 apps/mobile/src/screens/Setup.tsx create mode 100644 apps/mobile/src/ui/Choice.tsx create mode 100644 apps/mobile/src/ui/colors.ios.ts create mode 100644 apps/mobile/src/ui/colors.ts create mode 100644 apps/mobile/src/ui/confirmation.ios.ts create mode 100644 apps/mobile/src/ui/confirmation.ts create mode 100644 apps/mobile/src/ui/controls.tsx create mode 100644 apps/mobile/src/ui/palette.ts create mode 100644 apps/mobile/src/ui/showChoice.ios.ts create mode 100644 apps/mobile/src/ui/showChoice.ts create mode 100644 apps/mobile/src/ui/useConfirmation.tsx create mode 100644 packages/game-engine/src/presentation.ts create mode 100644 tests/clients/fixtures.ts create mode 100644 tests/clients/native-safe-area.tsx create mode 100644 tests/clients/native.spec.ts diff --git a/apps/mobile/.impeccable/surfaces/apps-mobile-app-index-tsx.md b/apps/mobile/.impeccable/surfaces/apps-mobile-app-index-tsx.md new file mode 100644 index 0000000..62e8cc1 --- /dev/null +++ b/apps/mobile/.impeccable/surfaces/apps-mobile-app-index-tsx.md @@ -0,0 +1,13 @@ +# Native local game + +Mode: Operate. Target: Expo/React Native on iPhone and iPad. This is the separate native adaptation requested by issue #42, not a change to the desktop/web system. + +Use the established evergreen dice deck, porcelain pip faces and clay action color as the game-specific layer. Use system typography, scalable text, semantic iOS surfaces and text colors, native stack navigation, sheets/alerts and safe areas for the surrounding interface. Do not copy the desktop's dense table or shrink it to phone width. + +Compact windows use a vertical play/score flow with a reachable roll action. Expanded iPad windows separate the play controls from the score list. Window width and text scale determine that structure, not a hard-coded device name. All targets are at least 44 points; no fixed-height text containers or decorative permissions, sound, haptics or animation are required. + +The local store owns acknowledgment, retries and persistence. Show loading, corrupt/unavailable data, pending-write retry, explicit reload/reset, Resume/Discard and local-only result states. Never imply that a local score is server-verified. Keep one accessible score action per category and describe held/suggested states in words as well as color. + +The existing development name is not public branding approval. Support contacts, App Store IDs and final privacy/legal declarations remain unset until approved. Native simulator screenshots must identify their source commit and device; web-adapter tests are only supplemental coverage. Physical-device, VoiceOver, TestFlight and store acceptance remain separate. + +Verification is bounded: implement the complete flow, inspect a batched iPhone/iPad light/dark and large-text pass, fix the observed issues together, then one confirmation pass. Native functional failures still need diagnosis and regression tests; do not polish indefinitely. diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index a047438..5ca0dc4 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -1,15 +1,20 @@ import React from "react"; import { Stack } from "expo-router"; -import { ConvexProvider, ConvexReactClient } from "convex/react"; - -const url = process.env.EXPO_PUBLIC_CONVEX_URL; -if (!url) throw new Error("Missing EXPO_PUBLIC_CONVEX_URL environment variable"); -const convex = new ConvexReactClient(url); +import { StatusBar } from "expo-status-bar"; +import { LocalProvider, useLocalGame } from "../src/local/LocalProvider"; +function Navigation() { + const { colors, dark } = useLocalGame(); + return <> + + + + + + + ; +} export default function Layout() { - return ( - - - - ); + return ; } diff --git a/apps/mobile/app/help.tsx b/apps/mobile/app/help.tsx new file mode 100644 index 0000000..4cc52bb --- /dev/null +++ b/apps/mobile/app/help.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Stack, useRouter } from "expo-router"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { useLocalGame } from "../src/local/LocalProvider"; +import { Help } from "../src/screens/Help"; +import { Action } from "../src/ui/controls"; + +export default function HelpRoute() { + const { colors } = useLocalGame(); + const router = useRouter(); + return + router.back()} /> }} /> + + ; +} diff --git a/apps/mobile/app/history.tsx b/apps/mobile/app/history.tsx new file mode 100644 index 0000000..9930ca3 --- /dev/null +++ b/apps/mobile/app/history.tsx @@ -0,0 +1,9 @@ +import React from "react"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { useLocalGame } from "../src/local/LocalProvider"; +import { History } from "../src/screens/History"; + +export default function HistoryRoute() { + const { colors } = useLocalGame(); + return ; +} diff --git a/apps/mobile/app/index.tsx b/apps/mobile/app/index.tsx index b9a88e7..356fd95 100644 --- a/apps/mobile/app/index.tsx +++ b/apps/mobile/app/index.tsx @@ -1,416 +1,8 @@ -import React, { useState, useCallback, useEffect, useMemo } from "react"; -import { - View, - Text, - TouchableOpacity, - TextInput, - ScrollView, - StyleSheet, -} from "react-native"; -import AsyncStorage from "@react-native-async-storage/async-storage"; -import { useQuery, useMutation, useAction } from "convex/react"; -import { api } from "../../../convex/_generated/api"; -import { - getAvailableCategories, - calculateTotal, - calculateMaxPossibleScore, - pickAiCategory, - getCategories, - createEmptyGameLog, - type GameLog, - type GameLogEntry, -} from "@yahtzee/game-engine"; -import { lightTheme, darkTheme, useGameSession } from "@yahtzee/ui"; - -const DIE_FACES: Record = { - 1: "⚀", 2: "⚁", 3: "⚂", 4: "⚃", 5: "⚄", 6: "⚅", -}; - -type Screen = "setup" | "playing" | "finished"; +import React from "react"; +import { useRouter } from "expo-router"; +import { NativeGameScreen } from "../src/screens/NativeGameScreen"; export default function Index() { - const [screenState, setScreen] = useState("setup"); - const [playerName, setPlayerName] = useState(""); - const [recentNames, setRecentNames] = useState([]); - const [diceCount, setDiceCount] = useState(5); - const [aiOpponents, setAiOpponents] = useState(0); - const startGuest = useAction(api.gameSessions.start); - const moveGuest = useMutation(api.games.move); - const { game, busy, error, canRetry, retry, start, reset, - roll: handleRoll, toggleHold: handleToggleHold, selectCategory: handleSelectCategory, - } = useGameSession({ start: startGuest, move: moveGuest }); - const screen = screenState === "playing" && game?.status === "finished" ? "finished" : screenState; - const [themeMode, setThemeMode] = useState<"light" | "dark">("light"); - const theme = themeMode === "dark" ? darkTheme : lightTheme; - - useEffect(() => { - AsyncStorage.getItem("yahtzee-recent-names").then((raw) => { - if (raw) { - const names = JSON.parse(raw) as string[]; - setRecentNames(names); - if (names.length > 0) setPlayerName(names[0]); - } - }).catch(() => {}); - }, []); - - // Convex queries - const allGameLogs = useQuery(api.gameLogs.list, {}); - const activeDiceCount = game?.diceCount ?? diceCount; - const topScoresRaw = useQuery(api.highScores.top, { diceCount: activeDiceCount }); - - const gameLog: GameLog = useMemo(() => { - if (!allGameLogs) return createEmptyGameLog(); - return { - entries: allGameLogs.map((e): GameLogEntry => ({ - id: e.gameId, - diceCount: e.diceCount, - startedAt: e.startedAt, - completedAt: e.completedAt, - durationSeconds: e.durationSeconds, - players: e.players, - winnerName: e.winnerName, - })), - }; - }, [allGameLogs]); - - const highScoresForDice = useMemo( - () => (topScoresRaw ?? []), - [topScoresRaw] - ); - - - const toggleTheme = useCallback(() => { - setThemeMode((prev) => { - const next = prev === "light" ? "dark" : "light"; - AsyncStorage.setItem("yahtzee-theme", next).catch(() => {}); - return next; - }); - }, []); - - // Load theme preference on mount (theme stays local) - useEffect(() => { - (async () => { - try { - const themeRaw = await AsyncStorage.getItem("yahtzee-theme"); - if (themeRaw === "dark") setThemeMode("dark"); - } catch { /* A missing local preference uses the default light theme. */ } - })(); - }, []); - - const handleStartGame = useCallback(async () => { - const name = playerName.trim(); - if (await start({ name, diceCount, aiOpponents })) { - setScreen("playing"); - const updated = [name, ...recentNames.filter((entry) => entry !== name)].slice(0, 5); - setRecentNames(updated); - AsyncStorage.setItem("yahtzee-recent-names", JSON.stringify(updated)).catch(() => {}); - } - }, [playerName, diceCount, aiOpponents, recentNames, start]); - - const handleCancelGame = useCallback(() => { - reset(); setScreen("setup"); - }, [reset]); - - const currentPlayer = game?.players[game.currentPlayerIndex]; - const isHumanTurn = currentPlayer && !currentPlayer.isAi; - const canInteract = !!isHumanTurn && !busy && !canRetry; - const connectionStatus = - {busy && {game ? "Saving move..." : "Starting guest game..."}} - {error && {error}} - {canRetry && Retry move} - ; - - if (screen === "setup") { - return ( - - - {theme.mode === "light" ? "🌙" : "☀️"} - - 🎲 Yahtzee - {connectionStatus} - - {recentNames.length > 0 && ( - - {recentNames.map((name) => ( - setPlayerName(name)} - style={{ paddingHorizontal: 10, paddingVertical: 4, borderRadius: 12, borderWidth: 1, borderColor: playerName === name ? theme.accent : theme.border, backgroundColor: playerName === name ? theme.accentBg : theme.surface }} - > - {name} - - ))} - - )} - AI Opponents - - {[0, 1, 2, 3].map((n) => ( - setAiOpponents(n)} - > - - {n === 0 ? "Solo" : `${n} AI`} - - - ))} - - Dice Count - - {[5, 6, 8, 10].map((n) => ( - setDiceCount(n)} - > - {n} - - ))} - - - Start Game - - - ); - } - - if (screen === "finished" && game) { - const sorted = game.players.slice().sort((a, b) => calculateTotal(b, game.diceCount).grandTotal - calculateTotal(a, game.diceCount).grandTotal); - const topScores = highScoresForDice; - return ( - - Game Over! - {sorted.map((p, i) => { - const matching = gameLog.entries - .filter((e) => e.diceCount === game.diceCount) - .flatMap((e) => e.players) - .filter((pl) => pl.name === p.name); - const avg = matching.length === 0 ? 0 : Math.round(matching.reduce((sum, pl) => sum + pl.score, 0) / matching.length); - return ( - - - {i === 0 ? "🏆 " : `${i + 1}. `}{p.name}{p.isAi ? " 🤖" : ""}: {calculateTotal(p, game.diceCount).grandTotal} pts - - - (avg: {avg}) - - - ); - })} - - Play Again - - - {topScores.length > 0 && ( - - 🏅 High Scores ({game.diceCount} dice) - - - # - Player - Score - Date - - {topScores.map((hs) => ( - - {hs.rankCurrent} - - {hs.playerName}{hs.isAi ? " 🤖" : ""} - - {hs.score} - - {new Date(hs.dateRecorded).toLocaleDateString()} - - - ))} - - - )} - - ); - } - - if (!game) return null; - - const available = canInteract ? getAvailableCategories(game.players[game.currentPlayerIndex], game.diceCount) : []; - const hasRolled = game.rollsLeft < game.maxRolls; - const suggestedCategory = game && isHumanTurn && hasRolled - ? pickAiCategory(game.dice, game.players[game.currentPlayerIndex], game.diceCount) - : undefined; - - return ( - - {connectionStatus} - {/* Quit button */} - - ✕ Quit Game - - - - {currentPlayer?.name}'s turn · Round {Math.min(game.currentRound, game.totalRounds)}/{game.totalRounds} · Rolls: {game.rollsLeft} - - - {!isHumanTurn && ( - 🤖 AI is thinking... - )} - - - {game.dice.map((val, i) => ( - canInteract && handleToggleHold(i)} - disabled={!canInteract || game.rollsLeft === 0} - > - {val > 0 ? DIE_FACES[val] ?? val : "?"} - - ))} - - - 0 ? theme.primary : theme.disabledBg }, (!canInteract || game.rollsLeft <= 0) && styles.disabledBtn]} - accessibilityRole="button" - onPress={handleRoll} - disabled={!canInteract || game.rollsLeft <= 0} - > - - {game.rollsLeft === game.maxRolls ? "Roll Dice" : `Re-roll (${game.rollsLeft})`} - - - - {/* Multi-player scorecard */} - {available.length > 0 && hasRolled && ( - Click any highlighted row to place your score - )} - - - {/* Header row */} - {(() => { - const totals = game.players.map((p) => calculateTotal(p, game.diceCount)); - const scores = totals.map((t) => t.grandTotal); - const indexed = scores.map((s, i) => ({ i, s })).sort((a, b) => b.s - a.s); - const ranks = new Array(scores.length); - let rank = 1; - for (let j = 0; j < indexed.length; j++) { - if (j > 0 && indexed[j].s < indexed[j - 1].s) rank = j + 1; - ranks[indexed[j].i] = rank; - } - const lbScores = highScoresForDice.map((e) => e.score); - const maxScores = game.players.map((p) => calculateMaxPossibleScore(p, game.diceCount)); - const bestLbRanks = maxScores.map((max) => { - let r = 1; - for (const s of lbScores) { if (s > max) r++; else break; } - return r; - }); - return ( - - Category - {game.players.map((p, i) => ( - - {totals[i].grandTotal} pts - - #{ranks[i]} in game · best: #{bestLbRanks[i]} - - {p.name}{p.isAi ? " 🤖" : ""} - - ))} - - ); - })()} - - {getCategories(game.diceCount).map((cat) => { - const isAvailable = available.includes(cat.id) && hasRolled; - const isSuggested = suggestedCategory === cat.id && isAvailable; - return ( - isAvailable && handleSelectCategory(cat.id)} - disabled={!isAvailable} - > - - - {isSuggested ? "⭐ " : isAvailable ? "► " : ""}{cat.label} - - - {game.players.map((p, i) => { - const scored = p.scores[cat.id]; - const showPotential = i === game.currentPlayerIndex && isAvailable; - return ( - - - {scored !== undefined ? scored : showPotential ? cat.score(game.dice) : "—"} - - - ); - })} - - ); - })} - - {/* Grand total row */} - - Grand Total - {game.players.map((p) => ( - - {calculateTotal(p, game.diceCount).grandTotal} - - ))} - - - - - ); + const router = useRouter(); + return router.push("/history")} onHelp={() => router.push("/help")} />; } - -const styles = StyleSheet.create({ - container: { padding: 20, alignItems: "center", paddingTop: 60 }, - title: { fontSize: 32, fontWeight: "bold", marginBottom: 20 }, - subtitle: { fontSize: 16, marginBottom: 10 }, - input: { borderWidth: 1, borderRadius: 8, padding: 12, width: "100%", fontSize: 16, marginBottom: 16 }, - label: { fontWeight: "bold", marginBottom: 8 }, - presetRow: { flexDirection: "row", gap: 8, marginBottom: 20, flexWrap: "wrap", justifyContent: "center" }, - presetBtn: { paddingHorizontal: 20, paddingVertical: 10, borderRadius: 8, borderWidth: 2 }, - startBtn: { paddingHorizontal: 32, paddingVertical: 14, borderRadius: 8 }, - startBtnText: { color: "#fff", fontSize: 18, fontWeight: "bold" }, - disabledBtn: { opacity: 0.5 }, - quitBtn: { alignSelf: "flex-end", borderWidth: 1, borderRadius: 6, paddingHorizontal: 12, paddingVertical: 6, marginBottom: 10 }, - quitBtnText: { color: "#c62828", fontSize: 14 }, - aiThinking: { fontWeight: "bold", marginBottom: 8 }, - diceRow: { flexDirection: "row", flexWrap: "wrap", gap: 8, justifyContent: "center", marginBottom: 16 }, - die: { width: 56, height: 56, borderRadius: 10, borderWidth: 2, alignItems: "center", justifyContent: "center" }, - dieText: { fontSize: 28 }, - rollBtn: { paddingHorizontal: 32, paddingVertical: 12, borderRadius: 8, marginBottom: 20 }, - rollBtnText: { color: "#fff", fontSize: 16, fontWeight: "bold" }, - sheetRow: { flexDirection: "row", borderBottomWidth: 1 }, - catCol: { width: 140, paddingVertical: 8, paddingHorizontal: 8 }, - playerCol: { width: 80, paddingVertical: 8, paddingHorizontal: 4 }, - finalScore: { fontSize: 28, fontWeight: "bold", marginVertical: 8 }, -}); diff --git a/apps/mobile/src/local/LocalProvider.tsx b/apps/mobile/src/local/LocalProvider.tsx new file mode 100644 index 0000000..60f18e2 --- /dev/null +++ b/apps/mobile/src/local/LocalProvider.tsx @@ -0,0 +1,28 @@ +import React, { createContext, useContext, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from "react"; +import { Appearance, Platform, useColorScheme } from "react-native"; +import AsyncStorage from "@react-native-async-storage/async-storage"; +import { createLocalStore, type LocalStore, type LocalView } from "./store"; +import { nativeColors } from "../ui/colors"; +import type { NativeColors } from "../ui/palette"; + +interface LocalContext { store: LocalStore; view: LocalView; dark: boolean; colors: NativeColors } +const Context = createContext(null); + +export function LocalProvider({ children }: { children: ReactNode }) { + const [store] = useState(() => createLocalStore(AsyncStorage)); + const view = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot); + const system = useColorScheme(); + const preference = view.data?.preferences.appearance ?? "system"; + const dark = preference === "dark" || (preference === "system" && system === "dark"); + const colors = useMemo(() => nativeColors(dark), [dark]); + useEffect(() => { void store.load(); }, [store]); + useEffect(() => { + if (Platform.OS !== "web") Appearance.setColorScheme(preference === "system" ? "unspecified" : preference); + }, [preference]); + return {children}; +} +export function useLocalGame() { + const context = useContext(Context); + if (!context) throw new Error("LocalProvider is required"); + return context; +} diff --git a/apps/mobile/src/local/store.ts b/apps/mobile/src/local/store.ts index 4b79b12..ad7f2e1 100644 --- a/apps/mobile/src/local/store.ts +++ b/apps/mobile/src/local/store.ts @@ -7,6 +7,8 @@ export interface StoragePort { removeItem(key: string): Promise; } export interface LocalView { + /** Reload/reset replaces unsaved UI drafts as well as the document. Not persisted. */ + generation: number; data: LocalSave | null; busy: boolean; error: string | null; @@ -44,7 +46,7 @@ function nextMove(data: LocalSave, move: Move): LocalSave { /** Acknowledgment follows one complete document write. Failed writes retain exact bytes for retry. */ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`) { - let view: LocalView = { data: null, busy: false, error: null, canRetry: false }; + let view: LocalView = { generation: 0, data: null, busy: false, error: null, canRetry: false }; let pending: Pending | null = null; const listeners = new Set<() => void>(); const publish = (patch: Partial) => { @@ -61,7 +63,7 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now if (transaction.reset) for (const key of LEGACY_KEYS) await storage.removeItem(key); await storage.setItem(SAVE_KEY, transaction.bytes); pending = null; - publish({ data: transaction.data, error: null, canRetry: false }); + publish({ data: transaction.data, error: null, canRetry: false, generation: view.generation + Number(transaction.reset) }); }; const attempt = async (operation: () => Promise): Promise => { if (view.busy) return false; @@ -83,7 +85,7 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now const load = () => attempt(async () => { // Explicit reload abandons an unacknowledged in-memory move, never the saved document. pending = null; - publish({ data: null, canRetry: false }); + publish({ data: null, canRetry: false, generation: view.generation + 1 }); const raw = await storage.getItem(SAVE_KEY); if (raw !== null) { const data = decodeSave(raw); diff --git a/apps/mobile/src/screens/Dice.tsx b/apps/mobile/src/screens/Dice.tsx new file mode 100644 index 0000000..cd4f7f0 --- /dev/null +++ b/apps/mobile/src/screens/Dice.tsx @@ -0,0 +1,33 @@ +import React from "react"; +import { Pressable, StyleSheet, View } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; +import { Label } from "../ui/controls"; + +const PIPS: Record = { 1: [4], 2: [0, 8], 3: [0, 4, 8], 4: [0, 2, 6, 8], 5: [0, 2, 4, 6, 8], 6: [0, 2, 3, 5, 6, 8] }; +export function Dice() { + const { store, view, colors } = useLocalGame(); + const game = view.data!.active!.game; + const disabled = view.busy || view.canRetry || game.rollsLeft === 0; + return + {game.dice.map((value, index) => { + const held = game.held.includes(index); + return { void store.move({ kind: "hold", index }); }} style={styles.control}> + + {PIPS[value].map((position) => )} + + + ; + })} + ; +} +const styles = StyleSheet.create({ + hand: { flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 12, paddingVertical: 12 }, + control: { minWidth: 52, minHeight: 80, alignItems: "center", gap: 6 }, + face: { width: 56, height: 56, borderRadius: 12, shadowColor: "#000", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.16, shadowRadius: 7 }, + pip: { position: "absolute", width: 8, height: 8, borderRadius: 4 }, + hold: { textAlign: "center" }, +}); diff --git a/apps/mobile/src/screens/Help.tsx b/apps/mobile/src/screens/Help.tsx new file mode 100644 index 0000000..16c7035 --- /dev/null +++ b/apps/mobile/src/screens/Help.tsx @@ -0,0 +1,56 @@ +import React, { useState } from "react"; +import { Linking, Platform, ScrollView, Share, View } from "react-native"; +import appConfig from "../../app.json"; +import { useLocalGame } from "../local/LocalProvider"; +import { Action, Label, Section, styles } from "../ui/controls"; +import { useConfirmation } from "../ui/useConfirmation"; + +const rules = [ + ["A turn", "The first roll happens when your turn begins. Hold any dice, then reroll the rest up to twice. Choose one unused category to end your turn. A zero scratches that category. AI opponents play automatically after you."], + ["Numbers and bonus", "Add matching dice in Ones through Sixes. Five dice need 63 upper points for a 35-point bonus. Six or eight dice need 84 for a 100-point bonus; ten dice need 105. Only the combined upper score must meet the target."], + ["Pairs and matching dice", "One Pair scores the highest pair. Two Pairs needs two different faces and scores those four dice. Three, Four and Five of a Kind score only the matching dice, using the highest qualifying face. Full House needs a triple and a different pair for 25 points."], + ["Straights and Chance", "Four consecutive faces earn 30 for Small Straight; five earn 40 for Large Straight. All six faces earn 50 for Full Straight. Chance adds every die. The suggestion considers this roll and bonus progress; it is not an optimal strategy."], + ["Larger hands", "Three Pairs needs at least three distinct pairs. Castle needs at least two distinct triples. Tower needs four of one face and two of another. These combinations score the sum of all dice. Maxi Yahtzee requires the entire hand to match for 100 points; five-dice Yahtzee earns 50. There is no separate six-of-a-kind slot in eight- or ten-dice play."], +]; + +export function Help() { + const { store, view, colors } = useLocalGame(); + const { confirm, dialog } = useConfirmation(); + const [error, setError] = useState(null); + const share = async () => { + try { + await Share.share({ message: `Dice game ${appConfig.expo.version}\nPlatform: ${Platform.OS} ${String(Platform.Version)}\nStorage schema: 1; scoring rules: 2\nNo names, scores, game IDs or saved data are included.` }); + setError(null); + } catch { setError("Could not open the system share sheet. The app version is shown below."); } + }; + const source = async () => { + try { await Linking.openURL("https://github.com/HemSoft/yahtzee"); setError(null); } + catch { setError("Could not open the source page. Try again when a browser is available."); } + }; + const reset = () => confirm("Delete all local data", "Delete saved gameplay, completed history, high scores, names and appearance preferences on this device? This cannot be undone in the app.", () => { void store.resetAll(); }); + return <> + + + + {rules.map(([title, body]) =>
)} +
+ + +
+
+ + + { void share(); }} /> + { void source(); }} /> +
+ {error && } +
+ + + {view.error && } + {view.canRetry && { void store.retry(); }} />} +
+
+ {dialog} + ; +} diff --git a/apps/mobile/src/screens/History.tsx b/apps/mobile/src/screens/History.tsx new file mode 100644 index 0000000..b001792 --- /dev/null +++ b/apps/mobile/src/screens/History.tsx @@ -0,0 +1,27 @@ +import React, { useState } from "react"; +import { FlatList, View } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; +import { MODES } from "../local/save"; +import { Label, styles } from "../ui/controls"; +import { Choice } from "../ui/Choice"; +import { HighScores } from "./Results"; + +export function History() { + const { view, colors } = useLocalGame(); + const [selection, setSelection] = useState(null); + if (!view.data) return ; + const diceCount = selection ?? view.data.preferences.diceCount; + const entries = [...view.data.history.entries].reverse().filter((entry) => entry.diceCount === diceCount); + return entry.id} + ListHeaderComponent={ + + `${count} dice`)} selected={MODES.findIndex((count) => count === diceCount)} onSelect={(index) => setSelection(MODES[index])} /> + + + } + ListEmptyComponent={} + renderItem={({ item }) => + + {item.players.map((player, index) => )} + } />; +} diff --git a/apps/mobile/src/screens/NativeGameScreen.tsx b/apps/mobile/src/screens/NativeGameScreen.tsx new file mode 100644 index 0000000..f3805f6 --- /dev/null +++ b/apps/mobile/src/screens/NativeGameScreen.tsx @@ -0,0 +1,53 @@ +import React, { useState } from "react"; +import { ActivityIndicator, Keyboard, View } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { useLocalGame } from "../local/LocalProvider"; +import { Action, Label, styles } from "../ui/controls"; +import { useConfirmation, type Confirm } from "../ui/useConfirmation"; +import { Play } from "./Play"; +import { Results } from "./Results"; +import { Setup } from "./Setup"; + +function SaveStatus({ confirm }: { confirm: Confirm }) { + const { store, view, colors } = useLocalGame(); + if (!view.busy && !view.error) return null; + const reload = () => confirm("Reload saved data", "Reload the last stored document? A move that could not be saved may be lost. Completed stored data is not deleted.", () => { void store.load(); }); + return + {view.busy && } + {view.error && <> + + + {view.canRetry && { void store.retry(); }} />} + { void store.load(); }} /> + } + ; +} +function Content({ playing, start, resume, pause, again, confirm }: { + playing: boolean; start: (name: string) => void; resume: () => void; pause: () => void; again: () => void; confirm: Confirm; +}) { + const { view } = useLocalGame(); + if (!view.data) return ; + if (!playing || !view.data.active) return ; + return view.data.active.game.status === "finished" ? : ; +} +export function NativeGameScreen({ onHistory, onHelp }: { onHistory: () => void; onHelp: () => void }) { + const { store, view, colors } = useLocalGame(); + const [playing, setPlaying] = useState(false); + const { confirm, dialog } = useConfirmation(); + const start = async (name: string) => { + Keyboard.dismiss(); + const preferences = view.data!.preferences; + if (await store.start({ name, diceCount: preferences.diceCount, aiOpponents: preferences.aiOpponents })) setPlaying(true); + }; + const again = async () => { if (await store.discard()) setPlaying(false); }; + return + + + + + + { void start(name); }} resume={() => setPlaying(true)} pause={() => setPlaying(false)} + again={() => { void again(); }} confirm={confirm} /> + {dialog} + ; +} diff --git a/apps/mobile/src/screens/NativeScorecard.tsx b/apps/mobile/src/screens/NativeScorecard.tsx new file mode 100644 index 0000000..4d81164 --- /dev/null +++ b/apps/mobile/src/screens/NativeScorecard.tsx @@ -0,0 +1,57 @@ +import React from "react"; +import { Pressable, StyleSheet, View } from "react-native"; +import { calculateTotal, fromWire, getScorecardCategories, getUpperBonusThreshold, getUpperBonusValue, pickAiCategory, type Category } from "@yahtzee/game-engine"; +import { useLocalGame } from "../local/LocalProvider"; +import { Label, Section } from "../ui/controls"; + +function ScoreRow({ category, suggested }: { category: Category; suggested: boolean }) { + const { store, view, colors } = useLocalGame(); + const game = view.data!.active!.game; + const assigned = game.players[0].scores[category.id]; + const points = assigned ?? category.score(game.dice); + const disabled = view.busy || view.canRetry || assigned !== undefined; + const opponents = game.players.slice(1).map((player) => `${player.name}: ${player.scores[category.id] ?? "not scored"}`).join(" · "); + const ownLabel = assigned === undefined ? `Score ${category.label}, ${points} points${suggested ? ", suggested" : ""}` : `${category.label}, ${points} points recorded`; + const label = opponents ? `${ownLabel}. ${opponents}` : ownLabel; + return { void store.move({ kind: "score", category: category.id }); }} + style={[styles.row, { borderBottomColor: colors.line }]}> + + + {suggested && assigned === undefined && } + + + {game.players.length > 1 && } + ; +} +export function NativeScorecard() { + const { view } = useLocalGame(); + const game = fromWire(view.data!.active!.game); + const suggested = pickAiCategory(game.dice, game.players[0], game.diceCount); + const categories = getScorecardCategories(game.diceCount); + return + {(["upper", "lower"] as const).map((section) =>
+ {categories.filter((category) => category.section === section).map((category) => )} +
)} + +
; +} +export function Bonus() { + const { view } = useLocalGame(); + const game = view.data!.active!.game; + const total = calculateTotal(game.players[0], game.diceCount); + const threshold = getUpperBonusThreshold(game.diceCount); + return + + + + ; +} +const styles = StyleSheet.create({ + row: { padding: 16, minHeight: 56, gap: 8, borderBottomWidth: 0.5 }, + mainRow: { flexDirection: "row", alignItems: "center", gap: 16 }, name: { flex: 1 }, + points: { fontWeight: "600", fontVariant: ["tabular-nums"], textAlign: "right", minWidth: 42 }, + bonus: { gap: 8, paddingVertical: 24, paddingHorizontal: 4 }, +}); diff --git a/apps/mobile/src/screens/Play.tsx b/apps/mobile/src/screens/Play.tsx new file mode 100644 index 0000000..17d763a --- /dev/null +++ b/apps/mobile/src/screens/Play.tsx @@ -0,0 +1,58 @@ +import React, { useEffect } from "react"; +import { AccessibilityInfo, ScrollView, StyleSheet, View, useWindowDimensions } from "react-native"; +import { calculateTotal } from "@yahtzee/game-engine"; +import { useLocalGame } from "../local/LocalProvider"; +import { Action, Label } from "../ui/controls"; +import { Dice } from "./Dice"; +import { NativeScorecard } from "./NativeScorecard"; + +function Deck() { + const { view, colors } = useLocalGame(); + const game = view.data!.active!.game; + const name = game.players[0].name, round = game.currentRound; + useEffect(() => { + AccessibilityInfo.announceForAccessibility(`${name}'s turn. Round ${round}.`); + }, [name, round]); + return + + + + + {game.players.map((player) => + + + )} + ; +} +export function Play({ onPause }: { onPause: () => void }) { + const { store, view, colors } = useLocalGame(); + const game = view.data!.active!.game; + const { width, fontScale } = useWindowDimensions(); + const expanded = width >= 820 && fontScale <= 1.4; + const locked = view.busy || view.canRetry; + const roll = + { void store.move({ kind: "roll" }); }} /> + ; + const controls = <> + + + ; + if (expanded) return + + {controls}{roll} + + + ; + return + {controls} + {roll} + ; +} +const styles = StyleSheet.create({ + screen: { flex: 1 }, content: { padding: 20, gap: 16, paddingBottom: 28 }, + expanded: { flex: 1, flexDirection: "row", maxWidth: 1200, width: "100%", alignSelf: "center" }, + left: { width: 340 }, card: { flex: 1 }, + deck: { padding: 20, borderRadius: 16, gap: 12 }, + player: { gap: 4, paddingTop: 12 }, total: { fontWeight: "600", fontVariant: ["tabular-nums"] }, + roll: { paddingHorizontal: 20, paddingTop: 8, paddingBottom: 12 }, +}); diff --git a/apps/mobile/src/screens/Results.tsx b/apps/mobile/src/screens/Results.tsx new file mode 100644 index 0000000..8143125 --- /dev/null +++ b/apps/mobile/src/screens/Results.tsx @@ -0,0 +1,36 @@ +import React from "react"; +import { ScrollView, View } from "react-native"; +import { calculateTotal, getHighScoresForDiceCount, getPlayerAverageScore } from "@yahtzee/game-engine"; +import { useLocalGame } from "../local/LocalProvider"; +import { Action, Label, Section, styles } from "../ui/controls"; + +export function HighScores({ diceCount }: { diceCount: number }) { + const { view } = useLocalGame(); + const scores = getHighScoresForDiceCount(view.data!.highScores, diceCount); + return
+ + {scores.length ? scores.map((score) => + + + + ) : } +
; +} +export function Results({ onAgain }: { onAgain: () => void }) { + const { view } = useLocalGame(); + const data = view.data!, game = data.active!.game; + const results = game.players.map((player) => ({ player, total: calculateTotal(player, game.diceCount).grandTotal })).sort((a, b) => b.total - a.total); + return + + +
+ {results.map(({ player, total }) => + + + + )} +
+ + +
; +} diff --git a/apps/mobile/src/screens/Setup.tsx b/apps/mobile/src/screens/Setup.tsx new file mode 100644 index 0000000..0ef13fe --- /dev/null +++ b/apps/mobile/src/screens/Setup.tsx @@ -0,0 +1,48 @@ +import React, { useState } from "react"; +import { KeyboardAvoidingView, Platform, ScrollView, TextInput, View } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; +import { MODES } from "../local/save"; +import { Action, Label, Section, styles } from "../ui/controls"; +import { Choice } from "../ui/Choice"; +import type { Confirm } from "../ui/useConfirmation"; + +export function Setup({ onStart, onResume, confirm }: { onStart: (name: string) => void; onResume: () => void; confirm: Confirm }) { + const { store, view, colors } = useLocalGame(); + const data = view.data!; + const [name, setName] = useState(data.preferences.name); + const locked = view.busy || view.canRetry; + const discard = () => confirm("Discard saved game", "This clears the saved game from the play screen. Completed results and high scores stay on this device.", () => { void store.discard(); }); + const appearance = ["system", "light", "dark"] as const; + return + + + + {data.active ?
+ + + + +
: <> +
+ + {data.preferences.recentNames.map((recent) => setName(recent)} />)} + { void store.preferences({ aiOpponents }); }} /> +
+
+ `${count} dice`)} selected={MODES.findIndex((count) => count === data.preferences.diceCount)} + disabled={locked} onSelect={(index) => { void store.preferences({ diceCount: MODES[index] }); }} /> + +
+ onStart(name)} /> + } +
+ { void store.preferences({ appearance: appearance[index] }); }} /> +
+
+
; +} diff --git a/apps/mobile/src/ui/Choice.tsx b/apps/mobile/src/ui/Choice.tsx new file mode 100644 index 0000000..508fe64 --- /dev/null +++ b/apps/mobile/src/ui/Choice.tsx @@ -0,0 +1,25 @@ +import React, { useState } from "react"; +import { Pressable, View } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; +import { Label, styles } from "./controls"; +import { showChoice } from "./showChoice"; + +export function Choice({ title, options, selected, onSelect, disabled = false }: { + title: string; options: string[]; selected: number; onSelect: (index: number) => void; disabled?: boolean; +}) { + const [expanded, setExpanded] = useState(false); + const { colors, dark } = useLocalGame(); + const select = (index: number) => { onSelect(index); setExpanded(false); }; + const open = () => { if (!showChoice(title, options, selected, select, dark)) setExpanded(!expanded); }; + return + + + + {expanded && options.map((label, index) => select(index)} style={styles.row}> + + )} + ; +} diff --git a/apps/mobile/src/ui/colors.ios.ts b/apps/mobile/src/ui/colors.ios.ts new file mode 100644 index 0000000..1f8f06b --- /dev/null +++ b/apps/mobile/src/ui/colors.ios.ts @@ -0,0 +1,11 @@ +import { DynamicColorIOS, PlatformColor } from "react-native"; +import { fallbackColors, type NativeColors } from "./palette"; + +export function nativeColors(dark: boolean): NativeColors { + return { ...fallbackColors(dark), + page: PlatformColor("systemGroupedBackground"), surface: PlatformColor("secondarySystemGroupedBackground"), + text: PlatformColor("label"), muted: PlatformColor("secondaryLabel"), line: PlatformColor("separator"), + error: PlatformColor("systemRed"), + tint: DynamicColorIOS({ light: "#92431f", dark: "#ffba93", highContrastLight: "#672909", highContrastDark: "#ffc3a4" }), + }; +} diff --git a/apps/mobile/src/ui/colors.ts b/apps/mobile/src/ui/colors.ts new file mode 100644 index 0000000..97f9429 --- /dev/null +++ b/apps/mobile/src/ui/colors.ts @@ -0,0 +1 @@ +export { fallbackColors as nativeColors } from "./palette"; diff --git a/apps/mobile/src/ui/confirmation.ios.ts b/apps/mobile/src/ui/confirmation.ios.ts new file mode 100644 index 0000000..b5361a3 --- /dev/null +++ b/apps/mobile/src/ui/confirmation.ios.ts @@ -0,0 +1,6 @@ +import { Alert } from "react-native"; + +export function showConfirmation(title: string, message: string, accept: () => void): boolean { + Alert.alert(title, message, [{ text: "Cancel", style: "cancel" }, { text: title, style: "destructive", onPress: accept }]); + return true; +} diff --git a/apps/mobile/src/ui/confirmation.ts b/apps/mobile/src/ui/confirmation.ts new file mode 100644 index 0000000..7076916 --- /dev/null +++ b/apps/mobile/src/ui/confirmation.ts @@ -0,0 +1,3 @@ +export function showConfirmation(_title: string, _message: string, _accept: () => void): boolean { + return false; +} diff --git a/apps/mobile/src/ui/controls.tsx b/apps/mobile/src/ui/controls.tsx new file mode 100644 index 0000000..9e91cfa --- /dev/null +++ b/apps/mobile/src/ui/controls.tsx @@ -0,0 +1,44 @@ +import React, { type ReactNode } from "react"; +import { Pressable, StyleSheet, Text, View, type ColorValue, type TextProps } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; + +const type = { + title: { fontSize: 28, fontWeight: "700" as const }, + heading: { fontSize: 20, fontWeight: "600" as const }, + body: { fontSize: 17 }, + caption: { fontSize: 15 }, +}; +const ramps = { title: "title1", heading: "title3", body: "body", caption: "subheadline" } as const; +export function Label({ children, kind = "body", muted = false, color, ...props }: TextProps & { + children: ReactNode; kind?: keyof typeof type; muted?: boolean; color?: ColorValue; +}) { + const { colors } = useLocalGame(); + return {children}; +} +export function Action({ label, onPress, disabled = false, primary = false, destructive = false, testID }: { + label: string; onPress: () => void; disabled?: boolean; primary?: boolean; destructive?: boolean; testID?: string; +}) { + const { colors } = useLocalGame(); + const color = destructive ? colors.error : primary ? colors.actionText : colors.tint; + return [styles.action, { backgroundColor: primary ? colors.action : "transparent", opacity: disabled ? 0.45 : pressed ? 0.7 : 1 }]}> + + ; +} +export function Section({ title, children }: { title: string; children: ReactNode }) { + const { colors } = useLocalGame(); + return + + {children} + ; +} +export const styles = StyleSheet.create({ + action: { minHeight: 48, minWidth: 48, justifyContent: "center", alignItems: "center", paddingHorizontal: 16, paddingVertical: 12, borderRadius: 12 }, + actionText: { fontWeight: "600", textAlign: "center", flexShrink: 1 }, + section: { gap: 10, marginTop: 22 }, sectionTitle: { paddingHorizontal: 4 }, + group: { borderRadius: 14, overflow: "hidden" }, + row: { padding: 16, minHeight: 48 }, + screen: { flex: 1 }, scroll: { padding: 20, paddingBottom: 28, gap: 16, width: "100%", maxWidth: 1100, alignSelf: "center" }, +}); diff --git a/apps/mobile/src/ui/palette.ts b/apps/mobile/src/ui/palette.ts new file mode 100644 index 0000000..ba5b944 --- /dev/null +++ b/apps/mobile/src/ui/palette.ts @@ -0,0 +1,19 @@ +import type { ColorValue } from "react-native"; + +export interface NativeColors { + page: ColorValue; surface: ColorValue; text: ColorValue; muted: ColorValue; + line: ColorValue; tint: ColorValue; error: ColorValue; deck: ColorValue; + deckText: ColorValue; die: ColorValue; pip: ColorValue; held: ColorValue; + action: ColorValue; actionText: ColorValue; +} +/** Non-iOS fallback and the deliberately game-specific brand colors. */ +export function fallbackColors(dark: boolean): NativeColors { + return { + page: dark ? "#182521" : "#eff2ee", surface: dark ? "#23352e" : "#ffffff", + text: dark ? "#edf1e7" : "#203a34", muted: dark ? "#b4c4b6" : "#576a61", + line: dark ? "#465e4c" : "#ccd7cd", tint: dark ? "#ffba93" : "#92431f", + error: dark ? "#ffd0c5" : "#9c342c", deck: dark ? "#102f26" : "#1e453a", + deckText: "#f5f4e9", die: "#f5f4e9", pip: "#244033", held: "#cee2af", + action: "#f2a07e", actionText: "#35281f", + }; +} diff --git a/apps/mobile/src/ui/showChoice.ios.ts b/apps/mobile/src/ui/showChoice.ios.ts new file mode 100644 index 0000000..b0ec18c --- /dev/null +++ b/apps/mobile/src/ui/showChoice.ios.ts @@ -0,0 +1,8 @@ +import { ActionSheetIOS } from "react-native"; + +export function showChoice(title: string, options: string[], selected: number, onSelect: (index: number) => void, dark: boolean): boolean { + ActionSheetIOS.showActionSheetWithOptions({ title, message: `Current: ${options[selected]}`, + options: [...options, "Cancel"], cancelButtonIndex: options.length, userInterfaceStyle: dark ? "dark" : "light" }, + (index) => { if (index < options.length) onSelect(index); }); + return true; +} diff --git a/apps/mobile/src/ui/showChoice.ts b/apps/mobile/src/ui/showChoice.ts new file mode 100644 index 0000000..13aff04 --- /dev/null +++ b/apps/mobile/src/ui/showChoice.ts @@ -0,0 +1,4 @@ +/** The non-iOS control expands its options inline. */ +export function showChoice(_title: string, _options: string[], _selected: number, _onSelect: (index: number) => void, _dark: boolean): boolean { + return false; +} diff --git a/apps/mobile/src/ui/useConfirmation.tsx b/apps/mobile/src/ui/useConfirmation.tsx new file mode 100644 index 0000000..9277598 --- /dev/null +++ b/apps/mobile/src/ui/useConfirmation.tsx @@ -0,0 +1,27 @@ +import React, { useState } from "react"; +import { Modal, View } from "react-native"; +import { useLocalGame } from "../local/LocalProvider"; +import { Action, Label } from "./controls"; +import { showConfirmation } from "./confirmation"; + +type Question = { title: string; message: string; accept: () => void }; +export type Confirm = (title: string, message: string, accept: () => void) => void; +export function useConfirmation(): { confirm: Confirm; dialog: React.ReactNode } { + const [question, setQuestion] = useState(null); + const { colors } = useLocalGame(); + const confirm: Confirm = (title, message, accept) => { + if (!showConfirmation(title, message, accept)) setQuestion({ title, message, accept }); + }; + const accept = () => { question?.accept(); setQuestion(null); }; + const dialog = setQuestion(null)}> + + + + + + setQuestion(null)} /> + + + ; + return { confirm, dialog }; +} diff --git a/docs/function-risk.md b/docs/function-risk.md index 1933ef5..caa471c 100644 --- a/docs/function-risk.md +++ b/docs/function-risk.md @@ -10,7 +10,7 @@ bun run quality:measure On Linux, install Playwright host dependencies and use `xvfb-run --auto-servernum bun run quality:measure`, as described in [client qualification](client-qualification.md). No deployment or credentials are needed. -The command clears only its generated raw-counter directory, runs instrumented engine/backend tests, runs all six real-client journeys, and writes `reports/quality/report.md`, `report.json` and `functions.json`. The JSON report records the Git revision and dirty state. The function-only file omits volatile metadata so two runs at one revision can be compared directly. Missing unit/backend/client collections, empty collections and mismatched source locations fail the command. +The command clears only its generated raw-counter directory, runs instrumented engine/backend tests, runs the online web/Electron journeys and the offline mobile-source adapter journeys, and writes `reports/quality/report.md`, `report.json` and `functions.json`. The JSON report records the Git revision and dirty state. The function-only file omits volatile metadata so two runs at one revision can be compared directly. Missing unit/backend/client collections, empty collections and mismatched source locations fail the command. The pinned tools are TypeScript 6.0.3, istanbul-lib-instrument 6.0.3 and istanbul-lib-coverage 3.2.2. Bun 1.4.2 runs the tests. Runtime plugins add counters only during qualification; application source and shipped bundles are unchanged. Bun test completion hooks persist unit counters because its runner does not invoke process-exit handlers. Client counters and backend counters are captured before fixture shutdown. @@ -30,7 +30,7 @@ Coverage is a fraction from zero to one. Calculations retain full precision; dis ## Gate and initial review -Scores from 15 through 30 require review. New functions above 30 fail. The three pre-existing exceptions in [the baseline](../quality-baseline.json) have exact measured limits and reasons. An exception cannot worsen, and an improved or removed exception must be lowered or removed. Routine measurement never rewrites the baseline. Do not add exceptions for new code or raise a budget to make a failure disappear; policy changes need explicit review with their measured effect. +Scores from 15 through 30 require review. New functions above 30 fail. The [baseline](../quality-baseline.json) no longer needs legacy exceptions after the web, desktop and native screen extractions. An exception cannot worsen, and an improved or removed exception must be lowered or removed. Routine measurement never rewrites the baseline. Do not add exceptions for new code or raise a budget to make a failure disappear; policy changes need explicit review with their measured effect. Initial source baseline is commit `dc1978768479bd3c37555619d681d40f82fd479f`. None of these production functions changed in the measurement PR. @@ -40,7 +40,7 @@ Initial source baseline is commit `dc1978768479bd3c37555619d681d40f82fd479f`. No | Web App | 34 | 51/54 | 34.19821673525377 | Same constraint as desktop | | Mobile Index | 40 | 61/65 | 40.37287209831589 | Preserve measured risk until screen extraction lowers it | -The desktop/web redesign now shares separate setup, play, and results components. Both app entry components fall below the new-function gate, so their obsolete legacy exceptions were removed. The mobile exception remains unchanged. Current measurements are in `reports/quality/report.md`; the table above records the original baseline, not current desktop/web complexity. +The desktop/web redesign shares setup, play and results components. The native offline interface has separate local-state, setup, play, scorecard, results, history and help modules. All entry components now fall below the new-function gate, so their obsolete legacy exceptions were removed. Current measurements are in `reports/quality/report.md`; the table above records the original baseline, not current complexity. Better coverage alone cannot put complexity 34 or 40 below CRAP 30. These are visible legacy limits, not claims that the components are low-risk. diff --git a/packages/game-engine/src/index.ts b/packages/game-engine/src/index.ts index 9b5a328..f7bbe33 100644 --- a/packages/game-engine/src/index.ts +++ b/packages/game-engine/src/index.ts @@ -1,4 +1,5 @@ export { createOfflineBackend } from "./offline"; +export { getScorecardCategories } from "./presentation"; export { newSessionGame, applySessionMove, fromWire, toWire, type WireGame, type Move } from "./session"; export { rollDie, rollDice, reroll } from "./dice"; export { diff --git a/packages/game-engine/src/presentation.ts b/packages/game-engine/src/presentation.ts new file mode 100644 index 0000000..4726a34 --- /dev/null +++ b/packages/game-engine/src/presentation.ts @@ -0,0 +1,17 @@ +import { getCategories, type CategoryId } from "./scoring"; + +// Presentation only. Keep the scoring registry's AI tie-breaking order unchanged. +const DISPLAY_AFTER: Partial> = { + "two-pairs": "three-pairs", + "four-of-a-kind": "five-of-a-kind", + "full-house": "castle", + "large-straight": "full-straight", +}; +export function getScorecardCategories(diceCount: number) { + const categories = getCategories(diceCount); + const moved = new Set(Object.values(DISPLAY_AFTER)); + return categories.filter((category) => !moved.has(category.id)).flatMap((category) => { + const extra = categories.find((candidate) => candidate.id === DISPLAY_AFTER[category.id]); + return extra ? [category, extra] : [category]; + }); +} diff --git a/packages/game-engine/tests/nativePersistence.test.ts b/packages/game-engine/tests/nativePersistence.test.ts index e36361d..0939c5a 100644 --- a/packages/game-engine/tests/nativePersistence.test.ts +++ b/packages/game-engine/tests/nativePersistence.test.ts @@ -143,6 +143,24 @@ describe("durable native storage boundary, without a native-runtime claim", () = expect(f.store.getSnapshot().data).toEqual(emptySave()); }); + test("UI draft generations change on reload and only acknowledged resets", async () => { + const f = fixture(); + expect(f.store.getSnapshot().generation).toBe(0); + await f.store.load(); + expect(f.store.getSnapshot().generation).toBe(1); + await f.store.preferences({ appearance: "dark" }); + expect(f.store.getSnapshot().generation).toBe(1); + f.state.fail = "after"; + expect(await f.store.resetAll()).toBe(false); + expect(f.store.getSnapshot().generation).toBe(1); + f.state.fail = null; + expect(await f.store.retry()).toBe(true); + expect(f.store.getSnapshot().generation).toBe(2); + expect(JSON.parse(f.values.get(SAVE_KEY)!)).not.toHaveProperty("generation"); + await f.store.load(); + expect(f.store.getSnapshot().generation).toBe(3); + }); + test("explicit reload abandons only the unacknowledged move and honors the actual saved document", async () => { const f = fixture(); await f.store.load(); await f.store.start(options); const before = f.values.get(SAVE_KEY); diff --git a/packages/ui/src/Scorecard.tsx b/packages/ui/src/Scorecard.tsx index add27ed..7d542b1 100644 --- a/packages/ui/src/Scorecard.tsx +++ b/packages/ui/src/Scorecard.tsx @@ -1,27 +1,10 @@ import React from "react"; import { Icon } from "./Icons"; import { - getCategories, getUpperBonusThreshold, getUpperBonusValue, calculateTotal, calculateMaxPossibleScore, + getScorecardCategories, getUpperBonusThreshold, getUpperBonusValue, calculateTotal, calculateMaxPossibleScore, type CategoryId, type PlayerState, } from "@yahtzee/game-engine"; -// Presentation order only: engine order also decides AI tie-breaking. -const DISPLAY_AFTER: Partial> = { - "two-pairs": "three-pairs", - "four-of-a-kind": "five-of-a-kind", - "full-house": "castle", - "large-straight": "full-straight", -}; - -function getScorecardCategories(diceCount: number) { - const categories = getCategories(diceCount); - const moved = new Set(Object.values(DISPLAY_AFTER)); - return categories.filter((category) => !moved.has(category.id)).flatMap((category) => { - const extra = categories.find((candidate) => candidate.id === DISPLAY_AFTER[category.id]); - return extra ? [category, extra] : [category]; - }); -} - interface ScorecardProps { players: PlayerState[]; currentPlayerIndex: number; diff --git a/playwright.config.ts b/playwright.config.ts index 8c30245..1c7c04c 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -5,7 +5,11 @@ export default defineConfig({ timeout: 45_000, retries: 0, outputDir: "reports/clients/artifacts", reporter: [["list"], ["json", { outputFile: "reports/clients/results.json" }]], - projects: [{ name: "web" }, { name: "desktop" }, { name: "mobile-web-adapter" }], + projects: [ + { name: "web", testMatch: ["**/journeys.spec.ts", "**/design.spec.ts"] }, + { name: "desktop", testMatch: "**/journeys.spec.ts" }, + { name: "mobile-web-adapter", testMatch: "**/native.spec.ts" }, + ], use: { baseURL: "http://127.0.0.1:5187" }, webServer: { command: process.env.TEST_COVERAGE === "1" diff --git a/quality-baseline.json b/quality-baseline.json index e0c5707..b7fd3dc 100644 --- a/quality-baseline.json +++ b/quality-baseline.json @@ -1,9 +1,4 @@ { "version": 1, - "legacy": { - "apps/mobile/app/index.tsx::/Index#1": { - "maxCrap": 40.37287209831589, - "reason": "Existing at dc197876. Native-screen component has complexity 40 and 61/65 observed branch arms through the declared web adapter. Keep this limit until screen extraction lowers it." - } - } + "legacy": {} } diff --git a/tests/clients/fixtures.ts b/tests/clients/fixtures.ts new file mode 100644 index 0000000..0953f55 --- /dev/null +++ b/tests/clients/fixtures.ts @@ -0,0 +1,76 @@ +import { test as base, type TestInfo } from "playwright/test"; +import type { ElectronApplication, Page } from "playwright"; +import { createRequire } from "node:module"; +import { join, resolve } from "node:path"; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs"; +import { createHash } from "node:crypto"; +import { tmpdir } from "node:os"; +import { execFileSync } from "node:child_process"; +import { expect } from "playwright/test"; +export { expect }; +const require = createRequire(import.meta.url); +export const origin = "http://127.0.0.1:5187"; +export const desktopApplications = new WeakMap(); + +export async function saveCoverage(page: Page, info: TestInfo, stage = "final") { + if (process.env.TEST_COVERAGE !== "1") return; + const data = await page.evaluate(() => (globalThis as typeof globalThis & { __coverage__?: object }).__coverage__); + if (!data || !Object.keys(data).length) throw new Error("Client coverage collection is empty"); + const folder = resolve("reports/quality/raw"); mkdirSync(folder, { recursive: true }); + const id = createHash("sha256").update(info.testId).digest("hex").slice(0, 16); + writeFileSync(resolve(folder, `client-${id}-${stage}.json`), JSON.stringify(data)); + const response = await fetch(`${origin}/coverage`); + if (!response.ok) throw new Error("Backend coverage collection failed"); + writeFileSync(resolve(folder, "backend.json"), JSON.stringify(await response.json())); +} +export const test = base.extend<{ client: Page }>({ + client: async ({ playwright }, runWithPage, info) => { + info.annotations.push({ type: "commit", description: execFileSync("git", ["rev-parse", "HEAD"], { encoding: "utf8" }).trim() }); + info.annotations.push({ type: "dirty", description: String(!!execFileSync("git", ["status", "--porcelain"], { encoding: "utf8" }).trim()) }); + if (info.project.name === "desktop") { + const env: Record = Object.fromEntries(Object.entries(process.env) + .filter((entry): entry is [string, string] => entry[1] !== undefined)); + env.ELECTRON_RENDERER_URL = `${origin}/desktop`; + delete env.ELECTRON_RUN_AS_NODE; + const profile = mkdtempSync(join(tmpdir(), "yahtzee-client-")); + try { + const app = await playwright._electron.launch({ + executablePath: require("../../apps/desktop/node_modules/electron"), + args: [resolve("apps/desktop"), `--user-data-dir=${profile}`], env, + recordVideo: { dir: info.outputPath("videos") }, + }); + try { + const page = await app.firstWindow(); + desktopApplications.set(page, app); + await app.context().tracing.start({ screenshots: true, snapshots: true }); + try { + await page.waitForLoadState(); + expect(await app.evaluate(({ app: application }) => application.getPath("userData"))).toBe(profile); + expect(await page.evaluate(() => (window as Window & { platform?: { name: string } }).platform?.name)).toBe("electron"); + await runWithPage(page); + } finally { + try { await saveCoverage(page, info); } + finally { await app.context().tracing.stop({ path: info.outputPath("trace.zip") }); } + } + } finally { await app.close(); } + } finally { rmSync(profile, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); } + } else { + const browser = await playwright.chromium.launch(); + try { + const context = await browser.newContext({ + viewport: info.project.name === "web" ? { width: 1280, height: 900 } : { width: 390, height: 844 }, + recordVideo: { dir: info.outputPath("videos") }, + }); + try { + await context.tracing.start({ screenshots: true, snapshots: true }); + const page = await context.newPage(); + try { await runWithPage(page); } + finally { + try { await saveCoverage(page, info); } + finally { await context.tracing.stop({ path: info.outputPath("trace.zip") }); } + } + } finally { await context.close(); } + } finally { await browser.close(); } + } + }, +}); diff --git a/tests/clients/journeys.spec.ts b/tests/clients/journeys.spec.ts index 96f8452..348e8f8 100644 --- a/tests/clients/journeys.spec.ts +++ b/tests/clients/journeys.spec.ts @@ -1,17 +1,7 @@ -import { test as base, expect, type TestInfo } from "playwright/test"; -import type { ElectronApplication, Page } from "playwright"; -import { createRequire } from "node:module"; -import { join, resolve } from "node:path"; -import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs"; -import { createHash } from "node:crypto"; -import { tmpdir } from "node:os"; -import { execFileSync } from "node:child_process"; +import type { Page } from "playwright"; +import { test, expect, origin, desktopApplications } from "./fixtures"; import { getCategories } from "../../packages/game-engine/src/scoring"; -const require = createRequire(import.meta.url); -const origin = "http://127.0.0.1:5187"; -const desktopApplications = new WeakMap(); - async function expectNoDocumentOverflow(page: Page) { const metrics = await page.evaluate(() => ({ clientHeight: document.documentElement.clientHeight, @@ -73,73 +63,9 @@ async function expectMinimumWindowFallback(page: Page) { await page.setViewportSize({ width: 944, height: 685 }); } -async function saveCoverage(page: Page, info: TestInfo) { - if (process.env.TEST_COVERAGE !== "1") return; - const data = await page.evaluate(() => (globalThis as typeof globalThis & { __coverage__?: object }).__coverage__); - if (!data || !Object.keys(data).length) throw new Error("Client coverage collection is empty"); - const folder = resolve("reports/quality/raw"); mkdirSync(folder, { recursive: true }); - const id = createHash("sha256").update(info.testId).digest("hex").slice(0, 16); - writeFileSync(resolve(folder, `client-${id}.json`), JSON.stringify(data)); - const response = await fetch(`${origin}/coverage`); - if (!response.ok) throw new Error("Backend coverage collection failed"); - writeFileSync(resolve(folder, "backend.json"), JSON.stringify(await response.json())); -} -const test = base.extend<{ client: Page }>({ - client: async ({ playwright }, runWithPage, info) => { - info.annotations.push({ type: "commit", description: execFileSync("git", ["rev-parse", "HEAD"], { encoding: "utf8" }).trim() }); - info.annotations.push({ type: "dirty", description: String(!!execFileSync("git", ["status", "--porcelain"], { encoding: "utf8" }).trim()) }); - if (info.project.name === "desktop") { - const env: Record = Object.fromEntries(Object.entries(process.env) - .filter((entry): entry is [string, string] => entry[1] !== undefined)); - env.ELECTRON_RENDERER_URL = `${origin}/desktop`; - delete env.ELECTRON_RUN_AS_NODE; - const profile = mkdtempSync(join(tmpdir(), "yahtzee-client-")); - try { - const app = await playwright._electron.launch({ - executablePath: require("../../apps/desktop/node_modules/electron"), - args: [resolve("apps/desktop"), `--user-data-dir=${profile}`], env, - recordVideo: { dir: info.outputPath("videos") }, - }); - try { - const page = await app.firstWindow(); - desktopApplications.set(page, app); - await app.context().tracing.start({ screenshots: true, snapshots: true }); - try { - await page.waitForLoadState(); - expect(await app.evaluate(({ app: application }) => application.getPath("userData"))).toBe(profile); - expect(await page.evaluate(() => (window as Window & { platform?: { name: string } }).platform?.name)).toBe("electron"); - await runWithPage(page); - } finally { - try { await saveCoverage(page, info); } - finally { await app.context().tracing.stop({ path: info.outputPath("trace.zip") }); } - } - } finally { await app.close(); } - } finally { rmSync(profile, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); } - } else { - const browser = await playwright.chromium.launch(); - try { - const context = await browser.newContext({ - viewport: info.project.name === "web" ? { width: 1280, height: 900 } : { width: 390, height: 844 }, - recordVideo: { dir: info.outputPath("videos") }, - }); - try { - await context.tracing.start({ screenshots: true, snapshots: true }); - const page = await context.newPage(); - try { await runWithPage(page); } - finally { - try { await saveCoverage(page, info); } - finally { await context.tracing.stop({ path: info.outputPath("trace.zip") }); } - } - } finally { await context.close(); } - } finally { await browser.close(); } - } - }, -}); - for (const diceCount of [5, 6]) { test(`${diceCount} dice: complete, retry, reconnect, play again and cancel`, async ({ client, request }, info) => { - const mobile = info.project.name === "mobile-web-adapter"; - const route = mobile ? "mobile" : info.project.name; + const route = info.project.name; const errors: string[] = []; client.on("pageerror", (error) => errors.push(error.message)); await request.post("/control", { data: { reset: true } }); await client.goto(`${origin}/${route}`); @@ -147,7 +73,7 @@ for (const diceCount of [5, 6]) { const textbox = client.getByRole("textbox"); await textbox.fill(name); await client.getByRole("button", { name: "1 AI", exact: true }).click(); - await client.getByRole("button", { name: mobile ? String(diceCount) : diceCount === 5 ? "Classic (5)" : "Extended (6)", exact: true }).click(); + await client.getByRole("button", { name: diceCount === 5 ? "Classic (5)" : "Extended (6)", exact: true }).click(); if (diceCount === 6) await client.getByRole("button", { name: "Switch to dark mode" }).click(); if (info.project.name === "desktop") await expectNoDocumentOverflow(client); await client.screenshot({ path: info.outputPath("setup.png"), fullPage: true }); @@ -162,12 +88,10 @@ for (const diceCount of [5, 6]) { await expectMinimumWindowFallback(client); await expectNoDocumentOverflow(client); } - if (!mobile) { - const lowerOrder = diceCount === 5 - ? ["One Pair", "Two Pairs", "Three of a Kind", "Four of a Kind", "Full House", "Small Straight", "Large Straight", "Yahtzee", "Chance"] - : ["One Pair", "Two Pairs", "Three Pairs", "Three of a Kind", "Four of a Kind", "Five of a Kind", "Full House", "Castle", "Small Straight", "Large Straight", "Full Straight", "Chance", "Tower", "Maxi Yahtzee"]; - await expect(client.locator(".score-section.lower .yahtzee-score-action")).toHaveText(lowerOrder); - } + const lowerOrder = diceCount === 5 + ? ["One Pair", "Two Pairs", "Three of a Kind", "Four of a Kind", "Full House", "Small Straight", "Large Straight", "Yahtzee", "Chance"] + : ["One Pair", "Two Pairs", "Three Pairs", "Three of a Kind", "Four of a Kind", "Five of a Kind", "Full House", "Castle", "Small Straight", "Large Straight", "Full Straight", "Chance", "Tower", "Maxi Yahtzee"]; + await expect(client.locator(".score-section.lower .yahtzee-score-action")).toHaveText(lowerOrder); const firstDie = client.getByRole("button", { name: /^Die showing / }).first(); const heldValue = await firstDie.getAttribute("aria-label"); await firstDie.click(); @@ -175,7 +99,7 @@ for (const diceCount of [5, 6]) { await client.getByRole("button", { name: "Re-roll (2)", exact: true }).click(); await expect(client.getByRole("button", { name: "Re-roll (1)", exact: true })).toBeEnabled(); expect(await firstDie.getAttribute("aria-label")).toBe(`${heldValue}, held`); - if (!mobile) await expect(firstDie).toHaveAttribute("aria-pressed", "true"); + await expect(firstDie).toHaveAttribute("aria-pressed", "true"); await client.context().setOffline(true); await client.getByRole("button", { name: "Re-roll (1)", exact: true }).click(); @@ -202,7 +126,7 @@ for (const diceCount of [5, 6]) { expect(committed.logs).toHaveLength(1); expect(committed.receiptCount).toBe(2); await client.getByRole("button", { name: "Retry move", exact: true }).click(); await expect(client.getByText("Game Over!", { exact: true })).toBeVisible(); - await expect(client.getByText(`${mobile ? "🏅 " : ""}High Scores (${diceCount} dice)`, { exact: true })).toBeVisible(); + await expect(client.getByText(`High Scores (${diceCount} dice)`, { exact: true })).toBeVisible(); for (const player of committed.logs[0].players) { await expect(client.getByText(`${player.score} pts`, { exact: false }).first()).toBeVisible(); } @@ -218,7 +142,7 @@ for (const diceCount of [5, 6]) { await request.post("/control", { data: { delay: 600 } }); const delayed = client.waitForResponse((response) => response.url().endsWith("/rpc") && response.request().postDataJSON()?.name === "games:move"); await client.getByRole("button", { name: "Re-roll (2)", exact: true }).click(); - await client.getByRole("button", { name: mobile ? "✕ Quit Game" : "Quit Game", exact: true }).click(); + await client.getByRole("button", { name: "Quit Game", exact: true }).click(); await textbox.fill("Replacement guest"); await client.getByRole("button", { name: "Start Game", exact: true }).click(); await expect(client.getByText(/Replacement guest's turn/)).toBeVisible(); diff --git a/tests/clients/mobile.tsx b/tests/clients/mobile.tsx index b88d269..debd5fc 100644 --- a/tests/clients/mobile.tsx +++ b/tests/clients/mobile.tsx @@ -1,4 +1,23 @@ -import React from "react"; +import React, { useState } from "react"; import { createRoot } from "react-dom/client"; -import Index from "../../apps/mobile/app/index"; -createRoot(document.getElementById("root")!).render(); +import { LocalProvider } from "../../apps/mobile/src/local/LocalProvider"; +import { NativeGameScreen } from "../../apps/mobile/src/screens/NativeGameScreen"; +import { History } from "../../apps/mobile/src/screens/History"; +import { Help } from "../../apps/mobile/src/screens/Help"; +import { Action } from "../../apps/mobile/src/ui/controls"; + +// Exercises native screen source through react-native-web, not UIKit navigation. +function Fixture() { + const [screen, setScreen] = useState("play"); + return +
+ setScreen("history")} onHelp={() => setScreen("help")} /> +
+ {screen !== "play" &&
+ setScreen("play")} /> + {screen === "history" ? : } +
} +
; +} +document.body.style.margin = "0"; +createRoot(document.getElementById("root")!).render(); diff --git a/tests/clients/native-safe-area.tsx b/tests/clients/native-safe-area.tsx new file mode 100644 index 0000000..e40c4a8 --- /dev/null +++ b/tests/clients/native-safe-area.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { View, type ViewProps } from "react-native"; +// Zero-inset browser adapter. It is not evidence of native safe-area behavior. +export function SafeAreaView({ edges: _edges, ...props }: ViewProps & { edges?: string[] }) { + return ; +} diff --git a/tests/clients/native-storage.ts b/tests/clients/native-storage.ts index 4f7f59f..6d48989 100644 --- a/tests/clients/native-storage.ts +++ b/tests/clients/native-storage.ts @@ -1,5 +1,15 @@ -// Browser adapter for the mobile-source fixture, not a native storage test. +// Browser-only adapter and fault injection. These controls are not in native builds. +export interface StorageFaults { reads: number; writes: number; acknowledgments: number; removes: number; delay: number } +declare global { interface Window { __nativeStorage: StorageFaults } } +window.__nativeStorage = { reads: 0, writes: 0, acknowledgments: 0, removes: 0, delay: 0 }; +function fail(kind: "reads" | "writes" | "acknowledgments" | "removes") { + if (window.__nativeStorage[kind] > 0) { window.__nativeStorage[kind]--; throw new Error(`Injected storage ${kind} failure`); } +} export default { - async getItem(key: string) { return localStorage.getItem(key); }, - async setItem(key: string, value: string) { localStorage.setItem(key, value); }, + async getItem(key: string) { fail("reads"); return localStorage.getItem(key); }, + async setItem(key: string, value: string) { + if (window.__nativeStorage.delay) await new Promise((done) => setTimeout(done, window.__nativeStorage.delay)); + fail("writes"); localStorage.setItem(key, value); fail("acknowledgments"); + }, + async removeItem(key: string) { fail("removes"); localStorage.removeItem(key); }, }; diff --git a/tests/clients/native.spec.ts b/tests/clients/native.spec.ts new file mode 100644 index 0000000..7710452 --- /dev/null +++ b/tests/clients/native.spec.ts @@ -0,0 +1,139 @@ +import type { Page } from "playwright"; +import { test, expect, origin, saveCoverage } from "./fixtures"; +import { getScorecardCategories, calculateTotal } from "../../packages/game-engine/src"; +import { SAVE_KEY, type LocalSave } from "../../apps/mobile/src/local/save"; +import type { StorageFaults } from "./native-storage"; + +async function saved(page: Page): Promise { + return page.evaluate((key) => JSON.parse(localStorage.getItem(key)!), SAVE_KEY); +} +async function faults(page: Page, patch: Partial) { + await page.evaluate((value) => Object.assign(window.__nativeStorage, value), patch); +} +async function choose(page: Page, field: string, value: string) { + await page.getByRole("button", { name: field, exact: true }).click(); + await page.getByRole("radio", { name: value, exact: true }).click(); + await expect(page.getByRole("button", { name: field, exact: true })).toHaveAttribute("aria-valuetext", value); +} +async function confirm(page: Page, label: string) { + await page.getByRole("button", { name: label, exact: true }).click(); + await page.getByRole("button", { name: label, exact: true }).last().click(); +} + +for (const diceCount of [5, 6, 8, 10]) { + test(`offline native source adapter: ${diceCount} dice, resume, exact retry and completion`, async ({ client, request }, info) => { + const errors: string[] = [], rpcs: string[] = []; + client.on("pageerror", (error) => errors.push(error.message)); + client.on("request", (request) => { if (request.url().endsWith("/rpc")) rpcs.push(request.url()); }); + await request.post("/control", { data: { reset: true } }); + await client.goto(`${origin}/mobile`); + await client.getByRole("textbox", { name: "Your name" }).fill(`Local ${diceCount}`); + const ai = diceCount === 6 || diceCount === 10 ? 3 : 0; + await choose(client, "AI opponents", ai ? "3 AI" : "Solo"); + await choose(client, "Dice count", `${diceCount} dice`); + if (diceCount === 6) await choose(client, "Appearance", "Dark"); + await client.context().setOffline(true); + await client.getByRole("button", { name: "Start Game", exact: true }).click(); + const roll = client.getByRole("button", { name: "Re-roll (2)", exact: true }); + await expect(roll).toBeEnabled(); + await expect(client.getByRole("checkbox")).toHaveCount(diceCount); + if (diceCount === 8) await client.setViewportSize({ width: 1024, height: 768 }); + const die = client.getByTestId("die-0"), label = await die.getAttribute("aria-label"); + await die.click(); await expect(die).toBeChecked(); + await expect(roll).toBeEnabled(); await roll.click(); + await expect(client.getByRole("button", { name: "Re-roll (1)", exact: true })).toBeEnabled(); + expect(await die.getAttribute("aria-label")).toBe(label); + const checkpoint = await saved(client); + await saveCoverage(client, info, "before-resume"); + await client.context().setOffline(false); await client.reload(); + await client.getByRole("button", { name: "Resume Game", exact: true }).click(); + await expect(client.getByRole("button", { name: "Re-roll (1)", exact: true })).toBeEnabled(); + expect(await saved(client)).toEqual(checkpoint); + await expect(client.getByTestId("die-0")).toBeChecked(); + await client.context().setOffline(true); + await faults(client, { writes: 1 }); + await client.getByRole("button", { name: "Re-roll (1)", exact: true }).click(); + await expect(client.getByRole("alert")).toContainText("Injected storage writes failure"); + await expect(client.getByTestId("score-ones")).toBeDisabled(); + expect(await saved(client)).toEqual(checkpoint); + await client.getByRole("button", { name: "Retry save", exact: true }).click(); + await expect(client.getByRole("button", { name: "Re-roll (0)", exact: true })).toBeDisabled(); + expect((await saved(client)).active!.revision).toBe(checkpoint.active!.revision + 1); + if (diceCount === 6) await client.screenshot({ path: info.outputPath("adapter-active-dark.png") }); + const categories = getScorecardCategories(diceCount); + for (const [index, category] of categories.slice(0, -1).entries()) { + const action = client.getByTestId(`score-${category.id}`); + await expect(action).toBeEnabled(); + if (!index) { await action.focus(); await client.keyboard.press("Enter"); } else await action.click(); + await expect(client.getByText(`Round ${index + 2} / ${categories.length}`, { exact: true })).toBeVisible(); + } + await faults(client, { acknowledgments: 1 }); + await client.getByTestId(`score-${categories.at(-1)!.id}`).click(); + await expect(client.getByRole("alert")).toContainText("Injected storage acknowledgments failure"); + const committed = await saved(client); + expect(committed.active!.game.status).toBe("finished"); + expect(committed.history.entries).toHaveLength(1); + expect(committed.highScores.entries).toHaveLength(ai + 1); + await expect(client.getByText("Game Over!", { exact: true })).toHaveCount(0); + await client.getByRole("button", { name: "Retry save", exact: true }).click(); + await expect(client.getByText("Game Over!", { exact: true })).toBeVisible(); + expect(await saved(client)).toEqual(committed); + for (const player of committed.active!.game.players) { + const score = calculateTotal(player, diceCount).grandTotal; + await expect(client.getByText(`${score} pts`, { exact: true }).first()).toBeVisible(); + } + if (diceCount === 6) await client.screenshot({ path: info.outputPath("adapter-results-dark.png") }); + await client.getByRole("button", { name: "History", exact: true }).click(); + await expect(client.getByText("Recent games", { exact: true })).toBeVisible(); + await choose(client, "Dice count", diceCount === 5 ? "6 dice" : "5 dice"); + await expect(client.getByText("No completed games in this mode yet.").first()).toBeVisible(); + await client.getByRole("button", { name: "Done", exact: true }).click(); + await client.getByRole("button", { name: "Play Again", exact: true }).click(); + await expect(client.getByRole("button", { name: "Start Game", exact: true })).toBeVisible(); + await client.getByRole("button", { name: "Start Game", exact: true }).click(); + await expect(client.getByRole("button", { name: "Re-roll (2)", exact: true })).toBeEnabled(); + await faults(client, { delay: 500 }); + await client.getByTestId("die-0").click(); + await expect(client.getByRole("button", { name: "Pause Game", exact: true })).toBeDisabled(); + await expect(client.getByRole("button", { name: "Pause Game", exact: true })).toBeEnabled(); + await faults(client, { delay: 0 }); + await client.getByRole("button", { name: "Pause Game", exact: true }).click(); + await confirm(client, "Discard saved game"); + await expect(client.getByRole("button", { name: "Start Game", exact: true })).toBeVisible(); + expect((await saved(client)).history.entries).toHaveLength(1); + expect((await (await request.get("/inspect")).json()).logs).toHaveLength(0); + expect(rpcs).toEqual([]); expect(errors).toEqual([]); + }); +} + +test("native adapter recovery does not silently replace damaged data; reset clears even unsaved name text", async ({ client }, info) => { + await client.addInitScript((key) => { + localStorage.setItem(key, '{"schemaVersion":999}'); + localStorage.setItem("yahtzee-theme", "dark"); localStorage.setItem("unrelated", "keep"); + }, SAVE_KEY); + await client.goto(`${origin}/mobile`); + await expect(client.getByRole("alert")).toContainText("damaged or uses unsupported rules"); + await client.getByRole("button", { name: "Try loading again", exact: true }).click(); + expect(await client.evaluate((key) => localStorage.getItem(key), SAVE_KEY)).toBe('{"schemaVersion":999}'); + await client.getByRole("button", { name: "Help", exact: true }).click(); + await client.getByRole("button", { name: "Delete all local data", exact: true }).click(); + await client.getByRole("button", { name: "Cancel", exact: true }).click(); + expect(await client.evaluate((key) => localStorage.getItem(key), SAVE_KEY)).toBe('{"schemaVersion":999}'); + await faults(client, { removes: 1 }); + await confirm(client, "Delete all local data"); + await expect(client.getByRole("alert").last()).toContainText("Injected storage removes failure"); + await client.getByRole("button", { name: "Retry save", exact: true }).last().click(); + await client.getByRole("button", { name: "Done", exact: true }).click(); + await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue(""); + expect(await client.evaluate(() => localStorage.getItem("unrelated"))).toBe("keep"); + expect(await client.evaluate(() => localStorage.getItem("yahtzee-theme"))).toBeNull(); + await client.getByRole("textbox", { name: "Your name" }).fill("Unsaved private name"); + await choose(client, "Appearance", "Light"); + await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue("Unsaved private name"); + await client.getByRole("button", { name: "Help", exact: true }).click(); + await confirm(client, "Delete all local data"); + await client.getByRole("button", { name: "Done", exact: true }).click(); + await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue(""); + expect((await saved(client)).preferences.appearance).toBe("system"); + await client.screenshot({ path: info.outputPath("adapter-reset.png") }); +}); diff --git a/tests/clients/server.ts b/tests/clients/server.ts index 050da00..3cb193c 100644 --- a/tests/clients/server.ts +++ b/tests/clients/server.ts @@ -36,6 +36,7 @@ for (const client of ["web", "desktop", "mobile"]) { }); build.onResolve({ filter: /^convex\/react$/ }, () => ({ path: resolve("tests/clients/backend-client.tsx") })); build.onResolve({ filter: /^react-native$/ }, () => ({ path: require.resolve("react-native-web") })); + build.onResolve({ filter: /^react-native-safe-area-context$/ }, () => ({ path: resolve("tests/clients/native-safe-area.tsx") })); build.onResolve({ filter: /^@react-native-async-storage\/async-storage$/ }, () => ({ path: resolve("tests/clients/native-storage.ts") })); } }], }); diff --git a/tests/clients/tsconfig.json b/tests/clients/tsconfig.json index f02d2e0..3612909 100644 --- a/tests/clients/tsconfig.json +++ b/tests/clients/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { "noEmit": true, "rootDir": "../..", "types": ["bun", "node"] }, + "compilerOptions": { "noEmit": true, "rootDir": "../..", "types": ["bun", "node"], "paths": { "react-native": ["../../apps/mobile/node_modules/react-native"] } }, "include": ["./**/*.ts", "./**/*.tsx", "../offline/**/*.ts", "../../playwright.config.ts"] } From 64f4b361fc6f715739ad31235dc117ab9ecdbe86 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 18:28:12 -0400 Subject: [PATCH 03/13] feat: add SQLite native saves and unsigned simulator qualification --- .github/workflows/quality.yml | 50 ++++- apps/mobile/.gitignore | 4 + apps/mobile/app.json | 36 ++-- apps/mobile/assets/README.md | 21 ++ apps/mobile/assets/icon-dark.png | Bin 0 -> 40279 bytes apps/mobile/assets/icon-source.svg | 14 ++ apps/mobile/assets/icon-tinted.png | Bin 0 -> 37956 bytes apps/mobile/assets/icon.png | Bin 0 -> 41553 bytes apps/mobile/assets/launch-mark.png | Bin 0 -> 43772 bytes apps/mobile/assets/provenance.json | 47 +++++ apps/mobile/package.json | 12 +- apps/mobile/src/local/LocalProvider.tsx | 4 +- .../src/local/platformStorage.native.ts | 8 + apps/mobile/src/local/platformStorage.ts | 4 + apps/mobile/src/local/sqliteStorage.ts | 80 ++++++++ apps/mobile/src/local/store.ts | 7 +- apps/mobile/src/screens/Help.tsx | 2 +- bun.lock | 34 +++- docs/mobile-offline.md | 36 ++++ docs/native-simulator.md | 44 +++++ .../game-engine/tests/nativeSqlite.test.ts | 182 ++++++++++++++++++ scripts/ios-assets/check.test.mjs | 40 ++++ scripts/ios-assets/generate.mjs | 34 ++++ scripts/ios-native/flows.mjs | 47 +++++ scripts/ios-native/flows.test.mjs | 44 +++++ scripts/ios-native/run.mjs | 178 +++++++++++++++++ 26 files changed, 897 insertions(+), 31 deletions(-) create mode 100644 apps/mobile/assets/README.md create mode 100644 apps/mobile/assets/icon-dark.png create mode 100644 apps/mobile/assets/icon-source.svg create mode 100644 apps/mobile/assets/icon-tinted.png create mode 100644 apps/mobile/assets/icon.png create mode 100644 apps/mobile/assets/launch-mark.png create mode 100644 apps/mobile/assets/provenance.json create mode 100644 apps/mobile/src/local/platformStorage.native.ts create mode 100644 apps/mobile/src/local/platformStorage.ts create mode 100644 apps/mobile/src/local/sqliteStorage.ts create mode 100644 docs/mobile-offline.md create mode 100644 docs/native-simulator.md create mode 100644 packages/game-engine/tests/nativeSqlite.test.ts create mode 100644 scripts/ios-assets/check.test.mjs create mode 100644 scripts/ios-assets/generate.mjs create mode 100644 scripts/ios-native/flows.mjs create mode 100644 scripts/ios-native/flows.test.mjs create mode 100644 scripts/ios-native/run.mjs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 56e3949..d9db664 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -44,7 +44,7 @@ jobs: - name: iOS release-record consistency tests and draft check if: ${{ !cancelled() && steps.install.outcome == 'success' }} run: | - node --test scripts/ios-release/*.test.mjs + node --test scripts/ios-release/*.test.mjs scripts/ios-assets/*.test.mjs scripts/ios-native/*.test.mjs node scripts/ios-release/check.mjs - name: Unit and backend tests if: ${{ !cancelled() && steps.install.outcome == 'success' }} @@ -60,7 +60,6 @@ jobs: env: EXPO_OFFLINE: '1' EXPO_NO_TELEMETRY: '1' - EXPO_PUBLIC_CONVEX_URL: https://fixture.invalid run: bun run build:mobile - name: Install client-test browser and host dependencies id: browsers @@ -121,10 +120,50 @@ jobs: retention-days: 3 if-no-files-found: warn + native: + name: Unsigned iPhone and iPad qualification + runs-on: macos-26 + timeout-minutes: 60 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '24.12.0' + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 + with: + bun-version: '1.4.2' + - name: Install locked dependencies without lifecycle scripts + run: bun install --frozen-lockfile --ignore-scripts + - name: Install hash-verified local Maestro CLI + shell: bash + run: | + curl --fail --location --retry 2 https://github.com/mobile-dev-inc/Maestro/releases/download/cli-2.10.0/maestro.zip -o "$RUNNER_TEMP/maestro.zip" + printf '%s %s\n' '29b675e10cc12080e445e9bfb2e2b4e4dfb9c0f2e30d5884120d258b5e1cd991' "$RUNNER_TEMP/maestro.zip" | shasum -a 256 -c - + unzip -q "$RUNNER_TEMP/maestro.zip" -d "$RUNNER_TEMP/maestro-tool" + test -x "$RUNNER_TEMP/maestro-tool/maestro/bin/maestro" + echo "$RUNNER_TEMP/maestro-tool/maestro/bin" >> "$GITHUB_PATH" + echo "JAVA_HOME=$(/usr/libexec/java_home -v 17)" >> "$GITHUB_ENV" + - name: Build a Release simulator app and exercise native screens and saves + run: bun scripts/ios-native/run.mjs + - name: Require the reviewed CocoaPods lock after bootstrap + run: test -f apps/mobile/native/Podfile.lock + - name: Retain unsigned native evidence, including failed-run diagnostics + if: ${{ always() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ios-native-${{ github.event.pull_request.head.sha || github.sha }} + path: reports/native/ + retention-days: 1 + compression-level: 9 + if-no-files-found: warn + quality-gate: name: quality-gate if: ${{ always() }} - needs: [validate, mutation] + needs: [validate, mutation, native] runs-on: ubuntu-latest timeout-minutes: 2 steps: @@ -132,8 +171,9 @@ jobs: env: VALIDATION_RESULT: ${{ needs.validate.result }} MUTATION_RESULT: ${{ needs.mutation.result }} + NATIVE_RESULT: ${{ needs.native.result }} run: | - if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ]; then - echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT" + if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ] || [ "$NATIVE_RESULT" != success ]; then + echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT native=$NATIVE_RESULT" exit 1 fi diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore index b57f48a..c9d795c 100644 --- a/apps/mobile/.gitignore +++ b/apps/mobile/.gitignore @@ -1,2 +1,6 @@ # Editable release records are source, unlike generated desktop release output. !/release/ + +# Generated by Expo prebuild. Keep native configuration in app.json/plugins. +/ios/ +/android/ diff --git a/apps/mobile/app.json b/apps/mobile/app.json index 2914aa3..a3de55d 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -2,25 +2,39 @@ "expo": { "name": "Yahtzee", "slug": "yahtzee", - "version": "0.1.0", + "version": "1.0.0", "scheme": "yahtzee", "platforms": ["ios", "android"], - "orientation": "portrait", + "orientation": "default", + "userInterfaceStyle": "automatic", "icon": "./assets/icon.png", - "splash": { - "image": "./assets/splash.png", - "resizeMode": "contain", - "backgroundColor": "#fafafa" - }, "ios": { - "bundleIdentifier": "com.hemsoft.yahtzee" + "bundleIdentifier": "com.hemsoft.yahtzee", + "buildNumber": "1", + "supportsTablet": true, + "requireFullScreen": false, + "icon": { + "light": "./assets/icon.png", + "dark": "./assets/icon-dark.png", + "tinted": "./assets/icon-tinted.png" + } }, "android": { "package": "com.hemsoft.yahtzee", "adaptiveIcon": { - "foregroundImage": "./assets/icon.png", - "backgroundColor": "#fafafa" + "foregroundImage": "./assets/launch-mark.png", + "backgroundColor": "#1e453a" } - } + }, + "plugins": [ + "expo-router", + ["expo-build-properties", { "ios": { "deploymentTarget": "17.0" } }], + ["expo-splash-screen", { + "image": "./assets/launch-mark.png", + "imageWidth": 160, + "backgroundColor": "#f2f2f7", + "dark": { "image": "./assets/launch-mark.png", "backgroundColor": "#000000" } + }] + ] } } diff --git a/apps/mobile/assets/README.md b/apps/mobile/assets/README.md new file mode 100644 index 0000000..be5a04c --- /dev/null +++ b/apps/mobile/assets/README.md @@ -0,0 +1,21 @@ +# Development icon and launch assets + +These assets use original repository-authored SVG geometry derived from the game's pip controls. There is no external artwork, font, sound or copied product logo. The source and exports follow the repository's MIT license. This does not clear third-party names or trademarks. + +`icon-source.svg` is the editable source. It combines a tilted porcelain die, an evergreen background, four evergreen corner pips and a clay center pip. Do not add lettering, an Apple-style rounded mask or an outer transparent margin to the iOS icon exports. iOS applies its own shape. + +- `icon.png`: opaque light/App Store master, 1024 by 1024. +- `icon-dark.png`: opaque dark variant, 1024 by 1024. +- `icon-tinted.png`: opaque grayscale tinted variant, 1024 by 1024. +- `launch-mark.png`: transparent launch/Android foreground mark, 1024 by 1024. + +Regenerate from the repository root with ImageMagick 7.1.2-13 Q16-HDRI: + +```sh +node scripts/ios-assets/generate.mjs +node --test scripts/ios-assets/check.test.mjs +``` + +The generator changes colors from the SVG source, strips export metadata and records the renderer plus source/export hashes in `provenance.json`. The source hash normalizes line endings to LF. Tests fully decode the PNGs, check hashes/dimensions/opacity, enforce grayscale for the tinted variant and check app-configuration references. + +Inspect native launch, small home-screen, dark and tinted rendering before release. File validation and local image inspection do not prove every system treatment. `publicIdentityApproved` remains false. Do not treat the development name, icon files or source license as public-brand or App Store approval. diff --git a/apps/mobile/assets/icon-dark.png b/apps/mobile/assets/icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..9467cd72ae065ddc51081a13473dad678a2b133f GIT binary patch literal 40279 zcmeGE`9IWc*awV%EJfKVOG1|lAw>2y1|?f6%h*!(T}XCaWlOkZOLjuikY&bh6q1mA zgc$oa_A!RB%yUln_x|Dgdj5pxe)YrjVm{~RJdgE#ypQ7)Yiy{?boRno2!fdI+=iJz z5H0vGEksWZKDNS}h9M{dx&yoQ;Q9F4F){bbXy8(C4o3!C($oXT2M;q{HzPdrnEJO~ z$Q{e1Xz8gapY*JhCn45Ll=DEBH2&{FiX8q=IR9rk6g&7o z@A&^-=(w^*1e$O4XTPV{#YH9~F<~rh8iy1)^tZs~chu|5x82(M^SwnbN;9_g!`)Qx zuel+#Q(~3^XTiUmr90JQyDCPd7)j&wQ#9<N!#D5_MhdB6Bojo3Wnl_|fIu+B3_^sZE^Qs|3fw0r#61 z2tmHC4bmnTCC}+aJ}xyD$yT*g34Uh(_;G_(ImXqW&HvyNb%aErj9dDF>S+jS7%EaF zrMre|xecA2K=H)?9?SVKXTNixua>*vFI^wBV{;3qsj%C@M!DxFZD4@*tR020l(E8!Yau zgs830%QT0M*-&IR7yHp81LYCbr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oaKDe%*aFGU0Z2kIAhv%rd9MAD$jVzpPa=B7&v`*Q~-~EPprsOCZ`}i%2(O59T zYLYG_@(+|d4R<6B7L1hn;QM0@s~xsSs;f%v2ERRRsPvY-)cT6WGso0A2F|6mrr-%G$c{QhchZhjA~vyZ#6dZ%ji!x5Q+gF(p@Q`iX{%6iYMKu~YL z!~dqrsb|T3T3O#82EiKZG0F!K4F(}=K0`tO0|sTcG!S>36X!5oWChEu%EP#1V|+>a z|5;hi-XD*0fz;iSgKb+k8-qc1TG};W&p&Fd%~Sr!C;oP+CcxvJimY^j&BO|ulgB69 zNH5RafBB`Z&Q1HmQ+2bx`OiBMsq16(n)yJGAcH`Q@N$-^sgb}g^VaP2>ucx6Zm%ml zJ&k)??(T%o&v=0mx#r)_gv)I=w;E@sr>CW-Utc$O=G?g}|FtaASax~QnyHsP4W*to zAIz{g!*)2w;>5Gxhk^0(^2?=?I*T)_XK(vd^JmrJuV;TTY>?q#;JDJMuww2m0gbL# z#>UyNzOIPt7u$DrvGD$XQ)5{!XBy5GyZmyCRmqDlroYr`86vi&P5Z^n;Qjc@+nvk* zRRoH-78ZT7h(9h1Auru}MWV0a!;yV4#wrugBRAdnOQZuw$h mU>s$RhQnwg7_ph*=l}hdlF>N + Development dice mark + + + + + + + + + + + + diff --git a/apps/mobile/assets/icon-tinted.png b/apps/mobile/assets/icon-tinted.png new file mode 100644 index 0000000000000000000000000000000000000000..01bc68894a105d67ac6eeff10c32aaef6c9b64f8 GIT binary patch literal 37956 zcmeFZhdY*i{62o&HzEn8A<1eWvqF-U5Xw#(#;r|4R>-)O(j?I$AzNmWY^9PGvI$A{ zN*UST^SXP!<2ZhQ!tdjFjz>?=eP7r6dXLxZe4Xd{x~>@+>{-gr$4(H$Qe7QQ6M|sI zADIa@Dt`U)E3735I-#q%YrjYHVC$(z{B@Bd3#xUVUe1F8mqX+}P+|yb05etd3oWyw znOW4nem+z0=2I{tqcI__69Vd+J6 z^rk}8)(6OXJs>_^#$V7qlb0{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U$D|{zV_Np}~@m-Tw>- zrfoD!X95@Q>k`&Xw?U-o)&29t@nc8EX{C3#F!g2~a0qC*&&=jc?EatjuKcN~D+)ir zj$=_O0)g^|lo4o*M zgq^ApAttG$0b>Xdk%Rz&DkN$kNe|OMqrM;Byr1s9@4R!q?>pzty9Yp}RTsYnrT`;jz}+(cLVn*> zoo+NUkEP(W!jIIfHoWgqSzr)$$gSqUeS?jyJ2Fdhs~U-{#`4cALrYgnat19XIXjW& zQC{}fsGVO`XaupC+dkaE0jLK zf1AV=$hWTu=G=37@hX~D;pogfr_8ZfDCYh{#k5B8HcQlX4V1LVB~e*LsFa6GOmgQ*yVEKUp=|p;-d5UX0l|93 zWBn!CM`2|kpBjG=Z^_fQX|V%W&x0901xr2!-pmcc-6hB&yJKwBPvPib3L77_GQc6^KP5qy>edDVY`xVZ8o($c|<8i`~zXZF(XFn zl@WF#7gHi(+DlU}ynT2z#g{xKP`lKTpHg&}cGZyu3!7cUq-YNI*q!wG2V2+WgB8u$ z^cQgr#=EHGl`4=5djX@9(s4L!53>8m zmf+Z6)b|6qa;BU;!NC-OKe%#J_$&Qu6R5Y^eweHS+p{PrV@YFc=V9z{5QU5L=C`<< z!I`F2L+`-!@+KVsm%s-XDKRrb++GNOb#tEIao@l-*rYk$f|48}xpXdEed0Uk<3dX8 z&dZ8JtTx?~4fEWglhr?@3opAwRzILtL!~$#C|9USRD`d?5y7y# sj373SaC`Uo&JORK;Qt#8*R3Bc5DqU3-d{NiXn;f>KmBccSlY#Z0d;tnuK)l5 literal 0 HcmV?d00001 diff --git a/apps/mobile/assets/launch-mark.png b/apps/mobile/assets/launch-mark.png new file mode 100644 index 0000000000000000000000000000000000000000..f484f35828f9995a4a76371b572e7c7244a25bfb GIT binary patch literal 43772 zcmeFZc{tSX_dhWhk(!Lu--uZ^dZV>{dgu?Er zhCbTfU05-770WLW5V5s6`j!opQ}+6re5j`cFg@`LDnvy1LiGa*e< ziH2DG2YUz)3X9KW=a@d9(_f%>c9t6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{ - const [store] = useState(() => createLocalStore(AsyncStorage)); + const [store] = useState(() => createLocalStore(createPlatformStorage())); const view = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot); const system = useColorScheme(); const preference = view.data?.preferences.appearance ?? "system"; diff --git a/apps/mobile/src/local/platformStorage.native.ts b/apps/mobile/src/local/platformStorage.native.ts new file mode 100644 index 0000000..1544e7e --- /dev/null +++ b/apps/mobile/src/local/platformStorage.native.ts @@ -0,0 +1,8 @@ +import AsyncStorage from "@react-native-async-storage/async-storage"; +import * as SQLite from "expo-sqlite"; +import { createSqliteStorage, DATABASE_NAME, removeDatabaseFiles } from "./sqliteStorage"; + +export const createPlatformStorage = () => createSqliteStorage({ + open: () => SQLite.openDatabaseAsync(DATABASE_NAME, { useNewConnection: true }), + remove: () => removeDatabaseFiles(SQLite.deleteDatabaseAsync), +}, AsyncStorage); diff --git a/apps/mobile/src/local/platformStorage.ts b/apps/mobile/src/local/platformStorage.ts new file mode 100644 index 0000000..7dc6956 --- /dev/null +++ b/apps/mobile/src/local/platformStorage.ts @@ -0,0 +1,4 @@ +import AsyncStorage from "@react-native-async-storage/async-storage"; + +/** Web development/fixture adapter; native builds select platformStorage.native.ts. */ +export const createPlatformStorage = () => AsyncStorage; diff --git a/apps/mobile/src/local/sqliteStorage.ts b/apps/mobile/src/local/sqliteStorage.ts new file mode 100644 index 0000000..8b26700 --- /dev/null +++ b/apps/mobile/src/local/sqliteStorage.ts @@ -0,0 +1,80 @@ +import { SAVE_KEY } from "./save"; +import type { StoragePort } from "./store"; + +export const DATABASE_NAME = "hemsoft-local-dice.db"; +export interface SqlConnection { + execAsync(sql: string): Promise; + runAsync(sql: string, ...parameters: string[]): Promise; + getFirstAsync(sql: string, ...parameters: string[]): Promise; + closeAsync(): Promise; +} +export interface SqlFactory { + open(): Promise; + remove(): Promise; +} + +async function initialize(database: SqlConnection) { + const integrity = await database.getFirstAsync<{ quick_check: string }>("PRAGMA quick_check"); + if (integrity?.quick_check !== "ok") throw new Error("Local database is damaged. Your data has not been reset."); + const version = await database.getFirstAsync<{ user_version: number }>("PRAGMA user_version"); + if (version?.user_version !== 0 && version?.user_version !== 1) throw new Error("Local database uses an unsupported version. Your data has not been reset."); + if (version.user_version === 0) await initializeEmpty(database); + // Validate the expected table before changing any settings on an existing database. + await database.getFirstAsync("SELECT key, value FROM local_save LIMIT 1"); + await database.execAsync("PRAGMA journal_mode = WAL; PRAGMA synchronous = FULL;"); +} +async function initializeEmpty(database: SqlConnection) { + const existing = await database.getFirstAsync<{ name: string }>("SELECT name FROM sqlite_master WHERE name NOT LIKE 'sqlite_%' LIMIT 1"); + if (existing) throw new Error("Unrecognized local database. Your data has not been reset."); + await database.execAsync("BEGIN IMMEDIATE; CREATE TABLE local_save (key TEXT PRIMARY KEY NOT NULL, value TEXT NOT NULL); PRAGMA user_version = 1; COMMIT;"); +} + +/** Single-document SQL commits. Only an explicit reset can remove the dedicated database. */ +export function createSqliteStorage(factory: SqlFactory, legacy: StoragePort) { + let connection: Promise | null = null; + let initialized = false; + const close = async () => { + const database = await connection?.catch(() => null); + if (database) await database.closeAsync(); + connection = null; + initialized = false; + }; + const ready = async () => { + connection ??= factory.open(); + const database = await connection; + if (!initialized) { await initialize(database); initialized = true; } + return database; + }; + return { + close, + async getItem(key: string) { + if (key !== SAVE_KEY) return legacy.getItem(key); + // Explicit load/reload gets a new connection and checks the on-disk database. + await close(); + const row = await (await ready()).getFirstAsync<{ value: unknown }>("SELECT value FROM local_save WHERE key = ?", key); + if (!row) return null; + if (typeof row.value !== "string") throw new Error("Local save is not text. Your data has not been reset."); + return row.value; + }, + async setItem(key: string, value: string) { + if (key !== SAVE_KEY) return legacy.setItem(key, value); + await (await ready()).runAsync("INSERT INTO local_save (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value", key, value); + }, + async removeItem(key: string) { + if (key !== SAVE_KEY) return legacy.removeItem(key); + await (await ready()).runAsync("DELETE FROM local_save WHERE key = ?", key); + }, + async reset() { await close(); await factory.remove(); }, + }; +} + +/** Expo's deleteDatabaseAsync rejects missing files. Reset is idempotent, including sidecars. */ +export async function removeDatabaseFiles(remove: (name: string) => Promise) { + for (const suffix of ["", "-wal", "-shm", "-journal"]) { + try { await remove(DATABASE_NAME + suffix); } + catch (error) { if (!isMissingDatabase(error)) throw error; } + } +} +function isMissingDatabase(error: unknown) { + return error instanceof Error && "code" in error && error.code === "ERR_DATABASE_NOT_FOUND"; +} diff --git a/apps/mobile/src/local/store.ts b/apps/mobile/src/local/store.ts index ad7f2e1..cb8602f 100644 --- a/apps/mobile/src/local/store.ts +++ b/apps/mobile/src/local/store.ts @@ -5,6 +5,8 @@ export interface StoragePort { getItem(key: string): Promise; setItem(key: string, value: string): Promise; removeItem(key: string): Promise; + /** Remove only this app's dedicated storage after the UI confirms Reset All. */ + reset?(): Promise; } export interface LocalView { /** Reload/reset replaces unsaved UI drafts as well as the document. Not persisted. */ @@ -60,7 +62,10 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now const writePending = async () => { if (!pending) throw new Error("No save is waiting to be retried."); const transaction = pending; - if (transaction.reset) for (const key of LEGACY_KEYS) await storage.removeItem(key); + if (transaction.reset) { + await storage.reset?.(); + for (const key of LEGACY_KEYS) await storage.removeItem(key); + } await storage.setItem(SAVE_KEY, transaction.bytes); pending = null; publish({ data: transaction.data, error: null, canRetry: false, generation: view.generation + Number(transaction.reset) }); diff --git a/apps/mobile/src/screens/Help.tsx b/apps/mobile/src/screens/Help.tsx index 16c7035..0954303 100644 --- a/apps/mobile/src/screens/Help.tsx +++ b/apps/mobile/src/screens/Help.tsx @@ -35,7 +35,7 @@ export function Help() { {rules.map(([title, body]) =>

)}
- +
diff --git a/bun.lock b/bun.lock index 757acbe..19fd728 100644 --- a/bun.lock +++ b/bun.lock @@ -57,19 +57,21 @@ }, "apps/mobile": { "name": "@yahtzee/mobile", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@expo/metro-runtime": "57.0.16", "@react-native-async-storage/async-storage": "2.2.0", "@yahtzee/game-engine": "workspace:*", - "@yahtzee/ui": "workspace:*", - "convex": "1.46.0", "expo": "57.0.24", "expo-asset": "57.0.18", + "expo-build-properties": "57.0.21", "expo-constants": "57.0.19", "expo-linking": "57.0.10", "expo-router": "57.0.22", + "expo-splash-screen": "57.0.9", + "expo-sqlite": "57.0.3", "expo-status-bar": "57.0.1", + "expo-system-ui": "57.0.4", "react": "19.2.3", "react-native": "0.86.3", "react-native-safe-area-context": "5.9.1", @@ -801,6 +803,8 @@ "at-least-node": ["at-least-node@1.0.0", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="], + "await-lock": ["await-lock@2.2.2", "", {}, "sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw=="], + "aws4": ["aws4@1.13.2", "", {}, "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw=="], "babel-plugin-polyfill-corejs2": ["babel-plugin-polyfill-corejs2@0.4.17", "", { "dependencies": { "@babel/compat-data": "^7.28.6", "@babel/helper-define-polyfill-provider": "^0.6.8", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w=="], @@ -1069,6 +1073,8 @@ "expo-asset": ["expo-asset@57.0.18", "", { "dependencies": { "@expo/image-utils": "^0.11.5", "expo-constants": "~57.0.19" }, "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-zDIQkUr0NM2S7YRj98Zohf/OBuM1q0o4ctxLz1C1oe4/33lHNLjp+2v3qUtBWVwn0zKka8UGADmS8M+83Wi6pw=="], + "expo-build-properties": ["expo-build-properties@57.0.21", "", { "dependencies": { "@expo/schema-utils": "^57.0.2", "resolve-from": "^5.0.0", "semver": "^7.6.0" }, "peerDependencies": { "expo": "*" } }, "sha512-IF5/FPU4SezMYMupB2gfH6eAu197/oKI6Bn0oOT9UQiAg70BNiiQJ499eV21kIWIOGGPdLHg6XqIV5Zq4Gnn7Q=="], + "expo-constants": ["expo-constants@57.0.19", "", { "dependencies": { "@expo/env": "~2.4.3" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-3eK1kZRwCdMizQLlM/PPlPwjaPnB5qKvdRDMBMnB1ZxmvWJBf9TB4uEO4DMMfIPaFUxYFs29dsR5fPr1gh3FTQ=="], "expo-file-system": ["expo-file-system@57.0.7", "", { "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-1vkZRadOsIputFDBcclqBa1pO3iXOO6iIsdqJipQWw4V5TSnWgmRTuOF7ro8IzrVue+PHbum++KCG3Tawem4cg=="], @@ -1091,10 +1097,16 @@ "expo-server": ["expo-server@57.0.3", "", {}, "sha512-aK+LdKzauHSGmsOStZtyxdzv0zWssCkxTw3m4QuOhfDSJsZaMRTd9O41d8ixU/QfELTbaJ0oRNcF7JFV/7O9YQ=="], + "expo-splash-screen": ["expo-splash-screen@57.0.9", "", { "dependencies": { "@expo/config-plugins": "~57.0.9", "@expo/image-utils": "^0.11.5", "xml2js": "0.6.0" }, "peerDependencies": { "expo": "*" } }, "sha512-7cKDn7uBwg0RkcmY015/5j9st4msWJ4zQiPmQdVZoppW3cFSbv05n7xhM6CjUU466Tx4VRTqDF21HuIHkmnEtA=="], + + "expo-sqlite": ["expo-sqlite@57.0.3", "", { "dependencies": { "await-lock": "^2.2.2" }, "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-gbu9Nwm76DNpSK+MEhCjjjF3/EMyFE96IEDSlfO9jPiF4q48a7bef5EXnWVrwW8rvqCZKYAfSGqSpYNhhhpgIg=="], + "expo-status-bar": ["expo-status-bar@57.0.1", "", { "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-Xwaq1gAoVRWx5dPG5VhT5RSbnI9OilhZnO5qoPBnUaBAa5VzRzfdS8q0/bsPt0jR2DKLtGuP0bQ6efMJ4RIMDg=="], "expo-symbols": ["expo-symbols@57.0.3", "", { "dependencies": { "@expo-google-fonts/material-symbols": "^0.4.1", "sf-symbols-typescript": "^2.0.0" }, "peerDependencies": { "expo": "*", "expo-font": "*", "react": "*", "react-native": "*" } }, "sha512-uuK5yHLVR7kExUCrO/ItBvp/kp1maQ9Nkb6KvNy5ZUQnN0NMKwuhJ4GvbfS9N3ACmvCjTT4gKvg4yH5UuKIYNA=="], + "expo-system-ui": ["expo-system-ui@57.0.4", "", { "dependencies": { "@react-native/normalize-colors": "0.86.3", "debug": "^4.3.2" }, "peerDependencies": { "expo": "*", "react-native": "*", "react-native-web": "*" }, "optionalPeers": ["react-native-web"] }, "sha512-z//rxQJzhTNA1PcKrUtWmrd21jAS3nEDu1b0n8B/7LTTR933OcsZYP1HnbaZifuo2ZH/h7nce2Ow61WZ1Ig2bg=="], + "exponential-backoff": ["exponential-backoff@3.1.3", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -1915,7 +1927,7 @@ "xml2js": ["xml2js@0.6.0", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w=="], - "xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "xmlbuilder": ["xmlbuilder@11.0.1", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="], "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], @@ -2111,6 +2123,8 @@ "@expo/package-manager/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + "@expo/plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "@expo/prebuild-config/@react-native/normalize-colors": ["@react-native/normalize-colors@0.86.3", "", {}, "sha512-Cv3CDkprb67GrzuaS9BGbBJC/6G4lIw3nyKOHRKTqTTum4bn37y5+R0Z04L8mcbQN85eEohNrRwb7IOM4j6uvg=="], "@expo/xcpretty/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], @@ -2227,6 +2241,8 @@ "expo-modules-autolinking/commander": ["commander@7.2.0", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="], + "expo-system-ui/@react-native/normalize-colors": ["@react-native/normalize-colors@0.86.3", "", {}, "sha512-Cv3CDkprb67GrzuaS9BGbBJC/6G4lIw3nyKOHRKTqTTum4bn37y5+R0Z04L8mcbQN85eEohNrRwb7IOM4j6uvg=="], + "fbjs/promise": ["promise@7.3.1", "", { "dependencies": { "asap": "~2.0.3" } }, "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg=="], "filelist/minimatch": ["minimatch@5.1.9", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="], @@ -2333,6 +2349,8 @@ "pkijs/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "postject/commander": ["commander@9.5.0", "", {}, "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="], "pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], @@ -2387,8 +2405,6 @@ "unzipper/fs-extra": ["fs-extra@11.3.1", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g=="], - "xml2js/xmlbuilder": ["xmlbuilder@11.0.1", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="], - "@babel/core/@babel/traverse/@babel/helper-globals": ["@babel/helper-globals@7.29.7", "", {}, "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA=="], "@babel/generator/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@8.0.6", "", {}, "sha512-+6HYEBnsDRZHJtUTAEfMQd0zMDqdFHS7C+5vAsEZqBUr3vEMWOWlHJ0Jz1gS8jJIlCvLsuA6ivmeoqzH936YcA=="], @@ -2587,10 +2603,14 @@ "@electron/osx-sign/plist/@xmldom/xmldom": ["@xmldom/xmldom@0.9.12", "", {}, "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A=="], + "@electron/osx-sign/plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "@electron/universal/minimatch/brace-expansion": ["brace-expansion@2.1.7", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g=="], "@electron/universal/plist/@xmldom/xmldom": ["@xmldom/xmldom@0.9.12", "", {}, "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A=="], + "@electron/universal/plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "@eslint/config-array/minimatch/brace-expansion": ["brace-expansion@1.1.21", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw=="], "@eslint/eslintrc/ajv/json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="], @@ -2835,6 +2855,8 @@ "simple-plist/plist/@xmldom/xmldom": ["@xmldom/xmldom@0.9.12", "", {}, "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A=="], + "simple-plist/plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "@babel/helper-create-class-features-plugin/@babel/core/@babel/code-frame/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.6", "", {}, "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ=="], "@babel/helper-create-class-features-plugin/@babel/core/@babel/code-frame/js-tokens": ["js-tokens@10.0.0", "", {}, "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q=="], diff --git a/docs/mobile-offline.md b/docs/mobile-offline.md new file mode 100644 index 0000000..636a4fe --- /dev/null +++ b/docs/mobile-offline.md @@ -0,0 +1,36 @@ +# Native offline storage + +The iOS and Android app uses the shared rules through a small asynchronous storage interface. Web and Electron keep their existing adapters and online authority. Native gameplay does not construct a Convex client or send results to the online leaderboard. + +## Document and commit boundary + +`apps/mobile/src/local/save.ts` validates a schema-1, rules-2 JSON document under `hemsoft-local-dice-v1`. It contains preferences, one active game with a revision, the last 500 completed games and all-time top tens per mode. Native development currently supports 5, 6, 8 and 10 dice, one human and zero to three AI opponents. These are reversible engineering defaults, not release-scope approval. + +The store computes each move once, including AI turns, and stages its exact serialized document. It publishes state only after storage acknowledges the write. A failed acknowledgment blocks further moves. Retry writes the same bytes; it does not roll again or append another result. Explicit reload reads the stored state and abandons only the pending in-memory move. An unacknowledged move may be absent after process termination. + +Native builds select `platformStorage.native.ts`. Expo SQLite 57.0.3 stores the document as one parameter-bound SQL value in the dedicated `hemsoft-local-dice.db` database. Writes use SQLite autocommit with WAL and `synchronous=FULL`. Database format version 1 is separate from the document/rules versions. Loading checks integrity and the database version before schema or journal changes. Unsupported databases, unreadable storage, invalid JSON and invalid game state produce a visible recovery error rather than a reset. + +The web development adapter uses AsyncStorage's web implementation. Browser journeys are supplementary and do not test native SQLite, UIKit navigation, safe areas or VoiceOver. + +## Why game saves do not use native AsyncStorage + +Inspection of AsyncStorage 2.2.0's iOS implementation found two unsuitable behaviors for this contract. It recreates its in-memory manifest after manifest JSON damage, and it removes an external value file before committing a replacement inline value. A validator above `getItem` cannot reliably detect the first case. Native AsyncStorage remains only for importing the old names/theme preferences. No online scores are imported. No native game document from this branch had shipped before this backend change. + +## Recovery and deletion + +Normal load and failed writes never call the database deletion API. The Help reset requires confirmation. Reset closes the connection, removes only the dedicated database and its WAL, shared-memory and rollback-journal files, removes the two owned legacy preference keys, then writes defaults. Missing database files are tolerated; permission and other deletion failures remain visible and retryable. Other keys and apps are untouched. A successful reset/reload also clears unsaved UI name drafts. + +SQLite transaction recovery is not a guarantee against device loss, arbitrary filesystem destruction or faulty storage hardware. The app has no remote backup service or recovery account. Keep damaged bytes available for diagnosis until the user chooses reset. Do not add a catch-and-recreate path for database errors. + +## Backup and uninstall + +The development default uses Expo SQLite's iOS Documents/SQLite directory. It is eligible for standard OS-controlled device backup; the app does not independently sync it. Deleting the app removes its local container. Offloading can retain data, and restoring an older device backup can restore older games and preferences. Reset does not erase existing OS backups. No application-level database encryption is configured. + +Physical backup/restore, uninstall and locked-device behavior still need device qualification. The owner must review the final privacy disclosures before release. These source-level defaults are not an attestation that a particular backup has succeeded. + +## Evidence boundaries + +- `nativePersistence.test.ts` covers validation, staged retries, concurrency, all modes, completion retention and reset at the storage interface. +- `nativeSqlite.test.ts` uses real temporary SQLite files through Bun. It covers corruption preservation, schema rejection, SQL binding, restart, acknowledgment loss and explicit reset. It does not run Expo's native module. +- The [native simulator workflow](native-simulator.md) builds and exercises the actual Expo iOS app, reads its database, compares resume bytes and tests corrupt documents/databases through the native recovery UI. +- Real iPhone/iPad airplane-mode, VoiceOver, interruption, backup and TestFlight acceptance remain separate requirements in [issue 41](https://github.com/HemSoft/yahtzee/issues/41) and [issue 42](https://github.com/HemSoft/yahtzee/issues/42). diff --git a/docs/native-simulator.md b/docs/native-simulator.md new file mode 100644 index 0000000..23e4238 --- /dev/null +++ b/docs/native-simulator.md @@ -0,0 +1,44 @@ +# Unsigned iOS simulator qualification + +The native job in [Application quality](../.github/workflows/quality.yml) uses a standard public GitHub-hosted macOS runner. It does not use Apple credentials, a paid device cloud, signing, upload, TestFlight or App Store submission. Its result is a simulator app, not an installable iPhone archive. + +## Inputs + +- macOS 26 runner, with the actual runner image version recorded in the receipt. +- Xcode 26.6, build 17F113, selected explicitly at `/Applications/Xcode_26.6.app`. +- iOS Simulator SDK/runtime 26.5; iPhone 17 and iPad Pro 13-inch M5. +- Node 24.12.0, Bun 1.4.2, CocoaPods 1.17.0 and Java 17. +- Maestro CLI 2.10.0, downloaded from its [versioned release](https://github.com/mobile-dev-inc/Maestro/releases/tag/cli-2.10.0) and checked against SHA-256 `29b675e10cc12080e445e9bfb2e2b4e4dfb9c0f2e30d5884120d258b5e1cd991`. +- The committed Bun lock, Expo app configuration and reviewed CocoaPods lock. + +The workflow checks actual tool versions rather than relying on the runner's default Xcode. Hosted images still change. A changed toolchain requires a reviewed pin update; these commands do not promise bit-identical Xcode output across hosts. + +## Generated native project + +Expo prebuild generates `apps/mobile/ios` from source configuration. This directory is ignored. The runner refuses an existing native directory rather than deleting local work. Run it in a fresh macOS checkout with the listed tools after `bun install --frozen-lockfile --ignore-scripts`: + +```sh +bun scripts/ios-native/run.mjs +``` + +The initial bootstrap retains its generated Podfile.lock as an artifact and deliberately cannot satisfy the final reviewed-lock step. Inspect and commit that lock at `apps/mobile/native/Podfile.lock`. Subsequent builds copy it into the generated project and use `pod install --deployment`; dependency drift fails the job. Do not bypass that check or call the bootstrap a qualified release. + +Build configuration is Release, `CODE_SIGNING_ALLOWED=NO`, with an embedded Hermes/JavaScript bundle. No Metro server is started. The compiled bundle identifier, version, build and minimum iOS 17.0 must match source. The proposed 1.0.0/build 1 and existing development identifiers are not approved public identity or an App Store reservation. + +## Native interaction matrix + +The job creates and later deletes only its own simulators. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. + +Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. + +Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. + +This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad Stage Manager window-resize or signed-distribution acceptance. Browser-adapter results do not substitute for the native run. Review actual screenshots in one batch, apply one layout correction batch, then confirm. Functional failures still require diagnosis. + +## Receipts and retention + +`reports/native/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. Logs and partial receipts survive failures; the required quality gate includes the native job. A screenshot file's existence alone is not visual review or release approval. + +The artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist, screenshots, recording, test reports and synthetic database snapshots. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. + +References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/packages/game-engine/tests/nativeSqlite.test.ts b/packages/game-engine/tests/nativeSqlite.test.ts new file mode 100644 index 0000000..2d7a3bd --- /dev/null +++ b/packages/game-engine/tests/nativeSqlite.test.ts @@ -0,0 +1,182 @@ +import { afterEach, describe, expect, test } from "bun:test"; +import { Database } from "bun:sqlite"; +import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { createSqliteStorage, DATABASE_NAME, removeDatabaseFiles, type SqlConnection } from "../../../apps/mobile/src/local/sqliteStorage"; +import { createLocalStore, type StoragePort } from "../../../apps/mobile/src/local/store"; +import { emptySave, SAVE_KEY } from "../../../apps/mobile/src/local/save"; +import { getCategories } from "../src/scoring"; + +const cleanups: (() => void)[] = []; +afterEach(() => { for (const cleanup of cleanups.splice(0)) cleanup(); }); +function fixture() { + const directory = mkdtempSync(join(tmpdir(), "local-dice-sqlite-")); + const path = join(directory, DATABASE_NAME); + const connections: Database[] = []; + const values = new Map([["yahtzee-theme", "dark"], ["unrelated", "keep"]]); + const state = { openFailure: false, writeFailure: false, lostAck: false, closeFailure: false, removeFailure: false, deletes: 0, writes: [] as string[], integrity: undefined as string | null | undefined }; + const legacy: StoragePort = { + async getItem(key) { return values.get(key) ?? null; }, + async setItem(key, value) { values.set(key, value); }, + async removeItem(key) { values.delete(key); }, + }; + const factory = { + async open(): Promise { + if (state.openFailure) throw new Error("Database unavailable"); + const db = new Database(path); connections.push(db); + return { + async execAsync(sql) { db.exec(sql); }, + async getFirstAsync(sql: string, ...parameters: string[]): Promise { + if (sql === "PRAGMA quick_check" && state.integrity !== undefined) return (state.integrity === null ? null : { quick_check: state.integrity }) as T | null; + return db.query(sql).get(...parameters) as T | null; + }, + async runAsync(sql, ...parameters) { + state.writes.push(parameters[1]); + if (state.writeFailure) throw new Error("Storage full"); + const result = db.run(sql, ...parameters); + if (state.lostAck) throw new Error("Write acknowledgment lost"); + return result; + }, + async closeAsync() { if (state.closeFailure) throw new Error("Cannot close database"); db.close(); }, + }; + }, + async remove() { + state.deletes++; + if (state.removeFailure) throw new Error("Cannot remove database"); + for (const suffix of ["", "-wal", "-shm", "-journal"]) rmSync(path + suffix, { force: true }); + }, + }; + cleanups.push(() => { for (const db of connections) db.close(); rmSync(directory, { recursive: true, force: true }); }); + const port = createSqliteStorage(factory, legacy); + return { path, values, state, port, store: createLocalStore(port, () => "sqlite-game"), recreate: () => createSqliteStorage(factory, legacy), db: () => connections.at(-1)! }; +} +const options = { name: "Sam'; DROP TABLE local_save;--", diceCount: 6, aiOpponents: 3 }; + +describe("real SQLite persistence, without an Expo/iOS-runtime claim", () => { + test("commits a complete document, resumes held dice, and recovers one uncertain completion", async () => { + const f = fixture(); expect(await f.store.load()).toBe(true); + expect(f.store.getSnapshot().data?.preferences.appearance).toBe("dark"); + expect(f.db().query("PRAGMA journal_mode").get()).toEqual({ journal_mode: "wal" }); + expect(f.db().query("PRAGMA synchronous").get()).toEqual({ synchronous: 2 }); + expect(await f.store.start(options)).toBe(true); + expect(await f.store.move({ kind: "hold", index: 0 })).toBe(true); + expect(await f.store.move({ kind: "roll" })).toBe(true); + const saved = JSON.stringify(f.store.getSnapshot().data); + await f.port.close(); + const port = f.recreate(); const resumed = createLocalStore(port); + expect(await resumed.load()).toBe(true); + expect(JSON.stringify(resumed.getSnapshot().data)).toBe(saved); + const categories = getCategories(6); + for (const category of categories.slice(0, -1)) expect(await resumed.move({ kind: "score", category: category.id })).toBe(true); + f.state.lostAck = true; + expect(await resumed.move({ kind: "score", category: categories.at(-1)!.id })).toBe(false); + expect(resumed.getSnapshot().error).toBe("Write acknowledgment lost"); + const completedBytes = f.state.writes.at(-1); + f.state.lostAck = false; + expect(await resumed.retry()).toBe(true); + expect(f.state.writes.at(-1)).toBe(completedBytes); + await port.close(); + const restarted = createLocalStore(f.recreate()); + expect(await restarted.load()).toBe(true); + expect(restarted.getSnapshot().data?.history.entries).toHaveLength(1); + expect(restarted.getSnapshot().data?.active?.game.status).toBe("finished"); + }); + + test("does not overwrite a damaged database; only confirmed reset replaces it", async () => { + const f = fixture(); const damaged = Buffer.from("Not a SQLite database. Preserve these bytes."); + writeFileSync(f.path, damaged); + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().data).toBeNull(); + expect(f.state.deletes).toBe(0); + expect(readFileSync(f.path)).toEqual(damaged); + expect(await f.store.load()).toBe(false); + expect(readFileSync(f.path)).toEqual(damaged); + expect(await f.store.resetAll()).toBe(true); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + expect(f.values.has("yahtzee-theme")).toBe(false); + expect(f.values.get("unrelated")).toBe("keep"); + }); + + test("retains malformed document bytes in a valid database", async () => { + const f = fixture(); await f.port.setItem(SAVE_KEY, "{"); + expect(await f.store.load()).toBe(false); + expect(await f.port.getItem(SAVE_KEY)).toBe("{"); + expect(f.state.deletes).toBe(0); + await f.port.setItem(SAVE_KEY, JSON.stringify({ ...emptySave(), schemaVersion: 999 })); + expect(await f.store.load()).toBe(false); + expect(await f.port.getItem(SAVE_KEY)).toContain("999"); + }); + + test("retries unavailable reads and failed writes without replacing acknowledged data", async () => { + const f = fixture(); f.state.openFailure = true; + expect(await f.store.load()).toBe(false); + f.state.openFailure = false; + expect(await f.store.load()).toBe(true); + const before = f.store.getSnapshot().data; + f.state.writeFailure = true; + expect(await f.store.start(options)).toBe(false); + expect(f.store.getSnapshot().data).toEqual(before); + const staged = f.state.writes.at(-1); + f.state.writeFailure = false; + expect(await f.store.retry()).toBe(true); + expect(f.state.writes.at(-1)).toBe(staged); + }); + + test("reset fails visibly on close/removal errors and remains retryable", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const generation = f.store.getSnapshot().generation; + f.state.closeFailure = true; + expect(await f.store.resetAll()).toBe(false); + expect(f.state.deletes).toBe(0); + f.state.closeFailure = false; f.state.removeFailure = true; + expect(await f.store.retry()).toBe(false); + expect(f.store.getSnapshot().generation).toBe(generation); + f.state.removeFailure = false; + expect(await f.store.retry()).toBe(true); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + expect(f.store.getSnapshot().generation).toBe(generation + 1); + }); + + test("rejects unknown database versions and unrecognized schemas without resetting them", async () => { + for (const sql of ["PRAGMA user_version = 9", "CREATE TABLE unknown (value TEXT)", "PRAGMA user_version = 1"]) { + const f = fixture(); const db = new Database(f.path); db.exec(sql); db.close(); + const bytes = readFileSync(f.path); + expect(await f.store.load()).toBe(false); + expect(f.state.deletes).toBe(0); + await f.port.close(); + expect(readFileSync(f.path)).toEqual(bytes); + } + }); + + test("rejects failed integrity checks and non-text documents", async () => { + for (const integrity of ["damaged page", null]) { + const f = fixture(); f.state.integrity = integrity; + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().error).toContain("database is damaged"); + expect(f.state.deletes).toBe(0); + } + const f = fixture(); await f.store.load(); + f.db().exec("UPDATE local_save SET value = X'4142'"); + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().error).toContain("not text"); + }); + + test("routes legacy preferences separately and supports explicit key removal", async () => { + const f = fixture(); await f.port.setItem("legacy", "value"); + expect(await f.port.getItem("legacy")).toBe("value"); + await f.port.removeItem("legacy"); expect(await f.port.getItem("legacy")).toBeNull(); + await f.port.setItem(SAVE_KEY, "{}"); await f.port.removeItem(SAVE_KEY); + expect(await f.port.getItem(SAVE_KEY)).toBeNull(); + }); + + test("reset removes only the owned database family and ignores only confirmed missing files", async () => { + const names: string[] = []; + await removeDatabaseFiles(async (name) => { names.push(name); throw Object.assign(new Error("Missing"), { code: "ERR_DATABASE_NOT_FOUND" }); }); + expect(names).toEqual([DATABASE_NAME, DATABASE_NAME + "-wal", DATABASE_NAME + "-shm", DATABASE_NAME + "-journal"]); + await removeDatabaseFiles(async () => {}); + for (const error of [new Error("Permission denied"), { code: "ERR_DATABASE_NOT_FOUND" }, "unknown failure"]) { + await expect(removeDatabaseFiles(async () => { throw error; })).rejects.toEqual(error); + } + }); +}); diff --git a/scripts/ios-assets/check.test.mjs b/scripts/ios-assets/check.test.mjs new file mode 100644 index 0000000..feeb298 --- /dev/null +++ b/scripts/ios-assets/check.test.mjs @@ -0,0 +1,40 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { createHash } from "node:crypto"; +import { PNG } from "pngjs"; + +const folder = new URL("../../apps/mobile/assets/", import.meta.url); +const manifest = JSON.parse(readFileSync(new URL("provenance.json", folder), "utf8")); +const config = JSON.parse(readFileSync(new URL("../../apps/mobile/app.json", import.meta.url), "utf8")).expo; +const hash = (bytes) => createHash("sha256").update(bytes).digest("hex"); +test("editable source and all four raster exports match their recorded inputs", () => { + assert.equal(manifest.sourceSha256, hash(readFileSync(new URL("icon-source.svg", folder), "utf8").replace(/\r\n/g, "\n"))); + assert.deepEqual(manifest.exports.map((image) => image.file).sort(), ["icon-dark.png", "icon-tinted.png", "icon.png", "launch-mark.png"]); + for (const image of manifest.exports) { + const bytes = readFileSync(new URL(image.file, folder)); + assert.equal(hash(bytes), image.sha256); + const png = PNG.sync.read(bytes, { checkCRC: true }); + assert.equal(png.width, 1024); assert.equal(png.height, 1024); + assert.equal(image.width, png.width); assert.equal(image.height, png.height); + let transparent = false; + for (let index = 0; index < png.data.length; index += 4) { + if (png.data[index + 3] !== 255) transparent = true; + if (image.file === "icon-tinted.png") { + assert.equal(png.data[index], png.data[index + 1]); assert.equal(png.data[index], png.data[index + 2]); + } + } + assert.equal(transparent, image.transparencyAllowed, image.file); + } +}); +test("native configuration resolves the intended icons and launch mark", () => { + assert.equal(config.icon, "./assets/icon.png"); + assert.deepEqual(config.ios.icon, { light: "./assets/icon.png", dark: "./assets/icon-dark.png", tinted: "./assets/icon-tinted.png" }); + const splash = config.plugins.find((plugin) => Array.isArray(plugin) && plugin[0] === "expo-splash-screen")[1]; + assert.equal(splash.image, "./assets/launch-mark.png"); + assert.equal(splash.dark.image, splash.image); + assert.equal(config.ios.supportsTablet, true); + assert.equal(config.ios.requireFullScreen, false); + assert.equal(config.orientation, "default"); + assert.equal(config.userInterfaceStyle, "automatic"); +}); diff --git a/scripts/ios-assets/generate.mjs b/scripts/ios-assets/generate.mjs new file mode 100644 index 0000000..3882db0 --- /dev/null +++ b/scripts/ios-assets/generate.mjs @@ -0,0 +1,34 @@ +import { readFileSync, writeFileSync, mkdtempSync, rmSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { join } from "node:path"; +import { tmpdir } from "node:os"; +import { execFileSync } from "node:child_process"; +import { createHash } from "node:crypto"; + +const folder = fileURLToPath(new URL("../../apps/mobile/assets/", import.meta.url)); +const source = readFileSync(join(folder, "icon-source.svg"), "utf8").replace(/\r\n/g, "\n"); +const renderer = execFileSync("magick", ["-version"], { encoding: "utf8" }).split(/\r?\n/)[0]; +const variants = [ + { file: "icon.png", role: "ios-light-and-app-store", colors: {} }, + { file: "icon-dark.png", role: "ios-dark", colors: { "#1e453a": "#10251e", "#f5f4e9": "#cee2af" } }, + { file: "icon-tinted.png", role: "ios-tinted", colors: { "#1e453a": "#0b0b0b", "#f5f4e9": "#e8e8e8", "#244033": "#161616", "#92431f": "#606060" } }, + { file: "launch-mark.png", role: "launch-and-android-foreground", colors: {}, transparent: true }, +]; +const temporary = mkdtempSync(join(tmpdir(), "dice-assets-")); +try { + for (const variant of variants) { + let svg = source.replace(/#[0-9a-f]{6}/g, (color) => variant.colors[color] ?? color); + if (variant.transparent) svg = svg.replace(/ {2} createHash("sha256").update(bytes).digest("hex"); + writeFileSync(join(folder, "provenance.json"), JSON.stringify({ + schemaVersion: 1, origin: "Repository-authored SVG geometry, adapted from the game's pip controls", + source: "icon-source.svg", sourceSha256: hash(source), sourceNormalization: "LF", + renderer, generator: "scripts/ios-assets/generate.mjs", publicIdentityApproved: false, + externalArtwork: [], fonts: [], sound: [], + exports: variants.map(({ file, role, transparent }) => ({ file, role, width: 1024, height: 1024, transparencyAllowed: !!transparent, sha256: hash(readFileSync(join(folder, file))) })), + }, null, 2) + "\n"); +} finally { rmSync(temporary, { recursive: true, force: true }); } diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs new file mode 100644 index 0000000..34fd3a5 --- /dev/null +++ b/scripts/ios-native/flows.mjs @@ -0,0 +1,47 @@ +const command = (name, value) => `- ${name}${value === undefined ? "" : `: ${JSON.stringify(value)}`}`; +const visible = (text) => command("assertVisible", text); +const tap = (text) => command("tapOn", text); +const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 }); +const shot = (name) => command("takeScreenshot", name); +const header = (bundleId, commands) => `appId: ${JSON.stringify(bundleId)}\n---\n${commands.join("\n")}\n`; + +export function startFlow(bundleId, scenario) { + return header(bundleId, [command("launchApp", { clearState: true, permissions: { all: "deny" } }), + command("setOrientation", scenario.orientation), visible("A little time for dice."), shot("setup"), + scroll({ text: "Your name" }), tap("Your name"), command("eraseText"), command("inputText", "Local tester"), command("hideKeyboard"), + scroll({ text: "AI opponents" }), tap("AI opponents"), tap(scenario.ai ? "3 AI" : "Solo"), + scroll({ text: "Dice count" }), tap("Dice count"), tap(`${scenario.dice} dice`), + scroll({ text: "Start Game" }), tap("Start Game"), + scroll({ id: "die-0" }), command("tapOn", { id: "die-0" }), tap("Re-roll \\(2\\)"), visible("Re-roll \\(1\\)"), shot("held-and-rerolled")]); +} +export function resumeFlow(bundleId) { + return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), + scroll({ text: "Resume Game" }), tap("Resume Game"), visible("Re-roll \\(1\\)"), shot("resumed")]); +} +export function completeFlow(bundleId, categories) { + return header(bundleId, [ + ...categories.flatMap((id) => [scroll({ id: `score-${id}` }), command("tapOn", { id: `score-${id}` })]), + visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), + command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), + visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), tap("Done"), + scroll({ text: "Play Again" }), tap("Play Again"), scroll({ text: "Start Game" }), shot("play-again")]); +} +export function corruptFlow(bundleId, reset = false) { + const commands = [command("launchApp", { permissions: { all: "deny" } }), visible("Your saved data has not been reset."), shot("recovery")]; + if (reset) commands.push(tap("Help"), scroll({ text: "Delete all local data" }), tap("Delete all local data"), tap("Cancel"), + tap("Delete all local data"), command("tapOn", { text: "Delete all local data", index: 1 }), tap("Done"), scroll({ text: "Start Game" }), shot("explicit-reset")); + return header(bundleId, commands); +} + +export const scenarios = [ + { id: "phone-5-solo-light", device: "iPhone 17", dice: 5, ai: 0, appearance: "light", orientation: "PORTRAIT" }, + { id: "phone-5-ai-dark-wide", device: "iPhone 17", dice: 5, ai: 3, appearance: "dark", orientation: "LANDSCAPE_LEFT" }, + { id: "phone-6-solo-dark", device: "iPhone 17", dice: 6, ai: 0, appearance: "dark", orientation: "PORTRAIT" }, + { id: "phone-6-ai-light", device: "iPhone 17", dice: 6, ai: 3, appearance: "light", orientation: "PORTRAIT" }, + { id: "tablet-8-solo-light", device: "iPad Pro 13-inch (M5)", dice: 8, ai: 0, appearance: "light", orientation: "PORTRAIT" }, + { id: "tablet-8-ai-dark-wide", device: "iPad Pro 13-inch (M5)", dice: 8, ai: 3, appearance: "dark", orientation: "LANDSCAPE_LEFT" }, + { id: "tablet-10-solo-dark", device: "iPad Pro 13-inch (M5)", dice: 10, ai: 0, appearance: "dark", orientation: "PORTRAIT" }, + { id: "tablet-10-ai-light-wide", device: "iPad Pro 13-inch (M5)", dice: 10, ai: 3, appearance: "light", orientation: "LANDSCAPE_LEFT" }, + { id: "phone-largest-text", device: "iPhone 17", dice: 6, ai: 3, appearance: "dark", orientation: "PORTRAIT", largeText: true }, + { id: "tablet-largest-text", device: "iPad Pro 13-inch (M5)", dice: 10, ai: 3, appearance: "light", orientation: "PORTRAIT", largeText: true }, +]; diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs new file mode 100644 index 0000000..7464580 --- /dev/null +++ b/scripts/ios-native/flows.test.mjs @@ -0,0 +1,44 @@ +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; + +function parse(flow) { + const [header, body] = flow.trim().split("\n---\n"); + assert.equal(JSON.parse(header.slice("appId: ".length)), "com.hemsoft.yahtzee"); + return body.split("\n").map((line) => { + const match = /^- ([a-zA-Z]+)(?:: (.*))?$/.exec(line); assert(match, line); + return { command: match[1], value: match[2] === undefined ? undefined : JSON.parse(match[2]) }; + }); +} +test("native matrix covers every mode with solo and three AI, both devices/themes and largest text", () => { + const completed = scenarios.filter((item) => !item.largeText); + assert.equal(completed.length, 8); + for (const dice of [5, 6, 8, 10]) for (const ai of [0, 3]) assert(completed.some((item) => item.dice === dice && item.ai === ai)); + assert.equal(new Set(scenarios.filter((item) => item.largeText).map((item) => item.device)).size, 2); + assert.deepEqual(new Set(scenarios.map((item) => item.appearance)), new Set(["light", "dark"])); + assert(scenarios.some((item) => item.device.startsWith("iPad") && item.orientation === "LANDSCAPE_LEFT")); +}); +test("generated flows use valid JSON-in-YAML commands and real semantic controls", () => { + for (const scenario of scenarios) { + const steps = parse(startFlow("com.hemsoft.yahtzee", scenario)); + assert.deepEqual(steps[0].value, { clearState: true, permissions: { all: "deny" } }); + assert(steps.some((step) => step.command === "tapOn" && step.value === `${scenario.dice} dice`)); + assert(steps.some((step) => step.command === "tapOn" && step.value?.id === "die-0")); + assert(steps.some((step) => step.command === "assertVisible" && new RegExp(step.value).test("Re-roll (1)"))); + } + const resumed = parse(resumeFlow("com.hemsoft.yahtzee")); + assert.equal(resumed[0].value.clearState, undefined); + assert(resumed.some((step) => step.value === "Resume Game")); + const completed = parse(completeFlow("com.hemsoft.yahtzee", ["ones", "chance"])); + assert.equal(completed.filter((step) => step.command === "tapOn" && step.value?.id?.startsWith("score-")).length, 2); + assert(completed.some((step) => step.command === "assertVisible" && step.value === "Game Over!")); +}); +test("corruption flow never clears state and reset includes cancellation first", () => { + for (const reset of [false, true]) { + const steps = parse(corruptFlow("com.hemsoft.yahtzee", reset)); + assert.equal(steps[0].value.clearState, undefined); + assert(steps.some((step) => step.value === "Your saved data has not been reset.")); + assert.equal(steps.some((step) => step.value === "Cancel"), reset); + if (reset) assert(steps.findIndex((step) => step.value === "Cancel") < steps.findIndex((step) => step.value?.index === 1)); + } +}); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs new file mode 100644 index 0000000..f735749 --- /dev/null +++ b/scripts/ios-native/run.mjs @@ -0,0 +1,178 @@ +import assert from "node:assert/strict"; +import { spawn, spawnSync } from "node:child_process"; +import { createHash } from "node:crypto"; +import { closeSync, copyFileSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; +import { join, resolve } from "node:path"; +import { tmpdir } from "node:os"; +import { setTimeout as delay } from "node:timers/promises"; +import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; +import { decodeSave } from "../../apps/mobile/src/local/save.ts"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; + +assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); +const root = resolve(import.meta.dirname, "../.."); +const output = join(root, "reports/native"); +mkdirSync(output, { recursive: true }); +const env = { ...process.env, DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer", EXPO_NO_TELEMETRY: "1", + MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "120000" }; +const hash = (bytes) => createHash("sha256").update(bytes).digest("hex"); +const json = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + "\n"); +function run(executable, args, { cwd = root, capture = false, timeout = 1800000, log = "commands.log" } = {}) { + console.log(`$ ${executable} ${args.join(" ")}`); + const fd = openSync(join(output, log), "a"); + let result; + try { result = spawnSync(executable, args, { cwd, env, encoding: "utf8", timeout, maxBuffer: 16 * 1024 * 1024, stdio: ["ignore", capture ? "pipe" : fd, fd] }); } + finally { closeSync(fd); } + if (result.error) throw result.error; + assert.equal(result.status, 0, `${executable} failed with ${result.status}; see ${log}`); + return result.stdout?.trim() ?? ""; +} +const sim = (...args) => run("xcrun", ["simctl", ...args], { capture: true, timeout: 180000 }); +const plist = (file, key) => run("/usr/libexec/PlistBuddy", ["-c", `Print :${key}`, file], { capture: true }); +const receipt = { schemaVersion: 1, kind: "unsigned-ios-simulator", status: "running", source: run("git", ["rev-parse", "HEAD"], { capture: true }), + startedAt: new Date().toISOString(), runId: process.env.GITHUB_RUN_ID ?? null, runAttempt: process.env.GITHUB_RUN_ATTEMPT ?? null, + runnerImage: process.env.ImageVersion ?? null, scenarios: [], limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset"] }; +json(join(output, "manifest.json"), receipt); +const appRoot = join(root, "apps/mobile"); +const ownedDevices = []; +let recording = null; +async function stopRecording() { + if (!recording) return; + const child = recording; recording = null; + if (child.exitCode !== null) return; + const stopped = new Promise((done) => child.once("close", done)); + const controller = new AbortController(); + child.kill("SIGINT"); + try { await Promise.race([stopped, delay(15000, undefined, { signal: controller.signal }).then(() => { child.kill("SIGTERM"); throw new Error("Simulator recording did not stop."); })]); } + finally { controller.abort(); } +} +function flow(device, directory, name, content) { + const file = join(directory, `${name}.yaml`); writeFileSync(file, content); + run("maestro", ["--device", device, "test", "--test-output-dir", join(directory, name), "--debug-output", join(directory, `${name}-debug`), + "--format", "JUNIT", "--output", join(directory, `${name}.xml`), file], { timeout: 600000, log: `${name}-${directory.split(/[\\/]/).at(-1)}.log` }); +} +function saved(device, bundleId, directory, stage) { + const container = sim("get_app_container", device, bundleId, "data"); + const database = join(container, "Documents/SQLite/hemsoft-local-dice.db"); + const rows = JSON.parse(run("sqlite3", ["-readonly", "-json", database, "SELECT value FROM local_save WHERE key = 'hemsoft-local-dice-v1'"], { capture: true })); + assert.equal(rows.length, 1); + const bytes = rows[0].value; + const data = decodeSave(bytes); + writeFileSync(join(directory, `${stage}-save.json`), bytes + "\n"); + return { bytes, data, database }; +} +function artifactFiles(directory, prefix = "") { + return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { + const relative = prefix + entry.name; const path = join(directory, entry.name); + if (entry.isDirectory()) return artifactFiles(path, relative + "/"); + if (!entry.isFile() || relative === "manifest.json") return []; + return [{ path: relative, bytes: statSync(path).size, sha256: hash(readFileSync(path)) }]; + }); +} +try { + assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Use a clean source checkout."); + assert(!existsSync(join(appRoot, "ios")), "Use a fresh checkout. Existing native project files were not removed."); + receipt.toolchain = { + xcode: run("xcodebuild", ["-version"], { capture: true }), sdk: run("xcrun", ["--sdk", "iphonesimulator", "--show-sdk-version"], { capture: true }), + node: run("node", ["--version"], { capture: true }), bun: run("bun", ["--version"], { capture: true }), + cocoapods: run("pod", ["--version"], { capture: true }), ruby: run("ruby", ["--version"], { capture: true }), maestro: run("maestro", ["--version"], { capture: true }), + }; + assert.match(receipt.toolchain.xcode, /^Xcode 26\.6\nBuild version 17F113$/); + assert.equal(receipt.toolchain.sdk, "26.5"); assert.equal(receipt.toolchain.node, "v24.12.0"); + assert.equal(receipt.toolchain.bun, "1.4.2"); assert.equal(receipt.toolchain.cocoapods, "1.17.0"); + assert.match(receipt.toolchain.maestro, /2\.10\.0/); + receipt.bunLockSha256 = hash(readFileSync(join(root, "bun.lock"))); + run("node", ["node_modules/expo/bin/cli", "prebuild", "--platform", "ios", "--no-install"], { cwd: appRoot, log: "prebuild.log" }); + const ios = join(appRoot, "ios"); const sourceLock = join(appRoot, "native/Podfile.lock"); + receipt.bootstrapPodLock = !existsSync(sourceLock); + if (!receipt.bootstrapPodLock) copyFileSync(sourceLock, join(ios, "Podfile.lock")); + run("pod", ["install", ...(receipt.bootstrapPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); + copyFileSync(join(ios, "Podfile.lock"), join(output, "Podfile.lock")); + copyFileSync(join(ios, "Podfile.properties.json"), join(output, "Podfile.properties.json")); + const workspaces = readdirSync(ios).filter((name) => name.endsWith(".xcworkspace")); assert.equal(workspaces.length, 1); + const scheme = workspaces[0].slice(0, -".xcworkspace".length); + const derived = join(tmpdir(), `dice-derived-${process.pid}`); + run("xcodebuild", ["-workspace", join(ios, workspaces[0]), "-scheme", scheme, "-configuration", "Release", "-sdk", "iphonesimulator", + "-destination", "generic/platform=iOS Simulator", "-derivedDataPath", derived, "CODE_SIGNING_ALLOWED=NO", "build"], { log: "build.log", timeout: 2400000 }); + const products = join(derived, "Build/Products/Release-iphonesimulator"); + const apps = readdirSync(products).filter((name) => name.endsWith(".app")); assert.equal(apps.length, 1); + const app = join(products, apps[0]); const info = join(app, "Info.plist"); + const config = JSON.parse(readFileSync(join(appRoot, "app.json"), "utf8")).expo; + const bundleId = plist(info, "CFBundleIdentifier"); assert.equal(bundleId, config.ios.bundleIdentifier); + assert.equal(plist(info, "CFBundleShortVersionString"), config.version); assert.equal(plist(info, "CFBundleVersion"), config.ios.buildNumber); + assert.equal(plist(info, "MinimumOSVersion"), "17.0"); assert(existsSync(join(app, "main.jsbundle")), "Release app must contain its own JS bundle."); + receipt.app = { bundleId, version: config.version, build: config.ios.buildNumber, minimumOS: "17.0", jsBundleSha256: hash(readFileSync(join(app, "main.jsbundle"))) }; + run("tar", ["-czf", join(output, "unsigned-simulator.app.tar.gz"), "-C", products, apps[0]], { log: "package.log" }); + copyFileSync(info, join(output, "built-Info.plist")); + assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Prebuild changed tracked source. Review it before qualification."); + const runtime = "com.apple.CoreSimulator.SimRuntime.iOS-26-5"; + const types = JSON.parse(sim("list", "devicetypes", "--json")).devicetypes; + const devices = new Map(); + for (const name of new Set(scenarios.map((scenario) => scenario.device))) { + const type = types.find((item) => item.name === name); assert(type, `Missing simulator type ${name}`); + const device = sim("create", `Dice-${process.pid}-${name}`, type.identifier, runtime); ownedDevices.push(device); devices.set(name, device); + } + let booted = null; + for (const [index, scenario] of scenarios.entries()) { + const device = devices.get(scenario.device); + if (booted !== device) { + if (booted) sim("shutdown", booted); + sim("boot", device); sim("bootstatus", device, "-b"); booted = device; + sim("spawn", device, "defaults", "write", "NSGlobalDomain", "AppleLanguages", "-array", "en"); + sim("spawn", device, "defaults", "write", "NSGlobalDomain", "AppleLocale", "-string", "en_US"); + sim("install", device, app); + } + sim("ui", device, "appearance", scenario.appearance); + sim("ui", device, "content_size", scenario.largeText ? "accessibility-extra-extra-extra-large" : "large"); + sim("status_bar", device, "override", "--time", "9:41", "--batteryState", "charged", "--batteryLevel", "100"); + const directory = join(output, scenario.id); mkdirSync(directory, { recursive: true }); + const result = { ...scenario, udid: device, runtime, locale: "en-US", status: "running" }; receipt.scenarios.push(result); + if (index === 0) recording = spawn("xcrun", ["simctl", "io", device, "recordVideo", "--codec=h264", join(directory, "native-resume.mp4")], { env, stdio: "ignore" }); + flow(device, directory, "start", startFlow(bundleId, scenario)); + const before = saved(device, bundleId, directory, "before-relaunch"); + assert.equal(before.data.active.game.diceCount, scenario.dice); assert.equal(before.data.active.game.players.length, scenario.ai + 1); + assert.deepEqual(before.data.active.game.held, [0]); assert.equal(before.data.active.game.rollsLeft, 1); + sim("terminate", device, bundleId); + flow(device, directory, "resume", resumeFlow(bundleId)); + const after = saved(device, bundleId, directory, "after-relaunch"); assert.equal(after.bytes, before.bytes); + await stopRecording(); + if (!scenario.largeText) { + flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id))); + const completed = saved(device, bundleId, directory, "completed"); + assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); + assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); + } + result.status = "passed"; result.resumeDocumentSha256 = hash(before.bytes); + json(join(output, "manifest.json"), receipt); + } + // Exercise malformed document preservation through the actual native adapter and reset alert. + const device = booted; const directory = join(output, "corrupt-save"); mkdirSync(directory); + const current = saved(device, bundleId, directory, "before-corruption"); sim("terminate", device, bundleId); + run("sqlite3", [current.database, "UPDATE local_save SET value = 'damaged-save'"], { capture: true }); + flow(device, directory, "corrupt", corruptFlow(bundleId)); + assert.equal(run("sqlite3", ["-readonly", current.database, "SELECT value FROM local_save"], { capture: true }), "damaged-save"); + flow(device, directory, "reset", corruptFlow(bundleId, true)); + const reset = saved(device, bundleId, directory, "after-reset"); assert.equal(reset.data.active, null); assert.equal(reset.data.history.entries.length, 0); + sim("terminate", device, bundleId); + run("sqlite3", [reset.database, "PRAGMA wal_checkpoint(TRUNCATE)"], { capture: true }); + const damaged = Buffer.from("Native database corruption fixture. Preserve until explicit reset."); + writeFileSync(reset.database, damaged); + flow(device, directory, "corrupt-database", corruptFlow(bundleId)); + assert.deepEqual(readFileSync(reset.database), damaged); + flow(device, directory, "reset-database", corruptFlow(bundleId, true)); + assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); + receipt.nativeCorruptionAndReset = "passed"; + receipt.status = receipt.bootstrapPodLock ? "bootstrap-lock-needs-review" : "passed"; +} catch (error) { + receipt.status = "failed"; receipt.error = error instanceof Error ? error.message : String(error); process.exitCode = 1; + console.error(receipt.error); +} finally { + try { await stopRecording(); } catch (error) { receipt.recordingError = String(error); receipt.status = "failed"; process.exitCode = 1; } + for (const device of ownedDevices) { + // Only devices created by this process are shut down or deleted. + spawnSync("xcrun", ["simctl", "shutdown", device], { env, stdio: "ignore" }); + const removed = spawnSync("xcrun", ["simctl", "delete", device], { env, stdio: "ignore" }); + if (removed.status !== 0) { (receipt.cleanupErrors ??= []).push(device); receipt.status = "failed"; process.exitCode = 1; } + } + receipt.finishedAt = new Date().toISOString(); receipt.artifacts = artifactFiles(output); json(join(output, "manifest.json"), receipt); +} From d1446893bfadcb74e9ef2ba83305ddfd4b727162 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 19:08:38 -0400 Subject: [PATCH 04/13] fix: qualify Node 24.21 fixtures and lock native dependencies --- apps/mobile/native/Podfile.lock | 2692 +++++++++++++++++ apps/mobile/native/README.md | 9 + apps/mobile/src/local/diagnostics.ts | 12 + apps/mobile/src/local/keys.ts | 2 + apps/mobile/src/local/save.ts | 2 +- apps/mobile/src/local/sqliteStorage.ts | 2 +- apps/mobile/src/screens/Help.tsx | 20 +- docs/native-simulator.md | 8 +- .../tests/nativeDiagnostics.test.ts | 13 + scripts/ios-native/flows.mjs | 6 +- scripts/ios-native/flows.test.mjs | 3 + scripts/ios-native/run.mjs | 21 +- tests/clients/native.spec.ts | 9 +- 13 files changed, 2779 insertions(+), 20 deletions(-) create mode 100644 apps/mobile/native/Podfile.lock create mode 100644 apps/mobile/native/README.md create mode 100644 apps/mobile/src/local/diagnostics.ts create mode 100644 apps/mobile/src/local/keys.ts create mode 100644 packages/game-engine/tests/nativeDiagnostics.test.ts diff --git a/apps/mobile/native/Podfile.lock b/apps/mobile/native/Podfile.lock new file mode 100644 index 0000000..0defec1 --- /dev/null +++ b/apps/mobile/native/Podfile.lock @@ -0,0 +1,2692 @@ +PODS: + - EXConstants (57.0.19): + - ExpoModulesCore + - Expo (57.0.24): + - ExpoModulesCore + - ExpoModulesJSI + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTAppDelegate + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactAppDependencyProvider + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - ExpoAsset (57.0.18): + - ExpoModulesCore + - ExpoDomWebView (57.0.1): + - ExpoModulesCore + - ExpoFileSystem (57.0.7): + - ExpoModulesCore + - ExpoFont (57.0.4): + - ExpoModulesCore + - ExpoGlassEffect (57.0.3): + - ExpoModulesCore + - ExpoKeepAwake (57.0.2): + - ExpoModulesCore + - ExpoLinking (57.0.10): + - ExpoModulesCore + - ExpoLogBox (57.0.4): + - React-Core + - ExpoModulesCore (57.0.18): + - ExpoModulesJSI + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsinspector + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - ExpoModulesJSI (57.1.0): + - React-Core + - ReactCommon + - ExpoModulesWorklets (57.0.18): + - ExpoModulesCore + - ExpoModulesJSI + - ExpoModulesWorkletsAdapter (57.0.18): + - ExpoModulesCore + - ExpoModulesJSI + - ExpoModulesWorklets + - RNWorklets + - ExpoRouter (57.0.22): + - ExpoModulesCore + - RNScreens + - ExpoSplashScreen (57.0.9): + - ExpoModulesCore + - ExpoSQLite (57.0.3): + - ExpoModulesCore + - ExpoSymbols (57.0.3): + - ExpoModulesCore + - ExpoSystemUI (57.0.4): + - ExpoModulesCore + - ExpoUI (57.0.19): + - ExpoModulesCore + - ExpoModulesWorklets + - React-RCTFabric + - FBLazyVector (0.86.3) + - hermes-engine (250829098.0.17): + - hermes-engine/Pre-built (= 250829098.0.17) + - hermes-engine/Pre-built (250829098.0.17) + - RCTDeprecation (0.86.3) + - RCTRequired (0.86.3) + - RCTSwiftUI (0.86.3) + - RCTSwiftUIWrapper (0.86.3): + - RCTSwiftUI + - RCTTypeSafety (0.86.3): + - FBLazyVector (= 0.86.3) + - RCTRequired (= 0.86.3) + - React-Core (= 0.86.3) + - React (0.86.3): + - React-Core (= 0.86.3) + - React-Core/DevSupport (= 0.86.3) + - React-Core/RCTWebSocket (= 0.86.3) + - React-RCTActionSheet (= 0.86.3) + - React-RCTAnimation (= 0.86.3) + - React-RCTBlob (= 0.86.3) + - React-RCTImage (= 0.86.3) + - React-RCTLinking (= 0.86.3) + - React-RCTNetwork (= 0.86.3) + - React-RCTSettings (= 0.86.3) + - React-RCTText (= 0.86.3) + - React-RCTVibration (= 0.86.3) + - React-callinvoker (0.86.3) + - React-Core (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.86.3) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core-prebuilt (0.86.3): + - ReactNativeDependencies + - React-Core/CoreModulesHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/Default (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/DevSupport (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.86.3) + - React-Core/RCTWebSocket (= 0.86.3) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTActionSheetHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTAnimationHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTBlobHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTImageHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTLinkingHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTNetworkHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTSettingsHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTTextHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTVibrationHeaders (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTWebSocket (0.86.3): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.86.3) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-CoreModules (0.86.3): + - RCTTypeSafety (= 0.86.3) + - React-Core-prebuilt + - React-Core/CoreModulesHeaders (= 0.86.3) + - React-debug + - React-featureflags + - React-jsi (= 0.86.3) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-NativeModulesApple + - React-RCTBlob + - React-RCTFBReactNativeSpec + - React-RCTImage (= 0.86.3) + - React-runtimeexecutor + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-cxxreact (0.86.3): + - hermes-engine + - React-callinvoker (= 0.86.3) + - React-Core-prebuilt + - React-debug (= 0.86.3) + - React-jsi (= 0.86.3) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-logger (= 0.86.3) + - React-perflogger (= 0.86.3) + - React-runtimeexecutor + - React-timing (= 0.86.3) + - React-utils + - ReactNativeDependencies + - React-debug (0.86.3): + - React-debug/redbox (= 0.86.3) + - React-debug/redbox (0.86.3) + - React-defaultsnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-domnativemodule + - React-Fabric/animated + - React-featureflags + - React-featureflagsnativemodule + - React-idlecallbacksnativemodule + - React-intersectionobservernativemodule + - React-jsi + - React-jsiexecutor + - React-microtasksnativemodule + - React-mutationobservernativemodule + - React-RCTFBReactNativeSpec + - React-viewtransitionnativemodule + - React-webperformancenativemodule + - ReactNativeDependencies + - Yoga + - React-domnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-Fabric + - React-Fabric/bridging + - React-FabricComponents + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animated (= 0.86.3) + - React-Fabric/animationbackend (= 0.86.3) + - React-Fabric/animations (= 0.86.3) + - React-Fabric/attributedstring (= 0.86.3) + - React-Fabric/bridging (= 0.86.3) + - React-Fabric/componentregistry (= 0.86.3) + - React-Fabric/componentregistrynative (= 0.86.3) + - React-Fabric/components (= 0.86.3) + - React-Fabric/consistency (= 0.86.3) + - React-Fabric/core (= 0.86.3) + - React-Fabric/dom (= 0.86.3) + - React-Fabric/imagemanager (= 0.86.3) + - React-Fabric/leakchecker (= 0.86.3) + - React-Fabric/mounting (= 0.86.3) + - React-Fabric/observers (= 0.86.3) + - React-Fabric/scheduler (= 0.86.3) + - React-Fabric/telemetry (= 0.86.3) + - React-Fabric/uimanager (= 0.86.3) + - React-Fabric/viewtransition (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animated (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animationbackend + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animationbackend (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animations (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/attributedstring (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/bridging (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistry (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistrynative (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/components/legacyviewmanagerinterop (= 0.86.3) + - React-Fabric/components/root (= 0.86.3) + - React-Fabric/components/scrollview (= 0.86.3) + - React-Fabric/components/view (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/legacyviewmanagerinterop (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/root (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/scrollview (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/view (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric/consistency (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/core (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/dom (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/imagemanager (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/leakchecker (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/mounting (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-jsinspectortracing + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/observers/events (= 0.86.3) + - React-Fabric/observers/intersection (= 0.86.3) + - React-Fabric/observers/mutation (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/events (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/intersection (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/mutation (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/scheduler (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animationbackend + - React-Fabric/observers/events + - React-Fabric/viewtransition + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-performancecdpmetrics + - React-performancetimeline + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/telemetry (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/uimanager/consistency (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager/consistency (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/viewtransition (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-FabricComponents (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components (= 0.86.3) + - React-FabricComponents/textlayoutmanager (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components/inputaccessory (= 0.86.3) + - React-FabricComponents/components/iostextinput (= 0.86.3) + - React-FabricComponents/components/modal (= 0.86.3) + - React-FabricComponents/components/rncore (= 0.86.3) + - React-FabricComponents/components/safeareaview (= 0.86.3) + - React-FabricComponents/components/scrollview (= 0.86.3) + - React-FabricComponents/components/switch (= 0.86.3) + - React-FabricComponents/components/text (= 0.86.3) + - React-FabricComponents/components/textinput (= 0.86.3) + - React-FabricComponents/components/unimplementedview (= 0.86.3) + - React-FabricComponents/components/virtualview (= 0.86.3) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/inputaccessory (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/iostextinput (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/modal (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/rncore (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/safeareaview (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/scrollview (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/switch (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/text (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/textinput (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/unimplementedview (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/virtualview (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/textlayoutmanager (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricImage (0.86.3): + - hermes-engine + - RCTRequired (= 0.86.3) + - RCTTypeSafety (= 0.86.3) + - React-Core-prebuilt + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsiexecutor (= 0.86.3) + - React-logger + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-featureflags (0.86.3): + - React-Core-prebuilt + - ReactNativeDependencies + - React-featureflagsnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-graphics (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-rendererdebug + - React-utils + - ReactNativeDependencies + - React-hermes (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.86.3) + - React-jsi + - React-jsiexecutor (= 0.86.3) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-oscompat + - React-perflogger (= 0.86.3) + - React-runtimeexecutor + - ReactNativeDependencies + - React-idlecallbacksnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-ImageManager (0.86.3): + - React-Core-prebuilt + - React-Core/Default + - React-debug + - React-Fabric + - React-graphics + - React-rendererdebug + - React-utils + - ReactNativeDependencies + - React-intersectionobservernativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-Fabric/bridging + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-jserrorhandler (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - ReactCommon/turbomodule/bridging + - ReactNativeDependencies + - React-jsi (0.86.3): + - hermes-engine + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsiexecutor (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-jserrorhandler + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspector (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-jsinspectortracing + - React-oscompat + - React-perflogger (= 0.86.3) + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspectorcdp (0.86.3): + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsinspectornetwork (0.86.3): + - React-Core-prebuilt + - React-jsinspectorcdp + - ReactNativeDependencies + - React-jsinspectortracing (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsinspectornetwork + - React-oscompat + - React-timing + - React-utils + - ReactNativeDependencies + - React-jsitooling (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.86.3) + - React-debug + - React-jsi (= 0.86.3) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsitracing (0.86.3): + - React-jsi + - React-logger (0.86.3): + - React-Core-prebuilt + - ReactNativeDependencies + - React-Mapbuffer (0.86.3): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-microtasksnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-mutationobservernativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-Fabric/bridging + - React-Fabric/observers/mutation + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - react-native-safe-area-context (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - react-native-safe-area-context/common (= 5.9.1) + - react-native-safe-area-context/fabric (= 5.9.1) + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - react-native-safe-area-context/common (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - react-native-safe-area-context/fabric (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - react-native-safe-area-context/common + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-NativeModulesApple (0.86.3): + - hermes-engine + - React-callinvoker + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-runtimeexecutor + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-networking (0.86.3): + - React-Core-prebuilt + - React-jsinspectornetwork + - React-jsinspectortracing + - React-performancetimeline + - React-timing + - ReactNativeDependencies + - React-oscompat (0.86.3) + - React-perflogger (0.86.3): + - React-Core-prebuilt + - ReactNativeDependencies + - React-performancecdpmetrics (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-performancetimeline + - React-runtimeexecutor + - React-timing + - ReactNativeDependencies + - React-performancetimeline (0.86.3): + - React-Core-prebuilt + - React-featureflags + - React-jsinspector + - React-jsinspectortracing + - React-perflogger + - React-timing + - ReactNativeDependencies + - React-RCTActionSheet (0.86.3): + - React-Core/RCTActionSheetHeaders (= 0.86.3) + - React-RCTAnimation (0.86.3): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTAnimationHeaders + - React-debug + - React-featureflags + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTAppDelegate (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-CoreModules + - React-debug + - React-defaultsnativemodule + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-jsitooling + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTNetwork + - React-RCTRuntime + - React-rendererdebug + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-RCTBlob (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-Core/RCTBlobHeaders + - React-Core/RCTWebSocket + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTFabric (0.86.3): + - hermes-engine + - RCTSwiftUIWrapper + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricComponents + - React-FabricImage + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-networking + - React-performancecdpmetrics + - React-performancetimeline + - React-RCTAnimation + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTText + - React-rendererconsistency + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-RCTFBReactNativeSpec (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec/components (= 0.86.3) + - ReactCommon + - ReactNativeDependencies + - React-RCTFBReactNativeSpec/components (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-NativeModulesApple + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-RCTImage (0.86.3): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTImageHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTLinking (0.86.3): + - React-Core/RCTLinkingHeaders (= 0.86.3) + - React-jsi (= 0.86.3) + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactCommon/turbomodule/core (= 0.86.3) + - React-RCTNetwork (0.86.3): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTNetworkHeaders + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-NativeModulesApple + - React-networking + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTRuntime (0.86.3): + - hermes-engine + - React-Core + - React-Core-prebuilt + - React-debug + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-utils + - ReactNativeDependencies + - React-RCTSettings (0.86.3): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTSettingsHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTText (0.86.3): + - React-Core/RCTTextHeaders (= 0.86.3) + - Yoga + - React-RCTVibration (0.86.3): + - React-Core-prebuilt + - React-Core/RCTVibrationHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-rendererconsistency (0.86.3) + - React-renderercss (0.86.3): + - React-debug + - React-utils + - React-rendererdebug (0.86.3): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-RuntimeApple (0.86.3): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-Core/Default + - React-CoreModules + - React-cxxreact + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-Mapbuffer + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-RuntimeCore (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-performancetimeline + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-runtimeexecutor (0.86.3): + - React-Core-prebuilt + - React-debug + - React-featureflags + - React-jsi (= 0.86.3) + - React-utils + - ReactNativeDependencies + - React-RuntimeHermes (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-hermes + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-jsitracing + - React-RuntimeCore + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-runtimescheduler (0.86.3): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectortracing + - React-performancetimeline + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-timing + - React-utils + - ReactNativeDependencies + - React-timing (0.86.3): + - React-debug + - React-utils (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-debug + - React-jsi (= 0.86.3) + - ReactNativeDependencies + - React-viewtransitionnativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-Fabric + - React-Fabric/bridging + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-webperformancenativemodule (0.86.3): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-jsi + - React-jsiexecutor + - React-performancetimeline + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactAppDependencyProvider (0.86.3): + - ReactCodegen + - ReactCodegen (0.86.3): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricImage + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-NativeModulesApple + - React-RCTAppDelegate + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactCommon (0.86.3): + - React-Core-prebuilt + - ReactCommon/turbomodule (= 0.86.3) + - ReactNativeDependencies + - ReactCommon/turbomodule (0.86.3): + - hermes-engine + - React-callinvoker (= 0.86.3) + - React-Core-prebuilt + - React-cxxreact (= 0.86.3) + - React-jsi (= 0.86.3) + - React-logger (= 0.86.3) + - React-perflogger (= 0.86.3) + - ReactCommon/turbomodule/bridging (= 0.86.3) + - ReactCommon/turbomodule/core (= 0.86.3) + - ReactNativeDependencies + - ReactCommon/turbomodule/bridging (0.86.3): + - hermes-engine + - React-callinvoker (= 0.86.3) + - React-Core-prebuilt + - React-cxxreact (= 0.86.3) + - React-jsi (= 0.86.3) + - React-logger (= 0.86.3) + - React-perflogger (= 0.86.3) + - ReactNativeDependencies + - ReactCommon/turbomodule/core (0.86.3): + - hermes-engine + - React-callinvoker (= 0.86.3) + - React-Core-prebuilt + - React-cxxreact (= 0.86.3) + - React-debug (= 0.86.3) + - React-featureflags (= 0.86.3) + - React-jsi (= 0.86.3) + - React-logger (= 0.86.3) + - React-perflogger (= 0.86.3) + - React-utils (= 0.86.3) + - ReactNativeDependencies + - ReactNativeDependencies (0.86.3) + - RNCAsyncStorage (2.2.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNCMaskedView (0.3.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNGestureHandler (3.3.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNReanimated (4.7.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNReanimated/apple (= 4.7.0) + - RNReanimated/common (= 4.7.0) + - RNReanimated/view (= 4.7.0) + - RNWorklets + - Yoga + - RNReanimated/apple (4.7.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNReanimated/common (4.7.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNReanimated/view (4.7.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNScreens (4.26.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-RCTImage + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNScreens/common (= 4.26.0) + - Yoga + - RNScreens/common (4.26.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-RCTImage + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNWorklets (0.13.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets/apple (= 0.13.0) + - RNWorklets/common (= 0.13.0) + - Yoga + - RNWorklets/apple (0.13.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNWorklets/common (0.13.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - Yoga (0.0.0) + +DEPENDENCIES: + - "EXConstants (from `../../../node_modules/.bun/expo-constants@57.0.19+19c046550412b028/node_modules/expo-constants/ios`)" + - "Expo (from `../../../node_modules/.bun/expo@57.0.24+ea9bb3aa1309ed75/node_modules/expo`)" + - "ExpoAsset (from `../../../node_modules/.bun/expo-asset@57.0.18+d556132523c82a78/node_modules/expo-asset/ios`)" + - "ExpoDomWebView (from `../../../node_modules/.bun/@expo+dom-webview@57.0.1+ea9bb3aa1309ed75/node_modules/@expo/dom-webview/ios`)" + - "ExpoFileSystem (from `../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios/ExpoFileSystem.podspec`)" + - "ExpoFont (from `../../../node_modules/.bun/expo-font@57.0.4+19c046550412b028/node_modules/expo-font/ios/ExpoFont.podspec`)" + - "ExpoGlassEffect (from `../../../node_modules/.bun/expo-glass-effect@57.0.3+19c046550412b028/node_modules/expo-glass-effect/ios`)" + - "ExpoKeepAwake (from `../../../node_modules/.bun/expo-keep-awake@57.0.2+eb4ac7e61371bf55/node_modules/expo-keep-awake/ios`)" + - "ExpoLinking (from `../../../node_modules/.bun/expo-linking@57.0.10+19c046550412b028/node_modules/expo-linking/ios`)" + - "ExpoLogBox (from `../../../node_modules/.bun/@expo+log-box@57.0.4+ea9bb3aa1309ed75/node_modules/@expo/log-box`)" + - "ExpoModulesCore (from `../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core/ExpoModulesCore.podspec`)" + - "ExpoModulesJSI (from `../../../node_modules/.bun/expo-modules-jsi@57.1.0+8506924eb558072f/node_modules/expo-modules-jsi/apple`)" + - "ExpoModulesWorklets (from `../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core/ExpoModulesWorklets.podspec`)" + - "ExpoModulesWorkletsAdapter (from `../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core`)" + - "ExpoRouter (from `../../../node_modules/.bun/expo-router@57.0.22+d2181faf96e93633/node_modules/expo-router/ios`)" + - "ExpoSplashScreen (from `../../../node_modules/.bun/expo-splash-screen@57.0.9+ea9bb3aa1309ed75/node_modules/expo-splash-screen/ios`)" + - "ExpoSQLite (from `../../../node_modules/.bun/expo-sqlite@57.0.3+ea9bb3aa1309ed75/node_modules/expo-sqlite/ios`)" + - "ExpoSymbols (from `../../../node_modules/.bun/expo-symbols@57.0.3+1138ba06700891df/node_modules/expo-symbols/ios`)" + - "ExpoSystemUI (from `../../../node_modules/.bun/expo-system-ui@57.0.4+ea9bb3aa1309ed75/node_modules/expo-system-ui/ios`)" + - "ExpoUI (from `../../../node_modules/.bun/@expo+ui@57.0.19+c113d424be308d4d/node_modules/@expo/ui/ios`)" + - "FBLazyVector (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/FBLazyVector`)" + - "hermes-engine (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)" + - "RCTDeprecation (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`)" + - "RCTRequired (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Required`)" + - "RCTSwiftUI (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/RCTSwiftUI`)" + - "RCTSwiftUIWrapper (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/RCTSwiftUIWrapper`)" + - "RCTTypeSafety (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/TypeSafety`)" + - "React (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/`)" + - "React-callinvoker (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/callinvoker`)" + - "React-Core (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/`)" + - "React-Core-prebuilt (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React-Core-prebuilt.podspec`)" + - "React-Core/RCTWebSocket (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/`)" + - "React-CoreModules (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React/CoreModules`)" + - "React-cxxreact (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/cxxreact`)" + - "React-debug (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/debug`)" + - "React-defaultsnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/defaults`)" + - "React-domnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/dom`)" + - "React-Fabric (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon`)" + - "React-FabricComponents (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon`)" + - "React-FabricImage (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon`)" + - "React-featureflags (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/featureflags`)" + - "React-featureflagsnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/featureflags`)" + - "React-graphics (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/graphics`)" + - "React-hermes (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/hermes`)" + - "React-idlecallbacksnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`)" + - "React-ImageManager (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`)" + - "React-intersectionobservernativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver`)" + - "React-jserrorhandler (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jserrorhandler`)" + - "React-jsi (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsi`)" + - "React-jsiexecutor (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsiexecutor`)" + - "React-jsinspector (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern`)" + - "React-jsinspectorcdp (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/cdp`)" + - "React-jsinspectornetwork (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/network`)" + - "React-jsinspectortracing (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/tracing`)" + - "React-jsitooling (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsitooling`)" + - "React-jsitracing (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/hermes/executor/`)" + - "React-logger (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/logger`)" + - "React-Mapbuffer (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon`)" + - "React-microtasksnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)" + - "React-mutationobservernativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/mutationobserver`)" + - "react-native-safe-area-context (from `../../../node_modules/.bun/react-native-safe-area-context@5.9.1+8506924eb558072f/node_modules/react-native-safe-area-context`)" + - "React-NativeModulesApple (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)" + - "React-networking (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/networking`)" + - "React-oscompat (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/oscompat`)" + - "React-perflogger (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/reactperflogger`)" + - "React-performancecdpmetrics (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/performance/cdpmetrics`)" + - "React-performancetimeline (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/performance/timeline`)" + - "React-RCTActionSheet (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/ActionSheetIOS`)" + - "React-RCTAnimation (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/NativeAnimation`)" + - "React-RCTAppDelegate (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/AppDelegate`)" + - "React-RCTBlob (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Blob`)" + - "React-RCTFabric (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React`)" + - "React-RCTFBReactNativeSpec (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React`)" + - "React-RCTImage (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Image`)" + - "React-RCTLinking (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/LinkingIOS`)" + - "React-RCTNetwork (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Network`)" + - "React-RCTRuntime (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React/Runtime`)" + - "React-RCTSettings (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Settings`)" + - "React-RCTText (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Text`)" + - "React-RCTVibration (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Vibration`)" + - "React-rendererconsistency (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/consistency`)" + - "React-renderercss (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/css`)" + - "React-rendererdebug (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/debug`)" + - "React-RuntimeApple (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime/platform/ios`)" + - "React-RuntimeCore (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime`)" + - "React-runtimeexecutor (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/runtimeexecutor`)" + - "React-RuntimeHermes (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime`)" + - "React-runtimescheduler (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)" + - "React-timing (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/timing`)" + - "React-utils (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/utils`)" + - "React-viewtransitionnativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/viewtransition`)" + - "React-webperformancenativemodule (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/webperformance`)" + - ReactAppDependencyProvider (from `build/generated/ios/ReactAppDependencyProvider`) + - ReactCodegen (from `build/generated/ios/ReactCodegen`) + - "ReactCommon/turbomodule/core (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon`)" + - "ReactNativeDependencies (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`)" + - "RNCAsyncStorage (from `../../../node_modules/.bun/@react-native-async-storage+async-storage@2.2.0+8506924eb558072f/node_modules/@react-native-async-storage/async-storage`)" + - "RNCMaskedView (from `../../../node_modules/.bun/@react-native-masked-view+masked-view@0.3.2+8506924eb558072f/node_modules/@react-native-masked-view/masked-view`)" + - "RNGestureHandler (from `../../../node_modules/.bun/react-native-gesture-handler@3.3.0+8506924eb558072f/node_modules/react-native-gesture-handler`)" + - "RNReanimated (from `../../../node_modules/.bun/react-native-reanimated@4.7.0+767a9c693c958264/node_modules/react-native-reanimated`)" + - "RNScreens (from `../../../node_modules/.bun/react-native-screens@4.26.0+8506924eb558072f/node_modules/react-native-screens`)" + - "RNWorklets (from `../../../node_modules/.bun/react-native-worklets@0.13.0+234f64bc8c9e4262/node_modules/react-native-worklets`)" + - "Yoga (from `../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/yoga`)" + +EXTERNAL SOURCES: + EXConstants: + :path: "../../../node_modules/.bun/expo-constants@57.0.19+19c046550412b028/node_modules/expo-constants/ios" + Expo: + :path: "../../../node_modules/.bun/expo@57.0.24+ea9bb3aa1309ed75/node_modules/expo" + ExpoAsset: + :path: "../../../node_modules/.bun/expo-asset@57.0.18+d556132523c82a78/node_modules/expo-asset/ios" + ExpoDomWebView: + :path: "../../../node_modules/.bun/@expo+dom-webview@57.0.1+ea9bb3aa1309ed75/node_modules/@expo/dom-webview/ios" + ExpoFileSystem: + :podspec: "../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios/ExpoFileSystem.podspec" + ExpoFont: + :podspec: "../../../node_modules/.bun/expo-font@57.0.4+19c046550412b028/node_modules/expo-font/ios/ExpoFont.podspec" + ExpoGlassEffect: + :path: "../../../node_modules/.bun/expo-glass-effect@57.0.3+19c046550412b028/node_modules/expo-glass-effect/ios" + ExpoKeepAwake: + :path: "../../../node_modules/.bun/expo-keep-awake@57.0.2+eb4ac7e61371bf55/node_modules/expo-keep-awake/ios" + ExpoLinking: + :path: "../../../node_modules/.bun/expo-linking@57.0.10+19c046550412b028/node_modules/expo-linking/ios" + ExpoLogBox: + :path: "../../../node_modules/.bun/@expo+log-box@57.0.4+ea9bb3aa1309ed75/node_modules/@expo/log-box" + ExpoModulesCore: + :podspec: "../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core/ExpoModulesCore.podspec" + ExpoModulesJSI: + :path: "../../../node_modules/.bun/expo-modules-jsi@57.1.0+8506924eb558072f/node_modules/expo-modules-jsi/apple" + ExpoModulesWorklets: + :podspec: "../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core/ExpoModulesWorklets.podspec" + ExpoModulesWorkletsAdapter: + :path: "../../../node_modules/.bun/expo-modules-core@57.0.18+767a9c693c958264/node_modules/expo-modules-core" + ExpoRouter: + :path: "../../../node_modules/.bun/expo-router@57.0.22+d2181faf96e93633/node_modules/expo-router/ios" + ExpoSplashScreen: + :path: "../../../node_modules/.bun/expo-splash-screen@57.0.9+ea9bb3aa1309ed75/node_modules/expo-splash-screen/ios" + ExpoSQLite: + :path: "../../../node_modules/.bun/expo-sqlite@57.0.3+ea9bb3aa1309ed75/node_modules/expo-sqlite/ios" + ExpoSymbols: + :path: "../../../node_modules/.bun/expo-symbols@57.0.3+1138ba06700891df/node_modules/expo-symbols/ios" + ExpoSystemUI: + :path: "../../../node_modules/.bun/expo-system-ui@57.0.4+ea9bb3aa1309ed75/node_modules/expo-system-ui/ios" + ExpoUI: + :path: "../../../node_modules/.bun/@expo+ui@57.0.19+c113d424be308d4d/node_modules/@expo/ui/ios" + FBLazyVector: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/FBLazyVector" + hermes-engine: + :podspec: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-v250829098.0.17 + RCTDeprecation: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" + RCTRequired: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Required" + RCTSwiftUI: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/RCTSwiftUI" + RCTSwiftUIWrapper: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactApple/RCTSwiftUIWrapper" + RCTTypeSafety: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/TypeSafety" + React: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/" + React-callinvoker: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/callinvoker" + React-Core: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/" + React-Core-prebuilt: + :podspec: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React-Core-prebuilt.podspec" + React-CoreModules: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React/CoreModules" + React-cxxreact: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/cxxreact" + React-debug: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/debug" + React-defaultsnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/defaults" + React-domnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/dom" + React-Fabric: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon" + React-FabricComponents: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon" + React-FabricImage: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon" + React-featureflags: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/featureflags" + React-featureflagsnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/featureflags" + React-graphics: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/graphics" + React-hermes: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/hermes" + React-idlecallbacksnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" + React-ImageManager: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" + React-intersectionobservernativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver" + React-jserrorhandler: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jserrorhandler" + React-jsi: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsi" + React-jsiexecutor: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern" + React-jsinspectorcdp: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/cdp" + React-jsinspectornetwork: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/network" + React-jsinspectortracing: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsinspector-modern/tracing" + React-jsitooling: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/jsitooling" + React-jsitracing: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/hermes/executor/" + React-logger: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/logger" + React-Mapbuffer: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon" + React-microtasksnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/microtasks" + React-mutationobservernativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/mutationobserver" + react-native-safe-area-context: + :path: "../../../node_modules/.bun/react-native-safe-area-context@5.9.1+8506924eb558072f/node_modules/react-native-safe-area-context" + React-NativeModulesApple: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" + React-networking: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/networking" + React-oscompat: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/oscompat" + React-perflogger: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/reactperflogger" + React-performancecdpmetrics: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/performance/cdpmetrics" + React-performancetimeline: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/performance/timeline" + React-RCTActionSheet: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/NativeAnimation" + React-RCTAppDelegate: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/AppDelegate" + React-RCTBlob: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Blob" + React-RCTFabric: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React" + React-RCTFBReactNativeSpec: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React" + React-RCTImage: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Image" + React-RCTLinking: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Network" + React-RCTRuntime: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/React/Runtime" + React-RCTSettings: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Settings" + React-RCTText: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Text" + React-RCTVibration: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/Libraries/Vibration" + React-rendererconsistency: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/consistency" + React-renderercss: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/css" + React-rendererdebug: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/debug" + React-RuntimeApple: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime/platform/ios" + React-RuntimeCore: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime" + React-runtimeexecutor: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/runtime" + React-runtimescheduler: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" + React-timing: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/timing" + React-utils: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/utils" + React-viewtransitionnativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/viewtransition" + React-webperformancenativemodule: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/react/nativemodule/webperformance" + ReactAppDependencyProvider: + :path: build/generated/ios/ReactAppDependencyProvider + ReactCodegen: + :path: build/generated/ios/ReactCodegen + ReactCommon: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon" + ReactNativeDependencies: + :podspec: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec" + RNCAsyncStorage: + :path: "../../../node_modules/.bun/@react-native-async-storage+async-storage@2.2.0+8506924eb558072f/node_modules/@react-native-async-storage/async-storage" + RNCMaskedView: + :path: "../../../node_modules/.bun/@react-native-masked-view+masked-view@0.3.2+8506924eb558072f/node_modules/@react-native-masked-view/masked-view" + RNGestureHandler: + :path: "../../../node_modules/.bun/react-native-gesture-handler@3.3.0+8506924eb558072f/node_modules/react-native-gesture-handler" + RNReanimated: + :path: "../../../node_modules/.bun/react-native-reanimated@4.7.0+767a9c693c958264/node_modules/react-native-reanimated" + RNScreens: + :path: "../../../node_modules/.bun/react-native-screens@4.26.0+8506924eb558072f/node_modules/react-native-screens" + RNWorklets: + :path: "../../../node_modules/.bun/react-native-worklets@0.13.0+234f64bc8c9e4262/node_modules/react-native-worklets" + Yoga: + :path: "../../../node_modules/.bun/react-native@0.86.3+8506924eb558072f/node_modules/react-native/ReactCommon/yoga" + +SPEC CHECKSUMS: + EXConstants: 2dc4473aff5574eccaccb9f3eefe6d95247e5d38 + Expo: c04c9bde6ce9344f6da189e3d594c34884bba88b + ExpoAsset: a917b756b2e4fe12cef1ac3bca5fd849ddb2b919 + ExpoDomWebView: beaec034e51bd028428b98bb1f2633ab79c6d095 + ExpoFileSystem: 28778f942725170102f7c6cf4dee05a526ddacd0 + ExpoFont: f8198a952ba2ff53c9b393b5269ea435f232cfc3 + ExpoGlassEffect: ac454a05346de8610d61dc1324d624893ca22d14 + ExpoKeepAwake: 72af0b3be3615e59bc819d26061ff4e06b155ee0 + ExpoLinking: 15c8ddb0eb4a778950712ea4a6feedf021778852 + ExpoLogBox: 80957303325cd4439137765c90a87d7f22aaf2ff + ExpoModulesCore: f6f823d4541dbbf7e90a84ef807fc64372c7a857 + ExpoModulesJSI: 9df8e7c9719f59e8c001ec33611774137fc1484a + ExpoModulesWorklets: 986cf72c18400743869b4642d243115f831e404d + ExpoModulesWorkletsAdapter: c33403b9806b1f5d88218978f44364db327d4c98 + ExpoRouter: 3a8e63a51be53961b03f331c33108629090cf667 + ExpoSplashScreen: e771da4f26d550ea4fd067d8fb942657e47bb846 + ExpoSQLite: 72e6ada0504a27cd043eb1bf172db70485a761b6 + ExpoSymbols: 37a3a6e5847edb08b83a5ee04d3b46525e205f00 + ExpoSystemUI: 05ee8d4aaba1b6af330f3621e19b39ff9f21e718 + ExpoUI: 98d4650d9d32daaf772597adc76525c645b1ff76 + FBLazyVector: 2138c6c2ab66c31bf5754dc18097fbc498a49c7f + hermes-engine: 1d1364aef43f16448ba890d64226be0ef32516fe + RCTDeprecation: 96f68ebf33f8762466b01d57d6e873c4f30efb07 + RCTRequired: 166eed8ad6d8440e73e56d09a9090366609823d2 + RCTSwiftUI: e818198d11928a78c2b2afe281d072171dab617f + RCTSwiftUIWrapper: b9457f8613a1d0c8146c08844a04154702ff8809 + RCTTypeSafety: efc19e6b92931abf0b68b064212323a258a5f019 + React: 52dce66f71097ed7a4968673d95eeb8095ded74e + React-callinvoker: afa0525ab27f4ffbb4c377f855fe9368edb099bc + React-Core: fdb67992e049f2526ade3e258c21b8404e7943a3 + React-Core-prebuilt: 9abc518a8aa7aa4fa3bbbe52bc825bcd9fb3c3ce + React-CoreModules: 456d91152aa283ddc6ae8abfcec3292af88912f6 + React-cxxreact: 73a20c0dde5ec221f98d5e4da0e71349ab48353d + React-debug: d06757ac6c78b84af0c31e513a83662d6b8d0ac7 + React-defaultsnativemodule: ad832e8ce045ef01ea586834b1732c3d4d4d5d86 + React-domnativemodule: 7d1bd200df2d58c2f61d416cf16838c0c9fbb06c + React-Fabric: 363e0524d0724a17afbcba653da4f3398f41236e + React-FabricComponents: d41c87cd39ccf6c4c1df7f726ced22db1f90f072 + React-FabricImage: b4fb0ebc0a2e6fabfd8de8b3fa441331bda99403 + React-featureflags: 1c88b4566806604500a8a9fdf9ad0108c2e9d541 + React-featureflagsnativemodule: dab00693f49c6629f186dedcc3cdaeadd094972f + React-graphics: 991a75fa954a20d0297580dc7fd4e365982cef3b + React-hermes: 65cfbf62d8d31c1e69f3556ff6836a2890cf4a62 + React-idlecallbacksnativemodule: 492f6da9e5a2fa37e2ac0c3a7447302a342d42c2 + React-ImageManager: 02effe13f7b0ca3a7282ee364a8691cd789b9726 + React-intersectionobservernativemodule: 91b54a39a2e7187b9caf62e8b7310aa2d0026679 + React-jserrorhandler: 91985482e35b0b102febda42168ee71946db9958 + React-jsi: 69052b2d1958c9069a143f1637f382b933917b43 + React-jsiexecutor: b9b98ea432f58ee2899a60204f090d0bc8d48313 + React-jsinspector: 75119552df2413c48d33e9f0a72836b30c1ccb14 + React-jsinspectorcdp: 8e65995e9083f7bce0839d3169f6f2d304049e2e + React-jsinspectornetwork: 7e8375e27430cc7694c52fb904db2b9118194480 + React-jsinspectortracing: 643bd9d6f9dc64ea9b28b0e915b4fb0b9b0b1b90 + React-jsitooling: b7ec4b982dfc62f744587deeb1948b983f9edaa4 + React-jsitracing: 8d2f0c8d6d81324606b6d55b946cb443a0c5a425 + React-logger: b9bf04943233973fece220497f0784eaad409b3a + React-Mapbuffer: 3c805ea54675b00ef1755f23b3c1fccf34962b93 + React-microtasksnativemodule: 97a771dbbb4315c71579995b53e4e3e351a99d89 + React-mutationobservernativemodule: 530bff1bba9511a5133e3cf8170e3b2c0df49e89 + react-native-safe-area-context: 8368d1052ccc8fe8725adfb6a83498c8bdb48250 + React-NativeModulesApple: 2b658272ca69df0694cf5d54f9510aa7c33977bc + React-networking: 6be0b80e18e710dd30e77b04838ec46666a7bb78 + React-oscompat: cea7c66df8076bd97e95885d7f584b86afffde41 + React-perflogger: 9110ba33a4aa70c708e9d50aeca040e6f2aefaf7 + React-performancecdpmetrics: d9c07c4855c5a975cc7abc482fcb086e8a87abd1 + React-performancetimeline: 336af57802d9cdb4ac079774007677031c891fe0 + React-RCTActionSheet: aeb20277150454e9020517c6a2cb70410d4856d9 + React-RCTAnimation: 8453deeb01d0f284202c9670b5f7d827575b4967 + React-RCTAppDelegate: 5e9c748cc138decd9045683d8987700d824a99ff + React-RCTBlob: e6c01cae3eeb7e63a55b12f72b7dfcfd8236b4b2 + React-RCTFabric: deab07276af1b74b0b8d0772a9a58cac15785312 + React-RCTFBReactNativeSpec: 83d67909e5c67b460bec8851d8413a8ce1ecc6b2 + React-RCTImage: ec8488bc119d7e5d3209f85be3ebda7e4a937c61 + React-RCTLinking: b6ff56c2f206127d49d338262418c097ea306ad0 + React-RCTNetwork: 08d71b365278511a9bb07885b4a54bdc510d99bf + React-RCTRuntime: 634c58094cc601bc2a63ef38b2389cf81143fbcb + React-RCTSettings: 372551bc9f30d26890f5c5fd569dcd15243c656c + React-RCTText: 62cff7e93aeb3c06e3634f1c59984e8c5322b542 + React-RCTVibration: 2e8c1630ae80c092f437db9638a03715f616ac03 + React-rendererconsistency: e8b244c284931cac80a30ce754d77f6c64e528f9 + React-renderercss: 97791244f7ff7a2a060d07acbf240261d4a0519c + React-rendererdebug: 9d023ca26ed3daf60e7b7615729bb7ba6027a96a + React-RuntimeApple: 2daf515379135ccd5e3af5306c90f7827428f4ca + React-RuntimeCore: 637867058de3e0ae7f1ef2653cd0e01c4c850d71 + React-runtimeexecutor: a5cdf5961ec221a40e6612f35bd1e23f84fd9702 + React-RuntimeHermes: 390a5605857f207c8261c75fd4a296ead9aeee0f + React-runtimescheduler: 1be91f9ec0417bb69bd8dfabbe11b07147b24538 + React-timing: bbb861d02c9bcee3e9c08c51a38f59d27c0904ce + React-utils: 28c555b582a9607a938cc0f47b5a7600db42393a + React-viewtransitionnativemodule: 3977270cf367fd1562221047e2358a26da174f2d + React-webperformancenativemodule: fb203d77856165582e519855fc13773a2855f9a6 + ReactAppDependencyProvider: bb350d1333fd459c1aabe782088419a9b8894d3a + ReactCodegen: adfd6f38dc4684fd5c0c72d45afeec6422191e15 + ReactCommon: 02f6a489d5eb4ab79d7deba5cd4434e0ba351a07 + ReactNativeDependencies: 6738e602b46fd24aa453cd58267ec3bb8bf29d27 + RNCAsyncStorage: 2ad919e88b8bc2cd80e8697ce66d04d006743283 + RNCMaskedView: eb2b2e538afa907f05a5848a1a1ac26092e6fec9 + RNGestureHandler: fe183fe6d00211abee16d680e277a2ac50e45e73 + RNReanimated: fe9c44b338878bdae36eee36587e90191a8c97fa + RNScreens: 5586f63b3b1f35c42806069aecf842dc4a980300 + RNWorklets: 6a6f3cd0c633865a68f2853fa179829cf358aecc + Yoga: 18b74b3ade30bebc1904004dfaceae1dd02a330a + +PODFILE CHECKSUM: 0381281c59fa81647b307a7727b5f8f77f438db6 + +COCOAPODS: 1.17.0 diff --git a/apps/mobile/native/README.md b/apps/mobile/native/README.md new file mode 100644 index 0000000..6e5669a --- /dev/null +++ b/apps/mobile/native/README.md @@ -0,0 +1,9 @@ +# Native dependency lock + +`Podfile.lock` was generated by CocoaPods 1.17.0 from source commit `53bbfd32e17481f698db75ec2117440ea9d1d089` in [native run 36355495021](https://github.com/HemSoft/yahtzee/actions/runs/36355495021). The unsigned Release build succeeded with Xcode 26.6 and SDK 26.5. Simulator startup timed out before UI qualification; this provenance does not claim a passing native interaction run. + +The retrieved lock's SHA-256 is `47d09e39c509fcadfb2d7bd4e5ee41398d0cbe2b2cecd5440100c09dc6cb4f74`, using LF bytes. Its external sources point to the locked workspace packages and generated codegen directories, not workstation paths. The inspected native modules include Expo 57.0.24, Expo SQLite 57.0.3, AsyncStorage 2.2.0 for legacy preference import, React Native 0.86.3 and its declared navigation/runtime dependencies. There are no Apple signing credentials in this directory. + +The [native runner](../../../scripts/ios-native/run.mjs) copies this lock into a newly generated Expo project and uses `pod install --deployment`. It also checks the generated lock against source. Do not edit dependency versions or checksums by hand. + +For an intentional dependency update, use a fresh macOS checkout with the documented toolchain and run `bun scripts/ios-native/run.mjs --refresh-pods`. Review the replacement in `reports/native/Podfile.lock`, commit it here, and repeat normal qualification. A missing or changed lock remains a non-passing result until reviewed source matches. See the [qualification guide](../../../docs/native-simulator.md) for tool versions and evidence limits. diff --git a/apps/mobile/src/local/diagnostics.ts b/apps/mobile/src/local/diagnostics.ts new file mode 100644 index 0000000..0deaed3 --- /dev/null +++ b/apps/mobile/src/local/diagnostics.ts @@ -0,0 +1,12 @@ +interface DiagnosticFields { + version: string; + build: string; + platform: string; + osVersion: string; + windowClass: "compact" | "expanded"; +} + +/** Explicit fields only. Never stringify a store snapshot or an error/log object here. */ +export function diagnosticText(fields: DiagnosticFields): string { + return `Dice game ${fields.version}, build ${fields.build}\nPlatform: ${fields.platform} ${fields.osVersion}\nWindow: ${fields.windowClass}\nStorage schema: 1; scoring rules: 2\nNo names, scores, game IDs or saved data are included.`; +} diff --git a/apps/mobile/src/local/keys.ts b/apps/mobile/src/local/keys.ts new file mode 100644 index 0000000..088591d --- /dev/null +++ b/apps/mobile/src/local/keys.ts @@ -0,0 +1,2 @@ +/** Dependency-free wire key, shared with browser/native qualification tools. */ +export const SAVE_KEY = "hemsoft-local-dice-v1"; diff --git a/apps/mobile/src/local/save.ts b/apps/mobile/src/local/save.ts index e036e14..f51743e 100644 --- a/apps/mobile/src/local/save.ts +++ b/apps/mobile/src/local/save.ts @@ -1,6 +1,6 @@ import { calculateTotal, calculateMaxPossibleScore, getCategories, getMaxCategoryScore, type CategoryId, type GameLog, type HighScores, type WireGame } from "@yahtzee/game-engine"; -export const SAVE_KEY = "hemsoft-local-dice-v1"; +export { SAVE_KEY } from "./keys"; export const MODES = [5, 6, 8, 10] as const; export interface Preferences { name: string; diff --git a/apps/mobile/src/local/sqliteStorage.ts b/apps/mobile/src/local/sqliteStorage.ts index 8b26700..b03ca03 100644 --- a/apps/mobile/src/local/sqliteStorage.ts +++ b/apps/mobile/src/local/sqliteStorage.ts @@ -1,4 +1,4 @@ -import { SAVE_KEY } from "./save"; +import { SAVE_KEY } from "./keys"; import type { StoragePort } from "./store"; export const DATABASE_NAME = "hemsoft-local-dice.db"; diff --git a/apps/mobile/src/screens/Help.tsx b/apps/mobile/src/screens/Help.tsx index 0954303..4499b8d 100644 --- a/apps/mobile/src/screens/Help.tsx +++ b/apps/mobile/src/screens/Help.tsx @@ -1,7 +1,8 @@ import React, { useState } from "react"; -import { Linking, Platform, ScrollView, Share, View } from "react-native"; +import { Linking, Platform, ScrollView, Share, View, useWindowDimensions } from "react-native"; import appConfig from "../../app.json"; import { useLocalGame } from "../local/LocalProvider"; +import { diagnosticText } from "../local/diagnostics"; import { Action, Label, Section, styles } from "../ui/controls"; import { useConfirmation } from "../ui/useConfirmation"; @@ -17,9 +18,13 @@ export function Help() { const { store, view, colors } = useLocalGame(); const { confirm, dialog } = useConfirmation(); const [error, setError] = useState(null); + const [preview, setPreview] = useState(false); + const { width } = useWindowDimensions(); + const diagnostics = diagnosticText({ version: appConfig.expo.version, build: appConfig.expo.ios.buildNumber, + platform: Platform.OS, osVersion: String(Platform.Version), windowClass: width >= 820 ? "expanded" : "compact" }); const share = async () => { try { - await Share.share({ message: `Dice game ${appConfig.expo.version}\nPlatform: ${Platform.OS} ${String(Platform.Version)}\nStorage schema: 1; scoring rules: 2\nNo names, scores, game IDs or saved data are included.` }); + await Share.share({ message: diagnostics }); setError(null); } catch { setError("Could not open the system share sheet. The app version is shown below."); } }; @@ -38,9 +43,16 @@ export function Help() {
- + - { void share(); }} /> + setPreview(true)} /> + {preview && + + + { void share(); }} /> + setPreview(false)} /> + } + { void source(); }} />
{error && } diff --git a/docs/native-simulator.md b/docs/native-simulator.md index 23e4238..95e2485 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -21,17 +21,17 @@ Expo prebuild generates `apps/mobile/ios` from source configuration. This direct bun scripts/ios-native/run.mjs ``` -The initial bootstrap retains its generated Podfile.lock as an artifact and deliberately cannot satisfy the final reviewed-lock step. Inspect and commit that lock at `apps/mobile/native/Podfile.lock`. Subsequent builds copy it into the generated project and use `pod install --deployment`; dependency drift fails the job. Do not bypass that check or call the bootstrap a qualified release. +The initial bootstrap retains its generated Podfile.lock as an artifact and remains non-passing until that lock is reviewed and committed at `apps/mobile/native/Podfile.lock`. Subsequent builds copy it into the generated project and use `pod install --deployment`; dependency drift fails the job. For an intentional update, `--refresh-pods` generates a replacement in a fresh checkout. A changed lock remains non-passing until source matches. Do not bypass that check or call a bootstrap a qualified release. -Build configuration is Release, `CODE_SIGNING_ALLOWED=NO`, with an embedded Hermes/JavaScript bundle. No Metro server is started. The compiled bundle identifier, version, build and minimum iOS 17.0 must match source. The proposed 1.0.0/build 1 and existing development identifiers are not approved public identity or an App Store reservation. +Build configuration is Release, `CODE_SIGNING_ALLOWED=NO`, with an embedded Hermes/JavaScript bundle. The simulator app targets the current host architecture, recorded in the manifest, rather than compiling an unused second simulator slice. It is not a universal Mac distribution. No Metro server is started. The compiled bundle identifier, version, build and minimum iOS 17.0 must match source. The proposed 1.0.0/build 1 and existing development identifiers are not approved public identity or an App Store reservation. ## Native interaction matrix -The job creates and later deletes only its own simulators. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. +The job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. -Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. +Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad Stage Manager window-resize or signed-distribution acceptance. Browser-adapter results do not substitute for the native run. Review actual screenshots in one batch, apply one layout correction batch, then confirm. Functional failures still require diagnosis. diff --git a/packages/game-engine/tests/nativeDiagnostics.test.ts b/packages/game-engine/tests/nativeDiagnostics.test.ts new file mode 100644 index 0000000..f5141dc --- /dev/null +++ b/packages/game-engine/tests/nativeDiagnostics.test.ts @@ -0,0 +1,13 @@ +import { expect, test } from "bun:test"; +import { diagnosticText } from "../../../apps/mobile/src/local/diagnostics"; + +test("diagnostics serialize only the explicit nonpersonal allowlist", () => { + const input = { version: "1.0.0", build: "1", platform: "ios", osVersion: "26.5", windowClass: "compact" as const, + name: "PRIVATE NAME", scores: "PRIVATE SCORES", gameId: "PRIVATE ID", logs: "PRIVATE LOGS", credentials: "PRIVATE CREDENTIALS" }; + const text = diagnosticText(input); + expect(text).toContain("Dice game 1.0.0, build 1"); + expect(text).toContain("Platform: ios 26.5"); + expect(text).toContain("Window: compact"); + expect(text).not.toContain("PRIVATE"); + expect(text).toContain("No names, scores, game IDs or saved data are included."); +}); diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index 34fd3a5..55bf43c 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -18,12 +18,14 @@ export function resumeFlow(bundleId) { return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Resume Game" }), tap("Resume Game"), visible("Re-roll \\(1\\)"), shot("resumed")]); } -export function completeFlow(bundleId, categories) { +export function completeFlow(bundleId, categories, previewDiagnostics = false) { return header(bundleId, [ ...categories.flatMap((id) => [scroll({ id: `score-${id}` }), command("tapOn", { id: `score-${id}` })]), visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), - visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), tap("Done"), + visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), + ...(previewDiagnostics ? [scroll({ text: "Preview diagnostics" }), tap("Preview diagnostics"), scroll({ id: "diagnostics-preview" }), + command("assertVisible", { id: "diagnostics-preview" }), shot("diagnostics-preview"), tap("Cancel preview")] : []), tap("Done"), scroll({ text: "Play Again" }), tap("Play Again"), scroll({ text: "Start Game" }), shot("play-again")]); } export function corruptFlow(bundleId, reset = false) { diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index 7464580..c3e3588 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -32,6 +32,9 @@ test("generated flows use valid JSON-in-YAML commands and real semantic controls const completed = parse(completeFlow("com.hemsoft.yahtzee", ["ones", "chance"])); assert.equal(completed.filter((step) => step.command === "tapOn" && step.value?.id?.startsWith("score-")).length, 2); assert(completed.some((step) => step.command === "assertVisible" && step.value === "Game Over!")); + const preview = parse(completeFlow("com.hemsoft.yahtzee", ["ones"], true)); + assert(preview.some((step) => step.command === "assertVisible" && step.value?.id === "diagnostics-preview")); + assert(preview.some((step) => step.value === "Cancel preview")); }); test("corruption flow never clears state and reset includes cancellation first", () => { for (const reset of [false, true]) { diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index f735749..cc53b9d 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import { spawn, spawnSync } from "node:child_process"; import { createHash } from "node:crypto"; -import { closeSync, copyFileSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; +import { appendFileSync, closeSync, copyFileSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; import { join, resolve } from "node:path"; import { tmpdir } from "node:os"; import { setTimeout as delay } from "node:timers/promises"; @@ -10,8 +10,11 @@ import { decodeSave } from "../../apps/mobile/src/local/save.ts"; import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); +assert(["arm64", "x64"].includes(process.arch), "Unsupported simulator host architecture."); +const architecture = process.arch === "arm64" ? "arm64" : "x86_64"; const root = resolve(import.meta.dirname, "../.."); const output = join(root, "reports/native"); +assert(!existsSync(output), "Use a fresh checkout. Existing native evidence was not overwritten."); mkdirSync(output, { recursive: true }); const env = { ...process.env, DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer", EXPO_NO_TELEMETRY: "1", MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "120000" }; @@ -23,15 +26,16 @@ function run(executable, args, { cwd = root, capture = false, timeout = 1800000, let result; try { result = spawnSync(executable, args, { cwd, env, encoding: "utf8", timeout, maxBuffer: 16 * 1024 * 1024, stdio: ["ignore", capture ? "pipe" : fd, fd] }); } finally { closeSync(fd); } + if (capture && result.stdout) appendFileSync(join(output, log), result.stdout); if (result.error) throw result.error; assert.equal(result.status, 0, `${executable} failed with ${result.status}; see ${log}`); return result.stdout?.trim() ?? ""; } -const sim = (...args) => run("xcrun", ["simctl", ...args], { capture: true, timeout: 180000 }); +const sim = (...args) => run("xcrun", ["simctl", ...args], { capture: true, timeout: args[0] === "bootstatus" ? 600000 : 180000 }); const plist = (file, key) => run("/usr/libexec/PlistBuddy", ["-c", `Print :${key}`, file], { capture: true }); const receipt = { schemaVersion: 1, kind: "unsigned-ios-simulator", status: "running", source: run("git", ["rev-parse", "HEAD"], { capture: true }), startedAt: new Date().toISOString(), runId: process.env.GITHUB_RUN_ID ?? null, runAttempt: process.env.GITHUB_RUN_ATTEMPT ?? null, - runnerImage: process.env.ImageVersion ?? null, scenarios: [], limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset"] }; + runnerImage: process.env.ImageVersion ?? null, architecture, scenarios: [], limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset"] }; json(join(output, "manifest.json"), receipt); const appRoot = join(root, "apps/mobile"); const ownedDevices = []; @@ -85,15 +89,17 @@ try { run("node", ["node_modules/expo/bin/cli", "prebuild", "--platform", "ios", "--no-install"], { cwd: appRoot, log: "prebuild.log" }); const ios = join(appRoot, "ios"); const sourceLock = join(appRoot, "native/Podfile.lock"); receipt.bootstrapPodLock = !existsSync(sourceLock); + const refreshPodLock = process.argv.includes("--refresh-pods"); if (!receipt.bootstrapPodLock) copyFileSync(sourceLock, join(ios, "Podfile.lock")); - run("pod", ["install", ...(receipt.bootstrapPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); + run("pod", ["install", ...(receipt.bootstrapPodLock || refreshPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); copyFileSync(join(ios, "Podfile.lock"), join(output, "Podfile.lock")); + receipt.podLockNeedsReview = receipt.bootstrapPodLock || !readFileSync(sourceLock).equals(readFileSync(join(ios, "Podfile.lock"))); copyFileSync(join(ios, "Podfile.properties.json"), join(output, "Podfile.properties.json")); const workspaces = readdirSync(ios).filter((name) => name.endsWith(".xcworkspace")); assert.equal(workspaces.length, 1); const scheme = workspaces[0].slice(0, -".xcworkspace".length); const derived = join(tmpdir(), `dice-derived-${process.pid}`); run("xcodebuild", ["-workspace", join(ios, workspaces[0]), "-scheme", scheme, "-configuration", "Release", "-sdk", "iphonesimulator", - "-destination", "generic/platform=iOS Simulator", "-derivedDataPath", derived, "CODE_SIGNING_ALLOWED=NO", "build"], { log: "build.log", timeout: 2400000 }); + "-destination", "generic/platform=iOS Simulator", "-derivedDataPath", derived, `ARCHS=${architecture}`, "ONLY_ACTIVE_ARCH=YES", "CODE_SIGNING_ALLOWED=NO", "build"], { log: "build.log", timeout: 2400000 }); const products = join(derived, "Build/Products/Release-iphonesimulator"); const apps = readdirSync(products).filter((name) => name.endsWith(".app")); assert.equal(apps.length, 1); const app = join(products, apps[0]); const info = join(app, "Info.plist"); @@ -137,7 +143,7 @@ try { const after = saved(device, bundleId, directory, "after-relaunch"); assert.equal(after.bytes, before.bytes); await stopRecording(); if (!scenario.largeText) { - flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id))); + flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id), index === 0 || index === 4)); const completed = saved(device, bundleId, directory, "completed"); assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); @@ -162,7 +168,8 @@ try { flow(device, directory, "reset-database", corruptFlow(bundleId, true)); assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); receipt.nativeCorruptionAndReset = "passed"; - receipt.status = receipt.bootstrapPodLock ? "bootstrap-lock-needs-review" : "passed"; + receipt.status = receipt.podLockNeedsReview ? "pod-lock-needs-review" : "passed"; + if (receipt.podLockNeedsReview) process.exitCode = 1; } catch (error) { receipt.status = "failed"; receipt.error = error instanceof Error ? error.message : String(error); process.exitCode = 1; console.error(receipt.error); diff --git a/tests/clients/native.spec.ts b/tests/clients/native.spec.ts index 7710452..0fc46cd 100644 --- a/tests/clients/native.spec.ts +++ b/tests/clients/native.spec.ts @@ -1,7 +1,8 @@ import type { Page } from "playwright"; import { test, expect, origin, saveCoverage } from "./fixtures"; import { getScorecardCategories, calculateTotal } from "../../packages/game-engine/src"; -import { SAVE_KEY, type LocalSave } from "../../apps/mobile/src/local/save"; +import { SAVE_KEY } from "../../apps/mobile/src/local/keys"; +import type { LocalSave } from "../../apps/mobile/src/local/save"; import type { StorageFaults } from "./native-storage"; async function saved(page: Page): Promise { @@ -131,6 +132,12 @@ test("native adapter recovery does not silently replace damaged data; reset clea await choose(client, "Appearance", "Light"); await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue("Unsaved private name"); await client.getByRole("button", { name: "Help", exact: true }).click(); + await expect(client.getByTestId("diagnostics-preview")).toHaveCount(0); + await client.getByRole("button", { name: "Preview diagnostics", exact: true }).click(); + await expect(client.getByTestId("diagnostics-preview")).toContainText("build 1"); + await expect(client.getByTestId("diagnostics-preview")).not.toContainText("Unsaved private name"); + await client.getByRole("button", { name: "Cancel preview", exact: true }).click(); + await expect(client.getByTestId("diagnostics-preview")).toHaveCount(0); await confirm(client, "Delete all local data"); await client.getByRole("button", { name: "Done", exact: true }).click(); await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue(""); From da6eea0c5dc6d807c98ee3b96d44d3a35348610c Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 19:58:40 -0400 Subject: [PATCH 05/13] fix: preserve native SDK privacy manifests and inspect built declarations --- .github/workflows/quality.yml | 9 ++++- apps/mobile/PRIVACY.md | 31 +++++++++++++++ apps/mobile/package.json | 7 ++++ docs/mobile-privacy-audit.md | 55 ++++++++++++++++++++++++++ docs/native-simulator.md | 10 ++++- scripts/ios-native/privacy.mjs | 60 +++++++++++++++++++++++++++++ scripts/ios-native/privacy.test.mjs | 36 +++++++++++++++++ scripts/ios-native/run.mjs | 13 +++++-- 8 files changed, 214 insertions(+), 7 deletions(-) create mode 100644 apps/mobile/PRIVACY.md create mode 100644 docs/mobile-privacy-audit.md create mode 100644 scripts/ios-native/privacy.mjs create mode 100644 scripts/ios-native/privacy.test.mjs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index d9db664..c96e078 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -147,7 +147,14 @@ jobs: echo "$RUNNER_TEMP/maestro-tool/maestro/bin" >> "$GITHUB_PATH" echo "JAVA_HOME=$(/usr/libexec/java_home -v 17)" >> "$GITHUB_ENV" - name: Build a Release simulator app and exercise native screens and saves - run: bun scripts/ios-native/run.mjs + env: + REFRESH_PODS: ${{ contains(github.event.pull_request.labels.*.name, 'native-pods-refresh') }} + run: | + if [ "$REFRESH_PODS" = true ]; then + bun scripts/ios-native/run.mjs --refresh-pods + else + bun scripts/ios-native/run.mjs + fi - name: Require the reviewed CocoaPods lock after bootstrap run: test -f apps/mobile/native/Podfile.lock - name: Retain unsigned native evidence, including failed-run diagnostics diff --git a/apps/mobile/PRIVACY.md b/apps/mobile/PRIVACY.md new file mode 100644 index 0000000..bcbf464 --- /dev/null +++ b/apps/mobile/PRIVACY.md @@ -0,0 +1,31 @@ +# Privacy policy draft + +Prepared September 27, 2026. This is development copy, not an approved policy for a published app. The owner must approve the public identity, contact information and final declarations after the signed candidate is measured. See the [privacy acceptance issue](https://github.com/HemSoft/yahtzee/issues/48). + +## Data on the device + +The native gameplay code stores the player name, up to five recent names, game preferences, the active game and its held dice, completed scores, and local rankings in the app's private storage. It retains the latest 500 completed games and the all-time top ten entries per supported dice mode. Local rankings are not an online leaderboard. + +The development build has no account, remote players, cloud-sync feature, advertising or purchases. It does not import online game records. Its SQLite document is not encrypted by the application. Device security and operating-system data protection are separate from application-level encryption. + +## Retention, deletion and backups + +An active game stays available until it is completed, explicitly discarded or removed with the local-data reset. A confirmed reset deletes the app's current game data and preferences from its container. A failed reset remains visible and can be retried. Damaged or unsupported data remains in place until an explicit recovery or reset choice. + +Deleting the app removes its local container. Offloading may retain it. The storage location is eligible for operating-system backups, subject to device settings and backup behavior. Restoring a backup can restore older game data. Resetting the current app does not erase existing backups. Physical-device backup and restore verification is still pending. + +## Diagnostics and support + +The current source requires a preview before sharing diagnostics. The preview contains the app version and build, platform and OS version, a compact or expanded window category, and save-schema and scoring-rule versions. It excludes player names, game identifiers, scores, saved documents, error text, logs and credentials. Nothing is sent when a preview opens or closes. + +Choosing Share opens the operating system's share controls with exactly the previewed text. The selected app or destination may use the network and follows its own privacy practices. Sharing is optional. + +The repository's [GitHub issue page](https://github.com/HemSoft/yahtzee/issues) is public. Do not post player names, save files, credentials or screenshots containing private information there. GitHub handles information submitted to it under [GitHub's privacy statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement). + +An owner-approved private support contact and final public policy URL have not been selected. They must be provided before this draft is published as the release policy. + +## Native SDKs and release verification + +The first unsigned simulator build contains an embedded JavaScript bundle and has Expo updates disabled in its compiled configuration. Static inspection is not proof of zero network traffic or a completed privacy audit. Bundled SDK behavior, manifests and signatures, signed-archive permissions, and measured traffic still require release verification. + +The [engineering inventory](../../docs/mobile-privacy-audit.md) records observations and open work. App Store privacy answers and export-compliance classification remain unset. No legal attestation is supplied by this draft. diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 23c7068..7b5f388 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -3,6 +3,13 @@ "version": "1.0.0", "private": true, "main": "expo-router/entry", + "expo": { + "autolinking": { + "ios": { + "buildFromSource": ["expo-file-system"] + } + } + }, "scripts": { "start": "expo start", "android": "expo run:android", diff --git a/docs/mobile-privacy-audit.md b/docs/mobile-privacy-audit.md new file mode 100644 index 0000000..9e9d580 --- /dev/null +++ b/docs/mobile-privacy-audit.md @@ -0,0 +1,55 @@ +# Mobile privacy engineering inventory + +Prepared September 27, 2026 for [issue #48](https://github.com/HemSoft/yahtzee/issues/48). This is an incomplete engineering record, not App Store answers or legal approval. The [policy source](../apps/mobile/PRIVACY.md) is a draft. + +## Observed native package + +The first [native build](https://github.com/HemSoft/yahtzee/actions/runs/36355495021), source `53bbfd32e17481f698db75ec2117440ea9d1d089`, produced an unsigned Release simulator app with Xcode 26.6 and SDK 26.5. Its packaged-app SHA-256 is `90d67f5d24e5135d7057d3a402962145e6e2891a09689d5ee1538d65ff364eda`. The build's [artifact](https://github.com/HemSoft/yahtzee/actions/runs/36355495021/artifacts/10944680287) has limited retention. It is not a signed device archive. + +Reading the actual packaged property lists found: + +- `CFBundleSupportedPlatforms` is `iPhoneSimulator`, with iPhone and iPad device families, minimum iOS 17.0, version 1.0.0 and build 1. +- There are no permission-purpose strings in the app's compiled Info.plist. +- App Transport Security disallows arbitrary loads and permits local networking. This configuration is not a firewall or evidence that the app made no requests. +- `EXUpdatesEnabled` is false. `EXUpdatesCheckOnLaunch` is `ALWAYS`, but that setting does not enable the disabled update mechanism. The app contains its own `main.jsbundle`. +- `ITSAppUsesNonExemptEncryption` is absent. No classification has been asserted. +- Ten privacy manifests are present. Their declared collected-data arrays are empty; none declares tracking. Those declarations alone do not prove actual data flows. + +## Verified packaging finding + +The first app's `ExpoFileSystem_privacy.bundle` contains only its bundle Info.plist. Its `PrivacyInfo.xcprivacy` is absent. The aggregate app manifest also lacks the locked SDK's disk-space reasons and two file-timestamp reasons. + +The installed `expo-file-system` 57.0.7 source does contain the manifest. Its podspec declares that resource bundle. The CocoaPods log identifies Expo FileSystem as precompiled, and the app embeds its precompiled framework. Listing all archive entries ruled out a skipped hardlink or a misplaced file. + +The source manifest declares file-timestamp reasons `0A2A.1` and `3B52.1`, and disk-space reasons `E174.1` and `85F4.1`. These are recorded as upstream SDK declarations, not independently approved reasons for this app. + +The proposed repair opts only `expo-file-system` into source compilation through the SDK 57 Apple autolinker's `buildFromSource` option. The installed autolinker resolves this option. Native qualification must still prove that the resource returns and its declarations reach the aggregate. [The inspection tool](../scripts/ios-native/privacy.mjs) compares the built resource with the locked SDK source and checks those aggregate reasons. It retains the observed manifests and purpose strings without supplying legal answers. + +## Data-flow inventory + +| Data or behavior | Source behavior | Remaining evidence | +| --- | --- | --- | +| Player name and five recent names | Local preferences only | Device traffic measurement and reset/uninstall check | +| Active game, dice, holds and opponents | One acknowledged SQLite document, retained for resume | Actual Expo runtime restart, interruption and airplane-mode checks | +| Completed results and local rankings | Last 500 games; top ten entries per mode | Physical retention, backup and restore checks | +| Appearance and game options | Local preferences | Device reset and restore checks | +| Legacy preferences | Import only the two documented old preference keys | Device upgrade fixture if an older native build is distributed | +| Diagnostics | Explicit allowlist; current source previews before sharing | Current native preview/cancel/share behavior and destination checks | +| Public technical feedback | User chooses an external GitHub issue page | Owner-approved private contact and public support copy | +| OS backup | SQLite lives under Documents/SQLite | Real-device backup eligibility, restore and older-data behavior | +| Expo updates | Disabled in the inspected compiled configuration | Recheck the signed candidate and measured traffic | +| SDK telemetry and crash behavior | No app-authored telemetry client; declared manifests inspected | Measure every release SDK, including OS-mediated diagnostics | +| Account, ads, purchases and cloud sync | Not implemented in the native app | Confirm final scope has not changed before declarations | + +See [the persistence boundary](mobile-offline.md) for storage and recovery behavior. The Node, browser and Bun SQLite tests do not replace device evidence. + +## Signed-candidate acceptance still required + +1. Run the same package inspection against the actual signed archive and retain source, archive hash, toolchain, module versions and all manifests. Verify SDK signatures and entitlements separately; the simulator inspection does neither. +2. Measure launch, a complete game, resume, reset, Help, cancelled diagnostics, explicit sharing and external support navigation. Identify which process and destination made each request. Do not treat build-time telemetry settings as a runtime traffic audit. +3. Verify device backup, offload, deletion and restore. Use synthetic names and scores. Preserve existing user data and review captures before sharing. +4. Review the app and SDK encryption use. No application-level database encryption is configured. Platform TLS and SDK code still require classification. An owner must approve export-compliance answers and any supporting documents. +5. Reconcile measured behavior with the privacy policy and App Store declaration matrix. Select the public policy URL and private contact without copying another app's identity or contacts. +6. Recheck [Apple's privacy details](https://developer.apple.com/app-store/app-privacy-details/), [SDK requirements](https://developer.apple.com/support/third-party-SDK-requirements/) and [Expo's privacy guidance](https://docs.expo.dev/guides/apple-privacy/) immediately before submission and after dependency or data-flow changes. + +No missing declaration, contact or legal approval is filled by a guessed value. A manifest comparison proves packaging consistency only. diff --git a/docs/native-simulator.md b/docs/native-simulator.md index 95e2485..f2d244c 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -21,10 +21,16 @@ Expo prebuild generates `apps/mobile/ios` from source configuration. This direct bun scripts/ios-native/run.mjs ``` -The initial bootstrap retains its generated Podfile.lock as an artifact and remains non-passing until that lock is reviewed and committed at `apps/mobile/native/Podfile.lock`. Subsequent builds copy it into the generated project and use `pod install --deployment`; dependency drift fails the job. For an intentional update, `--refresh-pods` generates a replacement in a fresh checkout. A changed lock remains non-passing until source matches. Do not bypass that check or call a bootstrap a qualified release. +The initial bootstrap retains its generated Podfile.lock as an artifact and remains non-passing until that lock is reviewed and committed at `apps/mobile/native/Podfile.lock`. Subsequent builds copy it into the generated project and use `pod install --deployment`; dependency drift fails the job. For an intentional update, `--refresh-pods` generates a replacement in a fresh checkout. A missing or changed lock stops before compilation and remains non-passing until source matches. Refresh-only mode always stops before compilation, even if the lock did not change. + +For hosted regeneration, apply the `native-pods-refresh` PR label before pushing the dependency change. Download its retained lock, inspect and commit the change, remove the label, then repeat normal qualification. Adding a label alone does not start this workflow, and reruns retain the original event's label snapshot. The refresh job intentionally fails and cannot satisfy the required quality gate. Do not bypass that check or call a bootstrap a qualified release. Build configuration is Release, `CODE_SIGNING_ALLOWED=NO`, with an embedded Hermes/JavaScript bundle. The simulator app targets the current host architecture, recorded in the manifest, rather than compiling an unused second simulator slice. It is not a universal Mac distribution. No Metro server is started. The compiled bundle identifier, version, build and minimum iOS 17.0 must match source. The proposed 1.0.0/build 1 and existing development identifiers are not approved public identity or an App Store reservation. +## Packaged privacy resources + +The runner inspects the actual app's privacy manifests, purpose strings, update configuration and encryption-declaration field. It requires Expo FileSystem's bundled manifest to match the locked SDK source and its API reasons to appear in the aggregate. Only Expo FileSystem opts into source compilation because the inspected SDK 57 precompiled package omitted that resource. See the [engineering inventory](mobile-privacy-audit.md) for the reproduced finding and evidence limits. This check does not approve privacy answers, SDK signatures or export classification. + ## Native interaction matrix The job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. @@ -39,6 +45,6 @@ This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad `reports/native/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. Logs and partial receipts survive failures; the required quality gate includes the native job. A screenshot file's existence alone is not visual review or release approval. -The artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist, screenshots, recording, test reports and synthetic database snapshots. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. +The artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist, privacy inspection, screenshots, recording, test reports and synthetic database snapshots. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/scripts/ios-native/privacy.mjs b/scripts/ios-native/privacy.mjs new file mode 100644 index 0000000..5aed657 --- /dev/null +++ b/scripts/ios-native/privacy.mjs @@ -0,0 +1,60 @@ +import { createHash } from "node:crypto"; +import { spawnSync } from "node:child_process"; +import { readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { createRequire } from "node:module"; +import { dirname, join } from "node:path"; +import { isDeepStrictEqual } from "node:util"; + +export function privacyErrors(manifests, upstream) { + const errors = []; + const sdk = manifests.find((item) => item.path === "ExpoFileSystem_privacy.bundle/PrivacyInfo.xcprivacy"); + if (!sdk) errors.push("Expo FileSystem privacy manifest is missing from its built resource bundle."); + else if (!isDeepStrictEqual(sdk.fields, upstream)) errors.push("Built Expo FileSystem privacy declarations differ from the locked SDK source."); + const aggregate = manifests.find((item) => item.path === "PrivacyInfo.xcprivacy"); + for (const api of upstream.NSPrivacyAccessedAPITypes ?? []) { + const declared = aggregate?.fields.NSPrivacyAccessedAPITypes?.find((item) => item.NSPrivacyAccessedAPIType === api.NSPrivacyAccessedAPIType); + for (const reason of api.NSPrivacyAccessedAPITypeReasons ?? []) { + if (!declared?.NSPrivacyAccessedAPITypeReasons?.includes(reason)) errors.push(`Aggregate lacks ${api.NSPrivacyAccessedAPIType} reason ${reason}.`); + } + } + return errors; +} + +function manifestPaths(directory, prefix = "") { + return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { + const relative = prefix + entry.name; + if (entry.isSymbolicLink()) throw new Error(`Inspect unexpected native bundle symlink before qualification: ${relative}`); + if (entry.isDirectory()) return manifestPaths(join(directory, entry.name), relative + "/"); + return entry.isFile() && entry.name === "PrivacyInfo.xcprivacy" ? [relative] : []; + }); +} + +function readPlist(path) { + const result = spawnSync("/usr/bin/plutil", ["-convert", "json", "-o", "-", path], { encoding: "utf8", timeout: 30000, maxBuffer: 1024 * 1024 }); + if (result.error) throw result.error; + if (result.status !== 0) throw new Error(`Cannot inspect property list: ${path}`); + return JSON.parse(result.stdout); +} + +export function inspectNativePrivacy(app, appRoot, output) { + const require = createRequire(join(appRoot, "package.json")); + const expoRequire = createRequire(require.resolve("expo/package.json")); + const sdkRoot = dirname(expoRequire.resolve("expo-file-system/package.json")); + const source = join(sdkRoot, "ios/PrivacyInfo.xcprivacy"); + const digest = (path) => createHash("sha256").update(readFileSync(path)).digest("hex"); + const manifests = manifestPaths(app).sort().map((path) => ({ path, sha256: digest(join(app, path)), fields: readPlist(join(app, path)) })); + const upstream = readPlist(source); + const info = readPlist(join(app, "Info.plist")); + const report = { + kind: "static-native-privacy-inspection", manifests, + sdk: { package: "expo-file-system", version: JSON.parse(readFileSync(join(sdkRoot, "package.json"), "utf8")).version, sourceSha256: digest(source), fields: upstream }, + purposeStrings: Object.fromEntries(Object.entries(info).filter(([key]) => key.endsWith("UsageDescription"))), + transportSecurity: info.NSAppTransportSecurity ?? null, + encryptionDeclaration: info.ITSAppUsesNonExemptEncryption ?? null, + expoUpdates: readPlist(join(app, "Expo.plist")), + errors: privacyErrors(manifests, upstream), + limits: ["Not a measurement of network traffic", "Not a signed-archive or SDK-signature audit", "Not App Store privacy or export-compliance approval"], + }; + writeFileSync(join(output, "privacy-inspection.json"), JSON.stringify(report, null, 2) + "\n"); + return report; +} diff --git a/scripts/ios-native/privacy.test.mjs b/scripts/ios-native/privacy.test.mjs new file mode 100644 index 0000000..a707457 --- /dev/null +++ b/scripts/ios-native/privacy.test.mjs @@ -0,0 +1,36 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { test } from "node:test"; +import { privacyErrors } from "./privacy.mjs"; + +const upstream = { NSPrivacyTracking: false, NSPrivacyCollectedDataTypes: [], NSPrivacyAccessedAPITypes: [ + { NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryDiskSpace", NSPrivacyAccessedAPITypeReasons: ["E174.1", "85F4.1"] }, +] }; +const complete = () => [ + { path: "PrivacyInfo.xcprivacy", fields: structuredClone(upstream) }, + { path: "ExpoFileSystem_privacy.bundle/PrivacyInfo.xcprivacy", fields: structuredClone(upstream) }, +]; + +test("native privacy check accepts matching SDK and aggregate declarations without asserting legal approval", () => { + assert.deepEqual(privacyErrors(complete(), upstream), []); +}); + +test("an empty SDK resource bundle cannot pass because another manifest covers the same API", () => { + assert.match(privacyErrors(complete().slice(0, 1), upstream).join("\n"), /missing from its built resource bundle/); +}); + +test("SDK drift and incomplete aggregate reasons remain errors", () => { + const manifests = complete(); + manifests[1].fields.NSPrivacyTracking = true; + manifests[0].fields.NSPrivacyAccessedAPITypes[0].NSPrivacyAccessedAPITypeReasons.pop(); + const errors = privacyErrors(manifests, upstream); + assert.equal(errors.length, 2); + assert.match(errors[0], /differ from the locked SDK/); + assert.match(errors[1], /85F4.1/); + assert.equal(privacyErrors([], upstream).length, 3); +}); + +test("Expo FileSystem opts out of the precompiled package that omitted its manifest", () => { + const pkg = JSON.parse(readFileSync(new URL("../../apps/mobile/package.json", import.meta.url), "utf8")); + assert.deepEqual(pkg.expo?.autolinking?.ios?.buildFromSource, ["expo-file-system"]); +}); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index cc53b9d..33c0de2 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -8,6 +8,7 @@ import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; import { decodeSave } from "../../apps/mobile/src/local/save.ts"; import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; +import { inspectNativePrivacy } from "./privacy.mjs"; assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); assert(["arm64", "x64"].includes(process.arch), "Unsupported simulator host architecture."); @@ -90,11 +91,13 @@ try { const ios = join(appRoot, "ios"); const sourceLock = join(appRoot, "native/Podfile.lock"); receipt.bootstrapPodLock = !existsSync(sourceLock); const refreshPodLock = process.argv.includes("--refresh-pods"); + receipt.podInstallMode = refreshPodLock ? "refresh-only" : receipt.bootstrapPodLock ? "bootstrap" : "deployment"; if (!receipt.bootstrapPodLock) copyFileSync(sourceLock, join(ios, "Podfile.lock")); run("pod", ["install", ...(receipt.bootstrapPodLock || refreshPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); copyFileSync(join(ios, "Podfile.lock"), join(output, "Podfile.lock")); receipt.podLockNeedsReview = receipt.bootstrapPodLock || !readFileSync(sourceLock).equals(readFileSync(join(ios, "Podfile.lock"))); copyFileSync(join(ios, "Podfile.properties.json"), join(output, "Podfile.properties.json")); + assert(!refreshPodLock && !receipt.podLockNeedsReview, "Dependency-only run: review reports/native/Podfile.lock, commit changes to apps/mobile/native, then run normal qualification."); const workspaces = readdirSync(ios).filter((name) => name.endsWith(".xcworkspace")); assert.equal(workspaces.length, 1); const scheme = workspaces[0].slice(0, -".xcworkspace".length); const derived = join(tmpdir(), `dice-derived-${process.pid}`); @@ -110,6 +113,9 @@ try { receipt.app = { bundleId, version: config.version, build: config.ios.buildNumber, minimumOS: "17.0", jsBundleSha256: hash(readFileSync(join(app, "main.jsbundle"))) }; run("tar", ["-czf", join(output, "unsigned-simulator.app.tar.gz"), "-C", products, apps[0]], { log: "package.log" }); copyFileSync(info, join(output, "built-Info.plist")); + receipt.privacy = inspectNativePrivacy(app, appRoot, output); + assert.deepEqual(receipt.privacy.errors, [], "Native SDK privacy resources or aggregate declarations are incomplete."); + json(join(output, "manifest.json"), receipt); assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Prebuild changed tracked source. Review it before qualification."); const runtime = "com.apple.CoreSimulator.SimRuntime.iOS-26-5"; const types = JSON.parse(sim("list", "devicetypes", "--json")).devicetypes; @@ -168,8 +174,7 @@ try { flow(device, directory, "reset-database", corruptFlow(bundleId, true)); assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); receipt.nativeCorruptionAndReset = "passed"; - receipt.status = receipt.podLockNeedsReview ? "pod-lock-needs-review" : "passed"; - if (receipt.podLockNeedsReview) process.exitCode = 1; + receipt.status = "passed"; } catch (error) { receipt.status = "failed"; receipt.error = error instanceof Error ? error.message : String(error); process.exitCode = 1; console.error(receipt.error); @@ -177,8 +182,8 @@ try { try { await stopRecording(); } catch (error) { receipt.recordingError = String(error); receipt.status = "failed"; process.exitCode = 1; } for (const device of ownedDevices) { // Only devices created by this process are shut down or deleted. - spawnSync("xcrun", ["simctl", "shutdown", device], { env, stdio: "ignore" }); - const removed = spawnSync("xcrun", ["simctl", "delete", device], { env, stdio: "ignore" }); + spawnSync("xcrun", ["simctl", "shutdown", device], { env, stdio: "ignore", timeout: 60000, killSignal: "SIGKILL" }); + const removed = spawnSync("xcrun", ["simctl", "delete", device], { env, stdio: "ignore", timeout: 60000, killSignal: "SIGKILL" }); if (removed.status !== 0) { (receipt.cleanupErrors ??= []).push(device); receipt.status = "failed"; process.exitCode = 1; } } receipt.finishedAt = new Date().toISOString(); receipt.artifacts = artifactFiles(output); json(join(output, "manifest.json"), receipt); From ed6c9ef8b85ab4ca65e4114ee80ea8f5b5e3c843 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 20:18:42 -0400 Subject: [PATCH 06/13] fix: qualify native safe areas and shard source-bound simulator journeys --- .github/workflows/quality.yml | 71 +++++++-- apps/mobile/app/_layout.tsx | 2 +- apps/mobile/app/help.tsx | 2 +- apps/mobile/app/history.tsx | 2 +- apps/mobile/native/Podfile.lock | 4 +- apps/mobile/native/README.md | 6 +- apps/mobile/src/screens/NativeGameScreen.tsx | 2 +- docs/native-simulator.md | 12 +- scripts/ios-native/artifact.mjs | 60 +++++++ scripts/ios-native/artifact.test.mjs | 29 ++++ scripts/ios-native/build.mjs | 40 +++++ scripts/ios-native/flows.mjs | 17 +- scripts/ios-native/flows.test.mjs | 33 +++- scripts/ios-native/run.mjs | 159 +++++++++---------- 14 files changed, 319 insertions(+), 120 deletions(-) create mode 100644 scripts/ios-native/artifact.mjs create mode 100644 scripts/ios-native/artifact.test.mjs create mode 100644 scripts/ios-native/build.mjs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index c96e078..e4b0ec4 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -120,10 +120,52 @@ jobs: retention-days: 3 if-no-files-found: warn + native-build: + name: Build unsigned iOS simulator app + runs-on: macos-26 + timeout-minutes: 50 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '24.12.0' + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 + with: + bun-version: '1.4.2' + - name: Install locked dependencies without lifecycle scripts + run: bun install --frozen-lockfile --ignore-scripts + - name: Compile and inspect the source-bound Release app + env: + REFRESH_PODS: ${{ contains(github.event.pull_request.labels.*.name, 'native-pods-refresh') }} + run: | + if [ "$REFRESH_PODS" = true ]; then + bun scripts/ios-native/run.mjs --refresh-pods + else + bun scripts/ios-native/run.mjs --build-only + fi + - name: Retain native build or dependency-refresh evidence + if: ${{ always() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ios-native-build-${{ github.event.pull_request.head.sha || github.sha }} + path: reports/native/ + retention-days: 1 + compression-level: 9 + if-no-files-found: warn + native: - name: Unsigned iPhone and iPad qualification + name: Native qualification (${{ matrix.group }}) + needs: native-build runs-on: macos-26 timeout-minutes: 60 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + group: [phone-5, phone-6, tablet-8, tablet-10] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -137,6 +179,11 @@ jobs: bun-version: '1.4.2' - name: Install locked dependencies without lifecycle scripts run: bun install --frozen-lockfile --ignore-scripts + - name: Download this run's source-bound simulator app + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ios-native-build-${{ github.event.pull_request.head.sha || github.sha }} + path: reports/native-build/ - name: Install hash-verified local Maestro CLI shell: bash run: | @@ -146,22 +193,15 @@ jobs: test -x "$RUNNER_TEMP/maestro-tool/maestro/bin/maestro" echo "$RUNNER_TEMP/maestro-tool/maestro/bin" >> "$GITHUB_PATH" echo "JAVA_HOME=$(/usr/libexec/java_home -v 17)" >> "$GITHUB_ENV" - - name: Build a Release simulator app and exercise native screens and saves + - name: Verify the app and exercise this device group env: - REFRESH_PODS: ${{ contains(github.event.pull_request.labels.*.name, 'native-pods-refresh') }} - run: | - if [ "$REFRESH_PODS" = true ]; then - bun scripts/ios-native/run.mjs --refresh-pods - else - bun scripts/ios-native/run.mjs - fi - - name: Require the reviewed CocoaPods lock after bootstrap - run: test -f apps/mobile/native/Podfile.lock + NATIVE_TEST_GROUP: ${{ matrix.group }} + run: bun scripts/ios-native/run.mjs "--test-group=$NATIVE_TEST_GROUP" - name: Retain unsigned native evidence, including failed-run diagnostics if: ${{ always() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: ios-native-${{ github.event.pull_request.head.sha || github.sha }} + name: ios-native-${{ matrix.group }}-${{ github.event.pull_request.head.sha || github.sha }} path: reports/native/ retention-days: 1 compression-level: 9 @@ -170,7 +210,7 @@ jobs: quality-gate: name: quality-gate if: ${{ always() }} - needs: [validate, mutation, native] + needs: [validate, mutation, native-build, native] runs-on: ubuntu-latest timeout-minutes: 2 steps: @@ -178,9 +218,10 @@ jobs: env: VALIDATION_RESULT: ${{ needs.validate.result }} MUTATION_RESULT: ${{ needs.mutation.result }} + NATIVE_BUILD_RESULT: ${{ needs.native-build.result }} NATIVE_RESULT: ${{ needs.native.result }} run: | - if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ] || [ "$NATIVE_RESULT" != success ]; then - echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT native=$NATIVE_RESULT" + if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ] || [ "$NATIVE_BUILD_RESULT" != success ] || [ "$NATIVE_RESULT" != success ]; then + echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT native-build=$NATIVE_BUILD_RESULT native=$NATIVE_RESULT" exit 1 fi diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 5ca0dc4..2e0cac1 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -7,7 +7,7 @@ function Navigation() { const { colors, dark } = useLocalGame(); return <> - diff --git a/apps/mobile/app/help.tsx b/apps/mobile/app/help.tsx index 4cc52bb..fba27b3 100644 --- a/apps/mobile/app/help.tsx +++ b/apps/mobile/app/help.tsx @@ -8,7 +8,7 @@ import { Action } from "../src/ui/controls"; export default function HelpRoute() { const { colors } = useLocalGame(); const router = useRouter(); - return + return router.back()} /> }} /> ; diff --git a/apps/mobile/app/history.tsx b/apps/mobile/app/history.tsx index 9930ca3..2adeef2 100644 --- a/apps/mobile/app/history.tsx +++ b/apps/mobile/app/history.tsx @@ -5,5 +5,5 @@ import { History } from "../src/screens/History"; export default function HistoryRoute() { const { colors } = useLocalGame(); - return ; + return ; } diff --git a/apps/mobile/native/Podfile.lock b/apps/mobile/native/Podfile.lock index 0defec1..82af5e5 100644 --- a/apps/mobile/native/Podfile.lock +++ b/apps/mobile/native/Podfile.lock @@ -2276,7 +2276,7 @@ DEPENDENCIES: - "Expo (from `../../../node_modules/.bun/expo@57.0.24+ea9bb3aa1309ed75/node_modules/expo`)" - "ExpoAsset (from `../../../node_modules/.bun/expo-asset@57.0.18+d556132523c82a78/node_modules/expo-asset/ios`)" - "ExpoDomWebView (from `../../../node_modules/.bun/@expo+dom-webview@57.0.1+ea9bb3aa1309ed75/node_modules/@expo/dom-webview/ios`)" - - "ExpoFileSystem (from `../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios/ExpoFileSystem.podspec`)" + - "ExpoFileSystem (from `../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios`)" - "ExpoFont (from `../../../node_modules/.bun/expo-font@57.0.4+19c046550412b028/node_modules/expo-font/ios/ExpoFont.podspec`)" - "ExpoGlassEffect (from `../../../node_modules/.bun/expo-glass-effect@57.0.3+19c046550412b028/node_modules/expo-glass-effect/ios`)" - "ExpoKeepAwake (from `../../../node_modules/.bun/expo-keep-awake@57.0.2+eb4ac7e61371bf55/node_modules/expo-keep-awake/ios`)" @@ -2386,7 +2386,7 @@ EXTERNAL SOURCES: ExpoDomWebView: :path: "../../../node_modules/.bun/@expo+dom-webview@57.0.1+ea9bb3aa1309ed75/node_modules/@expo/dom-webview/ios" ExpoFileSystem: - :podspec: "../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios/ExpoFileSystem.podspec" + :path: "../../../node_modules/.bun/expo-file-system@57.0.7+19c046550412b028/node_modules/expo-file-system/ios" ExpoFont: :podspec: "../../../node_modules/.bun/expo-font@57.0.4+19c046550412b028/node_modules/expo-font/ios/ExpoFont.podspec" ExpoGlassEffect: diff --git a/apps/mobile/native/README.md b/apps/mobile/native/README.md index 6e5669a..3622410 100644 --- a/apps/mobile/native/README.md +++ b/apps/mobile/native/README.md @@ -1,9 +1,9 @@ # Native dependency lock -`Podfile.lock` was generated by CocoaPods 1.17.0 from source commit `53bbfd32e17481f698db75ec2117440ea9d1d089` in [native run 36355495021](https://github.com/HemSoft/yahtzee/actions/runs/36355495021). The unsigned Release build succeeded with Xcode 26.6 and SDK 26.5. Simulator startup timed out before UI qualification; this provenance does not claim a passing native interaction run. +`Podfile.lock` was refreshed by CocoaPods 1.17.0 from source commit `65ae823fe7eb5778c812aa1164c0e1ced5984480` in [dependency-only run 36360477119](https://github.com/HemSoft/yahtzee/actions/runs/36360477119). The reviewed diff changes only Expo FileSystem's external source from a precompiled podspec to its source directory. No versions or spec checksums changed. That refresh intentionally stopped before compilation. -The retrieved lock's SHA-256 is `47d09e39c509fcadfb2d7bd4e5ee41398d0cbe2b2cecd5440100c09dc6cb4f74`, using LF bytes. Its external sources point to the locked workspace packages and generated codegen directories, not workstation paths. The inspected native modules include Expo 57.0.24, Expo SQLite 57.0.3, AsyncStorage 2.2.0 for legacy preference import, React Native 0.86.3 and its declared navigation/runtime dependencies. There are no Apple signing credentials in this directory. +The retrieved lock's SHA-256 is `77627085e3c13dc603feac806a0288268a993c18278193b4c5ed02dcee98c500`, using LF bytes. Its external sources point to the locked workspace packages and generated codegen directories, not workstation paths. The inspected native modules include Expo 57.0.24, Expo SQLite 57.0.3, AsyncStorage 2.2.0 for legacy preference import, React Native 0.86.3 and its declared navigation/runtime dependencies. There are no Apple signing credentials in this directory. The [native runner](../../../scripts/ios-native/run.mjs) copies this lock into a newly generated Expo project and uses `pod install --deployment`. It also checks the generated lock against source. Do not edit dependency versions or checksums by hand. -For an intentional dependency update, use a fresh macOS checkout with the documented toolchain and run `bun scripts/ios-native/run.mjs --refresh-pods`. Review the replacement in `reports/native/Podfile.lock`, commit it here, and repeat normal qualification. A missing or changed lock remains a non-passing result until reviewed source matches. See the [qualification guide](../../../docs/native-simulator.md) for tool versions and evidence limits. +For an intentional dependency update, use a fresh macOS checkout with the documented toolchain and run `bun scripts/ios-native/run.mjs --refresh-pods`. Review the replacement in `reports/native/Podfile.lock`, commit it here, and repeat normal qualification. Refresh-only mode always stops before compilation. A missing or changed lock remains a non-passing result until reviewed source matches. See the [qualification guide](../../../docs/native-simulator.md) for tool versions and evidence limits. diff --git a/apps/mobile/src/screens/NativeGameScreen.tsx b/apps/mobile/src/screens/NativeGameScreen.tsx index f3805f6..5bccb5c 100644 --- a/apps/mobile/src/screens/NativeGameScreen.tsx +++ b/apps/mobile/src/screens/NativeGameScreen.tsx @@ -40,7 +40,7 @@ export function NativeGameScreen({ onHistory, onHelp }: { onHistory: () => void; if (await store.start({ name, diceCount: preferences.diceCount, aiOpponents: preferences.aiOpponents })) setPlaying(true); }; const again = async () => { if (await store.discard()) setPlaying(false); }; - return + return diff --git a/docs/native-simulator.md b/docs/native-simulator.md index f2d244c..a0bd0b5 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -1,6 +1,6 @@ # Unsigned iOS simulator qualification -The native job in [Application quality](../.github/workflows/quality.yml) uses a standard public GitHub-hosted macOS runner. It does not use Apple credentials, a paid device cloud, signing, upload, TestFlight or App Store submission. Its result is a simulator app, not an installable iPhone archive. +The native jobs in [Application quality](../.github/workflows/quality.yml) use standard public GitHub-hosted macOS runners. It does not use Apple credentials, a paid device cloud, signing, upload, TestFlight or App Store submission. Its result is a simulator app, not an installable iPhone archive. ## Inputs @@ -33,9 +33,13 @@ The runner inspects the actual app's privacy manifests, purpose strings, update ## Native interaction matrix -The job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. +CI compiles once with `--build-only`, then downloads that same run's artifact into four test jobs: `phone-5`, `phone-6`, `tablet-8` and `tablet-10`. Each runs `--test-group=` after verifying the build's source, workflow run, architecture, Bun lock, app identity and every retained file hash. Archive extraction rejects traversal, links and special files. A stale or refresh-only build cannot feed qualification. Every group remains required by the quality gate. -Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. +Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 also cover largest text; tablet 10 covers corrupt-document/database recovery. Group tests prove the ten scenarios are assigned exactly once. This avoids repeating compilation and prevents the measured serial workload from exceeding a one-hour job. + +Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. + +Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Scoring waits for enabled controls and an acknowledged recorded score before the next category. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. @@ -45,6 +49,6 @@ This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad `reports/native/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. Logs and partial receipts survive failures; the required quality gate includes the native job. A screenshot file's existence alone is not visual review or release approval. -The artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist, privacy inspection, screenshots, recording, test reports and synthetic database snapshots. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. +The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Hidden Maestro debug logs are excluded by the uploader and by the published hash inventory. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/scripts/ios-native/artifact.mjs b/scripts/ios-native/artifact.mjs new file mode 100644 index 0000000..475c20c --- /dev/null +++ b/scripts/ios-native/artifact.mjs @@ -0,0 +1,60 @@ +import assert from "node:assert/strict"; +import { mkdtempSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { tmpdir } from "node:os"; + +export function safeArtifactPath(path) { + return typeof path === "string" && path.length > 0 && !/^[./\\]|[:\\\r\n\0]/.test(path) && !path.split("/").includes(".."); +} +export function verifyBuild(build, expected) { + assert.equal(build.schemaVersion, 1); + assert.equal(build.kind, "unsigned-ios-simulator-build"); + assert.equal(build.status, "passed"); + assert.equal(build.source, expected.source, "Native app source differs from the checked-out tests."); + assert.equal(build.architecture, expected.architecture); + assert.equal(build.bunLockSha256, expected.bunLockSha256); + if (expected.runId) assert.equal(build.runId, expected.runId, "Native app must come from this workflow run."); + assert.equal(build.podInstallMode, "deployment"); + assert.equal(build.podLockNeedsReview, false); + assert.deepEqual(build.privacy?.errors, []); + assert(build.app?.directory?.endsWith(".app") && !/[/\\\r\n]/.test(build.app.directory)); + assert.equal(build.app.bundleId, expected.config.ios.bundleIdentifier); + assert.equal(build.app.version, expected.config.version); + assert.equal(build.app.build, expected.config.ios.buildNumber); + assert(Array.isArray(build.artifacts) && build.artifacts.length > 0); + const paths = new Set(); + for (const artifact of build.artifacts) { + assert(safeArtifactPath(artifact.path), "Unsafe native artifact path."); + assert(!paths.has(artifact.path), "Duplicate native artifact path."); paths.add(artifact.path); + assert(/^[a-f0-9]{64}$/.test(artifact.sha256) && Number.isSafeInteger(artifact.bytes) && artifact.bytes >= 0); + } + assert(paths.has("unsigned-simulator.app.tar.gz")); +} +export function verifyArchivePaths(list, directory) { + assert(list.length > 0); + for (const path of list) { + assert(safeArtifactPath(path) && (path === `${directory}/` || path.startsWith(`${directory}/`)), "Archive escapes its app directory."); + } +} +export function loadBuiltSimulator({ root, run, hash, receipt, architecture }) { + const input = join(root, "reports/native-build"); + const build = JSON.parse(readFileSync(join(input, "manifest.json"), "utf8")); + const config = JSON.parse(readFileSync(join(root, "apps/mobile/app.json"), "utf8")).expo; + verifyBuild(build, { source: receipt.source, architecture, bunLockSha256: receipt.bunLockSha256, runId: receipt.runId, config }); + for (const artifact of build.artifacts) { + const bytes = readFileSync(join(input, artifact.path)); + assert.equal(bytes.length, artifact.bytes); assert.equal(hash(bytes), artifact.sha256, `Native artifact changed: ${artifact.path}`); + } + const archive = join(input, "unsigned-simulator.app.tar.gz"); + verifyArchivePaths(run("tar", ["-tzf", archive], { capture: true }).split("\n"), build.app.directory); + const entries = run("tar", ["-tvzf", archive], { capture: true }).split("\n"); + assert(entries.every((line) => /^[d-]/.test(line)), "Archive contains links or special files."); + const directory = mkdtempSync(join(tmpdir(), "dice-qualified-app-")); + run("tar", ["-xzf", archive, "-C", directory], { log: "unpack.log" }); + const app = join(directory, build.app.directory); + assert.equal(hash(readFileSync(join(app, "main.jsbundle"))), build.app.jsBundleSha256); + receipt.app = build.app; + receipt.build = { source: build.source, runId: build.runId, runAttempt: build.runAttempt, artifactSha256: hash(readFileSync(archive)), manifestSha256: hash(readFileSync(join(input, "manifest.json"))) }; + receipt.privacy = { errors: [], evidence: "Source-bound native-build artifact privacy-inspection.json" }; + return { app, bundleId: build.app.bundleId }; +} diff --git a/scripts/ios-native/artifact.test.mjs b/scripts/ios-native/artifact.test.mjs new file mode 100644 index 0000000..bcdfb43 --- /dev/null +++ b/scripts/ios-native/artifact.test.mjs @@ -0,0 +1,29 @@ +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { safeArtifactPath, verifyArchivePaths, verifyBuild } from "./artifact.mjs"; + +const expected = { source: "a".repeat(40), architecture: "arm64", bunLockSha256: "b".repeat(64), runId: "123", + config: { version: "1.0.0", ios: { bundleIdentifier: "com.example.dice", buildNumber: "1" } } }; +const valid = () => ({ schemaVersion: 1, kind: "unsigned-ios-simulator-build", status: "passed", source: expected.source, + architecture: expected.architecture, bunLockSha256: expected.bunLockSha256, runId: expected.runId, podInstallMode: "deployment", podLockNeedsReview: false, + privacy: { errors: [] }, app: { directory: "Dice.app", bundleId: "com.example.dice", version: "1.0.0", build: "1" }, + artifacts: [{ path: "unsigned-simulator.app.tar.gz", bytes: 100, sha256: "c".repeat(64) }] }); + +test("only a passing deployment-mode build from the same source, workflow and architecture can feed native tests", () => { + assert.doesNotThrow(() => verifyBuild(valid(), expected)); + for (const [key, value] of Object.entries({ source: "other", runId: "other", architecture: "x86_64", status: "failed", + podInstallMode: "refresh-only", podLockNeedsReview: true, bunLockSha256: "other", kind: "unsigned-ios-simulator-tests" })) { + assert.throws(() => verifyBuild({ ...valid(), [key]: value }, expected), key); + } + const drift = valid(); drift.privacy.errors.push("missing SDK manifest"); assert.throws(() => verifyBuild(drift, expected)); + const identity = valid(); identity.app.build = "2"; assert.throws(() => verifyBuild(identity, expected)); +}); + +test("artifact inventories and archive members cannot traverse outside the owned app", () => { + for (const path of ["../outside", "/outside", "C:/outside", "a/../../outside", "a\\outside", ".hidden", "a\nother"]) assert.equal(safeArtifactPath(path), false, path); + assert.doesNotThrow(() => verifyArchivePaths(["Dice.app/", "Dice.app/Frameworks/Example.framework/Example"], "Dice.app")); + for (const path of ["Other.app/Info.plist", "Dice.app/../outside", "/Dice.app/Info.plist"]) assert.throws(() => verifyArchivePaths([path], "Dice.app")); + const duplicate = valid(); duplicate.artifacts.push(duplicate.artifacts[0]); assert.throws(() => verifyBuild(duplicate, expected)); + const unsafe = valid(); unsafe.artifacts[0].path = "../outside"; assert.throws(() => verifyBuild(unsafe, expected)); + const missing = valid(); missing.artifacts = []; assert.throws(() => verifyBuild(missing, expected)); +}); diff --git a/scripts/ios-native/build.mjs b/scripts/ios-native/build.mjs new file mode 100644 index 0000000..5206f5e --- /dev/null +++ b/scripts/ios-native/build.mjs @@ -0,0 +1,40 @@ +import assert from "node:assert/strict"; +import { copyFileSync, existsSync, readFileSync, readdirSync } from "node:fs"; +import { join } from "node:path"; +import { tmpdir } from "node:os"; +import { inspectNativePrivacy } from "./privacy.mjs"; + +export function buildSimulator({ root, output, run, hash, receipt, architecture, refreshPodLock }) { + const appRoot = join(root, "apps/mobile"); + assert(!existsSync(join(appRoot, "ios")), "Use a fresh checkout. Existing native project files were not removed."); + run("node", ["node_modules/expo/bin/cli", "prebuild", "--platform", "ios", "--no-install"], { cwd: appRoot, log: "prebuild.log" }); + const ios = join(appRoot, "ios"); const sourceLock = join(appRoot, "native/Podfile.lock"); + receipt.bootstrapPodLock = !existsSync(sourceLock); + receipt.podInstallMode = refreshPodLock ? "refresh-only" : receipt.bootstrapPodLock ? "bootstrap" : "deployment"; + if (!receipt.bootstrapPodLock) copyFileSync(sourceLock, join(ios, "Podfile.lock")); + run("pod", ["install", ...(receipt.bootstrapPodLock || refreshPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); + copyFileSync(join(ios, "Podfile.lock"), join(output, "Podfile.lock")); + receipt.podLockNeedsReview = receipt.bootstrapPodLock || !readFileSync(sourceLock).equals(readFileSync(join(ios, "Podfile.lock"))); + copyFileSync(join(ios, "Podfile.properties.json"), join(output, "Podfile.properties.json")); + assert(!refreshPodLock && !receipt.podLockNeedsReview, "Dependency-only run: review reports/native/Podfile.lock, commit changes to apps/mobile/native, then run normal qualification."); + const workspaces = readdirSync(ios).filter((name) => name.endsWith(".xcworkspace")); assert.equal(workspaces.length, 1); + const scheme = workspaces[0].slice(0, -".xcworkspace".length); + const derived = join(tmpdir(), `dice-derived-${process.pid}`); + run("xcodebuild", ["-workspace", join(ios, workspaces[0]), "-scheme", scheme, "-configuration", "Release", "-sdk", "iphonesimulator", + "-destination", "generic/platform=iOS Simulator", "-derivedDataPath", derived, `ARCHS=${architecture}`, "ONLY_ACTIVE_ARCH=YES", "CODE_SIGNING_ALLOWED=NO", "build"], { log: "build.log", timeout: 2400000 }); + const products = join(derived, "Build/Products/Release-iphonesimulator"); + const apps = readdirSync(products).filter((name) => name.endsWith(".app")); assert.equal(apps.length, 1); + const app = join(products, apps[0]); const info = join(app, "Info.plist"); + const config = JSON.parse(readFileSync(join(appRoot, "app.json"), "utf8")).expo; + const plist = (key) => run("/usr/libexec/PlistBuddy", ["-c", `Print :${key}`, info], { capture: true }); + const bundleId = plist("CFBundleIdentifier"); assert.equal(bundleId, config.ios.bundleIdentifier); + assert.equal(plist("CFBundleShortVersionString"), config.version); assert.equal(plist("CFBundleVersion"), config.ios.buildNumber); + assert.equal(plist("MinimumOSVersion"), "17.0"); assert(existsSync(join(app, "main.jsbundle")), "Release app must contain its own JS bundle."); + receipt.app = { directory: apps[0], bundleId, version: config.version, build: config.ios.buildNumber, minimumOS: "17.0", jsBundleSha256: hash(readFileSync(join(app, "main.jsbundle"))) }; + run("tar", ["-czf", join(output, "unsigned-simulator.app.tar.gz"), "-C", products, apps[0]], { log: "package.log" }); + copyFileSync(info, join(output, "built-Info.plist")); + receipt.privacy = inspectNativePrivacy(app, appRoot, output); + assert.deepEqual(receipt.privacy.errors, [], "Native SDK privacy resources or aggregate declarations are incomplete."); + assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Prebuild changed tracked source. Review it before qualification."); + return { app, bundleId }; +} diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index 55bf43c..59154b2 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -1,13 +1,14 @@ const command = (name, value) => `- ${name}${value === undefined ? "" : `: ${JSON.stringify(value)}`}`; const visible = (text) => command("assertVisible", text); -const tap = (text) => command("tapOn", text); -const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 }); +const tap = (text) => command("tapOn", { text, enabled: true }); +const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100, centerElement: true }); const shot = (name) => command("takeScreenshot", name); const header = (bundleId, commands) => `appId: ${JSON.stringify(bundleId)}\n---\n${commands.join("\n")}\n`; export function startFlow(bundleId, scenario) { return header(bundleId, [command("launchApp", { clearState: true, permissions: { all: "deny" } }), - command("setOrientation", scenario.orientation), visible("A little time for dice."), shot("setup"), + command("setOrientation", scenario.orientation), visible("A little time for dice."), + tap("Help"), visible("How to play"), tap("Done"), visible("A little time for dice."), shot("setup"), scroll({ text: "Your name" }), tap("Your name"), command("eraseText"), command("inputText", "Local tester"), command("hideKeyboard"), scroll({ text: "AI opponents" }), tap("AI opponents"), tap(scenario.ai ? "3 AI" : "Solo"), scroll({ text: "Dice count" }), tap("Dice count"), tap(`${scenario.dice} dice`), @@ -20,7 +21,8 @@ export function resumeFlow(bundleId) { } export function completeFlow(bundleId, categories, previewDiagnostics = false) { return header(bundleId, [ - ...categories.flatMap((id) => [scroll({ id: `score-${id}` }), command("tapOn", { id: `score-${id}` })]), + ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }), command("tapOn", { id: `score-${id}`, enabled: true }), + ...(index < categories.length - 1 ? [command("extendedWaitUntil", { visible: { id: `score-${id}`, text: ".* points recorded.*" }, timeout: 15000 })] : [])]), visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), @@ -35,6 +37,13 @@ export function corruptFlow(bundleId, reset = false) { return header(bundleId, commands); } +export const GROUPS = ["phone-5", "phone-6", "tablet-8", "tablet-10"]; +export function scenariosForGroup(group) { + if (!GROUPS.includes(group)) throw new Error(`Unknown native qualification group: ${group}`); + const large = group === "phone-6" ? "phone-largest-text" : group === "tablet-10" ? "tablet-largest-text" : null; + return scenarios.filter((scenario) => scenario.id.startsWith(`${group}-`) || scenario.id === large); +} + export const scenarios = [ { id: "phone-5-solo-light", device: "iPhone 17", dice: 5, ai: 0, appearance: "light", orientation: "PORTRAIT" }, { id: "phone-5-ai-dark-wide", device: "iPhone 17", dice: 5, ai: 3, appearance: "dark", orientation: "LANDSCAPE_LEFT" }, diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index c3e3588..b599efc 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { test } from "node:test"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; function parse(flow) { const [header, body] = flow.trim().split("\n---\n"); @@ -18,30 +18,51 @@ test("native matrix covers every mode with solo and three AI, both devices/theme assert.deepEqual(new Set(scenarios.map((item) => item.appearance)), new Set(["light", "dark"])); assert(scenarios.some((item) => item.device.startsWith("iPad") && item.orientation === "LANDSCAPE_LEFT")); }); +test("bounded native groups cover every scenario exactly once and never mix device families", () => { + const grouped = GROUPS.flatMap(scenariosForGroup); + assert.deepEqual(grouped.map((item) => item.id).sort(), scenarios.map((item) => item.id).sort()); + assert.equal(new Set(grouped.map((item) => item.id)).size, scenarios.length); + for (const group of GROUPS) { + const items = scenariosForGroup(group); + assert.equal(new Set(items.map((item) => item.device)).size, 1); + assert.equal(items.filter((item) => !item.largeText).length, 2); + } + assert.throws(() => scenariosForGroup("unknown")); +}); test("generated flows use valid JSON-in-YAML commands and real semantic controls", () => { for (const scenario of scenarios) { const steps = parse(startFlow("com.hemsoft.yahtzee", scenario)); assert.deepEqual(steps[0].value, { clearState: true, permissions: { all: "deny" } }); - assert(steps.some((step) => step.command === "tapOn" && step.value === `${scenario.dice} dice`)); + assert(steps.some((step) => step.command === "tapOn" && step.value?.text === `${scenario.dice} dice`)); assert(steps.some((step) => step.command === "tapOn" && step.value?.id === "die-0")); assert(steps.some((step) => step.command === "assertVisible" && new RegExp(step.value).test("Re-roll (1)"))); } const resumed = parse(resumeFlow("com.hemsoft.yahtzee")); assert.equal(resumed[0].value.clearState, undefined); - assert(resumed.some((step) => step.value === "Resume Game")); + assert(resumed.some((step) => step.value?.text === "Resume Game")); const completed = parse(completeFlow("com.hemsoft.yahtzee", ["ones", "chance"])); assert.equal(completed.filter((step) => step.command === "tapOn" && step.value?.id?.startsWith("score-")).length, 2); assert(completed.some((step) => step.command === "assertVisible" && step.value === "Game Over!")); const preview = parse(completeFlow("com.hemsoft.yahtzee", ["ones"], true)); assert(preview.some((step) => step.command === "assertVisible" && step.value?.id === "diagnostics-preview")); - assert(preview.some((step) => step.value === "Cancel preview")); + assert(preview.some((step) => step.value?.text === "Cancel preview")); +}); +test("scoring waits for an enabled centered target and acknowledged record before moving on", () => { + const steps = parse(completeFlow("com.hemsoft.yahtzee", ["full-house", "small-straight", "chance"])); + for (const id of ["full-house", "small-straight"]) { + const index = steps.findIndex((step) => step.command === "tapOn" && step.value?.id === `score-${id}`); + assert.equal(steps[index].value.enabled, true); + assert.equal(steps[index - 1].value.centerElement, true); + assert.equal(steps[index + 1].command, "extendedWaitUntil"); + assert.deepEqual(steps[index + 1].value.visible, { id: `score-${id}`, text: ".* points recorded.*" }); + } }); test("corruption flow never clears state and reset includes cancellation first", () => { for (const reset of [false, true]) { const steps = parse(corruptFlow("com.hemsoft.yahtzee", reset)); assert.equal(steps[0].value.clearState, undefined); assert(steps.some((step) => step.value === "Your saved data has not been reset.")); - assert.equal(steps.some((step) => step.value === "Cancel"), reset); - if (reset) assert(steps.findIndex((step) => step.value === "Cancel") < steps.findIndex((step) => step.value?.index === 1)); + assert.equal(steps.some((step) => step.value?.text === "Cancel"), reset); + if (reset) assert(steps.findIndex((step) => step.value?.text === "Cancel") < steps.findIndex((step) => step.value?.index === 1)); } }); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index 33c0de2..7c633fb 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -1,18 +1,26 @@ import assert from "node:assert/strict"; import { spawn, spawnSync } from "node:child_process"; import { createHash } from "node:crypto"; -import { appendFileSync, closeSync, copyFileSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; +import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; import { join, resolve } from "node:path"; -import { tmpdir } from "node:os"; import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; import { decodeSave } from "../../apps/mobile/src/local/save.ts"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios } from "./flows.mjs"; -import { inspectNativePrivacy } from "./privacy.mjs"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { buildSimulator } from "./build.mjs"; +import { loadBuiltSimulator } from "./artifact.mjs"; assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); assert(["arm64", "x64"].includes(process.arch), "Unsupported simulator host architecture."); const architecture = process.arch === "arm64" ? "arm64" : "x86_64"; +const args = process.argv.slice(2); +assert(args.every((arg) => ["--build-only", "--refresh-pods", ...GROUPS.map((group) => `--test-group=${group}`)].includes(arg)), "Unknown native qualification argument."); +const groupArgs = args.filter((arg) => arg.startsWith("--test-group=")); assert(groupArgs.length <= 1); +const group = groupArgs[0]?.slice("--test-group=".length); +const refreshPodLock = args.includes("--refresh-pods"); +const buildOnly = args.includes("--build-only") || refreshPodLock; +assert(!(group && buildOnly), "Build and test-only modes cannot be combined."); +const selectedScenarios = group ? scenariosForGroup(group) : scenarios; const root = resolve(import.meta.dirname, "../.."); const output = join(root, "reports/native"); assert(!existsSync(output), "Use a fresh checkout. Existing native evidence was not overwritten."); @@ -21,34 +29,34 @@ const env = { ...process.env, DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Conte MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "120000" }; const hash = (bytes) => createHash("sha256").update(bytes).digest("hex"); const json = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + "\n"); -function run(executable, args, { cwd = root, capture = false, timeout = 1800000, log = "commands.log" } = {}) { - console.log(`$ ${executable} ${args.join(" ")}`); +function run(executable, commandArgs, { cwd = root, capture = false, timeout = 1800000, log = "commands.log" } = {}) { + console.log(`$ ${executable} ${commandArgs.join(" ")}`); const fd = openSync(join(output, log), "a"); let result; - try { result = spawnSync(executable, args, { cwd, env, encoding: "utf8", timeout, maxBuffer: 16 * 1024 * 1024, stdio: ["ignore", capture ? "pipe" : fd, fd] }); } + try { result = spawnSync(executable, commandArgs, { cwd, env, encoding: "utf8", timeout, killSignal: "SIGKILL", maxBuffer: 16 * 1024 * 1024, stdio: ["ignore", capture ? "pipe" : fd, fd] }); } finally { closeSync(fd); } if (capture && result.stdout) appendFileSync(join(output, log), result.stdout); if (result.error) throw result.error; assert.equal(result.status, 0, `${executable} failed with ${result.status}; see ${log}`); return result.stdout?.trim() ?? ""; } -const sim = (...args) => run("xcrun", ["simctl", ...args], { capture: true, timeout: args[0] === "bootstatus" ? 600000 : 180000 }); -const plist = (file, key) => run("/usr/libexec/PlistBuddy", ["-c", `Print :${key}`, file], { capture: true }); -const receipt = { schemaVersion: 1, kind: "unsigned-ios-simulator", status: "running", source: run("git", ["rev-parse", "HEAD"], { capture: true }), +const sim = (...commandArgs) => run("xcrun", ["simctl", ...commandArgs], { capture: true, timeout: commandArgs[0] === "bootstatus" ? 600000 : 180000 }); +const receipt = { schemaVersion: 1, kind: buildOnly ? "unsigned-ios-simulator-build" : "unsigned-ios-simulator-tests", status: "running", source: run("git", ["rev-parse", "HEAD"], { capture: true }), startedAt: new Date().toISOString(), runId: process.env.GITHUB_RUN_ID ?? null, runAttempt: process.env.GITHUB_RUN_ATTEMPT ?? null, - runnerImage: process.env.ImageVersion ?? null, architecture, scenarios: [], limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset"] }; -json(join(output, "manifest.json"), receipt); -const appRoot = join(root, "apps/mobile"); + runnerImage: process.env.ImageVersion ?? null, architecture, group: group ?? null, scenarios: [], + limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset", "Hidden Maestro debug logs are not uploaded"] }; +const checkpoint = () => json(join(output, "manifest.json"), receipt); +checkpoint(); const ownedDevices = []; let recording = null; async function stopRecording() { if (!recording) return; const child = recording; recording = null; - if (child.exitCode !== null) return; + if (child.exitCode !== null) { assert.equal(child.exitCode, 0, "Simulator recording exited with an error."); return; } const stopped = new Promise((done) => child.once("close", done)); const controller = new AbortController(); child.kill("SIGINT"); - try { await Promise.race([stopped, delay(15000, undefined, { signal: controller.signal }).then(() => { child.kill("SIGTERM"); throw new Error("Simulator recording did not stop."); })]); } + try { await Promise.race([stopped, delay(15000, undefined, { signal: controller.signal }).then(() => { child.kill("SIGKILL"); throw new Error("Simulator recording did not stop."); })]); } finally { controller.abort(); } } function flow(device, directory, name, content) { @@ -68,65 +76,43 @@ function saved(device, bundleId, directory, stage) { } function artifactFiles(directory, prefix = "") { return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { + if (entry.name.startsWith(".")) return []; const relative = prefix + entry.name; const path = join(directory, entry.name); if (entry.isDirectory()) return artifactFiles(path, relative + "/"); if (!entry.isFile() || relative === "manifest.json") return []; return [{ path: relative, bytes: statSync(path).size, sha256: hash(readFileSync(path)) }]; }); } -try { - assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Use a clean source checkout."); - assert(!existsSync(join(appRoot, "ios")), "Use a fresh checkout. Existing native project files were not removed."); - receipt.toolchain = { - xcode: run("xcodebuild", ["-version"], { capture: true }), sdk: run("xcrun", ["--sdk", "iphonesimulator", "--show-sdk-version"], { capture: true }), - node: run("node", ["--version"], { capture: true }), bun: run("bun", ["--version"], { capture: true }), - cocoapods: run("pod", ["--version"], { capture: true }), ruby: run("ruby", ["--version"], { capture: true }), maestro: run("maestro", ["--version"], { capture: true }), - }; - assert.match(receipt.toolchain.xcode, /^Xcode 26\.6\nBuild version 17F113$/); - assert.equal(receipt.toolchain.sdk, "26.5"); assert.equal(receipt.toolchain.node, "v24.12.0"); - assert.equal(receipt.toolchain.bun, "1.4.2"); assert.equal(receipt.toolchain.cocoapods, "1.17.0"); - assert.match(receipt.toolchain.maestro, /2\.10\.0/); - receipt.bunLockSha256 = hash(readFileSync(join(root, "bun.lock"))); - run("node", ["node_modules/expo/bin/cli", "prebuild", "--platform", "ios", "--no-install"], { cwd: appRoot, log: "prebuild.log" }); - const ios = join(appRoot, "ios"); const sourceLock = join(appRoot, "native/Podfile.lock"); - receipt.bootstrapPodLock = !existsSync(sourceLock); - const refreshPodLock = process.argv.includes("--refresh-pods"); - receipt.podInstallMode = refreshPodLock ? "refresh-only" : receipt.bootstrapPodLock ? "bootstrap" : "deployment"; - if (!receipt.bootstrapPodLock) copyFileSync(sourceLock, join(ios, "Podfile.lock")); - run("pod", ["install", ...(receipt.bootstrapPodLock || refreshPodLock ? [] : ["--deployment"])], { cwd: ios, log: "pods.log" }); - copyFileSync(join(ios, "Podfile.lock"), join(output, "Podfile.lock")); - receipt.podLockNeedsReview = receipt.bootstrapPodLock || !readFileSync(sourceLock).equals(readFileSync(join(ios, "Podfile.lock"))); - copyFileSync(join(ios, "Podfile.properties.json"), join(output, "Podfile.properties.json")); - assert(!refreshPodLock && !receipt.podLockNeedsReview, "Dependency-only run: review reports/native/Podfile.lock, commit changes to apps/mobile/native, then run normal qualification."); - const workspaces = readdirSync(ios).filter((name) => name.endsWith(".xcworkspace")); assert.equal(workspaces.length, 1); - const scheme = workspaces[0].slice(0, -".xcworkspace".length); - const derived = join(tmpdir(), `dice-derived-${process.pid}`); - run("xcodebuild", ["-workspace", join(ios, workspaces[0]), "-scheme", scheme, "-configuration", "Release", "-sdk", "iphonesimulator", - "-destination", "generic/platform=iOS Simulator", "-derivedDataPath", derived, `ARCHS=${architecture}`, "ONLY_ACTIVE_ARCH=YES", "CODE_SIGNING_ALLOWED=NO", "build"], { log: "build.log", timeout: 2400000 }); - const products = join(derived, "Build/Products/Release-iphonesimulator"); - const apps = readdirSync(products).filter((name) => name.endsWith(".app")); assert.equal(apps.length, 1); - const app = join(products, apps[0]); const info = join(app, "Info.plist"); - const config = JSON.parse(readFileSync(join(appRoot, "app.json"), "utf8")).expo; - const bundleId = plist(info, "CFBundleIdentifier"); assert.equal(bundleId, config.ios.bundleIdentifier); - assert.equal(plist(info, "CFBundleShortVersionString"), config.version); assert.equal(plist(info, "CFBundleVersion"), config.ios.buildNumber); - assert.equal(plist(info, "MinimumOSVersion"), "17.0"); assert(existsSync(join(app, "main.jsbundle")), "Release app must contain its own JS bundle."); - receipt.app = { bundleId, version: config.version, build: config.ios.buildNumber, minimumOS: "17.0", jsBundleSha256: hash(readFileSync(join(app, "main.jsbundle"))) }; - run("tar", ["-czf", join(output, "unsigned-simulator.app.tar.gz"), "-C", products, apps[0]], { log: "package.log" }); - copyFileSync(info, join(output, "built-Info.plist")); - receipt.privacy = inspectNativePrivacy(app, appRoot, output); - assert.deepEqual(receipt.privacy.errors, [], "Native SDK privacy resources or aggregate declarations are incomplete."); - json(join(output, "manifest.json"), receipt); - assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Prebuild changed tracked source. Review it before qualification."); +function corruption(device, bundleId) { + const directory = join(output, "corrupt-save"); mkdirSync(directory); + const current = saved(device, bundleId, directory, "before-corruption"); sim("terminate", device, bundleId); + run("sqlite3", [current.database, "UPDATE local_save SET value = 'damaged-save'"], { capture: true }); + flow(device, directory, "corrupt", corruptFlow(bundleId)); + assert.equal(run("sqlite3", ["-readonly", current.database, "SELECT value FROM local_save"], { capture: true }), "damaged-save"); + flow(device, directory, "reset", corruptFlow(bundleId, true)); + const reset = saved(device, bundleId, directory, "after-reset"); assert.equal(reset.data.active, null); assert.equal(reset.data.history.entries.length, 0); + sim("terminate", device, bundleId); + run("sqlite3", [reset.database, "PRAGMA wal_checkpoint(TRUNCATE)"], { capture: true }); + const damaged = Buffer.from("Native database corruption fixture. Preserve until explicit reset."); + writeFileSync(reset.database, damaged); + flow(device, directory, "corrupt-database", corruptFlow(bundleId)); + assert.deepEqual(readFileSync(reset.database), damaged); + flow(device, directory, "reset-database", corruptFlow(bundleId, true)); + assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); + receipt.nativeCorruptionAndReset = "passed"; +} +async function exercise(app, bundleId) { const runtime = "com.apple.CoreSimulator.SimRuntime.iOS-26-5"; const types = JSON.parse(sim("list", "devicetypes", "--json")).devicetypes; const devices = new Map(); - for (const name of new Set(scenarios.map((scenario) => scenario.device))) { + for (const name of new Set(selectedScenarios.map((scenario) => scenario.device))) { const type = types.find((item) => item.name === name); assert(type, `Missing simulator type ${name}`); const device = sim("create", `Dice-${process.pid}-${name}`, type.identifier, runtime); ownedDevices.push(device); devices.set(name, device); } let booted = null; - for (const [index, scenario] of scenarios.entries()) { + for (const [index, scenario] of selectedScenarios.entries()) { const device = devices.get(scenario.device); + receipt.phase = `prepare-${scenario.id}`; checkpoint(); if (booted !== device) { if (booted) sim("shutdown", booted); sim("boot", device); sim("bootstatus", device, "-b"); booted = device; @@ -139,44 +125,53 @@ try { sim("status_bar", device, "override", "--time", "9:41", "--batteryState", "charged", "--batteryLevel", "100"); const directory = join(output, scenario.id); mkdirSync(directory, { recursive: true }); const result = { ...scenario, udid: device, runtime, locale: "en-US", status: "running" }; receipt.scenarios.push(result); + receipt.phase = `start-${scenario.id}`; checkpoint(); if (index === 0) recording = spawn("xcrun", ["simctl", "io", device, "recordVideo", "--codec=h264", join(directory, "native-resume.mp4")], { env, stdio: "ignore" }); flow(device, directory, "start", startFlow(bundleId, scenario)); const before = saved(device, bundleId, directory, "before-relaunch"); assert.equal(before.data.active.game.diceCount, scenario.dice); assert.equal(before.data.active.game.players.length, scenario.ai + 1); assert.deepEqual(before.data.active.game.held, [0]); assert.equal(before.data.active.game.rollsLeft, 1); sim("terminate", device, bundleId); + receipt.phase = `resume-${scenario.id}`; checkpoint(); flow(device, directory, "resume", resumeFlow(bundleId)); const after = saved(device, bundleId, directory, "after-relaunch"); assert.equal(after.bytes, before.bytes); await stopRecording(); if (!scenario.largeText) { - flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id), index === 0 || index === 4)); + receipt.phase = `complete-${scenario.id}`; checkpoint(); + const preview = ["phone-5-solo-light", "tablet-8-solo-light"].includes(scenario.id); + flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id), preview)); const completed = saved(device, bundleId, directory, "completed"); assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); } - result.status = "passed"; result.resumeDocumentSha256 = hash(before.bytes); - json(join(output, "manifest.json"), receipt); + result.status = "passed"; result.resumeDocumentSha256 = hash(before.bytes); checkpoint(); } - // Exercise malformed document preservation through the actual native adapter and reset alert. - const device = booted; const directory = join(output, "corrupt-save"); mkdirSync(directory); - const current = saved(device, bundleId, directory, "before-corruption"); sim("terminate", device, bundleId); - run("sqlite3", [current.database, "UPDATE local_save SET value = 'damaged-save'"], { capture: true }); - flow(device, directory, "corrupt", corruptFlow(bundleId)); - assert.equal(run("sqlite3", ["-readonly", current.database, "SELECT value FROM local_save"], { capture: true }), "damaged-save"); - flow(device, directory, "reset", corruptFlow(bundleId, true)); - const reset = saved(device, bundleId, directory, "after-reset"); assert.equal(reset.data.active, null); assert.equal(reset.data.history.entries.length, 0); - sim("terminate", device, bundleId); - run("sqlite3", [reset.database, "PRAGMA wal_checkpoint(TRUNCATE)"], { capture: true }); - const damaged = Buffer.from("Native database corruption fixture. Preserve until explicit reset."); - writeFileSync(reset.database, damaged); - flow(device, directory, "corrupt-database", corruptFlow(bundleId)); - assert.deepEqual(readFileSync(reset.database), damaged); - flow(device, directory, "reset-database", corruptFlow(bundleId, true)); - assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); - receipt.nativeCorruptionAndReset = "passed"; - receipt.status = "passed"; + if (!group || group === "tablet-10") { receipt.phase = "corruption-and-reset"; checkpoint(); corruption(booted, bundleId); } + assert.equal(receipt.scenarios.length, selectedScenarios.length); + assert(receipt.scenarios.every((scenario) => scenario.status === "passed")); +} +try { + assert.equal(run("git", ["status", "--porcelain"], { capture: true }), "", "Use a clean source checkout."); + receipt.toolchain = { + xcode: run("xcodebuild", ["-version"], { capture: true }), sdk: run("xcrun", ["--sdk", "iphonesimulator", "--show-sdk-version"], { capture: true }), + node: run("node", ["--version"], { capture: true }), bun: run("bun", ["--version"], { capture: true }), + cocoapods: run("pod", ["--version"], { capture: true }), ruby: run("ruby", ["--version"], { capture: true }), + maestro: buildOnly ? null : run("maestro", ["--version"], { capture: true }), + }; + assert.match(receipt.toolchain.xcode, /^Xcode 26\.6\nBuild version 17F113$/); + assert.equal(receipt.toolchain.sdk, "26.5"); assert.equal(receipt.toolchain.node, "v24.12.0"); + assert.equal(receipt.toolchain.bun, "1.4.2"); assert.equal(receipt.toolchain.cocoapods, "1.17.0"); + if (!buildOnly) assert.match(receipt.toolchain.maestro, /2\.10\.0/); + receipt.bunLockSha256 = hash(readFileSync(join(root, "bun.lock"))); + receipt.phase = group ? "verify-built-app" : "build"; checkpoint(); + const context = { root, output, run, hash, receipt, architecture, refreshPodLock }; + const { app, bundleId } = group ? loadBuiltSimulator(context) : buildSimulator(context); + checkpoint(); + if (!buildOnly) await exercise(app, bundleId); + receipt.phase = "complete"; receipt.status = "passed"; } catch (error) { receipt.status = "failed"; receipt.error = error instanceof Error ? error.message : String(error); process.exitCode = 1; + for (const scenario of receipt.scenarios) if (scenario.status === "running") scenario.status = "failed"; console.error(receipt.error); } finally { try { await stopRecording(); } catch (error) { receipt.recordingError = String(error); receipt.status = "failed"; process.exitCode = 1; } @@ -186,5 +181,5 @@ try { const removed = spawnSync("xcrun", ["simctl", "delete", device], { env, stdio: "ignore", timeout: 60000, killSignal: "SIGKILL" }); if (removed.status !== 0) { (receipt.cleanupErrors ??= []).push(device); receipt.status = "failed"; process.exitCode = 1; } } - receipt.finishedAt = new Date().toISOString(); receipt.artifacts = artifactFiles(output); json(join(output, "manifest.json"), receipt); + receipt.finishedAt = new Date().toISOString(); receipt.artifacts = artifactFiles(output); checkpoint(); } From 3021963ce63eee686d26b008954cc137a79632d1 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 21:03:19 -0400 Subject: [PATCH 07/13] fix: commit resets at deletion and qualify native driver interactions --- apps/mobile/app/_layout.tsx | 6 +-- apps/mobile/app/help.tsx | 2 +- apps/mobile/app/history.tsx | 2 +- apps/mobile/src/local/store.ts | 25 ++++++---- apps/mobile/src/screens/Help.tsx | 2 +- apps/mobile/src/screens/NativeGameScreen.tsx | 6 +-- docs/mobile-offline.md | 4 +- docs/mobile-privacy-audit.md | 6 ++- docs/native-simulator.md | 4 +- .../game-engine/tests/nativeSqlite.test.ts | 48 ++++++++++++++++++- scripts/ios-native/driverLogs.mjs | 22 +++++++++ scripts/ios-native/driverLogs.test.mjs | 23 +++++++++ scripts/ios-native/flows.mjs | 12 +++-- scripts/ios-native/flows.test.mjs | 15 ++++-- scripts/ios-native/run.mjs | 20 +++++--- tests/clients/native.spec.ts | 6 ++- 16 files changed, 165 insertions(+), 38 deletions(-) create mode 100644 scripts/ios-native/driverLogs.mjs create mode 100644 scripts/ios-native/driverLogs.test.mjs diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 2e0cac1..60ae853 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -1,11 +1,11 @@ import React from "react"; -import { Stack } from "expo-router"; +import { DarkTheme, DefaultTheme, Stack, ThemeProvider } from "expo-router"; import { StatusBar } from "expo-status-bar"; import { LocalProvider, useLocalGame } from "../src/local/LocalProvider"; function Navigation() { const { colors, dark } = useLocalGame(); - return <> + return @@ -13,7 +13,7 @@ function Navigation() { - ; + ; } export default function Layout() { return ; diff --git a/apps/mobile/app/help.tsx b/apps/mobile/app/help.tsx index fba27b3..4cc52bb 100644 --- a/apps/mobile/app/help.tsx +++ b/apps/mobile/app/help.tsx @@ -8,7 +8,7 @@ import { Action } from "../src/ui/controls"; export default function HelpRoute() { const { colors } = useLocalGame(); const router = useRouter(); - return + return router.back()} /> }} /> ; diff --git a/apps/mobile/app/history.tsx b/apps/mobile/app/history.tsx index 2adeef2..9930ca3 100644 --- a/apps/mobile/app/history.tsx +++ b/apps/mobile/app/history.tsx @@ -5,5 +5,5 @@ import { History } from "../src/screens/History"; export default function HistoryRoute() { const { colors } = useLocalGame(); - return ; + return ; } diff --git a/apps/mobile/src/local/store.ts b/apps/mobile/src/local/store.ts index cb8602f..eaab999 100644 --- a/apps/mobile/src/local/store.ts +++ b/apps/mobile/src/local/store.ts @@ -5,7 +5,7 @@ export interface StoragePort { getItem(key: string): Promise; setItem(key: string, value: string): Promise; removeItem(key: string): Promise; - /** Remove only this app's dedicated storage after the UI confirms Reset All. */ + /** Confirm durable absence of dedicated storage. Failures may follow partial deletion. UI confirmation is required. */ reset?(): Promise; } export interface LocalView { @@ -15,6 +15,7 @@ export interface LocalView { busy: boolean; error: string | null; canRetry: boolean; + retryReset: boolean; } type Pending = { data: LocalSave; bytes: string; reset: boolean }; type Start = { name: string; diceCount: number; aiOpponents: number }; @@ -46,9 +47,9 @@ function nextMove(data: LocalSave, move: Move): LocalSave { return { ...data, active, history, highScores: updateHighScores(data.highScores, state) }; } -/** Acknowledgment follows one complete document write. Failed writes retain exact bytes for retry. */ +/** Acknowledgment follows a complete write or confirmed deletion. Failed writes retain exact bytes for retry. */ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`) { - let view: LocalView = { generation: 0, data: null, busy: false, error: null, canRetry: false }; + let view: LocalView = { generation: 0, data: null, busy: false, error: null, canRetry: false, retryReset: false }; let pending: Pending | null = null; const listeners = new Set<() => void>(); const publish = (patch: Partial) => { @@ -63,12 +64,20 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now if (!pending) throw new Error("No save is waiting to be retried."); const transaction = pending; if (transaction.reset) { - await storage.reset?.(); + // Finish fallible legacy cleanup before deleting the only durable document. for (const key of LEGACY_KEYS) await storage.removeItem(key); } - await storage.setItem(SAVE_KEY, transaction.bytes); + if (transaction.reset && storage.reset) { + try { await storage.reset(); } + catch { + // A partial deletion cannot leave a stale game presented as saved. + publish({ data: null }); + throw new Error("Reset did not finish. Some local data may already have been deleted. Retry reset or reload to check."); + } + // Absence is the committed empty state. Recreating it here adds an unsafe post-commit failure. + } else await storage.setItem(SAVE_KEY, transaction.bytes); pending = null; - publish({ data: transaction.data, error: null, canRetry: false, generation: view.generation + Number(transaction.reset) }); + publish({ data: transaction.data, error: null, canRetry: false, retryReset: false, generation: view.generation + Number(transaction.reset) }); }; const attempt = async (operation: () => Promise): Promise => { if (view.busy) return false; @@ -77,7 +86,7 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now await operation(); return true; } catch (error) { - publish({ error: error instanceof Error ? error.message : "Local storage is unavailable.", canRetry: pending !== null }); + publish({ error: error instanceof Error ? error.message : "Local storage is unavailable.", canRetry: pending !== null, retryReset: pending?.reset ?? false }); return false; } finally { publish({ busy: false }); } }; @@ -90,7 +99,7 @@ export function createLocalStore(storage: StoragePort, newId = () => `${Date.now const load = () => attempt(async () => { // Explicit reload abandons an unacknowledged in-memory move, never the saved document. pending = null; - publish({ data: null, canRetry: false, generation: view.generation + 1 }); + publish({ data: null, canRetry: false, retryReset: false, generation: view.generation + 1 }); const raw = await storage.getItem(SAVE_KEY); if (raw !== null) { const data = decodeSave(raw); diff --git a/apps/mobile/src/screens/Help.tsx b/apps/mobile/src/screens/Help.tsx index 4499b8d..fe502f9 100644 --- a/apps/mobile/src/screens/Help.tsx +++ b/apps/mobile/src/screens/Help.tsx @@ -60,7 +60,7 @@ export function Help() { {view.error && } - {view.canRetry && { void store.retry(); }} />} + {view.canRetry && { void store.retry(); }} />} {dialog} diff --git a/apps/mobile/src/screens/NativeGameScreen.tsx b/apps/mobile/src/screens/NativeGameScreen.tsx index 5bccb5c..c719338 100644 --- a/apps/mobile/src/screens/NativeGameScreen.tsx +++ b/apps/mobile/src/screens/NativeGameScreen.tsx @@ -16,8 +16,8 @@ function SaveStatus({ confirm }: { confirm: Confirm }) { {view.busy && } {view.error && <> - - {view.canRetry && { void store.retry(); }} />} + + {view.canRetry && { void store.retry(); }} />} { void store.load(); }} /> } ; @@ -40,7 +40,7 @@ export function NativeGameScreen({ onHistory, onHelp }: { onHistory: () => void; if (await store.start({ name, diceCount: preferences.diceCount, aiOpponents: preferences.aiOpponents })) setPlaying(true); }; const again = async () => { if (await store.discard()) setPlaying(false); }; - return + return diff --git a/docs/mobile-offline.md b/docs/mobile-offline.md index 636a4fe..4a3f738 100644 --- a/docs/mobile-offline.md +++ b/docs/mobile-offline.md @@ -18,7 +18,9 @@ Inspection of AsyncStorage 2.2.0's iOS implementation found two unsuitable behav ## Recovery and deletion -Normal load and failed writes never call the database deletion API. The Help reset requires confirmation. Reset closes the connection, removes only the dedicated database and its WAL, shared-memory and rollback-journal files, removes the two owned legacy preference keys, then writes defaults. Missing database files are tolerated; permission and other deletion failures remain visible and retryable. Other keys and apps are untouched. A successful reset/reload also clears unsaved UI name drafts. +Normal load and failed writes never call the database deletion API. The Help reset requires confirmation. Reset removes the two owned legacy preference keys first, then closes and removes only the dedicated database and its WAL, shared-memory and rollback-journal files. Acknowledged deletion commits an empty state. No fallible replacement write follows it; the next load or change creates a new document. A legacy cleanup error occurs before the durable game is deleted. + +Missing database files are tolerated. A database-deletion error may follow partial deletion, so the app hides the potentially stale game and requires retry or explicit reload. It does not present the old data as safely retained. Other keys and apps are untouched. Successful reset/reload clears unsaved UI name drafts; an uncertain explicit reset enters recovery instead of retaining those screens. SQLite transaction recovery is not a guarantee against device loss, arbitrary filesystem destruction or faulty storage hardware. The app has no remote backup service or recovery account. Keep damaged bytes available for diagnosis until the user chooses reset. Do not add a catch-and-recreate path for database errors. diff --git a/docs/mobile-privacy-audit.md b/docs/mobile-privacy-audit.md index 9e9d580..4072398 100644 --- a/docs/mobile-privacy-audit.md +++ b/docs/mobile-privacy-audit.md @@ -23,14 +23,16 @@ The installed `expo-file-system` 57.0.7 source does contain the manifest. Its po The source manifest declares file-timestamp reasons `0A2A.1` and `3B52.1`, and disk-space reasons `E174.1` and `85F4.1`. These are recorded as upstream SDK declarations, not independently approved reasons for this app. -The proposed repair opts only `expo-file-system` into source compilation through the SDK 57 Apple autolinker's `buildFromSource` option. The installed autolinker resolves this option. Native qualification must still prove that the resource returns and its declarations reach the aggregate. [The inspection tool](../scripts/ios-native/privacy.mjs) compares the built resource with the locked SDK source and checks those aggregate reasons. It retains the observed manifests and purpose strings without supplying legal answers. +The repair opts only `expo-file-system` into source compilation through the SDK 57 Apple autolinker's `buildFromSource` option. [Native build 36361758690](https://github.com/HemSoft/yahtzee/actions/runs/36361758690), source `bc040c05b0a36ca6e4d214bba7dee14ce939dc86`, passed deployment-mode installation and package inspection. Eleven manifests are present. The SDK resource matches upstream, and all four previously missing reasons appear in the aggregate. The retained build's ten artifact hashes verified after download. + +[The inspection tool](../scripts/ios-native/privacy.mjs) compares each new built resource with the locked SDK source and checks those aggregate reasons. It retains observed manifests and purpose strings without supplying legal answers. This passing simulator inspection does not establish signed-archive contents, SDK signatures or network behavior. ## Data-flow inventory | Data or behavior | Source behavior | Remaining evidence | | --- | --- | --- | | Player name and five recent names | Local preferences only | Device traffic measurement and reset/uninstall check | -| Active game, dice, holds and opponents | One acknowledged SQLite document, retained for resume | Actual Expo runtime restart, interruption and airplane-mode checks | +| Active game, dice, holds and opponents | One acknowledged SQLite document, retained for resume | iPhone simulator resume observed on `beff6ec`; physical interruption and airplane-mode checks remain | | Completed results and local rankings | Last 500 games; top ten entries per mode | Physical retention, backup and restore checks | | Appearance and game options | Local preferences | Device reset and restore checks | | Legacy preferences | Import only the two documented old preference keys | Device upgrade fixture if an older native build is distributed | diff --git a/docs/native-simulator.md b/docs/native-simulator.md index a0bd0b5..e5a36fb 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -39,7 +39,7 @@ Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. -Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Scoring waits for enabled controls and an acknowledged recorded score before the next category. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. +Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Scoring waits for enabled controls, settled scrolling and an acknowledged recorded score before the next category. A scoring tap allows Maestro's single retry when the hierarchy is unchanged; a recorded category cannot be scored twice. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. @@ -49,6 +49,6 @@ This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad `reports/native/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. Logs and partial receipts survive failures; the required quality gate includes the native job. A screenshot file's existence alone is not visual review or release approval. -The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Hidden Maestro debug logs are excluded by the uploader and by the published hash inventory. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. +The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/packages/game-engine/tests/nativeSqlite.test.ts b/packages/game-engine/tests/nativeSqlite.test.ts index 2d7a3bd..2afa26a 100644 --- a/packages/game-engine/tests/nativeSqlite.test.ts +++ b/packages/game-engine/tests/nativeSqlite.test.ts @@ -15,11 +15,11 @@ function fixture() { const path = join(directory, DATABASE_NAME); const connections: Database[] = []; const values = new Map([["yahtzee-theme", "dark"], ["unrelated", "keep"]]); - const state = { openFailure: false, writeFailure: false, lostAck: false, closeFailure: false, removeFailure: false, deletes: 0, writes: [] as string[], integrity: undefined as string | null | undefined }; + const state = { openFailure: false, writeFailure: false, lostAck: false, closeFailure: false, removeFailure: false, removeAckLost: false, legacyRemoveFailure: false, deletes: 0, writes: [] as string[], integrity: undefined as string | null | undefined }; const legacy: StoragePort = { async getItem(key) { return values.get(key) ?? null; }, async setItem(key, value) { values.set(key, value); }, - async removeItem(key) { values.delete(key); }, + async removeItem(key) { if (state.legacyRemoveFailure) throw new Error("Legacy storage unavailable"); values.delete(key); }, }; const factory = { async open(): Promise { @@ -45,6 +45,7 @@ function fixture() { state.deletes++; if (state.removeFailure) throw new Error("Cannot remove database"); for (const suffix of ["", "-wal", "-shm", "-journal"]) rmSync(path + suffix, { force: true }); + if (state.removeAckLost) throw new Error("Reset acknowledgment lost"); }, }; cleanups.push(() => { for (const db of connections) db.close(); rmSync(directory, { recursive: true, force: true }); }); @@ -138,6 +139,49 @@ describe("real SQLite persistence, without an Expo/iOS-runtime claim", () => { expect(f.store.getSnapshot().generation).toBe(generation + 1); }); + test("legacy cleanup failure happens before the only durable save is deleted", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const before = JSON.stringify(f.store.getSnapshot().data); + f.state.legacyRemoveFailure = true; + expect(await f.store.resetAll()).toBe(false); + expect(f.state.deletes).toBe(0); + expect(await f.port.getItem(SAVE_KEY)).toBe(before); + expect(JSON.stringify(f.store.getSnapshot().data)).toBe(before); + f.state.legacyRemoveFailure = false; + expect(await f.store.retry()).toBe(true); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + }); + + test("acknowledged database deletion commits empty state without a fallible replacement write", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const writes = f.state.writes.length; + f.state.writeFailure = true; + expect(await f.store.resetAll()).toBe(true); + expect(f.state.writes).toHaveLength(writes); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + f.state.writeFailure = false; + const restarted = createLocalStore(f.recreate()); + expect(await restarted.load()).toBe(true); + expect(restarted.getSnapshot().data).toEqual(emptySave()); + }); + + test("uncertain database deletion hides stale data until explicit retry or reload", async () => { + const f = fixture(); await f.store.load(); await f.store.start(options); + const generation = f.store.getSnapshot().generation; + f.state.removeAckLost = true; + expect(await f.store.resetAll()).toBe(false); + expect(f.store.getSnapshot().data).toBeNull(); + expect(f.store.getSnapshot().error).toContain("may already have been deleted"); + expect(f.store.getSnapshot().canRetry).toBe(true); + expect(f.store.getSnapshot().retryReset).toBe(true); + expect(f.store.getSnapshot().generation).toBe(generation); + f.state.removeAckLost = false; + expect(await f.store.retry()).toBe(true); + expect(f.store.getSnapshot().data).toEqual(emptySave()); + expect(f.store.getSnapshot().generation).toBe(generation + 1); + expect(f.store.getSnapshot().retryReset).toBe(false); + }); + test("rejects unknown database versions and unrecognized schemas without resetting them", async () => { for (const sql of ["PRAGMA user_version = 9", "CREATE TABLE unknown (value TEXT)", "PRAGMA user_version = 1"]) { const f = fixture(); const db = new Database(f.path); db.exec(sql); db.close(); diff --git a/scripts/ios-native/driverLogs.mjs b/scripts/ios-native/driverLogs.mjs new file mode 100644 index 0000000..337ad51 --- /dev/null +++ b/scripts/ios-native/driverLogs.mjs @@ -0,0 +1,22 @@ +import { existsSync, lstatSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +export function redactDriverLog(text, env) { + let result = text.replace(/(authorization:\s*bearer\s+)\S+/gi, "$1"); + for (const [name, value] of Object.entries(env)) { + if (/(token|password|secret|credential|private.*key)/i.test(name) && typeof value === "string" && value.length >= 8) result = result.split(value).join(""); + } + return result; +} +/** Retain only the known driver log, not an entire hidden directory or its links. */ +export function retainDriverLogs(debug, destination, name, env) { + const tests = join(debug, ".maestro/tests"); + if (!existsSync(tests) || !lstatSync(tests).isDirectory()) return; + let index = 0; + for (const entry of readdirSync(tests, { withFileTypes: true })) { + if (!entry.isDirectory()) continue; + const source = join(tests, entry.name, "maestro.log"); + if (!existsSync(source) || !lstatSync(source).isFile()) continue; + writeFileSync(join(destination, `${name}-driver-${index++}.log`), redactDriverLog(readFileSync(source, "utf8"), env)); + } +} diff --git a/scripts/ios-native/driverLogs.test.mjs b/scripts/ios-native/driverLogs.test.mjs new file mode 100644 index 0000000..4a3667f --- /dev/null +++ b/scripts/ios-native/driverLogs.test.mjs @@ -0,0 +1,23 @@ +import assert from "node:assert/strict"; +import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { test } from "node:test"; +import { redactDriverLog, retainDriverLogs } from "./driverLogs.mjs"; + +test("driver evidence redacts credential environment values and authorization headers", () => { + assert.equal(redactDriverLog("tap at 20,40 synthetic-secret-value Authorization: Bearer synthetic-token", { RUNTIME_TOKEN: "synthetic-secret-value", ORDINARY: "tap at" }), + "tap at 20,40 Authorization: Bearer "); +}); +test("only known driver logs become non-hidden uploaded evidence", () => { + const directory = mkdtempSync(join(tmpdir(), "native-driver-log-")); + try { + retainDriverLogs(directory, directory, "start", {}); + const source = join(directory, ".maestro/tests/run"); mkdirSync(source, { recursive: true }); + writeFileSync(join(source, "maestro.log"), "target score-ones"); + writeFileSync(join(source, "unrelated.json"), "not evidence"); + retainDriverLogs(directory, directory, "start", {}); + assert.equal(readFileSync(join(directory, "start-driver-0.log"), "utf8"), "target score-ones"); + assert.deepEqual(readdirSync(directory).sort(), [".maestro", "start-driver-0.log"]); + } finally { rmSync(directory, { recursive: true, force: true }); } +}); diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index 59154b2..f794cb8 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -1,7 +1,7 @@ const command = (name, value) => `- ${name}${value === undefined ? "" : `: ${JSON.stringify(value)}`}`; const visible = (text) => command("assertVisible", text); const tap = (text) => command("tapOn", { text, enabled: true }); -const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100, centerElement: true }); +const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 }); const shot = (name) => command("takeScreenshot", name); const header = (bundleId, commands) => `appId: ${JSON.stringify(bundleId)}\n---\n${commands.join("\n")}\n`; @@ -9,7 +9,7 @@ export function startFlow(bundleId, scenario) { return header(bundleId, [command("launchApp", { clearState: true, permissions: { all: "deny" } }), command("setOrientation", scenario.orientation), visible("A little time for dice."), tap("Help"), visible("How to play"), tap("Done"), visible("A little time for dice."), shot("setup"), - scroll({ text: "Your name" }), tap("Your name"), command("eraseText"), command("inputText", "Local tester"), command("hideKeyboard"), + scroll({ text: "Your name" }), tap("Your name"), command("eraseText"), command("inputText", "Local tester"), command("pressKey", "enter"), scroll({ text: "AI opponents" }), tap("AI opponents"), tap(scenario.ai ? "3 AI" : "Solo"), scroll({ text: "Dice count" }), tap("Dice count"), tap(`${scenario.dice} dice`), scroll({ text: "Start Game" }), tap("Start Game"), @@ -20,8 +20,9 @@ export function resumeFlow(bundleId) { scroll({ text: "Resume Game" }), tap("Resume Game"), visible("Re-roll \\(1\\)"), shot("resumed")]); } export function completeFlow(bundleId, categories, previewDiagnostics = false) { - return header(bundleId, [ - ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }), command("tapOn", { id: `score-${id}`, enabled: true }), + return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Resume Game" }), tap("Resume Game"), + ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }), command("waitForAnimationToEnd", { timeout: 5000 }), + command("tapOn", { id: `score-${id}`, enabled: true, retryTapIfNoChange: true }), ...(index < categories.length - 1 ? [command("extendedWaitUntil", { visible: { id: `score-${id}`, text: ".* points recorded.*" }, timeout: 15000 })] : [])]), visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), @@ -30,6 +31,9 @@ export function completeFlow(bundleId, categories, previewDiagnostics = false) { command("assertVisible", { id: "diagnostics-preview" }), shot("diagnostics-preview"), tap("Cancel preview")] : []), tap("Done"), scroll({ text: "Play Again" }), tap("Play Again"), scroll({ text: "Start Game" }), shot("play-again")]); } +export function emptyRelaunchFlow(bundleId) { + return header(bundleId, [command("launchApp", { clearState: false, stopApp: true }), visible("A little time for dice."), shot("empty-after-reset-relaunch")]); +} export function corruptFlow(bundleId, reset = false) { const commands = [command("launchApp", { permissions: { all: "deny" } }), visible("Your saved data has not been reset."), shot("recovery")]; if (reset) commands.push(tap("Help"), scroll({ text: "Delete all local data" }), tap("Delete all local data"), tap("Cancel"), diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index b599efc..2363e83 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { test } from "node:test"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; function parse(flow) { const [header, body] = flow.trim().split("\n---\n"); @@ -47,17 +47,26 @@ test("generated flows use valid JSON-in-YAML commands and real semantic controls assert(preview.some((step) => step.command === "assertVisible" && step.value?.id === "diagnostics-preview")); assert(preview.some((step) => step.value?.text === "Cancel preview")); }); -test("scoring waits for an enabled centered target and acknowledged record before moving on", () => { +test("native name entry submits the keyboard instead of issuing dismissal swipes", () => { + const steps = parse(startFlow("com.hemsoft.yahtzee", scenarios[0])); + assert(!steps.some((step) => step.command === "hideKeyboard")); + assert(steps.some((step) => step.command === "pressKey" && step.value === "enter")); +}); +test("scoring waits for an enabled settled target and acknowledged record before moving on", () => { const steps = parse(completeFlow("com.hemsoft.yahtzee", ["full-house", "small-straight", "chance"])); for (const id of ["full-house", "small-straight"]) { const index = steps.findIndex((step) => step.command === "tapOn" && step.value?.id === `score-${id}`); assert.equal(steps[index].value.enabled, true); - assert.equal(steps[index - 1].value.centerElement, true); + assert.equal(steps[index].value.retryTapIfNoChange, true); + assert.equal(steps[index - 1].command, "waitForAnimationToEnd"); assert.equal(steps[index + 1].command, "extendedWaitUntil"); assert.deepEqual(steps[index + 1].value.visible, { id: `score-${id}`, text: ".* points recorded.*" }); } }); test("corruption flow never clears state and reset includes cancellation first", () => { + const relaunch = parse(emptyRelaunchFlow("com.hemsoft.yahtzee")); + assert.deepEqual(relaunch[0].value, { clearState: false, stopApp: true }); + assert(relaunch.some((step) => step.command === "assertVisible" && step.value === "A little time for dice.")); for (const reset of [false, true]) { const steps = parse(corruptFlow("com.hemsoft.yahtzee", reset)); assert.equal(steps[0].value.clearState, undefined); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index 7c633fb..d62b627 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -6,9 +6,10 @@ import { join, resolve } from "node:path"; import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; import { decodeSave } from "../../apps/mobile/src/local/save.ts"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { startFlow, resumeFlow, completeFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; import { buildSimulator } from "./build.mjs"; import { loadBuiltSimulator } from "./artifact.mjs"; +import { retainDriverLogs } from "./driverLogs.mjs"; assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); assert(["arm64", "x64"].includes(process.arch), "Unsupported simulator host architecture."); @@ -26,7 +27,7 @@ const output = join(root, "reports/native"); assert(!existsSync(output), "Use a fresh checkout. Existing native evidence was not overwritten."); mkdirSync(output, { recursive: true }); const env = { ...process.env, DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer", EXPO_NO_TELEMETRY: "1", - MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "120000" }; + MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "300000" }; const hash = (bytes) => createHash("sha256").update(bytes).digest("hex"); const json = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + "\n"); function run(executable, commandArgs, { cwd = root, capture = false, timeout = 1800000, log = "commands.log" } = {}) { @@ -44,7 +45,7 @@ const sim = (...commandArgs) => run("xcrun", ["simctl", ...commandArgs], { captu const receipt = { schemaVersion: 1, kind: buildOnly ? "unsigned-ios-simulator-build" : "unsigned-ios-simulator-tests", status: "running", source: run("git", ["rev-parse", "HEAD"], { capture: true }), startedAt: new Date().toISOString(), runId: process.env.GITHUB_RUN_ID ?? null, runAttempt: process.env.GITHUB_RUN_ATTEMPT ?? null, runnerImage: process.env.ImageVersion ?? null, architecture, group: group ?? null, scenarios: [], - limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset", "Hidden Maestro debug logs are not uploaded"] }; + limits: ["Not a signed device archive", "Not TestFlight or physical-device evidence", "No airplane-mode or VoiceOver acceptance claim", "Public identity and release approvals remain unset", "Raw hidden debug trees are excluded; selected driver logs are sanitized and retained"] }; const checkpoint = () => json(join(output, "manifest.json"), receipt); checkpoint(); const ownedDevices = []; @@ -61,8 +62,11 @@ async function stopRecording() { } function flow(device, directory, name, content) { const file = join(directory, `${name}.yaml`); writeFileSync(file, content); - run("maestro", ["--device", device, "test", "--test-output-dir", join(directory, name), "--debug-output", join(directory, `${name}-debug`), - "--format", "JUNIT", "--output", join(directory, `${name}.xml`), file], { timeout: 600000, log: `${name}-${directory.split(/[\\/]/).at(-1)}.log` }); + const debug = join(directory, `${name}-debug`); + try { + run("maestro", ["--device", device, "test", "--test-output-dir", join(directory, name), "--debug-output", debug, + "--format", "JUNIT", "--output", join(directory, `${name}.xml`), file], { timeout: 600000, log: `${name}-${directory.split(/[\\/]/).at(-1)}.log` }); + } finally { retainDriverLogs(debug, directory, name, env); } } function saved(device, bundleId, directory, stage) { const container = sim("get_app_container", device, bundleId, "data"); @@ -90,6 +94,8 @@ function corruption(device, bundleId) { flow(device, directory, "corrupt", corruptFlow(bundleId)); assert.equal(run("sqlite3", ["-readonly", current.database, "SELECT value FROM local_save"], { capture: true }), "damaged-save"); flow(device, directory, "reset", corruptFlow(bundleId, true)); + assert(!existsSync(current.database), "Confirmed reset must remove the damaged database."); + flow(device, directory, "reset-relaunch", emptyRelaunchFlow(bundleId)); const reset = saved(device, bundleId, directory, "after-reset"); assert.equal(reset.data.active, null); assert.equal(reset.data.history.entries.length, 0); sim("terminate", device, bundleId); run("sqlite3", [reset.database, "PRAGMA wal_checkpoint(TRUNCATE)"], { capture: true }); @@ -98,6 +104,8 @@ function corruption(device, bundleId) { flow(device, directory, "corrupt-database", corruptFlow(bundleId)); assert.deepEqual(readFileSync(reset.database), damaged); flow(device, directory, "reset-database", corruptFlow(bundleId, true)); + assert(!existsSync(reset.database), "Confirmed reset must remove the damaged database."); + flow(device, directory, "reset-database-relaunch", emptyRelaunchFlow(bundleId)); assert.equal(saved(device, bundleId, directory, "after-database-reset").data.history.entries.length, 0); receipt.nativeCorruptionAndReset = "passed"; } @@ -135,7 +143,6 @@ async function exercise(app, bundleId) { receipt.phase = `resume-${scenario.id}`; checkpoint(); flow(device, directory, "resume", resumeFlow(bundleId)); const after = saved(device, bundleId, directory, "after-relaunch"); assert.equal(after.bytes, before.bytes); - await stopRecording(); if (!scenario.largeText) { receipt.phase = `complete-${scenario.id}`; checkpoint(); const preview = ["phone-5-solo-light", "tablet-8-solo-light"].includes(scenario.id); @@ -144,6 +151,7 @@ async function exercise(app, bundleId) { assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); } + await stopRecording(); result.status = "passed"; result.resumeDocumentSha256 = hash(before.bytes); checkpoint(); } if (!group || group === "tablet-10") { receipt.phase = "corruption-and-reset"; checkpoint(); corruption(booted, bundleId); } diff --git a/tests/clients/native.spec.ts b/tests/clients/native.spec.ts index 0fc46cd..0968f61 100644 --- a/tests/clients/native.spec.ts +++ b/tests/clients/native.spec.ts @@ -123,7 +123,11 @@ test("native adapter recovery does not silently replace damaged data; reset clea await faults(client, { removes: 1 }); await confirm(client, "Delete all local data"); await expect(client.getByRole("alert").last()).toContainText("Injected storage removes failure"); - await client.getByRole("button", { name: "Retry save", exact: true }).last().click(); + await expect(client.getByRole("button", { name: "Retry reset", exact: true }).last()).toBeVisible(); + await client.getByRole("button", { name: "Done", exact: true }).click(); + await expect(client.getByText("The reset did not finish. Retry continues the confirmed deletion.")).toBeVisible(); + await client.getByRole("button", { name: "Help", exact: true }).click(); + await client.getByRole("button", { name: "Retry reset", exact: true }).last().click(); await client.getByRole("button", { name: "Done", exact: true }).click(); await expect(client.getByRole("textbox", { name: "Your name" })).toHaveValue(""); expect(await client.evaluate(() => localStorage.getItem("unrelated"))).toBe("keep"); From a89492c07ad341168b291303c703537a72828c05 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 22:01:28 -0400 Subject: [PATCH 08/13] fix: verify native reset absence and freeze simulator evidence --- .github/workflows/quality.yml | 10 ++++- apps/mobile/package.json | 3 +- .../src/local/platformStorage.native.ts | 9 +++- apps/mobile/src/local/sqliteStorage.ts | 16 +++---- bun.lock | 1 + docs/mobile-offline.md | 2 +- docs/native-simulator.md | 8 ++-- .../game-engine/tests/nativeSqlite.test.ts | 43 ++++++++++++++---- scripts/ios-native/flows.mjs | 5 ++- scripts/ios-native/flows.test.mjs | 4 ++ scripts/ios-native/run.mjs | 23 +++++----- scripts/ios-native/snapshot.mjs | 45 +++++++++++++++++++ scripts/ios-native/snapshot.test.mjs | 26 +++++++++++ 13 files changed, 156 insertions(+), 39 deletions(-) create mode 100644 scripts/ios-native/snapshot.mjs create mode 100644 scripts/ios-native/snapshot.test.mjs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index e4b0ec4..563918d 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -146,12 +146,15 @@ jobs: else bun scripts/ios-native/run.mjs --build-only fi + - name: Freeze partial evidence if native execution ended early + if: ${{ always() }} + run: node scripts/ios-native/snapshot.mjs - name: Retain native build or dependency-refresh evidence if: ${{ always() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ios-native-build-${{ github.event.pull_request.head.sha || github.sha }} - path: reports/native/ + path: reports/native-evidence/ retention-days: 1 compression-level: 9 if-no-files-found: warn @@ -197,12 +200,15 @@ jobs: env: NATIVE_TEST_GROUP: ${{ matrix.group }} run: bun scripts/ios-native/run.mjs "--test-group=$NATIVE_TEST_GROUP" + - name: Freeze partial evidence if native execution ended early + if: ${{ always() }} + run: node scripts/ios-native/snapshot.mjs - name: Retain unsigned native evidence, including failed-run diagnostics if: ${{ always() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ios-native-${{ matrix.group }}-${{ github.event.pull_request.head.sha || github.sha }} - path: reports/native/ + path: reports/native-evidence/ retention-days: 1 compression-level: 9 if-no-files-found: warn diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 7b5f388..c3a5154 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -26,11 +26,12 @@ "expo-asset": "57.0.18", "expo-build-properties": "57.0.21", "expo-constants": "57.0.19", + "expo-file-system": "57.0.7", "expo-linking": "57.0.10", "expo-router": "57.0.22", - "expo-status-bar": "57.0.1", "expo-splash-screen": "57.0.9", "expo-sqlite": "57.0.3", + "expo-status-bar": "57.0.1", "expo-system-ui": "57.0.4", "react": "19.2.3", "react-native": "0.86.3", diff --git a/apps/mobile/src/local/platformStorage.native.ts b/apps/mobile/src/local/platformStorage.native.ts index 1544e7e..3266999 100644 --- a/apps/mobile/src/local/platformStorage.native.ts +++ b/apps/mobile/src/local/platformStorage.native.ts @@ -1,8 +1,15 @@ import AsyncStorage from "@react-native-async-storage/async-storage"; import * as SQLite from "expo-sqlite"; +import { Directory } from "expo-file-system"; import { createSqliteStorage, DATABASE_NAME, removeDatabaseFiles } from "./sqliteStorage"; +function databaseFiles() { + const directory = new Directory(SQLite.defaultDatabaseDirectory); + // Do not use exists: it can also be false when access is denied. + if (!directory.parentDirectory.list().some((entry) => entry.name === directory.name)) return []; + return directory.list().map((entry) => entry.name); +} export const createPlatformStorage = () => createSqliteStorage({ open: () => SQLite.openDatabaseAsync(DATABASE_NAME, { useNewConnection: true }), - remove: () => removeDatabaseFiles(SQLite.deleteDatabaseAsync), + remove: () => removeDatabaseFiles(SQLite.deleteDatabaseAsync, databaseFiles), }, AsyncStorage); diff --git a/apps/mobile/src/local/sqliteStorage.ts b/apps/mobile/src/local/sqliteStorage.ts index b03ca03..15dea64 100644 --- a/apps/mobile/src/local/sqliteStorage.ts +++ b/apps/mobile/src/local/sqliteStorage.ts @@ -68,13 +68,13 @@ export function createSqliteStorage(factory: SqlFactory, legacy: StoragePort) { }; } -/** Expo's deleteDatabaseAsync rejects missing files. Reset is idempotent, including sidecars. */ -export async function removeDatabaseFiles(remove: (name: string) => Promise) { - for (const suffix of ["", "-wal", "-shm", "-journal"]) { - try { await remove(DATABASE_NAME + suffix); } - catch (error) { if (!isMissingDatabase(error)) throw error; } +/** Expo shares deletion error codes. Only a successful directory listing proves absence. */ +export async function removeDatabaseFiles(remove: (name: string) => Promise, list: () => string[] | Promise) { + const owned = ["", "-wal", "-shm", "-journal"].map((suffix) => DATABASE_NAME + suffix); + const present = await list(); + for (const name of owned.filter((name) => present.includes(name))) { + try { await remove(name); } + catch (error) { if ((await list()).includes(name)) throw error; } } -} -function isMissingDatabase(error: unknown) { - return error instanceof Error && "code" in error && error.code === "ERR_DATABASE_NOT_FOUND"; + if ((await list()).some((name) => owned.includes(name))) throw new Error("Local database deletion was not confirmed."); } diff --git a/bun.lock b/bun.lock index 19fd728..e5c3ddf 100644 --- a/bun.lock +++ b/bun.lock @@ -66,6 +66,7 @@ "expo-asset": "57.0.18", "expo-build-properties": "57.0.21", "expo-constants": "57.0.19", + "expo-file-system": "57.0.7", "expo-linking": "57.0.10", "expo-router": "57.0.22", "expo-splash-screen": "57.0.9", diff --git a/docs/mobile-offline.md b/docs/mobile-offline.md index 4a3f738..ad36fa0 100644 --- a/docs/mobile-offline.md +++ b/docs/mobile-offline.md @@ -20,7 +20,7 @@ Inspection of AsyncStorage 2.2.0's iOS implementation found two unsuitable behav Normal load and failed writes never call the database deletion API. The Help reset requires confirmation. Reset removes the two owned legacy preference keys first, then closes and removes only the dedicated database and its WAL, shared-memory and rollback-journal files. Acknowledged deletion commits an empty state. No fallible replacement write follows it; the next load or change creates a new document. A legacy cleanup error occurs before the durable game is deleted. -Missing database files are tolerated. A database-deletion error may follow partial deletion, so the app hides the potentially stale game and requires retry or explicit reload. It does not present the old data as safely retained. Other keys and apps are untouched. Successful reset/reload clears unsaved UI name drafts; an uncertain explicit reset enters recovery instead of retaining those screens. +Missing database files are tolerated only after a successful directory listing proves absence. Expo SQLite's iOS module uses `E_SQLITE_DELETE_DATABASE` for missing files, open connections and other deletion errors, so the adapter does not treat that code as proof of absence. The installed Expo FileSystem 57.0.7 module supplies directory listings; listing failures stop reset. The adapter checks for remaining owned files before acknowledging deletion. A database-deletion error may follow partial deletion, so the app hides the potentially stale game and requires retry or explicit reload. It does not present the old data as safely retained. Other keys and apps are untouched. Successful reset/reload clears unsaved UI name drafts; an uncertain explicit reset enters recovery instead of retaining those screens. SQLite transaction recovery is not a guarantee against device loss, arbitrary filesystem destruction or faulty storage hardware. The app has no remote backup service or recovery account. Keep damaged bytes available for diagnosis until the user chooses reset. Do not add a catch-and-recreate path for database errors. diff --git a/docs/native-simulator.md b/docs/native-simulator.md index e5a36fb..0a90506 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -1,6 +1,6 @@ # Unsigned iOS simulator qualification -The native jobs in [Application quality](../.github/workflows/quality.yml) use standard public GitHub-hosted macOS runners. It does not use Apple credentials, a paid device cloud, signing, upload, TestFlight or App Store submission. Its result is a simulator app, not an installable iPhone archive. +The native jobs in [Application quality](../.github/workflows/quality.yml) use standard public GitHub-hosted macOS runners. They do not use Apple credentials, a paid device cloud, signing, upload, TestFlight or App Store submission. The result is a simulator app, not an installable iPhone archive. ## Inputs @@ -39,15 +39,15 @@ Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. -Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Scoring waits for enabled controls, settled scrolling and an acknowledged recorded score before the next category. A scoring tap allows Maestro's single retry when the hierarchy is unchanged; a recorded category cannot be scored twice. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. +Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay before scrolling. Scoring centers enabled targets, waits for scrolling to settle and requires an acknowledged recorded score before the next category. Centering matters because Maestro can count a row clipped behind the fixed roll footer as visible within the device's overall bounds. A scoring tap allows Maestro's single retry when the hierarchy is unchanged; a recorded category cannot be scored twice. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. -Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first start/resume sequence. The status bar is standardized to 9:41 for captures. Test names are synthetic. +Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad Stage Manager window-resize or signed-distribution acceptance. Browser-adapter results do not substitute for the native run. Review actual screenshots in one batch, apply one layout correction batch, then confirm. Functional failures still require diagnosis. ## Receipts and retention -`reports/native/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. Logs and partial receipts survive failures; the required quality gate includes the native job. A screenshot file's existence alone is not visual review or release approval. +`reports/native-evidence/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. The runner freezes working files from `reports/native` into `reports/native-evidence` before hashing and upload. Size and hash come from the same copied bytes. Later writes from detached XCTest processes cannot change that snapshot. An always-run workflow step also freezes partial receipts when execution ends early. The required quality gate includes every native job. A screenshot file's existence alone is not visual review or release approval. The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. diff --git a/packages/game-engine/tests/nativeSqlite.test.ts b/packages/game-engine/tests/nativeSqlite.test.ts index 2afa26a..e53385d 100644 --- a/packages/game-engine/tests/nativeSqlite.test.ts +++ b/packages/game-engine/tests/nativeSqlite.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, test } from "bun:test"; import { Database } from "bun:sqlite"; -import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { createSqliteStorage, DATABASE_NAME, removeDatabaseFiles, type SqlConnection } from "../../../apps/mobile/src/local/sqliteStorage"; @@ -44,7 +44,7 @@ function fixture() { async remove() { state.deletes++; if (state.removeFailure) throw new Error("Cannot remove database"); - for (const suffix of ["", "-wal", "-shm", "-journal"]) rmSync(path + suffix, { force: true }); + await removeDatabaseFiles(async (name) => { rmSync(join(directory, name)); }, () => readdirSync(directory)); if (state.removeAckLost) throw new Error("Reset acknowledgment lost"); }, }; @@ -214,13 +214,40 @@ describe("real SQLite persistence, without an Expo/iOS-runtime claim", () => { expect(await f.port.getItem(SAVE_KEY)).toBeNull(); }); - test("reset removes only the owned database family and ignores only confirmed missing files", async () => { + test("reset handles the iOS SDK's shared deletion error code without suppressing real failures", async () => { + const present = new Set([DATABASE_NAME]); + await removeDatabaseFiles(async (name) => { + if (!present.delete(name)) throw Object.assign(new Error(`Database ${name} not found`), { code: "E_SQLITE_DELETE_DATABASE" }); + }, () => [...present]); + expect(present.size).toBe(0); + }); + + test("reset removes only the owned database family and verifies uncertain deletion", async () => { const names: string[] = []; - await removeDatabaseFiles(async (name) => { names.push(name); throw Object.assign(new Error("Missing"), { code: "ERR_DATABASE_NOT_FOUND" }); }); - expect(names).toEqual([DATABASE_NAME, DATABASE_NAME + "-wal", DATABASE_NAME + "-shm", DATABASE_NAME + "-journal"]); - await removeDatabaseFiles(async () => {}); - for (const error of [new Error("Permission denied"), { code: "ERR_DATABASE_NOT_FOUND" }, "unknown failure"]) { - await expect(removeDatabaseFiles(async () => { throw error; })).rejects.toEqual(error); + const owned = [DATABASE_NAME, DATABASE_NAME + "-wal", DATABASE_NAME + "-shm", DATABASE_NAME + "-journal"]; + const present = new Set([...owned, "unrelated.db"]); + await removeDatabaseFiles(async (name) => { + names.push(name); present.delete(name); + throw Object.assign(new Error("Deletion acknowledgment lost"), { code: "E_SQLITE_DELETE_DATABASE" }); + }, () => [...present]); + expect(names).toEqual(owned); + expect([...present]).toEqual(["unrelated.db"]); + await removeDatabaseFiles(async () => { throw new Error("Must not delete absent files"); }, () => [...present]); + for (const error of [Object.assign(new Error("Permission denied"), { code: "E_SQLITE_DELETE_DATABASE" }), new Error("Database is open"), "unknown failure"]) { + await expect(removeDatabaseFiles(async () => { throw error; }, () => [DATABASE_NAME])).rejects.toEqual(error); } }); + + test("reset fails closed when directory inspection fails or deletion leaves files behind", async () => { + let attempts = 0; + const unavailable = new Error("Directory unavailable"); + await expect(removeDatabaseFiles(async () => { attempts++; }, () => { throw unavailable; })).rejects.toEqual(unavailable); + expect(attempts).toBe(0); + let listings = 0; + await expect(removeDatabaseFiles(async () => { throw new Error("Delete failed"); }, () => { + if (listings++ === 0) return [DATABASE_NAME]; + throw unavailable; + })).rejects.toEqual(unavailable); + await expect(removeDatabaseFiles(async () => {}, () => [DATABASE_NAME])).rejects.toThrow("deletion was not confirmed"); + }); }); diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index f794cb8..ca68fd3 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -1,7 +1,7 @@ const command = (name, value) => `- ${name}${value === undefined ? "" : `: ${JSON.stringify(value)}`}`; const visible = (text) => command("assertVisible", text); const tap = (text) => command("tapOn", { text, enabled: true }); -const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 }); +const scroll = (element, centerElement = false) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100, centerElement }); const shot = (name) => command("takeScreenshot", name); const header = (bundleId, commands) => `appId: ${JSON.stringify(bundleId)}\n---\n${commands.join("\n")}\n`; @@ -21,7 +21,8 @@ export function resumeFlow(bundleId) { } export function completeFlow(bundleId, categories, previewDiagnostics = false) { return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Resume Game" }), tap("Resume Game"), - ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }), command("waitForAnimationToEnd", { timeout: 5000 }), + visible("Re-roll \\(1\\)"), command("waitForAnimationToEnd", { timeout: 5000 }), shot("ready-to-score"), + ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }, true), command("waitForAnimationToEnd", { timeout: 5000 }), command("tapOn", { id: `score-${id}`, enabled: true, retryTapIfNoChange: true }), ...(index < categories.length - 1 ? [command("extendedWaitUntil", { visible: { id: `score-${id}`, text: ".* points recorded.*" }, timeout: 15000 })] : [])]), visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index 2363e83..ed7bf8d 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -54,10 +54,14 @@ test("native name entry submits the keyboard instead of issuing dismissal swipes }); test("scoring waits for an enabled settled target and acknowledged record before moving on", () => { const steps = parse(completeFlow("com.hemsoft.yahtzee", ["full-house", "small-straight", "chance"])); + const ready = steps.findIndex((step) => step.command === "assertVisible" && step.value === "Re-roll \\(1\\)"); + const firstScoreScroll = steps.findIndex((step) => step.command === "scrollUntilVisible" && step.value?.element?.id === "score-full-house"); + assert(ready >= 0 && ready < firstScoreScroll, "Wait for the resumed game before scrolling for scores"); for (const id of ["full-house", "small-straight"]) { const index = steps.findIndex((step) => step.command === "tapOn" && step.value?.id === `score-${id}`); assert.equal(steps[index].value.enabled, true); assert.equal(steps[index].value.retryTapIfNoChange, true); + assert.equal(steps[index - 2].value.centerElement, true, "Scores must clear the fixed roll footer, not merely the screen bounds"); assert.equal(steps[index - 1].command, "waitForAnimationToEnd"); assert.equal(steps[index + 1].command, "extendedWaitUntil"); assert.deepEqual(steps[index + 1].value.visible, { id: `score-${id}`, text: ".* points recorded.*" }); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index d62b627..0e084f0 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import { spawn, spawnSync } from "node:child_process"; import { createHash } from "node:crypto"; -import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; +import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, writeFileSync } from "node:fs"; import { join, resolve } from "node:path"; import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; @@ -10,6 +10,7 @@ import { startFlow, resumeFlow, completeFlow, corruptFlow, emptyRelaunchFlow, sc import { buildSimulator } from "./build.mjs"; import { loadBuiltSimulator } from "./artifact.mjs"; import { retainDriverLogs } from "./driverLogs.mjs"; +import { snapshotEvidence } from "./snapshot.mjs"; assert.equal(process.platform, "darwin", "Native qualification requires macOS, Xcode and iOS simulators."); assert(["arm64", "x64"].includes(process.arch), "Unsupported simulator host architecture."); @@ -24,7 +25,8 @@ assert(!(group && buildOnly), "Build and test-only modes cannot be combined."); const selectedScenarios = group ? scenariosForGroup(group) : scenarios; const root = resolve(import.meta.dirname, "../.."); const output = join(root, "reports/native"); -assert(!existsSync(output), "Use a fresh checkout. Existing native evidence was not overwritten."); +const publishedOutput = join(root, "reports/native-evidence"); +assert(!existsSync(output) && !existsSync(publishedOutput), "Use a fresh checkout. Existing native evidence was not overwritten."); mkdirSync(output, { recursive: true }); const env = { ...process.env, DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer", EXPO_NO_TELEMETRY: "1", MAESTRO_CLI_NO_ANALYTICS: "true", MAESTRO_DISABLE_UPDATE_CHECK: "true", MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED: "true", MAESTRO_DRIVER_STARTUP_TIMEOUT: "300000" }; @@ -78,15 +80,6 @@ function saved(device, bundleId, directory, stage) { writeFileSync(join(directory, `${stage}-save.json`), bytes + "\n"); return { bytes, data, database }; } -function artifactFiles(directory, prefix = "") { - return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { - if (entry.name.startsWith(".")) return []; - const relative = prefix + entry.name; const path = join(directory, entry.name); - if (entry.isDirectory()) return artifactFiles(path, relative + "/"); - if (!entry.isFile() || relative === "manifest.json") return []; - return [{ path: relative, bytes: statSync(path).size, sha256: hash(readFileSync(path)) }]; - }); -} function corruption(device, bundleId) { const directory = join(output, "corrupt-save"); mkdirSync(directory); const current = saved(device, bundleId, directory, "before-corruption"); sim("terminate", device, bundleId); @@ -180,6 +173,11 @@ try { } catch (error) { receipt.status = "failed"; receipt.error = error instanceof Error ? error.message : String(error); process.exitCode = 1; for (const scenario of receipt.scenarios) if (scenario.status === "running") scenario.status = "failed"; + const failed = receipt.scenarios.at(-1); + if (failed && receipt.app) { + try { saved(failed.udid, receipt.app.bundleId, join(output, failed.id), "failure"); } + catch (snapshotError) { receipt.failureSaveError = String(snapshotError); } + } console.error(receipt.error); } finally { try { await stopRecording(); } catch (error) { receipt.recordingError = String(error); receipt.status = "failed"; process.exitCode = 1; } @@ -189,5 +187,6 @@ try { const removed = spawnSync("xcrun", ["simctl", "delete", device], { env, stdio: "ignore", timeout: 60000, killSignal: "SIGKILL" }); if (removed.status !== 0) { (receipt.cleanupErrors ??= []).push(device); receipt.status = "failed"; process.exitCode = 1; } } - receipt.finishedAt = new Date().toISOString(); receipt.artifacts = artifactFiles(output); checkpoint(); + receipt.finishedAt = new Date().toISOString(); checkpoint(); + snapshotEvidence(output, publishedOutput, receipt); } diff --git a/scripts/ios-native/snapshot.mjs b/scripts/ios-native/snapshot.mjs new file mode 100644 index 0000000..8ea6cbb --- /dev/null +++ b/scripts/ios-native/snapshot.mjs @@ -0,0 +1,45 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { pathToFileURL } from "node:url"; + +/** Detached XCTest writers may outlive Maestro. Upload immutable copies, not their live log paths. */ +export function snapshotEvidence(input, output, receipt) { + assert(!existsSync(output), "Existing published native evidence was not overwritten."); + mkdirSync(output, { recursive: true }); + const artifacts = []; + function copy(directory, prefix = "") { + for (const entry of readdirSync(directory, { withFileTypes: true })) { + if (entry.name.startsWith(".")) continue; + const path = prefix + entry.name; + if (entry.isDirectory()) { copy(join(directory, entry.name), path + "/"); continue; } + if (!entry.isFile() || path === "manifest.json") continue; + // Size and hash come from the same read, even if the source keeps growing. + const bytes = readFileSync(join(directory, entry.name)); + const destination = join(output, path); + mkdirSync(dirname(destination), { recursive: true }); writeFileSync(destination, bytes); + artifacts.push({ path, bytes: bytes.length, sha256: createHash("sha256").update(bytes).digest("hex") }); + } + } + copy(input); + const published = { ...receipt, evidenceSnapshotAt: new Date().toISOString(), artifacts }; + writeFileSync(join(output, "manifest.json"), JSON.stringify(published, null, 2) + "\n"); + return published; +} +function main() { + const root = resolve(import.meta.dirname, "../.."); + const input = join(root, "reports/native"); const output = join(root, "reports/native-evidence"); + if (existsSync(output)) { + assert(existsSync(join(output, "manifest.json")), "Published evidence is incomplete; existing files were not overwritten."); + console.log("Native evidence is already frozen."); return; + } + const manifest = join(input, "manifest.json"); + if (!existsSync(manifest)) { console.log("Native qualification did not create a receipt."); return; } + const receipt = JSON.parse(readFileSync(manifest, "utf8")); + if (receipt.status === "running") { + receipt.status = "failed"; receipt.error = "Native process ended before finalizing evidence."; + } + snapshotEvidence(input, output, receipt); +} +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) main(); diff --git a/scripts/ios-native/snapshot.test.mjs b/scripts/ios-native/snapshot.test.mjs new file mode 100644 index 0000000..f1f022f --- /dev/null +++ b/scripts/ios-native/snapshot.test.mjs @@ -0,0 +1,26 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { test } from "node:test"; +import { snapshotEvidence } from "./snapshot.mjs"; + +test("late same-size XCTest log rewrites cannot change published evidence or its hash inventory", () => { + const root = mkdtempSync(join(tmpdir(), "native-evidence-")); + try { + const input = join(root, "working"); const output = join(root, "published"); + mkdirSync(join(input, "flow/.maestro"), { recursive: true }); + writeFileSync(join(input, "flow/driver.log"), "initial"); + writeFileSync(join(input, "flow/.maestro/private.log"), "excluded"); + writeFileSync(join(input, "manifest.json"), "working checkpoint"); + const receipt = snapshotEvidence(input, output, { schemaVersion: 1, status: "failed", source: "test-source" }); + writeFileSync(join(input, "flow/driver.log"), "changed"); + assert.equal(readFileSync(join(output, "flow/driver.log"), "utf8"), "initial"); + assert.deepEqual(receipt.artifacts, [{ path: "flow/driver.log", bytes: 7, sha256: createHash("sha256").update("initial").digest("hex") }]); + assert.deepEqual(readdirSync(join(output, "flow")), ["driver.log"]); + assert.equal(JSON.parse(readFileSync(join(output, "manifest.json"))).status, "failed"); + assert.throws(() => snapshotEvidence(input, output, {}), /not overwritten/); + assert.equal(readFileSync(join(output, "flow/driver.log"), "utf8"), "initial"); + } finally { rmSync(root, { recursive: true, force: true }); } +}); From 1840be2190d46d63e032391d4e5db9262d02aaa2 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Sun, 27 Sep 2026 23:03:06 -0400 Subject: [PATCH 09/13] fix: verify native score viewport before each tap --- apps/mobile/src/screens/Play.tsx | 4 +- docs/native-simulator.md | 10 +++- scripts/ios-native/flows.mjs | 13 ++-- scripts/ios-native/flows.test.mjs | 26 +++----- scripts/ios-native/geometry.mjs | 68 +++++++++++++++++++++ scripts/ios-native/geometry.test.mjs | 73 ++++++++++++++++++++++ scripts/ios-native/mcp.mjs | 90 ++++++++++++++++++++++++++++ scripts/ios-native/mcp.test.mjs | 71 ++++++++++++++++++++++ scripts/ios-native/run.mjs | 8 ++- scripts/ios-native/scoring.mjs | 64 ++++++++++++++++++++ 10 files changed, 396 insertions(+), 31 deletions(-) create mode 100644 scripts/ios-native/geometry.mjs create mode 100644 scripts/ios-native/geometry.test.mjs create mode 100644 scripts/ios-native/mcp.mjs create mode 100644 scripts/ios-native/mcp.test.mjs create mode 100644 scripts/ios-native/scoring.mjs diff --git a/apps/mobile/src/screens/Play.tsx b/apps/mobile/src/screens/Play.tsx index 17d763a..2411ae1 100644 --- a/apps/mobile/src/screens/Play.tsx +++ b/apps/mobile/src/screens/Play.tsx @@ -41,10 +41,10 @@ export function Play({ onPause }: { onPause: () => void }) { {controls}{roll} - + ; return - {controls} + {controls} {roll} ; } diff --git a/docs/native-simulator.md b/docs/native-simulator.md index 0a90506..38d0222 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -39,9 +39,13 @@ Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. -Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay before scrolling. Scoring centers enabled targets, waits for scrolling to settle and requires an acknowledged recorded score before the next category. Centering matters because Maestro can count a row clipped behind the fixed roll footer as visible within the device's overall bounds. A scoring tap allows Maestro's single retry when the hierarchy is unchanged; a recorded category cannot be scored twice. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. +Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase uses the same pinned Maestro binary's local stdio MCP session, with the viewer disabled. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the session has a ten-minute deadline and a bounded shutdown. -Maestro uses accessibility text and test IDs, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. +This replaces `centerElement`, which accepted One Pair after a swipe moved it behind the toolbar and the tap opened Help. The pinned driver uses a one-sided screen threshold, not scroll-view containment. Its `above` and `below` selectors also compare top positions, not full rectangles. Slowing that gesture alone would leave the unsafe reachability assumption intact. + +Scoring never retries a tap. It requires the recorded-score label and disabled state before the next category, or Game Over after the last one. The generated command, native rectangles, chosen gesture, acknowledgment and ready-to-tap screenshot are retained. Only local device listing, inspection and command execution are allowed through this client. Child environment variables are allowlisted, protocol replies are size/time bounded, and raw replies containing injected environment fields are not logged. Transport and captured-geometry tests do not establish native-runtime acceptance. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. + +Maestro taps use accessibility text and test IDs. Score-scroll gestures derive from the current native viewport geometry, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad Stage Manager window-resize or signed-distribution acceptance. Browser-adapter results do not substitute for the native run. Review actual screenshots in one batch, apply one layout correction batch, then confirm. Functional failures still require diagnosis. @@ -49,6 +53,6 @@ This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad `reports/native-evidence/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. The runner freezes working files from `reports/native` into `reports/native-evidence` before hashing and upload. Size and hash come from the same copied bytes. Later writes from detached XCTest processes cannot change that snapshot. An always-run workflow step also freezes partial receipts when execution ends early. The required quality gate includes every native job. A screenshot file's existence alone is not visual review or release approval. -The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. +The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. The scoring client also retains bounded, redacted stderr and the latest native hierarchy; it captures the screen on failure without repeating a scoring action. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index ca68fd3..b018e9f 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -1,7 +1,7 @@ const command = (name, value) => `- ${name}${value === undefined ? "" : `: ${JSON.stringify(value)}`}`; const visible = (text) => command("assertVisible", text); const tap = (text) => command("tapOn", { text, enabled: true }); -const scroll = (element, centerElement = false) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100, centerElement }); +const scroll = (element) => command("scrollUntilVisible", { element, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 }); const shot = (name) => command("takeScreenshot", name); const header = (bundleId, commands) => `appId: ${JSON.stringify(bundleId)}\n---\n${commands.join("\n")}\n`; @@ -19,13 +19,12 @@ export function resumeFlow(bundleId) { return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Resume Game" }), tap("Resume Game"), visible("Re-roll \\(1\\)"), shot("resumed")]); } -export function completeFlow(bundleId, categories, previewDiagnostics = false) { +export function completeStartFlow(bundleId) { return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Resume Game" }), tap("Resume Game"), - visible("Re-roll \\(1\\)"), command("waitForAnimationToEnd", { timeout: 5000 }), shot("ready-to-score"), - ...categories.flatMap((id, index) => [scroll({ id: `score-${id}`, enabled: true }, true), command("waitForAnimationToEnd", { timeout: 5000 }), - command("tapOn", { id: `score-${id}`, enabled: true, retryTapIfNoChange: true }), - ...(index < categories.length - 1 ? [command("extendedWaitUntil", { visible: { id: `score-${id}`, text: ".* points recorded.*" }, timeout: 15000 })] : [])]), - visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), + visible("Re-roll \\(1\\)"), command("waitForAnimationToEnd", { timeout: 5000 }), command("assertVisible", { id: "score-viewport" }), shot("ready-to-score")]); +} +export function completeEndFlow(bundleId, previewDiagnostics = false) { + return header(bundleId, [visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), ...(previewDiagnostics ? [scroll({ text: "Preview diagnostics" }), tap("Preview diagnostics"), scroll({ id: "diagnostics-preview" }), diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index ed7bf8d..1b79716 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { test } from "node:test"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { startFlow, resumeFlow, completeStartFlow, completeEndFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; function parse(flow) { const [header, body] = flow.trim().split("\n---\n"); @@ -40,10 +40,9 @@ test("generated flows use valid JSON-in-YAML commands and real semantic controls const resumed = parse(resumeFlow("com.hemsoft.yahtzee")); assert.equal(resumed[0].value.clearState, undefined); assert(resumed.some((step) => step.value?.text === "Resume Game")); - const completed = parse(completeFlow("com.hemsoft.yahtzee", ["ones", "chance"])); - assert.equal(completed.filter((step) => step.command === "tapOn" && step.value?.id?.startsWith("score-")).length, 2); + const completed = parse(completeEndFlow("com.hemsoft.yahtzee")); assert(completed.some((step) => step.command === "assertVisible" && step.value === "Game Over!")); - const preview = parse(completeFlow("com.hemsoft.yahtzee", ["ones"], true)); + const preview = parse(completeEndFlow("com.hemsoft.yahtzee", true)); assert(preview.some((step) => step.command === "assertVisible" && step.value?.id === "diagnostics-preview")); assert(preview.some((step) => step.value?.text === "Cancel preview")); }); @@ -52,20 +51,13 @@ test("native name entry submits the keyboard instead of issuing dismissal swipes assert(!steps.some((step) => step.command === "hideKeyboard")); assert(steps.some((step) => step.command === "pressKey" && step.value === "enter")); }); -test("scoring waits for an enabled settled target and acknowledged record before moving on", () => { - const steps = parse(completeFlow("com.hemsoft.yahtzee", ["full-house", "small-straight", "chance"])); +test("scoring starts only after resume settles and exposes its actual viewport", () => { + const steps = parse(completeStartFlow("com.hemsoft.yahtzee")); const ready = steps.findIndex((step) => step.command === "assertVisible" && step.value === "Re-roll \\(1\\)"); - const firstScoreScroll = steps.findIndex((step) => step.command === "scrollUntilVisible" && step.value?.element?.id === "score-full-house"); - assert(ready >= 0 && ready < firstScoreScroll, "Wait for the resumed game before scrolling for scores"); - for (const id of ["full-house", "small-straight"]) { - const index = steps.findIndex((step) => step.command === "tapOn" && step.value?.id === `score-${id}`); - assert.equal(steps[index].value.enabled, true); - assert.equal(steps[index].value.retryTapIfNoChange, true); - assert.equal(steps[index - 2].value.centerElement, true, "Scores must clear the fixed roll footer, not merely the screen bounds"); - assert.equal(steps[index - 1].command, "waitForAnimationToEnd"); - assert.equal(steps[index + 1].command, "extendedWaitUntil"); - assert.deepEqual(steps[index + 1].value.visible, { id: `score-${id}`, text: ".* points recorded.*" }); - } + assert(ready >= 0); + assert.equal(steps[ready + 1].command, "waitForAnimationToEnd"); + assert.deepEqual(steps[ready + 2].value, { id: "score-viewport" }); + assert(!steps.some((step) => step.value?.centerElement || step.value?.id?.startsWith("score-") && step.command === "tapOn")); }); test("corruption flow never clears state and reset includes cancellation first", () => { const relaunch = parse(emptyRelaunchFlow("com.hemsoft.yahtzee")); diff --git a/scripts/ios-native/geometry.mjs b/scripts/ios-native/geometry.mjs new file mode 100644 index 0000000..d551475 --- /dev/null +++ b/scripts/ios-native/geometry.mjs @@ -0,0 +1,68 @@ +import assert from "node:assert/strict"; + +export function bounds(value) { + const match = /^\[(-?\d+),(-?\d+)\]\[(-?\d+),(-?\d+)\]$/.exec(value ?? ""); + assert(match, "Missing or invalid native bounds."); + const [left, top, right, bottom] = match.slice(1).map(Number); + assert([left, top, right, bottom].every((n) => Number.isSafeInteger(n) && Math.abs(n) <= 100000), "Invalid native coordinate."); + assert(right > left && bottom > top, "Native bounds must have positive area."); + return { left, top, right, bottom, width: right - left, height: bottom - top }; +} +export function screenElements(screen) { + assert.equal(screen.ui_schema?.platform, "ios", "Expected a native iOS hierarchy."); + assert.equal(screen.ui_schema?.defaults?.enabled, true, "Unexpected native enabled default."); + const result = []; + function visit(nodes, parents = []) { + assert(Array.isArray(nodes) && parents.length < 64, "Invalid native hierarchy."); + for (const node of nodes) { + assert(result.length < 10000, "Native hierarchy exceeds its bound."); + const item = { ...node, enabled: node.enabled ?? true, parents, rect: bounds(node.b) }; + result.push(item); + if (node.c) visit(node.c, [...parents, item]); + } + } + visit(screen.elements); + return result; +} +export function uniqueElement(elements, id, required = true) { + const matches = elements.filter((node) => node.rid === id); + assert(matches.length <= 1 && (!required || matches.length === 1), `Expected one native ${id}; found ${matches.length}.`); + return matches[0]; +} +const within = (row, viewport, margin = 8) => row.left >= viewport.left && row.right <= viewport.right && row.top >= viewport.top + margin && row.bottom <= viewport.bottom - margin; +const intersects = (row, viewport) => row.bottom > viewport.top && row.top < viewport.bottom && row.right > viewport.left && row.left < viewport.right; + +/** Uses the actual scroll view, not Maestro's whole-screen visibility/one-sided centering. */ +export function scorePosition(screen, id, categories) { + const elements = screenElements(screen); + const viewportNode = uniqueElement(elements, "score-viewport"); + const viewport = viewportNode.rect; + assert(viewport.width >= 80 && viewport.height >= 100, "Score viewport is too small to exercise."); + const target = uniqueElement(elements, `score-${id}`, false); + if (target) { + assert(target.parents.includes(viewportNode), "Score target is outside its scroll view."); + assert(!/points recorded/.test(target.a11y ?? ""), "Refusing to score an already recorded category."); + assert(target.enabled === true || target.enabled === false, "Invalid enabled state."); + if (!target.enabled) return { action: "wait", id, viewport, target: target.rect }; + assert(target.rect.width <= viewport.width && target.rect.height <= viewport.height - 16, "Score target cannot fit in its viewport."); + if (within(target.rect, viewport)) return { action: "tap", id, viewport, target: target.rect }; + } + const index = categories.indexOf(id); assert(index >= 0, "Unknown score category."); + const visible = elements.filter((node) => node.parents.includes(viewportNode) && node.rid?.startsWith("score-") && intersects(node.rect, viewport)) + .map((node) => categories.indexOf(node.rid.slice(6))).filter((value) => value >= 0); + let direction; + if (target) direction = target.rect.top < viewport.top + 8 ? "up" : "down"; + else if (visible.length === 0 || index > Math.max(...visible)) direction = "down"; + else { assert(index < Math.min(...visible), "Missing target among visible score rows."); direction = "up"; } + const distance = Math.round(viewport.height * 0.18); + const x = Math.round((viewport.left + viewport.right) / 2), middle = (viewport.top + viewport.bottom) / 2; + const delta = direction === "down" ? distance : -distance; + return { action: "swipe", id, viewport, target: target?.rect ?? null, direction, + start: `${x},${Math.round(middle + delta / 2)}`, end: `${x},${Math.round(middle - delta / 2)}`, duration: 1000 }; +} + +export function assertRecorded(screen, id) { + const node = uniqueElement(screenElements(screen), `score-${id}`); + assert.match(node.a11y ?? "", /points recorded/, `Native score ${id} was not acknowledged.`); + assert.equal(node.enabled, false, "Recorded score must no longer accept input."); +} diff --git a/scripts/ios-native/geometry.test.mjs b/scripts/ios-native/geometry.test.mjs new file mode 100644 index 0000000..1b38876 --- /dev/null +++ b/scripts/ios-native/geometry.test.mjs @@ -0,0 +1,73 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { test } from "node:test"; +import { bounds, screenElements, scorePosition, assertRecorded } from "./geometry.mjs"; +import { scoreCategories } from "./scoring.mjs"; + +const row = (id, top, extra = {}) => ({ rid: `score-${id}`, a11y: `Score ${id}, 0 points`, b: `[20,${top}][382,${top + 56}]`, ...extra }); +const screen = (rows, viewport = "[0,164][402,772]") => ({ ui_schema: { platform: "ios", defaults: { enabled: true } }, elements: [ + { b: "[0,0][402,874]", c: [{ rid: "score-viewport", b: viewport, c: rows }] }, +] }); + +test("the actual scoring caller uses the viewport-aware driver in both layouts", () => { + const play = readFileSync(new URL("../../apps/mobile/src/screens/Play.tsx", import.meta.url), "utf8"); + assert.equal((play.match(/testID="score-viewport"/g) ?? []).length, 2); + const runner = readFileSync(new URL("./run.mjs", import.meta.url), "utf8"); + assert.match(runner, /await nativeScoring\(/); + assert.doesNotMatch(runner, /completeFlow\(/); +}); +test("captured footer and toolbar overshoots do not count as reachable scores", () => { + // Captured row bounds from 027459 and 22d76f2; viewport is a representative phone fixture. + const footer = scorePosition(screen([row("ones", 750)]), "ones", ["ones"]); + const toolbar = scorePosition(screen([row("one-pair", 115)]), "one-pair", ["one-pair"]); + assert.equal(footer.action, "swipe"); assert.equal(footer.direction, "down"); + assert.equal(toolbar.action, "swipe"); assert.equal(toolbar.direction, "up"); + assert.equal(scorePosition(screen([row("ones", 238)]), "ones", ["ones"]).action, "tap"); + // Maestro's one-sided 70% check accepts the observed y143 center despite the toolbar. + assert(143 < 874 / 2 + Math.floor(874 / 5)); +}); +test("positioning follows the native viewport, missing-row order and enabled state", () => { + assert.equal(scorePosition(screen([row("chance", 250)]), "ones", ["ones", "chance"]).direction, "up"); + assert.equal(scorePosition(screen([row("ones", 250)]), "chance", ["ones", "chance"]).direction, "down"); + assert.equal(scorePosition(screen([row("ones", 250, { enabled: false })]), "ones", ["ones"]).action, "wait"); + assert.throws(() => scorePosition(screen([row("ones", 250, { a11y: "Ones, 0 points recorded", enabled: false })]), "ones", ["ones"]), /already recorded/); + const tablet = screen([{ rid: "score-ones", b: "[440,900][1000,960]" }], "[420,164][1032,1332]"); + assert.equal(scorePosition(tablet, "ones", ["ones"]).action, "tap"); + assert.throws(() => scorePosition(screen([row("ones", 160)] , "[0,164][300,772]"), "ones", ["ones"]), /cannot fit/); +}); +test("malformed, duplicate and unrelated geometry fails closed", () => { + for (const value of [null, "[0,0][0,0]", "[0,0][2.5,4]", "[0,0][200000,3]"]) assert.throws(() => bounds(value)); + assert.throws(() => screenElements({ ui_schema: { platform: "android" } })); + assert.throws(() => scorePosition(screen([row("ones", 250), row("ones", 310)]), "ones", ["ones"]), /found 2/); + const outside = screen([]); outside.elements.push(row("ones", 250)); + assert.throws(() => scorePosition(outside, "ones", ["ones"]), /outside its scroll view/); + assert.throws(() => assertRecorded(screen([row("ones", 250)]), "ones"), /not acknowledged/); +}); + +test("scoring repairs overshoot, taps once inside bounds, and requires application acknowledgment", async () => { + let top = 115, finished = false, taps = 0; + const decisions = [], calls = []; + await scoreCategories({ categories: ["one-pair"], + inspect: async () => finished ? screen([{ b: "[20,200][382,256]", a11y: "Game Over!" }]) : screen([row("one-pair", top)]), + run: async (commands) => { + calls.push(commands); + const swipe = commands[0].swipe; + if (swipe) top += Number(swipe.end.split(",")[1]) - Number(swipe.start.split(",")[1]); + if (commands[0].tapOn) { + assert(top >= 172 && top + 56 <= 764); assert.equal(commands[0].tapOn.retryTapIfNoChange, false); + assert.equal(commands[1].extendedWaitUntil.visible.text, "Game Over!"); taps++; finished = true; + } + }, capture: async () => {}, record: (item) => decisions.push(item), + }); + assert.equal(taps, 1); assert(calls.some((commands) => commands[0].swipe)); + assert.equal(decisions.at(-1).action, "acknowledged"); +}); +test("lack of score acknowledgment never triggers another tap; stuck geometry is bounded", async () => { + let taps = 0; + const options = { categories: ["ones", "chance"], inspect: async () => screen([row("ones", 250)]), + run: async (commands) => { if (commands[0].tapOn) taps++; }, capture: async () => {}, record: () => {} }; + await assert.rejects(scoreCategories(options), /not acknowledged/); assert.equal(taps, 1); + let inspections = 0; + await assert.rejects(scoreCategories({ ...options, categories: ["ones"], inspect: async () => { inspections++; return screen([row("ones", 750)]); } }), /30 inspections/); + assert.equal(inspections, 30); assert.equal(taps, 1); +}); diff --git a/scripts/ios-native/mcp.mjs b/scripts/ios-native/mcp.mjs new file mode 100644 index 0000000..a93d38c --- /dev/null +++ b/scripts/ios-native/mcp.mjs @@ -0,0 +1,90 @@ +import assert from "node:assert/strict"; +import { spawn } from "node:child_process"; +import { setTimeout as delay } from "node:timers/promises"; + +/** Bounded local JSON-RPC transport. Never persist raw responses or injected environment values. */ +export function rpcClient(child, { timeoutMs = 300000, maxBytes = 8 * 1024 * 1024, deadline = Infinity } = {}) { + let nextId = 0, buffer = "", failure = null, closing = false; + const pending = new Map(); + function fail(error) { + failure ??= error; + for (const entry of pending.values()) { clearTimeout(entry.timer); entry.reject(failure); } + pending.clear(); + } + function send(message) { child.stdin.write(JSON.stringify(message) + "\n"); } + function receive(line) { + const message = JSON.parse(line); + assert.equal(message.jsonrpc, "2.0", "Invalid local JSON-RPC version."); + if (message.method) { + if (message.id !== undefined) send({ jsonrpc: "2.0", id: message.id, error: { code: -32601, message: "Server requests are not supported." } }); + return; + } + const entry = pending.get(message.id); assert(entry, "Unexpected local JSON-RPC response."); + clearTimeout(entry.timer); pending.delete(message.id); + if (message.error) entry.reject(new Error(`Local JSON-RPC error ${message.error.code ?? "unknown"}.`)); + else if (!Object.hasOwn(message, "result")) entry.reject(new Error("Local JSON-RPC response has no result.")); + else entry.resolve(message.result); + } + child.stdout.setEncoding("utf8"); + child.stdout.on("data", (chunk) => { + if (failure) return; + try { + buffer += chunk; assert(Buffer.byteLength(buffer) <= maxBytes, "Local JSON-RPC output exceeded its bound."); + let newline; + while ((newline = buffer.indexOf("\n")) >= 0) { + const line = buffer.slice(0, newline).trim(); buffer = buffer.slice(newline + 1); + if (line) receive(line); + } + } catch (error) { fail(error); } + }); + child.on("error", fail); child.stdin.on("error", fail); + const stopped = new Promise((resolve) => child.once("close", (code, signal) => { + fail(new Error(`Local Maestro exited: ${code ?? signal}.`)); resolve(); + })); + function request(method, params) { + if (failure || closing) return Promise.reject(failure ?? new Error("Local Maestro is closing.")); + return new Promise((resolve, reject) => { + const id = ++nextId; + const timer = setTimeout(() => fail(new Error(`Local Maestro ${method} timed out.`)), Math.max(1, Math.min(timeoutMs, deadline - Date.now()))); + pending.set(id, { resolve, reject, timer }); + try { send({ jsonrpc: "2.0", id, method, params }); } catch (error) { fail(error); } + }); + } + async function close() { + if (closing) return stopped; + closing = true; fail(new Error("Local Maestro session closed.")); child.stdin.end(); + const controller = new AbortController(); + try { + await Promise.race([stopped, delay(60000, undefined, { signal: controller.signal }).then(() => { + child.kill("SIGKILL"); throw new Error("Local Maestro did not close within 60 seconds."); + })]); + } finally { controller.abort(); } + } + return { request, notify: (method) => send({ jsonrpc: "2.0", method }), close }; +} + +const localTools = new Set(["list_devices", "inspect_screen", "run"]); +export async function localMaestro({ cwd, env, onStderr, deadline, start = spawn }) { + const child = start("maestro", ["mcp", "--no-viewer", "--working-dir", cwd], { cwd, env, stdio: ["pipe", "pipe", "pipe"] }); + // Collect sanitized diagnostics at the caller; do not mix stderr into the protocol channel. + child.stderr.setEncoding("utf8"); child.stderr.on("data", onStderr); + const client = rpcClient(child, { deadline }); + try { + const hello = await client.request("initialize", { protocolVersion: "2024-11-05", capabilities: {}, clientInfo: { name: "native-qualification", version: "1" } }); + assert.equal(hello.serverInfo?.name, "maestro", "Unexpected local automation server."); + assert(["2024-11-05", "2025-03-26", "2025-06-18"].includes(hello.protocolVersion), "Unsupported local protocol version."); + client.notify("notifications/initialized"); + } catch (error) { await client.close(); throw error; } + async function call(name, args = {}) { + assert(localTools.has(name), "Only local native qualification tools are permitted."); + const result = await client.request("tools/call", { name, arguments: args }); + if (result.isError) { + onStderr(`\nLocal ${name} error: ${JSON.stringify(result.content).slice(0, 8192)}\n`); + throw new Error(`Local Maestro ${name} failed; see complete-mcp.log.`); + } + assert.equal(result.content?.length, 1, "Unexpected local tool response."); + assert.equal(result.content[0].type, "text", "Expected local JSON text."); + return JSON.parse(result.content[0].text); + } + return { call, close: client.close }; +} diff --git a/scripts/ios-native/mcp.test.mjs b/scripts/ios-native/mcp.test.mjs new file mode 100644 index 0000000..2b86d16 --- /dev/null +++ b/scripts/ios-native/mcp.test.mjs @@ -0,0 +1,71 @@ +import assert from "node:assert/strict"; +import { EventEmitter } from "node:events"; +import { PassThrough } from "node:stream"; +import { test } from "node:test"; +import { localMaestro, rpcClient } from "./mcp.mjs"; + +function processFixture(reply = () => {}) { + const child = new EventEmitter(); + child.stdin = new PassThrough(); child.stdout = new PassThrough(); child.stderr = new PassThrough(); + const messages = []; + child.stdin.on("data", (bytes) => { + for (const line of bytes.toString().trim().split("\n")) { const message = JSON.parse(line); messages.push(message); reply(message, child); } + }); + child.stdin.on("finish", () => child.emit("close", 0, null)); + child.kill = () => child.emit("close", null, "SIGKILL"); + return { child, messages }; +} +const respond = (child, id, result) => child.stdout.write(JSON.stringify({ jsonrpc: "2.0", id, result }) + "\n"); + +test("local RPC supports fragmented UTF-8 replies, notifications and rejects server actions", async () => { + const { child, messages } = processFixture(); + const client = rpcClient(child, { timeoutMs: 1000 }); + const pending = client.request("test", { bounded: true }); + const bytes = Buffer.from(JSON.stringify({ jsonrpc: "2.0", id: 1, result: { word: "café" } }) + "\n"); + for (const byte of bytes) child.stdout.write(Buffer.from([byte])); + assert.deepEqual(await pending, { word: "café" }); + child.stdout.write(JSON.stringify({ jsonrpc: "2.0", method: "unexpected", id: "server-1" }) + "\n"); + assert.equal(messages.at(-1).error.code, -32601); + client.notify("notifications/initialized"); assert.equal(messages.at(-1).method, "notifications/initialized"); + await client.close(); await assert.rejects(client.request("closed", {})); +}); +test("local RPC fails closed on malformed, oversized, timed-out and exited sessions", async () => { + for (const payload of ["not json\n", JSON.stringify({ jsonrpc: "1.0", id: 1, result: {} }) + "\n", "x".repeat(1025)]) { + const { child } = processFixture(); const client = rpcClient(child, { timeoutMs: 1000, maxBytes: 1024 }); + const result = client.request("test", {}); child.stdout.write(payload); + await assert.rejects(result); await assert.rejects(client.request("again", {})); await client.close(); + } + const { child } = processFixture(); const client = rpcClient(child, { timeoutMs: 5 }); + await assert.rejects(client.request("test", {}), /timed out/); await client.close(); + const ended = processFixture(); const exited = rpcClient(ended.child); + const pending = exited.request("test", {}); ended.child.emit("close", 7, null); + await assert.rejects(pending, /exited: 7/); await exited.close(); +}); +test("local server handshake, selected JSON result and local-only tool allowlist", async () => { + const fixture = processFixture((message, child) => { + if (message.method === "initialize") respond(child, message.id, { serverInfo: { name: "maestro" }, protocolVersion: "2024-11-05" }); + if (message.method === "tools/call") respond(child, message.id, { content: [{ type: "text", text: JSON.stringify({ devices: [] }) }] }); + }); + const stderr = []; + const client = await localMaestro({ cwd: "/owned", env: {}, onStderr: (text) => stderr.push(text), start: (exe, args, options) => { + assert.equal(exe, "maestro"); assert.deepEqual(args, ["mcp", "--no-viewer", "--working-dir", "/owned"]); + assert.equal(options.cwd, "/owned"); return fixture.child; + } }); + fixture.child.stderr.write("diagnostic"); assert.deepEqual(stderr, ["diagnostic"]); + assert.deepEqual(await client.call("list_devices"), { devices: [] }); + const count = fixture.messages.length; + await assert.rejects(client.call("run_on_cloud", {}), /Only local/); + assert.equal(fixture.messages.length, count); await client.close(); +}); +test("unknown server and error tool result cannot establish successful qualification", async () => { + const wrong = processFixture((message, child) => { + if (message.method === "initialize") respond(child, message.id, { serverInfo: { name: "unknown" }, protocolVersion: "2024-11-05" }); + }); + await assert.rejects(localMaestro({ cwd: "/owned", env: {}, onStderr: () => {}, start: () => wrong.child }), /Unexpected local/); + const fixture = processFixture((message, child) => { + if (message.method === "initialize") respond(child, message.id, { serverInfo: { name: "maestro" }, protocolVersion: "2024-11-05" }); + if (message.method === "tools/call") respond(child, message.id, { isError: true, content: [{ type: "text", text: "failure" }] }); + }); + const client = await localMaestro({ cwd: "/owned", env: {}, onStderr: () => {}, start: () => fixture.child }); + await assert.rejects(client.call("run", { yaml: "invalid" }), /run failed/); await client.close(); +}); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index 0e084f0..06a293b 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -6,7 +6,8 @@ import { join, resolve } from "node:path"; import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; import { decodeSave } from "../../apps/mobile/src/local/save.ts"; -import { startFlow, resumeFlow, completeFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { startFlow, resumeFlow, completeStartFlow, completeEndFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { nativeScoring } from "./scoring.mjs"; import { buildSimulator } from "./build.mjs"; import { loadBuiltSimulator } from "./artifact.mjs"; import { retainDriverLogs } from "./driverLogs.mjs"; @@ -139,7 +140,10 @@ async function exercise(app, bundleId) { if (!scenario.largeText) { receipt.phase = `complete-${scenario.id}`; checkpoint(); const preview = ["phone-5-solo-light", "tablet-8-solo-light"].includes(scenario.id); - flow(device, directory, "complete", completeFlow(bundleId, getScorecardCategories(scenario.dice).map((category) => category.id), preview)); + flow(device, directory, "complete-start", completeStartFlow(bundleId)); + await nativeScoring({ device, bundleId, directory, categories: getScorecardCategories(scenario.dice).map((category) => category.id), env, + capture: (name) => sim("io", device, "screenshot", join(directory, `${name}.png`)) }); + flow(device, directory, "complete", completeEndFlow(bundleId, preview)); const completed = saved(device, bundleId, directory, "completed"); assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); diff --git a/scripts/ios-native/scoring.mjs b/scripts/ios-native/scoring.mjs new file mode 100644 index 0000000..07f3ef2 --- /dev/null +++ b/scripts/ios-native/scoring.mjs @@ -0,0 +1,64 @@ +import assert from "node:assert/strict"; +import { appendFileSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; +import { scorePosition, assertRecorded, screenElements } from "./geometry.mjs"; +import { localMaestro } from "./mcp.mjs"; +import { redactDriverLog } from "./driverLogs.mjs"; + +export async function scoreCategories({ categories, inspect, run, capture, record }) { + assert(categories.length > 0 && categories.length <= 20 && new Set(categories).size === categories.length); + for (const [index, id] of categories.entries()) { + assert(/^[a-z][a-z0-9-]*$/.test(id), "Invalid score identifier."); + let ready = false; + for (let attempt = 0; attempt < 30; attempt++) { + await run([{ waitForAnimationToEnd: { timeout: 5000 } }]); + const decision = scorePosition(await inspect(), id, categories); record({ index, attempt, ...decision }); + if (decision.action === "tap") { ready = true; break; } + if (decision.action === "swipe") await run([{ swipe: { start: decision.start, end: decision.end, duration: decision.duration } }]); + } + assert(ready, `Score ${id} did not become reachable within 30 inspections.`); + await capture(`score-${id}-ready`); + const last = index === categories.length - 1; + await run([{ tapOn: { id: `score-${id}`, enabled: true, retryTapIfNoChange: false } }, + { extendedWaitUntil: { visible: last ? { text: "Game Over!" } : { id: `score-${id}`, text: ".* points recorded.*" }, timeout: 15000 } }]); + const after = await inspect(); + if (last) assert(screenElements(after).some((node) => node.a11y === "Game Over!" || node.txt === "Game Over!"), "Native game did not finish."); + else assertRecorded(after, id); + record({ index, id, action: "acknowledged", last }); + } +} + +/** Local-only transport around the pinned Maestro driver. No cloud calls or extra service. */ +export async function nativeScoring({ device, bundleId, directory, categories, env, capture }) { + let diagnostics = "", sequence = 0; + const deadline = Date.now() + 600000; + const childEnv = Object.fromEntries(Object.entries(env).filter(([key]) => + /^(PATH|HOME|USER|LOGNAME|SHELL|TMPDIR|TMP|TEMP|JAVA_HOME|DEVELOPER_DIR|LANG|LC_ALL|MAESTRO_CLI_NO_ANALYTICS|MAESTRO_DISABLE_UPDATE_CHECK|MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED|MAESTRO_DRIVER_STARTUP_TIMEOUT)$/.test(key))); + let client; + async function call(name, args) { assert(Date.now() < deadline, "Native scoring exceeded ten minutes."); return client.call(name, args); } + async function inspect() { + const screen = await call("inspect_screen", { device_id: device }); + writeFileSync(join(directory, "complete-screen-latest.json"), JSON.stringify(screen, null, 2) + "\n"); + return screen; + } + async function run(commands) { + const yaml = `appId: ${JSON.stringify(bundleId)}\n---\n` + commands.map((command) => { + const [[name, value]] = Object.entries(command); return `- ${name}: ${JSON.stringify(value)}`; + }).join("\n") + "\n"; + writeFileSync(join(directory, `complete-step-${String(++sequence).padStart(3, "0")}.yaml`), yaml); + const result = await call("run", { device_id: device, yaml }); + assert.equal(result.success, true, "Native scoring command failed."); + } + try { + client = await localMaestro({ cwd: directory, env: childEnv, deadline, onStderr: (text) => { diagnostics += text.slice(0, Math.max(0, 262144 - diagnostics.length)); } }); + const devices = await call("list_devices", {}); + assert(devices.devices?.some((item) => item.device_id === device && item.platform === "ios" && item.connected === true), "Owned simulator is not connected to Maestro."); + await scoreCategories({ categories, inspect, run, capture, record: (value) => appendFileSync(join(directory, "complete-geometry.jsonl"), JSON.stringify(value) + "\n") }); + } catch (error) { + try { await capture("complete-failure"); } catch { /* Preserve the original failure; the runner also attempts a read-only save snapshot. */ } + throw error; + } finally { + try { await client?.close(); } + finally { writeFileSync(join(directory, "complete-mcp.log"), redactDriverLog(diagnostics, env)); } + } +} From 30881ad9a27dad16534093897a4a4524d5ff1ac2 Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Mon, 28 Sep 2026 00:07:38 -0400 Subject: [PATCH 10/13] fix: reject coerced saves and activate native driver sessions --- apps/mobile/src/local/save.ts | 4 +-- docs/native-simulator.md | 2 ++ .../tests/nativePersistence.test.ts | 27 +++++++++++++++++++ scripts/ios-native/flows.mjs | 6 +++-- scripts/ios-native/flows.test.mjs | 10 +++++++ scripts/ios-native/geometry.test.mjs | 1 + scripts/ios-native/scoring.mjs | 1 + 7 files changed, 47 insertions(+), 4 deletions(-) diff --git a/apps/mobile/src/local/save.ts b/apps/mobile/src/local/save.ts index f51743e..0423ca0 100644 --- a/apps/mobile/src/local/save.ts +++ b/apps/mobile/src/local/save.ts @@ -44,7 +44,7 @@ export function validPreferences(value: unknown): value is Preferences { const names = value.recentNames; return (value.name === "" || text(value.name, 32)) && Array.isArray(names) && names.length <= 5 && names.every((name) => text(name, 32)) && unique(names) - && ["system", "light", "dark"].includes(String(value.appearance)) + && typeof value.appearance === "string" && ["system", "light", "dark"].includes(value.appearance) && mode(value.diceCount) && integer(value.aiOpponents, 0, 3); } function scorecard(value: unknown, diceCount: number, complete: boolean): boolean { @@ -69,7 +69,7 @@ function gameDice(value: Record, diceCount: number): boolean { function wireGame(value: unknown): boolean { if (!object(value) || !mode(value.diceCount)) return false; const rounds = getCategories(value.diceCount).length; - if (!integer(value.currentRound, 1, rounds) || !["playing", "finished"].includes(String(value.status))) return false; + if (!integer(value.currentRound, 1, rounds) || typeof value.status !== "string" || !["playing", "finished"].includes(value.status)) return false; if (!gamePlayers(value.players, value.diceCount, value.currentRound, value.status === "finished")) return false; const players = value.players as unknown[]; return text(value.id) && value.maxRolls === 3 && value.totalRounds === rounds && integer(value.rollsLeft, 0, value.status === "finished" ? 3 : 2) diff --git a/docs/native-simulator.md b/docs/native-simulator.md index 38d0222..e9ad5b5 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -43,6 +43,8 @@ Each start holds a die and rerolls. The runner reads the real app's SQLite docum This replaces `centerElement`, which accepted One Pair after a swipe moved it behind the toolbar and the tap opened Help. The pinned driver uses a one-sided screen threshold, not scroll-view containment. Its `above` and `below` selectors also compare top positions, not full rectangles. Slowing that gesture alone would leave the unsafe reachability assumption intact. +A new scoring or results driver explicitly foregrounds the existing app with `launchApp`, `stopApp: false` and `clearState: false`. It does not assume input focus survives the preceding driver session, restart gameplay or reset saved data. All permissions remain denied. This startup contract still needs the native interaction assertions; foregrounding alone is not proof that a tap worked. Diagnostic cancellation scrolls to its action and requires the cancel control and preview to disappear while the Help preview action remains visible. + Scoring never retries a tap. It requires the recorded-score label and disabled state before the next category, or Game Over after the last one. The generated command, native rectangles, chosen gesture, acknowledgment and ready-to-tap screenshot are retained. Only local device listing, inspection and command execution are allowed through this client. Child environment variables are allowlisted, protocol replies are size/time bounded, and raw replies containing injected environment fields are not logged. Transport and captured-geometry tests do not establish native-runtime acceptance. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. Maestro taps use accessibility text and test IDs. Score-scroll gestures derive from the current native viewport geometry, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. diff --git a/packages/game-engine/tests/nativePersistence.test.ts b/packages/game-engine/tests/nativePersistence.test.ts index 0939c5a..1fa3585 100644 --- a/packages/game-engine/tests/nativePersistence.test.ts +++ b/packages/game-engine/tests/nativePersistence.test.ts @@ -126,6 +126,33 @@ describe("durable native storage boundary, without a native-runtime claim", () = expect(await f.store.load()).toBe(true); }); + test("appearance enums reject coerced values and preserve the damaged document", async () => { + for (const appearance of [["system"], [["dark"]], ["light"], null, {}, true, 0]) { + const raw = JSON.stringify({ ...emptySave(), preferences: { ...emptySave().preferences, appearance } }); + expect(() => decodeSave(raw)).toThrow("Local save is damaged"); + const f = fixture({ [SAVE_KEY]: raw }); + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().data).toBeNull(); + expect(f.values.get(SAVE_KEY)).toBe(raw); + expect(f.state.attempts).toHaveLength(0); + } + }); + + test("game-status enums reject coerced values before exposing an unusable active game", async () => { + const valid = fixture(); await valid.store.load(); await valid.store.start(options); + const saved = valid.store.getSnapshot().data!; + for (const status of [["playing"], [["playing"]], ["finished"], null, {}, true, 0]) { + const raw = JSON.stringify({ ...saved, active: { ...saved.active!, game: { ...saved.active!.game, status } } }); + expect(() => decodeSave(raw)).toThrow("Local save is damaged"); + const f = fixture({ [SAVE_KEY]: raw }); + expect(await f.store.load()).toBe(false); + expect(f.store.getSnapshot().data).toBeNull(); + expect(await f.store.move({ kind: "roll" })).toBe(false); + expect(f.values.get(SAVE_KEY)).toBe(raw); + expect(f.state.attempts).toHaveLength(0); + } + }); + test("a failed first save or explicit reset can be retried without losing unapproved data", async () => { const f = fixture({ "yahtzee-theme": "dark" }); f.state.fail = "before"; diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index b018e9f..07cb49f 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -24,11 +24,13 @@ export function completeStartFlow(bundleId) { visible("Re-roll \\(1\\)"), command("waitForAnimationToEnd", { timeout: 5000 }), command("assertVisible", { id: "score-viewport" }), shot("ready-to-score")]); } export function completeEndFlow(bundleId, previewDiagnostics = false) { - return header(bundleId, [visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), + return header(bundleId, [command("launchApp", { stopApp: false, clearState: false, permissions: { all: "deny" } }), + visible("Game Over!"), shot("results"), tap("History"), visible("Local history"), shot("history"), command("launchApp", { permissions: { all: "deny" } }), scroll({ text: "Review saved result" }), tap("Review saved result"), visible("Game Over!"), tap("Help"), visible("How to play"), shot("help"), ...(previewDiagnostics ? [scroll({ text: "Preview diagnostics" }), tap("Preview diagnostics"), scroll({ id: "diagnostics-preview" }), - command("assertVisible", { id: "diagnostics-preview" }), shot("diagnostics-preview"), tap("Cancel preview")] : []), tap("Done"), + command("assertVisible", { id: "diagnostics-preview" }), shot("diagnostics-preview"), scroll({ text: "Cancel preview" }), tap("Cancel preview"), + command("assertNotVisible", "Cancel preview"), command("assertNotVisible", { id: "diagnostics-preview" }), visible("Preview diagnostics"), shot("diagnostics-cancelled")] : []), tap("Done"), scroll({ text: "Play Again" }), tap("Play Again"), scroll({ text: "Start Game" }), shot("play-again")]); } export function emptyRelaunchFlow(bundleId) { diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index 1b79716..9e8e5ce 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -41,11 +41,21 @@ test("generated flows use valid JSON-in-YAML commands and real semantic controls assert.equal(resumed[0].value.clearState, undefined); assert(resumed.some((step) => step.value?.text === "Resume Game")); const completed = parse(completeEndFlow("com.hemsoft.yahtzee")); + assert.deepEqual(completed[0], { command: "launchApp", value: { stopApp: false, clearState: false, permissions: { all: "deny" } } }); assert(completed.some((step) => step.command === "assertVisible" && step.value === "Game Over!")); const preview = parse(completeEndFlow("com.hemsoft.yahtzee", true)); assert(preview.some((step) => step.command === "assertVisible" && step.value?.id === "diagnostics-preview")); assert(preview.some((step) => step.value?.text === "Cancel preview")); }); +test("diagnostic cancellation scrolls to its action and requires the preview to disappear", () => { + const steps = parse(completeEndFlow("com.hemsoft.yahtzee", true)); + const cancel = steps.findIndex((step) => step.command === "tapOn" && step.value?.text === "Cancel preview"); + assert(cancel > 0); + assert.deepEqual(steps[cancel - 1], { command: "scrollUntilVisible", value: { element: { text: "Cancel preview" }, direction: "DOWN", timeout: 60000, visibilityPercentage: 100 } }); + assert.deepEqual(steps[cancel + 1], { command: "assertNotVisible", value: "Cancel preview" }); + assert.deepEqual(steps[cancel + 2], { command: "assertNotVisible", value: { id: "diagnostics-preview" } }); + assert.deepEqual(steps[cancel + 3], { command: "assertVisible", value: "Preview diagnostics" }); +}); test("native name entry submits the keyboard instead of issuing dismissal swipes", () => { const steps = parse(startFlow("com.hemsoft.yahtzee", scenarios[0])); assert(!steps.some((step) => step.command === "hideKeyboard")); diff --git a/scripts/ios-native/geometry.test.mjs b/scripts/ios-native/geometry.test.mjs index 1b38876..039b866 100644 --- a/scripts/ios-native/geometry.test.mjs +++ b/scripts/ios-native/geometry.test.mjs @@ -59,6 +59,7 @@ test("scoring repairs overshoot, taps once inside bounds, and requires applicati } }, capture: async () => {}, record: (item) => decisions.push(item), }); + assert.deepEqual(calls[0], [{ launchApp: { stopApp: false, clearState: false, permissions: { all: "deny" } } }]); assert.equal(taps, 1); assert(calls.some((commands) => commands[0].swipe)); assert.equal(decisions.at(-1).action, "acknowledged"); }); diff --git a/scripts/ios-native/scoring.mjs b/scripts/ios-native/scoring.mjs index 07f3ef2..8737a94 100644 --- a/scripts/ios-native/scoring.mjs +++ b/scripts/ios-native/scoring.mjs @@ -7,6 +7,7 @@ import { redactDriverLog } from "./driverLogs.mjs"; export async function scoreCategories({ categories, inspect, run, capture, record }) { assert(categories.length > 0 && categories.length <= 20 && new Set(categories).size === categories.length); + await run([{ launchApp: { stopApp: false, clearState: false, permissions: { all: "deny" } } }]); for (const [index, id] of categories.entries()) { assert(/^[a-z][a-z0-9-]*$/.test(id), "Invalid score identifier."); let ready = false; From d0bf9920c1c45bee83544dd30f06795a0fe52d0e Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Mon, 28 Sep 2026 01:17:42 -0400 Subject: [PATCH 11/13] fix: verify native dice reachability and saved effects --- apps/mobile/src/screens/Play.tsx | 8 +- docs/native-simulator.md | 14 +++- scripts/ios-native/dice.mjs | 48 +++++++++++ scripts/ios-native/dice.test.mjs | 115 +++++++++++++++++++++++++++ scripts/ios-native/flows.mjs | 3 +- scripts/ios-native/flows.test.mjs | 4 +- scripts/ios-native/geometry.mjs | 37 ++++++++- scripts/ios-native/geometry.test.mjs | 10 +++ scripts/ios-native/interaction.mjs | 41 ++++++++++ scripts/ios-native/run.mjs | 5 ++ scripts/ios-native/scoring.mjs | 41 +--------- 11 files changed, 276 insertions(+), 50 deletions(-) create mode 100644 scripts/ios-native/dice.mjs create mode 100644 scripts/ios-native/dice.test.mjs create mode 100644 scripts/ios-native/interaction.mjs diff --git a/apps/mobile/src/screens/Play.tsx b/apps/mobile/src/screens/Play.tsx index 2411ae1..e9c2b80 100644 --- a/apps/mobile/src/screens/Play.tsx +++ b/apps/mobile/src/screens/Play.tsx @@ -31,19 +31,19 @@ export function Play({ onPause }: { onPause: () => void }) { const expanded = width >= 820 && fontScale <= 1.4; const locked = view.busy || view.canRetry; const roll = - { void store.move({ kind: "roll" }); }} /> + { void store.move({ kind: "roll" }); }} /> ; const controls = <> ; - if (expanded) return + if (expanded) return - {controls}{roll} + {controls}{roll} ; - return + return {controls} {roll} ; diff --git a/docs/native-simulator.md b/docs/native-simulator.md index e9ad5b5..eca62df 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -39,15 +39,19 @@ Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. -Each start holds a die and rerolls. The runner reads the real app's SQLite document, terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase uses the same pinned Maestro binary's local stdio MCP session, with the viewer disabled. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the session has a ten-minute deadline and a bounded shutdown. +Each start holds a die and rerolls through a bounded local driver session. In expanded play, die gestures stay inside the left scroll pane; compact play uses the shared scroll pane. The die must fit fully inside that pane, and the fixed reroll action must fit inside the play area. Each action is tapped once, without retry. Holding must change only the held index and revision in the real SQLite document. Rerolling must preserve the held face and every other saved field except unheld dice, rolls remaining and revision. UI acknowledgments precede both saved-state comparisons. React Native's iOS checkbox exposes `checkbox, checked, Held` in its accessibility value; the pinned Maestro driver's generic `checked` boolean stays false for that element. + +The landscape phone failure that prompted this guard placed the die at y320..400 behind a footer action. Maestro reported full screen visibility, then its tap at130,360 rerolled instead of holding. The new driver uses the actual pane bounds and checks the persisted effect before any next action. A contract regression and captured-geometry tests cover this failure. They do not substitute for the required native run. + +The runner then terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase uses the same pinned Maestro binary's local stdio MCP session, with the viewer disabled. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the session has a ten-minute deadline and a bounded shutdown. This replaces `centerElement`, which accepted One Pair after a swipe moved it behind the toolbar and the tap opened Help. The pinned driver uses a one-sided screen threshold, not scroll-view containment. Its `above` and `below` selectors also compare top positions, not full rectangles. Slowing that gesture alone would leave the unsafe reachability assumption intact. -A new scoring or results driver explicitly foregrounds the existing app with `launchApp`, `stopApp: false` and `clearState: false`. It does not assume input focus survives the preceding driver session, restart gameplay or reset saved data. All permissions remain denied. This startup contract still needs the native interaction assertions; foregrounding alone is not proof that a tap worked. Diagnostic cancellation scrolls to its action and requires the cancel control and preview to disappear while the Help preview action remains visible. +Each dice, scoring or results driver explicitly foregrounds the existing app with `launchApp`, `stopApp: false` and `clearState: false`. It does not assume input focus survives the preceding driver session, restart gameplay or reset saved data. All permissions remain denied. This startup contract still needs the native interaction assertions; foregrounding alone is not proof that a tap worked. Diagnostic cancellation scrolls to its action and requires the cancel control and preview to disappear while the Help preview action remains visible. Scoring never retries a tap. It requires the recorded-score label and disabled state before the next category, or Game Over after the last one. The generated command, native rectangles, chosen gesture, acknowledgment and ready-to-tap screenshot are retained. Only local device listing, inspection and command execution are allowed through this client. Child environment variables are allowlisted, protocol replies are size/time bounded, and raw replies containing injected environment fields are not logged. Transport and captured-geometry tests do not establish native-runtime acceptance. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. -Maestro taps use accessibility text and test IDs. Score-scroll gestures derive from the current native viewport geometry, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. +Maestro taps use accessibility text and test IDs. Die and score gestures derive from the current native viewport geometry, not screenshot-coordinate guesses. Screenshots cover setup, held/rerolled play, resume, results, history, help, diagnostic preview, Play Again and recovery. A simulator recording covers the first scenario, including its completion phase. The status bar is standardized to 9:41 for captures. Test names are synthetic. This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad Stage Manager window-resize or signed-distribution acceptance. Browser-adapter results do not substitute for the native run. Review actual screenshots in one batch, apply one layout correction batch, then confirm. Functional failures still require diagnosis. @@ -55,6 +59,8 @@ This is not airplane-mode, hardware durability, VoiceOver, Switch Control, iPad `reports/native-evidence/manifest.json` records the exact checked-out source commit, toolchain, runner, device/runtime, scenarios, timestamps and SHA-256 hashes of retained artifacts. Pull requests check out their exact head for native captures. The runner freezes working files from `reports/native` into `reports/native-evidence` before hashing and upload. Size and hash come from the same copied bytes. Later writes from detached XCTest processes cannot change that snapshot. An always-run workflow step also freezes partial receipts when execution ends early. The required quality gate includes every native job. A screenshot file's existence alone is not visual review or release approval. -The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. The scoring client also retains bounded, redacted stderr and the latest native hierarchy; it captures the screen on failure without repeating a scoring action. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. +The build artifact includes the unsigned simulator app, native dependency lock, compiled Info.plist and privacy inspection. Each test-group artifact includes screenshots, a recording, test reports, synthetic database snapshots and the verified build reference. Raw hidden debug trees are excluded by the uploader and the published hash inventory. Known Maestro driver logs are copied into ordinary artifact files after credential-value/header redaction, including on failure. The interaction client also retains bounded, redacted stderr and the latest native hierarchy; it captures the screen on failure without repeating a hold, reroll or scoring action. DerivedData and installed Pods are not uploaded. Retention is one day to keep storage bounded. Download current-head evidence before it expires, inspect it, and attach the selected images and recording to the PR's Validation section. + +These engineering PNGs can contain alpha channels even when every pixel is opaque. They are not ready for App Store upload merely because a native test passed. See [screenshot validation](ios-screenshot-validation.md) for the separate format checks and remaining capture requirements. References: [GitHub macOS 26 runner inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md), [Maestro local CLI](https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md), [Expo SQLite](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/). diff --git a/scripts/ios-native/dice.mjs b/scripts/ios-native/dice.mjs new file mode 100644 index 0000000..c5c7112 --- /dev/null +++ b/scripts/ios-native/dice.mjs @@ -0,0 +1,48 @@ +import assert from "node:assert/strict"; +import { assertHeld, diePosition, rollPosition, screenElements, uniqueElement } from "./geometry.mjs"; +import { nativeInteraction } from "./interaction.mjs"; + +async function reach(kind, position, { inspect, run, record }) { + for (let attempt = 0; attempt < 30; attempt++) { + await run([{ waitForAnimationToEnd: { timeout: 5000 } }]); + const decision = position(await inspect()); record({ kind, attempt, ...decision }); + if (decision.action === "tap") return; + if (decision.action === "swipe") await run([{ swipe: { start: decision.start, end: decision.end, duration: decision.duration } }]); + } + throw new Error(`Native ${kind} did not become reachable within 30 inspections.`); +} + +/** Never retry a toggle or a random roll. Check UI acknowledgment and exact saved effects. */ +export async function holdAndReroll({ readSave, ...io }) { + const { inspect, run, capture, record } = io; + await run([{ launchApp: { stopApp: false, clearState: false, permissions: { all: "deny" } } }, + { extendedWaitUntil: { visible: { id: "reroll-action", text: "Re-roll \\(2\\)" }, timeout: 15000 } }]); + const before = await readSave("before-hold"); + assert.equal(before.active?.revision, 0, "Expected a newly started game."); + assert.equal(before.active.game.rollsLeft, 2); assert.deepEqual(before.active.game.held, []); + await reach("die", diePosition, io); await capture("die-ready"); + await run([{ tapOn: { id: "die-0", enabled: true, retryTapIfNoChange: false } }, + { extendedWaitUntil: { visible: { id: "die-0", text: ".*checked, Held" }, timeout: 15000 } }]); + assertHeld(await inspect()); + const held = await readSave("after-hold"), expected = structuredClone(before); + expected.active.game.held = [0]; expected.active.revision++; + assert.deepEqual(held, expected, "Holding must change only the held index and revision."); + record({ kind: "die", action: "acknowledged", revision: held.active.revision }); + await reach("reroll", rollPosition, io); await capture("reroll-ready"); + await run([{ tapOn: { id: "reroll-action", enabled: true, retryTapIfNoChange: false } }, + { extendedWaitUntil: { visible: { id: "reroll-action", text: "Re-roll \\(1\\)" }, timeout: 15000 } }]); + const afterScreen = await inspect(); assertHeld(afterScreen); + assert.equal(uniqueElement(screenElements(afterScreen), "reroll-action").a11y, "Re-roll (1)", "Native reroll was not acknowledged."); + const rolled = await readSave("after-reroll"), dice = rolled.active.game.dice; + assert.equal(dice.length, before.active.game.dice.length); + assert(dice.every((face) => Number.isInteger(face) && face >= 1 && face <= 6)); + assert.equal(dice[0], before.active.game.dice[0], "Reroll changed the held die."); + expected.active.game.dice = dice; expected.active.game.rollsLeft = 1; expected.active.revision++; + assert.deepEqual(rolled, expected, "Reroll must preserve all other saved state."); + record({ kind: "reroll", action: "acknowledged", revision: rolled.active.revision }); + await capture("held-and-rerolled"); +} + +export function nativeDice({ readSave, ...options }) { + return nativeInteraction({ ...options, prefix: "hold", exercise: (io) => holdAndReroll({ readSave, ...io }) }); +} diff --git a/scripts/ios-native/dice.test.mjs b/scripts/ios-native/dice.test.mjs new file mode 100644 index 0000000..735a31a --- /dev/null +++ b/scripts/ios-native/dice.test.mjs @@ -0,0 +1,115 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { diePosition, rollPosition, assertHeld } from "./geometry.mjs"; +import { holdAndReroll } from "./dice.mjs"; + +function screen(top = 320, held = false, rolls = 2) { + // Bounds from the 930a70 phone-five landscape failure. The original die tap + // at130,360 struck the fixed reroll button despite 100% screen visibility. + return { ui_schema: { platform: "ios", defaults: { enabled: true, checked: false } }, elements: [ + { rid: "play-viewport", b: "[62,126][812,381]", c: [ + { rid: "dice-viewport", b: "[62,126][402,314]", c: [ + { rid: "die-0", b: `[102,${top}][158,${top + 80}]`, val: held ? "checkbox, checked, Held" : "checkbox, unchecked, Not held", checked: false }, + ] }, + { rid: "score-viewport", b: "[402,126][812,381]" }, + { rid: "reroll-action", b: "[82,322][382,370]", a11y: `Re-roll (${rolls})` }, + ] }, + ] }; +} +const nodes = (value) => value.elements[0].c; + +test("a die behind the reroll footer requires a swipe inside the left pane", () => { + const decision = diePosition(screen()); + assert.equal(decision.action, "swipe"); assert.equal(decision.direction, "down"); + assert.equal(Number(decision.start.split(",")[0]), 232); + for (const point of [decision.start, decision.end]) { + const [x, y] = point.split(",").map(Number); + assert(x > 62 && x < 402 && y > 126 && y < 314); + } + assert.equal(diePosition(screen(180)).action, "tap"); + assert.equal(diePosition(screen(100)).direction, "up"); +}); +test("compact play uses the shared viewport and held acknowledgment uses native value", () => { + const compact = screen(180); nodes(compact)[0].rid = "score-viewport"; nodes(compact).splice(1, 1); + assert.equal(diePosition(compact).action, "tap"); + assertHeld(screen(180, true)); // Maestro's checked boolean is false for this RN checkbox. + assert.throws(() => assertHeld(screen(180)), /not acknowledged/); + assert.throws(() => diePosition(screen(180, true)), /already-held/); +}); +test("die and reroll geometry fails closed on unrelated, clipped, duplicate or malformed targets", () => { + const unrelated = screen(180), die = nodes(unrelated)[0].c.pop(); nodes(unrelated).push(die); + assert.throws(() => diePosition(unrelated), /outside its scroll view/); + const duplicate = screen(180); nodes(duplicate)[0].c.push({ ...nodes(duplicate)[0].c[0] }); + assert.throws(() => diePosition(duplicate), /found 2/); + const clipped = screen(180); nodes(clipped)[0].b = "[62,100][402,314]"; + assert.throws(() => diePosition(clipped), /outside the play area/); + const small = screen(180); nodes(small)[0].b = "[62,126][402,215]"; + assert.throws(() => diePosition(small), /too small/); + const bad = screen(180); nodes(bad)[0].c[0].enabled = "true"; + assert.throws(() => diePosition(bad), /Invalid die enabled/); + const disabled = screen(180); nodes(disabled)[0].c[0].enabled = false; + assert.equal(diePosition(disabled).action, "wait"); + assert.equal(rollPosition(screen(180)).action, "tap"); + assert.throws(() => rollPosition(screen(180, false, 1)), /Unexpected reroll/); + const hiddenRoll = screen(180); nodes(hiddenRoll)[2].b = "[82,360][382,408]"; + assert.throws(() => rollPosition(hiddenRoll), /outside the play area/); +}); + +function harness(options = {}) { + let top = 320, held = false, rolls = 2, inspections = 0; + const data = { preferences: { name: "Fixture" }, active: { revision: 0, game: { id: "fixture", dice: [5, 2, 3, 4, 6], held: [], rollsLeft: 2 } } }; + const calls = [], taps = [], stages = [], records = []; + return { calls, taps, stages, records, inspections: () => inspections, + io: { + inspect: async () => { inspections++; return screen(top, held, rolls); }, + run: async (commands) => { + calls.push(commands); + const swipe = commands[0].swipe; + if (swipe && !options.stuck) top += Number(swipe.end.split(",")[1]) - Number(swipe.start.split(",")[1]); + const tap = commands[0].tapOn; + if (!tap) return; + assert.equal(tap.retryTapIfNoChange, false); taps.push(tap.id); + if (tap.id === "die-0") { + assert.equal(diePosition(screen(top)).action, "tap"); + held = !options.noAcknowledgment; data.active.revision++; + if (options.wrongHoldSave) data.active.game.rollsLeft--; + else data.active.game.held = [0]; + } else { + assert.equal(tap.id, "reroll-action"); rolls = 1; + data.active.game.rollsLeft = 1; data.active.revision++; + if (options.changeHeldDie) data.active.game.dice[0] = 6; + if (options.changeOtherData) data.preferences.name = "Unexpected change"; + } + }, + readSave: async (stage) => { stages.push(stage); return structuredClone(data); }, + capture: async () => {}, record: (value) => records.push(value), + }, + }; +} +test("holding and rerolling tap once each after containment and verify exact saved effects", async () => { + const flow = harness(); await holdAndReroll(flow.io); + assert.deepEqual(flow.taps, ["die-0", "reroll-action"]); + assert.deepEqual(flow.calls[0][0], { launchApp: { stopApp: false, clearState: false, permissions: { all: "deny" } } }); + assert.deepEqual(flow.stages, ["before-hold", "after-hold", "after-reroll"]); + assert.equal(flow.records.filter((item) => item.action === "acknowledged").length, 2); + // Unheld random dice may legitimately roll the same faces again. +}); +test("missing UI or save acknowledgment never retries the hold or advances to reroll", async () => { + for (const options of [{ noAcknowledgment: true }, { wrongHoldSave: true }]) { + const flow = harness(options); + await assert.rejects(holdAndReroll(flow.io), /not acknowledged|Holding must change/); + assert.deepEqual(flow.taps, ["die-0"]); + } +}); +test("reroll must retain the held die and every unrelated saved field", async () => { + for (const options of [{ changeHeldDie: true }, { changeOtherData: true }]) { + const flow = harness(options); + await assert.rejects(holdAndReroll(flow.io), /changed the held die|preserve all other/); + assert.deepEqual(flow.taps, ["die-0", "reroll-action"]); + } +}); +test("stuck dice geometry is bounded without any speculative tap", async () => { + const flow = harness({ stuck: true }); + await assert.rejects(holdAndReroll(flow.io), /30 inspections/); + assert.equal(flow.inspections(), 30); assert.deepEqual(flow.taps, []); +}); diff --git a/scripts/ios-native/flows.mjs b/scripts/ios-native/flows.mjs index 07cb49f..9d6bfe3 100644 --- a/scripts/ios-native/flows.mjs +++ b/scripts/ios-native/flows.mjs @@ -12,8 +12,7 @@ export function startFlow(bundleId, scenario) { scroll({ text: "Your name" }), tap("Your name"), command("eraseText"), command("inputText", "Local tester"), command("pressKey", "enter"), scroll({ text: "AI opponents" }), tap("AI opponents"), tap(scenario.ai ? "3 AI" : "Solo"), scroll({ text: "Dice count" }), tap("Dice count"), tap(`${scenario.dice} dice`), - scroll({ text: "Start Game" }), tap("Start Game"), - scroll({ id: "die-0" }), command("tapOn", { id: "die-0" }), tap("Re-roll \\(2\\)"), visible("Re-roll \\(1\\)"), shot("held-and-rerolled")]); + scroll({ text: "Start Game" }), tap("Start Game"), visible("Re-roll \\(2\\)"), shot("started-game")]); } export function resumeFlow(bundleId) { return header(bundleId, [command("launchApp", { permissions: { all: "deny" } }), diff --git a/scripts/ios-native/flows.test.mjs b/scripts/ios-native/flows.test.mjs index 9e8e5ce..1b400b3 100644 --- a/scripts/ios-native/flows.test.mjs +++ b/scripts/ios-native/flows.test.mjs @@ -34,8 +34,8 @@ test("generated flows use valid JSON-in-YAML commands and real semantic controls const steps = parse(startFlow("com.hemsoft.yahtzee", scenario)); assert.deepEqual(steps[0].value, { clearState: true, permissions: { all: "deny" } }); assert(steps.some((step) => step.command === "tapOn" && step.value?.text === `${scenario.dice} dice`)); - assert(steps.some((step) => step.command === "tapOn" && step.value?.id === "die-0")); - assert(steps.some((step) => step.command === "assertVisible" && new RegExp(step.value).test("Re-roll (1)"))); + assert(!steps.some((step) => step.command === "tapOn" && step.value?.id === "die-0")); + assert(steps.some((step) => step.command === "assertVisible" && new RegExp(step.value).test("Re-roll (2)"))); } const resumed = parse(resumeFlow("com.hemsoft.yahtzee")); assert.equal(resumed[0].value.clearState, undefined); diff --git a/scripts/ios-native/geometry.mjs b/scripts/ios-native/geometry.mjs index d551475..27f9503 100644 --- a/scripts/ios-native/geometry.mjs +++ b/scripts/ios-native/geometry.mjs @@ -54,10 +54,14 @@ export function scorePosition(screen, id, categories) { if (target) direction = target.rect.top < viewport.top + 8 ? "up" : "down"; else if (visible.length === 0 || index > Math.max(...visible)) direction = "down"; else { assert(index < Math.min(...visible), "Missing target among visible score rows."); direction = "up"; } + return viewportSwipe(viewport, target?.rect ?? null, id, direction); +} + +function viewportSwipe(viewport, target, id, direction) { const distance = Math.round(viewport.height * 0.18); const x = Math.round((viewport.left + viewport.right) / 2), middle = (viewport.top + viewport.bottom) / 2; const delta = direction === "down" ? distance : -distance; - return { action: "swipe", id, viewport, target: target?.rect ?? null, direction, + return { action: "swipe", id, viewport, target, direction, start: `${x},${Math.round(middle + delta / 2)}`, end: `${x},${Math.round(middle - delta / 2)}`, duration: 1000 }; } @@ -66,3 +70,34 @@ export function assertRecorded(screen, id) { assert.match(node.a11y ?? "", /points recorded/, `Native score ${id} was not acknowledged.`); assert.equal(node.enabled, false, "Recorded score must no longer accept input."); } + +export function diePosition(screen) { + const elements = screenElements(screen); + const root = uniqueElement(elements, "play-viewport"); + const viewportNode = uniqueElement(elements, "dice-viewport", false) ?? uniqueElement(elements, "score-viewport"); + const viewport = viewportNode.rect, target = uniqueElement(elements, "die-0"); + assert(viewportNode.parents.includes(root) && within(viewport, root.rect, 0), "Dice viewport is outside the play area."); + assert(viewport.width >= 80 && viewport.height >= 100, "Dice viewport is too small to exercise."); + assert(target.parents.includes(viewportNode), "Die is outside its scroll view."); + assert(target.enabled === true || target.enabled === false, "Invalid die enabled state."); + if (!target.enabled) return { action: "wait", viewport, target: target.rect }; + assert.equal(target.val, "checkbox, unchecked, Not held", "Refusing to toggle an already-held or unknown die state."); + assert(target.rect.width <= viewport.width && target.rect.height <= viewport.height - 16, "Die cannot fit in its viewport."); + if (within(target.rect, viewport)) return { action: "tap", viewport, target: target.rect }; + return viewportSwipe(viewport, target.rect, "die-0", target.rect.top < viewport.top + 8 ? "up" : "down"); +} + +export function rollPosition(screen) { + const elements = screenElements(screen), root = uniqueElement(elements, "play-viewport"), target = uniqueElement(elements, "reroll-action"); + assert(target.parents.includes(root) && within(target.rect, root.rect), "Reroll is outside the play area."); + assert.equal(target.a11y, "Re-roll (2)", "Unexpected reroll state before the single tap."); + assert(target.enabled === true || target.enabled === false, "Invalid reroll enabled state."); + return { action: target.enabled ? "tap" : "wait", viewport: root.rect, target: target.rect }; +} + +export function assertHeld(screen) { + const node = uniqueElement(screenElements(screen), "die-0"); + // RN's iOS checkbox exposes its state in value; Maestro's generic checked + // boolean remains false. Both forms were inspected in actual native evidence. + assert.equal(node.val, "checkbox, checked, Held", "Native die hold was not acknowledged."); +} diff --git a/scripts/ios-native/geometry.test.mjs b/scripts/ios-native/geometry.test.mjs index 039b866..6b1311b 100644 --- a/scripts/ios-native/geometry.test.mjs +++ b/scripts/ios-native/geometry.test.mjs @@ -16,6 +16,16 @@ test("the actual scoring caller uses the viewport-aware driver in both layouts", assert.match(runner, /await nativeScoring\(/); assert.doesNotMatch(runner, /completeFlow\(/); }); +test("dice and reroll interactions expose their own bounds and use the checked driver", () => { + const play = readFileSync(new URL("../../apps/mobile/src/screens/Play.tsx", import.meta.url), "utf8"); + assert.match(play, /testID="dice-viewport"/); + assert.equal((play.match(/testID="play-viewport"/g) ?? []).length, 2); + assert.match(play, /testID="reroll-action"/); + const runner = readFileSync(new URL("./run.mjs", import.meta.url), "utf8"); + assert.match(runner, /await nativeDice\(/); + const flows = readFileSync(new URL("./flows.mjs", import.meta.url), "utf8"); + assert.doesNotMatch(flows, /tapOn.*id: "die-0"/); +}); test("captured footer and toolbar overshoots do not count as reachable scores", () => { // Captured row bounds from 027459 and 22d76f2; viewport is a representative phone fixture. const footer = scorePosition(screen([row("ones", 750)]), "ones", ["ones"]); diff --git a/scripts/ios-native/interaction.mjs b/scripts/ios-native/interaction.mjs new file mode 100644 index 0000000..0a345ec --- /dev/null +++ b/scripts/ios-native/interaction.mjs @@ -0,0 +1,41 @@ +import assert from "node:assert/strict"; +import { appendFileSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; +import { localMaestro } from "./mcp.mjs"; +import { redactDriverLog } from "./driverLogs.mjs"; + +/** One bounded local driver session for the owned simulator. */ +export async function nativeInteraction({ device, bundleId, directory, prefix, env, capture, exercise }) { + assert(["complete", "hold"].includes(prefix), "Unknown native interaction phase."); + let diagnostics = "", sequence = 0; + const deadline = Date.now() + 600000; + const childEnv = Object.fromEntries(Object.entries(env).filter(([key]) => + /^(PATH|HOME|USER|LOGNAME|SHELL|TMPDIR|TMP|TEMP|JAVA_HOME|DEVELOPER_DIR|LANG|LC_ALL|MAESTRO_CLI_NO_ANALYTICS|MAESTRO_DISABLE_UPDATE_CHECK|MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED|MAESTRO_DRIVER_STARTUP_TIMEOUT)$/.test(key))); + let client; + async function call(name, args) { assert(Date.now() < deadline, "Native interaction exceeded ten minutes."); return client.call(name, args); } + async function inspect() { + const screen = await call("inspect_screen", { device_id: device }); + writeFileSync(join(directory, `${prefix}-screen-latest.json`), JSON.stringify(screen, null, 2) + "\n"); + return screen; + } + async function run(commands) { + const yaml = `appId: ${JSON.stringify(bundleId)}\n---\n` + commands.map((command) => { + const [[name, value]] = Object.entries(command); return `- ${name}: ${JSON.stringify(value)}`; + }).join("\n") + "\n"; + writeFileSync(join(directory, `${prefix}-step-${String(++sequence).padStart(3, "0")}.yaml`), yaml); + const result = await call("run", { device_id: device, yaml }); + assert.equal(result.success, true, "Native interaction command failed."); + } + try { + client = await localMaestro({ cwd: directory, env: childEnv, deadline, onStderr: (text) => { diagnostics += text.slice(0, Math.max(0, 262144 - diagnostics.length)); } }); + const devices = await call("list_devices", {}); + assert(devices.devices?.some((item) => item.device_id === device && item.platform === "ios" && item.connected === true), "Owned simulator is not connected to Maestro."); + await exercise({ inspect, run, capture, record: (value) => appendFileSync(join(directory, `${prefix}-geometry.jsonl`), JSON.stringify(value) + "\n") }); + } catch (error) { + try { await capture(`${prefix}-failure`); } catch { /* Preserve the original error; the runner also reads the saved document. */ } + throw error; + } finally { + try { await client?.close(); } + finally { writeFileSync(join(directory, `${prefix}-mcp.log`), redactDriverLog(diagnostics, env)); } + } +} diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index 06a293b..433a398 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -8,6 +8,7 @@ import { getScorecardCategories } from "../../packages/game-engine/src/presentat import { decodeSave } from "../../apps/mobile/src/local/save.ts"; import { startFlow, resumeFlow, completeStartFlow, completeEndFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; import { nativeScoring } from "./scoring.mjs"; +import { nativeDice } from "./dice.mjs"; import { buildSimulator } from "./build.mjs"; import { loadBuiltSimulator } from "./artifact.mjs"; import { retainDriverLogs } from "./driverLogs.mjs"; @@ -130,6 +131,10 @@ async function exercise(app, bundleId) { receipt.phase = `start-${scenario.id}`; checkpoint(); if (index === 0) recording = spawn("xcrun", ["simctl", "io", device, "recordVideo", "--codec=h264", join(directory, "native-resume.mp4")], { env, stdio: "ignore" }); flow(device, directory, "start", startFlow(bundleId, scenario)); + receipt.phase = `hold-${scenario.id}`; checkpoint(); + await nativeDice({ device, bundleId, directory, env, + capture: (name) => sim("io", device, "screenshot", join(directory, `${name}.png`)), + readSave: (stage) => saved(device, bundleId, directory, stage).data }); const before = saved(device, bundleId, directory, "before-relaunch"); assert.equal(before.data.active.game.diceCount, scenario.dice); assert.equal(before.data.active.game.players.length, scenario.ai + 1); assert.deepEqual(before.data.active.game.held, [0]); assert.equal(before.data.active.game.rollsLeft, 1); diff --git a/scripts/ios-native/scoring.mjs b/scripts/ios-native/scoring.mjs index 8737a94..1fb9b25 100644 --- a/scripts/ios-native/scoring.mjs +++ b/scripts/ios-native/scoring.mjs @@ -1,9 +1,6 @@ import assert from "node:assert/strict"; -import { appendFileSync, writeFileSync } from "node:fs"; -import { join } from "node:path"; import { scorePosition, assertRecorded, screenElements } from "./geometry.mjs"; -import { localMaestro } from "./mcp.mjs"; -import { redactDriverLog } from "./driverLogs.mjs"; +import { nativeInteraction } from "./interaction.mjs"; export async function scoreCategories({ categories, inspect, run, capture, record }) { assert(categories.length > 0 && categories.length <= 20 && new Set(categories).size === categories.length); @@ -29,37 +26,7 @@ export async function scoreCategories({ categories, inspect, run, capture, recor } } -/** Local-only transport around the pinned Maestro driver. No cloud calls or extra service. */ -export async function nativeScoring({ device, bundleId, directory, categories, env, capture }) { - let diagnostics = "", sequence = 0; - const deadline = Date.now() + 600000; - const childEnv = Object.fromEntries(Object.entries(env).filter(([key]) => - /^(PATH|HOME|USER|LOGNAME|SHELL|TMPDIR|TMP|TEMP|JAVA_HOME|DEVELOPER_DIR|LANG|LC_ALL|MAESTRO_CLI_NO_ANALYTICS|MAESTRO_DISABLE_UPDATE_CHECK|MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED|MAESTRO_DRIVER_STARTUP_TIMEOUT)$/.test(key))); - let client; - async function call(name, args) { assert(Date.now() < deadline, "Native scoring exceeded ten minutes."); return client.call(name, args); } - async function inspect() { - const screen = await call("inspect_screen", { device_id: device }); - writeFileSync(join(directory, "complete-screen-latest.json"), JSON.stringify(screen, null, 2) + "\n"); - return screen; - } - async function run(commands) { - const yaml = `appId: ${JSON.stringify(bundleId)}\n---\n` + commands.map((command) => { - const [[name, value]] = Object.entries(command); return `- ${name}: ${JSON.stringify(value)}`; - }).join("\n") + "\n"; - writeFileSync(join(directory, `complete-step-${String(++sequence).padStart(3, "0")}.yaml`), yaml); - const result = await call("run", { device_id: device, yaml }); - assert.equal(result.success, true, "Native scoring command failed."); - } - try { - client = await localMaestro({ cwd: directory, env: childEnv, deadline, onStderr: (text) => { diagnostics += text.slice(0, Math.max(0, 262144 - diagnostics.length)); } }); - const devices = await call("list_devices", {}); - assert(devices.devices?.some((item) => item.device_id === device && item.platform === "ios" && item.connected === true), "Owned simulator is not connected to Maestro."); - await scoreCategories({ categories, inspect, run, capture, record: (value) => appendFileSync(join(directory, "complete-geometry.jsonl"), JSON.stringify(value) + "\n") }); - } catch (error) { - try { await capture("complete-failure"); } catch { /* Preserve the original failure; the runner also attempts a read-only save snapshot. */ } - throw error; - } finally { - try { await client?.close(); } - finally { writeFileSync(join(directory, "complete-mcp.log"), redactDriverLog(diagnostics, env)); } - } +/** Scoring keeps its own application acknowledgments within the shared bounded session. */ +export function nativeScoring({ categories, ...options }) { + return nativeInteraction({ ...options, prefix: "complete", exercise: (io) => scoreCategories({ categories, ...io }) }); } From e501555187749533c48f0aac25550f0b09072d1a Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Mon, 28 Sep 2026 01:45:52 -0400 Subject: [PATCH 12/13] fix: handle native accessibility play marker siblings --- docs/native-simulator.md | 2 ++ scripts/ios-native/dice.test.mjs | 16 ++++++++++++++ .../fixtures/play-accessibility-siblings.json | 22 +++++++++++++++++++ scripts/ios-native/geometry.mjs | 11 ++++++++-- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 scripts/ios-native/fixtures/play-accessibility-siblings.json diff --git a/docs/native-simulator.md b/docs/native-simulator.md index eca62df..9c6be10 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -43,6 +43,8 @@ Each start holds a die and rerolls through a bounded local driver session. In ex The landscape phone failure that prompted this guard placed the die at y320..400 behind a footer action. Maestro reported full screen visibility, then its tap at130,360 rerolled instead of holding. The new driver uses the actual pane bounds and checks the persisted effect before any next action. A contract regression and captured-geometry tests cover this failure. They do not substitute for the required native run. +The native accessibility hierarchy exposes the play View's test ID as a leaf beside its children. Ownership checks therefore accept real ancestry or this leaf-marker shape in the same immediate container, always with full geometric containment. They do not accept a marker from another container. The die must still descend from its actual scroll view. A retained native hierarchy excerpt tests this distinction; the earlier ancestry-only guard stopped all four groups before any hold tap. + The runner then terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase uses the same pinned Maestro binary's local stdio MCP session, with the viewer disabled. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the session has a ten-minute deadline and a bounded shutdown. This replaces `centerElement`, which accepted One Pair after a swipe moved it behind the toolbar and the tap opened Help. The pinned driver uses a one-sided screen threshold, not scroll-view containment. Its `above` and `below` selectors also compare top positions, not full rectangles. Slowing that gesture alone would leave the unsafe reachability assumption intact. diff --git a/scripts/ios-native/dice.test.mjs b/scripts/ios-native/dice.test.mjs index 735a31a..3a84cc5 100644 --- a/scripts/ios-native/dice.test.mjs +++ b/scripts/ios-native/dice.test.mjs @@ -1,5 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; +import { readFileSync } from "node:fs"; import { diePosition, rollPosition, assertHeld } from "./geometry.mjs"; import { holdAndReroll } from "./dice.mjs"; @@ -55,6 +56,21 @@ test("die and reroll geometry fails closed on unrelated, clipped, duplicate or m assert.throws(() => rollPosition(hiddenRoll), /outside the play area/); }); +test("native flattened play markers require the same immediate accessibility container", () => { + const native = JSON.parse(readFileSync(new URL("./fixtures/play-accessibility-siblings.json", import.meta.url), "utf8")); + assert.equal(diePosition(native).action, "tap"); + assert.equal(rollPosition(native).action, "tap"); + const detached = structuredClone(native); + const marker = detached.elements[0].c.splice(1, 1)[0]; + detached.elements.push({ b: detached.elements[0].b, c: [marker] }); + assert.throws(() => diePosition(detached), /outside the play area/); + assert.throws(() => rollPosition(detached), /outside the play area/); + const outsideScroll = structuredClone(native); + const pane = outsideScroll.elements[0].c[0], content = pane.c[0].c[0].c[0]; + outsideScroll.elements[0].c.push(content.c.pop()); + assert.throws(() => diePosition(outsideScroll), /outside its scroll view/); +}); + function harness(options = {}) { let top = 320, held = false, rolls = 2, inspections = 0; const data = { preferences: { name: "Fixture" }, active: { revision: 0, game: { id: "fixture", dice: [5, 2, 3, 4, 6], held: [], rollsLeft: 2 } } }; diff --git a/scripts/ios-native/fixtures/play-accessibility-siblings.json b/scripts/ios-native/fixtures/play-accessibility-siblings.json new file mode 100644 index 0000000..503e73d --- /dev/null +++ b/scripts/ios-native/fixtures/play-accessibility-siblings.json @@ -0,0 +1,22 @@ +{ + "provenance": { + "source": "8fbf38678d536e0fa51b3c987ea84e9b428a89cf", + "run": "https://github.com/HemSoft/yahtzee/actions/runs/36381288453", + "scenario": "phone-6-solo-dark", + "note": "Relevant branches of hold-screen-latest.json. The play marker and its controls are accessibility siblings." + }, + "ui_schema": { "platform": "ios", "defaults": { "enabled": true, "checked": false } }, + "elements": [{ + "b": "[0,116][402,874]", + "c": [ + { + "rid": "score-viewport", "b": "[0,164][402,772]", + "c": [{ "b": "[0,164][402,772]", "c": [{ "b": "[0,164][402,2095]", "c": [{ "b": "[0,164][402,2095]", "c": [ + { "rid": "die-0", "b": "[71,358][127,438]", "a11y": "Die 1, showing 4", "val": "checkbox, unchecked, Not held" } + ] }] }] }] + }, + { "rid": "play-viewport", "b": "[0,164][402,840]" }, + { "rid": "reroll-action", "b": "[20,780][382,828]", "a11y": "Re-roll (2)" } + ] + }] +} diff --git a/scripts/ios-native/geometry.mjs b/scripts/ios-native/geometry.mjs index 27f9503..0f910b6 100644 --- a/scripts/ios-native/geometry.mjs +++ b/scripts/ios-native/geometry.mjs @@ -71,12 +71,19 @@ export function assertRecorded(screen, id) { assert.equal(node.enabled, false, "Recorded score must no longer accept input."); } +function inPlayHierarchy(node, root) { + if (node.parents.includes(root)) return true; + // iOS exposes this nonaccessible RN View's testID as a leaf sibling of its + // children. Accept that observed shape only inside the same direct container. + return !root.c?.length && root.parents.length > 0 && node.parents.at(-1) === root.parents.at(-1); +} + export function diePosition(screen) { const elements = screenElements(screen); const root = uniqueElement(elements, "play-viewport"); const viewportNode = uniqueElement(elements, "dice-viewport", false) ?? uniqueElement(elements, "score-viewport"); const viewport = viewportNode.rect, target = uniqueElement(elements, "die-0"); - assert(viewportNode.parents.includes(root) && within(viewport, root.rect, 0), "Dice viewport is outside the play area."); + assert(inPlayHierarchy(viewportNode, root) && within(viewport, root.rect, 0), "Dice viewport is outside the play area."); assert(viewport.width >= 80 && viewport.height >= 100, "Dice viewport is too small to exercise."); assert(target.parents.includes(viewportNode), "Die is outside its scroll view."); assert(target.enabled === true || target.enabled === false, "Invalid die enabled state."); @@ -89,7 +96,7 @@ export function diePosition(screen) { export function rollPosition(screen) { const elements = screenElements(screen), root = uniqueElement(elements, "play-viewport"), target = uniqueElement(elements, "reroll-action"); - assert(target.parents.includes(root) && within(target.rect, root.rect), "Reroll is outside the play area."); + assert(inPlayHierarchy(target, root) && within(target.rect, root.rect), "Reroll is outside the play area."); assert.equal(target.a11y, "Re-roll (2)", "Unexpected reroll state before the single tap."); assert(target.enabled === true || target.enabled === false, "Invalid reroll enabled state."); return { action: target.enabled ? "tap" : "wait", viewport: root.rect, target: target.rect }; From 86011d88d87b264e7b3b09011527842321de1c2b Mon Sep 17 00:00:00 2001 From: Franz Hemmer Date: Wed, 30 Sep 2026 20:18:37 -0400 Subject: [PATCH 13/13] test: keep native scenarios in one bounded driver session --- docs/native-simulator.md | 6 +- scripts/ios-native/dice.mjs | 5 -- scripts/ios-native/geometry.test.mjs | 9 ++- scripts/ios-native/interaction.mjs | 18 +++--- scripts/ios-native/interaction.test.mjs | 64 ++++++++++++++++++++ scripts/ios-native/mcp.mjs | 2 +- scripts/ios-native/run.mjs | 39 ++++-------- scripts/ios-native/scenario.mjs | 28 +++++++++ scripts/ios-native/scenario.test.mjs | 79 +++++++++++++++++++++++++ scripts/ios-native/scoring.mjs | 6 -- 10 files changed, 206 insertions(+), 50 deletions(-) create mode 100644 scripts/ios-native/interaction.test.mjs create mode 100644 scripts/ios-native/scenario.mjs create mode 100644 scripts/ios-native/scenario.test.mjs diff --git a/docs/native-simulator.md b/docs/native-simulator.md index 9c6be10..252e0b6 100644 --- a/docs/native-simulator.md +++ b/docs/native-simulator.md @@ -39,17 +39,17 @@ Each group completes solo and three-AI games for its mode. Phone 6 and tablet 10 Each job creates and later deletes only its own simulators. First boot has a bounded ten-minute allowance, and captured command output is retained even after timeout. It runs all four modes with solo and three AI opponents, plus a largest-Dynamic-Type start/resume case on both device families. Normal cases cover light/dark and portrait/landscape, complete scoring, native History/Help navigation, cold relaunch and Play Again. -Each start holds a die and rerolls through a bounded local driver session. In expanded play, die gestures stay inside the left scroll pane; compact play uses the shared scroll pane. The die must fit fully inside that pane, and the fixed reroll action must fit inside the play area. Each action is tapped once, without retry. Holding must change only the held index and revision in the real SQLite document. Rerolling must preserve the held face and every other saved field except unheld dice, rolls remaining and revision. UI acknowledgments precede both saved-state comparisons. React Native's iOS checkbox exposes `checkbox, checked, Held` in its accessibility value; the pinned Maestro driver's generic `checked` boolean stays false for that element. +Each scenario uses one bounded, pinned local stdio MCP driver session for setup, hold/reroll, cold app resume, scoring and results navigation. The viewer is disabled. Authored flow files and geometry-checked interactions share that connection; creating one driver does not replace terminating and relaunching the app. Each start holds a die and rerolls through that session. In expanded play, die gestures stay inside the left scroll pane; compact play uses the shared scroll pane. The die must fit fully inside that pane, and the fixed reroll action must fit inside the play area. Each action is tapped once, without retry. Holding must change only the held index and revision in the real SQLite document. Rerolling must preserve the held face and every other saved field except unheld dice, rolls remaining and revision. UI acknowledgments precede both saved-state comparisons. React Native's iOS checkbox exposes `checkbox, checked, Held` in its accessibility value; the pinned Maestro driver's generic `checked` boolean stays false for that element. The landscape phone failure that prompted this guard placed the die at y320..400 behind a footer action. Maestro reported full screen visibility, then its tap at130,360 rerolled instead of holding. The new driver uses the actual pane bounds and checks the persisted effect before any next action. A contract regression and captured-geometry tests cover this failure. They do not substitute for the required native run. The native accessibility hierarchy exposes the play View's test ID as a leaf beside its children. Ownership checks therefore accept real ancestry or this leaf-marker shape in the same immediate container, always with full geometric containment. They do not accept a marker from another container. The die must still descend from its actual scroll view. A retained native hierarchy excerpt tests this distinction; the earlier ancestry-only guard stopped all four groups before any hold tap. -The runner then terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase uses the same pinned Maestro binary's local stdio MCP session, with the viewer disabled. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the session has a ten-minute deadline and a bounded shutdown. +The runner then terminates the process, resumes through the UI and compares the entire document byte-for-byte. Name entry submits the keyboard's Return key. It does not use Maestro's coordinate-swiping keyboard dismissal. Completion first waits for resumed gameplay and the actual score viewport. Its scoring phase retains the scenario's existing driver connection. `inspect_screen` supplies native row and scroll-view rectangles. A row must fit inside its own viewport, clear its top and bottom edges, and be enabled before a semantic tap. Short one-second swipes use coordinates calculated from the current viewport, never fixed device coordinates. Missing rows use the visible category order to choose a direction. Each category has at most 30 inspections; the entire scenario session retains the ten-minute deadline and bounded shutdown. Each inline flow must target the owned application and fit the existing message bound. Executed YAML, inspection snapshots and geometry decisions are retained under the `scenario` prefix. This replaces `centerElement`, which accepted One Pair after a swipe moved it behind the toolbar and the tap opened Help. The pinned driver uses a one-sided screen threshold, not scroll-view containment. Its `above` and `below` selectors also compare top positions, not full rectangles. Slowing that gesture alone would leave the unsafe reachability assumption intact. -Each dice, scoring or results driver explicitly foregrounds the existing app with `launchApp`, `stopApp: false` and `clearState: false`. It does not assume input focus survives the preceding driver session, restart gameplay or reset saved data. All permissions remain denied. This startup contract still needs the native interaction assertions; foregrounding alone is not proof that a tap worked. Diagnostic cancellation scrolls to its action and requires the cancel control and preview to disappear while the Help preview action remains visible. +Dice, scoring and results phases explicitly foreground the existing app with `launchApp`, `stopApp: false` and `clearState: false`. They do not restart gameplay or reset saved data. All permissions remain denied. Foregrounding alone is not proof that a tap worked. Source `9373563` passed both phone groups in two runs, but its regenerated tablet-eight evidence showed a single tap on a fully reachable die with no UI or saved-state acknowledgment; tablet-ten also missed a setup choice-sheet transition. The previous runner repeatedly changed CLI/MCP drivers between phases. A persistent scenario connection removes those boundaries as a reversible diagnostic experiment, not a proven root-cause repair. It cannot establish acceptance until its own complete native matrix and effects pass; the tablet-ten failure happened within a CLI phase, so persistence might not resolve every missed transition. Diagnostic cancellation scrolls to its action and requires the cancel control and preview to disappear while the Help preview action remains visible. Scoring never retries a tap. It requires the recorded-score label and disabled state before the next category, or Game Over after the last one. The generated command, native rectangles, chosen gesture, acknowledgment and ready-to-tap screenshot are retained. Only local device listing, inspection and command execution are allowed through this client. Child environment variables are allowlisted, protocol replies are size/time bounded, and raw replies containing injected environment fields are not logged. Transport and captured-geometry tests do not establish native-runtime acceptance. Completion must produce one history record. Further cases deliberately damage the saved JSON and then the database file, verify preservation after failed loading, cancel reset, and complete an explicit reset through the native alert. diff --git a/scripts/ios-native/dice.mjs b/scripts/ios-native/dice.mjs index c5c7112..11a5d7e 100644 --- a/scripts/ios-native/dice.mjs +++ b/scripts/ios-native/dice.mjs @@ -1,6 +1,5 @@ import assert from "node:assert/strict"; import { assertHeld, diePosition, rollPosition, screenElements, uniqueElement } from "./geometry.mjs"; -import { nativeInteraction } from "./interaction.mjs"; async function reach(kind, position, { inspect, run, record }) { for (let attempt = 0; attempt < 30; attempt++) { @@ -42,7 +41,3 @@ export async function holdAndReroll({ readSave, ...io }) { record({ kind: "reroll", action: "acknowledged", revision: rolled.active.revision }); await capture("held-and-rerolled"); } - -export function nativeDice({ readSave, ...options }) { - return nativeInteraction({ ...options, prefix: "hold", exercise: (io) => holdAndReroll({ readSave, ...io }) }); -} diff --git a/scripts/ios-native/geometry.test.mjs b/scripts/ios-native/geometry.test.mjs index 6b1311b..723fe9b 100644 --- a/scripts/ios-native/geometry.test.mjs +++ b/scripts/ios-native/geometry.test.mjs @@ -13,7 +13,10 @@ test("the actual scoring caller uses the viewport-aware driver in both layouts", const play = readFileSync(new URL("../../apps/mobile/src/screens/Play.tsx", import.meta.url), "utf8"); assert.equal((play.match(/testID="score-viewport"/g) ?? []).length, 2); const runner = readFileSync(new URL("./run.mjs", import.meta.url), "utf8"); - assert.match(runner, /await nativeScoring\(/); + assert.match(runner, /await nativeInteraction\(/); + assert.match(runner, /await exerciseScenario\(/); + const scenario = readFileSync(new URL("./scenario.mjs", import.meta.url), "utf8"); + assert.match(scenario, /await scoreCategories\(/); assert.doesNotMatch(runner, /completeFlow\(/); }); test("dice and reroll interactions expose their own bounds and use the checked driver", () => { @@ -22,7 +25,9 @@ test("dice and reroll interactions expose their own bounds and use the checked d assert.equal((play.match(/testID="play-viewport"/g) ?? []).length, 2); assert.match(play, /testID="reroll-action"/); const runner = readFileSync(new URL("./run.mjs", import.meta.url), "utf8"); - assert.match(runner, /await nativeDice\(/); + assert.match(runner, /await exerciseScenario\(/); + const scenario = readFileSync(new URL("./scenario.mjs", import.meta.url), "utf8"); + assert.match(scenario, /await holdAndReroll\(/); const flows = readFileSync(new URL("./flows.mjs", import.meta.url), "utf8"); assert.doesNotMatch(flows, /tapOn.*id: "die-0"/); }); diff --git a/scripts/ios-native/interaction.mjs b/scripts/ios-native/interaction.mjs index 0a345ec..9979f04 100644 --- a/scripts/ios-native/interaction.mjs +++ b/scripts/ios-native/interaction.mjs @@ -5,8 +5,8 @@ import { localMaestro } from "./mcp.mjs"; import { redactDriverLog } from "./driverLogs.mjs"; /** One bounded local driver session for the owned simulator. */ -export async function nativeInteraction({ device, bundleId, directory, prefix, env, capture, exercise }) { - assert(["complete", "hold"].includes(prefix), "Unknown native interaction phase."); +export async function nativeInteraction({ device, bundleId, directory, prefix, env, capture, exercise, openSession = localMaestro }) { + assert(["complete", "hold", "scenario"].includes(prefix), "Unknown native interaction phase."); let diagnostics = "", sequence = 0; const deadline = Date.now() + 600000; const childEnv = Object.fromEntries(Object.entries(env).filter(([key]) => @@ -18,19 +18,23 @@ export async function nativeInteraction({ device, bundleId, directory, prefix, e writeFileSync(join(directory, `${prefix}-screen-latest.json`), JSON.stringify(screen, null, 2) + "\n"); return screen; } + async function runFlow(yaml) { + assert(typeof yaml === "string" && yaml.length <= 262144 && yaml.startsWith(`appId: ${JSON.stringify(bundleId)}\n---\n`), "Flow must target the owned application."); + writeFileSync(join(directory, `${prefix}-step-${String(++sequence).padStart(3, "0")}.yaml`), yaml); + const result = await call("run", { device_id: device, yaml }); + assert.equal(result.success, true, "Native interaction command failed."); + } async function run(commands) { const yaml = `appId: ${JSON.stringify(bundleId)}\n---\n` + commands.map((command) => { const [[name, value]] = Object.entries(command); return `- ${name}: ${JSON.stringify(value)}`; }).join("\n") + "\n"; - writeFileSync(join(directory, `${prefix}-step-${String(++sequence).padStart(3, "0")}.yaml`), yaml); - const result = await call("run", { device_id: device, yaml }); - assert.equal(result.success, true, "Native interaction command failed."); + await runFlow(yaml); } try { - client = await localMaestro({ cwd: directory, env: childEnv, deadline, onStderr: (text) => { diagnostics += text.slice(0, Math.max(0, 262144 - diagnostics.length)); } }); + client = await openSession({ cwd: directory, env: childEnv, deadline, onStderr: (text) => { diagnostics += text.slice(0, Math.max(0, 262144 - diagnostics.length)); } }); const devices = await call("list_devices", {}); assert(devices.devices?.some((item) => item.device_id === device && item.platform === "ios" && item.connected === true), "Owned simulator is not connected to Maestro."); - await exercise({ inspect, run, capture, record: (value) => appendFileSync(join(directory, `${prefix}-geometry.jsonl`), JSON.stringify(value) + "\n") }); + await exercise({ inspect, run, runFlow, capture, record: (value) => appendFileSync(join(directory, `${prefix}-geometry.jsonl`), JSON.stringify(value) + "\n") }); } catch (error) { try { await capture(`${prefix}-failure`); } catch { /* Preserve the original error; the runner also reads the saved document. */ } throw error; diff --git a/scripts/ios-native/interaction.test.mjs b/scripts/ios-native/interaction.test.mjs new file mode 100644 index 0000000..b7a3951 --- /dev/null +++ b/scripts/ios-native/interaction.test.mjs @@ -0,0 +1,64 @@ +import assert from "node:assert/strict"; +import { mkdtempSync, readFileSync, readdirSync, rmSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import test from "node:test"; +import { nativeInteraction } from "./interaction.mjs"; +import { startFlow, resumeFlow } from "./flows.mjs"; + +function harness() { + const directory = mkdtempSync(join(tmpdir(), "native-session-")), calls = [], captures = []; + let opened = 0, closed = 0, childEnv; + const options = { directory, device: "owned", bundleId: "fixture.app", prefix: "scenario", env: { PATH: "fixture-path", GITHUB_TOKEN: "fixture-secret", UNRELATED: "not-forwarded" }, + capture: async (name) => captures.push(name), + openSession: async ({ env, deadline, onStderr }) => { + opened++; childEnv = env; + assert(deadline > Date.now() && deadline <= Date.now() + 600000); + onStderr("GITHUB_TOKEN=fixture-secret\n"); + return { call: async (name, args) => { + calls.push({ name, args }); + if (name === "list_devices") return { devices: [{ device_id: "owned", platform: "ios", connected: true }] }; + if (name === "inspect_screen") return { ui_schema: { platform: "ios" }, elements: [] }; + return { success: true, env_vars: { GITHUB_TOKEN: "fixture-secret" } }; + }, close: async () => { closed++; } }; + } }; + return { options, calls, captures, state: () => ({ opened, closed, childEnv }), cleanup: () => rmSync(directory, { recursive: true }) }; +} +test("multiple authored flows and inspections use exactly one owned bounded session", async () => { + const flow = harness(); + try { + await nativeInteraction({ ...flow.options, exercise: async (io) => { + await io.runFlow(startFlow("fixture.app", { ai: 0, dice: 5, orientation: "PORTRAIT" })); + await io.run([{ waitForAnimationToEnd: { timeout: 5000 } }]); + await io.inspect(); await io.runFlow(resumeFlow("fixture.app")); + io.record({ action: "fixture" }); + } }); + const { opened, closed, childEnv } = flow.state(); + assert.equal(opened, 1); assert.equal(closed, 1); assert.deepEqual(childEnv, { PATH: "fixture-path" }); + assert.deepEqual(flow.calls.map((item) => item.name), ["list_devices", "run", "run", "inspect_screen", "run"]); + assert.equal(readdirSync(flow.options.directory).filter((name) => name.endsWith(".yaml")).length, 3); + assert(!readFileSync(join(flow.options.directory, "scenario-mcp.log"), "utf8").includes("fixture-secret")); + assert.deepEqual(flow.captures, []); + } finally { flow.cleanup(); } +}); +test("failure preserves its phase screenshot and closes the same session without replay", async () => { + const flow = harness(); + try { + await assert.rejects(nativeInteraction({ ...flow.options, exercise: async (io) => { + await io.run([{ tapOn: { id: "die-0", retryTapIfNoChange: false } }]); throw new Error("Not acknowledged"); + } }), /Not acknowledged/); + assert.equal(flow.state().opened, 1); assert.equal(flow.state().closed, 1); + assert.equal(flow.calls.filter((item) => item.name === "run").length, 1); + assert.deepEqual(flow.captures, ["scenario-failure"]); + } finally { flow.cleanup(); } +}); +test("unbound or oversized authored flows cannot reach the driver", async () => { + for (const yaml of [resumeFlow("another.app"), 'appId: "fixture.app"\n---\n' + "x".repeat(262144)]) { + const flow = harness(); + try { + await assert.rejects(nativeInteraction({ ...flow.options, exercise: (io) => io.runFlow(yaml) }), /owned application/); + assert.equal(flow.calls.filter((item) => item.name === "run").length, 0); + assert.equal(flow.state().closed, 1); + } finally { flow.cleanup(); } + } +}); diff --git a/scripts/ios-native/mcp.mjs b/scripts/ios-native/mcp.mjs index a93d38c..6896db6 100644 --- a/scripts/ios-native/mcp.mjs +++ b/scripts/ios-native/mcp.mjs @@ -80,7 +80,7 @@ export async function localMaestro({ cwd, env, onStderr, deadline, start = spawn const result = await client.request("tools/call", { name, arguments: args }); if (result.isError) { onStderr(`\nLocal ${name} error: ${JSON.stringify(result.content).slice(0, 8192)}\n`); - throw new Error(`Local Maestro ${name} failed; see complete-mcp.log.`); + throw new Error(`Local Maestro ${name} failed; see the retained phase MCP log.`); } assert.equal(result.content?.length, 1, "Unexpected local tool response."); assert.equal(result.content[0].type, "text", "Expected local JSON text."); diff --git a/scripts/ios-native/run.mjs b/scripts/ios-native/run.mjs index 433a398..e82f437 100644 --- a/scripts/ios-native/run.mjs +++ b/scripts/ios-native/run.mjs @@ -6,9 +6,9 @@ import { join, resolve } from "node:path"; import { setTimeout as delay } from "node:timers/promises"; import { getScorecardCategories } from "../../packages/game-engine/src/presentation.ts"; import { decodeSave } from "../../apps/mobile/src/local/save.ts"; -import { startFlow, resumeFlow, completeStartFlow, completeEndFlow, corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; -import { nativeScoring } from "./scoring.mjs"; -import { nativeDice } from "./dice.mjs"; +import { corruptFlow, emptyRelaunchFlow, scenarios, GROUPS, scenariosForGroup } from "./flows.mjs"; +import { nativeInteraction } from "./interaction.mjs"; +import { exerciseScenario } from "./scenario.mjs"; import { buildSimulator } from "./build.mjs"; import { loadBuiltSimulator } from "./artifact.mjs"; import { retainDriverLogs } from "./driverLogs.mjs"; @@ -130,31 +130,18 @@ async function exercise(app, bundleId) { const result = { ...scenario, udid: device, runtime, locale: "en-US", status: "running" }; receipt.scenarios.push(result); receipt.phase = `start-${scenario.id}`; checkpoint(); if (index === 0) recording = spawn("xcrun", ["simctl", "io", device, "recordVideo", "--codec=h264", join(directory, "native-resume.mp4")], { env, stdio: "ignore" }); - flow(device, directory, "start", startFlow(bundleId, scenario)); - receipt.phase = `hold-${scenario.id}`; checkpoint(); - await nativeDice({ device, bundleId, directory, env, + let resumedBytes; + await nativeInteraction({ device, bundleId, directory, prefix: "scenario", env, capture: (name) => sim("io", device, "screenshot", join(directory, `${name}.png`)), - readSave: (stage) => saved(device, bundleId, directory, stage).data }); - const before = saved(device, bundleId, directory, "before-relaunch"); - assert.equal(before.data.active.game.diceCount, scenario.dice); assert.equal(before.data.active.game.players.length, scenario.ai + 1); - assert.deepEqual(before.data.active.game.held, [0]); assert.equal(before.data.active.game.rollsLeft, 1); - sim("terminate", device, bundleId); - receipt.phase = `resume-${scenario.id}`; checkpoint(); - flow(device, directory, "resume", resumeFlow(bundleId)); - const after = saved(device, bundleId, directory, "after-relaunch"); assert.equal(after.bytes, before.bytes); - if (!scenario.largeText) { - receipt.phase = `complete-${scenario.id}`; checkpoint(); - const preview = ["phone-5-solo-light", "tablet-8-solo-light"].includes(scenario.id); - flow(device, directory, "complete-start", completeStartFlow(bundleId)); - await nativeScoring({ device, bundleId, directory, categories: getScorecardCategories(scenario.dice).map((category) => category.id), env, - capture: (name) => sim("io", device, "screenshot", join(directory, `${name}.png`)) }); - flow(device, directory, "complete", completeEndFlow(bundleId, preview)); - const completed = saved(device, bundleId, directory, "completed"); - assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); - assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); - } + exercise: async (io) => { + resumedBytes = await exerciseScenario({ bundleId, scenario, io, + categories: getScorecardCategories(scenario.dice).map((category) => category.id), + readSave: (stage) => saved(device, bundleId, directory, stage), + terminate: () => sim("terminate", device, bundleId), + phase: (name) => { receipt.phase = `${name}-${scenario.id}`; checkpoint(); } }); + } }); await stopRecording(); - result.status = "passed"; result.resumeDocumentSha256 = hash(before.bytes); checkpoint(); + result.status = "passed"; result.resumeDocumentSha256 = hash(resumedBytes); checkpoint(); } if (!group || group === "tablet-10") { receipt.phase = "corruption-and-reset"; checkpoint(); corruption(booted, bundleId); } assert.equal(receipt.scenarios.length, selectedScenarios.length); diff --git a/scripts/ios-native/scenario.mjs b/scripts/ios-native/scenario.mjs new file mode 100644 index 0000000..a137247 --- /dev/null +++ b/scripts/ios-native/scenario.mjs @@ -0,0 +1,28 @@ +import assert from "node:assert/strict"; +import { startFlow, resumeFlow, completeStartFlow, completeEndFlow } from "./flows.mjs"; +import { holdAndReroll } from "./dice.mjs"; +import { scoreCategories } from "./scoring.mjs"; + +/** Keep one driver across navigation phases, but still cold-relaunch the app itself. */ +export async function exerciseScenario({ bundleId, scenario, categories, readSave, terminate, phase, io }) { + phase("start"); await io.runFlow(startFlow(bundleId, scenario)); + phase("hold"); await holdAndReroll({ ...io, readSave: async (stage) => (await readSave(stage)).data }); + const before = await readSave("before-relaunch"); + assert.equal(before.data.active.game.diceCount, scenario.dice); + assert.equal(before.data.active.game.players.length, scenario.ai + 1); + assert.deepEqual(before.data.active.game.held, [0]); assert.equal(before.data.active.game.rollsLeft, 1); + await terminate(); + phase("resume"); await io.runFlow(resumeFlow(bundleId)); + const after = await readSave("after-relaunch"); assert.equal(after.bytes, before.bytes, "Cold relaunch changed the saved document."); + if (!scenario.largeText) { + phase("complete"); + const preview = ["phone-5-solo-light", "tablet-8-solo-light"].includes(scenario.id); + await io.runFlow(completeStartFlow(bundleId)); + await scoreCategories({ categories, ...io }); + await io.runFlow(completeEndFlow(bundleId, preview)); + const completed = await readSave("completed"); + assert.equal(completed.data.active, null); assert.equal(completed.data.history.entries.length, 1); + assert.equal(completed.data.highScores.entries.length, scenario.ai + 1); + } + return before.bytes; +} diff --git a/scripts/ios-native/scenario.test.mjs b/scripts/ios-native/scenario.test.mjs new file mode 100644 index 0000000..65d084a --- /dev/null +++ b/scripts/ios-native/scenario.test.mjs @@ -0,0 +1,79 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { exerciseScenario } from "./scenario.mjs"; + +function harness({ changedResume = false, missingCompletion = false, failedHold = false } = {}) { + const scenario = { id: "tablet-8-solo-light", ai: 0, dice: 8, orientation: "PORTRAIT" }; + let data = { active: { revision: 0, game: { diceCount: 8, players: [{}], dice: [3, 5, 4, 1, 6, 2, 2, 6], held: [], rollsLeft: 2 } }, history: { entries: [] }, highScores: { entries: [] } }; + let finished = false, recorded = false, terminated = 0; + const phases = [], stages = [], flows = [], taps = []; + const screen = () => ({ ui_schema: { platform: "ios", defaults: { enabled: true } }, elements: finished ? [ + { b: "[0,0][1032,1376]", a11y: "Game Over!" }, + ] : [{ rid: "play-viewport", b: "[0,134][1032,1356]", c: [ + { rid: "dice-viewport", b: "[0,134][340,1288]", c: [{ rid: "die-0", b: "[40,328][96,408]", val: data.active.game.held.length ? "checkbox, checked, Held" : "checkbox, unchecked, Not held" }] }, + { rid: "reroll-action", b: "[20,1296][320,1344]", a11y: `Re-roll (${data.active.game.rollsLeft})` }, + { rid: "score-viewport", b: "[340,134][1032,1356]", c: [ + { rid: "score-ones", b: "[360,234][1012,290]", a11y: recorded ? "Ones, 0 points recorded" : "Ones, 0 points", enabled: !recorded }, + { rid: "score-chance", b: "[360,300][1012,356]", a11y: "Chance, 0 points" }, + ] }, + ] }] }); + return { phases, stages, flows, taps, terminated: () => terminated, + options: { bundleId: "fixture.app", scenario, categories: ["ones", "chance"], phase: (name) => phases.push(name), + terminate: async () => { terminated++; }, + readSave: async (stage) => { + stages.push(stage); + if (changedResume && stage === "after-relaunch") return { data: structuredClone(data), bytes: "changed bytes" }; + return { data: structuredClone(data), bytes: JSON.stringify(data) }; + }, + io: { inspect: async () => screen(), capture: async () => {}, record: () => {}, + runFlow: async (yaml) => { + flows.push(yaml); + if (yaml.includes('"Play Again"')) { + assert(finished); + if (!missingCompletion) data = { active: null, history: { entries: [{}] }, highScores: { entries: [{}] } }; + } + }, + run: async (commands) => { + const tap = commands[0].tapOn; if (!tap) return; + assert.equal(tap.retryTapIfNoChange, false); taps.push(tap.id); + if (tap.id === "die-0") { if (!failedHold) { data.active.game.held = [0]; data.active.revision++; } } + else if (tap.id === "reroll-action") { data.active.game.rollsLeft = 1; data.active.revision++; } + else if (tap.id === "score-ones") recorded = true; + else if (tap.id === "score-chance") finished = true; + else assert.fail("Unexpected state-changing tap"); + }, + }, + }, + }; +} +test("one scenario preserves real cold relaunch, exact document and complete-game effects", async () => { + const flow = harness(); const bytes = await exerciseScenario(flow.options); + assert.equal(flow.terminated(), 1); + assert.deepEqual(flow.phases, ["start", "hold", "resume", "complete"]); + assert.deepEqual(flow.taps, ["die-0", "reroll-action", "score-ones", "score-chance"]); + assert.deepEqual(flow.stages, ["before-hold", "after-hold", "after-reroll", "before-relaunch", "after-relaunch", "completed"]); + assert.equal(flow.flows.length, 4); + assert(flow.flows.at(-1).includes("diagnostics-preview")); + assert.equal(JSON.parse(bytes).active.game.held[0], 0); +}); +test("largest-text scenarios still hold, reroll and resume without claiming a complete game", async () => { + const flow = harness(); flow.options.scenario.largeText = true; + await exerciseScenario(flow.options); + assert.equal(flow.terminated(), 1); assert.deepEqual(flow.phases, ["start", "hold", "resume"]); + assert.deepEqual(flow.taps, ["die-0", "reroll-action"]); assert.equal(flow.flows.length, 2); +}); +test("missing hold acknowledgment never reaches reroll or a cold relaunch", async () => { + const flow = harness({ failedHold: true }); + await assert.rejects(exerciseScenario(flow.options), /not acknowledged/); + assert.deepEqual(flow.taps, ["die-0"]); assert.equal(flow.terminated(), 0); +}); +test("changed saved bytes after relaunch stop before any scoring", async () => { + const flow = harness({ changedResume: true }); + await assert.rejects(exerciseScenario(flow.options), /Cold relaunch changed/); + assert.deepEqual(flow.taps, ["die-0", "reroll-action"]); +}); +test("navigation success cannot stand in for the persisted completion and Play Again effects", async () => { + const flow = harness({ missingCompletion: true }); + await assert.rejects(exerciseScenario(flow.options)); + assert.deepEqual(flow.taps, ["die-0", "reroll-action", "score-ones", "score-chance"]); +}); diff --git a/scripts/ios-native/scoring.mjs b/scripts/ios-native/scoring.mjs index 1fb9b25..e3b0675 100644 --- a/scripts/ios-native/scoring.mjs +++ b/scripts/ios-native/scoring.mjs @@ -1,6 +1,5 @@ import assert from "node:assert/strict"; import { scorePosition, assertRecorded, screenElements } from "./geometry.mjs"; -import { nativeInteraction } from "./interaction.mjs"; export async function scoreCategories({ categories, inspect, run, capture, record }) { assert(categories.length > 0 && categories.length <= 20 && new Set(categories).size === categories.length); @@ -25,8 +24,3 @@ export async function scoreCategories({ categories, inspect, run, capture, recor record({ index, id, action: "acknowledged", last }); } } - -/** Scoring keeps its own application acknowledgments within the shared bounded session. */ -export function nativeScoring({ categories, ...options }) { - return nativeInteraction({ ...options, prefix: "complete", exercise: (io) => scoreCategories({ categories, ...io }) }); -}