Skip to content

fix(ios): keep Chief attachments when trying a failed turn again - #27286

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/ios-resend-dup
Oct 29, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/ios-resend-dup

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Chief's Try Again rebuilt a failed input from text alone, dropping photos and files and substituting “Please try that again.” for attachment-only messages. It now resends the original text, image bytes and MIME type, files and file names, or an audio recording using the existing conversation APIs. Repeated taps send once. Missing original inputs or attachment bytes send nothing and keep the failure available for retry.

Leo's request:

well i just think we can improve it a f***ton more than it is now... it's slow it's bad it belabours the point in too many tooltips it's ugly in places it doesn't even work in places there's lots of functionality that needs to get in

This is the Chief portion of the retry fix. Failed agent Retry is handled separately by #27314 using the daemon's retry provenance. Edit and Resend remains separate; desktop edits fork before the edited turn. No shared CmuxConversation changes, menu removals, defaults, timers, or observers.

Validation:

  • Regression cases exercise the daemon send path for text, photos, files, attachment-only input, and repeated taps. Additional cases cover absent input, missing attachment bytes, and audio.
  • Static prepush checks passed at 66262e7. CI run 40835643733 passed macOS swift test and built/reran iOS simulator tests; the iOS step failed seven MacHomeFeedTests row-count waits plus TerminalSurfaceFramePacingTests. A focused same-head MacHomeFeedTests rerun is requested; those seven failures are not yet classified. TerminalSurfaceFramePacingTests failed identically in base run 40822120702.
  • Fleet request: base ba6bbf4; head 66262e7; run ChiefEngineRecoveryTests and ChiefRetryMessageTests, plus the iOS package compile. Run the existing retry regression at 0817d9a for red/green evidence.
  • Before/after dark and light screenshot scene: chief=-cmux-mobile-demo chief-open. Screenshots and fleet receipts pending.
  • Independent review pending coordinator dispatch; the local review launcher could not isolate its process scope.

Risk: retry uploads the original attachments again under a new outgoing message id. The original input remains intact if a complete resend cannot be constructed.

Agent session: agent session
🤖 Generated with Claude Code

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Validation requested at 66262e72f1e9402f25a329ea81a1a1dced35ccda: iOS package compile, ChiefEngineRecoveryTests|ChiefRetryMessageTests, and light/dark before/after captures with chief=-cmux-mobile-demo chief-open. The independent review launcher refused isolation because it would affect sibling processes; review has been requested through the coordinator instead. Draft remains until these receipts arrive.

@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-w51iea created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 66262e7

SHIP

No findings.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@teamleaderleo

teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

MacHomeFeedTests on its own: head 66262e72f1e9402f25a329ea81a1a1dced35ccda vs merge-base ba6bbf43e28b3d49f431d9438855650c90089347

This run decides whether the one failure from the full-kit run (aFailedOpenIsTriedAgain, MacHomeTests.swift:232, at the head) is the PR's.

Harness: the same for both SHAs, back to back on one AWS M4 Pro simulator host (Xcode 26.6, iPhone 17 Pro, iOS 26.5). No other xcodebuild or swift-test process ran during either side. The Rust FFI xcframework was built at each SHA first.

cd cmux-next-ios/CmuxMobileKit && xcodebuild test -scheme CmuxMobileKit-Package \
  -destination id=<iPhone 17 Pro, iOS 26.5>,arch=arm64 -parallel-testing-enabled NO \
  -enableCodeCoverage NO CODE_SIGNING_ALLOWED=NO -only-testing:CmuxMobileChiefTests/MacHomeFeedTests

For each SHA: one unmodified run (the receipt), then the same command with -test-iterations 5. Any side that failed was rerun with one diagnostic print after each until { feed.rows?.count == 4 } wait. The test logic was unchanged, and that rerun is labelled instrumented below.

