Skip to content

ios(state-machines): extract AidenHostConnection, ChatViewModel sub-machines, and VoiceInput reducer - #906

Open
sambitcreate wants to merge 2 commits into
fix/sm-ios-classifiers-and-enginefrom
feat/sm-ios-dense-owners
Open

sambitcreate wants to merge 2 commits into
fix/sm-ios-classifiers-and-enginefrom
feat/sm-ios-dense-owners

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary (Stacked on PR #901)

  • Phase 4A: Extract pure AidenHostConnectionLifecycle (active vs revoked(purgePending:), attempt & generation axes) from AidenHostConnection.swift, preserving all @Observable properties and adding lifecycle/revocation tests in AidenHostConnectionTests.swift
  • Phase 4B: Extract AidenForeignRunObserver, AidenPendingSendCoordinator, and AidenChatMutationSubMachines (AidenWorktreeSetupMachine, AidenChatForkAttemptMachine, AidenContinueInNewChatAttemptMachine, approval/question snapshot fences) from AidenChatViewModel, +ForeignRuns, and +Fork, with dedicated unit tests
  • Phase 4C: Extract ComposerVoiceInputReducer over (state, backend, resources, suppressNextRecognitionError, sessionFence) with single canonical transitionToIdle cleanup and injectable driver seams + ComposerVoiceInputControllerTests.swift
  • Wired all 8 new Swift files into project.pbxproj and scripts/check-ios-shipping-target.test.mjs

Verification

  • node --test scripts/check-ios-shipping-target.test.mjs scripts/check-ios-testflight-policy.test.mjs scripts/check-ios-app-store-metadata.test.mjs (22/22 pass; macOS xcodebuild test running on this PR)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes I reviewed the complete two-commit extraction across all 16 changed files, including production call sites, lifecycle equivalence, and the new behavioral coverage.

  • Host connection lifecycle — Moves custody, connection state, attempt routing, rollback, and generation fencing into AidenHostConnectionLifecycle while retaining delegate and network ownership in AidenHostConnection.
  • Foreign-run observation — Extracts attach/reconnect, settle promotion, foreground probing, announced-turn handoff, and bounded transcript reconciliation into AidenForeignRunObserver.
  • Pending sends and chat mutations — Isolates durable-send retry state, automatic 429 retries, worktree setup, fork/continue idempotency, and approval/question snapshot fences.
  • Voice input lifecycle — Introduces a pure reducer and injectable platform drivers for native and paired-Mac dictation, with canonical resource teardown and session-fenced callbacks.
  • Coverage and shipping inventory — Adds focused XCTest coverage for the extracted machines and registers all new app/test sources in the Xcode project and shipping checks.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant