Files
rag-technical-docs-assistant/docs/evaluation/local-s2s/phase-02-linux-assets-20261016.md
T
11linear11 a94b8cd3ea feat(voice): implement local S2S retained history and provider selection
Add pinned CPU engine dependencies, retained interrupted-response history, provider admission, offline evaluation and isolated browser tooling.

Record Phase 2 acceptance and Phase 3/4 preparation, bounded paid-test accounting and interruption incident findings. Human interruption acceptance, paired OpenAI evaluation and rollback remain pending.
2026-10-16 17:09:27 -04:00

5.7 KiB

Phase 2 authorized Linux resource acquisition — 2026-10-16

Later Queue repair and actual construction evidence resolve the constructor defect recorded below. This acquisition checkpoint and its failure observations are retained; complete native/live acceptance stays open.

The missing NLTK tagger and Silero JIT resources were downloaded following the user's explicit authorization. Both now load successfully in the existing immutable engine image with networking disabled. The missing-assets prerequisite from the earlier preflight is resolved. Phase 2 remains in_progress; these checks do not establish Persian speech quality or complete native-session conformance.

Provenance and local paths

  • Official NLTK data revision: 550b6625bcef1f2abff2ff770a5a0d272c9c6b2a. Downloaded averaged_perceptron_tagger_eng.zip and safely unpacked its three JSON files. Archive and extracted files match the prior Windows manifest.
  • Official Silero revision: 1e261b036686cd0017d500ee96acd1c4ba572a9d. Downloaded the unmodified minimal JIT hub runtime: hubconf.py, package/data markers, model.py, utils_vad.py, JIT weight and MIT license. Every downloaded file also matches the earlier Windows manifest. Unused ONNX/sequence weights and examples were not downloaded; this is a JIT runtime subset, not a full repo.
  • Total downloaded response bodies: 3,848,960 bytes, eight files including the NLTK archive. The four existing punkt files were reused, not downloaded.
  • Ignored host paths: .local-s2s-build/assets-linux/nltk and .local-s2s-build/assets-linux/silero-vad. No host package installation.

The new Linux asset manifest lists 14 files. Its SHA-256 is 869eb6be1f444ecded8908b9339078cc5845df367207a63ed28173c4974dca26. It deliberately differs from the historical 201-file manifest because unused resources are omitted. All 14 retained file hashes match their old entries. Do not substitute the old manifest digest for this Linux subset.

Machine-readable evidence records each immutable source URL, size, hash, authorization, and actual image check result. Downloaded artifacts remain outside Git; manifests and evaluation scripts are reviewable repository artifacts. No operational configuration was changed.

Actual image validation

Image: sha256:5c80c77c54da4641318e69cdb8fff092391cd746e491fa8029280c2999ce27d1. It was reused without rebuilding. Read-only resource mounts, --network none, read-only root, dropped capabilities, no-new-privileges, 2 GiB memory and 128 PID limits were applied. No real API credential was supplied.

Asset check, exit 0:

  • Complete manifest validation passed against the read-only mounted resources.
  • NLTK 3.10.3 sentence tokenizer and original English POS tagger loaded. An attempted NLTK download was rejected by the runtime guard.
  • Torch 2.11.0+cpu loaded the actual Silero JIT with source='local'.
  • Eight inference windows each at 8 kHz and 16 kHz produced finite probabilities within [0, 1]. One second of silence at each rate yielded no speech segments. These are real model computations on synthetic silence, not a speech-detection accuracy measurement or a change to browser PCM24k.

Repeat from the repository root:

docker run --rm -i --network none --read-only --cap-drop ALL \
  --security-opt no-new-privileges --memory 2g --pids-limit 128 \
  --tmpfs /tmp:rw,noexec,nosuid,size=64m \
  -e OMP_NUM_THREADS=1 -e OPENBLAS_NUM_THREADS=1 \
  -v "$PWD/.local-s2s-build/assets-linux/nltk:/assets/nltk:ro" \
  -v "$PWD/.local-s2s-build/assets-linux/silero-vad:/vad/silero-vad:ro" \
  -v "$PWD/docs/evaluation/local-s2s/phase-02-linux-assets.json:/assets/assets.json:ro" \
  --entrypoint python \
  sha256:5c80c77c54da4641318e69cdb8fff092391cd746e491fa8029280c2999ce27d1 \
  - < docs/evaluation/local-s2s/image-assets-smoke.py

No paid requests, STT/LLM/TTS weight downloads, application runtime edits, voice speed/buffer changes, database operations, image rebuild or operational restart occurred. The local Silero VAD weight was downloaded under this authorization.

Additional actual construction attempt: failed

After resource validation, the construction check called the unmodified image's actual build_runtime with the real local assets and a real local component gateway backed only by HTTPX fixtures. It used the same isolated Docker command above, substituting this script on stdin; the script uses fixture model IDs and a 17-token cap in its own process only. The process exited 1 before successful construction:

speech_to_speech/s2s_pipeline.py:490
def handler_context(queue_in: Queue[Any], queue_out: Queue[Any]) -> HandlerContext:
TypeError: 'function' object is not subscriptable
ConfiguredRuntimeError: Configured pipeline local construction failed.

Root cause: services/local_s2s/engine.py replaces upstream pipeline.Queue with a lambda returning a bounded queue. The real upstream handler builder also evaluates Queue[Any] as a type in a nested function annotation; the lambda does not support that operation. Earlier offline fixtures/imports did not execute this path. Missing resources are resolved, but the current image cannot construct the complete pipeline successfully.

No application fix was applied during this resource-download task. Next scoped repair: retain a type-compatible queue factory without changing the existing 256-item capacity or stop behavior, add regression coverage for construction, and rerun the real image check. Then complete native session/audio/POSIX checks before any paid component or Persian browser acceptance.