Skip to content

Fix pipeline compile failure for workspace embedding#11

Merged
YspCoder merged 2 commits intomainfrom
codex/fix-pipeline-compilation-errors
Mar 5, 2026
Merged

Fix pipeline compile failure for workspace embedding#11
YspCoder merged 2 commits intomainfrom
codex/fix-pipeline-compilation-errors

Conversation

@YspCoder
Copy link
Copy Markdown
Owner

@YspCoder YspCoder commented Mar 5, 2026

Motivation

  • 修复 CI 编译失败:cmd/clawgo 包内的 //go:embed workspace 无法找到仓库根目录的 workspace 目录,导致全量构建失败。
  • 需要将嵌入资源放在包含 workspace 目录的包中并导出以供 cmd/clawgo 使用。

Description

  • 新增 workspace_embed.go,在根包 clawgo 使用 //go:embed all:workspace 导出 EmbeddedWorkspace(类型为 embed.FS)。
  • cmd/clawgo/main.go 中原先的 //go:embed workspace 替换为引用 clawgo.EmbeddedWorkspace
  • 移除 cmd/clawgo/cmd_status.go 中未使用的 time 导入以确保全包编译通过。

Testing

  • 运行 go test ./...,所有包成功构建并通过测试,命令执行成功。

Codex Task

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: c1baf67ce6

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workspace_embed.go Outdated
import "embed"

// EmbeddedWorkspace bundles onboarding workspace templates into the binary.
//go:embed all:workspace
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 Remove all: from workspace embed pattern

Using //go:embed all:workspace changes the embed semantics to include dot/underscore files (per go doc embed), so hidden files like workspace/skills/context7/.env are now compiled into the binary and then copied out by copyEmbeddedToTarget during onboard. This is a security/config regression introduced by this commit because sensitive or build-local hidden files can be unintentionally distributed to end users; use workspace (or an explicit allowlist) to preserve the prior exclusion of hidden files.

Useful? React with 👍 / 👎.

@YspCoder YspCoder merged commit 959870e into main Mar 5, 2026
@YspCoder YspCoder deleted the codex/fix-pipeline-compilation-errors branch March 5, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant