• Stefy Lanza (nextime / spora )'s avatar
    ocr: an empty byte trace must not be read as a verdict (v0.3.26) · 168ac912
    Stefy Lanza (nextime / spora ) authored
    v0.3.25 shipped the trace as a bare list of findings, and defined the empty list
    as "the bytes were sound, so the loss is in the serving path". That is wrong
    whenever the upstream returned no logprobs: there was nothing to analyse, and
    the emptiness would have read as a confident conclusion drawn from missing data
    -- exactly the class of mistake the trace exists to stop.
    
    So the trace is now a self-describing envelope:
    
      {"calls": 7, "with_logprobs": 7, "conclusive": true,
       "kinds": {"invalid-utf8": 29}, "why": "...", "findings": [...]}
    
    and `unreadable.blame` is one of "the model", "the serving path" or "unknown".
    `conclusive` is false when no calls were recorded (the hook never fired) or when
    none carried logprobs, and then blame is "unknown" rather than defaulting to
    either culprit.
    
    surya asks for logprobs by default (SURYA_INFERENCE_LOGPROBS = True) and the OCR
    gateway forwards the body verbatim precisely so they survive, so the normal case
    is conclusive. But an upstream that declines them is a configuration, not a bug,
    and it has to be visible instead of silently inverted into an answer.
    
    Also: a trace analysis that throws now reports {"conclusive": false, "why":
    "trace analysis failed: ..."} rather than no key at all, so "the analysis broke"
    and "the bytes were fine" cannot look the same either.
    
    tests/test_ocr_token_trace.py: 37 (was 30), including the inconclusive paths.
    825 passed across the OCR/config/admin/runpod selection, same 10 pre-existing
    failures.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PxYHWbCAjjjD7A1rhFKtaW
    168ac912
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
REQUEST-geoclip-embeddings.md Loading commit data...
REQUEST-vpr-embeddings.md Loading commit data...
amdgpu-coredump-05000.bin Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-crisperwhisper.txt Loading commit data...
requirements-h3.txt Loading commit data...
requirements-longcat-train.txt Loading commit data...
requirements-longcat.txt Loading commit data...
requirements-melotts.txt Loading commit data...
requirements-nemo.txt Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-ocr-paddle.txt Loading commit data...
requirements-ocr.txt Loading commit data...
requirements-pyannote.txt Loading commit data...
requirements-surya.txt Loading commit data...
requirements-vllm.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...