Repository navigation
serve: the [prefix] line prints on the refusal branch too (engine#2895) - #2901
bong-water-water-bong wants to merge 1 commit into
Conversation
…5, my #2889) #2889 recorded a refusal as a decision -- `stats.prefix = {-1, 0, "cache_prompt: false"}` -- and put the one `[prefix] slot=` print inside the OTHER branch, the one that requires `cache_prompt` true. So the decision that most needs explaining was the only one that printed nothing, and the log of a refused request looked exactly like a request that never touched the cache. My own PR body claimed the opposite ("the [prefix] line says *you asked for no slot*"); that claim was wrong, and the CHANGES verdict raised at the same commit was right about it. The shape is the fix as much as the line is: one decision per request, then ONE print after the decision, outside the branch that makes it. Before, two `if`s could each own a decision and only one of them could print; now there is a single exit and no way to add a decision that skips the line without seeing it. `cache_prompt` false is not a special case in the output: it is the same line, with the reason saying which of the three it was -- "cache_prompt: false", "slot has no usable state", or the lookup's own. Compiles clean under ONEBIT_NPU_RUNTIME_OWN; pre-pr 13 green, 2 skipped. The runtime arm -- that a request with `cache_prompt: false` logs the line -- needs a serve with the prefix cache on, which is the next step rather than this commit.
|
VERDICT at 38c725f: CHANGES — superseded by Land |
|
Duplicate of #2899, which is the same unification (one Recommend closing this draft with a pointer so the branch can be deleted; #2899 carries the same code and the row that stops a third decision path from going silent. |
|
Correcting my own verification plan in this PR body: the runtime arm cannot be taken on this box, and the reason is measurable. I wrote "the binary for it is building now" about the runtime check — a request with That is not a coincidence, it is the answer: So the honest status of the verification on this PR:
I would rather record the arm as owed on that host than claim it. The defect itself is not in doubt — the print sat inside the |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Closing this as superseded by #2899 — a draft opened before it appeared, on the same issue, and the other one is the better fix. What decided it is the part mine does not have: #2899 extends Second, smaller: the What mine had and #2899 does not: nothing load-bearing. My hoisted print fires once per request when the cache is on; theirs fires once per decision taken. For the two paths that exist they are the same output line, and the checker is what makes it stay true. One correction to carry, since I raised it in this branch's description: the runtime arm cannot be taken on this box. |
Draft: engine is at 4 non-draft PRs against the cap of 3 (my #2889 merged an hour ago; this is its follow-up). Flips to ready when a slot frees.
The defect (from a CHANGES verdict that got buried on #2889)
#2889 recorded a refusal as a decision and put the one
[prefix]print inside the other branch:So the decision that most needs explaining was the only one that printed nothing, and a refused request's log looked exactly like a request that never touched the cache. My own PR body claimed the opposite — "the
[prefix]line says you asked for no slot rather than looking like a miss" — which was false, and the reviewer who raised CHANGES on that commit was right.The fix is the shape, not just the line
One decision per request, then one print after the decision, outside the branch that makes it:
Three decisions, one exit:
cache_prompt: false,slot has no usable state, or the lookup's own. A fourth added later cannot skip the line without deleting the print it sits next to.Verification
app/forward_serve.cppcompiles clean underONEBIT_NPU_RUNTIME_OWN;pre-pr-checks13 green / 2 skipped.cache_prompt: false, checking that the line appears withreason=cache_prompt: false. That needs a device ticket, and I would rather run it than assert it. The binary for it is building now.