Repository navigation
feat(ios): client-control v1 test client subscription and policy - #6287
Conversation
85d4f44 to
0048455
Compare
|
Independent review (reviewer agent ClientControlStackReview, read-only), relayed by st-ios: PASS at head Posted on behalf of @schickling
|
0048455 to
6b67448
Compare
|
Independent review (reviewer agent LifecycleReview), relayed by st-ios: restack onto 6fb398c PASS at Posted on behalf of @schickling
|
agent-identity: agent/compoundingtech/st-ios agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.12.5 agent-runtime: OMP 18.12.5 agent-model: openai-codex/gpt-6.1-sol
agent-identity: agent/compoundingtech/st-ios agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.12.5 agent-runtime: OMP 18.12.5 agent-model: openai-codex/gpt-6.1-sol
agent-identity: agent/compoundingtech/st-ios agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.12.5 agent-runtime: OMP 18.12.5 agent-model: openai-codex/gpt-6.1-sol
6b67448 to
bc2e307
Compare
|
Independent delta review (reviewer agent LifecycleReview, read-only), relayed by st-ios: PASS at Posted on behalf of @schickling
|
Change
Existing-socket subscription, pure command grant policy, canonical signed results and shared golden vectors.
Head:
bc2e3076a4b972b64a19b2ec1ee57588dc8b604c; diffstat 7 files +287/-0.Depends on #6270 (test-client flag) and #6274 (codegen).
Stack
#6287 → #6311 → #6312 → #6324, all draft. Canonical base: 972b65b (source 5613f10). #6270 is NOT merged: absent Expo extra testClientMode means normal/inert; only === true enables commands. #6274 remains the trunk dependency, not an owned stack member; no push or PR mutation to it.
Generated contract and shipped paths
Models.generated.ts:1318–1328 defines ClientControlGrantLifecycle; :3419 includes it in Resource. ClientControl.generated.ts:42–52 exports ClientControlSha256/defaultWebCryptoSha256 and injectable digest/canonicalization helpers. Existing session-scoped commands socket carries both generated rows; no handwritten wire arm or second socket.
Only own-device/session started lifecycle authority admits matching per-command control_grant. Sequences are positive safe integers; stale/incremental duplicates are ignored and terminal grants cannot reopen. End/revoke, including claim/run ending while idle, clears authority/indicator and in-flight results. Local revoke immediately clears authority and invokes generated clientTestRevoke. Inspect/navigate never invoke answer/close/read APIs.
Signing uses Expo Crypto.digest(SHA256) through generated canonicalization, without crypto.subtle/polyfill/dependency. The cast-free ArrayBuffer-backed view remains necessary because ClientControlSha256 still accepts broad Uint8Array and Expo requires BufferSource; ordinary ArrayBuffer inputs use a zero-copy view, shared buffers use an owned copy. Generated invalid-unicode errors refuse before signing/posting.
Reconnect reconciliation choice
suspend clears current authority but preserves lifecycle sequence history and terminal tombstones. Fresh snapshot reconciliation is explicitly distinct from incremental duplicate suppression: an unchanged current started lifecycle restores authority/indicator; lower sequences and terminal states remain refused. Lifecycle rows are reconciled before command rows. Tests cover unchanged-start reconnect with navigation/results, revoked reconnect, lower-sequence snapshots, foreign device/session snapshots and replacement snapshots without lifecycle. The last two requested follow-ups fit in seven added lines.
Verification: CI=1 nice -n 10, apps/ios
Pending-on-codegen
None. Both prior upstream typecheck failures are fixed by this canonical base; lifecycle/hash-callback/invalid-Unicode bindings are integrated.
NOT RUN
Intermediate layers separately; native compile/install/device/XCUITest accessibility observation; enrollment; live daemon/socket smoke; signing/provisioning; fixture-owner mutation checks. JSX tests prove source-level host trees, not native accessibility receipts.
All authored/restacked commits are signed (G); four branches pushed with ST_SKIP_EVIDENCE=1 through gh stack. Release-note statuses use none/changed/unknown.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimeagent_modelworktree