Skip to content

fix(#1304): 补齐 task_runs 索引、外置 development_candidates 大文件、修复验收预检/4MiB 限制及孤儿容器自愈 - #1305

Merged
zhaozhaozz merged 3 commits into
mainfrom
fix/1304-prod-perf-preflight-candidates-reclaim
Nov 24, 2026
Merged

zhaozhaozz merged 3 commits into
mainfrom
fix/1304-prod-perf-preflight-candidates-reclaim

Conversation

@zhaozhaozz

@zhaozhaozz zhaozhaozz commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1304

改动概览(对应 #1304 F1–F4 及检视意见)

  1. F1:task_runs 补索引(消除高频全表扫描)

    • src/roles/role-run.ts:在列迁移之后新增 task_run_operation (operation_id) 与 task_run_lease_scope (lease_scope, status) 索引。
    • src/roles/storage.ts:在列迁移之后新增 task_run_role_instance (role_instance_id) 索引。
    • 覆盖旧库升级(缺失列 ALTER TABLE 后建索引)与 EXPLAIN QUERY PLAN 回归测试。
  2. F2:验收预检、workspace_read 边界与 4 MiB 通道保护

    • src/tasks/acceptance.ts:预检跳过已知二进制扩展名、超过 256 KiB 文件,并向 workspace_read 透传 max_bytes: 262144 与 skip_binary: true,不再将大二进制整文件按 utf8 拉回控制面。
    • runner/workspace.mjs、manager/project-runner-calls.mjs、src/tasks/related.ts:workspace_read 支持按真实字节数与 NUL 探测跳过,超 1 MiB 返回首尾预览与可读路径(Git 对象落盘到任务 logs/);readRelatedArtifact 在 result.truncated 时诚实返回 complete: false, truncated: true, total_bytes。
    • manager/docker.mjs:保留默认 4 MiB(4 * 1024 * 1024)单次响应保护上限(传 0 仍回退至 4 MiB),同时允许调用方按需显式传入有限上限,避免关闭 Docker API OOM 保护。
  3. F3:development_candidates 大文件列表 Blob 外置与读路径兼容

    • src/storage/payloads.ts、src/storage/migration.ts:将超过 2 KiB 的 files/snapshot_files/skipped_files 去重外置到共享 blobs/,后台 PayloadMigration 自动瘦身存量旧行,PR 发布确认后自动剥离内联 base64(不影响其他任务共享的 blob)。
    • src/agent/engine.ts、src/tasks/pull-request.ts、src/github/publisher.ts、src/tasks/request.ts:所有读取候选文件数组的路径(含 accept() 中报告附带已发布 PR 路径)统一经 loadDevelopmentCandidate 展开,元数据热路径使用 loadDevelopmentCandidateMeta 或轻量字段,避免触碰原始 { $blob } 引用。
  4. F4:统一笔记卷安全清理入口(purgeNotesVolume)

    • manager/projects.mjs:将 reclaimNotes、reclaimStaleNotes 与项目删除(delete_notes)统一至 purgeNotesVolume;按容器实际 Mounts 精准识别仍挂载 -notes 卷的本部署容器(未挂载 -notes 的运行中容器既不阻塞也不被误删),运行中挂载容器拒绝清理(409 notes_volume_in_use / 503 notes_residue_unclearable),已停止挂载孤儿容器仅清理对应代次网络与 resources 行(含未登记代次),绝不误改活跃项目行状态。
  5. 文档同步(双维度)

    • 设计维度:docs/design/storage-and-knowledge.md、docs/design/agent-and-harness-runtime.md
    • 功能维度:docs/features/deployment-and-operations.md

本地验证结果

  • npm run check:tsc --noEmit 与运行时语法校验(782 files)通过。
  • npm run build:控制面与公开看板构建通过。
  • 定向回归测试(test-sets.mjs,6/6 集合,118/118 用例全部通过):
    • test/ut/src/storage/prod-hardening.test.mjs(7/7)
    • test/st/src/agent/agent-process.test.mjs(40/40,含外部化 >2 KiB 候选发布后报告验收回归)
    • test/st/src/projects/notes-reclaim.test.mjs(含 Mounts 过滤、非挂载运行中容器保留、reclaimStaleNotes、delete_notes 与 /readyz 自愈)
    • test/st/src/tasks/task-acceptance.test.mjs
    • test/st/src/projects/project-env.test.mjs
    • test/ut/src/tasks/related-disclosure.test.mjs(5/5)

@zhaozhaozz

Copy link
Copy Markdown
Collaborator Author

Reviewed head e0d1d6278b4d27e94d57a9ea3f108b4f3eae0540. Blocking issues below; not enqueued.

[blocking] Unbounded Docker response buffering (manager/docker.mjs:24,30)

The 4 MiB absolute cap on Docker.request was removed instead of being made per-call (maxBytes defaults to 0 = unlimited), and no caller passes maxBytes (verified by grep across manager/). Every Docker API response is now buffered without bound: container inspect, /system/df (images/build-cache/containers/volumes), /containers/{id}/logs, exec output, etc.

This directly contradicts the recorded acceptance criteria for #1304: the issue's must-fix F1 says "do not remove the 4 MiB protection; set limits per call", and the development acceptance in #1304 says "keep the 4 MiB protection limit". The acceptance-preflight fix does not need the cap removed at all: src/tasks/acceptance.ts:134-137 already requests max_bytes: 262144, and runner/workspace.mjs now returns bounded previews for large reads. A single chatty container log or a large /system/df response on a busy host can now OOM the manager and take down every project computer that depends on it, and this is not mitigated by the runner because the manager proxies many non-runner Docker calls.

test/ut/src/storage/prod-hardening.test.mjs ("allows responses larger than 4 MiB without artificial docker_response_too_large cap") now asserts the unprotected behavior, so the test suite enshrines the regression.

Suggested fix: keep an absolute upper bound (e.g. the previous 4 MiB default, or a clearly reasoned larger value) and add an explicit per-call override only where a real caller needs more (workspace_read already returns a bounded payload). Add/adjust the test to assert the absolute cap still applies while a legitimately larger per-call limit succeeds.

[blocking] Notes-volume reclaim not unified; new path has destructive side effects (manager/projects.mjs:640-671,688-704,1412-1420)

The issue required F2/F4: "extract a shared safe-cleanup function (stopped containers/network -> volume -> directory/orphan rows) and call it from all three entry points". Only reclaimNotes was changed. reclaimStaleNotes (:688-704) still performs a bare DELETE /volumes/... and maps any failure to notes_residue_unclearable 503; it is called by reconnect/register (:1197), notes (:711), files (:733), fileTree (:764) and start/reset (:1400). The project-deletion path (:1412-1420) still deletes the volume directly and only sets notes_purge=1 on failure. With a stopped orphan container still mounting the volume, all of these paths keep returning 409/503 until an unrelated NotesReclaimer sweep happens to run, so the production symptom is only partially fixed.

Additionally, the new reclaimNotes (:640-671) has two unsafe behaviors:

  • It deletes every stopped container matching department.bot.deployment + department.bot.repository without verifying the container actually mounts the -notes volume, and refuses (409) if any matching container is running. The check should be based on Mounts containing this volume, not just labels.
  • It always deletes all resources rows for the repository and forces projects.state='deleted', desired='deleted', even when called for a repository that is being reconnected (src/projects/service.ts reconcileProject calls reclaimNotes for a live repository). That can wipe the current generation's resource metadata and transiently mark a live project as deleted. Limit the mutation to the orphaned generation, and do not change project state for a repository that still exists.

Add tests for the reclaimStaleNotes and project-delete paths (they are the ones still failing), and for a running container that does not mount the notes volume.

[blocking] Externalized candidates break existing readers (src/agent/engine.ts:481-482)

saveDevelopmentCandidate replaces files/snapshot_files/skipped_files with { $blob } once their JSON exceeds 2 KiB. Several readers still use JSON.parse(row.data) directly and expect arrays. The concrete failure is in accept():

const saved=...JSON.parse(saved.data), code=saved; if(code?.published){ ... compact(code) ... } where compact does value.files.map(...). Once files is a blob ref, .map is not a function and the task dies with a runtime TypeError. This is reachable for any non-development task that published a PR via create_pull_request and then delivers its final report (the comment at :479 states this is a supported flow), whenever the stripped files manifest is larger than 2 KiB (a PR touching a few dozen files).

The other direct-parsing readers (engine.ts:417, engine.ts:984, engine.ts:1016, roles/merge.ts:89, tasks/publication.ts:35, tasks/retries.ts:16, tasks/versions.ts:26, tasks/integration.ts:22, tasks/external-links.ts:136, review/bot-pr-wake.ts:1821) currently only touch lightweight metadata, but they are one field away from the same failure. Reading only metadata is fine for the row size goal, but the shape contract must be explicit.

Suggested fix: route every reader that can touch these keys through loadDevelopmentCandidate (or a shared candidateValue resolver), and add a regression test that saves a large candidate, then exercises the report-after-publish path and Publisher.branch (load -> tree -> publish) with a real fixture; the current prod-hardening test only covers the helpers and migration.

[blocking] Documentation

docs/features/ was not updated even though behavior/operations changed (manager response limits, workspace_read truncation/spill, notes-volume self-healing, candidate storage). AGENTS.md requires both dimensions, and the #1304 verification requirement explicitly asked for docs/design and docs/features. Also docs/design/agent-and-harness-runtime.md:15 states the 4 MiB cap is "replaced by the runner's spill protocol", which is inaccurate for the non-runner Docker responses above; please correct it when restoring the cap.

[blocking] Closes #1304 is premature

Because the recorded F1/F2 acceptance items are unmet, use Refs #1304 until the complete acceptance is satisfied, so merging does not close the issue early.

Minor: the new index test creates a fresh database; a startup test on an old schema (columns added by later ALTER TABLE) would also verify the F4 ordering requirement. unit shard 1 / 2 was still pending at review time.

@agent-ci-infra-bot agent-ci-infra-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed commit: e0d1d62
Coverage: PR #1305; 19 changed file(s)

Comment thread src/agent/engine.ts
const published={number:pr.number,html_url:pr.html_url,sha:commit};
this.store.run('UPDATE development_candidates SET data=? WHERE task_id=?',JSON.stringify({...JSON.parse(this.store.get('SELECT data FROM development_candidates WHERE task_id=?',id)!.data),published}),id);
const strippedFiles=Array.isArray(candidate.files)?candidate.files.map(({base64:_b,...rest}:any)=>rest):candidate.files;
saveDevelopmentCandidate(this.store,id,{...candidate,files:strippedFiles,published},String(task.repository_id));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

必须修复:这行把 files 外置成 {$blob} 之后,最终报告路径仍按内联数组使用它,必然抛 TypeError。

  • saveDevelopmentCandidate(本行与 :547)经 storedCandidate(src/storage/payloads.ts)在 JSON.stringify(files).length > 2048 时把 files 写成 {$blob, bytes}。
  • src/agent/engine.ts:481-482 仍 JSON.parse(saved.data),再 compact(code)(engine.ts:476)执行 value.files.map(...) → TypeError: value.files.map is not a function。
  • candidate.files 是整棵树清单(workspace_finalize 全量返回,publisher.branch 的 snapshot.filter(f => !paths.has(f.path)) 也要求全量),剥掉 base64 后单条约 90–110 字节,实测 20 条 = 2241 字节,即仓库文件数约 20 个以上就必然外置。
  • 触发链路:非 development 任务 create_pull_request 成功后走 publishPullRequest()(本行)→ 模型结束 → acceptReport(result) → accept(result)(无 tree_sha)→ engine.ts:480 命中 code.published → 抛错 → 归为 task_runtime_failure(engine.ts:1005-1007)。PR 已建好,但评审结论/摘要永不发布,还要消耗 5 次自动重试;本 PR 的迁移阶段(src/storage/migration.ts:222-234)把历史行外置后,恢复执行的老任务同样命中。
  • 修复:这一处改用同文件已在用的 loadDevelopmentCandidate(this.store, id)(:527、:542 已经改对,只剩这一处漏改)。

Comment thread manager/docker.mjs Outdated
headers: bytes ? { 'Content-Type': 'application/json', 'Content-Length': bytes.length } : {} }, res => {
const chunks = []; let size = 0;
res.on('data', b => { size += b.length; if (size > 4 * 1024 * 1024) req.destroy(new Error('docker_response_too_large')); else chunks.push(b); });
res.on('data', b => { size += b.length; if (maxBytes > 0 && size > maxBytes) req.destroy(new Error('docker_response_too_large')); else chunks.push(b); });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

建议:4 MiB 上限被删除后没有任何替代上限。

maxBytes 在生产代码里没有任何调用方传值(grep -rn maxBytes manager/ src/ 只命中定义处),因此这里的 maxBytes > 0 恒为假:所有 Docker socket 响应都无界缓冲在 manager 进程内。文档把理由写成"改由 runner 落盘协议控制输出大小",但那只能约束 runner 响应;/containers/json、/volumes、镜像 inspect 等直连 Docker 的响应不受其约束,而 manager 一旦被 OOM,该主机上所有项目电脑一起下线。建议给一个宽松默认值(例如 64 MiB)而不是 0。

Comment thread runner/workspace.mjs
const logsDir=root+'/logs';await mkdir(logsDir,{recursive:true,mode:0o700});
const spillPath=logsDir+'/read-'+input.sha.slice(0,12)+'-'+createHash('sha256').update(spec).digest('hex').slice(0,16)+'.out';
await writeFile(spillPath,raw,{mode:0o600});
return {content:previewBytes(raw.subarray(0,64*1024),raw.subarray(Math.max(0,raw.length-64*1024)),raw.length,spillPath),truncated:true,size:raw.length,log_path:spillPath,version:input.sha};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

建议:截断后的 content 会被分页读取方当成完整内容。

这里返回的是"头部 + 省略标记 + 尾部"的拼合字符串,但调用方仍按连续内容切片计数:src/tasks/related.ts:69-70 以 result.content.length 作为 total_characters,并用 complete: next >= result.content.length 判定读完。于是 offset 落到预览之外时返回 content: '' + complete: true,按 offset 逐页拼出的"全文"还会混入省略标记——这是把不完整内容当完整证据静默返回,而该工具正是 QA / 评审的取证入口(src/tasks/versions.ts:54 的 read_version_file 同样会把预览当全文交给 Manager,只是多了 truncated 字段)。

另外磁盘分支(runner/workspace.mjs:56)没有像 Git 对象这样落全量副本,标记却写 "read the complete file from <同一路径>",用同一工具再读一次仍是同样的预览,容易空转。建议:截断时统一返回可读全量的 log_path(磁盘分支也落一份 logs/ 副本),或让分页调用方按 truncated 处理并拒绝给出 complete: true。

@agent-ci-infra-bot

agent-ci-infra-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

第 2 次检视,更新于 2026-11-24 03:29 UTC,检视提交 d9c27f6

第 2 轮检视:50737979(基线 45e5c7df,22 文件 / +724 −60)

上一轮的 3 条结论在本次 head 上全部已修复。但本 head 的 CI unit shard 1 / 2(job 138188504838)为失败:两处行为变更没有同步既有 ST 用例,合入前需要处理。

上轮结论状态

  • F1(必须修复)已修复:src/agent/engine.ts:481 改用 loadDevelopmentCandidate,与 :527/:542 一致;payloads.ts 新增 loadDevelopmentCandidateMeta 并把 {$blob} 占位符从 files/snapshot_files 中剥掉,避免把 blob 引用当数组使用。test/st/src/agent/agent-process.test.mjs 新增外置候选(30+ 文件)发布后仍完成报告验收的回归用例,test/ut/src/storage/prod-hardening.test.mjs 补了 Publisher.branch 端到端外置用例。上轮的 TypeError: value.files.map is not a function 崩溃路径已消除。
  • F2(建议)已修复:manager/docker.mjs 恢复 defaultMaxResponseBytes = 4 MiB 默认上限,maxBytes 为非正数时回落到默认值(传 0 不能关闭),用例同时断言默认 4 MiB 拦截 5 MiB 响应、显式传 8 MiB 才放行。
  • F3(建议)已修复:src/tasks/related.ts 对 truncated 结果直接返回 complete:false 并保留 truncated/total_bytes/log_path;runner/workspace.mjs:41 的省略提示改为「仅内联预览被截断,请分段查看该路径」,不再声称同一路径可读全文。新增用例断言截断预览永不 complete: true。

维护者列的阻断项(4 MiB 保护、reclaimNotes 统一走 purgeNotesVolume、按 Mounts 精确匹配容器、generation 级资源清理、孤儿 projects 行状态、文档同步、旧 schema 升级用例)在当前 head 上都有对应实现与用例,逐项核对通过。

本轮新增阻断(CI 红)

unit shard 1 / 2 在 50737979 失败(1440 用例中 fail 2,失败集 workspace-snapshot)。两处都是「本 PR 改了行为、但没更新原有用例」:

用例 现象 根因
test/st/src/agent/workspace-snapshot.test.mjs:164 actual 131325 vs expected 5242897 runner/workspace.mjs:41 让 workspace_read 对 >1 MiB 文件一律返回「64 KiB 头 + 省略标记 + 64 KiB 尾」预览,调用方不再拿到全文
test/st/src/agent/workspace-snapshot.test.mjs:137 TypeError: Received undefined(Buffer.from(files[1].base64)) src/agent/workspace.ts:516 把「同 path 同 sha 才复用」放宽为「任意 path 只要 sha 已在上游即省略 base64」,两个同内容改动文件不再携带 base64

这两条不影响 #1304 的目标本身,但属于「新行为 + 旧断言」的直接冲突:要么把行为收窄到真正需要截断的调用方,要么把用例改到新契约(并补一条真正需要传输新 blob 的用例,避免复用逻辑失去覆盖)。

其余检查在本 head 上均成功:e2e、bot-control-plane、bot-project-computer、bot-computer-manager、CodeQL;unit shard 2 / 2 在检视时仍在运行。

其它

  • PR 描述仍是 Closes #1304。维护者此前要求「完整验收通过前用 Refs #1304」;从 修复生产慢 SQL、acceptance 预检拉取大二进制撞 4MiB 限制、development_candidates 膨胀及孤儿容器阻塞笔记卷回收 #1304 的 4 项修复内容看,当前实现已逐项覆盖(task_runs 索引 + 旧 schema 升级、候选外置、预检 max_bytes/二进制跳过 + 4 MiB 策略、reclaimNotes 清孤儿容器/网络/孤儿行),因此能否闭合建议维护者在合入时确认,本轮不作为阻断项。
  • 验证方式说明:本任务工作区没有 node_modules/dist,未能本地运行测试;以上结论基于源码与 diff 逐行核对,以及 CI 结果(run 45317723260 / job 138188504838,失败集合与断言位置见上表)。

之前的行内意见仍未解决 3 条:src/agent/engine.ts:534、manager/docker.mjs:30、runner/workspace.mjs:630。

Reviewed commit: d9c27f6
Earlier heads this review also read: 5073797
Coverage: PR #1305; 23 changed file(s)

@zhaozhaozz
zhaozhaozz enabled auto-merge November 24, 2026 03:11

@agent-ci-infra-bot agent-ci-infra-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed commit: d9c27f6
Earlier heads this review also read: 5073797
Coverage: PR #1305; 23 changed file(s)

Comment thread runner/workspace.mjs
let start = 0; while (start < 3 && (tailBuf[start] & 0xc0) === 0x80) start++;
const tail = tailBuf.subarray(start).toString('utf8');
const omitted = Math.max(0, totalBytes - Buffer.byteLength(head) - Buffer.byteLength(tail));
return head + `\n[… ${omitted} bytes omitted from inline preview; inspect slices of ${sourcePath} directly (e.g., head/tail/sed) …]\n` + tail;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

必须修复:workspace_read 对 >1 MiB 文件一律返回预览,既有 ST 用例因此失败,CI 变红。

  • runner/workspace.mjs:43-52 的 readBoundedFile 在 size > outputLimit(1 MiB)时无条件返回「64 KiB 头 + 省略标记 + 64 KiB 尾」预览,与调用方是否传 max_bytes 无关;磁盘分支同理。
  • CI unit shard 1 / 2(job 138188504838)中 test/st/src/agent/workspace-snapshot.test.mjs:164 失败:assert.equal((await run({type:'workspace_read',path:file.path})).content.length, data.length) 得到 actual 131325 / expected 5242897(131325 ≈ 64 KiB + 64 KiB + 标记,正是预览长度)。该用例未被本 PR 修改,说明这是本 PR 引入的行为变化。
  • 影响不止 CI:所有 workspace_read 调用方(评审/开发 Agent 读取大文件、src/tasks/versions.ts:54 的 read_version_file)拿到的不再是全文;本轮只有 related.ts 被改成可感知截断,其余读取方仍按「content 即全文」使用。

修复建议(二选一,推荐前者,与设计文档「大文件返回首尾预览」一致):

  1. 更新该用例到新契约:断言 truncated === true、size === data.length、log_path 指向的文件能读到完整 5 MiB 内容、预览含头部与尾部片段;同时保留一条小文件全文读取的断言。
  2. 或在未传 max_bytes 时保持返回全文,仅让显式请求截断的调用方拿到预览。

无论选哪种,请顺带核对 workspace_read 的工具描述是否已说明「超过 1 MiB 返回预览」,避免模型把预览当全文使用。

Comment thread src/agent/workspace.ts
// Existing upstream objects need no round trip through a base64 candidate buffer.
if(original.get(file.path)?.sha===file.sha){files.push({path:file.path,mode:file.mode,sha:file.sha});continue;}
// Existing upstream objects (including renames/moves whose git blob sha already lives on GitHub) need no base64 copy.
if(original.get(file.path)?.sha===file.sha||originalShas.has(file.sha)){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

必须修复:上游 sha 复用放宽后,既有 ST 用例失败(同一次 CI 红)。

  • 本行把「同 path 同 sha 才复用」放宽为「任意 path 只要 sha 已存在于上游即可省略 base64」。
  • CI 同一 job 中 test/st/src/agent/workspace-snapshot.test.mjs:131 的用例失败,workspace-snapshot.test.mjs:137 处 Buffer.from(files[1].base64,'base64') 收到 undefined:用例里 original.bin / large.bin / second.bin 内容相同(同 sha),因此两个「改动」文件现在都不再携带 base64。
  • 产品侧这个优化本身合理(Git 对象按仓库全局寻址,publisher.branch 可以只带 sha),但用例仍断言两个改动路径共传输 34 MiB,与本 PR 的新语义直接冲突。

修复建议:把该用例改成新契约——断言同 sha 的移动/重命名路径只带 path/mode/sha/size、传输字节为 0(或只统计真正的新 blob),并补一条 sha 不在上游的用例断言其仍会完整传输,避免复用逻辑失去覆盖(否则将来把省略 base64 扩展到新 blob 时无人发现)。

@zhaozhaozz
zhaozhaozz added this pull request to the merge queue Nov 24, 2026
@zhaozhaozz

Copy link
Copy Markdown
Collaborator Author

Reviewed head d9c27f6721470fdee191011917985e71edb2c9c6 (previous head 507379792e24f3ad52d2b3764d50508a8e4bc6c2 also read). No blocking findings; reusing the existing merge-queue entry for this head.

Earlier findings on this PR are all fixed. The 4 MiB Docker response cap is restored as a default (manager/docker.mjs: non-positive values fall back to 4 MiB, a finite per-call override is allowed); purgeNotesVolume now backs reclaimNotes, reclaimStaleNotes and project deletion, matches containers by their actual Mounts, cleans only the removed generation's network/resources and only marks an orphan project deleted; candidate readers that can touch the externalized arrays go through loadDevelopmentCandidate/loadDevelopmentCandidateMeta (with a regression test for the report-after-publish path); docs/design and docs/features were updated; the legacy-schema index upgrade is covered.

The only remaining blocker on 50737979 was the red unit check (workspace-snapshot.test.mjs:137 and :164, which still asserted the pre-change contracts). d9c27f67 reconciles both tests with the intended behavior (blob-sha reuse including a real new-blob transfer case; >1 MiB reads return a preview with truncated/size and the on-disk file is verified full). On d9c27f67 the required checks are green: unit (both shards), e2e, bot-control-plane, bot-project-computer, bot-computer-manager, bot-cloudflare-tunnel; CodeQL/Analyze pass and this PR has no open code-scanning alert.

The parallel review's still-unresolved inline threads were independently re-checked and are closed by the current code: src/agent/engine.ts no longer parses the candidate row by hand for the report path; manager/docker.mjs keeps the bounds; runner/workspace.mjs truncated results are surfaced by src/tasks/related.ts as complete:false with truncated/total_bytes/log_path.

Queue: the existing entry MQE_lQDOVSUGkc8AAAABRbZA6s4ABPIkzgRDJ3A (position 1, AWAITING_CHECKS, enqueued 03:36 UTC) corresponds to the reviewed head: the queue rebased the three PR commits onto current main (1e21b452 / 555b71b0 / 1ea57eed, same author timestamps and commit messages, first parent main tip b113992). The rebase overlap with newer main is additive only (the two docs: main's service-turn/deploy paragraphs plus this PR's paragraphs). I did not enqueue a second time; the merge-group checks and the MERGED result are being watched.

Closes #1304 is no longer a finding at this head: all four acceptance items are implemented and tested; what remains is post-deploy monitoring.

Merged via the queue into main with commit 1e21b45 Nov 24, 2026
12 checks passed
HugoXK pushed a commit to HugoXK/LaunchPad that referenced this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

修复生产慢 SQL、acceptance 预检拉取大二进制撞 4MiB 限制、development_candidates 膨胀及孤儿容器阻塞笔记卷回收

1 participant