Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c3feb87
fix(live): accept monitor debug directories on Windows (#11678)
qwen-code-dev-bot Sep 11, 2026
85a5c48
fix(live): keep monitor debug prune resilient and qualify Windows pri…
qwen-code-dev-bot Sep 11, 2026
5b115e2
fix(live): report prune failures and document best-effort retention (…
qwen-code-dev-bot Sep 12, 2026
af82f29
fix(live): keep failed prunes retriable and report their reason (#11678)
qwen-code-dev-bot Sep 12, 2026
f6dfd22
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 12, 2026
674c014
fix(live): document silent ownership-scan skips, pin retries on both …
qwen-code-ci-bot Sep 12, 2026
bd4cec2
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 12, 2026
8d63793
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 13, 2026
565f619
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 14, 2026
9928cdb
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 14, 2026
4bc0dcc
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 15, 2026
b21ab62
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 16, 2026
d46b741
fix(live): report orphaned monitor-debug archives as unretained (#11678)
qwen-code-dev-bot Sep 16, 2026
eb5d331
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 16, 2026
876f6c2
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 17, 2026
36293c3
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 18, 2026
0331064
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 18, 2026
af19df9
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 19, 2026
9efd426
Merge branch 'main' into autofix/issue-11678
qwen-code-dev-bot Sep 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/live-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ Capture Mode(On Demand/Live Feed)三个同级设置组,以及独立 daem
`~/.qwen-live/config.json`,也支持 daemon 的 `QWEN_LIVE_DATA_DIR`)。保存后需重启
Qwen Live 才应用手动修改。旧 daemon 或内置 `qwen serve` 不提供此入口能力;文件
缺失、不是常规文件(包括符号链接)或编辑器打开失败时会提示,不自动创建或覆盖配置。
运行时保存(语言、显示器与 Memory 偏好)通过独占临时文件加 rename 原子重写
`config.json`,并在 macOS/Linux 上置为仅所有者可访问(`0600`);Windows 没有
POSIX 权限位,文件隔离性取决于数据目录自身的 ACL。
设置标题栏可以拖动,与小球共享位置记忆;打开时先等待原生窗口完成屏内定位再显示,
避免边缘处先露出被裁切的面板。用户说话的小音量视觉响应已增强,保留有界动画和缓慢
回落,不会提高发送给模型的音频音量。
Expand Down Expand Up @@ -267,7 +270,13 @@ daemon 的 debug 模式另外为视觉 Monitor 保存真实请求,目录为系
`proactive.monitor_debug_started` 和 `proactive.monitor_request_saved` 日志给出绝对路径。
仅 daemon debug 开启;Host 的 `--live-debug` 单独启用不会录制,纯音频 Monitor 也不录制。
启动及新建 Monitor 时清理,只保留最近创建的 10 个 Monitor(不是最近 10 次请求)。
被清理的 Monitor 继续运行但停止录制;文件仅当前用户可访问。内容包含真实屏幕/摄像头、
删除尽力而为:无法移除的归档(例如 Windows 上被其他进程占用文件)会超出该上限
保留,上报 `proactive.monitor_debug_prune_failed` 并附带失败原因,之后的清理
会重试直至可以移除;`EACCES` 等来自删除本身的持续性原因需要手动清理。
未通过归属校验的归档会被静默跳过、不予上报,也不计入该上限,需人工查找并清理。
被清理的 Monitor 继续运行但停止录制。文件仅在 macOS/Linux 上保证仅当前用户可访问
(0700/0600 强制执行,不满足则拒绝);Windows 无法校验 POSIX 权限位,
隔离性仅取决于系统临时目录自身继承的 ACL。内容包含真实屏幕/摄像头、
任务文本和混合 Monitor 的麦克风输入,虽然不保存连接凭据,画面或音频中的秘密不会被脱敏。
录制失败会单独报错而不影响通话;长时间 debug 可能占用较多磁盘,诊断完请关闭 debug。
完整格式与清理规则见 [Qwen Live README](../qwen-live/README.md)。
Expand Down
25 changes: 20 additions & 5 deletions packages/qwen-live/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ capability-negotiated; older Hosts/daemons keep their existing behavior.

Configuration comes from `~/.qwen-live/config.json` (generated by `init`),
with environment variables (`DASHSCOPE_API_KEY`, `QWEN_LIVE_*`) as overrides.
Runtime saves (language, display and memory preferences) rewrite `config.json`
atomically through an exclusive temporary file plus rename and mark it
owner-only (`0600`) on macOS/Linux; Windows has no POSIX permission bits, so
there the file's isolation depends on the data directory's own ACLs.

```jsonc
{
Expand Down Expand Up @@ -401,11 +405,22 @@ history. Queued/dropped frames are not presented as sent frames.
These are **sensitive recordings of real screen/camera content, task prompts and,
for audio/visual Monitors, microphone audio**. Connection credentials are omitted;
visible or spoken secrets inside media are not redacted. Directories/files are
owner-only. Debug startup and new Monitor creation keep only the ten most
recently created Monitor directories; this is not a ten-request or disk-size
limit. An evicted Monitor keeps running but stops recording and logs skipped
requests. Disk/permission failures or exceeding the 32 MiB pending-write budget
disable that recorder and log an incomplete recording without stopping the call.
**owner-only on macOS and Linux** (enforced 0700/0600 and rejected otherwise);
on Windows the store cannot check POSIX modes, so isolation is only whatever
ACLs the OS temporary directory inherits. Debug startup and new Monitor
creation keep only the ten most recently created Monitor directories; this is
not a ten-request or disk-size limit. Deletion is best-effort: an archive
that cannot be removed (for example a file held open by another process on
Windows) is kept past this cap and reported as
`proactive.monitor_debug_prune_failed` with the failure reason, and later
prunes retry it until it can be removed; a persistent reason such as `EACCES`
from the deletion itself needs manual cleanup. An archive that fails the
ownership scan is skipped silently rather than reported, is not counted
against this cap, and must be found and removed by hand. An evicted Monitor
keeps running
but stops recording and logs skipped requests. Disk/permission failures or
exceeding the 32 MiB pending-write budget disable that recorder and log an
incomplete recording without stopping the call.
Long-running debug Monitors can consume significant disk space; disable debug
after diagnosis and do not share recordings without reviewing their contents.

Expand Down
14 changes: 13 additions & 1 deletion packages/qwen-live/src/language-preferences.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,22 @@ describe('Live language preference', () => {
...raw,
language: 'zh-CN',
});
expect(statSync(path).mode & 0o777).toBe(0o600);
expect(readdirSync(dataDir)).toEqual(['config.json']);
});

// Windows has no POSIX permission bits, so skip (reportedly) rather than
// passing a test that asserted nothing.
it.skipIf(process.platform === 'win32')(
'writes the language config with 0600 permissions',
() => {
const dataDir = directory();
const path = join(dataDir, 'config.json');
writeFileSync(path, '{"realtimeApiKey":"fixture-key"}');
persistLanguagePreference(dataDir, 'zh-CN');
expect(statSync(path).mode & 0o777).toBe(0o600);
},
);

it('rejects invalid language before writing and preserves config on atomic rename failure', () => {
const dataDir = directory();
const path = join(dataDir, 'config.json');
Expand Down
4 changes: 2 additions & 2 deletions packages/qwen-live/src/memory/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { homedir } from 'node:os';
import { join } from 'node:path';
import { join, resolve as resolvePath } from 'node:path';
import { describe, expect, it } from 'vitest';
import {
DEFAULT_MEMORY_CONFIG,
Expand Down Expand Up @@ -51,7 +51,7 @@ describe('memory configuration', () => {
});

it('resolves relative and tilde paths without requiring the directory to exist', () => {
expect(resolve({ dir: 'saved' }).dir).toBe(join(dataDir, 'saved'));
expect(resolve({ dir: 'saved' }).dir).toBe(resolvePath(dataDir, 'saved'));
expect(resolve({ dir: '~/qwen-memory-config-tests' }).dir).toBe(
join(homedir(), 'qwen-memory-config-tests'),
);
Expand Down
17 changes: 15 additions & 2 deletions packages/qwen-live/src/memory/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ describe('persistMemoryPreferences', () => {
retrieve: { useVector: false },
});
expect(resolved.updater.model).toBe('custom-memory-model');
expect(statSync(configPath).mode & 0o777).toBe(0o600);
expect(readdirSync(dataDir)).toEqual(['config.json']);
});

Expand Down Expand Up @@ -175,10 +174,24 @@ describe('persistMemoryPreferences', () => {
});
expect(saved.memory.observer).not.toHaveProperty('model');
expect(resolved.observer.model).toBe('custom-memory-model');
expect(statSync(configPath).mode & 0o777).toBe(0o600);
expect(readdirSync(dataDir)).toEqual(['config.json']);
});

// Windows has no POSIX permission bits, so skip (reportedly) rather than
// passing a test that asserted nothing.
it.skipIf(process.platform === 'win32')(
'writes the memory config with 0600 permissions',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Acknowledged — the claim is wrong for src/memory/service.test.ts, but the correction targets the PR description's Test Plan, which this loop cannot edit (the same boundary was recorded last round on R1-2's thread: the PR body is owned by the workflow). Exact correction for whoever edits the body: drop src/memory/service.test.ts from the "now pass" list — the honest set is the four suites that actually failed assertions: src/proactive/monitor-debug-store.test.ts, src/proactive/realtime-monitor.test.ts, src/memory/config.test.ts, src/language-preferences.test.ts.

The second failure class is recorded for follow-up through this round's deferred-findings queue, which survives the merge: 10 packages/qwen-live suites fail to collect on the self-hosted Windows runners because @node-rs/jieba's native binding (@node-rs/jieba-win32-x64-msvc) does not load — reproduced on runs 34638450706 (runner -hk-4) and 34649003053 (runner -hk-3). Its real fix (a lazy Jieba import in src/memory/tokenize.ts, or a CI assertion that the optional binding resolved) is a separate root cause and stays out of this diff, per the finding.

This also bears on R1-2's auto-close concern: with the deferral persisted, the 10 collect-failing suites stay tracked past Fixes #11678.

中文说明

确认——该声明对 src/memory/service.test.ts 不成立,但更正对象是 PR 描述中的测试计划,本循环无法编辑它(上一轮已在 R1-2 的评论串记录过同一边界:PR 描述由工作流负责)。给编辑描述的人的确切更正:把 src/memory/service.test.ts 从「现在通过」列表中移除——诚实的集合是真正断言失败的四个套件:src/proactive/monitor-debug-store.test.ts、src/proactive/realtime-monitor.test.ts、src/memory/config.test.ts、src/language-preferences.test.ts。

第二类失败已通过本轮的延后队列登记,合并后仍然存续:10 个 packages/qwen-live 套件在自建 Windows runner 上无法收集,因为 @node-rs/jieba 的原生绑定(@node-rs/jieba-win32-x64-msvc)无法加载——已在运行 34638450706(runner -hk-4)与 34649003053(runner -hk-3)上复现。其真正的修复(把 src/memory/tokenize.ts 的 Jieba 导入改为惰性,或加一个断言可选绑定已解析的 CI 步骤)属于另一个根因,按该发现的要求留在本 diff 之外。

这也关系到 R1-2 的自动关闭问题:延后登记持久化后,这 10 个无法收集的套件在 Fixes #11678 合并后仍会被跟踪。

() => {
const plain = fixture();
persistMemoryPreferences(plain.dataDir, { enabled: false });
expect(statSync(plain.configPath).mode & 0o777).toBe(0o600);
const bom = fixture();
writeFileSync(bom.configPath, `\uFEFF${JSON.stringify(bom.raw)}`);
persistMemoryPreferences(bom.dataDir, { enabled: false });
expect(statSync(bom.configPath).mode & 0o777).toBe(0o600);
},
);

it('leaves the original file untouched and cleans its temporary file when replacement fails', () => {
const { dataDir, configPath } = fixture();
const before = readFileSync(configPath, 'utf8');
Expand Down
Loading
Loading