| 1 | # Native task view release follow-ups |
| 2 | |
| 3 | Branch `native/task-view-followups`, from main `77e56eb2`, in its own |
| 4 | physical TMPDIR worktree. This follows the controller's 2026-11-26 ruling |
| 5 | after slice 3 landed. No merge to main, deployment or release. |
| 6 | |
| 7 | ## Behavior |
| 8 | |
| 9 | The latest open merge, direction or held card takes priority. Only when none |
| 10 | exists does the latest open question appear in the pinned decision area. |
| 11 | Questions reuse LiveQuestionCard, including arbitrary model-written options, |
| 12 | free-text answers and remembered project names, as before slice 3. Unknown |
| 13 | card kinds do not displace a known decision or question. |
| 14 | |
| 15 | For cards with protocol-defined choices, any unknown option makes the whole |
| 16 | card use the existing web fallback. No known choice is left available while |
| 17 | another choice is hidden. Question options are model text, not protocol enums. |
| 18 | |
| 19 | Hosted marker names and stored failed names use the same whitespace collapse |
| 20 | and 120-byte UTF-8 clip as runner/thin/judge_hosted.go. Clipping removes whole |
| 21 | Unicode scalars, not bytes or extended grapheme clusters. The older-payload |
| 22 | Failed header fallback uses the same normalization. Original bounded log |
| 23 | lines, including unnormalized markers, remain intact and in order. |
| 24 | |
| 25 | The ordinary answer path uses sendAnswer's busy guard directly. Merge still |
| 26 | checks busy before creating a confirmation. Confirm preserves its pending |
| 27 | intent while another operation is busy. This removes a redundant outer guard |
| 28 | that made the sendAnswer guard unreachable in isolation during mutation tests. |
| 29 | |
| 30 | No new copy, API fields, routes or server behavior. |
| 31 | |
| 32 | ## Test-first verification |
| 33 | |
| 34 | Command: `swift test --package-path native/apple --filter |
| 35 | 'TaskDecisionTests|HostedSectionTests|TaskDetailModelTests'`. |
| 36 | |
| 37 | Before implementation, 28 tests ran with 19 assertion failures: question |
| 38 | fallback, whole-card fallback, and hosted name normalization. The busy |
| 39 | regressions already passed against the existing guards. After implementation, |
| 40 | all 28 passed. The tests include merge priority over a newer question, a |
| 41 | question alone, closed-question exclusion, mixed known/unknown options for |
| 42 | merge/direction/held, double spaces and tabs on either side of hosted matching, |
| 43 | over-120-byte names on either side, and a multibyte scalar crossing byte 120. |
| 44 | Every normalized section test reconstructs the original log byte-for-byte. |
| 45 | |
| 46 | Mutation commands, results and final gates follow below. |
| 47 | |
| 48 | ## Mutations |
| 49 | |
| 50 | `python3 "$TMPDIR/task-followups-mutate.py"` applies each mutation separately, |
| 51 | runs `swift test --package-path native/apple --filter <suite>`, requires an |
| 52 | assertion failure (not a compiler error), and restores the source in `finally`. |
| 53 | All ten were killed: |
| 54 | |
| 55 | | Mutation | Suite | Result | |
| 56 | | --- | --- | --- | |
| 57 | | Remove the question fallback | TaskDecisionTests | Assertion failure | |
| 58 | | Put questions in the priority group | TaskDecisionTests | Assertion failure | |
| 59 | | Skip unknown direction/held choices | TaskDecisionTests | Assertion failure | |
| 60 | | Filter unknown merge choices before presentation | TaskDecisionTests | Assertion failure | |
| 61 | | Stop normalizing marker names | HostedSectionTests | Assertion failure | |
| 62 | | Stop normalizing stored/header names | HostedSectionTests | Assertion failure | |
| 63 | | Remove whitespace collapse | HostedSectionTests | Assertion failure | |
| 64 | | Clip by character count instead of UTF-8 bytes | HostedSectionTests | Assertion failure | |
| 65 | | Remove confirm's busy guard | TaskDetailModelTests | Assertion failure | |
| 66 | | Remove sendAnswer's busy guard | TaskDetailModelTests | Assertion failure | |
| 67 | |
| 68 | The two busy survivors are now independently killed through public model |
| 69 | operations without exposing private implementation to tests. |
| 70 | |
| 71 | ## Gates |
| 72 | |
| 73 | `native/scripts/check-native.sh` passed: 319 tests in 41 suites with the one |
| 74 | pre-existing known issue, 327 byte-identical web strings, fixture/schema and |
| 75 | markdown checks, Mac build, and unsigned iPhone Simulator build. No new copy. |
| 76 | `git diff --check` passed. Linux hub CI is checked on the pushed commit. |
| 77 | |
| 78 | Logs and the reproducible mutation script are archived under |
| 79 | `site/build/slice3/delta-validation/task-view-followups/` in the audit checkout. |
| 80 | |