Skip to content

Make Qwen4Exp download diagnostics truthful - #698

Draft
justinchuby wants to merge 3 commits into
mainfrom
justinchuby-fix-qwen4exp-download-claim
Draft

Make Qwen4Exp download diagnostics truthful#698
justinchuby wants to merge 3 commits into
mainfrom
justinchuby-fix-qwen4exp-download-claim

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

  • distinguish successful bounded-header preflight, which can truthfully report no payload download, from fail-closed validation after the existing immutable-download fallback
  • preserve best-effort fallback and fail-closed Qwen4Exp tensor semantics
  • document the transport/truncation fallback and remove duplicated unconditional no-download claims
  • add a mocked regression proving fallback resolution can download before rejection without falsely reporting otherwise

Validation

  • python -m pytest src/mobius/integrations/gguf/_qwen4_exp_test.py -q --tb=short — 14 passed
  • lintrunner --output oneline --all-files
  • git diff --check
  • independent medium code review — no findings

Base: dcf8bab5d7f1e1afb2d220ed0b30d8ee8c075b1f
Head: 6edd2d3c1eb4a4d116fd6a588850e3d1f3b8ca47

Follow-up to merged #676 and its suppressed Copilot review finding.

@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 28, 2026 23:19
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing dda71aa3e7c168

Model Sub-model Changes Status

No architecture changes detected.


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing dda71aa3e7c168

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0%
bert (feature-extraction) num_nodes 68 68 +0.0%
falcon model_size_bytes 364 KB 364 KB +0.0%
falcon num_nodes 66 66 +0.0%
gemma2 model_size_bytes 428 KB 428 KB +0.0%
gemma2 num_nodes 105 105 +0.0%
gpt2 model_size_bytes 324 KB 324 KB +0.0%
gpt2 num_nodes 54 54 +0.0%
llama model_size_bytes 425 KB 425 KB +0.0%
llama num_nodes 60 60 +0.0%
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0%
llama (static-cache) num_nodes 56 56 +0.0%
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0%
mamba (ssm-text-generation) num_nodes 94 94 +0.0%
phi3 model_size_bytes 421 KB 421 KB +0.0%
phi3 num_nodes 58 58 +0.0%
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0%
phi3 (static-cache) num_nodes 54 54 +0.0%
qwen2 model_size_bytes 425 KB 425 KB +0.0%
qwen2 num_nodes 60 60 +0.0%
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0%
qwen2 (static-cache) num_nodes 56 56 +0.0%
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0%
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0%
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0%
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0%
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0%
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0%
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0%
t5 (seq2seq) num_nodes 176 176 +0.0%
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0%
whisper (speech-to-text) num_nodes 128 128 +0.0%

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines Qwen4Exp GGUF “fail-closed” diagnostics so they accurately distinguish between (a) bounded-header preflight that does not require downloading the full GGUF payload and (b) fallback paths that may download an immutable file/shard set for local validation before rejecting.

Changes:

  • Extend the Qwen4Exp rejection helper to optionally encode whether a Hub payload was downloaded, and adjust messaging to avoid unconditional “no download” claims.
  • Thread the new payload_downloaded=False signal through GGUF Hub preflight rejection call sites.
  • Update docs and add a regression test to ensure fallback downloads don’t produce “no download” messaging.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/mobius/integrations/gguf/_qwen4_exp.py Adds payload_downloaded context to fail-closed error construction and updates diagnostic wording.
src/mobius/integrations/gguf/_builder.py Passes payload_downloaded=False for bounded-header preflight Qwen4Exp rejection points.
src/mobius/integrations/gguf/_qwen4_exp_test.py Updates expectations and adds a regression covering fallback-download-before-rejection messaging.
docs/design/qwen4-exp-text-core.md Documents bounded-header preflight vs fallback full-download validation behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/mobius/integrations/gguf/_qwen4_exp.py Outdated
Distinguish bounded-header preflight rejection, where Mobius can guarantee no GGUF payload download, from local validation after the intentional immutable-download fallback. Keep tensor conversion fail-closed and document the fallback accurately.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7f812ed6-7e89-4065-880e-3b88c39d98cc
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Describe successful Qwen4Exp preflight in terms of bounded range data and complete file or shard downloads, since the range can include initial tensor bytes. Cover small-header range responses and split-set fallback with mocked regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7f812ed6-7e89-4065-880e-3b88c39d98cc
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Use Hub file size and received range length to distinguish partial preflight data from a complete small GGUF response. Propagate the tri-state through renamed split discovery so Qwen4Exp rejection diagnostics remain truthful for every bounded-header path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7f812ed6-7e89-4065-880e-3b88c39d98cc
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby force-pushed the justinchuby-fix-qwen4exp-download-claim branch from 79183fc to 3e7c168 Compare August 30, 2026 15:15
justinchuby added a commit that referenced this pull request Aug 31, 2026
## Summary

- pin all JSON evidence under `testdata/evidence/`, including nested
paths, to `text eol=lf`
- refresh both hash-bound traces with semantics-preserving leading JSON
whitespace so existing Windows worktrees receive new LF-normalized blobs
- preserve future non-JSON evidence as unclassified so binary artifacts
are not treated as text
- validate effective attributes in an isolated temporary Git repository
with system/global/caller-repository attribute sources excluded
- regress metadata-bound LF bytes, simulated CRLF bytes, and canonical
parsed-JSON semantics

## Validation

- draft evidence unit and integration guards: 4 passed, 2 skipped
(opt-in real 16 GiB probes disabled)
- evidence/artifact suite: 85 passed
- `lintrunner f --output oneline --all-files`
- `git diff --check`
- exact-head GPT-5.6 Sol review: no significant issues

## Evidence identities

- dflash blob: `bf42e00a181fa54a2fe6da19ae85c0c810b8c58f` ->
`b2966dd06ae6daa5f5b764ebd8d12b74f8824d69`
- dflash LF:
`1062e5ed665aeafbcf0d0fb250f9b48c520091ebc4b2ad6b19dbd341518c481f`;
simulated CRLF:
`e0e70e909f33ed44aa87da39bab721ebbee0c3e730e2f89dbc509c6683701e42`
- eagle3 blob: `9498c417c8a22cf1a387b7dbd801a8701df0cfae` ->
`9e02745b6f3b087dbdce4d5fc9d7ff224af0ba6b`
- eagle3 LF:
`9d6c6fdb630bc0a040eacc2a2357a2991609ea0d904ff16574a9b55f7d010d55`;
simulated CRLF:
`78aa94f24d5f1b9ae020de1ffa5a70c6a30f30ff45eb5310a540cdd2b3d8fab2`

## Follow-up

PR #698 must rebase this fix from `main` before its Windows jobs can
pass.

---------

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants