I read this as an independent read-only audit - I’ll trace each claimed lifecycle phase to production APIs and authoritative artifacts, then specify a replacement acceptance contract and adversarial verifier tests with a PASS/BLOCK verdict.


I read this as a read-only Golden Path audit - I will give the verdict and a phase-by-phase executable acceptance contract.

## Bottom line

The current implementation is **not** a one-pass Golden Path.

- `source_golden_path.py` now fails closed before creating evidence, which is preferable to its previous pytest/declaration bundle. However, it only performs an AST name check for three hypothetical archive functions, then always exits with `actual_artifact_driver_not_implemented`. It drives no lifecycle phase.
- `verify_source_golden_path.py` still accepts a completely fabricated, internally consistent 21-artifact bundle:
  - `source_path` is never opened.
  - `source_sha256` hashes the copied `production_payload`, not production bytes.
  - `observed_commit` is an unchecked JSON assertion.
  - `candidate_digest`, `customer_key`, and `session_id` need only be non-empty and consistent.
  - No bootstrap, onboarding, registry, activation, event, generation, delivery, membership, archive, or cleanup ledger is opened.
  - Several `PRODUCTION_SCHEMAS` are invented or differ from actual schemas.
  - The final PASS artifact is self-authored and circular.
- The new verifier tests reject old shared-JUnit and generic declaration examples, but do not exercise the decisive attack: 21 unique forged envelopes with valid internal hashes.

The proper contract is one isolated profile, one sequential driver, production APIs for every transition, an observer armed before the first mutation, and independent verification directly against production-owned artifacts. Pytest results and harness envelopes may be supplementary diagnostics only.

### Common binding contract

Every accepted phase must preserve and independently recompute:

`candidate_digest -> profile identity -> bootstrap session_id/sid_hash -> customer_key -> customer/owner routes -> onboarding authority/reconciliation/baseline digests -> readiness/projection/activation transaction -> check-in session/event/revision -> draft_id/generation/record digest -> approval event/revision -> approved card -> capability -> delivery claim/provider message -> sent event -> archive operation`.

Fake adapters may log only:

- Exact method and call ordinal.
- Canonical request arguments.
- Simulated provider response or exception.
- Provider message/response ID.
- Redacted request/response byte digests.

They may not emit phase names, lifecycle states, authoritative counts, registry state, generation state, capability state, cleanup state, or PASS.

## Action plan

### Per-phase acceptance contract

Paths below are relative to the isolated profile root. `N` means `data/customers/<customer_key>/nutrition-onboarding`; `O` means `data/owner-actions`.

