Repository navigation
fix(qwen): consume checked Card reserves after merged context policy - #372
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: The migration preserves typed shortages and reports reserve overflow by name.
Checked
Duplicates: 0 new items; searched reserve consumers and error owners. No duplicate introduced; no dryer pairs supplied.
Complexity: crapper flagged no functions; the added branch handles a named error.
Silent failure: 2 changed sites followed. Production overflow returns CardBytesPastU64; the bounded test expectation panics explicitly on overflow. Neither substitutes a default.
Tests: static mutation check of qwen3moe_place.rs:659: stringifying CardBudgetFloor makes the existing typed downcast fail. Restoring either unchecked API use fails type checking. No tests executed.
Gates: no pins, thresholds or cases removed or relaxed.
Escape catalog: C1–C4 do not match.
Adversarial checks: empty reserves sum to zero; overflow remains fatal through context selection; checked and unchecked load terms retain their existing assertions. This is a load-time error path.
Notes
Dryer did not run, per diagnostics.
The PR reports FAIL-first compilation but supplies no post-fix check output or NVIDIA gate run. This review did not execute builds or gates.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/shared/qwen3moe_place.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
@Burntgogi Thanks for both fixes, and for the work it took to track these down. #370 and #372 are merged, so main builds |
Problem
The concurrent merges of #339 and #359 leave current main
e195c9e6af40372d56543c779f52222e3cf5955euncompilable for both the Qwen CLI and shared server.Whole::dense_refusalstill assigns the now-checkedCard::reserve_bytes() -> Option<u64>directly to theu64CardBudgetFloor.reservesfield. Its existing typed-context regression also compares an unchecked expectation against the new optional result.Decision
Complete those two caller migrations only. A bounded reserve preserves the typed
CardBudgetFloorand all shortage fields. Overflow becomesCardBytesPastU64naming the card, never a zero/default or a retryable shortage. The existing bounded test construction unwraps explicitly. Update the helper's rustdoc; do not duplicate the parent context test or change context policy, kernels or bands.Source:
626be5fb686053de9e4bbcc262679c7d7351481fon merged current main. This is the small caller migration already present in the independently verified62ea287branch; #359 merged its earlier5e3f139head before that later branch update.Verification scope
Fail-first: a fresh isolated all-feature metadata check for
generate_qwen3moeandbloomery-serveon unmodified current main exits 101 with E0308 (expected u64, found Option<u64>) at both inclusions of qwen3moe_place.rs:660. This is a compiler/API repair, not an NVIDIA execution result.The separate pre-existing split-prefill compile regression is fixed by #370; it is deliberately not mixed into this patch. Actual NVIDIA dense/context/serving acceptance remains unrun on this AMD-only host.
After the fix, exact-head formatting, both all-feature production-target metadata checks, workspace/all-targets metadata and all 138 placement tests pass. Actual-source host execution of the private dense-refusal owner preserves bounded reserves=3, budget=8, floor=9 and the named card in the typed shortage;
[u64::MAX, 1]reserves produce the namedCardBytesPastU64, not a retryable shortage.Post-merge integration
09bd728f56a21a4fc708f3c638e2d3d8afc3ab1f, containing current main plus this repair, #370 and the separate dense diagnostics, passes full-feature GPU-test metadata and 124 default host-library tests (3 ignored). No CUDA execution is claimed.Immutable fail-first diagnostics, exact-head verification log, actual-source host smoke and post-merge integration log.