Repository navigation
[PR] fix(dsh): decide the launcher overlay from the profile being booted (#7155) - #7161
Merged
ranxianglei merged 1 commit intoNov 24, 2026
Conversation
…anxianglei#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.
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1312-master.a59a638 # this exact build
npm install -g billion-context@master # always the newest merged build
|
ranxianglei
pushed a commit
to mariopasquali/billion-context
that referenced
this pull request
Nov 25, 2026
…ranxianglei#7678 wal-reclaim-passive (walJournalSizeLimitBytes default 0, ranxianglei#7674) + ranxianglei#7617 identity-tables-consolidate + ranxianglei#7581 egress block-flow checkpoint retire + ranxianglei#7659 eg-GA docs wrapup + ranxianglei#7671 degenerate-retry + ranxianglei#7676 megaturn-bridge + ranxianglei#7677 doom-prompt-mass + ranxianglei#7632 pure-echo latch + dsh batch (ranxianglei#7161/ranxianglei#7159/ranxianglei#7158/ranxianglei#7129/ranxianglei#7127) Only manual conflict: docs/configuration{,.zh-CN}.md env table — union of intent, original line order: master's walJournalSizeLimitBytes row (default 0, ranxianglei#7674) + PR's archiveAfterDays row (with the bili storage migrate ranxianglei#5599 clause). All code (src/persist.ts, src/storage/shadow.ts, src/storage/store.ts, tests/storage-unified.test.ts) auto-merged; local typecheck clean and the targeted storage suites (storage-unified/-ccr/-state-fields/ -batched-verification) pass 38/38 on the merged tree. (ranxianglei#6773)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7155.
问题
bili dsh --profile <x>是否挂 bili 自己的 overlay,由dshNativeInstalled()决定——而它是全机器的:dirs=$DSH_HOME/profiles/*全部。于是只要任一 profile 装了 bili,本次要启动的那个 profile 就被当成"已装":overlay 被跳过,并打印一句"dsh native install detected"——描述的是另一个 profile 的状态。验证(真机)
两个 profile:
installed的 bundles 含billion-context,scratch只有@deepseek-ai/dsh-base。修复前:
后果不是"少个提示":
bili-native→ 无 ACP 压缩工具(compress/decompress/search_context/acp_status)、无接管;auto:false)→ 到阈值就发压缩调用 → 被 bili 代理的 nudge 死锁无检测:同一 session 交替收到两种结构互斥的请求流(巨型单消息 ↔ 多轮)时不告警 #1729 守卫拒绝 → 每个 turn 一条step compaction failed: … continuing the turn,overflow 恢复同样失败;怎么修的
dshNativeInstalled(env, profile?):给出 profile 时只看这个 profile 的目录;不传时保持原来的全机器语义(status/测试仍用它);dshProfileFromArgs()(src/dsh-channel.ts):按 dsh 自己的解析规则取本次要启动的 profile——裸的第一个参数等价于--profile <name>(plugin子命令除外),否则认--profile <name>/--profile=<name>,--之后的不算;launcher.ts用这个 profile 做判定;当本 profile 没装而机器上别的 profile 装了,明确说一句:验证(修复后)
同一条命令:
新增测试(
tests/issue7155-dsh-native-installed-profile-scope.test.ts,3 条):dshProfileFromArgs的解析表:裸参数缩写、--profile x、--profile=x、plugin --profile x add …、[]、--profile缺值、--终止。负向对照:回退三个源码文件 → 该测试文件整体变红;恢复后 3/3 绿。
本地:
typecheck干净;unused-exports/test-import-graph绿;dsh-native.test.ts76 条全过(它同时钉着全机器语义的旧行为),新文件 3 条全过。风险 / 边界
patch: entry "preset-standard" not found一类的行——这是 overlay 里那四行 preset 门控在非 web profile 上的既有行为(任何bili dsh在非 web profile 上都会打),不是本 PR 引入的;本 PR 只是让这条路径在该场景下也会走到。--profile且集群里只有一个 profile 的情形:dshProfileFromArgs返回 undefined → 回落到全机器语义(与修复前一致)。dsh 自己没有默认 profile,未指定时它自己会报错。