Skip to content

fix(collaboration): recover delegation workspace preflight diagnostics - #5236

Merged
huangruiteng merged 1 commit into
mainfrom
codex/delegation-runtime-recovery-20260928
Sep 28, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/delegation-runtime-recovery-20260928

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis: reproduced ordinary delegation inspection defect; intended base is main.
  • Before → after: a missing or invalid bound workspace used to abort CLI/MCP/Goal Chat inspection with an untyped error. Inspection now returns workspace_unavailable, a bounded filesystem reason and an operator-owned recovery action.
  • 中文:修复委派预检被失效工作目录截断的问题。统一返回类型化故障及原配置恢复提示;不把“尚未检查 Authority”误报成“需要晋级”。

Scope And Continuation

  • Reuse the existing TypeScript collaboration.delegation.preflight owner. Python observes filesystem facts; CLI, MCP and Team execution consume the same projection.
  • Caller grants and active-Goal checks run first; a changed binding still fails closed. Missing observations remain backward compatible.
  • No directory creation, automatic rebinding, worker launch, authority promotion, quota spend or scheduler acknowledgement occurs during inspection.
  • Remaining work: restore/qualify actual operator-owned worker bindings and validate fresh/resume execution plus result adoption. This PR does not claim a live managed worker is usable.
  • 中文:本 PR 只闭合诊断/恢复读回这一独立边界;真实 worker 的配置恢复、任务验收和父 Agent 产物接纳仍属后续工作。

Validation

  • Tested revision: a99441b2e692a37606c92367185ed5b8a9dd6783 (final browser smoke rechecked on the committed tree; Python and TS checks used the identical production/test sources).
  • Run state: finished.
  • Input classes: synthetic, public_fixture.
Check kind Result Public-safe evidence / limitation
regression_parity passed The newly added missing-workspace actual CLI case fails on the immutable base with an untyped error, and passes after the fix.
unit passed TS delegation tests: 16 passed; malformed observations and invented readiness are rejected; previous authority/Turn semantics are retained.
integration passed uv run --extra test python -m pytest tests/test_delegation_preflight.py -q -n 2 --durations=8: 51 passed in 84.87 s, covering real CLI/MCP/HTTP, file/SQLite, zero effects, exact grants, drift and same-binding recovery. This is not a claim of meeting a 20 s whole-suite budget.
static passed Control-plane typecheck, Ruff and mypy; diff hygiene.
real_entrypoint passed Dashboard production build including packaged Chat; packaged Team execution browser smoke in Chinese/English at desktop/mobile sizes, all three faults and a healthy member recheck. Synthetic HTTP fixture; real production UI, not a live worker.
integration passed uv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main: selected 19 checks passed.
real_backend not_applicable This changes a read-only delegation projection, not provider/storage mutation or a model backend. File and SQLite exercised by existing entrypoint fixtures; no PostgreSQL authority routing or promotion changes.
  • Coverage and gaps: filesystem unreadability is injected deterministically; missing paths and non-directory paths are exercised through actual CLI. No live provider launch or original operator configuration mutation was performed. The local frozen terminal validator deadline remains unmet; it is not raised or reported as passed.

Frontend / Visual Evidence

  • UI impact: changed.
  • Before: existing Team execution error state, with the error response reproduced on the base rendered in the current packaged UI; not a separate baseline UI build.
  • After: bounded workspace fault, original execution-configuration recovery step, explicit uninspected authority/acceptance/runtime.
  • States/viewports: missing, non-directory, unreadable; healthy recheck; Chinese/English; 1512×982 desktop and 390×844 mobile.
  • Source data: synthetic.
  • Attention review: one diagnostic line in the existing on-demand Team execution panel; no new landing section or separate settings authority. Existing member recheck remains the recovery entry point.
  • Public-safe synthetic before/after screenshots; no live/private screenshot is published.

Type of Change

  • Bug fix
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Host or runtime integration

Technical Direction

  • Existing local-delegation read model and TS migration single-owner boundary; not a new provider, decision service or memory system.

Shared-authority RFC fixture impact

  • No production-scale schema or provider routing changes. Extends the existing delegation-preflight response with a bounded fault state; does not change Goal acceptance, authority promotion or settlement.
  • File/SQLite read-only delegation entrypoint fixtures run. Three-arm authority rehearsal is not applicable to this host-filesystem diagnostic; no legacy/file/PostgreSQL cutover or compatibility-authority projection is introduced.

Boundary Checklist

  • Diff/body/comments contain no live private state, credentials, raw traces, internal URLs or local machine paths.
  • No duplicated benchmark program.
  • Scoped repair and remaining acceptance are explicit.
  • Visual evidence and packaged UI checks disclosed.
  • Signed-off-by trailer on the commit.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Synthetic visual evidence / 合成数据视觉验收

Before: the base error response rendered in the current packaged UI (not a baseline build). After: typed workspace diagnosis and original-configuration recovery. Chinese desktop and English mobile; no live Goal or private state.

workspace-preflight-before-response-zh-desktop workspace-preflight-before-response-en-mobile workspace-preflight-zh-desktop workspace-preflight-en-mobile

@huangruiteng
huangruiteng merged commit 6c64102 into main Sep 28, 2026
36 checks passed
@huangruiteng
huangruiteng deleted the codex/delegation-runtime-recovery-20260928 branch September 28, 2026 03:19
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.

1 participant