# Yunke PDF delivery and autonomous continuation

Part of the [AI Voice Agent](/docs/modules_handbook/shared/voice-agent/readMe.md).
Last updated 2026-11-05. This is the continuation ledger, not a claim of live acceptance.

## First configuration on Shawn's dev — state on 2026-11-05

**Environment.** `https://zs.propertylab.com.my`, `/home/zs/peta`, branch `dev-shawn`, database
`peta_zs_dev`. It is not production, although its `.env` says `APP_ENV=production` and its
database sits on production's MySQL host under an account limited to `peta_zs_dev`. Web and
CLI read the same `.env`; neither config nor routes are cached. PR #242 (`d7f98c0f1`, no
migration) is merged locally as `2f5b3fd6c`, unpushed and not in master.

| Item | State | Evidence level |
| --- | --- | --- |
| Saved connection | One row. All five gates false, allowlist empty, one paused test profile | `YunkeRuntime::state()` |
| Company code, user id, Web Cookie | Saved by the owner from the `taskPage` request | `state()` shows them set; values not read back |
| App token | Saved through Replace phone from the App log record of 11-05 15:11:45. Identity matched in the browser and on the server. Accepted by one `taskPage` read at 21:20:49 MYT | Helper output, `app_token_set`, HTTP 200 and code 10000 |
| Web read-only check | `ok` at 21:06:32 MYT, after the final save (`ok` at 18:35 before the token was added) | `probe_status`. Proves the Web session only |
| Phone and box | Enterprise identity, box connected and authenticated, firmware 0.1.6. App 2.0.33, code 20033 | Version from ADB; the rest from the owner's App screenshots |
| App 2.0.33 compatibility | Task body matches statically; task creation itself is unproven, see below. APK: 141,337,979 bytes, sha256 `f6ebb27bd5d21fbf840ebaeca4e90980748c6cfc189cc9f2846a83348c34d5ba` | APK reading, phone log, one read |
| Tasks, dials, messages, recordings, production writes | Two owner test tasks and calls on dev, nothing else | `yunke_app_call_bindings` has 2 rows. See the [owner record](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md) |

**Helper patch, uncommitted when written.** The stock helper read only today's log, and this
phone logged in the day before. `yunke-pair-phone.py` gained `--inspect`, `--date`,
`--max-bytes` and `--pull-apk`, described in [phone replacement](/docs/modules_handbook/shared/voice-agent/yunke-phone-pairing.md).
Its first real run reported no account record, because App 2.0.33 writes the record after
`json=`. A value-masked shape report showed the new form, and the helper now accepts both
markers. The real export then worked on this phone. Verified: 15 helper tests on synthetic logs
and mocked ADB, the real command line against a fake `adb`, and that one real export. On the
merged tree: 21 `YunkeConsoleTest`, 11 component tests, Pint and both guards pass.

**App 2.0.33 against the sender, read from the APK and this phone's log.** Static reading proves
what the App sends, not what the server accepts from another sender.

| Item | App 2.0.33 | Sender today | Result |
| --- | --- | --- | --- |
| Create path | `POST /phone-ai-call/app/aiCallOut/save` | Same | Match |
| Create body | `taskName`, `createUserId`, `userId`, `companyCode`, `customerSource`, `execlDataList`, `aiCallTaskClueAllocates`, `forceClueTransfer`, `redialCount`, `isScheduled`, `startTime`, `endTime`, `scheduledDays`, `scheduledTimePeriods` | Same 14 | Match |
| Customer row | `cellphone`, `customerName`, `customerCompany`, `position`, `otherInfo`, `additionalNotes` | Same 6 | Match |
| Manual source | `MANUAL_CREATION` = 3 | 3 | Match |
| Signing | None. Plain headers from one interceptor | None | Match |
| Host | Company domain handed out at login, default `ykphone`. This phone logs `phone3.yunkecn.com` | `phone3.yunkecn.com` | Match for this company |
| Device header | `imei` when readable, otherwise `pt=202`. This phone logs `pt=202` | `pt=202` | Match on this phone |
| `version`, `ykcode` | Read from the installed App: `2.0.33`, `20033` | `2.0.20`, `20020` | **Differs** |
| `Accept-Language` | Device locale, `zh-Hans-MY` here | `zh-CN` | Differs |

**One read-only App check, 21:20:49 MYT.** A single `POST` to `taskPage` with body `page`, `pageSize=1`,
`companyCode` and the header values this phone logs (`20033`, `2.0.33`, `zh-Hans-MY`), not the
sender's constants. Fixed HTTPS origin, TLS verified, no redirect, retry or paging, through raw
curl so no HTTP listener saw the token. Result: HTTP 200, code `10000`, `totalCount` 7, equal to
the task list on the Web console. The App calls this path itself as its list refresh (66 times
in two days of logs); the APK cannot prove the server has no side effect. Afterwards the App
still opened and the day's log held no `token incorrect` or `-10000`. That is weak evidence,
because the log did not grow between two earlier reads while the App sat idle. Not proven by
that read, and answered later by the owner call: that the
server accepts the sender's `2.0.20` headers, that `save` works on 2.0.33, that the box dials, and
that results come back. All four held for one call on 2026-11-05.

