-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(serve): expose the background agents the supervisor is running #10954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yiliang114
wants to merge
36
commits into
main
Choose a base branch
from
feat/daemon-background-agents
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
dbe9950
feat(cli): list managed Agent View sessions in qwen sessions ps
yiliang114 8879852
docs(skills): stop the recency gate from silencing a stalled wiring
yiliang114 06741f4
feat(cli): start a background Agent View session with --bg
yiliang114 6eb41f0
feat(cli): see, answer and stop a background session
yiliang114 eaa0a23
test(cli): pin the id a background worker registers under
yiliang114 cb77045
Merge branch 'feat/agent-view-bg-dispatch' into feat/agent-view-sessi…
yiliang114 85c5e36
feat(serve): expose the background agents the supervisor is running
yiliang114 a4baf7c
fix(serve): wire the background-agents trust gate in production
yiliang114 7d20281
fix(serve): give the background-agents 503 the daemon error envelope
yiliang114 3620141
test(serve): pin the background-agents field guards in a mixed state
yiliang114 9b14578
fix(cli): keep non-owned supervisor snapshots out of sessions ps
yiliang114 94610b3
fix(cli): verify managed session pids before listing them
yiliang114 3e3dac5
test(cli): pin LF and TAB stripping on the ps store-failure note
yiliang114 4d84fbc
docs(commands): warn that the jq -r example renders session text raw
yiliang114 29a69d0
fix(cli): route Agent View intercepts after bootstrap routing and scrub
yiliang114 993944c
fix(cli): decline --bg launches carrying flags they would silently drop
yiliang114 2031747
fix(cli): strip LF/TAB from one-line session control output
yiliang114 02b87ee
docs(settings): list --bg in the command-line arguments table
yiliang114 6c194f9
fix(cli): name peek's title the way sessions ps does
yiliang114 572de7a
fix(cli): stop peek printing the summary twice
yiliang114 2fde009
fix(cli): write session control failures to stderr
yiliang114 6b2c711
fix(cli): keep the sessions ps JSON contract off display wording
yiliang114 e5e0b6d
Merge branch 'feat/agent-view-first-consumer' into feat/agent-view-bg…
yiliang114 6a96db5
Merge branch 'feat/agent-view-session-control' into feat/daemon-backg…
yiliang114 7614b86
Merge branch 'feat/agent-view-bg-dispatch' into feat/agent-view-sessi…
yiliang114 136e783
fix(serve): report the stable task token, not the table's wording
yiliang114 cd68e10
fix(cli): import the task-state type the row test annotates
yiliang114 1077718
Merge branch 'feat/agent-view-first-consumer' into feat/agent-view-bg…
yiliang114 04735cc
Merge branch 'feat/agent-view-bg-dispatch' into feat/agent-view-sessi…
yiliang114 5315cc4
Merge branch 'feat/agent-view-session-control' into feat/daemon-backg…
yiliang114 2416476
fix(serve): give the background-agents test a pid that is really alive
yiliang114 edddf36
Merge origin/main into feat/daemon-background-agents
yiliang114 1f84edb
Merge origin/main into feat/daemon-background-agents
yiliang114 318237d
Merge origin/main into feat/daemon-background-agents
yiliang114 a5f3bb7
Merge origin/main into feat/daemon-background-agents
yiliang114 ad24822
fix(cli): take isPidAlive from the core module that defines it
yiliang114 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Critical] R5-4: [certifies-falsely] [new-surface] Recorded as a deferral in round 4; this round's measurement confirms it as a blocker. Executed, the recipe this diff adds to decide 'has anything outside it ever referenced it?' is not a wiring detector in either direction: in-repo references are relative import specifiers, so a repo-root path string appears in none of them, and the one placeholder filling that does return hits (basename) leaves the exclusion glob inert, so the directory's own files count as external. The prose at survey.md:156-160 consumes that output directly ('no external reference plus an open, stalled wiring PR … Report it to that stack — the merged infrastructure has no entry point') and SKILL.md:123, added in this diff, promotes it to a decision-table row. So a future run of this skill executes the gate on a subsystem that IS wired, receives its 'no external reference' premise for free, finds some open PR whose title matches the feature, and posts a public report claiming merged infrastructure has no entry point — the false report the surrounding prose exists to prevent ('a "should we delete your new subsystem?" question costs more trust than the finding is worth'), and the exact hazard SKILL.md:302 names: 'a zero-hit result is only evidence once you know the search ran'.
Witness:
Search the import-specifier segment rather than the repo path, exclude with an unanchored glob, and cover file-shaped specifiers as well as directory-shaped ones — then require each hit to be opened, because a same-named directory elsewhere also matches (
/agent-view/also hits packages/cli/src/ui/layouts/DefaultAppLayout.tsx:17, which imports'../components/agent-view/AgentTabBar.js', a different directory that really exists). State the calibration control in the prose so the next run can check it.The replacement must pass the calibration this skill already mandates — 'Calibrate once per run: grep a symbol you know exists and confirm it is found.' (SKILL.md:325). Note that the obvious candidate does NOT:
rg -l '/sessions/' packages --glob '!**/sessions/**'returns 27 files and packages/cli/src/config/config.ts is not among them, because the import is'../commands/sessions.js'— a file, which a/name/pattern cannot match. The agent-view half does reproduce (rg -n '/agent-view/' packages --glob '!**/agent-view/**'→ 28 line hits, 0 inside the directory), so the recipe has to cover both shapes.中文说明
第 4 轮以「延后(非阻塞)」记录;本轮实测确认它是阻塞项。实际执行后可以看到,本 diff 新增的、用于判断「目录之外是否有任何引用」的配方在两个方向上都不是接线检测器:仓库内部的引用是相对 import 说明符,因此从仓库根写起的路径字符串一个都不会出现在其中;而唯一确实能返回命中的填法(用目录名)又会让排除 glob 失效,于是该目录自己的文件也被算成外部引用。survey.md:156-160 的正文直接消费这个输出(「没有外部引用,加上一个开放且停滞的接线 PR …… 报告给那个 PR 栈 —— 已合并的基础设施没有入口」),而本 diff 新增的 SKILL.md:123 又把它提升为决策表中的一行。于是将来某次运行该 skill 时,会对一个已经接线的子系统执行这道闸门、白白拿到「没有外部引用」这个前提,再找到某个标题恰好匹配的开放 PR,然后公开发布一份声称「已合并的基础设施没有入口」的报告 —— 这正是周围文字要防止的误报(「一句『要不要删掉你们的新子系统』所消耗的信任,超过该发现本身的价值」),也正是 SKILL.md:302 点明的危险:「一个零命中结果只有在你确认搜索确实跑过之后才是证据」。
修法与约束见上方英文部分。
— qwen3.8-max via Qwen Code /review (v0.23.2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verdict: REAL — I followed the recipe and measured it. Using the repo's own vendored ripgrep (
packages/core/vendor/ripgrep/x64-linux/rg, ripgrep 15.0.0), run in this worktree at the PR head:while 12 non-test files in this very diff import from that directory, all with relative specifiers — e.g.
ps.ts:41from '../../agent-view/supervisor-store.js',managed-rows.ts:35from '../../agent-view/presentation.js',serve/routes/background-agents.ts:29. So a repo-root path string appears in none of the real references.Positive control on demonstrably wired code, same recipe shape:
That directory is wired (
config.tsimports it), so the recipe returns the same zero for wired and unwired subsystems. It has no discriminating power in either direction, andsurvey.md:156-160consumes that zero as a premise ("recent commits inside the directory plus no external reference plus an open stalled wiring PR" → report "the merged infrastructure has no entry point").The exclusion-glob half of the finding also reproduces:
rg -l 'agent-view' --glob '!agent-view/**' packages/cli/src/agent-viewreturns 14 files — the identical 14 as with no--globat all — so the directory's own files are not excluded (ripgrep anchors slash-containing globs to the search root).This is judged as documentation, not product code, as instructed: the artifact is a skill reference recipe promoted to a decision-table row by
SKILL.md:123in this diff.Closeout fuse — no code added this round. Measured here at head
318237d0f0against merge baseee6003f598e3ff0f0e768250a66796d0c95f309c:git diff --stat= 2553 insertions / 66 deletions, and review has not converged — findings span R1–R6, with new findings minted in R5 and R6 while earlier rounds were being fixed (this thread carries an R5 label). Both fuse conditions hold: no code, no push, PR marked human-gated, thread left unresolved.What a maintainer must decide: may a skill ship a gate that returns the same answer for a wired and an unwired subsystem, and whose output the surrounding prose then asserts as fact? Either the recipe is fixed (search import-specifier shapes, unanchored exclusion, require each hit to be opened, and state a calibration control in the prose per
SKILL.md:325), or the gate is not allowed to be a decision-table input. That is an editorial/product call on the skill, and it is separable from the CLI findings in this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Critical] R5-4: [certifies-falsely] [new-surface] Still standing (round-5 thread, author-confirmed 'Verdict: REAL — I followed the recipe and measured it'; all four probes re-executed at this commit): the external-reference recipe this diff adds is not a wiring detector in either direction. The single
<dir>placeholder cannot satisfy both halves: the content pattern only matches when<dir>is the directory's BASENAME (in-repo references are relative import specifiers — the repo-root path string appears in no tracked file), and the exclusion glob only works when it is the REPO-RELATIVE path (ripgrep anchors a slash-containing glob at the working directory). So the full-path filling returns zero hits forpackages/cli/src/agent-viewat the very commit that wires it from six production files, and the basename filling excludes nothing (the directory's own files count as external) while matching the unrelatedui/components/agent-viewsibling. The consuming prose turns that zero into a verdict ('no external reference plus an open, stalled wiring PR … Report it to that stack — the merged infrastructure has no entry point', :156-160), §3 says 'stop at the first failure' so the corpus grep never runs, and SKILL.md:123 (added here) promotes it to a decision-table row — a future run files a false public stall report against a wired subsystem. Split the placeholder in two (basename for the pattern, repo-relative path for the exclusion), match the import form, require each hit to be opened (same-named siblings), and state the calibration control beside the recipe.Witness:
The fix must not violate SKILL.md:214 — the skill's only other
<dir>is a git pathspec (git log … -- <dir>, repo-relative), so a two-placeholder fix must keep that block working. Acceptance: N/A for a skill recipe — the calibration control IS the acceptance test: the fixed recipe must find config.ts for a sessions-shaped probe (SKILL.md:325 'grep a symbol you know exists').中文说明
仍然成立(第 5 轮线程,作者确认“Verdict: REAL——我照配方实测过”;四个探针已在本次提交全部重跑):本 diff 新增的“外部引用”配方在两个方向上都不是接线检测器。单一的
<dir>占位符无法同时满足两半:内容 pattern 只有当<dir>是目录“basename”时才可能匹配(仓库内引用都是相对 import 说明符——repo-root 路径串在任何被跟踪文件中都不出现),而排除 glob 只有当它是“仓库相对路径”时才生效(ripgrep 把含斜杠的 glob 锚定在工作目录)。于是在“恰好把它接入六个生产文件”的这次提交上,全路径填法对packages/cli/src/agent-view返回零命中;basename 填法则什么都不排除(目录自己的文件也算外部引用),还会命中无关的ui/components/agent-view同名兄弟目录。消费这段输出的行文把“零”直接变成结论(“无外部引用 + 有开放且停滞的接线 PR……报告到那个 PR 栈——已合并的基础设施没有入口”,:156-160),§3 又要求“在第一个失败处停止”,于是全语料 grep 永远不会执行;SKILL.md:123(本次新增)把它升级为决策表行——未来的一次运行会对一个已接线的子系统发布虚假的公开停滞报告。修复:把占位符拆成两个(pattern 用 basename、排除 glob 用仓库相对路径),匹配 import 形态,要求逐个打开命中(同名兄弟目录),并把校准对照写在配方旁。约束:SKILL.md:214 —— 技能中另一个<dir>是 git pathspec(git log … -- <dir>,仓库相对),双占位符修复必须保证该块继续可用。验收:技能配方 N/A——校准对照即验收:修好的配方对 sessions 形态的探针必须能找到 config.ts(SKILL.md:325“grep 一个你确定存在的符号”)。— qwen3.8-max@e6bf8ffe via Qwen Code /review (v0.24.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still real at ad24822 — not fixed.
The recipe is still one placeholder serving two incompatible roles, and it is still surface this diff adds —
git diff --stat origin/main...HEAD -- .qwen/skills/find-simplifications→SKILL.md | 1 +,references/survey.md | 47 ++++---, and thergline shows up as an added (+) line in that diff:Your four probes: confirmed, and I re-ran the decisive one myself at this head.
grep -rn 'packages/cli/src/agent-view' packages | wc -l→ 0. The repo-root path string occurs in no tracked file underpackages, because in-repo references are relative import specifiers. So filling<dir>with the repo-relative path can only ever return zero hits — whilegit grep -ln 'agent-view' -- packageslists consumers outside the directory (cli.ts,ps.ts,managed-rows.ts,managed-control.ts,control-commands.ts,serve/routes/background-agents.ts, plusui/AppContainer.tsx,ui/layouts/DefaultAppLayout.tsx,config/settingsSchema.ts). Zero hits is therefore the recipe's expected output for a fully wired subsystem, which is precisely why it is not a wiring detector.agent-view—git ls-files | grep 'agent-view/' | sed 's#/[^/]*$##' | sort -u→packages/cli/src/agent-viewandpackages/cli/src/ui/components/agent-view. A glob without a slash also anchors per-directory in ripgrep, so!agent-view/**excludes nothing useful.The consumption path is unchanged too. survey.md:156-162 turns that zero into a verdict ("Recent commits inside the directory plus no external reference plus an open, stalled wiring PR is not a deletion candidate … Report it to that stack — the merged infrastructure has no entry point"); the stop-at-first-failure rule at survey.md:97, restated at :341 ("Run § 3 against every candidate, in order, stopping at the first failure"), means a later corpus grep never gets to contradict it; and the single line this diff adds to SKILL.md is the decision-table row at SKILL.md:123 —
| A young **subsystem** unwired, its wiring PR open and stale | Not a deletion. Report the stall to that PR stack |. So a false zero is promoted from a shell snippet to a published stall report against a subsystem that is wired.Minimal fix (not applied): split the placeholder in survey.md:151 into two distinct names — basename for the content pattern, repo-relative path for the exclusion — and match the import form rather than a path prefix, e.g.
"$RG" -l "from '[^']*<base>(/[^']*|\.js)'" --glob '!<repo-rel>/**' packages. Beside it, state (i) that every hit must be opened, since a same-named sibling directory makes a bare filename match insufficient, and (ii) the calibration control for this probe specifically, reusing SKILL.md:325's rule ("Calibrate once per run: grep a symbol you know exists and confirm it is found") — a sessions-shaped probe must findconfig.ts, which is your control and is the acceptance test. The SKILL.md:214 constraint holds under this shape: that<dir>is a repo-relative git pathspec (git log --since='3 months ago' --name-only --pretty=format: -- <dir>), so giving the pattern half a different name (<base>) leaves that block untouched.Why nothing is pushed this round: PR is +2556, over the patrol's 1500-addition size fuse, and there is no maintainer scope ruling on this PR yet — every one of its issue comments and reviews is from qwen-code-ci-bot or the author (verified: the reviews list and the issue-comment list contain no other login) — so this round is reply-only and the fix awaits that ruling. Left unresolved on purpose: real and unfixed.