{"type":"transition_applied","payload":{"type":"transition_applied","status":"running","residency_state":"resident"}}
{"type":"assistant_message","payload":{"text":"I read this as a read-only red-team audit - I’ll trace reconciliation-to-question generation end to end, enumerate all field routes and tests, then judge v7 against concrete invariants and adversarial cases."}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"assistant_message","payload":{"text":"The first pass isolates the mechanism to nutrition onboarding’s reconciliation policy, service/store persistence, and CLI surface. I’m now tracing those symbols bidirectionally and checking whether v7 generalizes across the full field contract rather than only the newly tested equation-basis case."}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"assistant_message","payload":{"text":"The v7 delta is confirmed as a narrow `equation_sex_basis` phrase-table/filter patch. The end-to-end trace also exposes a second, independent preview path that bypasses profile persistence entirely, so a profile-only filter cannot establish the requested global guarantee. I’m validating that conclusion against the gateway tests and v7 source delta before finalizing the red-team matrix."}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":true}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"steered","payload":{"delivered":"steer"}}
{"type":"assistant_message","payload":{"text":"I read this as a read-only red-team audit - I traced reconciliation through both production and preview publication paths, mapped all 22 fields, and evaluated the v7 patch against deterministic gating requirements.\n\n# Verdict\n\n**Current v7 is not sufficient.**\n\nIt fixes one symptom for `equation_sex_basis` using a static phrase table and field-specific filtering. It does not establish the required invariant:\n\n> A customer clarification may exist only when a deterministic field or cross-field policy derives a currently unresolved issue from the digest-bound answers.\n\nThe model remains the authority deciding whether to ask questions for 21 fields, and the preview path bypasses the v7 profile filter entirely.\n\nNo files or runtime state were changed.\n\n## Critical findings\n\n### 1. The model still authorizes questions\n\n`installed/gateway/platforms/nutrition_onboarding_reconciler.py:35-106`\n\nThe reconciler sends all answers to the model and accepts its `clarifications` after only structural validation. The prompt explicitly asks the model to choose `field`, `kind`, and `question_ko`.\n\n`installed/gateway/platforms/nutrition_onboarding_reconciliation.py:236-315`\n\n`parse_reconciliation_json()` proves only:\n\n- canonical field name;\n- allowed kind;\n- unique field;\n- bounded text;\n- presence of a clarification when advisory ambiguity/contradiction lists are nonempty.\n\nIt does **not** prove that any ambiguity or contradiction exists in the answers.\n\n### 2. v7 only handles one field\n\nChanged symbols:\n\n- `checkin_cli/nutrition_onboarding_models.py:79-119`\n  - `_EQUATION_SEX_BASIS_ANSWERS`\n  - `canonical_equation_sex_basis`\n- `checkin_cli/nutrition_onboarding.py:56-79`\n  - `_normalized_reconciliation_inputs`\n- `NutritionOnboardingService.submit_answer`\n- `NutritionOnboardingService.record_reconciliation`\n- `NutritionOnboardingService.replace_stale_reconciliation`\n- `NutritionOnboardingService.revise_reconciliation_answer`\n\nThe source delta confirms exactly four changed files and no gateway changes:\n\n- `checkin_cli/nutrition_onboarding.py`\n- `checkin_cli/nutrition_onboarding_models.py`\n- `tests/test_nutrition_onboarding.py`\n- `tests/test_nutrition_onboarding_models.py`\n\nThus preview and model parsing were intentionally untouched.\n\n### 3. Mixed clarifications can still publish the filtered question on the first pass\n\nIn production publication:\n\n`installed/gateway/platforms/telegram_nutrition_onboarding_runtime_publication.py:84-123`\n\nThe gateway retains the original model object in `reconciliation`, calls the service to persist a possibly filtered record, then reads:\n\n```python\nclarifications = reconciliation.clarifications\ncurrent_index = int(record[\"current_index\"])\n```\n\nIf the model returns:\n\n1. redundant `equation_sex_basis`;\n2. another clarification;\n\nthe profile service filters item 1 from the persisted record, but first publication still indexes the unfiltered model tuple and publishes item 1. A restart may load the filtered advisory, so behavior differs before and after restart.\n\nThis is a concrete model/persistence split-brain defect.\n\n### 4. Preview bypasses profile reconciliation completely\n\nRoute:\n\n- `telegram_nutrition_onboarding_preview_flow.py:_finish_answers`\n- `telegram_nutrition_onboarding_preview_completion.py:build_preview_completion`\n- `reconcile_preview_answers`\n- `NutritionOnboardingReconciler.reconcile`\n- `render_clarification_text`\n- `_publish_clarification`\n\nAt `telegram_nutrition_onboarding_preview_completion.py:128-137`, any model clarification is published directly. There is:\n\n- no profile service;\n- no deterministic filter;\n- no answers digest;\n- no durable reconciliation record;\n- no restart-safe clarification cursor.\n\nTherefore v7 cannot provide a global guarantee.\n\n### 5. Filtering clears unrelated advisory evidence\n\n`checkin_cli/nutrition_onboarding.py:74-78`\n\nWhen the only persisted clarification is filtered, v7 clears the entire:\n\n- `ambiguities_ko`;\n- `contradictions_ko`.\n\nThose lists are unkeyed, so the code cannot prove they concern `equation_sex_basis`. An unrelated advisory ambiguity or contradiction is silently deleted.\n\nConversely, when another clarification remains, the equation-related advisory text may remain because individual advisory entries cannot be associated with fields.\n\n### 6. Clarification answers are not generally proven to resolve anything\n\n`NutritionOnboardingService.revise_reconciliation_answer`, lines 568-621, validates only `equation_sex_basis`. For every other field it:\n\n1. writes the supplied value;\n2. advances the cursor;\n3. marks the reconciliation resolved after the final cursor.\n\nIt does not rerun field or cross-field policy. An unchanged, invalid, or still-contradictory answer can resolve the record.\n\nThe preview has the same issue at `telegram_nutrition_onboarding_preview_flow.py:129-153`: it advances through the original list, then suppresses further clarifications with `allow_clarifications=False`.\n\n### 7. Parser and persistence disagree on clarification count\n\n- Gateway parser permits up to all 22 fields:\n  `nutrition_onboarding_reconciliation.py:239`\n- Profile persistence permits at most 3:\n  `checkin_cli/nutrition_onboarding_reconciliation.py:53,64-65`\n\nA model returning four structurally valid questions passes gateway parsing but fails profile persistence. Production catches the error and falls back to the generic attestation card; preview can publish all four sequentially.\n\n### 8. Privacy is unnecessarily exposed\n\n`NutritionOnboardingReconciler.reconcile` serializes all raw answers, including:\n\n- full date of birth;\n- conditions;\n- medications;\n- pregnancy/breastfeeding;\n- eating-disorder risk;\n- allergies and restrictions.\n\nThe model may echo these values into `question_ko`, and `render_clarification_text` publishes that text verbatim. Profile persistence also accepts arbitrary `advisory: dict[str, object]` without the gateway’s size/schema constraints.\n\nA deterministic question renderer should never interpolate customer values. Safety-sensitive fields should lead to existing safety/owner review policy, not model-authored probing.\n\n### 9. Initial reconciliation creation is race-prone\n\n`record_reconciliation()` performs read/check/write without `self.store.locked()`. `replace_stale_reconciliation()` uses the lock.\n\nConcurrent publication attempts can both invoke the model and race to persist differing reconciliation records. Publication generation/outbox logic protects many delivery cases, but it does not make nondeterministic model decisions equivalent.\n\n## Complete route and caller map\n\n### Production route\n\n1. All 22 answers collected through:\n   - `TelegramNutritionOnboardingRuntimeCollectionMixin.handle_text`\n   - `telegram_nutrition_onboarding_copy.parse_answer`\n   - `NutritionOnboardingService.submit_answer`\n2. On `customer_attestation`:\n   - `TelegramNutritionOnboardingRuntimePublicationMixin._publish`\n   - `service.reconciliation_answers`\n   - `service.reconciliation_record`\n   - `NutritionOnboardingReconciler.reconcile`\n   - `parse_reconciliation_json`\n   - `service.record_reconciliation` or `replace_stale_reconciliation`\n3. Customer question:\n   - `render_clarification_text`\n   - `_send_publication`\n4. Reply:\n   - runtime collection reads publication payload’s `clarification_field` and `answers_digest`\n   - `parse_answer`\n   - `service.revise_reconciliation_answer`\n   - `advance_reconciliation`\n5. Completion:\n   - `require_resolved_reconciliation`\n   - `attest_baseline`\n   - safety hold or owner review.\n\n### Preview route\n\n1. `TelegramNutritionOnboardingPreviewFlowMixin.handle_text`\n2. `_finish_answers`\n3. `build_preview_completion`\n4. `reconcile_preview_answers`\n5. `NutritionOnboardingReconciler.reconcile`\n6. direct `render_clarification_text`\n7. `_publish_clarification`\n8. `_advance_clarification`\n9. final model rerun with `allow_clarifications=False`.\n\n### Non-customer callers\n\n`nutrition_onboarding_cli.py` exposes status, purge, migration, and owner review only. It does not create reconciliation questions.\n\n## All 22 fields and required deterministic treatment\n\n| Field | Deterministic proof before clarification |\n|---|---|\n| `date_of_birth` | ISO date, not future, derived age 18-120 |\n| `equation_sex_basis` | Closed enum: `male`, `female`, `decline` |\n| `height_cm` | Decimal in 120-250 |\n| `weight_kg` | Decimal in 35-300 |\n| `activity_category` | Closed activity enum |\n| `activity_rationale` | Bounded normalized text; required/nonempty if product policy requires it |\n| `goal_type` | Closed `loss/maintain/gain` enum |\n| `target_weight_kg` | Null for maintain; bounded and present for loss/gain |\n| `target_date` | Null for maintain; valid future date and present for loss/gain |\n| `allergies` | Exact structured status/items contract |\n| `intolerances` | Exact structured status/items contract |\n| `religious_ethical_exclusions` | Exact structured status/items contract |\n| `disliked_foods` | Exact structured status/items contract |\n| `dietary_preferences` | Exact structured status/items contract |\n| `conditions` | Exact structured contract; provided values trigger safety review, not model questioning |\n| `medications` | Exact structured contract; provided values trigger safety review, not model questioning |\n| `pregnancy_breastfeeding` | Exact `true/false/null`; null or true remains safety policy |\n| `eating_disorder_risk` | Exact `true/false/null`; null or true remains safety policy |\n| `cooking_access` | Bounded normalized text; explicit empty policy |\n| `budget_band` | Closed band or bounded explicit answer, according to product contract |\n| `meal_count` | Integer 2-6 |\n| `schedule_constraints` | Bounded normalized text; explicit none representation |\n\nCross-field proofs should include at minimum:\n\n- maintain implies both target fields are null;\n- loss/gain implies both target fields are present;\n- target date is future relative to a persisted reference date;\n- loss target is below current weight; gain target is above current weight, if that is product policy;\n- exact normalized set intersections for restrictions versus preferences can establish a contradiction;\n- safety-sensitive disclosures never require extra model interrogation before safety hold.\n\nFree-text semantic uncertainty cannot be deterministically proven after accepting arbitrary text. The correct fix is an explicit collection grammar or treating customer text as authoritative—not asking the model to guess whether it is vague.\n\n# Smallest robust root fix\n\nImplement one profile-owned deterministic policy and make both gateway routes consume it.\n\nSuggested location:\n\n`checkin_cli/nutrition_onboarding_reconciliation.py`\n\nSuggested symbols:\n\n```python\nclass ReconciliationIssue:\n    field: canonical field\n    kind: ambiguity | contradiction\n    reason_code: closed enum\n\ndef evaluate_reconciliation_issues(\n    answers: Mapping[str, object],\n    *,\n    reference_date: date,\n) -> tuple[ReconciliationIssue, ...]\n```\n\nThen:\n\n1. **Ignore model clarifications for authority.**\n   Model output may supply advisory summary/facts/safety observations only.\n\n2. **Build persisted clarifications exclusively from deterministic issues.**\n   Prefer persisting `field`, `kind`, and `reason_code`; render customer copy from the canonical field prompt. Do not persist or publish model `question_ko`.\n\n3. **Render from the persisted record, never the pre-persistence model object.**\n   Fix `_publish` to deserialize the returned record after `record_reconciliation()`.\n\n4. **Use the same evaluator in preview.**\n   Preview must derive issues before deciding `phase=\"clarifying\"`.\n\n5. **Re-evaluate after every clarification answer.**\n   Replace blind `advance_reconciliation()` with rebuilding remaining issues against the new answers. A field advances only if its issue is actually gone.\n\n6. **Validate/canonicalize at initial collection where possible.**\n   Invalid enum, range, date, structured status, or cross-field answer should cause the existing deterministic field prompt to be repeated before model invocation.\n\n7. **Preserve safety separately.**\n   Conditions, medications, pregnancy, and eating-disorder signals continue through `requires_safety_hold` and clinical review. Advisory contradictions cannot clear or create safety state.\n\n8. **Lock initial create and stale replacement.**\n   The lock must cover read/check/build/write for both methods.\n\n9. **Minimize model input.**\n   Exclude DOB and raw health/medication item text where not needed for an advisory summary. Questions must contain no customer-derived interpolation.\n\nThis avoids static answer phrase tables and field-by-field model-output filtering. A closed parser table for UI enum labels is acceptable at ingress; a growing phrase table used to suppress hallucinated questions is not.\n\n# Required invariants\n\n1. `persisted_clarifications == evaluate_reconciliation_issues(digest_bound_answers)`.\n2. No model field, kind, list entry, or prose can add or remove an issue.\n3. Every published clarification is present in the current persisted issue set.\n4. Published question text is deterministic from `field + reason_code` and contains no answer values.\n5. Updating an answer recomputes all affected field and cross-field issues.\n6. A reconciliation is resolved iff the recomputed issue set is empty.\n7. Safety state is derived independently from model output.\n8. Advisory ambiguities/contradictions are never used as authorization.\n9. Initial create, stale replacement, and clarification revision are serialized and digest-bound.\n10. Runtime and preview produce the same issue set for identical answers.\n11. Restart does not change question order, wording, cursor, or answers digest.\n12. Duplicate updates never invoke the model twice or publish a second question.\n13. Policy ordering and any maximum-question behavior are deterministic. Exceeding a cap must not silently drop unresolved issues.\n\n# Adversarial test matrix\n\n| Case | Expected result |\n|---|---|\n| Model asks about every valid field | Zero clarifications |\n| Model asks about valid sex plus a real goal/target contradiction | Only deterministic goal/target issue; never sex |\n| Model advisory lists contradiction but emits no question | Advisory retained or redacted; no gate unless policy derives issue |\n| Model emits question but advisory lists are empty | Rejected from authority |\n| Valid answer phrased outside sex phrase table | Ingress parser decides validity; model cannot decide |\n| Sex text contains both male and female | Deterministic enum issue remains |\n| Maintain plus target weight/date | Deterministic contradiction |\n| Loss/gain missing one target field | Deterministic ambiguity |\n| Loss target above current weight | Deterministic contradiction if direction policy is enabled |\n| Structured `none` with items | Deterministic validation failure |\n| Structured `provided` with no items | Deterministic validation failure |\n| Preference exactly intersects allergy | Deterministic cross-field contradiction |\n| Conditions or medication disclosed | Safety review; no model-generated probing |\n| Pregnancy/eating-risk unknown | Preserve safety ambiguity; do not auto-resolve |\n| Clarification reply repeats original invalid value | Same issue remains |\n| Clarification reply fixes one of two cross-field inputs | Recompute both; clear only resolved issue |\n| Four real issues | Stable deterministic ordering; no gateway/profile 22-vs-3 mismatch |\n| Filtered plus retained issue on first publication | First card equals persisted first issue |\n| Restart during clarification | Same digest, issue, cursor, and copy |\n| Stale reconciliation after answer mutation | Atomic replacement from current answers only |\n| Concurrent first publications | One persisted winner; no divergent customer cards |\n| Duplicate update after durable mutation | No second model call or question |\n| Model echoes DOB/medication in `question_ko` | Text never reaches publication or persistence |\n| Preview with identical answers | Same deterministic issue set as production |\n| Model unavailable | Deterministic issues still work; advisory summary alone may fail |\n| Tampered advisory lists | Cannot affect resolved/clarifying state |\n| Tampered issue/cursor/digest | Fail closed before publication or attestation |\n\n## Existing test coverage\n\nRelevant profile tests:\n\n- `tests/test_nutrition_onboarding.py`\n  - authorization/copy-only reconciliation answers;\n  - digest-bound revision;\n  - three canonical sex normalizations;\n  - ambiguous sex with both `ambiguity` and `contradiction`;\n  - final reconciliation digest binding.\n- `tests/test_nutrition_onboarding_models.py`\n  - supported sex phrase table;\n  - substring rejection.\n- `tests/test_owner_v1_contract.py`\n  - iterates all fields, but does not exercise reconciliation questions.\n\nRelevant gateway tests found in the installed test set:\n\n- production enforces persisted reconciliation;\n- resolved summary controls;\n- stale record regeneration/replacement;\n- real-service stale digest behavior;\n- publication restart/outbox/deduplication.\n\nMissing coverage:\n\n- no all-22 deterministic clarification policy;\n- no hallucinated-question rejection;\n- no mixed filtered/retained first-publication case;\n- no preview policy parity;\n- no resolution re-evaluation;\n- no advisory-list preservation;\n- no privacy-echo test;\n- no initial-create race test;\n- no 22-versus-3 limit contract test.\n\nVerification limitation: the isolated source virtual environment does not contain `pytest` (`No module named pytest`), so I could not execute the focused suite. Static tracing and source-delta comparison were completed; no writes occurred."}}
{"type":"assistant_message","payload":{"text":"I read this as an expanded read-only red-team audit - I’ll map one uninterrupted 22-field production journey through every human handoff, compare it with preview and the current v7 observer/launcher assertions, and return the missing adversarial cases plus required evidence before any live invite."}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"read","is_error":false}}
{"type":"tool_execution","payload":{"tool":"bash","is_error":false}}
{"type":"assistant_message","payload":{"text":"I read this as an expanded read-only red-team audit - I mapped the one-pass production journey and identified what must be proven before another live invite.\n\n# Stop verdict\n\n**BLOCK another live invite.**\n\nThe current v7 harness does not observe or prove the requested golden path. It stops at invite delivery. Its “lifecycle observer” does not observe lifecycle transitions at all.\n\n## Existing evidence proves only invite preparation\n\n`deployment/v7/receipt.jsonl` contains:\n\n1. `DRY_RUN`\n2. `ONE_USE`\n3. `PROVIDER_READY`\n4. `PREPARED`\n5. `RUNTIME_READY`\n6. `MEMBERSHIP_READY`\n7. `READY`\n8. `INVITE_INTENT`\n9. `INVITE_RESULT`\n10. `READY_CUSTOMER_CLAIM`\n11. `CLEAN_ROLLBACK`\n\nIt contains no evidence for:\n\n- customer claiming the invite;\n- any of the 22 answers;\n- reconciliation;\n- customer attestation;\n- owner review;\n- finalization;\n- activation;\n- check-in;\n- generation;\n- approval;\n- capability issuance;\n- customer send;\n- screenshot;\n- successful retained cleanup.\n\nThe final rollback reports:\n\n```text\nreason = \"transient gateway/observer already active\"\nstatus = BLOCKED_CLEAN_ROLLBACK\n```\n\nThat means even cleanup was not established by a clean terminal proof.\n\n# Observer defect\n\n`lifecycle_observer_v7.py` declares states:\n\n```text\nmembership_hash_chain\npolling_receipts\nonboarding\ncheckin\ngeneration\napproval_card\ndelivery_capability\ndelivery\ncleanup\n```\n\nBut in `observe` mode it only:\n\n1. creates an events file;\n2. writes one `SUBSCRIBED` event;\n3. writes `observer-ready.json`;\n4. sleeps for six hours;\n5. exits blocked on timeout.\n\nIt never reads:\n\n- Telegram polling receipts;\n- onboarding workflow;\n- reconciliation records;\n- registry or activation journal;\n- check-in events;\n- generation ledger;\n- approved-card projection;\n- capability ledger;\n- transport receipts;\n- screenshots;\n- cleanup state.\n\nThe state list is therefore descriptive metadata, not evidence.\n\n# Required one-pass golden path\n\nThe next rehearsal must use a synthetic customer and the exact installed candidate, not preview. It must subscribe before the invite and produce one append-only, digest-linked evidence chain.\n\n## 1. Invite and claim\n\nRequired proof:\n\n- exact candidate, wheel, interpreter, config, registry and membership digests;\n- one `INVITE_INTENT` followed by one terminal `INVITE_RESULT`;\n- invite message ID, destination digest and bootstrap session/generation;\n- customer presses Start from the bound private route;\n- bootstrap state changes exactly once;\n- stale, duplicated and wrong-actor Start actions mutate nothing.\n\nThe current launcher proves invite send only, not claim.\n\n## 2. All 22 production answers\n\nExercise the actual chain:\n\n```text\nTelegram message\n -> runtime collection\n -> parse_answer\n -> NutritionOnboardingService.submit_answer\n -> durable workflow\n -> next production publication\n```\n\nUse exactly one accepted response for each field:\n\n1. `date_of_birth`\n2. `equation_sex_basis`\n3. `height_cm`\n4. `weight_kg`\n5. `activity_category`\n6. `activity_rationale`\n7. `goal_type`\n8. `target_weight_kg`\n9. `target_date`\n10. `allergies`\n11. `intolerances`\n12. `religious_ethical_exclusions`\n13. `disliked_foods`\n14. `dietary_preferences`\n15. `conditions`\n16. `medications`\n17. `pregnancy_breastfeeding`\n18. `eating_disorder_risk`\n19. `cooking_access`\n20. `budget_band`\n21. `meal_count`\n22. `schedule_constraints`\n\nTo exercise v7 specifically, the equation response should be a supported natural form such as `넵 남성입니다`, followed by proof that the stored answer is canonical `male`.\n\nRequired evidence per field:\n\n- field index and canonical field name;\n- inbound Telegram update/message ID and route digest;\n- pre/post cursor;\n- consumed-update proof;\n- canonical answer-set digest after mutation;\n- publication generation and message ID for the next field;\n- no raw answer in observer output;\n- previous question retired;\n- no duplicate publication for replayed updates.\n\nAfter field 22:\n\n- cursor exactly 22;\n- state exactly `customer_attestation`;\n- all canonical fields present once;\n- no unknown or extra field;\n- answer digest independently reproduced.\n\n## 3. Reconciliation\n\nRequired proof:\n\n- model invocation count exactly one for the current answer digest;\n- persisted reconciliation digest bound to that digest;\n- deterministic policy issue set independently recomputed;\n- no clarification unless that policy set is nonempty;\n- published content derived from the persisted record, not the transient model object;\n- production output contains no `[PREVIEW]` marker;\n- preview session and preview in-memory state are absent.\n\nFor a valid golden fixture, expected result is:\n\n```text\nstate = resolved\nclarifications = []\ncurrent_index = 0\n```\n\nThe current v7 patch cannot guarantee this across all fields.\n\n## 4. Customer attestation\n\nRequired proof:\n\n- card generation, body digest, message ID and callback token bind to the resolved reconciliation;\n- exact customer identity/chat/topic membership;\n- one `attest` callback;\n- callback update consumed once;\n- `require_resolved_reconciliation` succeeds against the current answer digest;\n- baseline candidate includes the same reconciliation digest;\n- customer receives confirmation;\n- state becomes `owner_review` or a deterministically justified `safety_hold`;\n- no activation occurs yet.\n\nNegative controls:\n\n- stale attestation card;\n- wrong actor;\n- duplicate callback;\n- changed answers after reconciliation;\n- unresolved reconciliation;\n- provider/model unavailable.\n\nAll must fail without owner publication or activation.\n\n## 5. Owner review and finalization\n\nRequired proof:\n\n- owner card is sent only to the canonical owner route;\n- its generation, message ID, body digest and callback data are persisted;\n- customer answer values are minimized appropriately;\n- exact owner presses `owner_ok`;\n- owner callback receipt is persisted before the irreversible handoff;\n- finalization consumes the same baseline and reconciliation digests;\n- readiness documents and pointer agree;\n- customer remains disabled until activation;\n- final ready card is owner-only.\n\nCrash seams to exercise:\n\n1. after owner callback receipt, before `review_as_owner`;\n2. after `review_as_owner`, before finalization;\n3. after finalization artifacts, before publication;\n4. after publication provider receipt, before profile commit.\n\nA restart must converge without a second owner action or duplicate card.\n\n## 6. Activation\n\nRequired proof:\n\n- readiness audit passes immediately before activation;\n- registry authority, consent and membership evidence are current;\n- activation journal transitions once;\n- disabled registry entry becomes enabled once;\n- bootstrap session becomes activated once;\n- activation receipt binds readiness, registry and membership digests;\n- stale or duplicate activation is idempotent;\n- no delivery capability exists yet;\n- delivery flags remain non-authorizing.\n\nThe current v7 launcher does not invoke or observe activation.\n\n## 7. First production check-in\n\nRequired proof:\n\n- message belongs to the newly activated customer route;\n- canonical check-in event is appended once;\n- finalized event ID and check-in revision are independently derived;\n- safety policy runs before generation;\n- duplicate/replayed check-in cannot create a second finalized event;\n- generated draft binds the exact check-in event ID and revision.\n\nInclude one stale-answer edit or duplicate update as a negative control without changing the golden event.\n\n## 8. Draft generation and owner approval\n\nRequired proof:\n\n- one generation intent;\n- one model attempt;\n- generation lineage from pending to draft-created;\n- exact check-in revision pin;\n- owner card displays the same proposed targets and customer text as the canonical draft;\n- owner card message ID, route, nonce and payload digest are captured;\n- approval creates one immutable approved event/revision;\n- customer has received nothing.\n\nImportant seam:\n\n`telegram.py` catches failures from `persist_approved_delivery_card()` after editing the Telegram card. The owner can see an approved/send-capable card even when the durable approved-card projection failed. The rehearsal must fault this write and prove send/capability issuance remains impossible.\n\n## 9. One-use capability\n\nRequired proof:\n\n- exactly one `awaiting_capability` row exists;\n- capability issuance is a separate operator action;\n- all launch, customer route, owner route, draft, generation, check-in, revision, approved-event, payload and card pins match;\n- expiry is exactly bounded;\n- provider and Telegram actions remain zero during issuance;\n- wrong, stale, expired or second capability issuance is rejected.\n\nThe controller globally requires exactly one awaiting row. Test a stray second row: issuance must block rather than target the wrong customer.\n\n## 10. Customer send\n\nRequired proof sequence:\n\n1. owner presses Send on the exact persisted card;\n2. capability is validated;\n3. capability is durably marked consumed;\n4. delivery state becomes `unknown_provider_outcome`;\n5. only then is Telegram transport attempted;\n6. provider message ID is persisted;\n7. delivery becomes delivered and then `sent_audited`;\n8. customer receives one message whose body digest matches the approved payload.\n\nAdversarial cases:\n\n- duplicate Send callback;\n- stale card message ID or nonce;\n- changed owner/customer route;\n- expired capability;\n- changed draft/check-in revision;\n- crash after capability consumption but before Telegram call;\n- Telegram timeout after possible send;\n- receipt-write failure after confirmed send;\n- process restart in every intermediate state.\n\nNo ambiguous provider outcome may be retried automatically.\n\n## 11. Screenshot\n\nA screenshot is human-facing corroboration, not delivery authority.\n\nRequired evidence:\n\n- screenshot captured from the bound customer DM after the audited provider message ID exists;\n- image SHA-256;\n- capture timestamp;\n- expected Telegram message ID and approved body digest;\n- visual assertion that exactly one delivered card is shown;\n- no preview banner;\n- no other customer data or credentials;\n- private retention path and mode.\n\nThe observer must not treat screenshot presence as proof of send. The durable transport receipt remains authoritative.\n\n## 12. Cleanup\n\nRequired terminal proof:\n\n- retention interval completed or explicitly waived by a recorded authority;\n- screenshot archived or deleted according to policy;\n- transient gateway and observer stopped;\n- no active invite, onboarding workflow, preview session or capability;\n- no unreceipted publication;\n- no `unknown_provider_outcome`;\n- no duplicate customer delivery;\n- registry and activation artifacts retained or removed according to the declared test-customer policy;\n- temporary customer data removed through the supported cleanup path;\n- config flags restored unchanged;\n- baseline authority inventory compared before/after;\n- service state `inactive/dead`;\n- a final append-only `CLEANUP_COMPLETE`, not `CLEAN_ROLLBACK`.\n\n# Preview-versus-production seams\n\nThe golden path must explicitly prove preview was not involved.\n\nPreview differs materially:\n\n- consent is hardcoded `True`;\n- answers and clarification cursor are only in memory;\n- no answers digest;\n- no durable reconciliation;\n- model clarifications are published directly;\n- restart loses the session;\n- final rerun suppresses further clarifications;\n- publications are marked `[PREVIEW][NUTRITION ONBOARDING]`.\n\nRequired negative test:\n\nRun the same 22 synthetic answers through preview and production with a malicious reconciler that requests a question for every field. Production must publish only deterministically proven issues; preview must either use the same policy or be disabled. Current code fails this case.\n\n# Other seams existing tests miss\n\n1. **Transient versus persisted clarification mismatch**  \n   Filtering a clarification in the profile service does not replace the gateway’s in-memory model object before first publication.\n\n2. **Static sex phrase coverage**  \n   Tests prove selected phrases, not the actual full Telegram parser/service/persistence route.\n\n3. **Blind reconciliation advancement**  \n   Except for sex, clarification replies are not shown to resolve their issue.\n\n4. **Owner Revise always selects field 1**  \n   `op_rev` hardcodes `QUESTION_FIELDS[0]`, regardless of what the owner intended to revise.\n\n5. **Safety handoff**  \n   A golden fixture with no safety signal does not prove conditions, medication, pregnancy or eating-risk disclosures cannot be cleared by advisory output.\n\n6. **Attestation fallback card**  \n   Model/reconciliation errors can leave the generic attestation UI visible even though enforced attestation will reject.\n\n7. **Approved-card projection failure**  \n   Telegram edit succeeds while persistence failure is only logged.\n\n8. **Capability issuance races**  \n   Approval state can change between card persistence and external controller issuance.\n\n9. **Cross-suite mocks hide installed-package seams**  \n   Existing tests independently mock reconciliation, owner cards, activation and delivery. They do not prove the same installed candidate carries one digest chain across all phases.\n\n10. **Observer is non-observing**  \n    Declared states and handoffs are never validated.\n\n11. **Cleanup self-conflict**  \n    The current rollback calls `baseline()` before transient services are stopped or recognized as stopped, producing `transient gateway/observer already active`.\n\n# Minimum evidence acceptance gate\n\nBefore another invite, require one machine-verifiable bundle containing:\n\n- exact candidate and installed-origin proof;\n- observer subscription receipt;\n- 22 ordered redacted ingress receipts;\n- answer digest;\n- deterministic reconciliation issue proof;\n- reconciliation digest;\n- customer attestation receipt;\n- baseline/readiness digests;\n- owner review receipt;\n- activation receipt and registry digest;\n- finalized check-in event/revision;\n- generation lineage;\n- approved-card receipt;\n- capability issuance and consumption receipts;\n- Telegram transport receipt;\n- `sent_audited` terminal row;\n- screenshot hash and message-ID binding;\n- cleanup inventory and `CLEANUP_COMPLETE`;\n- adversarial results for stale, duplicate, wrong-route, crash and preview cases.\n\nUntil that bundle exists, the current `8191 passed`, `705 passed`, `51 passed`, and `55 passed` receipts demonstrate broad unit/integration health but do not demonstrate the requested one-pass live-safe journey."}}
{"type":"transition_applied","payload":{"type":"transition_applied","status":"completed","residency_state":"resident"}}
{"type":"reconcile_reattached","payload":{"session_path":"/home/cube/projects/richard/traning coach/.omo/senpi-task/children/st_01a01328/sessions/st_01a01328/2026-08-18T04-34-39-725Z_01a01326-69ed-7b58-8766-abef6ec1e82e.jsonl"}}
{"type":"reconcile_reattached","payload":{"session_path":"/home/cube/projects/richard/traning coach/.omo/senpi-task/children/st_01a01328/sessions/st_01a01328/2026-08-18T04-34-39-725Z_01a01326-69ed-7b58-8766-abef6ec1e82e.jsonl"}}
{"type":"transition_applied","payload":{"type":"transition_applied","status":"completed","residency_state":"evicted"}}
{"type":"evicted","payload":{"cause":"evict"}}