**CI, run 41872884972 (PR #242).** `guards` and `lint` passed; `test` failed and the PR's own
tests did not finish there. A stale test double at `tests/Feature/AgentApi/AgentCallInteractionTest.php:781`
caused a compile-time fatal against `LeadRepository::mergeLeadChildren`. The error renderer then
repeated until PHP's 300-second limit, which is the logged timeout. The pairing change did not
cause it; `dev-shawn` and master already hold the fix. Their own `test` jobs are still red for a
separate reason: master's latest log stops on the same 300-second limit inside
`PropertySifuAdapterTest`. That is not investigated, and no full-suite pass is claimed anywhere.

**Next.** The sender's `2.0.20` headers were accepted, so nothing forces a change today; the
export file already carries `app_version` and `app_version_code` if a later App needs them.
Market mode for real customers was built on 2026-11-06, is off by default and has not made a
live call. Retell stays the production caller. All five gates stay off until the next approved test.

**Confirm before any later live call; none is authorized by this entry.** Earlier self-test
authorizations are consumed.

- Owner-held answering number and the target environment.
- Phone and box state, scenario and the actual App version.
- Start time and window, ending within 20 minutes.
- One task and at most one dial. A rejected or unknown create stops, with no retry or manual redial.
- Isolated write scope, plus result binding and de-duplication checks.
- Who stops an accepted task on the phone.
- Return to the all-off state afterwards.

## Latest publication extension — scene availability after deployment (2026-11-01)

The owner requested adding the scene work to the existing Yunke PR #232 and making it
available automatically after deployment. The separate scene configuration now defaults
true, with an explicit false environment override retained. Existing calling/read/result/
watch/aftermath controls, active profile, identity, allowlist and routing are unchanged;
deployment alone does not create a task or call. This supersedes the scene-default-off
statements below for the new release, not their historical test/operation record.

The PR update preserves the remote dev-chen funnel-lane and live-evidence commits. No
merge, deployment, real task, call, login, message, production write, media fetch or firmware
operation is included. Scene propagation/mode limitations remain documented and unverified
by live evidence; a new actual test still needs its bounded parameters confirmed first.

The updated PR tree integrates master `95035f155` and passes **551 PHP tests / 6893
assertions**, **8 component tests**, client/SSR builds and all PR-scoped Pint/structural
guards. The only broad-run failure was corrected in the ignored test configuration's
host; no product code changed for it. One existing PHPUnit configuration deprecation remains.

## Latest offline correction — scene delivery through task customer context (2026-10-31)

The shared Retell-style funnel/profile assignment is implemented locally. Further offline
APK tracing now connects scheduled task fetch (`taskDetailPageLight`) to the matching
`TaskDetailBean.otherInfo` and the ordinary AI session's customer context. The scene sender
uses recipient `otherInfo` instead of `additionalNotes`, whose consumer depends on a
phone-local document-import cache. See [the static trace and mode limits](/docs/modules_handbook/shared/voice-agent/yunke-scenarios.md).

This closes the identified local transport mismatch, not live scene acceptance. Server
storage/echo, the current phone's selected mode and spoken scenario behavior remain
unverified. Custom/remote paths can bypass ordinary context and other engines may require
a customer-remark placeholder. `YUNKE_APP_SCENARIOS_ENABLED` and the standing runtime remain
off. No login, task, call, message, production write, media fetch or firmware change occurred.
Any next live test requires a new bounded parameter confirmation; previous authorizations
are consumed. Local research and synthetic tests do not complete the PDF pilot.

Verification: the corrected recipient-field regression failed on the old sender and
passes after the fix. **49 PHP tests / 519 assertions** pass across scene rendering,
task adapter, caller, submitter and shared funnel assignment, with synthetic HTTP and
an isolated loopback test database. One pre-existing PHPUnit configuration deprecation
remains. No live propagation or business acceptance is claimed.

## Previous offline correction — bounded owner test outside business hours

The [explicit CLI owner test](/docs/modules_handbook/shared/voice-agent/yunke-self-test.md)
fixes the mismatch between an approved early-morning owner test and the existing
10:00–21:00 placement/adapter/profile constraints. A one-call in-memory context supplies
matching local and vendor boundaries no later than 20 minutes after issue. Normal
customer hours and profile validation stay unchanged. Preview creates nothing; a
confirmed invocation still requires existing runtime/profile eligibility, a one-number
allowlist, cap 1 and explicit reviewed database. It never enables controls or retries.

This is offline engineering only. No live task, call, login, query, message, production
write, recording download, server update or firmware operation was performed. Current
server controls remain unchanged; the new entry must be integrated before live use.

Verification: **92 related PHP tests / 827 assertions** pass, including the self-test
extension and shared provider, dialing, simulation, manual-call, Retell webhook,
console and watch regressions. Changed-file Pint, suite links, test-double signatures
and diff checks pass. HTTP/queues/notifications were faked and PHP network access was
restricted to the isolated loopback testing database. No frontend source changed.

## Previous offline extension — centralized management console

The platform super-admin Yunke console adds encrypted existing-session configuration,
explicit one-page Web-session checks, five runtime controls, browser create/edit of
paused local phone profiles, local metrics and recent result evidence. Queue operations
resolve current saved controls. Page refreshes never query the vendor; device-online
state remains unverified. Saving or editing does not submit tasks. See
[console operations and limitations](/docs/modules_handbook/shared/voice-agent/yunke-console.md).

This is software completion only. No live API check, App login, task, call, external
message, production write, media download, runtime enablement or firmware operation
is part of this extension. Formal PDF/pilot acceptance and deployment remain separate.
The existing master PR can be updated; master is not merged or deployed by this work.

Verification: the VoiceAgent feature/unit scope passes **453 tests / 6148 assertions**;
the subsequently expanded console file passes **15 tests / 203 assertions** (14 overlap
that scope). **34 component tests across five files**, client/SSR production builds,
changed-file Pint, migration constants, suite links and test-double guards pass.
A synthetic browser preview confirms page layout and the real profile modal. These
checks used isolated fixtures only; no real session check or runtime enablement occurred.

## Previous offline extension — three business follow-through branches

The newly requested engineering scope adds three fake-tested paths on local `dev-chen`:

- [Missed/busy Web results](/docs/modules_handbook/shared/voice-agent/yunke-unconnected.md)
  can enter the shared redial chain and final missed follow-up under an explicit candidate
  schema. The real reason dictionary remains empty. APK write-side status 2 is known;
  read-side echoes and finer reasons still require confirmation. Unknowns stay held.
- [Medium-intent webinar follow-up](/docs/modules_handbook/shared/voice-agent/medium-webinar.md)
  is opt-in, uses the control profile's approved existing flow and original session link,
  and rechecks context/consent before starting and sending. No policy was enabled.
- Explicit customer-only stop-contact utterances atomically record a contact policy,
  blocked number and per-call evidence receipt. Redials and queued follow-ups stop;
  ambiguous Yunke timing pauses that call for review without creating a global ban.
  Old declined follow-ups do not revive when future contact is re-enabled, including
  flows whose contact no longer has a linked user. See [routing](/docs/modules_handbook/shared/voice-agent/pilot-routing.md).

This section supersedes older offline-complete statements only for these newly requested
branches. Historical counts below describe their original baselines. Live acceptance,
vendor schema confirmation, business approvals, production deployment and pilot evidence
are unchanged. No task, call, login, external message, production write, recording download,
runtime gate change or firmware operation is part of this extension. Only local commits
are authorized; the heartbeat remains paused.

Verification: **559 PHP tests / 6479 assertions**, including the VoiceAgent scope and
shared contact, funnel, payment and WhatsApp flow regressions; Pint and diff checks pass.
Tests use a separate loopback-only test database, fake HTTP/queues and a synthetic
notification token in temporary test configuration. The original shared no-response
notification test also failed with baseline jobs when that token was absent; no product
code was changed to accommodate that environment issue. No frontend source changed.

## Latest offline continuation — timing semantics and gated high-intent follow-through

Existing APK 2.0.20 evidence explains the native end offsets: a text-length estimate,
capped by a qualifying next start, without a call-duration cap. Offline reproduction
matches **all 19 ends** of the captured two-way sample. The final 134 non-whitespace
UTF-16 units estimate 40200 ms, giving end 184378 ms from start 144178 ms. This establishes
provenance, not measured audio alignment or complete final-utterance playback.

The original PDF requires text return, not millisecond alignment. Text/API collection
and corrected same-call ingestion remain verified with this quality qualification;
alignment is not an added prerequisite for the PDF's API capability. Do not repeat a
phone test solely to chase the same estimator output. Exact speech accuracy belongs to
approved recording/pilot review. See [timing semantics](/docs/modules_handbook/shared/voice-agent/yunke-transcript-timing.md).

Management rows/details now show a fixed warning for a consistently bound recorded
result with the known timing flag. Original text, spans, classification and settlement
remain unchanged; no read/render side effects or raw issue strings are introduced.
The new regressions first reproduced the missing backend and compact/expanded warning.

The verified native high-label/tag contract also now exercises the real shared aftermath
against synthetic HTTP and mocked transports: two collections produce one comment, one
mocked high-intent notice and one queued follow-up. This closes the offline integration
check without claiming actual Telegram/WhatsApp delivery. Current related checks pass
**35 PHP tests / 655 assertions** and **6 component tests**; Pint/diff pass. Test network
access was restricted to loopback MySQL for PHP and denied for the component run. One
existing PHPUnit XML deprecation remains. No live call, login, query, message, production
write, recording download, gate change or firmware operation occurred in this continuation.

Next real PDF acceptance should combine the frozen correction with an approved business
scenario/content and authorized destinations, rather than another alignment-only call.
Live registration/funnel execution, business delivery, media copies, device stability,
deployment and customer pilot remain distinct external stages. Existing one-call and
same-result scopes remain consumed; this continuation does not authorize another call.

## Latest two-way owner sample — 21:58 MYT, correction and same-call collection

One separately approved task was accepted at 21:58:56 and automatically dialed once
after approximately 355 seconds. The owner confirmed they answered, spoke and heard
the AI respond. Native duration was 156723 ms. App recording metadata and independently
queried Web details agreed on **19 turns: 10 agent and 9 customer**, a 172-character
summary, explicit task/child/action IDs and native high intent. No recording was downloaded.

The frozen old mapper correctly held the newly observed integer `hangupType=2` as
`unverified_web_outcome`; it had only verified type 1. The original monitor ended at
22:15:28, **996 seconds after placement**, with one task/dial, an idle phone and inactive
profile. Cloud recording/analysis was already available. No partial settlement, retry,
manual supplement or cloud recovery was used. This was not an uninterrupted old-version
automatic acceptance, and the later correction must not be counted inside its twenty-
minute observation window.

A narrow offline correction added only verified integer connected types 1/2 and the
native high-intent combination (integer tag 1 in row/detail plus matching high labels).
Unknown values, numeric strings and conflicting/absent scope remain held. The regression
failed before the fix; **23 related tests / 526 assertions**, Pint and diff pass with
vendor HTTP faked and testing-network access limited to loopback MySQL. One existing
XML deprecation remains. Source `1274c2352` was integrated locally as `c41ccbf82`.

After the bounded phone monitor had closed, the corrected reader/processor made four
real API reads of **this same existing result**, applying it once and returning duplicate
on replay. It created/dialed nothing. Independent database inspection confirmed one
call/binding/profile, 19 matching texts/roles/start offsets, `lead_spoke=true`, matching
summary, normalized `high`, original turn IDs and settlement time. Effects/copies stayed
disabled. This supplies real same-call ingestion evidence after correction, not a fake
response substitute or a new unmodified-version end-to-end trial.

One source timing defect remains: the last agent end offset is 184378 ms, **27655 ms
beyond duration**. Original spans and `end_exceeds_duration` are retained; do not clip,
invent alignment or claim the entire final agent text was actually heard. Foreground/
awake operation, current recruitment content and a short Web/phone coexistence window
do not establish background stability, approved webinar content or general classifier
quality. Full PDF/business/pilot acceptance remains open.

The exact remote task finished (status 4, pause 0, redial 0), phone is idle, the profile
inactive and all execution/result-reprocessing authorizations consumed. Formal hours and
standing environments/gates remain unchanged. No new App login, petaV3 external message,
production write, audio download, firmware change, push or deployment occurred.
Private evidence: `修复版双向自动单通-5039-20261025T215459`; redacted receipt/report retain
the separation between original held monitoring and corrected real same-call collection.

## Earlier fixed-version owner test — 21:30–21:44 MYT

The separately authorized test used the fixed local dev-chen version `bd0c415f5`.
Exactly one create request was accepted with the new 31-character UUID-fingerprint
name, followed by one native automatic dial. Native upload/analysis, API collection,
explicit parent/child/action binding and isolated settlement completed. The first
complete collection was `applied`; six later collections were `duplicate`, with stable
IDs, transcript/summary fingerprints, turn counts and settlement time. No creation
retry, manual supplement or cloud recovery was used. This successful creation does
not retrospectively prove the cause of the earlier 18:10 rejection.

The owner explicitly reported **the recipient did not answer**. Native/provider records
nevertheless reported connected/completed, with 29560 ms duration (stored as 30 seconds),
one agent opening and **zero customer turns**. Native text/start offset matched the
stored turn (31 ms). The summary reported no customer response; raw intent `2` remains
unnormalized and `lead_spoke=false`. Voicemail or call screening is possible but
unconfirmed. Preserve the provider status and human observation separately; neither
invent customer speech nor reclassify this as a verified vendor `NO_ANSWER` sample.
**Bidirectional transcription, meaningful intent quality and full PDF acceptance remain
unmet.** The 17:27 silent-answer sample below remains separate historical evidence.

The phone was asleep when the expected task poll did not appear. Waking it and opening
the existing App foreground preceded execution; no App login or manual dial occurred.
Create-to-dial observation was about 653 seconds. This is not unattended background
stability acceptance. After native MEDIA/DIALOGUE/ANALYZE_WAIT/RESULT_SUBMIT success and
stable duplicate reads, monitoring intentionally ended at 21:44:25, before the twenty-
minute limit. The raw harness exit reason `operator_or_process_interruption` records
that intentional shutdown, not a pre-upload interruption. The phone was idle and
isolated profile inactive. A stop command was issued, but the App process was later
visible; the exact remote task was independently confirmed finished (`taskStatus=4`,
`isPaused=0`, `redialCount=0`). Do not claim it remained paused or its process absent.

The owner expressly approved testing that night after being told the formal 10:00–21:00
window had ended. A private acceptance-process model copy allowed only the matching
testing database/profile/window/sole-number allowlist and absolute deadline. Ten scoped
window checks and eight existing harness checks passed. Repository policy/code and both
standing environments were unchanged; this is not production call-window acceptance.
No new App login, message, production write, recording download, firmware change, push
or deployment occurred. The one-test permission is consumed and execution is disarmed.
Private evidence: `修复版双向自动单通-6659-20261025T203447` in the local research folder;
public receipts omit real IDs, credentials, full numbers, URLs and spoken content.

## Earlier offline fix — task names and redacted rejection codes

The observed cross-database naming collision is fixed in the caller: new task names
use a stable 96-bit SHA-256 fingerprint of the call UUID, not the numeric row ID. Raw
UUIDs, phone numbers and account identifiers do not enter the name. Existing claimed
bindings return before reconstruction, so old tasks are neither renamed nor resent.

The submitter now returns the actual HTTP status and only a signed one-to-six-digit
integer/string business code, normalized to a string; other code values become null.
The caller records these in structured rejection/received-uncertainty warnings with
only binding ID and safe reason. No vendor message/body/data/header is retained.
Accepted/unknown/rejected classification, claim durability and no-retry rules are unchanged.
See [caller](/docs/modules_handbook/shared/voice-agent/yunke-app-caller.md) and
[submission](/docs/modules_handbook/shared/voice-agent/yunke-app-submit.md).

The new regressions reproduced the old name collision and missing diagnostics before
the fix. **54 related tests / 1188 assertions** pass with fake HTTP and outbound network
restricted to local testing MySQL; Pint/diff pass. One existing XML deprecation remains.
Both runtime environments and disabled gates are unchanged. No phone/device operation,
login, real create/dial, message, production write, recording download or firmware action
was performed for this fix. The 18:10 rejection's original code/cause is still unavailable;
these offline changes do not retroactively prove its cause or authorize another attempt.

## Earlier attempt — 18:10 MYT, creation rejected

A separately approved owner-number attempt intended to exercise customer speech sent
exactly one create request. The vendor response was categorized `vendor_rejected`;
no task ID returned and no dial occurred. The isolated row is `task_create_rejected`
with a `create_rejected` binding, no turns and no settlement. Read-only follow-up found
the same three terminal cloud tasks as before. The executor stopped, profile is inactive
and standing configuration is unchanged. This attempt is consumed; do not retry it.

The fresh isolated database reused local call ID 1, so the caller generated the already
existing cloud name `petaV3 call 1`. This naming collision is verified, but its causal
connection to the rejection is not: the adapter retained only the safe category, not
the original business code/message. Do not reconstruct it from the successful follow-up
query's code 10000 or replay creation to recover it. Offline follow-up should address
cross-database task-name uniqueness and safe numeric rejection diagnostics before a new
live attempt. Customer-speech transcription/summary/intent and deduplication were not
exercised in this rejected attempt. The earlier 17:27 API roundtrip evidence remains valid.

## Earlier live evidence — 17:27–17:35 MYT

The owner confirmed Yunke technical staff permit use of the official App/Web APIs;
petaV3 develops the integration itself. API-use permission is no longer a blocker.
The separate bounded owner test then created **one API task**, observed **one automatic
dial** after approximately **409 seconds**, and completed native upload/analysis, explicit
parent/child/action binding, isolated settlement and duplicate collection. There was no
manual supplement or cloud recovery. The native duration was **29561 ms** (stored as
30 seconds); the second collection returned `duplicate` with one call/binding/turn.

The owner subsequently clarified that they answered and heard the AI **but did not
respond**. The native payload's single agent opening, matching stored text/offset and
the no-customer-response summary therefore agree with the actual test. Customer speech
recognition and meaningful intent classification were **not exercised**, rather than
demonstrated faulty or passed. Raw intent `2` remains unnormalized. This proves the
automatic API data path, not full two-way/business/PDF acceptance.

The phone was idle, executor stopped and isolated profile inactive at completion.
Standing configuration was unchanged; no App login, message, production write, audio
download, firmware change, push or deployment occurred. This one-test permission is
consumed. The earlier 14:00 interrupted/manual sample remains separate. See
[owner acceptance](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md).
Historical statements below about no isolated settlement or pending API-use permission
are superseded only by this new bounded evidence and the owner's clarification.

## What it does

Tracks the user's request to continue the entire revised PDF without another prompt.
The original eight-page PDF is at `/Users/dadadineiyou/Downloads/AI 外呼方案（修订版）.pdf`,
SHA-256 `27eeaf20fab3bc203ca2c9ab10a9d52243004e58d0028e10ffdaaf525f1c1fbf`.
The PDF supplies requirements; the user's current operational limits still govern execution.

The `ai-caller-pdf` heartbeat was used for autonomous offline delivery. Engineering and
the external acceptance pack are complete within the current authorization. On handoff,
pause the heartbeat and notify once. A later resumption starts from the external pack;
do not replay unchanged tests or ask repeatedly for the same approval/sample.

## How it works

### Working location and boundaries

- Current engineering branch: `codex/yunke-pdf-closure`, managed worktree
  `/Users/dadadineiyou/.codex/worktrees/yunke-pdf-closure/petav3`.
- Integration target: local `dev-chen`, checked out at
  `/Users/dadadineiyou/Documents/GitHub/petav3-dev-chen-integration`.
  Integrate only tested task commits. Check that the target is clean first; preserve
  history and other people's edits. Do not push, deploy or touch the unrelated main checkout.
- Keep all Yunke live placement, reading, ingestion, aftermath and recording-copy gates
  off in runtime configuration. Fake responses may enable gates in test memory only.
- Do not create vendor tasks, dial, send customer/team messages, write production,
  download recordings or change firmware. The prior one-number S2 permission was used;
  it does not permit another unattended call or a customer pilot.
- A fresh App login invalidated the phone session. Never use it as a background refresh.
  Existing Web Cookie reads coexist only in a measured short window; long-running session
  renewal is not proven. Use local evidence while continuing offline engineering.
- Independent development may continue across any live-acceptance blocker. Do not call
  the PDF complete until the real acceptance steps have evidence.

### Verified baseline

- Local `a2d54d58e`: disabled Web Cookie reader and explicit ID auto-binding, atomic
  settlement, late analysis, conflict holds and Inspector redaction. Related tests:
  79/2575 in the combined run, then 14/372 in the changed Web file after two new
  regressions; union 81 tests/2594 assertions. Pint passed. One existing XML deprecation.
- S2's separately approved task created one owner-number call. Web result row joins
  taskId + child id + callId; structured callActionId agrees. Detail has no ID echoes.
  Three transcript segments, 28305 ms; last span exceeds duration. Summary and raw
  intent were checked. This was not a production CRM ingestion or a customer pilot.
- Source baseline for T1/T5/T6/T7/T8: remote `petav3-yc:/home/yc/peta-ai-caller`,
  branch `ai-caller-pilot`. Its first 12 task commits run from `d0720c31d` through
  `41fa2e648` over `d87e6ddd7`. Retrieved read-only under local ref
  `yunke-research/ai-caller-pilot`; do not merge its unrelated baseline or later
  tentative V3 protocol work. The source branch's earlier test counts are historical.
- Local pilot integration is complete through `fc1e77bed`: the 12 task commits plus
  one compatibility commit, over `a2d54d58e`. Only that contiguous 13-commit task
  range was fast-forwarded into dev-chen after a transient cherry-pick/index refresh
  failure was safely aborted. Source/target tree hashes were identical and both
  worktrees clean. A recoverable `codex/backup-dev-chen-before-yunke-pilot-20261025`
  ref retains the pre-integration state. No foreign baseline, push or live migration.
- The default-off `YunkeAppTaskSubmit` seam is now fake-tested: **54 tests / 793
  assertions** across seven related transport, binding, Web-read, adapter and Inspector
  files; Pint and diff checks passed. Its request observes an actually committed unknown
  claim, and a synthetic accepted parent flows through Web binding to the distinct call ID.
  The initial test harness hit a pre-existing intentionally irreversible migration rollback;
  it now uses the guarded RefreshDatabase setup without a wrapper transaction and cleans
  only its own call fixtures. No historical migration was changed. One XML deprecation remains.
- The default-off App caller is now linked through placement: **255 tests / 4045 assertions**
  passed across 27 affected caller, transport, provider/pilot, App/Web, Retell and funnel files;
  Pint/diff checks passed. The fake lifecycle starts at PlaceAiVoiceCall, schedules one task,
  preserves pending state/real IDs across a late receipt and reaches trusted Web settlement.
  Regression cases cover uncertain creation, post-claim storage failure, forged receipts,
  local log mode, frozen funnel-intent recovery and the selected-profile window defer.
- The default-off Web watch and frozen submission evidence are now implemented:
  **65 tests / 868 assertions** passed across six affected watch/caller/transport,
  App/Web-ingestion and adapter files; Pint/diff checks passed. The watch bounds each
  run to 20 bindings, drains ready effects under their separate gate, stops on explicit
  session errors and preserves ambiguous outcomes. One existing XML deprecation remains.
- T9's scoped routing controls are implemented in both profile suites. **47 PHP tests /
  743 assertions** passed across the new endpoint file and existing split/redial
  regressions; **7 frontend tests** passed across the new controls and existing profile
  form. Six changed Vue components compiled with relative imports verified. Pint/diff
  checks passed. Shared dependency reads initially timed out; a private install from
  the unchanged npm lock resolved this, without changing any committed dependency file.
- Paused App-profile provisioning and provider-specific profile views now pass
  **72 PHP tests / 647 assertions** across five new/related profile/provider/routing,
  Retell tuning and pull files; **11 frontend tests** pass across three files. Seven
  changed Vue components compile with relative imports verified; Pint/diff pass.
  Yunke details expose only safe configuration, distinguish disabled/paused/local
  readiness, and cannot run Retell-only actions even with stale Retell IDs. One XML
  deprecation remains. No runtime profile, gate, task or phone was changed.
- T9's call-list work is complete in offline engineering: **33 PHP tests / 465
  assertions** pass across the new presentation/filter file and profile UI regressions;
  **8 frontend tests** pass across two files. Four Vue components compile with relative
  imports checked; Pint/diff pass. Provider filters/counts preserve existing visibility;
  local evidence is batched in one binding query, with no Retell-only binding lookup.
  Unknown creation, auth errors and ended submitted windows remain explicit review
  states, without vendor polling, retries, settlement or message delivery claims.
- T10's first offline stage now has a default-off, exact-host allowlisted recording
  transport, public IPv4 DNS pinning in a forced cURL handler, native 25 MiB sink/header
  limits and safe errors. Inspector masks signed CDN paths/queries and unfinished request
  labels. **45 tests / 315 assertions** pass with synthetic audio/DNS/HTTP only; Pint/diff
  pass. An initial stream-read defect exposed by the fake tests was fixed, including EOF
  at an exact read boundary. This is a transport seam only: private Media storage,
  idempotent attachment, fresh playback URLs and dispatch/drain are still to be implemented.
- T10's private-copy core now passes **73 unique tests / 854 assertions** across copy/playback,
  App/Web ingestion, Retell webhook, native lead-call API and Media cleanup regressions.
  Private fake storage, owned collection, encrypted source provenance, source/result hash
  recovery, concurrent-meta preservation and fresh signed playback are verified offline.
  Pint/diff pass. The ID-only job rechecks the independent gate; it is not automatically
  enqueued yet. Remaining T10 work is after-commit dispatch, bounded durable recovery and
  failed/expired-source holds, followed by explicitly approved real storage acceptance.
  Evidence is 72/849 together plus 14/105 in the changed copy file; the added case takes
  the actual transport through fake DNS/HTTP into private Media without real downloads.
- T10's after-commit dispatch/recovery is now complete in offline engineering:
  **103 tests / 1072 assertions** pass across seven related copy/watch, App/Web result,
  Retell, native API and Media files. Tests include a fake Web settlement → explicit
  binding → queue → private audio copy → replay, commit/rollback, source/token fences,
  stale lease recovery, bounded exact-owner draining and immediate auth-error quarantine.
  Pint/diff pass. The copy gate remains off; there was no real vendor/media operation.
  This closes the T10 software gap, not real CDN/storage/expiry/playback acceptance.
- PDF workflow acceptance now passes **79 tests / 810 assertions** across six related
  files. Both provider doubles cover registration consent, 1440-minute before-event and
  30-minute live no-show rules, one claim/placement, late attendance, contact suppression
  and session/registration changes. New negative checks exposed and now fix stale first
  calls/redials after muting/removal/cancellation; live webinar overruns remain callable
  through the existing event status logic. Unknown App creation still never resends.
  Pint/diff pass. These are local/fake scenarios, not real provider/phone acceptance.
- The pilot report's timestamp/cost acceptance now passes **6 tests / 39 assertions**.
  A backward start is unknown, not a positive wait; zero stays zero. Pending App intents
  with no call ID remain unknown cost, and mean cost per non-refused local attempt is
  emitted only with complete cost coverage. The command no longer equates a call ID with
  task import. Pint/diff pass; no live report/data or runtime setting was accessed.
- Thank-you phone correction now resends only the original WhatsApp bonus, retaining its
  slot/event and login-safety context. It no longer requeues AI/email/SMS/voice welcomes
  or overrides an AI opt-out. **48 tests / 376 assertions** pass across five workflow,
  thank-you and adversarial identity files, including both providers and checkbox values.
  Pint/diff pass. This fixes four reproduced unwanted-AI-enqueue cases; all sends are fake.
- Consolidated verification at source `17513ad1b` / local dev-chen `930a78381` passed
  **483 PHP tests / 5854 assertions** plus **15 frontend tests in four files**. The PHP
  process could connect only to localhost MySQL port 3306; other outbound network was
  denied. Frontend outbound network was denied entirely. One existing PHPUnit XML
  deprecation remains. The original PDF's eight-page cached text was reused only after
  confirming its SHA-256 still matches the original file. This is not live acceptance.
- The final page-5 confirmed-won gap is fixed for unsubmitted funnel calls/redials:
  same lead + same funnel `STATUS_WON` suppresses the call; another funnel's conversion
  or an active intermediate paid-path rule does not. Queued redials stop quietly before
  policy-change release, including legacy send-context fallback. Three negative cases
  reproduced the gap. Updated consolidated verification passes **491 PHP tests / 5880
  assertions** under outbound restrictions; the **15 unchanged frontend tests** remain
  valid. Pint/diff pass; one existing XML deprecation remains. Runtime gates are unchanged.

### Delivery and acceptance checklist

The [2026-10-25 isolated owner test](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md)
accepted one real platform task and observed one automatic dial in approximately 35 seconds.
A one-off control-ACK validation mistake interrupted that attempt; the owner manually
supplemented it. Explicit task/child/action evidence was found, but sparse cloud results
remain held, without transcript/summary settlement. This is **not a full automatic pass**.
The task finished, phone was idle and standing runtime gates remained off. The new
single-test authorization is consumed; no replacement call or daemon is authorized.

Read-only follow-up now preserves the current App failure as code **20000 / recording
record not found**. Same-session S2 control returns 10000 and its transcript. Native logs
show analysis start followed by process reinitialization aligned with the prior protective
force-stop; a later OSS success is followed by view coroutine cancellation, and the result
retry sends an empty summary/tag zero. This supports an interrupted media/analysis business
flow, with the precise server-side outcome still unknown. No recovery, new App login,
writeback or audio download was performed; the existing row stays held. See the
[owner-test follow-up](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md).

| Work | Engineering status | Remaining live acceptance |
| --- | --- | --- |
| T1 provider routing, market/cap, Retell isolation | Implemented and fake-tested with the necessary local window dependency | No live Yunke placement enabled |
| T5 fixed A/B assignment | Implemented and fake-tested | No live split; no crossover or reassignment of queued leads |
| T6 shared redial | Implemented and fake-tested | Vendor retries/cancellation and real no-answer semantics still need proof |
| T7 high-intent alert | Implemented and fake-tested; verified native Web medium combination now normalizes; fake Notifier only | Native high-intent mapping still requires a complete sample; confirm approved recipients; no live send |
| T8 pilot report | Implemented and fake-tested | Needs real pilot observations and human comparison; unknown is not zero/free |
| T2 task sender / caller | App caller/sender plus paused local provisioning command implemented and fake-tested behind explicit mode/gates | One isolated real submission/dial observed; uninterrupted automatic acceptance, long session/queue/expiry/stop still pending |
| T3 result collection | App/Web collectors, explicit binding and transactions fake-tested; standing runtime disabled | Owner recording metadata/summary/medium restored; transcript/outcome fields remain incomplete, so isolated settlement and supported high/miss samples are still pending |
| T4 monitoring / reconciliation | Bounded Web watch, frozen schedule/ack timing, pending-effect drain and opt-in review notices implemented and fake-tested | Real queue/expiry/cancellation, long-session behavior and approved alert delivery; no inferred timeout settlement |
| T9 management UI | Split/redial controls, paused provisioning, safe provider profile views/guards and call-list provider/task evidence implemented and fake-tested | Real operator review after deployment; verified queue/expiry/cancellation semantics |
| T10 recording copy | Default-off transport, private Media copy, after-commit dispatch/recovery, failure holds and signed playback implemented and fake-tested | Explicit download approval and real storage/URL expiry/playback validation |
| PDF converted-customer stop | Same-funnel confirmed-won guard implemented and tested for first calls/redials | Owner validates authoritative conversion coverage and excludes untracked legacy customers |
| PDF Phase 0 | Evidence/runbook preparation only | Hardware/background/reconnect trials, vendor written answers, approved scripts/consent/privacy/voice consent |
| PDF Phase 2/3 | Report foundation only | Approved 50/50 pilot, daily reviews, real quality/latency/attendance/cost and go/no-go decision |

### Autonomous handoff

Existing-call recovery on 2026-10-25 is documented in
[owner acceptance](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md).
The user's narrow cloud-write authorization allowed one media callback, one recording
save and one analysis for the already known manual-success action. Recording metadata
now reads back at 128774 ms; independent Web queries confirm the same parent/child/call
tuple, recording object, summary and native medium-intent tag. The analysis used 15
session-bound native utterances, with reconstruction checked against S2's exact content field.
Original turn offsets remain unavailable and cloud recordingContent is empty; strict
readers/ingestion holds were not relaxed. No petaV3/production record, standing gate or
firmware was changed; no task was created/controlled, call dialled, App login performed,
message sent or audio downloaded by this recovery.
This supersedes the earlier current-sample recording-not-found state only. The interrupted
automatic acceptance remains partial, and the remaining real PDF acceptance items below
still apply. The heartbeat remains paused.

The recovery also exposed an offline routing gap: the Web mapper retained native
medium intent only as raw data. It now normalizes only the independently observed
matching medium label/tag echoes, after all existing terminal/transcript guards pass.
**45 targeted tests / 583 assertions** pass, including a reproduced missing-normalization
case, one fake follow-up/comment on a complete synthetic result, replay and eight
unknown/conflicting/unverified combinations. Recovery-shaped missing-outcome/transcript
cases stay held with no follow-up or copy dispatch. Native high/low combinations remain
raw pending complete samples. The original 491-test evidence is historical; this new
mapper change has the targeted verification above. No live operation was run for it.

The next owner-test candidate was prepared without execution. Its receipt grammar
retains the prior control-ACK correction, and five offline actual-loop regressions
cover slow post-call work, the absolute deadline, second activity, duplicate mismatch
and refusal before boot without new authorization. The candidate no longer force-stops
the App merely 45 seconds after hangup; normal stop waits for verified settlement/analysis
and duplicate checks, with the original hard-bound/exception protections retained.
A new schema-only local acceptance database is empty; all candidate execution guards
remain false. Another task/dial and result writes to that isolated database require a
new explicit bounded approval. Neither the old consumed approval nor this preparation
permits execution, production writes or production backfill.

After reviewing that candidate, the user explicitly chose continued offline work and
no dial. The candidate remains locked and its schema-only acceptance database empty;
no new live test or isolated live ingestion is approved. Preparation is not execution
authorization. Keep that boundary until the user explicitly changes it.

**No independent engineering item remains in this agreed offline scope.** T1–T10 and
shared PDF scenario/stop/report checks are implemented and fake-tested. The final code
baseline is source `4dd88b6c6` / local dev-chen `bffa330ea`; only task commits were
integrated, without a push or deployment. Final checks are **491 PHP tests / 5880
assertions** and **15 frontend tests**, with one existing XML deprecation. Later pack
edits are documentation only and reuse this unchanged code evidence.

The [external acceptance and release pack](/docs/modules_handbook/shared/voice-agent/yunke-live-acceptance.md)
is ready. It includes route decisions, Phase 0 ownership, missing samples, independent
flags, an owner-number test scope proposed for new approval, deployment, pilot observations and a
phone-first stop drill. The private Chinese delivery folder adds draft bilingual speech,
Q&A placeholders, vendor questions, blank review/pilot sheets and an optional Shenzhen
RFQ draft. No message, order, consent or approval was sent or fabricated.

Remaining work requires external evidence or explicit live/release authorization:

1. Owner/vendor acceptance of App single-task + Web queries versus the PDF's official
   standing-task import/webhook route, API entitlement/pricing and support. Obtain official
   documents instead if that original route remains mandatory; no placeholder wire exists.
2. Phone-safe session renewal, supported handset/market configuration, queue/expiry/stop,
   non-answer/intent/DNC samples and the real cloud content/voice/privacy/cohort approvals.
3. A newly authorized bounded owner-number test into an isolated acceptance environment,
   then separately authorized effects and recording-copy/storage/playback acceptance.
4. Owner-reviewed deployment with all gates initially off, followed by an approved
   customer pilot, real bills/quality/latency/attendance data and a Phase 3 go/no-go decision.

All runtime gates stay off. Accepted/unknown tasks cannot be called cancelled by local
pause or reassigned to Retell. The PDF is **not fully live-accepted**. Pause autonomous
continuation after delivering the pack once; no new calls or production work are implied.

## Reference usage

If continuation is explicitly resumed, inspect actual HEAD/status and start from the
external acceptance pack. Reuse unchanged passing checks; do not reopen completed work.
Current evidence and Chinese plan live under
`/Users/dadadineiyou/Downloads/Tancus-REA研究-2026-10-23/`; do not copy credentials or
private real identifiers into code, committed fixtures, messages or this ledger.

## Related files

- [pilot-routing.md](/docs/modules_handbook/shared/voice-agent/pilot-routing.md) — provider/split/redial/report contracts.
- [yunke-web-results.md](/docs/modules_handbook/shared/voice-agent/yunke-web-results.md) — bounded Web binding and result processing.
- [yunke-app-results.md](/docs/modules_handbook/shared/voice-agent/yunke-app-results.md) — durable claims and shared pending effects.
- [yunke-app-tasks-offline.md](/docs/modules_handbook/shared/voice-agent/yunke-app-tasks-offline.md) — pure request/response adapters.
- [yunke-app-submit.md](/docs/modules_handbook/shared/voice-agent/yunke-app-submit.md) — guarded submission and committed-claim requirements.
- [yunke-app-caller.md](/docs/modules_handbook/shared/voice-agent/yunke-app-caller.md) — deferred placement, profile mode and queue retry recovery.
- [yunke-watch.md](/docs/modules_handbook/shared/voice-agent/yunke-watch.md) — bounded result reconciliation, frozen queue evidence and opt-in review notices.
- [pilot-routing-ui.md](/docs/modules_handbook/shared/voice-agent/pilot-routing-ui.md) — scoped split/redial controls without publishing content.
- [yunke-profiles.md](/docs/modules_handbook/shared/voice-agent/yunke-profiles.md) — paused platform provisioning, safe read-only detail and provider-specific action guards.
- [yunke-call-views.md](/docs/modules_handbook/shared/voice-agent/yunke-call-views.md) — provider filters, scoped counts and bounded read-only task/result evidence.
- [yunke-recordings.md](/docs/modules_handbook/shared/voice-agent/yunke-recordings.md) — default-off private copies, bounded recovery, masking and playback.
- [yunke-live-acceptance.md](/docs/modules_handbook/shared/voice-agent/yunke-live-acceptance.md) — owner/vendor decisions, controlled acceptance, release and stop procedures.
- [yunke-owner-acceptance.md](/docs/modules_handbook/shared/voice-agent/yunke-owner-acceptance.md) — partially successful real owner test, interrupted automatic attempt and held result evidence.