| Phase | Production operation | Authoritative artifact and verifier obligation | Fake I/O / blocker |
|---|---|---|---|
| `OBSERVER_SUBSCRIBED` | Existing partial APIs: `build_staff_chat_inventory`, `verify_subscription_readiness`, `MembershipJournal`. Required production seam: arm the actual membership-update handler and append an immutable `subscription_armed` receipt before invite preparation. | `data/onboarding/telegram-staff-membership-v1/events.jsonl`; recompute its hash chain, staff inventory digest, bot identity digest, epoch, starting update offset, and ordering before the first bootstrap commit. | Bot `get_me`/`get_chat_member` calls may be faked and logged. **BLOCKED:** `create_pre_activation_evidence` merely accepts caller-provided epoch/time; no API proves a subscription was armed. Inotify over the evidence directory is unrelated. |
| `INVITE_RECEIPTED` | `RoomBootstrapStore.prepare_rehearsal_customer_invite`, then `claim_rehearsal_customer_invite` from the simulated customer `/start`. | Observed production commit of `data/onboarding/telegram-room-bootstrap-v1/ledger.json` with exactly one `REGISTERING` session and one customer role claim. Recompute root `digest`, `customer_draft_digest`, `sid_hash`, generation, expiry, owner/customer separation, private-DM route, and inbound message ID. | Exact `/start` update may be fake. The plaintext token must not enter public evidence. Driveable only after the observer blocker is resolved. |
| `CONSENT_COMMITTED` | `TelegramCustomerBootstrapRegistration.handoff_rehearsal_customer`; consent-card publication; `handle_customer_consent_callback`; `RoomBootstrapStore.reconcile_committed_consent`; `TelegramNutritionOnboardingRuntime.start_after_consent`. | Bootstrap row at `AWAITING_ACTIVATION`; disabled registry row with `privacy-v1` consent; `N/transient/workflow.json`. Recompute bootstrap generations, card message binding, registry route, `consent_receipt_digest`, onboarding authority digest, and consumed update. | Consent-card send and callback may be fake; message ID and route must match both the log and production state. |
| `ONBOARDING_22_COMMITTED` | Drive `TelegramNutritionOnboardingRuntime.handle_text`/`NutritionOnboardingService.submit_answer` exactly 22 times. | `N/transient/workflow.json` in `customer_attestation`, cursor 22, all `QUESTION_FIELDS`, and 22 distinct consumed updates. Recompute canonical answers and authority digests from the file and registry. | Inbound Telegram messages may be fake. No harness-authored `answer_count` declaration. |
| `RECONCILIATION_COMMITTED` | Runtime publication path calling `record_reconciliation` or `replace_stale_reconciliation`. | Reconciliation embedded in `workflow.json`. Parse using the production reconciliation contract, then independently recompute answers digest, issue IDs, record digest, policy result, and require resolved state with no issues, holds, or visible IDs. | Reconciler request/response may be fake and logged. The fake response cannot write the reconciliation record directly. |
| `CUSTOMER_ATTESTED` | Exact current `attest` callback through `TelegramNutritionOnboardingRuntime.handle_callback`, invoking `NutritionOnboardingService.attest_baseline`. | `N/baseline-candidate.json` plus `workflow.json` at `owner_review`. Recompute source-answer digest, baseline digest, input-reconciliation binding, consumed update, and customer route/publication generation. | Callback may be fake. This phase is driveable; a status-only envelope is insufficient. |
| `OWNER_REVIEW_PUBLISHED` | `TelegramNutritionOnboardingRuntime._publish` through `_send_publication`. | `N/session.json` and `data/onboarding/telegram-publication-outbox-v1/{ledger.json,.receipt-key}` with one matching owner-role `COMMITTED` publication. Recompute render identity, payload digest, dispatch identity, HMAC receipt integrity, route, generation, and message ID. | Exact owner-card send/response may be fake. Provider ID alone is not authority. |
| `READY_DISABLED` | Exact `owner_ok` callback; `record_owner_callback`; `review_as_owner`; `NutritionOnboardingFinalizationMixin.finalize`. | Outbox `owner-callbacks.json`; `N/ready.json`; baseline, reconciliation, plan, policy, readiness receipt/current pointer; projection journal; registry still disabled. Run `audit_nutrition_start_readiness`, recompute every artifact digest, pointer bundle, projection transaction, callback integrity, and consumed update. | Owner callback may be fake. It must target the committed owner card. |
| `ACTIVATED` | `activate_customer_cutover`, which invokes `customer_admin.activate_customer` and `RoomBootstrapStore.activate_bound_customer`. | `data/customer-activation-journal.json`, `customer-activation-audit.jsonl`, membership activation-binding row, enabled registry, and bootstrap `ACTIVE` row. Invoke `validate_committed_activation`; recompute registry fingerprint, audit-record digest, readiness receipt, nutrition activation receipt, transaction ID continuity, routes, session, and generations. | Fresh membership queries may use the fake bot. Checklist/deployment/membership inputs must be independently hashed, not declared by the harness. |
| `CHECKIN_FINALIZED` | Production launcher/text flow ending in `NutritionCoachingCoordinator.handle_callback`. | Customer `wizard/events.jsonl`, `nutrition-plans/canonical-sequence.jsonl`, `O/checkin-finalization-journal.json`, `draft-requests.json`, and pending generation root. Validate the canonical event/sequence pair, exactly one finalized event, token `sha256(customer_key:session_id)[:16]`, committed finalization row, and pending generation binding. | Customer messages and callbacks may be fake. Duplicate finalization must not create a second event or job. |
| `GENERATION_DRAFTED` | `DraftGenerationWorker.run_once`, ending through `NutritionCoachingCoordinator.create_draft`. | `O/drafts.json`, `draft-generations.json`, `.authority.json`, `.root.json`, and canonical `draft_created` event. Parse every `DraftGenerationRecord`; recompute source/root digests, predecessor chain, check-in revision, draft text hash, provider receipt, authority, and lineage. Tip must be `draft_created`. | Model/provider may be fake. Raw response and accepted text digests must match the production coach artifacts. |
| `OWNER_APPROVED` | `NutritionCoachingCoordinator.approve_draft` with exact generation CAS values. | Draft row `approved`, canonical `draft_approved` event, and generation tip `approved`. Recompute approved revision from text; bind event ID, actor, customer, check-in event/revision, generation, predecessor, and record digest. | Owner callback may be fake. It cannot mutate these ledgers itself. |
| `APPROVED_CARD_PROJECTED` | Production card publication followed by `persist_approved_delivery_card`. | `O/draft-deliveries.json` row in `awaiting_capability`, with exact approved card route/message/nonce/payload digest; relevant generation-card ledger when used. Recompute delivery key, payload digest, idempotency key, approved event/revision, generation record, and canonical customer route. | Owner-card edit/send may be fake. Its response message ID must match the production projection. |
| `CAPABILITY_ISSUED` | `NutritionCoachingCoordinator.issue_delivery_capability` using a sealed `DeliveryLaunchAuthorization`. | Same delivery row at `pending` with one `draft-delivery-capability-v1` in `issued`. Recompute capability bindings, candidate/full/core/inventory/manifest/wheel/provider/profile pins, card, routes, revisions, generation record, issuance and ten-minute expiry. | No provider call is allowed in this phase. |
| `CAPABILITY_CONSUMED` | `claim_delivery_transport`/`validate_delivery_transport` immediately before transport. | Delivery row at `unknown_provider_outcome`, capability `consumed`, and returned opaque claim. Recompute claim identity, expiry-at-consumption, all capability bindings, current registry/consent/pause state, destination, card, generation, and payload. Require a single state transition and reject reuse. | Still no provider result. The fake transport call must occur only after this durable commit. |
| `SENT_AUDITED` | One fake customer transport call, then `record_delivery_transport_receipt`, `mark_delivered`, and `mark_sent_audited`. | Delivery row `sent_audited`; generation tip `sent_audited`; draft convenience row `sent`; canonical `draft_sent` event. Recompute all record chains and require the same provider message ID, route, text digest, draft ID, approval event, and claim across all artifacts. | Exactly one raw fake call is permitted. Count it from the adapter log rather than a payload field. |
| `SURFACE_CAPTURED` | Required production seam: persist a redacted outbound-surface receipt from the actual customer transport boundary. | Required receipt must bind delivery claim, route, provider message ID, canonical payload digest, UTF-16 length, redaction algorithm/version, and redacted bytes digest. Verifier derives the redacted surface independently from the raw fake request. | **BLOCKED:** no production capture/receipt API was found. The present `redacted-customer-surface-v1` schema is invented. |
| `QUIESCED` | Customer pause path through `handle_customer_pause_callback`/`CustomerServiceStateStore.set_paused`; terminal disable/consent withdrawal through `customer_admin.withdraw_customer`. | `O/customer-service-state.json` at paused plus disabled, non-consenting registry. Recompute its payload digest and inventory every generation, delivery, publication, recovery and finalization ledger; require no pending, dispatching, receipted, unknown, leased, or orphaned operation. | No fake I/O needed. This is driveable in an isolated single-process run, but is not archive or deletion proof. |
| `ARCHIVED` | Required APIs named by the source preflight: `archive_customer_cleanup` and `resume_customer_cleanup`. | Required production manifest: operation ID, customer/activation/sent-event bindings, destination, and sorted inventory of every archived relative path, mode, size and SHA-256. Required forward-only journal: prepared, copied-and-verified, source-deleted, committed. Verifier hashes archive bytes and checks exactly one winning operation. | **BLOCKED:** no archive operation, manifest, resumable journal, or concurrency authority exists. |
| `CLEANUP_COMPLETE` | Required `customer_cleanup_inventory` plus committed cleanup operation. | Production receipt must bind the archive manifest and independently enumerate registry, bootstrap, onboarding, outbox/key, owner-action, service-state, event and customer-data authorities. Require zero pending, unknown, orphan and residual customer authorities while preserving the archive and cleanup journal. | **BLOCKED:** `withdraw_customer` only disables and withdraws consent; `purge_transient` is insufficient. |
| `SOURCE_GOLDEN_PATH_PASS` | Verifier-derived result only; never a source/harness input artifact. | Verifier atomically emits candidate/profile digest, ordered production receipt inventory, final chain head, archive digest and cleanup receipt digest after every prior contract passes. A second verification recomputes it from those inputs. | Transitively blocked. Current `source-golden-path-verdict-v1` input is circular and must not be accepted. |

