Skip to content

fix(template): 修复模板员工部署回看与访问#266

Merged
Xy718 merged 15 commits into
NoDeskAI:mainfrom
Shayne0330:fix/agent-template-deploy-flow
May 26, 2026
Merged

fix(template): 修复模板员工部署回看与访问#266
Xy718 merged 15 commits into
NoDeskAI:mainfrom
Shayne0330:fix/agent-template-deploy-flow

Conversation

@Shayne0330
Copy link
Copy Markdown
Collaborator

变更说明

  • 修复模板员工部署的中间步骤被误判为最终成功,避免 SSE 提前断开和进度页提前结束。
  • 部署结束后重新打开进度页时,从 DeployRecord 回放完成/失败快照,避免空白步骤卡片。
  • 员工详情页的技能提示词展示组织私有 hub 技能,覆盖 Agent Bundle 自动生成技能。
  • NetworkPolicy 默认放行 kube-system / ingress-nginx 中的 Ingress Controller,避免 Traefik 访问实例被入站隔离拦截。

验证

  • DEBUG=true DATABASE_URL=postgresql+asyncpg://nodeskclaw_test:nodeskclaw_test@127.0.0.1:55432/nodeskclaw_test .venv/bin/pytest tests/test_deploy_service_docker_urls.py tests/test_k8s_resource_builder.py
  • .venv/bin/ruff check app/api/deploy.py app/api/portal/deploy.py app/services/deploy_service.py app/services/k8s/resource_builder.py tests/test_deploy_service_docker_urls.py tests/test_k8s_resource_builder.py
  • npm run build
  • 已部署到单节点 K8s,创建 EchoFinalTest0525151522 验证:外部 /healthz 返回 200,详情页显示 SOUL/AGENT/echo 技能,部署进度回看显示成功。

@Xy718 Xy718 marked this pull request as ready for review May 26, 2026 10:35
Copy link
Copy Markdown
Contributor

@Xy718 Xy718 left a comment

Choose a reason for hiding this comment

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

已复查 #266 当前 diff、权限/进度回放/布局确认路径和 CI 状态,可以按 rebase merge 合入。

@Xy718 Xy718 merged commit 80ea7cc into NoDeskAI:main May 26, 2026
2 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5d1eb1180

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +593 to +594
Instance.deleted_at.is_(None),
Instance.org_id == org_id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Allow deploy progress replay after soft-deleting instance

The new access check now requires Instance.deleted_at.is_(None) before serving progress, so once a failed/canceled deployment triggers cleanup and the instance is soft-deleted, /progress/{deploy_id} returns 404 even though DeployRecord still exists and get_deploy_progress_snapshot can replay terminal status. This breaks the newly added “reopen progress page” behavior specifically for deployments whose instance was already cleaned up.

Useful? React with 👍 / 👎.

selected_specs: list[dict] = []
for idx in selected_indices:
spec = deepcopy(all_agent_specs[idx])
new_coord = position_by_index[idx]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle legacy workspace deploy records without agent_positions

_run_deploy_pipeline_inner defaults agent_positions to [], then _build_agent_specs_with_layout unconditionally indexes position_by_index[idx]. For any in-flight/queued WorkspaceDeploy created before this commit (no agent_positions in config_snapshot), this raises KeyError and the pipeline is marked failed instead of continuing with template coordinates, causing upgrade-time regressions for existing deploy jobs.

Useful? React with 👍 / 👎.

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