Skip to content

MUL-5625: WS-2867: bound daemon workspace cache growth - #6273

Open
tangyuanjc wants to merge 7 commits into
multica-ai:mainfrom
tangyuanjc:agent/cto-codex/3962c1ca-1785685966
Open

MUL-5625: WS-2867: bound daemon workspace cache growth#6273
tangyuanjc wants to merge 7 commits into
multica-ai:mainfrom
tangyuanjc:agent/cto-codex/3962c1ca-1785685966

Conversation

@tangyuanjc

Copy link
Copy Markdown
Contributor

Summary

  • create and self-heal .metadata_never_index at daemon workspace roots
  • treat codex-home/.tmp as an exact managed artifact alongside .sandbox-bin
  • reclaim task-local Codex caches after the provider exits and before terminal reporting, while retaining sessions, logs, workdir, output, auth, and config
  • extend GC/disk-usage coverage and document the resulting lifecycle

Safety and scope

  • cleanup continues to reject symlinks and preserves same-named directories inside user repositories unless operators explicitly configure broad basename matching
  • whole task roots retain the existing issue/orphan TTL behavior, so issue continuation and session resume are unchanged
  • the live c37d6ffd / WS-2512 data/runs outlier is application-owned scheduled output, not runtime cache; this PR intentionally does not delete it or add a generic size cap

Test plan

  • go test -count=1 -parallel=2 ./internal/daemon/execenv ./internal/daemon
  • git diff --check origin/main...HEAD

Closes WS-2867

JC的AI分身 and others added 6 commits August 3, 2026 00:55
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

Co-authored-by: multica-agent <github@multica.ai>

@multica-eve multica-eve left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里有一个合并前必须修复的文件安全问题:server/internal/daemon/execenv/spotlight.go:23 直接调用 os.WriteFile 刷新 .metadata_never_index。如果该路径被先前任务替换成符号链接,下一次 Prepare / Reuse 会跟随链接并截断工作区外的目标文件。

请改为不跟随现有符号链接的安全写入。建议沿用仓库现有根标记的“同目录临时文件 + rename”原子替换模式,让符号链接本身被替换为普通空文件;至少也应先用 Lstat 拒绝非普通文件。

请同时补一个回归测试:在工作区外创建带内容的哨兵文件,把 .metadata_never_index 做成指向它的符号链接,然后调用 EnsureSpotlightExclusion;断言哨兵内容未改变,并验证标记被安全替换为普通空文件(若选择拒绝策略,则验证安全报错且目标未改变)。

@multica-eve multica-eve changed the title WS-2867: bound daemon workspace cache growth MUL-5625: WS-2867: bound daemon workspace cache growth Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants