31 files had Windows line endings (\r\n) from merge commit. This causes
patch_ops.sh replace_once() to fail: anchor strings use \n but file
content has \r\n, so no match → patch fails → docker build fails.
Also added .gitattributes to force LF for all text files going forward.
CCCL segmented_sort.cu AST chain → traced back to base engine zip →
discovered base patch_ops.sh deploys 10+ files we were missing.
Missing patches that caused real failures:
1. paged_attn.py — Triton context_attention_fwd HANGS BI-V100 GPUs permanently.
Base engine replaces it with _forward_prefix_pytorch pure-PyTorch fallback.
WITHOUT THIS: GPU hang on any prefix-cached request → timeout → 0 score.
2. patch_xformers_sdpa_seq.py — head_dim=256 > cudnnFlashAttn 128 limit.
Qwen3.5 uses head_dim=256. Without this bypass, attention crashes.
3. sequence.py — completion_tokens inflation under chunked prefill.
Bug: get_output_token_ids_to_return(delta=True) with num_new_tokens=0
returns the ENTIRE prompt. 10K prompt × 3 chunks = 30K false tokens.
4. scheduler.py — num_cached_tokens tracking for prefix caching.
5. mamba_cache.py — GatedDeltaNet state management.
6. patch_model_runner.py — prefix_cache_hit stays True in chunked-prefill
chunk 2+, causing undersized block_tables and crash.
Also: conditional qwen3_5.py deployment (CCCL JIT pattern) — if Docker
image already has a working qwen3_5.py (with corex integration), don't
overwrite it. Only deploy ours if the image version is missing.
CCCL source: catch2_test_device_copy_batched.cu
CCCL pattern: DeviceCopy::Batched always uses separate src/dst buffers
with shuffled destination offsets. Never does in-place scatter.
Bug: _swap_mamba_cache used cache[:, [to,from]] = cache[:, [from,to]]
PyTorch advanced indexing assignment has undefined evaluation order
when src and dst overlap — this can corrupt DeltaNet conv_state and
temporal_state during decode, causing silent numerical errors.
Fix: explicit temp = clone(from), copy(to→from), copy(tmp→to).
Three CUDA memcpy calls instead of one potentially-racy fancy index.
This affects every decode step of every DeltaNet layer (alternating
layers in Qwen3.6). Corrupt temporal_state → wrong attention output
→ garbage text or NaN propagation.