Repository navigation
Conversation
Robert0622
left a comment
There was a problem hiding this comment.
Reviewed 050eb6c and exercised workspace-opening progress, failure preservation and retry behavior locally.
Validation on Linux:
- Built this head's chatbot bundle; its workspace-opening component tests passed.
- Clone/checkout, conversation workspace, preparation, runner control/progress and workspace-opening tests passed in gitwork, engine, runtime, runner, httpapi and repo.
- All workspaceprep tests passed, including streaming before command exit, process-group cancellation, split-secret redaction, bounded unterminated output and timeout configuration.
I found no blocking issue in this diff. This was local subprocess/API/component validation; I did not simulate a real throttled network or use a live Docker daemon. Please coordinate with #150, which changes overlapping clone/build paths. LGTM on this head.
|
Thanks — the review and validation of
This isn't a mechanical conflict: Once it's rebased and CI is green, I'll re-review the delta and merge. |
050eb6c to
0e2de75
Compare
|
LoopForge PR Review — head
|
|
LoopForge PR Review - commit 0e2de75 Verdict: Pass GitHub Actions for this PR currently show action_required for e2e, platform, validate (workflow approval gate, likely fork/first-run), so there is no authoritative CI signal yet. I checked out this exact SHA in an isolated sandbox (no credentials, no production access) and ran the affected packages directly:
No correctness issues found in the reviewed packages; scope (workspace-opening progress reporting, procwatch observer reuse, retained bindings on failed opens, base-branch validation) matches the stated design and is backed by passing tests. This is a large diff (36 files, ~2.8k diff lines) - this review focused on the new/changed logic paths and their direct test coverage rather than a line-by-line read of every file changed. FYI: once a maintainer approves the pending workflow runs, worth a quick glance to confirm CI comes back green too. |
There was a problem hiding this comment.
[P2] Apply the build timeout to the deferred Docker image build
At lines 107–109, EnsureWorkspacePreparation runs under the prepare phase, but for Docker sandboxes this is also where the lazy image build is triggered. The earlier build phase only acquires/wraps the sandbox; it does not execute the image build. As a result, a cold build is cancelled by AGENTFLOW_WORKSPACE_PREPARE_TIMEOUT (5 minutes by default), even though AGENTFLOW_WORKSPACE_BUILD_TIMEOUT allows 15 minutes. A healthy build taking 5–15 minutes therefore fails prematurely.
I reproduced this through prepareRunnerWorkspace with a controlled Docker command fixture: with build timeout 4s and prepare timeout 1s, the deferred build starts and is cancelled after about 1s. Please put the actual image build under the build-phase deadline, retain the prepare deadline for subsequent initialization, and add a regression test covering a deferred build with a shorter prepare timeout.
There was a problem hiding this comment.
Thanks for finding this. Fixed in 856fa6d. Lazy Docker startup now runs under the build-phase deadline, while initialization keeps its separate timeout. Added regression tests covering the cold-build scenario and both timeout paths; they reproduce the issue before the fix and pass afterward. Could you take another look?
|
LoopForge PR Review — head Verdict: ✅ Pass
|
Keep generation diagnostics alongside workspace-opening progress, and retain procwatch error helpers with bounded failure output.
|
LoopForge PR Review — head Verdict: ❌ Fail
Blocking: please rebase/re-merge |
Merge main through eb4d4d5 to resolve the overlap with Tencent#494. Keep opening progress and request-scoped cancellation alongside agent-tool forwarding, serialized websocket writes, and refreshed write deadlines. Cancel one-shot preparation and checkpoint requests without terminating persistent conversation processes when their start RPC completes. Preserve bounded cancellation delivery when the control writer is busy. Guard optional progress recording during SOP handoff and bind the retry fixture to its session's execution target. Cover concurrent tool forwarding, CLI lifetime, checkpoint release, and cancellation backpressure.
The merge with Tencent#494 limits remote cancellation and live opening progress to checkpoint work and workspace-kind preparation. No test exercised a run-preparation request (RunKind other than workspace), so dropping the RunKind check on either side went unnoticed. - httpapi: TestRunPreparationIsNotRequestScoped checks the hub neither forwards opening progress nor sends workspace.cancel for such a request. - runner: TestWorkspaceCancelDoesNotAbortRunPreparation checks a stray workspace.cancel does not abort the preparation script or stream progress. Co-Authored-By: Claude Code <noreply@anthropic.com>
Sanitize only matched the Basic and Bearer schemes, so an "Authorization: token <pat>" header echoed in command output reached the progress boundary unredacted; the receiving side's exact-token redaction was the only safeguard. Match the token scheme as well and cover both it and an http.extraHeader Basic header in the sanitizer test.
|
LoopForge PR Review — head Verdict: ✅ Pass
|
Yanami-2K
left a comment
There was a problem hiding this comment.
对照 #124 核对了需求:分阶段进度(准备/构建/克隆/分支)、各阶段可配置超时、失败写入运行日志和 runs_get.problems、重试复用同一 run 与已完成检出、Dockerfile 冻结版本提示、慢网络文档,这些都有对应实现;全量 mirror 缓存未做,PR 描述里已经说明。RecordWorkspaceOpening 在落库前对 message/output 做 token 脱敏和长度限制;RemoveIncompleteClone 只删除空的中断克隆,有文件、index、baseline 或 refs 时都会保留;workspacePreparationProblems 也处理了“opening 已就绪后清除旧失败”和“之后又有新失败”的去重。新增测试断言了脱敏、StartedAt 延续、事件压缩、阶段超时和 SSH 密钥约束,CI 全绿、mergeableState=clean,所以批准。
说明:本次 diff 里有约 20 个文件的 patch 被省略,没能逐行看到,包括 internal/procwatch/procwatch.go、internal/runner/daemon.go、internal/runner/control.go、internal/runner/workspace_preparation.go、internal/repo/runs.go、internal/workspaceprep/*.go,以及 internal/httpapi/workspace_opening_test.go。这些文件的判断依据是 PR 描述和对应的测试名,合并前建议维护者重点再看 runner 的 workspace.progress/workspace.cancel 协议部分。
Merge main through 777f16a while preserving workspace progress, scoped cancellation, and retries that retain the current workspace and its files. Keep upstream's sandbox-only opening API and legacy Git-config restoration. Adapt retry guidance to the current environment-selection contract and explain the scope of platform-managed Git deadlines. Update the Docker deadline fixture for direct script execution and workspace mount inspection, and verify that a failed empty workspace is reused and becomes ready on retry.
What changed
Fixes #124.
Slow sandbox/image builds left chat workspaces at “opening”, with no useful logs or problems. Opening now reports its current phase, elapsed time, timeout and bounded command output. Legacy workspaces with platform-managed repositories also report clone and branch progress, including Git transfer speed. Failures appear in chat, run logs and
runs_get.problems, even when the workspace has no SOP nodes.procwatchobserver. Clone and Docker build use one execution/cancellation path, preserving stall detection, command timeouts, always-on clone progress, and tail-only errors from fix(workspace): report progress and stop hung clones and image builds (#124) #150. Existing run-event and runner-log observers remain active. The same Git execution path preserves upstream's managed SSH credentials, URL redaction and SSH branch safeguards.--reference --dissociaterepack exception and stop fallback retries after a stall or timeout. Bound unterminated output and redact complete lines before publishing them.workbench_workspace_openwithout arguments retries the same environment and run. New conversation workspaces stay empty until the agent performs its own Git operations, following feat(workspaces): open conversation workspaces by sandbox with agent-owned Git #947. For legacy platform-managed checkouts, recover only empty interrupted clones, preserve local work, and avoid repeating a full clone when no reference cache was used.Scope
Includes the native chat UI and deployment documentation.
Compatibility
Follow main's sandbox-only opening API: the only optional argument is
sandboxProfileId. Choosing another environment switches to that environment's workspace; repeating the current choice reuses it. Agent-owned native CLI Git commands are outside the platform clone/branch deadline settings. Upstream's legacy Git-config restoration and removal of the old script helper are preserved.No database migration: progress is stored in the existing run-event JSON payload and log tables. Workspace scheduler status remains
waiting; readiness/failure is recorded separately.Runner progress and cancellation use additive
workspace.progress/workspace.cancelcontrol messages. Upgrade both platform and runner for live progress and cancellation; older runners still return their final result and retain their existing preparation timeout. Ordinary runner checkouts retain main's configurable command/branch bounds (AGENTFLOW_GIT_CLONE_TIMEOUT, 10 minutes by default). Opening-phase and command deadlines both apply; documentation explains their precedence.Retries preserve frozen environments and existing files. This does not add a shared credential-independent mirror cache or resume partially downloaded Git packs; completed checkouts, Docker layers and the existing local
--reference --dissociatepath are reused.Validation
Validated merge commit
a9d9ef8against upstreammainat777f16a.runner,engine,runtime,gitwork,procwatch,workspaceprep,domain,repo,httpapiandweb, using CI's five real-browser test exclusions and 600-second package timeout.go vet ./...,python3 scripts/check-public.pyandbash scripts/scan-secrets.sh.Docker deadline tests use controlled command fixtures. Real Docker builds, live model services, real-browser acceptance and the race detector were not rerun for this update. Classic/Portable-specific changes are inherited unchanged from upstream.
Safety
Implementation and tests prepared with Codex assistance.