diff --git a/SOURCES.md b/SOURCES.md index 24d0c58..8915c2f 100644 --- a/SOURCES.md +++ b/SOURCES.md @@ -1204,8 +1204,12 @@ checks. Checks free disk space and load once before acquiring a device, on the machine that runs it, and holds or reports when either is critical. Project runners follow Verify's iOS build output rules. Failure guidance defers to host recovery instructions and preserves unresolved -ownership conflicts. Owns T3 Device panel routing, returned driver and session flags, -and Xcode and platform tool routes for reaching a device. Adds a last-resort, coordinated CoreSimulator restart for repeated iOS boot failures before a grant, guarded by a local script. Runtime lease rules stay +ownership conflicts. Consolidates T3 acquisition, returned driver/session, setup and recovery rules +in one host reference; the live host contract remains authoritative. Panel or +metadata failures block dependent work, while authorized independent supported +project runners may continue under ownership rules and explicit holds. Runner +success does not prove panel recovery or replace required visual proof. Keeps +Xcode and platform tool routes for reaching a device. Adds a last-resort, coordinated CoreSimulator restart for repeated iOS boot failures before a grant, guarded by a local script. Runtime lease rules stay with `simlock instructions`. Technical citations use checked upstream source documents rather than inaccessible deployed documentation routes. diff --git a/skills/simulator-lifecycle/SKILL.md b/skills/simulator-lifecycle/SKILL.md index 3cfda83..4ee6f0c 100644 --- a/skills/simulator-lifecycle/SKILL.md +++ b/skills/simulator-lifecycle/SKILL.md @@ -3,9 +3,12 @@ name: simulator-lifecycle description: Use before touching an iOS simulator or Android emulator, or before running simctl, adb, emulator or xcodebuild for a simulator, or agent-device. Simlock shares these devices between agents and has rules every agent must follow. --- -Simlock shares iOS simulators and Android emulators between agents. It works only if every agent follows its rules. +Use SimLock to isolate disposable simulator/emulator work and leave each run’s +lease and resources released or explicitly retained with an owner. -Follow the host's device contract first. For retained inspection targets, read +Follow the host's live device contract first. In T3, read +[T3 device routing and recovery](references/t3.md) before acquisition, interaction, +setup or recovery. For retained inspection targets, read [run and handoff conventions](references/workflow.md) before touching the device; the disposable-pool checks below do not authorize resetting or enrolling it. @@ -31,8 +34,6 @@ On a remote device host, single-quote the commands so `$HOME` expands there, suc `ssh 'df -h "$HOME"; uptime; sysctl -n hw.logicalcpu'`. If the host offers no shell, report the check as not run and continue under the host's own controls. -In T3, acquisition and interactive control must follow its documented route to -the same SimLock lease; an ordinary panel session is not proof of that lease. Before acquiring, read [run and handoff conventions](references/workflow.md) for host routing, run evidence, teardown and retention. Use [project runner integration](references/project-runners.md) when changing normal diff --git a/skills/simulator-lifecycle/references/setup.md b/skills/simulator-lifecycle/references/setup.md index 642503a..1810a57 100644 --- a/skills/simulator-lifecycle/references/setup.md +++ b/skills/simulator-lifecycle/references/setup.md @@ -33,11 +33,7 @@ into every project. creating a fresh device for every run. Changes requiring a SimLock daemon restart belong in a maintenance window with its consumers accounted for; ordinary agents do not restart a shared daemon to repair a run. -4. In T3, discover the host's supported SimLock connection/setup and confirm the - Device panel and pinned agent-device command refer to the granted device and - lease. Do not switch device sets just to make an ordinary panel discover a - private device, or overwrite a T3-provided agent-device connection. Missing - host support blocks that integration, not independent build work. +4. For T3 adoption, follow [T3 connection setup](t3.md#connection-setup). Use the current [configuration reference](https://github.com/callstackincubator/simlock/blob/822ea4c47d68cd8f7b1168192c40bbcffa23f4e9/website/src/content/docs/docs/reference/configuration.mdx), [capacity guidance](https://github.com/callstackincubator/simlock/blob/822ea4c47d68cd8f7b1168192c40bbcffa23f4e9/website/src/content/docs/docs/worker/capacity.mdx) diff --git a/skills/simulator-lifecycle/references/t3.md b/skills/simulator-lifecycle/references/t3.md new file mode 100644 index 0000000..650a19c --- /dev/null +++ b/skills/simulator-lifecycle/references/t3.md @@ -0,0 +1,52 @@ +# T3 device routing and recovery + +Use the host's live device contract as the authority for supported operations. +The [T3 device contract](https://github.com/pingdotgg/t3code/blob/c71ca063dfcd8c2e3dcb2bd92adbb2180cbbece3/apps/server/src/mcp/toolkits/device/handlers.ts#L28) +is the source baseline; inspect live tools for the installed contract. + +## Acquire and drive + +Use `device_list`, then `device_open`, so the user can watch the device. Keep the +exact `agent-device` launcher, host configuration and session flags it returns +on every command. Prefer current snapshot refs. Report an unavailable platform. + +Confirm that the host's documented SimLock integration acquires and drives the +same underlying lease. A regular `device_open` session alone does not establish +a SimLock lease. A device from a `simlock-` host in `device_list` is that +integration. If unavailable, report interactive disposable verification blocked; +do not combine an unrelated CLI lease with a panel session or substitute another +driver. Apply the [run ownership guard](workflow.md#choose-the-route-before-acquiring) +before reusing, renewing, cancelling or releasing anything. + +Project suites may use their supported SimLock route independently of panel +support, under [verification and hold scope](workflow.md#choose-the-route-before-acquiring). + +## Connection setup + +For authorized adoption, discover the host's supported SimLock connection/setup +and confirm the Device panel and pinned agent-device command refer to the +granted device and lease. Do not switch device sets just to make an ordinary +panel discover a private device, or overwrite a T3-provided agent-device +connection. Missing host support blocks that integration, not independent build +work. + +## Recovery and stop + +Quote the error and follow its recovery advice once through supported tools and +the returned driver, including any requested diagnostic. If that still fails, +report the blocker and stop work dependent on that route, subject to the +[pre-grant recovery cases](workflow.md#when-a-session-fails). Preserve T3's +connection, session and install directory. Do not open a second lease or use an +alternate driver as a workaround. Record diagnostics unavailable through that +route. A task's stricter retry limit or prohibition on another open remains binding. + +Worker recovery alone does not prove the panel works. When no supported safe +metadata check is available, report panel state as unverified; do not invent a +probe or retry a prohibited open. This does not add a metadata reconfirmation +gate to independent supported build/test work. Keep required visual proof +pending until the supported interactive route can provide it. + +Use [bounded failure diagnostics](workflow.md#when-a-session-fails) and +[ownership-checked teardown](workflow.md#finish-or-retain). For qualifying iOS +boot failures, the specialized [break-glass procedure](break-glass.md) retains +its coordinated T3-wide holds and restart limits. diff --git a/skills/simulator-lifecycle/references/workflow.md b/skills/simulator-lifecycle/references/workflow.md index 5e843bd..e9385d3 100644 --- a/skills/simulator-lifecycle/references/workflow.md +++ b/skills/simulator-lifecycle/references/workflow.md @@ -15,17 +15,13 @@ is unavailable, continue independent build or code work and report the missing prerequisite. Environment setup and adoption checks use [setup and rollout](setup.md). -In T3, use `device_list`, then `device_open`, so the user can watch the device, and keep -the exact `agent-device` launcher, host configuration, and session flags it returns on -every command. Prefer current snapshot refs. Report an unavailable platform. See the -[T3 device contract](https://github.com/pingdotgg/t3code/blob/c71ca063dfcd8c2e3dcb2bd92adbb2180cbbece3/apps/server/src/mcp/toolkits/device/handlers.ts#L28). Confirm -that the host's documented SimLock integration acquires and drives the same -underlying lease. A regular `device_open` session alone does not establish a -SimLock lease. A device from a `simlock-` host in `device_list` is that integration. If it -is unavailable, report interactive disposable -verification blocked; do not combine an unrelated CLI lease with a panel session -or substitute another driver. Project test suites may use their supported -SimLock route independently of interactive panel support. +For T3 acquisition and interaction, follow [T3 device routing](t3.md). +Project test suites may use their supported SimLock route independently of +interactive panel support. A panel or metadata failure blocks only work that +depends on it; authorized independent build/test paths may continue under the +same ownership rules. Runner success does not prove panel recovery or replace +required visual proof. Honor explicit holds by their stated scope and release +condition, including holds on native suites or all device work. Outside a host-owned device route, choose one of SimLock's supported allocation interfaces for the run: its CLI, MCP, or agent-device bridge. With the bridge, @@ -114,17 +110,15 @@ paths with the run receipt's versions, workspace, session and lease/device identities. Separate device-tool failure from app failure; a passing build or generic doctor check does not prove runner readiness. -In T3, quote the error and follow its recovery advice once through its supported -tools and returned driver, including any requested diagnostic. If that still fails, report the -blocker and stop device work, unless a failure before a grant applies below. Preserve T3's connection, session and install -directory; the skill does not authorize a second lease or an alternate driver. -If a diagnostic is unavailable through that route, record that limit. +For T3 failures, apply [T3 recovery and stop rules](t3.md#recovery-and-stop) +before the cases below. Host and task limits constrain retries and substitutions; +these cases do not authorize an attempt they prohibit. - **Failed before a grant:** no lease exists, so ended-lease recovery does not apply. Check `simlock status --json` for your own queued request or late grant. If you find one, apply the [run ownership guard](#choose-the-route-before-acquiring) and don't retry. Otherwise retry once, counting any retry the host's error advised, then try one - other model from `device_list`, unless the user named the target. If that model boots, + other model from the host's supported catalog, unless the user named the target. If that model boots, use it and label the substitution. If the same boot failure repeats on iOS on this Mac, check [break glass](break-glass.md). Otherwise stop device work and report the blocker. - **Lease ended or target missing:** stop using the old target. Reconcile the