[真实链路自测]:完成完整流程自测和ACK缓冲修正,包含真实Provider验收、播放回声清理和回归测试

This commit is contained in:
mkbk
2026-06-17 23:47:21 +08:00
parent b3566c2424
commit b2822dc1af
10 changed files with 121 additions and 7 deletions
@@ -130,6 +130,31 @@ The system SHALL provide a deterministic simulated microphone acceptance command
- **WHEN** the simulated microphone transport runs out of frames before the expected turn completes
- **THEN** the command SHALL fail with a structured error instead of waiting indefinitely
### Requirement: Real provider live fixture acceptance
The system SHALL support scripted full-chain acceptance that drives the live pipeline with generated microphone PCM while using real local speech providers, the configured cloud LLM, and local TTS/playback capability.
#### Scenario: Real provider fixture completes one turn
- **WHEN** generated wake and formal question PCM frames are passed through the live pipeline
- **THEN** the pipeline SHALL use the real local KWS, local VAD, local denoiser, local STT, configured cloud LLM, local TTS, and playback provider path to complete a wake-to-standby turn
#### Scenario: Real provider fixture completes repeated turns with temporary context
- **WHEN** two generated wake/question turns run in one process and the first turn gives a user fact
- **THEN** the second LLM request SHALL include the first turn's user and assistant history from process-local memory
- **AND** no history SHALL be read from disk or persisted after the process exits
#### Scenario: Zero playback drain still flushes queued echo
- **WHEN** ACK or TTS playback completes and `OWNER_POST_PLAYBACK_DRAIN_MS=0`
- **THEN** the runtime SHALL call `flush_input()` once to clear already queued playback echo
- **AND** it SHALL NOT perform an additional timed microphone read-and-discard loop
#### Scenario: No acknowledgement playback is configured
- **WHEN** `OWNER_WAKE_ACK_TEXT` is empty and no wake acknowledgement audio is played
- **THEN** the runtime SHALL NOT run post-playback drain before capture starts
#### Scenario: Fixture transport preserves future frames
- **WHEN** a memory or fixture transport represents pre-generated future microphone frames
- **THEN** tests SHALL be able to configure flush to record the cleanup call without deleting those future frames
### Requirement: Wake acknowledgement before recording
The live runtime SHALL provide an audible local acknowledgement after local wake detection and before it starts recording the user's formal question.