Repository navigation
[PR] fix: wave-12 batch — 19 community fixes (throttle isolation, Google thinking budgets, Responses warmup SSE, dsh carrier shapes, image byte trigger, keepalive aborts, …) - #7199
Conversation
loadDeclaredModelEndpoints folded three different situations into one console.error: no config file at all (the documented default for a host that never declared custom endpoints), a file that exists but cannot be read, and a file that exists but is not a usable declaration. The first one fires on every fresh install's very first boot and reads like a failure, so a new user's first impression is a broken setup. ENOENT is now silent; a present-but-unusable config keeps exactly one line, now naming the reason (read error code, or the JSON/parse complaint) so it points at the file. The never-throws and one-shot contracts are unchanged. Tests split accordingly: absent file asserts zero stderr; malformed JSON and structurally invalid declarations assert one line each, including the file name and the offending index.
…e` (#7128) parseDshPatchEntries is the single judgement for 'is this plugin turned off in cordis.patch.yml', and both consumers act on it: the cost advisory treats !disabled as 'enabled, warn about spend', and the host-plugin notice treats disabled as 'the user handled it, stay quiet'. The old scan matched only the literal `true`. dsh's patch layer is not limited to that spelling. In one stock web-profile dump, 52 `disabled:` lines carry only 29 literal trues; the other 23 are `!!js` expressions, plus YAML 1.1 forms and quoted booleans. Every one of those read as ENABLED, so a user who disabled a billed plugin kept seeing its cost hint, and a user who disabled a host plugin could not dismiss the notice. Read the value instead of the literal: YAML booleans (true/True/yes/on), quoted forms, and a trailing comment. A `!!js` expression cannot be evaluated from text, so it counts as 'turned off' -- the safe direction for both consumers (under-reporting a hint beats nagging someone who already acted). Block attribution and the truex-style non-boolean rejection are unchanged. Measured on the stock dump: 29/52 -> 52/52 recognised. Negative control: restoring the literal-true regex turns the new case red; the two consumer suites (2462 advisory, 2861 notice) stay green.
Propagate structural failures from every dependency section before committing ledger changes. Keep sections without the target dependency skippable.
Preserve the last upstream usage object when emitting the synthesized completion chunk. OpenAI clients that price a turn from provider fields (for example cost/credits) otherwise lose them. Forward the trailing usage-only frame to clients that set stream_options.include_usage, including text-only rounds, and reset the remembered usage per stream round so a later round cannot inherit a previous cost. Adds five regression tests in tests/openai-usage-frame-forward.test.ts.
Let each snapshot own cancellation through response-body consumption and release its upstream connection when replaced or disarmed. Preserve the existing timeout and failure policy, including early Node 20 support. Fixes #7142
…7153) A human message that merely quoted a durable marker was classified as a host injection. Two consumers made that a correctness bug: the kernel's Rule-3 last-user anchor refuses a virtual-path message (so the live request could be folded away silently), and durable/* goes into protectedLatestTools (so a quote took the identity over from the real carrier and was pinned forever). Shape gates on the four classifiers whose bare marker collides with human or relay text: the durable pair must open the system-reminder frame both producers emit, and the two one-shot notices must carry their emitter's real shape (job id + detail/EOL, a settlement ending). Every emitter shape keeps matching; a future emitter change degrades to a miss, never a false positive. Existing fixtures that encoded the bare-marker shape were updated to the producers' real output; assertions untouched. Real-session check (343 dsh journals, 3009 user-role messages): 1061 -> 1060 classifications, human false positives 1 -> 0, and the misclassified relay report now resolves as oneshot/agent-relay instead of stealing durable/skill-catalog.
…lane (#7154) /compact drives the host's own compaction call — the same envelope bili's wire guard refuses unconditionally (#1729) — so on a bili-owned lane the command has no outcome except failure. dsh reports that failure as "Compaction could not produce a useful summary", blaming the model for a policy refusal, and every retry fails identically because the refusal is terminal. Disable the command entry in both patch carriers (persistent bundle + launcher overlay) with the same static semantics as the adjacent compaction-basic auto:false row. Escape hatch: a profile-level `disabled: false` for the same id brings it back; invocations are still refused at the wire.
…7155) dshNativeInstalled() answered for the whole machine ('any profile has the bundle'), and the launcher used that answer for THIS launch. On a machine where a sibling profile has the bundle but the booted one does not — a scratch profile created after 'bili plugin install dsh', a profile whose dep was removed by hand — the overlay was skipped and the session ran with zero bili entries: no ACP tools, no takeover, native compaction armed (which the wire guard then refuses turn after turn), while the launch note described the other profile. Take an optional profile argument (omitting it keeps the machine-wide answer for status/tests), parse the booted profile from the dsh argv the way dsh does (bare first argument abbreviates --profile), and say plainly when the booted profile lacks the bundle.
…itter shape (#7153) The #7153 carrier gates require the complete <system-reminder> frame around the workspace-instructions label, but two runtime fixtures still carried the bare label, so their guard message stopped classifying as durable/agents-md and was no longer pinned: the wire handed out a real ref where null was asserted. - tests/plugin-fork.test.ts (#2676): the durable-guard history row now carries the frame dsh-agent-instructions emits. - tests/session-continuity-proof.test.ts (#629/#2620/#2625/#2676): GUARD_TEXT likewise; the scenario-B fork-copy assertions are unchanged. CI was red on the one assertion in each file (ubuntu 22/3, ubuntu 24/3, windows 22/1, windows 22/4).
… proven dead (#7176) apply() primes the interceptor's origin plane with the launcher-provided attach origin before any health verdict exists — deliberate, so a normal boot does not pay a probe. When the verdict then lands and the target is dead, verifyAttachAndRecover's pinned branch cleared the tool base but left that plane bound. readyOrigin() short-circuits on it, so every later model request was rewritten onto the dead origin and failed; the documented direct (uncompressed) degradation was unreachable for the rest of the process, and the user saw only a bare transport/503 per turn. The sibling spawnFallback() tail already drops the same field (together with the preset unfreeze it needs because it then spawns). This branch must NOT spawn — per #1365 a second instance would serve tools while the model channel stayed pinned, and every bili tool call would 404 — so only the plane is cleared: the preset stays, maybeRetry keeps re-probing, and traffic degrades to direct until the target answers again. One log line records the transition. Measured with a local Messages mock on the dsh lane: with the origin dead, three consecutive turns failed TRANSPORT and the upstream saw zero requests before this change; after it, requests that follow the verdict take the no-origin direct lane. The first request of a process that booted against an already-dead target still races the verdict (fails once) — proving the origin before priming the plane, or giving this lane the resolver lanes' per-request liveness check, are the remaining options and are not part of this change.
…rigin hermetic run-ci-tests.mjs refuses any .test.ts matching SPAWN_RE that is not in scripts/live-files.mjs, and this suite's own identifier (_setSpawnForTest) plus the header comment tripped it — every test shard failed before a single test ran. Registered at the end of the table (slot = index drives each file's zone port band, so entries are append-only) with the concurrency note the table asks for: no shared port, no child process, both arms reset the module-level origin plane in finally. While here, the dead arm no longer hardcodes a port. It binds :0, reads the port, closes it and reuses the number, so the 'nothing listens here' premise is guaranteed at runtime instead of assuming a fixed number stays free on a shard runner, and no zone band is involved.
) When compat.dropFields removes a budget field that restoreOutputBudget just restored, the drop log now says so explicitly so the log is honest (the restore fired, but the field is absent from the forwarded body). One-line note appended to both drop-log sites (graph and string paths). (cherry picked from commit 1fcc31d)
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11111-pr.7199.fda4ab9This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7199.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — #7199 是 wave-12 的合并载体:分支 标签: 范围:53 文件,+2811/−167(24 src/scripts + 29 test)。无 逐修复判定(全部 OK)
回归审查(既有行为清点)逐路径审了 diff 触碰的既有行为:无意外回归。仅有的有意行为变更全部已在 PR 正文披露:#7154 停用
测试有效性29 个测试文件全部通读,全部真测试、双向断言(该触发时触发 + 不该触发时不触发):
diff 整洁度 + 代码整洁53 文件全部与 19 个修复 + 测试相关,无跑题文件、无生成物/锁文件连带、无纯空/重排。命名达意、无死代码、无重复、错误处理带上下文、常量具名、注释讲为什么、风格与仓库一致、无新依赖。 CIhead 结构化八问
判定:可合(mergeable) — 19 个修复逐一核验通过、双向测试齐全、CI 绿、diff 干净、无未披露行为变更。批次载体与 19 个独立 PR 的合并关系清晰,与兄弟批次 #7196 无重叠。 |
14488b0 to
b329f58
Compare
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved — PR head is now What I did this run:
Incident disclosure (honesty, per push discipline): my pre-push CI will run on the new head; the mirror check cache will reflect it within a minute or two of the run starting. 结构化八问(中文结论)
收工判定:冲突已解决并推送,PR 可合并状态已恢复,等待 CI 在 |
What
Wave-12 batch: 19 small community fixes (12× Afloat16, 6× resec, 1× myfear) + 1 carryover commit from #6766's post-merge author push, merged as-is with author commits preserved (no rebase, no squash). Each entry is a single-purpose regression fix with its own test suite; all were reviewed line-by-line before merging.
functionResponse.response.errormaps to the structuralisErrorflag → output steering keeps the requested thinking budget after failed tool calls instead of dropping to 128data:framing, multiline data, UTF-8 flush) → warmup checkpoints commit again__proto__JSON keys contribute to fingerprints (no cross-session exact-prefix reuse)planTokenizenormalizes each source once instead of per token match (+ reproducible bench script)bili dshlauncher overlay decision uses the profile being booted, not the machine-wide install probe (booted profile without the bundle gets the overlay + a helpful stderr line)/compactstood down on bili-owned lanes in both patch carriers (the #1729 wire guard refuses its envelope unconditionally; dsh misreported that as a model failure)AbortSignal.anyfor Node 20) → slow upstreams stop occupying connectionsread_original_imageoriginals count toward the upstream image cap while remaining un-archivable (rescue no longer leaves the full request over the limit)ETIMEDOUTwith explicit connect-phase evidence (directsyscall:"connect"or an all-connect aggregate) classifies as retryableconnect-timeoutinstead of non-replayedupstream-timeoutstream_options.include_usageis set; per-round reset prevents cost inheritancepatchPnpmLockpropagates structural failures from every map (validate-before-write contract; a malformed later section no longer reports success with a partial repair)disabled:read by value (YAML 1.1 spellings, quoted forms, trailing comments;!!jsexpressions conservatively count as disabled) → cost advisory and host-plugin notice stop ignoring non-literal disables1fcc31d11(pushed after the wave-11 snapshot): compat.dropFields log notes when it drops the output-budget fieldReview notes
tsc --noEmit: clean.Refs #7120(not a keyword close); [PR] fix(openai): keep provider usage fields in the synthesized completion #7136 has no paired issue.Closes #7186
Closes #7183
Closes #7180
Closes #7176
Closes #7172
Closes #7170
Closes #7165
Closes #7160
Closes #7155
Closes #7154
Closes #7153
Closes #7146
Closes #7142
Closes #7140
Closes #7132
Closes #7128
Closes #7126