Colab run 5 failed at cell 12 (import luke_scribe.config) because hatchling editable installs write a .pth pointing at src/ that the interpreter only reads at startup; a long-running Colab kernel started before pip install -e never sees it. Subprocesses (CLI) work, but kernel-side imports fail.
Fix: install cell now walks up to the repo root and inserts src/ into the kernel sys.path, verifying with import luke_scribe.config. Cell 12 has a defensive guard of the same kind. Tunnel external verification now retries up to 6x2s for DNS propagation. Troubleshooting section documents the issue.
Reviewer feedback: guard the 120s URL poll with shutil.which(cloudflared) so the failure case returns immediately; merge import re into the cell top import; note Cloudflare browser-check interstitials can fail urllib verification even when the link works in a real browser.
Server cell sets LUKESCRIBE_TUNNEL=cloudflare so the app built-in CloudflareTunnel (trycloudflare quick tunnel) starts alongside the server. After health+auth checks the cell polls server.log for the trycloudflare URL, prints it with /docs dashboard and /health links, and verifies external reachability.
cloudflared binary is downloaded in the install cell (graceful skip on failure). Troubleshooting section documents the temporary/public nature of the link.
Bench clip failed in Colab because entity_retention calls ent.get() but
the manifest used plain strings -> AttributeError -> clip counted as
failure (failure_rate 1.0). Notebook now builds entities as
{canonical, surface, start_char, end_char} from the reference text and
writes a reference file for meaningful metrics.
Colab run 3 (A100) surfaced three GPU/API-path bugs mocks couldn't catch:
1. faster-whisper yields namedtuple Segments, but batch/bench consume
them as dicts (.get) -> AttributeError 'Segment' has no attribute
'get' on every real transcription. Engine now normalizes segments
to dicts (_to_dict_segments) at the boundary.
2. API TranscribeOptions carries engine-irrelevant keys (formats,
timestamps, glossary_id, post_correction, diarize); worker's
TranscriptionOptions(**job.options) crashed with TypeError. Worker
now filters job.options to TranscriptionOptions.__slots__.
3. in-proc server never consumed its own queue (jobs stayed queued
forever). Added opt-in Settings.auto_worker (default off): lifespan
starts a daemon Worker thread for inproc backend, stopped on
shutdown. Notebook enables it via LUKESCRIBE_AUTO_WORKER=true so the
API upload -> completed flow works end to end.
Notebook: bench manifest now uses clips schema (audio_path/duration_sec/
entities); cell 22 reads error_message/error_code; upload poll window
raised to 4min (first-run model download).
+ 5 tests (namedtuple/dict segments, API-style options, auto_worker
on/off); 136 tests pass, ruff clean.
Colab A100 run exposed a GPU-only bug: DeviceManager returns
selected_device='cuda:0' and the engine passed it verbatim to
faster-whisper, but CTranslate2 only accepts device='cuda' with a
separate device_index arg -> 'unsupported device cuda:0' on every GPU
transcription. Fix: FasterWhisperEngine._split_device() splits
'cuda:N' -> ('cuda', N) and passes device_index to WhisperModel.
Notebook: server cell now pkills stale servers (old process holds
port 8000 and 401s on new keys since KeyStore loads at startup),
sets LUKESCRIBE_API_KEY_FILE explicitly, and verifies auth with
RAW_KEY before proceeding; worker cell guards read_result() is None.
+ 4 unit tests (device split contract), 131 tests pass, ruff clean.
nvidia-cudnn-cu12/cublas-cu12 are namespace packages with no
__file__, so os.path.dirname() raised TypeError and the install cell
aborted. Locate libcublas.so/libcudnn.so under site-packages with
find and build LD_LIBRARY_PATH from those. Also add a CTranslate2
GPU check cell (ctranslate2.get_cuda_device_count) right after
install so GPU usability is confirmed before transcription.
Colab now ships CUDA 13.0 (driver 580); CTranslate2 wheels are CUDA 12
so GPU init fails with 'unsupported device cuda:0'. Install
nvidia-cublas-cu12/nvidia-cudnn-cu12 and set LD_LIBRARY_PATH in the
install cell; transcription cell reports failures cleanly.
API smoke: api_keys.json stores only digests (raw key shown once), so
the notebook now captures RAW_KEY at creation and uses it for upload
instead of reading the digest file (fixes 401).
Cell 1 now detects an existing /content/luke_scribe/.git and runs
git fetch + checkout feat/full-platform + pull --ff-only instead of
rm -rf + clone, so re-running the notebook updates instead of wiping
local changes.
Colab 'python3 -m venv' fails with ensurepip error (no .venv created,
so every subsequent cell hit 'command not found'). Switch to system pip
(Colab standard) and run the API server via nohup background with log
fallback diagnostics.
CPU-only dev env verified via mocks; the notebook runs the full real
pipeline on Colab Pro T4: clone → ffmpeg/venv install → detect (GPU
capability tier) → 127 unit/integration tests → sample TTS (KO+EN
tech terms) → real faster-whisper transcription → hotword/postprocess
→ API smoke → benchmark.