Fix pipeline compile failure for workspace embedding#11
Conversation
There was a problem hiding this comment.
💡 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".
| import "embed" | ||
|
|
||
| // EmbeddedWorkspace bundles onboarding workspace templates into the binary. | ||
| //go:embed all:workspace |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
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