### Required adversarial RED tests

These tests must reject rather than merely detect malformed JSON:

1. **Fully forged bundle:** Generate 21 unique current-format envelopes, satisfying every current phase predicate and recomputing every envelope/event hash, with no profile or production ledgers. The current verifier accepts this; the contract verifier must reject it.
2. **Nonexistent provenance:** Use `source_path: "missing.json"` and hash the copied payload as current code does. Reject because the authoritative file cannot be securely opened and hashed.
3. **Candidate substitution:** Build artifacts with candidate A, change the configured/loaded package to candidate B, and consistently rewrite envelope candidate fields. Reject from independently recomputed source and loaded-module provenance.
4. **Cross-lifecycle splice:** Combine bootstrap/onboarding from customer A with check-in/delivery from customer B while retaining one declared `customer_key`. Reject from registry routes, session IDs, event IDs, generations and ledger locators.
5. **Synthetic publication:** Forge owner-review payload, generation and message ID without a valid outbox HMAC or matching `N/session.json`. Reject.
6. **Synthetic activation:** Claim committed activation while the registry remains disabled, bootstrap remains `AWAITING_ACTIVATION`, or the audit row/nutrition receipt is absent. Reject.
7. **Duplicate finalization:** Preserve internally valid hashes around two finalized check-in events or two generation roots for the same session. Reject cardinality and token continuity.
8. **Generation splice:** Replace an approved tip with a separately valid history bound to another check-in or draft revision. Reject predecessor, authority, event and revision continuity.
9. **Capability substitution/reuse:** Recompute a capability around another card, route, candidate, expired timestamp, or consume it twice. Reject all variants.
10. **Hidden duplicate transport:** Put one call in the phase payload but two calls in the raw adapter log, or provide a raw log with no preceding consumed capability. Reject.
11. **Receipt mismatch:** Keep all documents internally valid but use different provider message IDs in the fake response, delivery ledger, generation tip and canonical sent event. Reject.
12. **False archive/cleanup:** Supply a hash-consistent manifest without copied files and a zero inventory declaration while registry/bootstrap/outbox/customer data remain. Reject.
13. **Self-authored PASS:** Supply a valid final verdict envelope after omitting any one production phase. Reject because PASS is verifier output, not evidence.
14. **Filesystem substitution:** Use a symlink evidence root, world-readable artifact, changed inode after observation, repeated/negative observer sequence, or artifact path not matching the observed commit. Reject each independently.

## Risks/mitigations

- **Mutable ledgers erase intermediate states:** bootstrap, registry and onboarding files are replaced in place. Mitigation: a separately armed, append-only production observer must bind each commit path, inode, sequence and byte hash before mutation begins. This is currently a blocker.
- **Fake adapters can become an alternate authority:** mitigate by restricting logs to raw boundary calls and matching them against production receipts; never accept fake lifecycle states or counts.
- **Verifier importing candidate helpers can validate candidate-defined fiction:** use verifier-owned canonicalization and parsers pinned outside the candidate package; candidate models may be used only as an additional check.
- **Cleanup destroys evidence needed for verification:** verify archive byte-for-byte before source deletion, retain a forward-only cleanup journal, and derive final PASS only after post-cleanup inventory.
- **Function-name preflight is not a semantic contract:** the current AST scan can establish only that names exist. Acceptance requires calling the APIs and validating their durable side effects, resumability and single-winner behavior.
- **No runtime verification was performed:** consistent with the read-only/no-evidence-creation constraint; findings are based on direct inspection of current scripts, production modules and tests.

**BLOCK**