test head 66262e7: run 1 head: 5 iterations base ba6bbf4: run 1 base: 5 iterations
readsTheMacsHomeListOverTheChiefChannel pass pass pass pass
aNewMessageOnTheMacReadsTheListAgain pass pass pass pass
listActionsWriteTheMacsListState pass pass fail: MacHomeTests.swift:205 Expectation failed: (owner.sent("conversation-inbox-op") → []).last → nil pass
aFailedOpenIsTriedAgain pass pass pass pass
theMacChiefsRowIsNamedByTheList pass pass pass pass
openedConversationsFollowTheLink pass pass pass pass
anotherMacStartsFromItsOwnList pass pass pass pass
total 7/7, exit 0 exit 0 6/7, exit 65 exit 0
  • Base failure: the base miss came while host load spiked (1-minute load 16 → 98 during that run; about 8–20 during the head runs). The instrumented base rerun passed 7/7. All seven row-count waits read expected=4 actual=4.
  • No crashes: neither SHA had a signal, abort or runner restart.
  • The PR doesn't touch the code under test. MacHomeTests.swift and every MacHome source are byte-identical at base and head. The PR changes ChiefSession.retryFailedTurn, ChiefRetryMessage and their tests.

Verdict: not the PR's red. At the head, the 7 tests pass every time in isolation (6 runs each). The same suite also fails on its own at base when the host is loaded, just in a different test. Both failures are the suite's own timing waits (until) running out under load.

A second, independent harness gave the same result: -only-testing of MacHomeListTests plus MacHomeFeedTests with -test-iterations 3, on a much busier AWS simulator host (load ~200). Head: 12/12 passed. Base: 11/12, with MacHomeFeedTests/listActionsWriteTheMacsListState failing again.

Full-kit runs side by side, the fleet's cmux-next-ios-sim.sh test:

SHA fleet step result
head 66262e7 72be827c5cebd81f8ac2b92e 1402 passed, 1 failed (MacHomeFeedTests/aFailedOpenIsTriedAgain, MacHomeTests.swift:232 await until { feed.rows?.count == 4 }), 1 skipped
red 0817d9a d4bbf5cffc028bc10cb4cb61 1397 passed, 2 failed: ChiefEngineRecoveryTests/tryAgainSendsTheMessageTheFailedTurnAnswered (the red this PR fixes) and WorkspaceTabsSourceTests/closingATabWithARunningProgramAsks
base ba6bbf4 e87ad3b0a4da40c98ccaa450 1399 passed, 0 failed, 1 skipped (Xcode 26.6, iPhone 17 Pro / iOS 26.5, exit 0)

Base passed the full kit, so neither full-kit failure (aFailedOpenIsTriedAgain at the head, closingATabWithARunningProgramAsks at 0817d9a) is a confirmed base red. Both are timing waits running out: the head's MacHomeFeedTests failure passes in every isolated run above and the base fails a sibling test the same way under load.

Agent session: agent session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Exact-head SHIP remains at 66262e7. The paired MacHomeFeed receipts establish the corresponding failures on base (head 7/7 versus base 6/7, and head 12/12 versus base 11/12).

The remaining WorkspaceTabsSourceTests assertion needs one focused rerun at this head, in the original failing environment. Commands:

  • swift test --package-path cmux-next-ios/CmuxMobileKit --filter WorkspaceTabsSourceTests
  • Simulator equivalent: scripts/ci/cmux-next-ios-sim.sh test only=CmuxMobileWorkspacesTests/WorkspaceTabsSourceTests

If it passes, record the receipt and proceed through fast gates to ready and the pinned merge. If it fails, inspect the per-test error and fix it. Dispatch is currently blocked because the message relay cannot read the destination session list; no rerun success is claimed.

@teamleaderleo
teamleaderleo marked this pull request as ready for review October 29, 2026 20:48
@github-actions

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 66262e7: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27286 -f ref=lane/ios-resend-dup -f platform=macos -f backend_mode=local

@teamleaderleo
teamleaderleo merged commit 5b2fb22 into feat-cmux-next Oct 29, 2026
196 of 207 checks passed
@teamleaderleo
teamleaderleo deleted the lane/ios-resend-dup branch October 29, 2026 20:48
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 66262e72 Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #75527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant