Repository navigation
test(ios): fix Phase 6 suite failures and add Live Activity state coverage - #119
sambitcreate wants to merge 2 commits into
Conversation
…erage Re-run of the bot-first Phase 6 acceptance surfaced five stale test assumptions rather than contract regressions: the shared fixture moved to contractRevision 10, en_US cadence labels emit U+202F before AM/PM, the app-hosted snapshot harness required a foregroundActive scene during launch transition, the avatar diagnostic test used a revision rejected before the network layer, and the legacy chat-list boundary now surfaces invalidResponse after recording the contract diagnostic. A JSON serialization crash on ReversedCollection is also fixed. Adds AidenBotLiveActivityStateTests covering the Live Activity identity/stale/revoked state machine without a physical ActivityKit device, registered in the Xcode project and shipping allowlist. Acceptance evidence recorded in docs/testing/aiden-on-the-go.
There was a problem hiding this comment.
ℹ️ No critical issues — small documentation fixes in the new acceptance record, plus one nitpick.
Reviewed changes
- Live Activity state coverage — adds
AidenBotLiveActivityStateTests.swiftwith 8 pure state-machine tests overAgentRunActivityStateReducer,AgentLiveActivityReusePolicy,AgentRunActivitySanitizer, andAgentRunElapsedTimeFormatter, registered in the Xcode test target and the shipping allowlist. - Phase 6 stale-test corrections — fixture revision
9 → 10, locale-whitespace normalization for cadence labels, window-scene fallback for the snapshot harness, a canonicalavatar_revision_…so the avatar diagnostics contract is actually reached, and the twoAidenRemoteClientTestsassertion fixes (direct-decode field pin plusArray(reversed())). - Acceptance evidence — records the signed physical-device re-run and guard results in
docs/testing/aiden-on-the-go/bot-first-phase-6-suite-acceptance.md.
I traced the new tests against the production reducer/sanitizer and checked each corrected assumption against the tree: the fixture is contractRevision: 10, the client boundary wraps decode rejections as invalidResponse (ios/AidenOnTheGo/Networking/AidenRemoteClient.swift:1817), and AidenChatSummaryPage.init(from:) enforces canonical ordering. Running node --test over the five test:ios-release scripts passes 31/31 here (shipping guard 13/13), and the Ruby policy test reports 20 runs / 42 assertions.
ℹ️ Nitpicks
- Both new files end without a trailing newline (the diff shows
\ No newline at end of file), while every sibling Swift test file and phase doc ends with one.
DeepSeek Flash | 𝕏
|
|
||
| ## Known failures fixed (test-only; security contracts preserved) | ||
|
|
||
| All five failures were test-side encoding of now-changed, valid semantics. No app, scene, widget, or shared source was modified. |
There was a problem hiding this comment.
The numbered list below has six entries (items 5 and 6 are both in AidenRemoteClientTests.swift), while this sentence and the PR description say five. Either count can be correct, but the two should agree.
| All five failures were test-side encoding of now-changed, valid semantics. No app, scene, widget, or shared source was modified. | |
| All six failures were test-side encoding of now-changed, valid semantics. No app, scene, widget, or shared source was modified. |
|
|
||
| ```text | ||
| npm run test:ios-release | ||
| PASS — 20 Ruby runs / 42 assertions, 30 Node release-policy tests, 0 failures |
There was a problem hiding this comment.
The five scripts run by test:ios-release currently register 31 tests (3 + 5 + 13 + 6 + 4 = 31), not 30 — reproduced at this head with node --test.
| PASS — 20 Ruby runs / 42 assertions, 30 Node release-policy tests, 0 failures | |
| PASS — 20 Ruby runs / 42 assertions, 31 Node release-policy tests, 0 failures |
Addresses pullfrog nitpick on PR #119.
|
Closing as stale during PR triage (2026-09-29). Reopen if still wanted. |

Summary
AidenRemotePhase0Tests: assertcontractRevision == 10to match the canonical fixtureAidenScheduledTaskTests: normalize U+202F/NBSP so cadence assertions compare semantic labels, not locale separator glyphsAidenBotPrototypeSnapshotTests: fall back toforegroundInactive/anyUIWindowSceneduring test-launch transition instead of failing a legitimate renderAidenNativeIntegrationTests: use a canonicalavatar_revision_…so the avatar test reaches the network-layerCache-Controlcontract instead of failing closed earlyAidenRemoteClientTests: pin thechildrenLatestMessagesrejection at direct decode, accept the wrappedinvalidResponseat the client boundary, and wrapsummaries.reversed()inArray(...)so the ordering check reaches the decoderAidenBotLiveActivityStateTests— 8 tests covering Live Activity identity/stale/revoked state-machine semantics without requiring a physical ActivityKit device; registered in the Xcode project and shipping allowlistdocs/testing/aiden-on-the-go/bot-first-phase-6-suite-acceptance.mdTest plan
node --test scripts/check-ios-shipping-target.test.mjs— 13/13 pass